Module: check_mk
Branch: master
Commit: c8630508abda11afc9442f4077acbcd89966bc8b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c8630508abda11…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Fri Feb 16 15:28:38 2018 +0100
Windows agent: extract simpleini in chroot
The simpleini library is necessary for building Windows agent. It is
used for parsing ini files.
---
agents/windows/chroot_version | 2 +-
agents/windows/extract-simpleini | 27 +++++++++++++++++++++++++++
agents/windows/make-chroot | 3 +++
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/agents/windows/chroot_version b/agents/windows/chroot_version
index ec63514..f599e28 100644
--- a/agents/windows/chroot_version
+++ b/agents/windows/chroot_version
@@ -1 +1 @@
-9
+10
diff --git a/agents/windows/extract-simpleini b/agents/windows/extract-simpleini
new file mode 100755
index 0000000..ee11a90
--- /dev/null
+++ b/agents/windows/extract-simpleini
@@ -0,0 +1,27 @@
+#!/bin/bash
+# The script extracts the simpleini library necessary for building the Windows
+# agent.
+
+set -e
+sha1=2af65fc
+[[ -z $CHROOT_BUILD_DIR ]] && exit 1
+
+# Load the variables $archs and $common from build.sh:
+. $CHROOT_BUILD_DIR/agents/windows/build.sh
+
+cd $CHROOT_BUILD_DIR/agents/windows
+mkdir simpleini
+cd simpleini
+tar xzf /$CHROOT_BUILD_DIR/omd/packages/simpleini/simpleini-${sha1}.tar.gz
+cd ..
+
+# 1) Copy the library contents to the shared mingw-w64 path.
+# Actually, only the header is needed but the other stuff won't harm.
+cp -r simpleini /usr/share/mingw-w64/include/
+
+# 2) Link the shared simpleini path to 32 & 64 bit mingw-g++ default include paths:
+for arch in 32 64 ; do
+ ln -sf ../../share/mingw-w64/include/simpleini
/usr/${archs[$arch]}${common}/include/simpleini
+done
+
+rm -rf simpleini
diff --git a/agents/windows/make-chroot b/agents/windows/make-chroot
index e7a5d15..1ee2e51 100755
--- a/agents/windows/make-chroot
+++ b/agents/windows/make-chroot
@@ -175,6 +175,9 @@ $SCRIPT_DIR/do-chroot 'dpkg --add-architecture i386 &&
apt-get update && apt-get
# Build Google Test and Google Mock
$SCRIPT_DIR/do-chroot "$CHROOT_BUILD_DIR/agents/windows/test/build-googletest"
+# Extract necessary boost headers
+$SCRIPT_DIR/do-chroot "$CHROOT_BUILD_DIR/agents/windows/extract-simpleini"
+
cp "$BASE/agents/windows/$VERSIONFILE" "$CHROOT_PATH/"
echo "+ CLEANING UP"