Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions assets/macos/acecode-dmg-background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions assets/macos/acecode-installer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 22 additions & 2 deletions cmake/acecode_desktop.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,30 @@ endif()

if(APPLE)
set(ACECODE_MACOS_ICON "${CMAKE_SOURCE_DIR}/assets/macos/acecode.icns")
set(ACECODE_MACOS_INSTALLER_ICON_SOURCE
"${CMAKE_SOURCE_DIR}/assets/macos/acecode-installer.svg")
set(ACECODE_MACOS_INSTALLER_ICON
"${CMAKE_BINARY_DIR}/generated/macos/acecode-installer.icns")
add_custom_command(
OUTPUT "${ACECODE_MACOS_INSTALLER_ICON}"
COMMAND /bin/bash
"${CMAKE_SOURCE_DIR}/scripts/macos_generate_icns.sh"
--source "${ACECODE_MACOS_INSTALLER_ICON_SOURCE}"
--output "${ACECODE_MACOS_INSTALLER_ICON}"
DEPENDS
"${ACECODE_MACOS_INSTALLER_ICON_SOURCE}"
"${CMAKE_SOURCE_DIR}/scripts/macos_generate_icns.sh"
COMMENT "Generating ACECode current-user installer icon"
VERBATIM
)
target_sources(acecode-desktop PRIVATE "${ACECODE_MACOS_ICON}")
set_source_files_properties("${ACECODE_MACOS_ICON}" PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources"
)
set_source_files_properties("${ACECODE_MACOS_INSTALLER_ICON}" PROPERTIES
GENERATED TRUE
MACOSX_PACKAGE_LOCATION "Resources"
)
set_target_properties(acecode-desktop PROPERTIES
# Keep the app bundle user-facing while avoiding a case-insensitive
# collision with the bundled daemon binary copied below.
Expand Down Expand Up @@ -141,7 +161,7 @@ if(APPLE)
${CMAKE_SOURCE_DIR}/src/macos_installer/main.mm
${CMAKE_SOURCE_DIR}/src/desktop/user_install_policy.cpp
${CMAKE_SOURCE_DIR}/src/desktop/user_install_policy.hpp
${ACECODE_MACOS_ICON}
${ACECODE_MACOS_INSTALLER_ICON}
)
target_include_directories(acecode-user-installer PRIVATE
${CMAKE_SOURCE_DIR}/src
Expand All @@ -153,7 +173,7 @@ if(APPLE)
set_target_properties(acecode-user-installer PROPERTIES
RUNTIME_OUTPUT_NAME "Install ACECode"
MACOSX_BUNDLE_BUNDLE_NAME "Install ACECode"
MACOSX_BUNDLE_ICON_FILE "acecode.icns"
MACOSX_BUNDLE_ICON_FILE "acecode-installer.icns"
MACOSX_BUNDLE_GUI_IDENTIFIER "dev.acecode.installer"
MACOSX_BUNDLE_INFO_PLIST
"${CMAKE_SOURCE_DIR}/cmake/macos/ACECodeUserInstallerInfo.plist.in"
Expand Down
19 changes: 19 additions & 0 deletions cmake/macos/ACECodeUserInstallerInfo.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>app</string>
</array>
<key>CFBundleTypeName</key>
<string>ACECode Application Bundle</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.application-bundle</string>
</array>
</dict>
</array>
<key>CFBundleDisplayName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundleExecutable</key>
Expand Down
Loading
Loading