Skip to content
Snippets Groups Projects
Commit 0a06ca6f authored by Olivier SOLDANO's avatar Olivier SOLDANO Committed by Anthony Léonard
Browse files

modify windows compilation script


the script used to cross compile windows legacy clients had two
issues:
    - some dirs were not parametric,
    - it was used for compilation checking on our CI infra.

this patch makes the dirs parametric, and provides another script
that builds the client with bare minimum for checking; e.g. not
building the daemon and contrib to save time.

Change-Id: Idd0d9ebbfcd15b0caf72e09d4ddb3841de9c3d42
Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
parent 14ba902a
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ HOST=x86_64-w64-mingw32
CMAKE_TOOLCHAIN_FILE=$rootdir/lrc/cmake/winBuild64.cmake
fi
INSTALL_PREFIX=$rootdir/daemon/_win${ARCH}
INSTALL_PREFIX=$rootdir/install_win${ARCH}
cd daemon/contrib
......@@ -51,7 +51,7 @@ cd $rootdir
cd client-windows
git submodule update --init
if [ ! -f "../daemon/_win${ARCH}/bin/WinSparkle.dll" ]
if [ ! -f "$INSTALL_PREFIX/bin/WinSparkle.dll" ]
then
cd winsparkle
git submodule init && git submodule update
......@@ -61,7 +61,7 @@ make -j4 || exit 1
make install
cd ../../
fi
if [ ! -f "../daemon/_win${ARCH}/bin/libqrencode.dll" ]
if [ ! -f "$INSTALL_PREFIX/bin/libqrencode.dll" ]
then
cd libqrencode
./autogen.sh || exit 1
......
#!/bin/bash
rootdir=$(pwd)
HOST=i686-w64-mingw32
ARCH=32
CMAKE_TOOLCHAIN_FILE=$rootdir/lrc/cmake/winBuild.cmake
while test -n "$1"
do
case "$1" in
--clean)
;;
--arch=*)
ARCH="${1#--arch=}"
;;
esac
shift
done
if [ "$ARCH" = "64" ]
then
HOST=x86_64-w64-mingw32
CMAKE_TOOLCHAIN_FILE=$rootdir/lrc/cmake/winBuild64.cmake
fi
INSTALL_PREFIX=$rootdir/install_win${ARCH}
cd lrc
mkdir -p build${ARCH}
cd build${ARCH}
export CMAKE_PREFIX_PATH=/usr/${HOST}/sys-root/mingw/lib/cmake
cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DRING_BUILD_DIR=$rootdir/daemon/src -DENABLE_LIBWRAP=true ..
make -j4 install || exit 1
cd $rootdir
cd client-windows
git submodule update --init
if [ ! -f "$INSTALL_PREFIX/bin/WinSparkle.dll" ]
then
cd winsparkle
git submodule init && git submodule update
mkdir -p build${ARCH} && cd build${ARCH}
cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX ../cmake
make -j4 || exit 1
make install
cd ../../
fi
if [ ! -f "$INSTALL_PREFIX/bin/libqrencode.dll" ]
then
cd libqrencode
./autogen.sh || exit 1
mkdir -p build${ARCH} && cd build${ARCH}
../configure --host=${HOST} --prefix=$INSTALL_PREFIX
make -j4 || exit 1
make install
cd ../..
fi
mkdir -p build${ARCH}
cd build${ARCH}
${HOST}-qmake-qt5 ../RingWinClient.pro -r -spec win32-g++ RING=$INSTALL_PREFIX INCLUDEPATH=$rootdir/client-windows/winsparkle
make -j4 || exit 1
make install
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment