From 6a287e9420c6ea6a01508d27f06a3732ed6d1cca Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Thu, 7 Dec 2023 15:15:31 +0100 Subject: [PATCH] Windows: build xz in "Release" mode and bundle it in the installer (#673) Also bump to Qt 6.6.0. --- .github/workflows/pr-check.yml | 9 +++++---- .github/workflows/release.yml | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 92d4cc32..ca4cfa6c 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -3,7 +3,7 @@ name: pr-check on: [pull_request] env: - QT_VERSION: '6.5.3' + QT_VERSION: '6.6.0' jobs: Linux: @@ -142,13 +142,13 @@ jobs: eval "$(./dist/win/make-vs2019-env.bat)" git clone https://git.tukaani.org/xz.git cd xz - git checkout v5.2 + git checkout v5.4.5 sed -i 's/#include "config.h"//' src/common/common_w32res.rc sed -i 's/PACKAGE_NAME/"liblzma"/' src/common/common_w32res.rc sed -i 's/PACKAGE_URL/"https:\/\/tukaani.org\/xz\/"/' src/common/common_w32res.rc mkdir build cd build - cmake .. -GNinja -DCMAKE_INSTALL_PREFIX="$Qt6_DIR" -DBUILD_SHARED_LIBS=ON .. + cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$Qt6_DIR" -DBUILD_SHARED_LIBS=ON .. cmake --build . cmake --install . @@ -169,7 +169,8 @@ jobs: cd build/app/release mv ../../src/app/helper.exe . mv ../../src/app/mediawriter.exe . - $Qt6_DIR/bin/windeployqt.exe mediawriter.exe --verbose 2 --qmldir ../../.. --compiler-runtime --release + cp $Qt6_DIR/bin/liblzma.dll . + $Qt6_DIR/bin/windeployqt.exe mediawriter.exe helper.exe liblzma.dll --verbose 2 --qmldir ../../.. --compiler-runtime --release find . -type d -not -path '*/\.*' | sed 's/^\.\///g' | sed 's@\/@\\@g' | grep -v "^.$" > uninstall.log find . -type f -not -path '*/\.*' | sed 's/^\.\///g' | sed 's@\/@\\@g' | sort >> uninstall.log diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a41d5d5..8f5c88fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: types: [ created ] env: - QT_VERSION: '6.5.3' + QT_VERSION: '6.6.0' jobs: macOS: @@ -112,13 +112,13 @@ jobs: eval "$(./dist/win/make-vs2019-env.bat)" git clone https://git.tukaani.org/xz.git cd xz - git checkout v5.2 + git checkout v5.4.5 sed -i 's/#include "config.h"//' src/common/common_w32res.rc sed -i 's/PACKAGE_NAME/"liblzma"/' src/common/common_w32res.rc sed -i 's/PACKAGE_URL/"https:\/\/tukaani.org\/xz\/"/' src/common/common_w32res.rc mkdir build cd build - cmake .. -GNinja -DCMAKE_INSTALL_PREFIX="$Qt6_DIR" -DBUILD_SHARED_LIBS=ON .. + cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$Qt6_DIR" -DBUILD_SHARED_LIBS=ON .. cmake --build . cmake --install . @@ -139,7 +139,8 @@ jobs: cd build/app/release mv ../../src/app/helper.exe . mv ../../src/app/mediawriter.exe . - $Qt6_DIR/bin/windeployqt.exe mediawriter.exe --verbose 2 --qmldir ../../.. --compiler-runtime --release + cp $Qt6_DIR/bin/liblzma.dll . + $Qt6_DIR/bin/windeployqt.exe mediawriter.exe helper.exe liblzma.dll --verbose 2 --qmldir ../../.. --compiler-runtime --release find . -type d -not -path '*/\.*' | sed 's/^\.\///g' | sed 's@\/@\\@g' | grep -v "^.$" > uninstall.log find . -type f -not -path '*/\.*' | sed 's/^\.\///g' | sed 's@\/@\\@g' | sort >> uninstall.log