Skip to content
Snippets Groups Projects
Select Git revision
  • ffc40191e4fcf468680fe383df9243fd14b8b55c
  • master default protected
  • release/beta-qt-202301101210
  • stable
  • release/beta-qt-202211182015
  • release/beta-qt-202211181752
  • release/beta-qt-202211171508
  • release/beta-qt-202211081754
  • release/beta-qt-202211071518
  • release/beta-qt-202210270957
  • release/beta-qt-202210071648
  • release/beta-qt-202209291549
  • release/beta-qt-202209011129
  • release/beta-qt-202208261640
  • release/beta-qt-202208241511
  • release/beta-qt-202208231849
  • release/beta-qt-202208091525
  • release/beta-qt-202207191241
  • release/beta-qt-202207181708
  • release/beta-qt-202207131914
  • release/beta-qt-202207131513
  • android/release_358
  • android/release_357
  • android/release_356
  • android/release_355
  • android/release_354
  • 20221220.0956.79e1207
  • android/release_353
  • android/release_352
  • android/release_350
  • android/release_349
  • android/release_348
  • android/release_347
  • 20221031.1308.130cc26
  • android/release_346
  • android/release_345
  • android/release_344
  • android/release_343
  • android/release_342
  • android/release_341
  • android/release_340
41 results

win_compile.sh

Blame
    • Anthony Léonard's avatar
      eb9e32a9
      win32: fix build on Fedora >26 · eb9e32a9
      Anthony Léonard authored
      
      Default QMake configuration in mingw packages has changed since
      Fedora 26 and some modifications are required in order to make the
      ring client able to compile on it:
       - Change QMake spec from "win32-g++" to "mingw-w64-g++" which links
         with libqt5main.dll instead of the wrong libqtmain.dll.
      
      With this patch, the client shouldn't be able to compile anymore on
      Fedora <26. The corresponding patch in "client-windows" is also
      required as parts of the fix include modifications of the project
      file.
      
      Change-Id: I7c8c6ac028c1bccc824691e8974a93569fb6bb9c
      Reviewed-by: default avatarOlivier Soldano <olivier.soldano@savoirfairelinux.com>
      eb9e32a9
      History
      win32: fix build on Fedora >26
      Anthony Léonard authored
      
      Default QMake configuration in mingw packages has changed since
      Fedora 26 and some modifications are required in order to make the
      ring client able to compile on it:
       - Change QMake spec from "win32-g++" to "mingw-w64-g++" which links
         with libqt5main.dll instead of the wrong libqtmain.dll.
      
      With this patch, the client shouldn't be able to compile anymore on
      Fedora <26. The corresponding patch in "client-windows" is also
      required as parts of the fix include modifications of the project
      file.
      
      Change-Id: I7c8c6ac028c1bccc824691e8974a93569fb6bb9c
      Reviewed-by: default avatarOlivier Soldano <olivier.soldano@savoirfairelinux.com>
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    win_compile.sh 1.84 KiB
    #!/bin/bash
    
    rootdir=$(pwd)
    HOST=i686-w64-mingw32
    ARCH=32
    CMAKE_TOOLCHAIN_FILE=$rootdir/lrc/cmake/winBuild.cmake
    echo "running compilation on ${CORES:=`nproc --all`} threads"
    
    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 daemon/contrib
    mkdir -p native${ARCH}
    cd native${ARCH}
    ../bootstrap --host=${HOST}
    make fetch || exit 1
    make -j$CORES || exit 1
    cd ../..
    ./autogen.sh || exit 1
    mkdir -p "build${ARCH}"
    cd build${ARCH}
    $rootdir/daemon/configure --host=${HOST} --without-dbus --prefix=$INSTALL_PREFIX
    rsync -a $rootdir/daemon/src/buildinfo.cpp ./src/buildinfo.cpp
    make -j$CORES install || exit 1
    cd $rootdir
    
    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=$INSTALL_PREFIX -DENABLE_LIBWRAP=true ..
    make -j$CORES 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 -j$CORES || 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 -j$CORES || exit 1
    make install
    cd ../..
    fi
    mkdir -p build${ARCH}
    cd build${ARCH}
    ${HOST}-qmake-qt5 ../RingWinClient.pro -r -spec mingw-w64-g++ RING=$INSTALL_PREFIX
    make -j$CORES || exit 1
    make install