fix macOS CI

This commit is contained in:
shenleban tongying 2024-05-05 03:45:19 -04:00
parent f05998da36
commit 4e1bfb3055
3 changed files with 8 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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`