From 4e1bfb305595a0f2c504f98e08b57cac3b8cef03 Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Sun, 5 May 2024 03:45:19 -0400 Subject: [PATCH] fix macOS CI --- .github/workflows/macos-homebrew.yml | 2 +- CMakeLists.txt | 8 ++++++-- website/docs/howto/build_from_source.md | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/macos-homebrew.yml b/.github/workflows/macos-homebrew.yml index 1c488bca..0bc527ac 100644 --- a/.github/workflows/macos-homebrew.yml +++ b/.github/workflows/macos-homebrew.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [macos-12,macos-14] - qt_ver: [ 6.7.1 ] + qt_ver: [ 6.7.0 ] qt_arch: [clang_64] env: targetName: GoldenDict diff --git a/CMakeLists.txt b/CMakeLists.txt index c3ab580c..30e3a10e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,9 +25,12 @@ project(goldendict-ng LANGUAGES CXX C) set(GOLDENDICT "goldendict") # binary/executable name -if (USE_ALTERNATIVE_NAME OR APPLE) +if (USE_ALTERNATIVE_NAME ) set(GOLDENDICT "goldendict-ng") endif () +if (APPLE) + set(GOLDENDICT "GoldenDict") +endif() set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -210,8 +213,9 @@ if (APPLE) ) set(Assembling_Dir "${CMAKE_BINARY_DIR}/redist") - set(App_Name "GoldenDict.app") + set(App_Name "${GOLDENDICT}.app") set(Redistributable_APP "${Assembling_Dir}/${App_Name}") + qt_generate_deploy_script( TARGET ${GOLDENDICT} OUTPUT_SCRIPT deploy_script diff --git a/website/docs/howto/build_from_source.md b/website/docs/howto/build_from_source.md index 98223996..33194ec0 100644 --- a/website/docs/howto/build_from_source.md +++ b/website/docs/howto/build_from_source.md @@ -82,7 +82,7 @@ Use`windeployqt.exe {your_build_dir}/goldendict.exe` which will copy the qt rela ### macOS -If you build in an IDE, then the created `goldendict-ng.app` will be runnable from the IDE which set up necessary magics for you. +If you build in an IDE, then the created `GoldenDict.app` will be runnable from the IDE which set up necessary magics for you. To make the `.app` runnable elsewhere, you can run `cmake --install build_dir/` which will invoke macdeployqt, ad-hoc code signing and various other things. The produced app will end up in `build_dir/redist/goldendict-ng.app`