diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-11-14 01:07:17 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-11-13 20:43:35 -0800 |
commit | 7552690afa9c396cb833070e1b5b53c53c15d9f2 (patch) | |
tree | fa4b2347aece0885c6b2af171f929c6216d7ef67 /packaging/windows | |
parent | fd2e24d145500a70c6612a612b3397ee1898900b (diff) | |
download | subsurface-7552690afa9c396cb833070e1b5b53c53c15d9f2.tar.gz |
MXE: experiment with creating a RelWithDebInfo build
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'packaging/windows')
-rwxr-xr-x | packaging/windows/mxe-based-build.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/packaging/windows/mxe-based-build.sh b/packaging/windows/mxe-based-build.sh index 8f49582e8..ae51109ce 100755 --- a/packaging/windows/mxe-based-build.sh +++ b/packaging/windows/mxe-based-build.sh @@ -108,6 +108,7 @@ export CXXFLAGS=-std=c++11 if [[ "$1" == "debug" ]] ; then RELEASE="Debug" + RELEASE_MAIN="Debug" DLL_SUFFIX="d" shift if [[ -f Release ]] ; then @@ -116,6 +117,7 @@ if [[ "$1" == "debug" ]] ; then touch Debug else RELEASE="Release" + RELEASE_MAIN="RelWithDebInfo" DLL_SUFFIX="" if [[ -f Debug ]] ; then rm -rf * @@ -270,7 +272,7 @@ cd "$BUILDDIR"/subsurface i686-w64-mingw32.shared-cmake \ -DCMAKE_PREFIX_PATH="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5 \ - -DCMAKE_BUILD_TYPE=$RELEASE \ + -DCMAKE_BUILD_TYPE=$RELEASE_MAIN \ -DQT_TRANSLATION_DIR="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5/translations \ -DMAKENSIS=i686-w64-mingw32.shared-makensis \ -DLIBDIVECOMPUTER_INCLUDE_DIR="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/include \ @@ -279,3 +281,10 @@ i686-w64-mingw32.shared-cmake \ "$BASEDIR"/subsurface make $JOBS "$@" + +OBJCOPY="i686-w64-mingw32.shared-objcopy" +if [[ "$RELEASE_MAIN" == "RelWithDebInfo" ]] ; then + $OBJCOPY --only-keep-debug subsurface.exe subsurface.exe.debug + $OBJCOPY --strip-debug --strip-unneeded subsurface.exe + $OBJCOPY --add-gnu-debuglink=subsurface.exe.debug subsurface.exe +fi |