mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-26 03:55:08 +02:00
rename interface bundle for production and pr build
This commit is contained in:
parent
d491a7f0e5
commit
f87d8885f4
3 changed files with 44 additions and 9 deletions
|
@ -17,7 +17,6 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
set(DEPLOY_PACKAGE TRUE)
|
set(DEPLOY_PACKAGE TRUE)
|
||||||
set(BUILD_SEQ $ENV{JOB_ID})
|
set(BUILD_SEQ $ENV{JOB_ID})
|
||||||
set(PRODUCTION_BUILD TRUE)
|
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")
|
||||||
|
@ -25,7 +24,7 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
set(CONSOLE_ICON "console.ico")
|
set(CONSOLE_ICON "console.ico")
|
||||||
elseif (DEFINED ENV{ghprbPullId})
|
elseif (DEFINED ENV{ghprbPullId})
|
||||||
set(DEPLOY_PACKAGE TRUE)
|
set(DEPLOY_PACKAGE TRUE)
|
||||||
set(BETA_BUILD TRUE)
|
set(PR_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}")
|
||||||
|
@ -34,7 +33,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(BETA_BUILD TRUE)
|
set(DEV_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")
|
||||||
|
|
16
cmake/templates/RenameInterfaceBundle.cmake.in
Normal file
16
cmake/templates/RenameInterfaceBundle.cmake.in
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#
|
||||||
|
# RenameInterfaceBundle.cmake.in
|
||||||
|
# cmake/templates
|
||||||
|
#
|
||||||
|
# Copyright 2016 High Fidelity, Inc.
|
||||||
|
# Created by Stephen Birarda on January 5, 2016
|
||||||
|
#
|
||||||
|
# Distributed under the Apache License, Version 2.0.
|
||||||
|
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
#
|
||||||
|
|
||||||
|
set(SOURCE_BUNDLE "@CMAKE_INSTALL_PREFIX@/Applications/High Fidelity/interface.app")
|
||||||
|
set(DESTINATION_BUNDLE "@CMAKE_INSTALL_PREFIX@/Applications/High Fidelity/@INTERFACE_BUNDLE_NAME@.app")
|
||||||
|
message(STATUS "Renaming ${SOURCE_BUNDLE} to ${DESTINATION_BUNDLE}")
|
||||||
|
|
||||||
|
file(RENAME ${SOURCE_BUNDLE} ${DESTINATION_BUNDLE})
|
|
@ -64,16 +64,19 @@ set(INTERFACE_SRCS ${INTERFACE_SRCS} "${QT_UI_HEADERS}" "${QT_RESOURCES}")
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(MACOSX_BUNDLE_BUNDLE_NAME "High Fidelity")
|
set(MACOSX_BUNDLE_BUNDLE_NAME "High Fidelity")
|
||||||
|
|
||||||
# configure CMake to use a custom Info.plist and to produce a .app with the correct name
|
# configure CMake to use a custom Info.plist
|
||||||
set_target_properties(${this_target} PROPERTIES
|
set_target_properties(${this_target} PROPERTIES MACOSX_BUNDLE_INFO_PLIST MacOSXBundleInfo.plist.in)
|
||||||
MACOSX_BUNDLE_INFO_PLIST MacOSXBundleInfo.plist.in
|
|
||||||
)
|
|
||||||
|
|
||||||
if (PRODUCTION_BUILD)
|
if (PRODUCTION_BUILD)
|
||||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface)
|
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)
|
if (DEV_BUILD)
|
||||||
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface-dev)
|
||||||
|
elseif (PR_BUILD)
|
||||||
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface-pr)
|
||||||
|
endif ()
|
||||||
|
|
||||||
set(ICON_FILENAME "interface-beta.icns")
|
set(ICON_FILENAME "interface-beta.icns")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -210,8 +213,25 @@ if (APPLE)
|
||||||
install(TARGETS ${TARGET_NAME}
|
install(TARGETS ${TARGET_NAME}
|
||||||
BUNDLE DESTINATION "Applications/High Fidelity"
|
BUNDLE DESTINATION "Applications/High Fidelity"
|
||||||
COMPONENT ${CLIENT_COMPONENT}
|
COMPONENT ${CLIENT_COMPONENT}
|
||||||
RENAME ${MACOSX_BUNDLE_BUNDLE_NAME}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (PRODUCTION_BUILD OR PR_BUILD)
|
||||||
|
# for a production or PR build, setup rename of produced bundle
|
||||||
|
# for production builds it becomes "High Fidelity" and PR builds are "High Fidelity" with the PR number
|
||||||
|
if (PRODUCTION_BUILD)
|
||||||
|
set(INTERFACE_BUNDLE_NAME "High Fidelity")
|
||||||
|
elseif (PR_BUILD)
|
||||||
|
set(INTERFACE_BUNDLE_NAME "High Fidelity ${BUILD_SEQ}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
${HIFI_CMAKE_DIR}/templates/RenameInterfaceBundle.cmake.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/RenameInterfaceBundle.cmake
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(${TARGET_NAME} PROPERTIES POST_INSTALL_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/RenameInterfaceBundle.cmake")
|
||||||
|
endif ()
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue