mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 10:28:57 +02:00
work around OS X package installer relocation
This commit is contained in:
parent
386d3a950f
commit
d491a7f0e5
4 changed files with 32 additions and 21 deletions
|
@ -12,14 +12,12 @@
|
|||
macro(GENERATE_INSTALLERS)
|
||||
include(CPackComponent)
|
||||
|
||||
set(CPACK_PACKAGE_NAME "High Fidelity")
|
||||
set(CPACK_PACKAGE_VENDOR "High Fidelity, Inc.")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "High Fidelity")
|
||||
set(CPACK_PACKAGE_NAME "HighFidelity")
|
||||
set(CPACK_PACKAGE_VENDOR "HighFidelity")
|
||||
|
||||
if (APPLE)
|
||||
install(TARGETS ${CLIENT_TARGET} BUNDLE DESTINATION bin COMPONENT ${APP_COMPONENT})
|
||||
else ()
|
||||
install(TARGETS ${CLIENT_TARGET} RUNTIME DESTINATION bin COMPONENT ${APP_COMPONENT})
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "/")
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX /)
|
||||
endif ()
|
||||
|
||||
cpack_add_component(${CLIENT_COMPONENT}
|
||||
|
@ -30,6 +28,11 @@ macro(GENERATE_INSTALLERS)
|
|||
DISPLAY_NAME "High Fidelity Server"
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
# we don't want the OS X package to install anywhere but the main volume, so disable relocation
|
||||
set(CPACK_PACKAGE_RELOCATABLE FALSE)
|
||||
endif ()
|
||||
|
||||
include(CPack)
|
||||
|
||||
# if (DEPLOY_PACKAGE AND WIN32)
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
macro(install_beside_console)
|
||||
# install this component beside the installed server-console executable
|
||||
if (APPLE)
|
||||
set(COMPONENT_DESTINATION "bin/Server Console.app/Contents/MacOS/")
|
||||
set(COMPONENT_DESTINATION "Applications/High Fidelity/Server Console.app/Contents/MacOS/")
|
||||
else ()
|
||||
set(COMPONENT_DESTINATION bin)
|
||||
set(COMPONENT_DESTINATION .)
|
||||
endif ()
|
||||
|
||||
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION ${COMPONENT_DESTINATION} COMPONENT ${SERVER_COMPONENT})
|
||||
|
|
|
@ -14,17 +14,18 @@
|
|||
macro(SET_PACKAGING_PARAMETERS)
|
||||
|
||||
if (DEFINED ENV{JOB_ID})
|
||||
set(DEPLOY_PACKAGE 1)
|
||||
set(DEPLOY_PACKAGE TRUE)
|
||||
set(BUILD_SEQ $ENV{JOB_ID})
|
||||
set(BUILD_TAGGED_BETA FALSE)
|
||||
set(PRODUCTION_BUILD TRUE)
|
||||
set(BETA_BUILD FALSE)
|
||||
set(INSTALLER_COMPANY "High Fidelity")
|
||||
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}")
|
||||
set(INSTALLER_NAME "interface-win64-${BUILD_SEQ}.exe")
|
||||
set(INTERFACE_ICON "interface.ico")
|
||||
set(CONSOLE_ICON "console.ico")
|
||||
elseif (DEFINED ENV{ghprbPullId})
|
||||
set(DEPLOY_PACKAGE 1)
|
||||
set(BUILD_TAGGED_BETA TRUE)
|
||||
set(DEPLOY_PACKAGE TRUE)
|
||||
set(BETA_BUILD TRUE)
|
||||
set(BUILD_SEQ "PR-$ENV{ghprbPullId}")
|
||||
set(INSTALLER_COMPANY "High Fidelity - PR")
|
||||
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}\\${BUILD_SEQ}")
|
||||
|
@ -33,7 +34,7 @@ macro(SET_PACKAGING_PARAMETERS)
|
|||
set(CONSOLE_ICON "console-beta.ico")
|
||||
else ()
|
||||
set(BUILD_SEQ "dev")
|
||||
set(BUILD_TAGGED_BETA TRUE)
|
||||
set(BETA_BUILD TRUE)
|
||||
set(INSTALLER_COMPANY "High Fidelity - Dev")
|
||||
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}")
|
||||
set(INSTALLER_NAME "dev-interface-win64.exe")
|
||||
|
|
|
@ -62,15 +62,18 @@ set(INTERFACE_SRCS ${INTERFACE_SRCS} "${QT_UI_HEADERS}" "${QT_RESOURCES}")
|
|||
# qt5_create_translation_custom(${QM} ${INTERFACE_SRCS} ${QT_UI_FILES} ${TS})
|
||||
|
||||
if (APPLE)
|
||||
# configure CMake to use a custom Info.plist
|
||||
SET_TARGET_PROPERTIES( ${this_target} PROPERTIES MACOSX_BUNDLE_INFO_PLIST MacOSXBundleInfo.plist.in )
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME "High Fidelity")
|
||||
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME Interface)
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER io.highfidelity.Interface)
|
||||
# configure CMake to use a custom Info.plist and to produce a .app with the correct name
|
||||
set_target_properties(${this_target} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST MacOSXBundleInfo.plist.in
|
||||
)
|
||||
|
||||
if (UPPER_CMAKE_BUILD_TYPE MATCHES RELEASE OR UPPER_CMAKE_BUILD_TYPE MATCHES RELWITHDEBINFO)
|
||||
if (PRODUCTION_BUILD)
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface)
|
||||
set(ICON_FILENAME "interface.icns")
|
||||
else ()
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface-dev)
|
||||
set(ICON_FILENAME "interface-beta.icns")
|
||||
endif ()
|
||||
|
||||
|
@ -190,7 +193,7 @@ target_link_libraries(
|
|||
# Issue causes build failure unless we add this directory.
|
||||
# See https://bugreports.qt.io/browse/QTBUG-43351
|
||||
if (WIN32)
|
||||
add_paths_to_fixup_libs(${Qt5_DIR}/../../../plugins/qtwebengine)
|
||||
add_paths_to_fixup_libs(${Qt5_DIR}/../../../plugins/qtwebengine)
|
||||
endif()
|
||||
|
||||
# assume we are using a Qt build without bearer management
|
||||
|
@ -204,7 +207,11 @@ if (APPLE)
|
|||
target_link_libraries(${TARGET_NAME} ${OpenGL} ${AppKit})
|
||||
|
||||
# setup install of OS X interface bundle
|
||||
install(TARGETS ${TARGET_NAME} BUNDLE DESTINATION bin COMPONENT ${CLIENT_COMPONENT})
|
||||
install(TARGETS ${TARGET_NAME}
|
||||
BUNDLE DESTINATION "Applications/High Fidelity"
|
||||
COMPONENT ${CLIENT_COMPONENT}
|
||||
RENAME ${MACOSX_BUNDLE_BUNDLE_NAME}
|
||||
)
|
||||
else (APPLE)
|
||||
# copy the resources files beside the executable
|
||||
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
|
||||
|
@ -217,7 +224,7 @@ else (APPLE)
|
|||
)
|
||||
|
||||
# setup install of interface target
|
||||
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin COMPONENT ${CLIENT_COMPONENT})
|
||||
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION . COMPONENT ${CLIENT_COMPONENT})
|
||||
|
||||
# link target to external libraries
|
||||
if (WIN32)
|
||||
|
|
Loading…
Reference in a new issue