mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-02 20:11:15 +00:00
🔨 feat: isle.app works, config doesn't...
This commit is contained in:
parent
c6b94dabcf
commit
50384acdf8
@ -707,6 +707,7 @@ if (NOT (NINTENDO_3DS OR WINDOWS_STORE))
|
||||
install(TARGETS isle ${install_extra_targets}
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
BUNDLE DESTINATION "."
|
||||
)
|
||||
endif()
|
||||
if (ISLE_BUILD_CONFIG)
|
||||
@ -731,6 +732,7 @@ if (ISLE_BUILD_CONFIG)
|
||||
endif()
|
||||
install(TARGETS isle-config
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
BUNDLE DESTINATION "."
|
||||
)
|
||||
endif()
|
||||
if(EMSCRIPTEN)
|
||||
@ -767,6 +769,8 @@ if(WINDOWS_STORE)
|
||||
endif()
|
||||
if(MSVC)
|
||||
set(CPACK_GENERATOR ZIP)
|
||||
elseif(APPLE)
|
||||
set(CPACK_GENERATOR DragNDrop)
|
||||
else()
|
||||
set(CPACK_GENERATOR TGZ)
|
||||
endif()
|
||||
|
||||
@ -24,3 +24,7 @@ endif()
|
||||
if(WINDOWS_STORE)
|
||||
add_subdirectory(UWP)
|
||||
endif()
|
||||
|
||||
if(APPLE AND NOT IOS)
|
||||
add_subdirectory(macos)
|
||||
endif()
|
||||
|
||||
57
packaging/macos/CMakeLists.txt
Normal file
57
packaging/macos/CMakeLists.txt
Normal file
@ -0,0 +1,57 @@
|
||||
set(_icon_file AppIcon)
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER ${APP_ID})
|
||||
set(MACOSX_BUNDLE_COPYRIGHT ${APP_SPDX})
|
||||
set(MACOSX_ISLE_BUNDLE_NAME isle)
|
||||
set(MACOSX_ISLE_BUNDLE_DISPLAY_NAME ${APP_NAME})
|
||||
set(MACOSX_CONFIG_BUNDLE_NAME isle-config)
|
||||
set(MACOSX_CONFIG_BUNDLE_DISPLAY_NAME "Configure LEGO Island")
|
||||
set(MACOSX_BUNDLE_INFO_STRING ${PROJECT_VERSION})
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION})
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION})
|
||||
set(MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${PROJECT_VERSION}")
|
||||
|
||||
# TODO: darwin < 9
|
||||
set(MACOSX_BUNDLE_REQUIRED_PLATFORM Carbon)
|
||||
|
||||
if(ISLE_BUILD_APP)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/isle/Info.plist.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/isle/Info.plist"
|
||||
@ONLY
|
||||
)
|
||||
set(RESOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/isle/${_icon_file}.icns")
|
||||
target_sources(isle PRIVATE ${RESOURCE_FILES})
|
||||
set_target_properties(isle PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_ICON_FILE "${_icon_file}.icns"
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_BINARY_DIR}/isle/Info.plist"
|
||||
RESOURCE ${RESOURCE_FILES})
|
||||
install(TARGETS isle DESTINATION ./)
|
||||
install(CODE "
|
||||
include(BundleUtilities)
|
||||
fixup_bundle(${CMAKE_BINARY_DIR}/${MACOSX_ISLE_BUNDLE_NAME}.app \"\" \"\")
|
||||
"
|
||||
COMPONENT Runtime)
|
||||
endif()
|
||||
if(ISLE_BUILD_CONFIG)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/config/Info.plist.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/config/Info.plist"
|
||||
@ONLY
|
||||
)
|
||||
set(RESOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/config/${_icon_file}.icns")
|
||||
target_sources(isle-config PRIVATE ${RESOURCE_FILES})
|
||||
set_target_properties(isle-config PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_ICON_FILE "${_icon_file}.icns"
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_BINARY_DIR}/config/Info.plist"
|
||||
RESOURCE ${RESOURCE_FILES})
|
||||
install(TARGETS isle-config DESTINATION ./)
|
||||
qt_generate_deploy_app_script(
|
||||
TARGET isle-config
|
||||
OUTPUT_SCRIPT deploy_script
|
||||
NO_COMPILER_RUNTIME
|
||||
NO_TRANSLATIONS
|
||||
)
|
||||
install(SCRIPT "${deploy_script}")
|
||||
endif()
|
||||
BIN
packaging/macos/config/AppIcon.icns
Normal file
BIN
packaging/macos/config/AppIcon.icns
Normal file
Binary file not shown.
80
packaging/macos/config/Info.plist.in
Normal file
80
packaging/macos/config/Info.plist.in
Normal file
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@MACOSX_BUNDLE_INFO_STRING@</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>@MACOSX_BUNDLE_ICON_FILE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>@MACOSX_BUNDLE_LONG_VERSION_STRING@</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>@MACOSX_CONFIG_BUNDLE_NAME@</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>@MACOSX_CONFIG_BUNDLE_DISPLAY_NAME@</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@MACOSX_BUNDLE_SHORT_VERSION_STRING@</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@MACOSX_BUNDLE_BUNDLE_VERSION@</string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSRequires@MACOSX_BUNDLE_REQUIRED_PLATFORM@</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>@MACOSX_BUNDLE_COPYRIGHT@</string>
|
||||
<key>SDL_FILESYSTEM_BASE_DIR_TYPE</key>
|
||||
<string>resource</string>
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||
<true/>
|
||||
<key>UIFileSharingEnabled</key>
|
||||
<true/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiresFullScreen</key>
|
||||
<true/>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>CFBundleAllowMixedLocalizations</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
packaging/macos/isle/AppIcon.icns
Normal file
BIN
packaging/macos/isle/AppIcon.icns
Normal file
Binary file not shown.
82
packaging/macos/isle/Info.plist.in
Normal file
82
packaging/macos/isle/Info.plist.in
Normal file
@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@MACOSX_BUNDLE_INFO_STRING@</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>@MACOSX_BUNDLE_ICON_FILE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>@MACOSX_BUNDLE_LONG_VERSION_STRING@</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>@MACOSX_ISLE_BUNDLE_NAME@</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>@MACOSX_ISLE_BUNDLE_DISPLAY_NAME@</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@MACOSX_BUNDLE_SHORT_VERSION_STRING@</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@MACOSX_BUNDLE_BUNDLE_VERSION@</string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSRequires@MACOSX_BUNDLE_REQUIRED_PLATFORM@</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>@MACOSX_BUNDLE_COPYRIGHT@</string>
|
||||
<key>SDL_FILESYSTEM_BASE_DIR_TYPE</key>
|
||||
<string>resource</string>
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||
<true/>
|
||||
<key>UIFileSharingEnabled</key>
|
||||
<true/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiresFullScreen</key>
|
||||
<true/>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>CFBundleAllowMixedLocalizations</key>
|
||||
<true/>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.games</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Loading…
Reference in New Issue
Block a user