Skip to content
Permalink
Browse files

[mxe] Better packaging and fix Qt5 plugins path

  • Loading branch information
elpaso committed Feb 9, 2018
1 parent 2ee0bc8 commit 6dbd0b950ea3722551ff4a22eebbc724681d84da
Showing with 21 additions and 20 deletions.
  1. +21 −20 ms-windows/mxe/build-mxe.sh
  2. 0 ms-windows/mxe/deploy.py
@@ -34,9 +34,9 @@ PYDEPLOY=${DIR}/deploy.py
# Location of mxe install dir
MXE=${HOME}/dev/mxe/

# Where the artifact will be saved

# Directory for build
BUILD_DIR=`pwd`/build-mxe
# Directory where the artifact will be saved
RELEASE_DIR=`pwd`/release-mxe

# End configuration
@@ -45,35 +45,34 @@ RELEASE_DIR=`pwd`/release-mxe


if [[ "$COMMAND" != *"package"* ]]; then
[ -d $BUILD_DIR ] && rm -rf $BUILD_DIR
[ -d $RELEASE_DIR ] && rm -rf $RELEASE_DIR
[ -d ${BUILD_DIR} ] && rm -rf ${BUILD_DIR}
[ -d ${RELEASE_DIR} ] && rm -rf ${RELEASE_DIR}
# Make sure dirs exist

[ -d $BUILD_DIR ] || mkdir $BUILD_DIR
[ -d $RELEASE_DIR ] || mkdir $RELEASE_DIR
[ -d $RELEASE_DIR/qt5 ] || mkdir $RELEASE_DIR/qt5
[ -d ${BUILD_DIR} ] || mkdir ${BUILD_DIR}
[ -d ${RELEASE_DIR} ] || mkdir ${RELEASE_DIR}

fi

pushd .

cd $BUILD_DIR
cd ${BUILD_DIR}

# Build

if [[ "$COMMAND" != *"package"* ]]; then

$MXE/usr/bin/i686-w64-mingw32.shared-cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$RELEASE_DIR \
${MXE}/usr/bin/i686-w64-mingw32.shared-cmake .. \
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
-DCMAKE_INSTALL_PREFIX=${RELEASE_DIR} \
-DENABLE_TESTS=OFF \
-DWITH_QSPATIALITE=ON \
-DWITH_APIDOC=OFF \
-DWITH_QWTPOLAR=ON \
-DWITH_ASTYLE=OFF \
-DWITH_SERVER=OFF \
-DWITH_BINDINGS=FALSE \
-DQT_LRELEASE_EXECUTABLE=$MXE/usr/i686-w64-mingw32.shared/qt5/bin/lrelease \
-DQT_LRELEASE_EXECUTABLE=${MXE}/usr/i686-w64-mingw32.shared/qt5/bin/lrelease \
$ARGS


@@ -83,23 +82,25 @@ fi

# Collect deps

$PYDEPLOY --build=$RELEASE_DIR --objdump=$MXE/usr/bin/i686-w64-mingw32.shared-objdump ${RELEASE_DIR}/qgis.exe
$PYDEPLOY --build=${RELEASE_DIR} --objdump=${MXE}/usr/bin/i686-w64-mingw32.shared-objdump ${RELEASE_DIR}/qgis.exe
for dll in $(ls ${RELEASE_DIR}/*.dll); do \
$PYDEPLOY --build=$RELEASE_DIR --objdump=$MXE/usr/bin/i686-w64-mingw32.shared-objdump $dll; \
$PYDEPLOY --build=${RELEASE_DIR} --objdump=${MXE}/usr/bin/i686-w64-mingw32.shared-objdump $dll; \
done

cp -r $MXE/usr/i686-w64-mingw32.shared/qt5/plugins $RELEASE_DIR/qt5
cp -r ${MXE}/usr/i686-w64-mingw32.shared/qt5/plugins ${RELEASE_DIR}/qt5plugins

cat <<__TXT__ > ${RELEASE_DIR}/qt.conf
[Paths]
Plugins = qt5
Plugins = qt5plugins
__TXT__

# Make the zip

popd

ZIP_NAME=release-`date +%Y-%m-%d-%H-%I-%S`.zip
cd ${RELEASE_DIR}/..
ZIP_NAME=mxe-release-`date +%Y-%m-%d-%H-%I-%S`.zip
zip -r ${ZIP_NAME} $(basename ${RELEASE_DIR})
cp ${ZIP_NAME} ${DIR}

zip -r $ZIP_NAME $RELEASE_DIR
popd

echo "Release in $ZIP_NAME ready."
0 ms-windows/mxe/deploy.py 100644 → 100755
No changes.

0 comments on commit 6dbd0b9

Please sign in to comment.
You can’t perform that action at this time.