This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit 4e590d3c331b674e06c5d0a59dc2e472b47f3db4
Author: Ulrich Sibiller <ul...@gmx.de>
Date:   Thu Dec 1 01:13:23 2022 +0100

    /: add handle_mxe.sh, MXE control script.
---
 debian/changelog |  1 +
 handle_mxe.sh    | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 37ed3c9..e6f0e92 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -205,6 +205,7 @@ x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium
              sharewidget}.cpp,x2goclientconfig.h}: drop Maemo support.
      - /: drop Maemo support, remove x2goclient.pro.maemo.
      - /: add README.mxe, describing MXE builds.
+     - /: add handle_mxe.sh, MXE control script.
 
  -- X2Go Release Manager <git-ad...@x2go.org>  Thu, 13 Feb 2020 12:31:20 +0100
 
diff --git a/handle_mxe.sh b/handle_mxe.sh
new file mode 100755
index 0000000..b0ed1f5
--- /dev/null
+++ b/handle_mxe.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+#
+# prepare or build x2goclient and x2gohelper for Windows using MXE
+# cross build enviroment for Linux (https://mxe.cc/).
+#
+# Usage: $0 [prepare] [<config>]
+#
+# prepare means only prepare the build dirs (create them, clean
+# them). If ommitted, it will build the binaries instead.  <config>
+# can be "debug" or "release". Default is "release"
+#
+#
+# Adjust these values to match your mxe installation:
+MXE_BASE=/usr/lib/mxe/usr
+#MXE_TARGET=i686-w64-mingw32.shared
+MXE_TARGET=i686-w64-mingw32.static
+#MXE_TARGET=x86-64-w64-mingw32.shared
+#MXE_TARGET=x86-64-w64-mingw32.static
+MXE_PATH=${MXE_BASE}/${MXE_TARGET}
+
+test -d "${MXE_PATH}" || { echo >&2 "Cannot find mxe installation at 
'$MXE_PATH'"; exit 1; } 
+
+BUILD_DIR="client_build_mxe"
+BUILD_CONFIG=release
+
+MODE=build
+[ "$1" == "prepare" ] && MODE=prepare && shift
+
+if [ "$1" == "debug" ]; then
+    BUILD_CONFIG=debug
+    shift
+fi
+
+export MXE_BASE MXE_TARGET MXE_PATH BUILD_DIR BUILD_CONFIG
+
+export X2GO_CLIENT_TARGET=
+
+[ "$MODE" == "build" ] && [ ! -d ${BUILD_DIR} ] && { echo >&2 "Please run '$0 
prepare' first"; exit 1; }
+
+if [ "$MODE" == "prepare" ]; then
+    test -e "${BUILD_DIR}" && rm -rf "${BUILD_DIR}"
+    make clean
+
+    mkdir -p "${BUILD_DIR}/${BUILD_CONFIG}"
+    pushd "${BUILD_DIR}"
+
+    ${MXE_PATH}/qt5/bin/lrelease ../x2goclient.pro
+
+    # no special Makefile required as qmake will create that
+    ${MXE_PATH}/qt5/bin/qmake ../x2goclient.pro -config "${BUILD_CONFIG}"
+
+    popd
+else
+    pushd "${BUILD_DIR}"
+    make
+    popd
+fi
+
+pushd x2gohelper
+# here we do not have qmake but an own Makefile for mxe
+if [ "$MODE" == "prepare" ]; then
+    make -f Makefile.mxe clean
+else
+    make -f Makefile.mxe
+fi
+popd

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on 
/srv/git/code.x2go.org/x2goclient.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to