aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/scripts/windows-container-prep.sh1
-rwxr-xr-xpackaging/windows/mxe-based-build.sh22
-rwxr-xr-xscripts/get-dep-lib.sh4
3 files changed, 27 insertions, 0 deletions
diff --git a/.github/workflows/scripts/windows-container-prep.sh b/.github/workflows/scripts/windows-container-prep.sh
index a71ee381f..a639604aa 100644
--- a/.github/workflows/scripts/windows-container-prep.sh
+++ b/.github/workflows/scripts/windows-container-prep.sh
@@ -5,3 +5,4 @@
echo "downloading sources for fresh build"
bash subsurface/scripts/get-dep-lib.sh single . libzip
bash subsurface/scripts/get-dep-lib.sh single . googlemaps
+bash subsurface/scripts/get-dep-lib.sh single . libmtp
diff --git a/packaging/windows/mxe-based-build.sh b/packaging/windows/mxe-based-build.sh
index ecae2e7e8..fc4c73db3 100755
--- a/packaging/windows/mxe-based-build.sh
+++ b/packaging/windows/mxe-based-build.sh
@@ -153,6 +153,28 @@ if [ ! -f libdivecomputer/configure ] ; then
autoreconf --install
fi
+# build libmtp as that isn't available via MXE
+cd "$BUILDDIR"
+if [[ ! -d libmtp || -f build.libmtp ]] ; then
+ rm -f build.libmtp
+ cd "$BASEDIR/libmtp"
+ export NOCONFIGURE=1
+ # crudely disable the interactive part of autogen.sh
+ sed --in-place=.bak 's/read IN/IN="N"/;s/echo "Auto/#echo "Auto/' autogen.sh
+ bash autogen.sh
+ mv autogen.sh.bak autogen.sh
+ cd "$BUILDDIR"
+ mkdir -p libmtp
+ cd libmtp
+ "$BASEDIR"/libmtp/configure \
+ CC="$MXEBUILDTYPE"-gcc \
+ --host="$MXEBUILDTYPE" \
+ --enable-shared \
+ --prefix="$BASEDIR"/"$MXEDIR"/usr/"$MXEBUILDTYPE"
+ make $JOBS
+ make install
+fi
+
cd "$BUILDDIR"
CURRENT_SHA=$(cd "$BASEDIR"/subsurface/libdivecomputer ; git describe)
PREVIOUS_SHA=$(cat "libdivecomputer.SHA" 2>/dev/null || echo)
diff --git a/scripts/get-dep-lib.sh b/scripts/get-dep-lib.sh
index b0cf2089a..ddeeb38f0 100755
--- a/scripts/get-dep-lib.sh
+++ b/scripts/get-dep-lib.sh
@@ -17,6 +17,7 @@ CURRENT_KIRIGAMI="v5.62.0"
CURRENT_BREEZE_ICONS="4daac191fb33c8c03bba8356db9767816cb8ee02"
CURRENT_MDBTOOLS="master"
CURRENT_QT_ANDROID_CMAKE="master"
+CURRENT_LIBMTP="master"
# Checkout library from git
# Ensure specified version is checked out,
@@ -155,6 +156,9 @@ for package in "${PACKAGES[@]}" ; do
libusb)
git_checkout_library libusb $CURRENT_LIBUSB https://github.com/libusb/libusb.git
;;
+ libmtp)
+ git_checkout_library libmtp $CURRENT_LIBMTP https://github.com/libmtp/libmtp.git
+ ;;
libxml2)
git_checkout_library libxml2 $CURRENT_LIBXML2 https://github.com/GNOME/libxml2.git
;;