mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:08:00 +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)
|
macro(GENERATE_INSTALLERS)
|
||||||
include(CPackComponent)
|
include(CPackComponent)
|
||||||
|
|
||||||
set(CPACK_PACKAGE_NAME "High Fidelity")
|
set(CPACK_PACKAGE_NAME "HighFidelity")
|
||||||
set(CPACK_PACKAGE_VENDOR "High Fidelity, Inc.")
|
set(CPACK_PACKAGE_VENDOR "HighFidelity")
|
||||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "High Fidelity")
|
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
install(TARGETS ${CLIENT_TARGET} BUNDLE DESTINATION bin COMPONENT ${APP_COMPONENT})
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "/")
|
||||||
else ()
|
set(CPACK_PACKAGING_INSTALL_PREFIX /)
|
||||||
install(TARGETS ${CLIENT_TARGET} RUNTIME DESTINATION bin COMPONENT ${APP_COMPONENT})
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
cpack_add_component(${CLIENT_COMPONENT}
|
cpack_add_component(${CLIENT_COMPONENT}
|
||||||
|
@ -30,6 +28,11 @@ macro(GENERATE_INSTALLERS)
|
||||||
DISPLAY_NAME "High Fidelity Server"
|
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)
|
include(CPack)
|
||||||
|
|
||||||
# if (DEPLOY_PACKAGE AND WIN32)
|
# if (DEPLOY_PACKAGE AND WIN32)
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
macro(install_beside_console)
|
macro(install_beside_console)
|
||||||
# install this component beside the installed server-console executable
|
# install this component beside the installed server-console executable
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(COMPONENT_DESTINATION "bin/Server Console.app/Contents/MacOS/")
|
set(COMPONENT_DESTINATION "Applications/High Fidelity/Server Console.app/Contents/MacOS/")
|
||||||
else ()
|
else ()
|
||||||
set(COMPONENT_DESTINATION bin)
|
set(COMPONENT_DESTINATION .)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION ${COMPONENT_DESTINATION} COMPONENT ${SERVER_COMPONENT})
|
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION ${COMPONENT_DESTINATION} COMPONENT ${SERVER_COMPONENT})
|
||||||
|
|
|
@ -14,17 +14,18 @@
|
||||||
macro(SET_PACKAGING_PARAMETERS)
|
macro(SET_PACKAGING_PARAMETERS)
|
||||||
|
|
||||||
if (DEFINED ENV{JOB_ID})
|
if (DEFINED ENV{JOB_ID})
|
||||||
set(DEPLOY_PACKAGE 1)
|
set(DEPLOY_PACKAGE TRUE)
|
||||||
set(BUILD_SEQ $ENV{JOB_ID})
|
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_COMPANY "High Fidelity")
|
||||||
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}")
|
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}")
|
||||||
set(INSTALLER_NAME "interface-win64-${BUILD_SEQ}.exe")
|
set(INSTALLER_NAME "interface-win64-${BUILD_SEQ}.exe")
|
||||||
set(INTERFACE_ICON "interface.ico")
|
set(INTERFACE_ICON "interface.ico")
|
||||||
set(CONSOLE_ICON "console.ico")
|
set(CONSOLE_ICON "console.ico")
|
||||||
elseif (DEFINED ENV{ghprbPullId})
|
elseif (DEFINED ENV{ghprbPullId})
|
||||||
set(DEPLOY_PACKAGE 1)
|
set(DEPLOY_PACKAGE TRUE)
|
||||||
set(BUILD_TAGGED_BETA TRUE)
|
set(BETA_BUILD TRUE)
|
||||||
set(BUILD_SEQ "PR-$ENV{ghprbPullId}")
|
set(BUILD_SEQ "PR-$ENV{ghprbPullId}")
|
||||||
set(INSTALLER_COMPANY "High Fidelity - PR")
|
set(INSTALLER_COMPANY "High Fidelity - PR")
|
||||||
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}\\${BUILD_SEQ}")
|
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}\\${BUILD_SEQ}")
|
||||||
|
@ -33,7 +34,7 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
set(CONSOLE_ICON "console-beta.ico")
|
set(CONSOLE_ICON "console-beta.ico")
|
||||||
else ()
|
else ()
|
||||||
set(BUILD_SEQ "dev")
|
set(BUILD_SEQ "dev")
|
||||||
set(BUILD_TAGGED_BETA TRUE)
|
set(BETA_BUILD TRUE)
|
||||||
set(INSTALLER_COMPANY "High Fidelity - Dev")
|
set(INSTALLER_COMPANY "High Fidelity - Dev")
|
||||||
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}")
|
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}")
|
||||||
set(INSTALLER_NAME "dev-interface-win64.exe")
|
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})
|
# qt5_create_translation_custom(${QM} ${INTERFACE_SRCS} ${QT_UI_FILES} ${TS})
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
# configure CMake to use a custom Info.plist
|
set(MACOSX_BUNDLE_BUNDLE_NAME "High Fidelity")
|
||||||
SET_TARGET_PROPERTIES( ${this_target} PROPERTIES MACOSX_BUNDLE_INFO_PLIST MacOSXBundleInfo.plist.in )
|
|
||||||
|
|
||||||
set(MACOSX_BUNDLE_BUNDLE_NAME Interface)
|
# configure CMake to use a custom Info.plist and to produce a .app with the correct name
|
||||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER io.highfidelity.Interface)
|
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")
|
set(ICON_FILENAME "interface.icns")
|
||||||
else ()
|
else ()
|
||||||
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface-dev)
|
||||||
set(ICON_FILENAME "interface-beta.icns")
|
set(ICON_FILENAME "interface-beta.icns")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -190,7 +193,7 @@ target_link_libraries(
|
||||||
# Issue causes build failure unless we add this directory.
|
# Issue causes build failure unless we add this directory.
|
||||||
# See https://bugreports.qt.io/browse/QTBUG-43351
|
# See https://bugreports.qt.io/browse/QTBUG-43351
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
add_paths_to_fixup_libs(${Qt5_DIR}/../../../plugins/qtwebengine)
|
add_paths_to_fixup_libs(${Qt5_DIR}/../../../plugins/qtwebengine)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# assume we are using a Qt build without bearer management
|
# assume we are using a Qt build without bearer management
|
||||||
|
@ -204,7 +207,11 @@ if (APPLE)
|
||||||
target_link_libraries(${TARGET_NAME} ${OpenGL} ${AppKit})
|
target_link_libraries(${TARGET_NAME} ${OpenGL} ${AppKit})
|
||||||
|
|
||||||
# setup install of OS X interface bundle
|
# 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)
|
else (APPLE)
|
||||||
# copy the resources files beside the executable
|
# copy the resources files beside the executable
|
||||||
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
|
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
|
||||||
|
@ -217,7 +224,7 @@ else (APPLE)
|
||||||
)
|
)
|
||||||
|
|
||||||
# setup install of interface target
|
# 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
|
# link target to external libraries
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
|
Loading…
Reference in a new issue