Skip to content

Commit

Permalink
workflow: Fix macOS build error
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed Dec 10, 2023
1 parent 85a0865 commit f9bec3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,14 @@ if (PLATFORM_DESKTOP)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos.cmake)
set(bundle_args1 "-nb")
set(bundle_args2 "${MACOS_DYLIB_DIR}")
else ()
# Use system provided dylib
set(bundle_args1 "-b")
set(bundle_args2 "system")
endif ()
add_custom_target(
${PROJECT_NAME}.app
COMMAND "bash" "${CMAKE_BINARY_DIR}/../scripts/build_mac.sh" "${bundle_args1}" "${bundle_args2}"
COMMAND "bash" "${CMAKE_BINARY_DIR}/../scripts/build_mac.sh" "${bundle_args1}" "${bundle_args2}" "${APP_VERSION}"
)
add_dependencies(${PROJECT_NAME}.app ${PROJECT_NAME})
elseif (UNIX AND INSTALL)
Expand Down
5 changes: 1 addition & 4 deletions scripts/build_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ mkdir -p "${APP_PATH}"/Contents/Resources

cp ./scripts/mac/Info.plist "${APP_PATH}"/Contents/Info.plist

version_major=$(jq .version_major resources/i18n/en-US/version.json)
version_minor=$(jq .version_minor resources/i18n/en-US/version.json)
version_revision=$(jq .version_revision resources/i18n/en-US/version.json)
version=${version_major}.${version_minor}.${version_revision}
version=$3
git_tag=$(git rev-parse --short HEAD)

/usr/bin/sed -i '' '35s/1.0/'"${version}"'/' "${APP_PATH}"/Contents/Info.plist
Expand Down

0 comments on commit f9bec3d

Please sign in to comment.