Changeset - r24456:3db6bc1e31b8
[Not reviewed]
master
1 2 0
Patric Stout - 4 years ago 2020-12-12 15:29:09
truebrain@openttd.org
Fix: [bundle] custom launch.sh is no longer required for Mac OS

Co-authored-by: Owen Rudge <owen@owenrudge.net>
3 files changed with 6 insertions and 11 deletions:
0 comments (0 inline, 0 general)
cmake/InstallAndPackage.cmake
Show inline comments
 
@@ -4,13 +4,17 @@ include(GNUInstallDirs)
 
if(OPTION_INSTALL_FHS)
 
    set(BINARY_DESTINATION_DIR "${CMAKE_INSTALL_BINDIR}")
 
    set(DATA_DESTINATION_DIR "${CMAKE_INSTALL_DATADIR}/${BINARY_NAME}")
 
    set(DOCS_DESTINATION_DIR "${CMAKE_INSTALL_DOCDIR}")
 
    set(MAN_DESTINATION_DIR "${CMAKE_INSTALL_MANDIR}")
 
else()
 
    set(BINARY_DESTINATION_DIR ".")
 
    if(APPLE)
 
        set(BINARY_DESTINATION_DIR "../MacOS")
 
    else()
 
        set(BINARY_DESTINATION_DIR ".")
 
    endif()
 
    set(DATA_DESTINATION_DIR ".")
 
    set(DOCS_DESTINATION_DIR ".")
 
    set(MAN_DESTINATION_DIR ".")
 
endif()
 

	
 
install(TARGETS openttd
cmake/PackageBundle.cmake
Show inline comments
 
string(TIMESTAMP CURRENT_YEAR "%Y")
 

	
 
set(CPACK_BUNDLE_NAME "OpenTTD")
 
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/os/macosx/openttd.icns")
 
set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
 
set(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_SOURCE_DIR}/os/macosx/launch.sh")
 
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/os/macosx/splash.png")
 
set(CPACK_DMG_FORMAT "UDBZ")
 

	
 
# Create a temporary Info.plist.in, where we will fill in the version via
 
# CPackProperties.cmake.in. This because at this point in time the version
 
# is not yet known.
 
@@ -17,10 +16,10 @@ set(CPACK_BUNDLE_PLIST_SOURCE "${CMAKE_C
 
# exists and it can do its job.
 
install(
 
    CODE
 
    "
 
        include(BundleUtilities)
 
        set(BU_CHMOD_BUNDLE_ITEMS TRUE)
 
        fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/openttd\"  \"\" \"\")
 
        fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/../MacOS/openttd\"  \"\" \"\")
 
    "
 
    DESTINATION .
 
    COMPONENT Runtime)
os/macosx/launch.sh
Show inline comments
 
deleted file
0 comments (0 inline, 0 general)