Merge pull request #295 from Scrumplex/fix-portable

Make Launcher_PORTABLE work on all platforms
This commit is contained in:
Sefa Eyeoglu 2022-03-19 15:59:38 +01:00 committed by GitHub
commit 06d16c6b13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,6 +152,10 @@ add_subdirectory(program_info)
# Install the build results according to platform
set(Launcher_PORTABLE 1 CACHE BOOL "The type of installation (Portable or System)")
if (Launcher_PORTABLE)
# launcher/Application.cpp will use this value
set(Launcher_APP_BINARY_DEFS "-DLAUNCHER_PORTABLE")
endif()
if(UNIX AND APPLE)
set(BINARY_DEST_DIR "${Launcher_Name}.app/Contents/MacOS")
@ -191,9 +195,6 @@ elseif(UNIX)
set(BUNDLE_DEST_DIR ".")
set(JARS_DEST_DIR "bin/jars")
# launcher/Application.cpp will use this value
set(Launcher_APP_BINARY_DEFS "-DLAUNCHER_PORTABLE")
# Install basic runner script
configure_file(launcher/Launcher.in "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" @ONLY)
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" DESTINATION ${BUNDLE_DEST_DIR} RENAME ${Launcher_Name})