Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tamlok committed May 10, 2024
1 parent 07c24a2 commit 025dd26
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions src/CPackLinuxDeployQt.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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})
3 changes: 3 additions & 0 deletions src/Packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 025dd26

Please sign in to comment.