Changeset 339f128c in subsurface


Ignore:
Timestamp:
Jul 2, 2017, 6:56:18 PM (2 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
1e89509
Parents:
7199ad3
git-author:
Dirk Hohndel <dirk@…> (07/02/17 18:55:16)
git-committer:
Dirk Hohndel <dirk@…> (07/02/17 18:56:18)
Message:

MXE cross build: allow to specify mxe directory

This should make it easier to test different mxe versions.

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packaging/windows/mxe-based-build.sh

    rb5f203c r339f128c  
    9696BASEDIR=$(cd "$EXECDIR/.."; pwd)
    9797BUILDDIR=$(cd "$EXECDIR"; pwd)
     98MXEDIR=${MXEDIR:-mxe}
    9899
    99100echo $BUILDDIR
    100101
    101 if [[ ! -d "$BASEDIR"/mxe ]] ; then
     102if [[ ! -d "$BASEDIR"/"$MXEDIR" ]] ; then
    102103        echo "Please start this from the right directory "
    103104        echo "usually a winbuild directory parallel to the mxe directory"
     
    107108echo "Building in $BUILDDIR ..."
    108109
    109 export PATH="$BASEDIR"/mxe/usr/bin:$PATH:"$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/qt5/bin/
     110export PATH="$BASEDIR"/"$MXEDIR"/usr/bin:$PATH:"$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5/bin/
    110111export CXXFLAGS=-std=c++11
    111112
     
    134135        mkdir -p grantlee
    135136        cd grantlee
    136         cmake -DCMAKE_TOOLCHAIN_FILE="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake \
     137        cmake -DCMAKE_TOOLCHAIN_FILE="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake \
    137138                -DCMAKE_BUILD_TYPE=$RELEASE \
    138139                -DBUILD_TESTS=OFF \
     
    152153        cd libssh2
    153154
    154         cmake -DCMAKE_TOOLCHAIN_FILE="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake \
     155        cmake -DCMAKE_TOOLCHAIN_FILE="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake \
    155156                -DCMAKE_BUILD_TYPE=$RELEASE \
    156157                -DBUILD_EXAMPLES=OFF \
     
    161162        make install
    162163        # don't install your dlls in bin, please
    163         cp "$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/bin/libssh2.dll "$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/lib
     164        cp "$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/bin/libssh2.dll "$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/lib
    164165fi
    165166
     
    173174        cd libcurl
    174175        ../../libcurl/configure --host=i686-w64-mingw32.shared \
    175                 --prefix="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/ \
     176                --prefix="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/ \
    176177                --disable-ftp \
    177178                --disable-ldap \
     
    188189                --disable-gopher \
    189190                --disable-manual \
    190                 --with-libssh2="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/
     191                --with-libssh2="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/
    191192
    192193        # now remove building the executable
     
    205206        mkdir -p libgit2
    206207        cd libgit2
    207         cmake -DCMAKE_TOOLCHAIN_FILE="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake \
     208        cmake -DCMAKE_TOOLCHAIN_FILE="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake \
    208209                -DBUILD_CLAR=OFF -DTHREADSAFE=ON \
    209210                -DCMAKE_BUILD_TYPE=$RELEASE \
    210                 -DDLLTOOL="$BASEDIR"/mxe/usr/bin/i686-w64-mingw32.shared-dlltool \
     211                -DDLLTOOL="$BASEDIR"/"$MXEDIR"/usr/bin/i686-w64-mingw32.shared-dlltool \
    211212                "$BASEDIR"/libgit2
    212213        make $JOBS
     
    232233        "$BASEDIR"/libdivecomputer/configure --host=i686-w64-mingw32.shared \
    233234                --enable-shared \
    234                 --prefix="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared
     235                --prefix="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared
    235236        make $JOBS
    236237        make install
     
    252253        mkdir -p marble
    253254        cd marble
    254         cmake -DCMAKE_TOOLCHAIN_FILE="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake \
    255                 -DCMAKE_PREFIX_PATH="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/qt5 \
     255        cmake -DCMAKE_TOOLCHAIN_FILE="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake \
     256                -DCMAKE_PREFIX_PATH="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5 \
    256257                -DQTONLY=ON -DQT5BUILD=ON \
    257258                -DBUILD_MARBLE_APPS=OFF -DBUILD_MARBLE_EXAMPLES=OFF \
     
    264265        make install
    265266        # what the heck is marble doing?
    266         mv "$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/libssrfmarblewidget"$DLL_SUFFIX".dll "$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/lib
    267         mv "$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/libastro"$DLL_SUFFIX".dll "$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/lib
     267        mv "$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/libssrfmarblewidget"$DLL_SUFFIX".dll "$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/lib
     268        mv "$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/libastro"$DLL_SUFFIX".dll "$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/lib
    268269fi
    269270
     
    279280
    280281# first copy the Qt plugins in place
    281 QT_PLUGIN_DIRECTORIES="$BASEDIR/mxe/usr/i686-w64-mingw32.shared/qt5/plugins/iconengines \
    282 $BASEDIR/mxe/usr/i686-w64-mingw32.shared/qt5/plugins/imageformats \
    283 $BASEDIR/mxe/usr/i686-w64-mingw32.shared/qt5/plugins/platforms \
    284 $BASEDIR/mxe/usr/i686-w64-mingw32.shared/qt5/plugins/printsupport"
     282QT_PLUGIN_DIRECTORIES="$BASEDIR/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5/plugins/iconengines \
     283$BASEDIR/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5/plugins/imageformats \
     284$BASEDIR/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5/plugins/platforms \
     285$BASEDIR/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5/plugins/printsupport"
    285286
    286287# for some reason we aren't installing libssrfmarblewidget.dll and # Qt5Xml.dll
    287288# I need to figure out why and fix that, but for now just manually copy that as well
    288 EXTRA_MANUAL_DEPENDENCIES="$BASEDIR/mxe/usr/i686-w64-mingw32.shared/lib/libssrfmarblewidget$DLL_SUFFIX.dll \
    289 $BASEDIR/mxe/usr/i686-w64-mingw32.shared/qt5/bin/Qt5Xml$DLL_SUFFIX.dll"
     289EXTRA_MANUAL_DEPENDENCIES="$BASEDIR/"$MXEDIR"/usr/i686-w64-mingw32.shared/lib/libssrfmarblewidget$DLL_SUFFIX.dll \
     290$BASEDIR/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5/bin/Qt5Xml$DLL_SUFFIX.dll"
    290291
    291292
     
    322323cd "$BUILDDIR"/subsurface
    323324
    324 cmake -DCMAKE_TOOLCHAIN_FILE="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake \
    325         -DCMAKE_PREFIX_PATH="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/qt5 \
     325cmake -DCMAKE_TOOLCHAIN_FILE="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake \
     326        -DCMAKE_PREFIX_PATH="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5 \
    326327        -DCMAKE_BUILD_TYPE=$RELEASE \
    327         -DQT_TRANSLATION_DIR="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/qt5/translations \
     328        -DQT_TRANSLATION_DIR="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/qt5/translations \
    328329        -DMAKENSIS=i686-w64-mingw32.shared-makensis \
    329         -DLIBDIVECOMPUTER_INCLUDE_DIR="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/include \
    330         -DLIBDIVECOMPUTER_LIBRARIES="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/lib/libdivecomputer.dll.a \
    331         -DMARBLE_INCLUDE_DIR="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/include \
    332         -DMARBLE_LIBRARIES="$BASEDIR"/mxe/usr/i686-w64-mingw32.shared/lib/libssrfmarblewidget"$DLL_SUFFIX".dll \
     330        -DLIBDIVECOMPUTER_INCLUDE_DIR="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/include \
     331        -DLIBDIVECOMPUTER_LIBRARIES="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/lib/libdivecomputer.dll.a \
     332        -DMARBLE_INCLUDE_DIR="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/include \
     333        -DMARBLE_LIBRARIES="$BASEDIR"/"$MXEDIR"/usr/i686-w64-mingw32.shared/lib/libssrfmarblewidget"$DLL_SUFFIX".dll \
    333334        -DMAKE_TESTS=OFF \
    334335        "$BASEDIR"/subsurface
Note: See TracChangeset for help on using the changeset viewer.