From cdb961449d1744d953549ccf8be7ae65307ec84f Mon Sep 17 00:00:00 2001 From: Le Tan Date: Tue, 30 Apr 2024 22:16:48 +0800 Subject: [PATCH 1/9] try fix Win CI --- .github/workflows/ci-win.yml | 139 ++++++----------------------------- src/Packaging.cmake | 2 +- 2 files changed, 22 insertions(+), 119 deletions(-) diff --git a/.github/workflows/ci-win.yml b/.github/workflows/ci-win.yml index 092568d75e..a822b3d3a9 100644 --- a/.github/workflows/ci-win.yml +++ b/.github/workflows/ci-win.yml @@ -8,6 +8,12 @@ on: # Allows you to run this workflow manually from the Actions tab. workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled' + required: false + default: false env: VNOTE_VER: 3.17.0 @@ -19,6 +25,7 @@ jobs: timeout-minutes: 120 strategy: + fail-fast: false matrix: config: - { @@ -27,7 +34,8 @@ jobs: platform: x64, qt: 5.15.2, qt_modules: qtwebengine, - qt_tools: tools_opensslv3_x64 + qt_tools: tools_opensslv3_x64, + qt_major: 5 } - { name: "Build On Win64 Qt 6.5", @@ -35,7 +43,8 @@ jobs: platform: x64, qt: 6.5.2, qt_modules: "qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat", - qt_tools: tools_opensslv3_x64 + qt_tools: tools_opensslv3_x64, + qt_major: 6 } steps: @@ -80,126 +89,20 @@ jobs: git clone https://github.com/tamlok/openssl-utils.git openssl-utils.git --depth=1 working-directory: ${{runner.workspace}}/build - - name: Download JOM - uses: suisei-cn/actions-download-file@v1 - with: - url: http://download.qt.io/official_releases/jom/jom.zip - target: ${{runner.temp}}\ - - - name: Unzip JOM - run: | - 7z x jom.zip -ojom - working-directory: ${{runner.temp}} + # Enable tmate debugging of manually-triggered workflows if the input option was provided + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} - name: Configure and Build Project shell: cmd run: | + tree qmake --version + cmake --version call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{matrix.config.platform}} - qmake -r -spec win32-msvc CONFIG-=debug CONFIG+=release %GITHUB_WORKSPACE%\vnote.pro - ${{runner.temp}}\jom\jom - working-directory: ${{runner.workspace}}/build - - - name: Package Project 1 - shell: cmd - run: | - qmake --version - mkdir "%DISTRIB_PATH%" - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{matrix.config.platform}} - windeployqt.exe --dir "%DISTRIB_PATH%" .\src\release\vnote.exe - copy .\src\release\vnote.exe "%DISTRIB_PATH%\vnote.exe" - copy .\src\release\vnote_extra.rcc "%DISTRIB_PATH%\vnote_extra.rcc" - copy .\libs\vtextedit\src\libs\syntax-highlighting\release\VSyntaxHighlighting.dll "%DISTRIB_PATH%\VSyntaxHighlighting.dll" - copy .\libs\vtextedit\src\editor\release\VTextEdit.dll "%DISTRIB_PATH%\VTextEdit.dll" - copy "%GITHUB_WORKSPACE%\package\qt.conf" "%DISTRIB_PATH%\qt.conf" - copy "%GITHUB_WORKSPACE%\README.md" "%DISTRIB_PATH%\README.md" - copy "%GITHUB_WORKSPACE%\COPYING.LESSER" "%DISTRIB_PATH%\COPYING.LESSER" - echo %GITHUB_SHA% > "%DISTRIB_PATH%\commit" - del /F /Q "%DISTRIB_PATH%\translations\qt_*.qm" - working-directory: ${{runner.workspace}}/build - env: - DISTRIB_PATH: ${{runner.workspace}}/build/distrib/vnote - - - name: "Package Project: Copy OpenSSL on 5.15" - shell: cmd - if: ${{startsWith(matrix.config.qt, '5.15')}} - run: | - set openssl_dir=openssl-utils.git\1.1.1j\Win_${{matrix.config.platform}} - copy %openssl_dir%\lib*.dll "%DISTRIB_PATH%\" - working-directory: ${{runner.workspace}}/build - env: - DISTRIB_PATH: ${{runner.workspace}}/build/distrib/vnote - - - name: Package Project 2 - shell: cmd - run: | - 7z a vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}.zip "%DISTRIB_PATH%" - copy vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}.zip vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}.zip - working-directory: ${{runner.workspace}}/build - env: - DISTRIB_PATH: ${{runner.workspace}}/build/distrib/vnote - - - name: Package Installer - if: ${{startsWith(matrix.config.qt, '6.')}} - shell: cmd - run: | - copy "%GITHUB_WORKSPACE%\src\data\core\icons\vnote.ico" "%DISTRIB_PATH%\vnote.ico" - git clone https://github.com/vnotex/mkmsi.git mkmsi.git --depth=1 - python .\mkmsi.git\mkmsi.py --auto-create qt --source-dir "%DISTRIB_PATH%" --wix-root "C:\Program Files (x86)\WiX Toolset v3.11" --merge-module "C:\Program Files (x86)\Common Files\Merge Modules\Microsoft_VC140_CRT_${{matrix.config.platform}}.msm" --add-desktop-shortcut --project-version ${{env.VNOTE_VER}} --license %GITHUB_WORKSPACE%\package\lgpl-3.0.rtf --executable vnote.exe --wix-banner %GITHUB_WORKSPACE%\package\wix_banner.png --wix-dialog %GITHUB_WORKSPACE%\package\wix_dialog.png VNote - move VNote.msi .\distrib\VNote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}.msi - del "%DISTRIB_PATH%\vnote.ico" - working-directory: ${{runner.workspace}}/build - env: - DISTRIB_PATH: ${{runner.workspace}}/build/distrib/vnote - - - name: Archive Artifacts - uses: actions/upload-artifact@v2 - with: - name: vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}} - path: ${{env.DISTRIB_PATH}} - env: - DISTRIB_PATH: ${{runner.workspace}}/build/distrib/vnote - - - name: Archive Installer - if: ${{startsWith(matrix.config.qt, '6.')}} - uses: actions/upload-artifact@v2 - with: - name: VNote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}.msi - path: ${{runner.workspace}}/build/distrib/VNote*.msi - env: - DISTRIB_PATH: ${{runner.workspace}}/build/distrib/vnote - - - name: Update Tag - if: github.ref == 'refs/heads/master' - shell: bash - run: | - git tag --force continuous-build ${GITHUB_SHA} - git push --force --tags - - - name: Update Continuous Build Release - if: github.ref == 'refs/heads/master' - uses: johnwbyrd/update-release@v1.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - files: ${{runner.workspace}}/build/vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}.zip - release: Continuous Build - tag: continuous-build - - - name: Test - shell: cmd - run: | - dir . - dir .\distrib + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=${{matrix.config.qt_major}} %GITHUB_WORKSPACE% + cmake --build . + cmake --build . --target=deploy + cmake --build . --target=pack working-directory: ${{runner.workspace}}/build - - - name: Release - if: github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, '[Release]') - uses: ncipollo/release-action@v1.11.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - # We need hard code here. - artifacts: "D:/a/vnote/build/vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}.zip" - commit: master - tag: v${{env.VNOTE_VER}} - allowUpdates: true - draft: true diff --git a/src/Packaging.cmake b/src/Packaging.cmake index 6dc70b8413..40587529b6 100644 --- a/src/Packaging.cmake +++ b/src/Packaging.cmake @@ -2,7 +2,7 @@ find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED COMPONENTS Core) -get_target_property(QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION) +get_target_property(QMAKE_EXECUTABLE Qt::qmake IMPORTED_LOCATION) get_filename_component(QT_BIN_DIR "${QMAKE_EXECUTABLE}" DIRECTORY) execute_process(COMMAND ${QMAKE_EXECUTABLE} -query QT_VERSION OUTPUT_VARIABLE QT_VERSION) From 671da927c3939246a21b76954c1f6de4970126bb Mon Sep 17 00:00:00 2001 From: Le Tan Date: Wed, 1 May 2024 22:59:54 +0800 Subject: [PATCH 2/9] add openssl --- src/Packaging.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Packaging.cmake b/src/Packaging.cmake index 40587529b6..08201c97a4 100644 --- a/src/Packaging.cmake +++ b/src/Packaging.cmake @@ -6,6 +6,8 @@ get_target_property(QMAKE_EXECUTABLE Qt::qmake IMPORTED_LOCATION) get_filename_component(QT_BIN_DIR "${QMAKE_EXECUTABLE}" DIRECTORY) execute_process(COMMAND ${QMAKE_EXECUTABLE} -query QT_VERSION OUTPUT_VARIABLE QT_VERSION) +set(QT_TOOLS_DIR "${QT_BIN_DIR}/../../../Tools") + # To use the specific version of Qt set(WINDEPLOYQT_EXECUTABLE "${QT_BIN_DIR}/windeployqt") @@ -48,6 +50,13 @@ function(windeployqt target) add_dependencies(deploy lrelease) install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/winqt/" DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL) + + cmake_path(NORMAL_PATH QT_TOOLS_DIR OUTPUT_VARIABLE QT_TOOLS_DIR) + set(OPENSSL_ROOT_DIR "${QT_TOOLS_DIR}/OpenSSL/Win_x64" CACHE STRING "OpenSSL dir") + file(GLOB OPENSSL_LIBS_FILES "${OPENSSL_ROOT_DIR}/bin/lib*.dll") + cmake_path(NORMAL_PATH OPENSSL_LIBS_FILES OUTPUT_VARIABLE OPENSSL_LIBS_FILES) + install(FILES ${OPENSSL_LIBS_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" ) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) include(InstallRequiredSystemLibraries) endfunction() From 6653c64b11706ca1f452d779460930582322bc41 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Thu, 2 May 2024 20:57:46 +0800 Subject: [PATCH 3/9] fix --- .github/workflows/ci-win.yml | 60 +++++++++++++++++++++++++++++++----- src/Packaging.cmake | 10 +++--- 2 files changed, 59 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-win.yml b/.github/workflows/ci-win.yml index a822b3d3a9..8ae15fff37 100644 --- a/.github/workflows/ci-win.yml +++ b/.github/workflows/ci-win.yml @@ -31,20 +31,20 @@ jobs: - { name: "Build On Win64 Qt 5.15", arch: win64_msvc2019_64, - platform: x64, qt: 5.15.2, qt_modules: qtwebengine, qt_tools: tools_opensslv3_x64, - qt_major: 5 + qt_major: 5, + suffix: "-windows7" } - { name: "Build On Win64 Qt 6.5", arch: win64_msvc2019_64, - platform: x64, qt: 6.5.2, qt_modules: "qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat", qt_tools: tools_opensslv3_x64, - qt_major: 6 + qt_major: 6, + suffix: "" } steps: @@ -97,12 +97,58 @@ jobs: - name: Configure and Build Project shell: cmd run: | - tree - qmake --version cmake --version - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{matrix.config.platform}} + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=${{matrix.config.qt_major}} %GITHUB_WORKSPACE% cmake --build . cmake --build . --target=deploy cmake --build . --target=pack working-directory: ${{runner.workspace}}/build + + - name: Rename on 5.15 + shell: bash + if: ${{startsWith(matrix.config.qt, '5.15')}} + run: | + mv VNote*.zip VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip + working-directory: ${{runner.workspace}}/build + + - name: Archive Artifacts + uses: actions/upload-artifact@v2 + with: + name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip + path: ${{runner.workspace}}/build/VNote*.zip + + - name: Archive Installer + uses: actions/upload-artifact@v2 + with: + name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.msi + path: ${{runner.workspace}}/build/VNote*.msi + + - name: Update Tag + if: github.ref == 'refs/heads/master' + shell: bash + run: | + git tag --force continuous-build ${GITHUB_SHA} + git push --force --tags + + - name: Update Continuous Build Release + if: github.ref == 'refs/heads/master' && ${{!startsWith(matrix.config.qt, '5.15')}} + uses: johnwbyrd/update-release@v1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + # glob not supported + files: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip + release: Continuous Build + tag: continuous-build + + - name: Release + if: github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, '[Release]') + uses: ncipollo/release-action@v1.11.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + # glob not supported + artifacts: "${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip" + commit: master + tag: v${{env.VNOTE_VER}} + allowUpdates: true + draft: true diff --git a/src/Packaging.cmake b/src/Packaging.cmake index 08201c97a4..a392c6f6ab 100644 --- a/src/Packaging.cmake +++ b/src/Packaging.cmake @@ -22,10 +22,12 @@ function(windeployqt target) # Bundle Library Files string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER) - if(CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG") - set(WINDEPLOYQT_ARGS --debug) - else() - set(WINDEPLOYQT_ARGS --release) + if ((QT_DEFAULT_MAJOR_VERSION GREATER 5)) + if(CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG") + set(WINDEPLOYQT_ARGS --debug) + else() + set(WINDEPLOYQT_ARGS --release) + endif() endif() add_custom_target(deploy From fab1ca51d02a85d7926f6541fc9985160fa75800 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Thu, 2 May 2024 22:52:58 +0800 Subject: [PATCH 4/9] unzip --- .github/workflows/ci-win.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-win.yml b/.github/workflows/ci-win.yml index 8ae15fff37..f5f1d37f1a 100644 --- a/.github/workflows/ci-win.yml +++ b/.github/workflows/ci-win.yml @@ -103,20 +103,22 @@ jobs: cmake --build . cmake --build . --target=deploy cmake --build . --target=pack + 7z x VNote*.zip -o* + dir working-directory: ${{runner.workspace}}/build - name: Rename on 5.15 shell: bash if: ${{startsWith(matrix.config.qt, '5.15')}} run: | - mv VNote*.zip VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip + mv VNote-${{env.VNOTE_VER}}-win64 VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}} working-directory: ${{runner.workspace}}/build - name: Archive Artifacts uses: actions/upload-artifact@v2 with: name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip - path: ${{runner.workspace}}/build/VNote*.zip + path: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}} - name: Archive Installer uses: actions/upload-artifact@v2 @@ -137,7 +139,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} # glob not supported - files: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip + files: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}} release: Continuous Build tag: continuous-build @@ -147,7 +149,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} # glob not supported - artifacts: "${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip" + artifacts: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}} commit: master tag: v${{env.VNOTE_VER}} allowUpdates: true From a4c55426ee87941ae4bbfeffe5f51564500400bd Mon Sep 17 00:00:00 2001 From: Le Tan Date: Thu, 2 May 2024 23:04:19 +0800 Subject: [PATCH 5/9] fix --- .github/workflows/ci-win.yml | 2 +- src/Packaging.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-win.yml b/.github/workflows/ci-win.yml index f5f1d37f1a..0a445ab6f4 100644 --- a/.github/workflows/ci-win.yml +++ b/.github/workflows/ci-win.yml @@ -134,7 +134,7 @@ jobs: git push --force --tags - name: Update Continuous Build Release - if: github.ref == 'refs/heads/master' && ${{!startsWith(matrix.config.qt, '5.15')}} + if: github.ref == 'refs/heads/master' uses: johnwbyrd/update-release@v1.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/src/Packaging.cmake b/src/Packaging.cmake index a392c6f6ab..7b2659da14 100644 --- a/src/Packaging.cmake +++ b/src/Packaging.cmake @@ -35,7 +35,7 @@ function(windeployqt target) COMMAND "${CMAKE_COMMAND}" -E env PATH="${QT_BIN_DIR}" "${WINDEPLOYQT_EXECUTABLE}" ${WINDEPLOYQT_ARGS} - --verbose 0 + --verbose 1 --no-quick-import --no-opengl-sw --no-compiler-runtime From 17a82a2ab04cda847e58352e9051ddb103e1f147 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Thu, 2 May 2024 23:23:10 +0800 Subject: [PATCH 6/9] fix --- src/Packaging.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Packaging.cmake b/src/Packaging.cmake index 7b2659da14..3e967da4eb 100644 --- a/src/Packaging.cmake +++ b/src/Packaging.cmake @@ -35,7 +35,6 @@ function(windeployqt target) COMMAND "${CMAKE_COMMAND}" -E env PATH="${QT_BIN_DIR}" "${WINDEPLOYQT_EXECUTABLE}" ${WINDEPLOYQT_ARGS} - --verbose 1 --no-quick-import --no-opengl-sw --no-compiler-runtime From b26cd62164fb9c93b248cd80f43768d7c7fb1e7a Mon Sep 17 00:00:00 2001 From: Le Tan Date: Thu, 2 May 2024 23:37:36 +0800 Subject: [PATCH 7/9] fix --- src/Packaging.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Packaging.cmake b/src/Packaging.cmake index 3e967da4eb..84a8fa7d01 100644 --- a/src/Packaging.cmake +++ b/src/Packaging.cmake @@ -9,15 +9,13 @@ execute_process(COMMAND ${QMAKE_EXECUTABLE} -query QT_VERSION OUTPUT_VARIABLE QT set(QT_TOOLS_DIR "${QT_BIN_DIR}/../../../Tools") # To use the specific version of Qt -set(WINDEPLOYQT_EXECUTABLE "${QT_BIN_DIR}/windeployqt") +set(WINDEPLOYQT_EXECUTABLE "${QT_BIN_DIR}/windeployqt.exe") find_program(LINUXDEPLOY_EXECUTABLE linuxdeploy linuxdeploy-x86_64.AppImage HINTS "${QT_BIN_DIR}") find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${QT_BIN_DIR}") find_program(MACDEPLOYQTFIX_EXECUTABLE macdeployqtfix.py HINTS "${QT_BIN_DIR}") find_package(Python) -mark_as_advanced(WINDEPLOYQT_EXECUTABLE LINUXDEPLOY_EXECUTABLE MACDEPLOYQT_EXECUTABLE) - function(windeployqt target) # Bundle Library Files string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER) @@ -30,6 +28,8 @@ function(windeployqt target) endif() endif() + message(INFO " debug: ${WINDEPLOYQT_EXECUTABLE}") + add_custom_target(deploy COMMAND "${CMAKE_COMMAND}" -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/winqt/" COMMAND "${CMAKE_COMMAND}" -E From fad7d95462dab08dc706b2f2ed6810765e48e7af Mon Sep 17 00:00:00 2001 From: Le Tan Date: Fri, 3 May 2024 20:39:04 +0800 Subject: [PATCH 8/9] fix openssl --- .github/workflows/ci-win.yml | 4 ++-- src/Packaging.cmake | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-win.yml b/.github/workflows/ci-win.yml index 0a445ab6f4..416973398f 100644 --- a/.github/workflows/ci-win.yml +++ b/.github/workflows/ci-win.yml @@ -99,7 +99,7 @@ jobs: run: | cmake --version call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 - cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=${{matrix.config.qt_major}} %GITHUB_WORKSPACE% + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=${{matrix.config.qt_major}} -DOPENSSL_EXTRA_LIB_DIR=.\openssl-utils.git\1.1.1j\Win_x64 %GITHUB_WORKSPACE% cmake --build . cmake --build . --target=deploy cmake --build . --target=pack @@ -117,7 +117,7 @@ jobs: - name: Archive Artifacts uses: actions/upload-artifact@v2 with: - name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip + name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}} path: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}} - name: Archive Installer diff --git a/src/Packaging.cmake b/src/Packaging.cmake index 84a8fa7d01..93331464c8 100644 --- a/src/Packaging.cmake +++ b/src/Packaging.cmake @@ -56,7 +56,11 @@ function(windeployqt target) set(OPENSSL_ROOT_DIR "${QT_TOOLS_DIR}/OpenSSL/Win_x64" CACHE STRING "OpenSSL dir") file(GLOB OPENSSL_LIBS_FILES "${OPENSSL_ROOT_DIR}/bin/lib*.dll") cmake_path(NORMAL_PATH OPENSSL_LIBS_FILES OUTPUT_VARIABLE OPENSSL_LIBS_FILES) - install(FILES ${OPENSSL_LIBS_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" ) + install(FILES ${OPENSSL_LIBS_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL) + + file(GLOB OPENSSL_EXTRA_LIB_FILES "${OPENSSL_EXTRA_LIB_DIR}/lib*.dll") + cmake_path(NORMAL_PATH OPENSSL_EXTRA_LIB_FILES OUTPUT_VARIABLE OPENSSL_EXTRA_LIB_FILES) + install(FILES ${OPENSSL_EXTRA_LIB_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}") set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) include(InstallRequiredSystemLibraries) From b394a3766099bcb52ab4678026e88967f0fe4f72 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Fri, 3 May 2024 21:51:43 +0800 Subject: [PATCH 9/9] debug --- .github/workflows/ci-win.yml | 4 +++- src/Packaging.cmake | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-win.yml b/.github/workflows/ci-win.yml index 416973398f..ea66c941a6 100644 --- a/.github/workflows/ci-win.yml +++ b/.github/workflows/ci-win.yml @@ -99,10 +99,11 @@ jobs: run: | cmake --version call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 - cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=${{matrix.config.qt_major}} -DOPENSSL_EXTRA_LIB_DIR=.\openssl-utils.git\1.1.1j\Win_x64 %GITHUB_WORKSPACE% + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=${{matrix.config.qt_major}} -DOPENSSL_EXTRA_LIB_DIR=${{runner.workspace}}\build\openssl-utils.git\1.1.1j\Win_x64 %GITHUB_WORKSPACE% cmake --build . cmake --build . --target=deploy cmake --build . --target=pack + cmake --build . --target=install 7z x VNote*.zip -o* dir working-directory: ${{runner.workspace}}/build @@ -121,6 +122,7 @@ jobs: path: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}} - name: Archive Installer + if: ${{!startsWith(matrix.config.qt, '5.15')}} uses: actions/upload-artifact@v2 with: name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.msi diff --git a/src/Packaging.cmake b/src/Packaging.cmake index 93331464c8..4e8341934e 100644 --- a/src/Packaging.cmake +++ b/src/Packaging.cmake @@ -28,7 +28,7 @@ function(windeployqt target) endif() endif() - message(INFO " debug: ${WINDEPLOYQT_EXECUTABLE}") + message(INFO " debug: windeployqt:${WINDEPLOYQT_EXECUTABLE}") add_custom_target(deploy COMMAND "${CMAKE_COMMAND}" -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/winqt/" @@ -58,9 +58,11 @@ function(windeployqt target) cmake_path(NORMAL_PATH OPENSSL_LIBS_FILES OUTPUT_VARIABLE OPENSSL_LIBS_FILES) install(FILES ${OPENSSL_LIBS_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL) + message(INFO " debug: OpenSSLExtraLIBDIR:${OPENSSL_EXTRA_LIB_DIR}") file(GLOB OPENSSL_EXTRA_LIB_FILES "${OPENSSL_EXTRA_LIB_DIR}/lib*.dll") cmake_path(NORMAL_PATH OPENSSL_EXTRA_LIB_FILES OUTPUT_VARIABLE OPENSSL_EXTRA_LIB_FILES) - install(FILES ${OPENSSL_EXTRA_LIB_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}") + message(INFO " debug: OpenSSLExtraLibFiles:${OPENSSL_EXTRA_LIB_FILES}") + install(FILES ${OPENSSL_EXTRA_LIB_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL) set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) include(InstallRequiredSystemLibraries)