[checkmk-commits] mk_jolokia.exe: Initial version of the mk_jolokia plugin for Windows

Konstantin Büttner kb at mathias-kettner.de
Thu Jun 29 16:21:18 CEST 2017


Module: check_mk
Branch: master
Commit: 29c6fcc0286d7818cd5af52cb2574ebc80dc70d4
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=29c6fcc0286d7818cd5af52cb2574ebc80dc70d4

Author: Konstantin Büttner <kb at mathias-kettner.de>
Date:   Thu Jun 29 16:12:51 2017 +0200

mk_jolokia.exe: Initial version of the mk_jolokia plugin for Windows

Change-Id: I59a69bafdb642acaed0dfbb05a151aa4c6ff4e03

---

 agents/windows/frozen_binaries/Makefile |  34 ++++++++++++++++++++++++++++++++
 agents/windows/plugins/mk_jolokia.exe   | Bin 0 -> 10088419 bytes
 2 files changed, 34 insertions(+)

diff --git a/agents/windows/frozen_binaries/Makefile b/agents/windows/frozen_binaries/Makefile
index 1cbbc32..17b9362 100644
--- a/agents/windows/frozen_binaries/Makefile
+++ b/agents/windows/frozen_binaries/Makefile
@@ -37,5 +37,39 @@ mk_logwatch.exe: src/python-$(PYTHON_VERSION).msi $(PYTHON_PACKAGES) src/vcredis
 	cp $(BUILD_DIR)/drive_c/compile/dist/mk_logwatch.exe ../plugins
 	rm -rf $(BUILD_DIR)
 
+mk_jolokia.exe: src/python-$(PYTHON_VERSION).msi $(PYTHON_PACKAGES) src/vcredist_x86.exe $(PLUGINS_DIR)/mk_jolokia
+	mkdir $(BUILD_DIR) ; \
+		cd $(BUILD_DIR) ; \
+		cp -pr $(CURDIR)/src/* . ; \
+	cd $(BUILD_DIR) ; cabextract vcredist_x86.exe
+	cd $(BUILD_DIR) ; cabextract vc_red.cab
+	cd $(BUILD_DIR) ; export WINEPREFIX=$(BUILD_DIR) ; \
+		wine vcredist_x86.exe /qb ; \
+		wine msiexec /qn /i python-$(PYTHON_VERSION).msi ; \
+		mv msvcr90.dll*VC90_CRT_x86* drive_c/Python27/msvcr90.dll ; \
+		mv msvcp90.dll*VC90_CRT_x86* drive_c/Python27/msvcp90.dll ; \
+		mv msvcm90.dll*VC90_CRT_x86* drive_c/Python27/msvcm90.dll ; \
+		mv manifest*VC90_CRT_x86* drive_c/Python27/Microsoft.VC90.CRT.manifest ; \
+		cp -r pip drive_c ; \
+		cd drive_c/pip ; \
+		wine c:\\Python27\\python.exe -m pip install --no-index --find-links="c:\\pip" * ; \
+		mkdir $(BUILD_DIR)/drive_c/compile ; \
+		cp $(PLUGINS_DIR)/mk_jolokia $(BUILD_DIR)/drive_c/compile/mk_jolokia.py ; \
+		cd $(BUILD_DIR)/drive_c/compile ; \
+		wine c:\\Python27\\Scripts\\pyinstaller.exe \
+			--clean \
+			--onefile \
+			--upx-dir="C:\\upx" \
+			--log-level=INFO \
+			--hidden-import=cffi \
+			mk_jolokia.py ; \
+		if [ ! -e dist/mk_jolokia.exe ] ; \
+		then \
+			echo "ERROR: Failed to create venv_wine/drive_c/compile/dist/mk_jolokia.exe" ; \
+			exit 1 ; \
+		fi ;
+	cp $(BUILD_DIR)/drive_c/compile/dist/mk_jolokia.exe ../plugins
+	rm -rf $(BUILD_DIR)
+
 clean:
 	[ ! -d $(BUILD_DIR) ] || rm -rf $(BUILD_DIR)
diff --git a/agents/windows/plugins/mk_jolokia.exe b/agents/windows/plugins/mk_jolokia.exe
new file mode 100755
index 0000000..553422b
Binary files /dev/null and b/agents/windows/plugins/mk_jolokia.exe differ



More information about the checkmk-commits mailing list