mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
1291d100f6
Checking this in to make sure I don't end up creating broken installers again. I doubt that this is useful for anyone but me - but then, I don't think anyone but me creates Windows installers. Background - when Fedora 20 updated the cross-built version of Qt for Win64 something broke. Subsurfae installed with those DLLs will crash. Replacing the older 5.3.1 DLLs fixes this for now, so I have a directory with just those DLLs and simply replace them in the staging directory before calling makensis. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
77 lines
2.5 KiB
Bash
Executable file
77 lines
2.5 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# just a small shell script that is used to invoke make with the right
|
|
# parameters to cross compile a binary for Windows
|
|
#
|
|
# the paths work for the default mingw32 install on Fedora - adjust as
|
|
# necessary
|
|
# this assumes that local cross builds for libdivecomputer and libgit2
|
|
# are in ../libdivecomputer and ../libgit2
|
|
|
|
# force recreation of the nsi file and Subsurface version header file
|
|
# in order to get the correct version number
|
|
BASEDIR=$(dirname $0)
|
|
rm $BASEDIR/subsurface.nsi > /dev/null 2>&1
|
|
rm $BASEDIR/../../ssrf-version.h > /dev/null 2>&1
|
|
|
|
if [[ $1 == "Qt5-64" ]] ; then
|
|
export PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin:$PATH
|
|
else
|
|
export PATH=/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH
|
|
fi
|
|
export objdump=mingw-objdump
|
|
|
|
if [[ $1 == "Qt5-64" ]] ; then
|
|
shift
|
|
mingw64-qmake-qt5 \
|
|
CROSS_PATH=/usr/x86_64-w64-mingw32/sys-root/mingw \
|
|
QMAKE_LRELEASE=/usr/x86_64-w64-mingw32/bin/qt5/lrelease \
|
|
QMAKE_MOC=/usr/x86_64-w64-mingw32/bin/qt5/moc \
|
|
QMAKE_UIC=/usr/x86_64-w64-mingw32/bin/qt5/uic \
|
|
QMAKE_RCC=/usr/x86_64-w64-mingw32/bin/qt5/rcc \
|
|
LIBMARBLEDEVEL=../marble \
|
|
LIBGIT2DEVEL=../libgit2 CONFIG+=libgit21-api \
|
|
QMAKE_LIBDIR+=../openssl \
|
|
CONFIG+=win64target \
|
|
CONFIG+=brokenQt532win \
|
|
$BASEDIR/../../subsurface.pro
|
|
|
|
elif [[ $1 == "Qt5" ]] ; then
|
|
shift
|
|
mingw32-qmake-qt5 \
|
|
CROSS_PATH=/usr/i686-w64-mingw32/sys-root/mingw \
|
|
QMAKE_LRELEASE=/usr/i686-w64-mingw32/bin/qt5/lrelease \
|
|
QMAKE_MOC=/usr/i686-w64-mingw32/bin/qt5/moc \
|
|
QMAKE_UIC=/usr/i686-w64-mingw32/bin/qt5/uic \
|
|
QMAKE_RCC=/usr/i686-w64-mingw32/bin/qt5/rcc \
|
|
LIBDCDEVEL=../libdivecomputer \
|
|
LIBMARBLEDEVEL=../marble \
|
|
LIBGIT2DEVEL=../libgit2 CONFIG+=libgit21-api \
|
|
$BASEDIR/../../subsurface.pro
|
|
|
|
elif [[ $1 == "Qt5debug" ]] ; then
|
|
shift
|
|
mingw32-qmake-qt5 \
|
|
CROSS_PATH=/usr/i686-w64-mingw32/sys-root/mingw \
|
|
QMAKE_LRELEASE=/usr/i686-w64-mingw32/bin/qt5/lrelease \
|
|
QMAKE_MOC=/usr/i686-w64-mingw32/bin/qt5/moc \
|
|
QMAKE_UIC=/usr/i686-w64-mingw32/bin/qt5/uic \
|
|
QMAKE_RCC=/usr/i686-w64-mingw32/bin/qt5/rcc \
|
|
QMAKE_CFLAGS_RELEASE='$$QMAKE_CFLAGS_DEBUG -O0 -g' \
|
|
QMAKE_CXXFLAGS_RELEASE='$$QMAKE_CXXFLAGS_DEBUG -O0 -g' \
|
|
LIBDCDEVEL=../libdivecomputer \
|
|
LIBMARBLEDEVEL=../marble \
|
|
LIBGIT2DEVEL=../libgit2 CONFIG+=libgit21-api \
|
|
V=1 \
|
|
$BASEDIR/../../subsurface.pro
|
|
|
|
else
|
|
|
|
mingw32-qmake-qt4 \
|
|
CROSS_PATH=/usr/i686-w64-mingw32/sys-root/mingw \
|
|
LIBMARBLEDEVEL=../marble \
|
|
LIBGIT2DEVEL=../libgit2 CONFIG+=libgit21-api \
|
|
$BASEDIR/../../subsurface.pro
|
|
fi
|
|
|
|
mingw32-make $@
|