From 025dd26a3fe5fd453c26253641c96e9cfadfac15 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Fri, 10 May 2024 14:20:30 +0800 Subject: [PATCH] fix --- .github/workflows/ci-linux.yml | 22 ++++++++++++++++++++-- .github/workflows/ci-win.yml | 2 -- src/CPackLinuxDeployQt.cmake.in | 10 ++++------ src/Packaging.cmake | 3 +++ 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 3b4d8ec2fc..cbfd510e72 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -72,10 +72,12 @@ jobs: version: 6.5.3 target: desktop modules: 'qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat qtserialport' + tools: 'tools_opensslv3_src' cache: 'true' - name: Compile OpenSSLV3 run: | + tree ${Qt6_DIR}/../../ cd ${Qt6_DIR}/../../Tools/OpenSSLV3 ./Configure make -j2 @@ -113,14 +115,30 @@ jobs: - name: Build Project run: | cmake --build . --target pack - mv VNote*.AppImage vnote-${{env.VNOTE_VER}}-linux-x64.AppImage + working-directory: ${{runner.workspace}}/build + + - name: Fix Package + run: | + mkdir fixpackage + mv VNote*.AppImage ./fixpackage + pushd fixpackage + # Extract the AppImage + ./VNote*.AppImage --appimage-extract + # Remove libnss3.so and libnssutil3.so + rm ./squashfs-root/usr/lib/libnss*.so + # Re-package + rm VNote*.AppImage + linuxdeploy-plugin-appimage-x86_64.AppImage --appdir=./squashfs-root + mv VNote*.AppImage ../ + popd + mv VNote*.AppImage VNote-${{env.VNOTE_VER}}-linux-x64.AppImage working-directory: ${{runner.workspace}}/build - name: Archive Artifacts uses: actions/upload-artifact@v2 with: name: VNote-${{env.VNOTE_VER}}-linux-x64 - path: ${{runner.workspace}}/build/vnote-${{env.VNOTE_VER}}-linux-x64.AppImage + path: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-linux-x64.AppImage - name: Update Tag if: github.ref == 'refs/heads/master' diff --git a/.github/workflows/ci-win.yml b/.github/workflows/ci-win.yml index 032f84f870..3e590f3b37 100644 --- a/.github/workflows/ci-win.yml +++ b/.github/workflows/ci-win.yml @@ -97,9 +97,7 @@ jobs: 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=${{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 diff --git a/src/CPackLinuxDeployQt.cmake.in b/src/CPackLinuxDeployQt.cmake.in index dbab601f98..8376f7d291 100644 --- a/src/CPackLinuxDeployQt.cmake.in +++ b/src/CPackLinuxDeployQt.cmake.in @@ -5,14 +5,12 @@ execute_process( COMMAND ${CMAKE_MAKE_PROGRAM} DESTDIR=${VX_APPIMAGE_DEST_DIR} install WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) execute_process( - COMMAND env QMAKE=${QMAKE_EXECUTABLE} "${LINUXDEPLOY_EXECUTABLE}" --plugin=qt --output=appimage + COMMAND env QMAKE=${QMAKE_EXECUTABLE} LD_LIBRARY_PATH=/usr/local/lib64:$ENV{LD_LIBRARY_PATH} "${LINUXDEPLOY_EXECUTABLE}" --plugin=qt --output=appimage --appdir=${VX_APPIMAGE_DEST_DIR} -e ${CMAKE_CURRENT_BINARY_DIR}/vnote -d ${VX_APPIMAGE_DESKTOP_FILE} -i ${CMAKE_CURRENT_LIST_DIR}/data/core/logo/64x64/vnote.png -l ${QT_PLUGINS_DIR}/platformthemes/libqgtk3.so - -l /usr/local/lib64/libssl.so.3 -l /usr/local/lib64/libcrypto.so.3 - --exclude-library=libssl.so.1* - --exclude-library=libcrypto.so.1* - --exclude-library=libnss3.so - --exclude-library=libnssutil3.so + -l /usr/local/lib64/libssl.so.3 + # --exclude-library option does not work as expected + # --exclude-library=libssl.so.1.1,libcrypto.so.1.1,libnss3.so,libnssutil3.so WORKING_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}) diff --git a/src/Packaging.cmake b/src/Packaging.cmake index c959e6609b..f314c3eacf 100644 --- a/src/Packaging.cmake +++ b/src/Packaging.cmake @@ -50,6 +50,7 @@ function(windeployqt target) ) add_dependencies(deploy lrelease) + add_dependencies(pack deploy) install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/winqt/" DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL) @@ -104,6 +105,8 @@ add_custom_target(pack COMMAND ${CMAKE_CPACK_COMMAND} "--config" "${CMAKE_BINARY_DIR}/BundleConfig.cmake" COMMENT "Running CPACK. Please wait..." DEPENDS vnote) +add_dependencies(pack lrelease) + set(CPACK_GENERATOR) if(WIN32)