diff --git a/CMakeLists.txt b/CMakeLists.txt index 73626323dd..83ab275d28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,10 +213,6 @@ endif() set_packaging_parameters() -# setup component categories for installer -set(CLIENT_COMPONENT client) -set(SERVER_COMPONENT server) - # add subdirectories for all targets if (NOT ANDROID) add_subdirectory(assignment-client) diff --git a/cmake/macros/FixupInterface.cmake b/cmake/macros/FixupInterface.cmake index d3873a55f5..1e2e6cc081 100644 --- a/cmake/macros/FixupInterface.cmake +++ b/cmake/macros/FixupInterface.cmake @@ -12,13 +12,16 @@ macro(fixup_interface) if (APPLE) - string(REPLACE " " "\\" ESCAPED_BUNDLE_NAME ${_INTERFACE_BUNDLE_NAME}) - set(INTERFACE_INSTALL_PATH "Applications/High\\ Fidelity/${ESCAPED_BUNDLE_NAME}.app") + string(REPLACE " " "\\ " ESCAPED_BUNDLE_NAME ${INTERFACE_BUNDLE_NAME}) + string(REPLACE " " "\\ " ESCAPED_INSTALL_PATH ${INTERFACE_INSTALL_DIR}) + set(_INTERFACE_INSTALL_PATH "${ESCAPED_INSTALL_PATH}/${ESCAPED_BUNDLE_NAME}.app") + + message(${_INTERFACE_INSTALL_PATH}) # install QtWebProcess from Qt to the application bundle # since it is missed by macdeployqt # https://bugreports.qt.io/browse/QTBUG-35211 - set(LIBEXEC_PATH "${INTERFACE_INSTALL_PATH}/Contents/libexec") + set(LIBEXEC_PATH "${_INTERFACE_INSTALL_PATH}/Contents/libexec") install( PROGRAMS "${QT_DIR}/libexec/QtWebProcess" DESTINATION ${LIBEXEC_PATH} @@ -46,9 +49,9 @@ macro(fixup_interface) install(CODE " execute_process(COMMAND ${MACDEPLOYQT_COMMAND}\ - \${CMAKE_INSTALL_PREFIX}/${INTERFACE_INSTALL_PATH}/\ + \${CMAKE_INSTALL_PREFIX}/${_INTERFACE_INSTALL_PATH}/\ -verbose=2 -qmldir=${CMAKE_SOURCE_DIR}/interface/resources/qml/\ - -executable=\${CMAKE_INSTALL_PREFIX}/${INTERFACE_INSTALL_PATH}/Contents/libexec/QtWebProcess\ + -executable=\${CMAKE_INSTALL_PREFIX}/${_INTERFACE_INSTALL_PATH}/Contents/libexec/QtWebProcess\ )" COMPONENT ${CLIENT_COMPONENT} ) diff --git a/cmake/macros/GenerateInstallers.cmake b/cmake/macros/GenerateInstallers.cmake index 3645f1bc7f..cbe95f15f9 100644 --- a/cmake/macros/GenerateInstallers.cmake +++ b/cmake/macros/GenerateInstallers.cmake @@ -20,10 +20,39 @@ macro(GENERATE_INSTALLERS) set(CPACK_PACKAGING_INSTALL_PREFIX /) endif () - cpack_add_component(${CLIENT_COMPONENT} - DISPLAY_NAME "High Fidelity Client" + # setup downloads + cpack_configure_downloads( + http://hifi-production.s3.amazonaws.com/optionals/ + ADD_REMOVE ) + set(CLIENT_GROUP client) + + # add a component group for the client + cpack_add_component_group( + ${CLIENT_GROUP} + DISPLAY_NAME "Client" + EXPANDED + ) + + cpack_add_component( + ${CLIENT_COMPONENT} + DISPLAY_NAME "High Fidelity Client" + GROUP ${CLIENT_GROUP} + ) + + if (DDE_APP_PATH) + # add a download component for DDE + cpack_add_component( + ${DDE_COMPONENT} + DISPLAY_NAME "Webcam Body Movement" + DEPENDS ${CLIENT_COMPONENT} + GROUP ${CLIENT_GROUP} + DOWNLOADED + ARCHIVE_FILE "DDE" + ) + endif () + cpack_add_component(${SERVER_COMPONENT} DISPLAY_NAME "High Fidelity Server" ) diff --git a/cmake/macros/InstallBesideConsole.cmake b/cmake/macros/InstallBesideConsole.cmake index f23b037221..54d3272c7a 100644 --- a/cmake/macros/InstallBesideConsole.cmake +++ b/cmake/macros/InstallBesideConsole.cmake @@ -15,7 +15,7 @@ macro(install_beside_console) set(SHELL_APP_CONTENTS "Components.app/Contents") set(COMPONENT_DESTINATION "${SHELL_APP_CONTENTS}/MacOS") else () - set(COMPONENT_DESTINATION ${CONSOLE_INSTALL_PATH}) + set(COMPONENT_DESTINATION ${CONSOLE_INSTALL_DIR}) endif () install( @@ -26,9 +26,9 @@ macro(install_beside_console) if (TARGET_NAME STREQUAL domain-server) if (APPLE) - set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_PATH}/Contents/MacOS) + set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_APP_PATH}/Contents/MacOS) else () - set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_PATH}) + set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_DIR}) endif () # install the resources folder for the domain-server where its executable will be @@ -49,7 +49,7 @@ macro(install_beside_console) # once installed copy the contents of the shell Components.app to the console application - set(INSTALLED_CONSOLE_CONTENTS "\${CMAKE_INSTALL_PREFIX}/${CONSOLE_INSTALL_PATH}/Contents") + set(INSTALLED_CONSOLE_CONTENTS "\${CMAKE_INSTALL_PREFIX}/${CONSOLE_INSTALL_APP_PATH}/Contents") set(INSTALLED_SHELL_CONTENTS "\${CMAKE_INSTALL_PREFIX}/${SHELL_APP_CONTENTS}") install(CODE " diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index f68a69e688..a5c65b1dc5 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -12,13 +12,6 @@ # and decides how targets should be packaged. macro(SET_PACKAGING_PARAMETERS) - - if (APPLE) - set(CONSOLE_INSTALL_PATH "Applications/High Fidelity/Server Console.app") - else () - set(CONSOLE_INSTALL_PATH ".") - endif() - if (DEFINED ENV{JOB_ID}) set(DEPLOY_PACKAGE TRUE) set(BUILD_SEQ $ENV{JOB_ID}) @@ -26,6 +19,7 @@ macro(SET_PACKAGING_PARAMETERS) set(INSTALLER_COMPANY "High Fidelity") set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}") set(INSTALLER_NAME "interface-win64-${BUILD_SEQ}.exe") + set(INTERFACE_BUNDLE_NAME "High Fidelity") set(INTERFACE_ICON "interface.ico") set(CONSOLE_ICON "console.ico") elseif (DEFINED ENV{ghprbPullId}) @@ -35,6 +29,7 @@ macro(SET_PACKAGING_PARAMETERS) set(INSTALLER_COMPANY "High Fidelity - PR") set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}\\${BUILD_SEQ}") set(INSTALLER_NAME "pr-interface-win64-${BUILD_SEQ}.exe") + set(INTERFACE_BUNDLE_NAME "High Fidelity ${BUILD_SEQ}") set(INTERFACE_ICON "interface-beta.ico") set(CONSOLE_ICON "console-beta.ico") else () @@ -43,10 +38,28 @@ macro(SET_PACKAGING_PARAMETERS) set(INSTALLER_COMPANY "High Fidelity - Dev") set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}") set(INSTALLER_NAME "dev-interface-win64.exe") + set(INTERFACE_BUNDLE_NAME "Interface") set(INTERFACE_ICON "interface-beta.ico") set(CONSOLE_ICON "console-beta.ico") endif () + if (APPLE) + set(CONSOLE_INSTALL_DIR "Applications/High Fidelity") + set(CONSOLE_APPLICATION_NAME "Server Console.app") + set(CONSOLE_INSTALL_APP_PATH "${CONSOLE_INSTALL_DIR}/${CONSOLE_APPLICATION_NAME}") + + set(INTERFACE_INSTALL_DIR "Applications/High Fidelity") + set(INTERFACE_INSTALL_APP_PATH "${INTERFACE_INSTALL_DIR}/${INTERFACE_BUNDLE_NAME}.app") + else () + set(CONSOLE_INSTALL_DIR ".") + set(INTERFACE_INSTALL_DIR ".") + endif() + + # setup component categories for installer + set(DDE_COMPONENT dde) + set(CLIENT_COMPONENT client) + set(SERVER_COMPONENT server) + # create a header file our targets can use to find out the application version file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/includes") configure_file("${MACRO_DIR}/ApplicationVersion.h.in" "${CMAKE_BINARY_DIR}/includes/ApplicationVersion.h") diff --git a/cmake/macros/SetupHifiPlugin.cmake b/cmake/macros/SetupHifiPlugin.cmake index 2f31ee5d4e..e9c8688590 100644 --- a/cmake/macros/SetupHifiPlugin.cmake +++ b/cmake/macros/SetupHifiPlugin.cmake @@ -12,8 +12,7 @@ macro(SETUP_HIFI_PLUGIN) set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Plugins") if (APPLE) - get_property(_INTERFACE_BUNDLE_NAME GLOBAL PROPERTY INTERFACE_BUNDLE_NAME) - set(PLUGIN_PATH "${_INTERFACE_BUNDLE_NAME}.app/Contents/PlugIns") + set(PLUGIN_PATH "${INTERFACE_BUNDLE_NAME}.app/Contents/PlugIns") else() set(PLUGIN_PATH "plugins") endif() diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index e3dd4529d3..fdae3da232 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -101,19 +101,8 @@ endif() if (APPLE) add_executable(${TARGET_NAME} MACOSX_BUNDLE ${INTERFACE_SRCS} ${QM}) - # change the target name to the right thing depending on the type of build this is - # set a global INTERFACE_BUNDLE_NAME property so that we can have plugins copied to the right place - if (PRODUCTION_BUILD) - set(_INTERFACE_BUNDLE_NAME "High Fidelity") - elseif (PR_BUILD) - set(_INTERFACE_BUNDLE_NAME "High Fidelity ${BUILD_SEQ}") - elseif (DEV_BUILD) - set(_INTERFACE_BUNDLE_NAME "Interface") - endif() - - set_property(GLOBAL PROPERTY INTERFACE_BUNDLE_NAME ${_INTERFACE_BUNDLE_NAME}) - - set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${_INTERFACE_BUNDLE_NAME}) + # make sure the output name for the .app bundle is correct + set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${INTERFACE_BUNDLE_NAME}) elseif(WIN32) add_executable(${TARGET_NAME} WIN32 ${INTERFACE_SRCS} ${QM}) else() @@ -221,7 +210,7 @@ if (APPLE) # setup install of OS X interface bundle install(TARGETS ${TARGET_NAME} - BUNDLE DESTINATION "Applications/High Fidelity" + BUNDLE DESTINATION ${INTERFACE_INSTALL_DIR} COMPONENT ${CLIENT_COMPONENT} ) @@ -248,6 +237,16 @@ endif (APPLE) # call the fixup_interface macro to add required bundling commands for installation fixup_interface() +# if present, add an install of the DDE components +# which will be presented as an option during install +if (APPLE AND DDE_APP_PATH) + install( + PROGRAMS ${DDE_APP_PATH} + DESTINATION ${INTERFACE_INSTALL_PATH}/Contents/MacOS + COMPONENT ${DDE_COMPONENT} + ) +endif () + if (WIN32) set(EXTRA_DEPLOY_OPTIONS "--qmldir ${PROJECT_SOURCE_DIR}/resources/qml") endif()