Module: check_mk
Branch: master
Commit: 9d9d169cce2524a2af96831181863b028b44f2b5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9d9d169cce2524…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 21 14:18:05 2014 +0100
The windows agent contains meta information about version, manufacturer etc.
The windows agent exe files do contain meta information like product name, manufacturer,
version etc. now. This might be useful for some software distribution systems.
---
.werks/760 | 9 ++++++
ChangeLog | 1 +
Makefile | 1 +
agents/windows/.gitignore | 2 ++
agents/windows/Makefile | 30 +++++++++++++++-----
agents/windows/check_mk_agent-64.exe | Bin 190464 -> 226816 bytes
agents/windows/check_mk_agent.exe | Bin 160768 -> 175104 bytes
.../windows/{installer.ico => check_mk_agent.ico} | Bin 12862 -> 12862 bytes
agents/windows/check_mk_agent.rc.in | 29 +++++++++++++++++++
agents/windows/installer-64.nsi | 2 +-
agents/windows/installer.nsi | 2 +-
11 files changed, 67 insertions(+), 9 deletions(-)
diff --git a/.werks/760 b/.werks/760
new file mode 100644
index 0000000..fb45d99
--- /dev/null
+++ b/.werks/760
@@ -0,0 +1,9 @@
+Title: The windows agent contains meta information about version, manufacturer etc.
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1395407804
+Class: feature
+
+The windows agent exe files do contain meta information like product name, manufacturer,
+version etc. now. This might be useful for some software distribution systems.
diff --git a/ChangeLog b/ChangeLog
index fbe857f..0abb405 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -122,6 +122,7 @@
* 0596 dell_chassis_status, dell_chassis_temp, dell_chassis_kvm, dell_chassis_io,
dell_chassis_fans: new checks to monitor the overall status of various sections of the
Dell Poweredge Chassis via CMC
* 0597 dell_chassis_slots: new check to monitor the status of the blade slots of the
Dell Poweredge Blade Servers
* 0759 check_notify_count: New active check to monitor the number of notifications
sent to contacts...
+ * 0760 The windows agent contains meta information about version, manufacturer
etc....
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
diff --git a/Makefile b/Makefile
index bceb8ca..658c7a4 100644
--- a/Makefile
+++ b/Makefile
@@ -156,6 +156,7 @@ setversion:
sed -i 's/say "Version: .*"/say "Version:
$(NEW_VERSION)"/' agents/check_mk_agent.openvms
sed -i 's/#define CHECK_MK_VERSION .*/#define CHECK_MK_VERSION
"'$(NEW_VERSION)'"/' agents/windows/check_mk_agent.cc ; \
sed -i 's/!define CHECK_MK_VERSION .*/!define CHECK_MK_VERSION
"'$(NEW_VERSION)'"/' agents/windows/installer.nsi ; \
+ sed -ri 's/^(VERSION[[:space:]]*= *).*/\1'"$(NEW_VERSION)/"
agents/windows/Makefile ; \
sed -i 's/^AC_INIT.*/AC_INIT([MK Livestatus],
['"$(NEW_VERSION)"'], [mk(a)mathias-kettner.de])/'
livestatus/configure.ac ; \
sed -i 's/^VERSION=".*/VERSION="$(NEW_VERSION)"/'
mkeventd/bin/mkeventd ; \
sed -i 's/^VERSION=".*/VERSION="$(NEW_VERSION)"/'
doc/treasures/mknotifyd ; \
diff --git a/agents/windows/.gitignore b/agents/windows/.gitignore
index ea9deef..1f6815e 100644
--- a/agents/windows/.gitignore
+++ b/agents/windows/.gitignore
@@ -2,3 +2,5 @@ check_mk.ini
logstate.txt
spool
success.log
+*.res
+*.rc
diff --git a/agents/windows/Makefile b/agents/windows/Makefile
index bc4984f..a45d54c 100755
--- a/agents/windows/Makefile
+++ b/agents/windows/Makefile
@@ -22,9 +22,14 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+SHELL = /bin/bash
+VERSION = 1.2.5i1
+WINDRES = i586-mingw32msvc-windres
+
ifeq ($(shell uname),Linux)
- CXX = echo -e "\n\nWARNING: MinGW under Linux is broken! Use at your own
risk!\n\n" ; i586-mingw32msvc-g++
- CXX_64 = x86_64-w64-mingw32-g++
+ CXX = echo -e "\n\nWARNING: MinGW under Linux is broken! Use at your own
risk!\n\n" ; i586-mingw32msvc-g++
+ CXX_64 = x86_64-w64-mingw32-g++
+ WINDRES_64 = x86_64-w64-mingw32-windres
else
CXX = mingw32-g++
endif
@@ -50,11 +55,22 @@ install_agent-64.exe: check_mk_agent-64.exe crash.exe nowin.exe
makensis installer-64.nsi
chmod +x install_agent-64.exe
-check_mk_agent.exe: check_mk_agent.cc Makefile
- $(CXX) -s -O2 -Wall -Werror -o $@ $< -static -lwsock32
+check_mk_agent.exe: check_mk_agent.cc Makefile check_mk_agent.res
+ $(CXX) -s -O2 -Wall -Werror -o $@ $< -static -lwsock32 check_mk_agent.res
+
+check_mk_agent-64.exe: check_mk_agent.cc Makefile check_mk_agent-64.res
+ $(CXX_64) -s -O2 -Wall -Werror -o $@ $< -static -lwsock32 check_mk_agent-64.res
+
+check_mk_agent.res: check_mk_agent.rc
+ $(WINDRES) $< -O coff -o $@
+
+check_mk_agent-64.res: check_mk_agent.rc
+ $(WINDRES_64) $< -O coff -o $@
-check_mk_agent-64.exe: check_mk_agent.cc Makefile
- $(CXX_64) -s -O2 -Wall -Werror -o $@ $< -static -lwsock32
+check_mk_agent.rc: check_mk_agent.rc.in
+ V=$(VERSION) ; V=$${V//./, } ; V=$${V//i/, 1} ; V=$${V//b/, 2} ; \
+ sed "s/%VERSION%/$(VERSION)/g;s/%YEAR%/$$(date +%Y)/g" check_mk_agent.rc.in
> check_mk_agent.rc ; \
+ sed -i "s/%PVERSION%/$$V/g" check_mk_agent.rc
crash.exe: crash.cc Makefile
$(CXX) -o $@ $<
@@ -63,7 +79,7 @@ nowin.exe: nowin.cc Makefile
$(CXX) -o $@ $<
clean:
- rm -f *.o *~ svn-*.tmp
+ rm -f *.o *~ svn-*.tmp *.rc *.res
mrproper: clean
rm -f *.exe
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index d8cc2e4..85683b7 100755
Binary files a/agents/windows/check_mk_agent-64.exe and
b/agents/windows/check_mk_agent-64.exe differ
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index 9cccad6..f3658e2 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe
differ
diff --git a/agents/windows/installer.ico b/agents/windows/check_mk_agent.ico
similarity index 100%
rename from agents/windows/installer.ico
rename to agents/windows/check_mk_agent.ico
diff --git a/agents/windows/check_mk_agent.rc.in b/agents/windows/check_mk_agent.rc.in
new file mode 100644
index 0000000..574c34b
--- /dev/null
+++ b/agents/windows/check_mk_agent.rc.in
@@ -0,0 +1,29 @@
+1 VERSIONINFO
+FILEVERSION %PVERSION%
+PRODUCTVERSION %PVERSION%
+FILEFLAGSMASK 0
+FILEOS 0x4
+FILETYPE 0x2
+{
+ BLOCK "StringFileInfo"
+ {
+ BLOCK "040904b0"
+ {
+ VALUE "CompanyName", "Mathias Kettner GmbH"
+ VALUE "FileDescription", "Check_MK Agent"
+ VALUE "FileVersion", "%VERSION%"
+ VALUE "InternalName", "check_mk_agent"
+ VALUE "LegalCopyright", "%YEAR% Mathias Kettner GmbH"
+ VALUE "OriginalFilename", "check_mk_agent.exe"
+ VALUE "ProductName", "Check_MK Agent"
+ VALUE "ProductVersion", "%VERSION%"
+ VALUE "Comments", "Check_MK Monitoring Agent"
+ }
+ }
+ BLOCK "VarFileInfo"
+ {
+ VALUE "Translation", 0x0409, 0x04B0
+ }
+}
+
+AppIcon ICON "check_mk_agent.ico"
diff --git a/agents/windows/installer-64.nsi b/agents/windows/installer-64.nsi
index 5a6a851..83b8705 100644
--- a/agents/windows/installer-64.nsi
+++ b/agents/windows/installer-64.nsi
@@ -8,7 +8,7 @@
!define NAME "Check_MK Agent ${CHECK_MK_VERSION}"
XPStyle on
-Icon "installer.ico"
+Icon "check_mk_agent.ico"
; The name of the installer
Name "${NAME}"
diff --git a/agents/windows/installer.nsi b/agents/windows/installer.nsi
index 750d0b1..0be28bb 100644
--- a/agents/windows/installer.nsi
+++ b/agents/windows/installer.nsi
@@ -8,7 +8,7 @@
!define NAME "Check_MK Agent ${CHECK_MK_VERSION}"
XPStyle on
-Icon "installer.ico"
+Icon "check_mk_agent.ico"
; The name of the installer
Name "${NAME}"