# HG changeset patch # User Patric Stout # Date 2020-12-12 15:29:09 # Node ID 3db6bc1e31b8b9e48e0be8895f82805aad039ab0 # Parent ad662a3e31e25c159ca2eaccc7d944659aa5fe98 Fix: [bundle] custom launch.sh is no longer required for Mac OS Co-authored-by: Owen Rudge diff --git a/cmake/InstallAndPackage.cmake b/cmake/InstallAndPackage.cmake --- a/cmake/InstallAndPackage.cmake +++ b/cmake/InstallAndPackage.cmake @@ -7,7 +7,11 @@ if(OPTION_INSTALL_FHS) 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 ".") diff --git a/cmake/PackageBundle.cmake b/cmake/PackageBundle.cmake --- a/cmake/PackageBundle.cmake +++ b/cmake/PackageBundle.cmake @@ -3,7 +3,6 @@ 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") @@ -20,7 +19,7 @@ install( " include(BundleUtilities) set(BU_CHMOD_BUNDLE_ITEMS TRUE) - fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/openttd\" \"\" \"\") + fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/../MacOS/openttd\" \"\" \"\") " DESTINATION . COMPONENT Runtime) diff --git a/os/macosx/launch.sh b/os/macosx/launch.sh deleted file mode 100644 --- a/os/macosx/launch.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -ROOT_DIR=$(dirname "$0")/.. - -export DYLD_LIBRARY_PATH=${ROOT_DIR}/Frameworks - -cd ${ROOT_DIR}/Resources -exec ./openttd "$@"