From 34a7aff2efc33d78d3647341574f70b5779092c8 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Mon, 1 Oct 2018 20:12:00 -0700 Subject: [PATCH] Differentiate name of Console.app/Sandbox.app depending on client_only build --- cmake/macros/SetPackagingParameters.cmake | 7 ++++++- server-console/CMakeLists.txt | 16 ++++++++++++---- server-console/packager.js | 7 +++---- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 297382b4e5..3bf984534b 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -143,7 +143,12 @@ macro(SET_PACKAGING_PARAMETERS) set(CONSOLE_INSTALL_DIR ${DMG_SUBFOLDER_NAME}) set(INTERFACE_INSTALL_DIR ${DMG_SUBFOLDER_NAME}) - set(CONSOLE_EXEC_NAME "Sandbox.app") + if (CLIENT_ONLY) + set(CONSOLE_EXEC_NAME "Console.app") + else () + set(CONSOLE_EXEC_NAME "Sandbox.app") + endif() + set(CONSOLE_INSTALL_APP_PATH "${CONSOLE_INSTALL_DIR}/${CONSOLE_EXEC_NAME}") set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents") diff --git a/server-console/CMakeLists.txt b/server-console/CMakeLists.txt index a30027989e..150561ffbb 100644 --- a/server-console/CMakeLists.txt +++ b/server-console/CMakeLists.txt @@ -4,13 +4,17 @@ if (PRODUCTION_BUILD) set(PRODUCTION_OPTION "--production") endif() +if (CLIENT_ONLY) + set(CLIENT_ONLY_OPTION "--client_only") +endif() + # add a target that will package the console add_custom_target(${TARGET_NAME}-npm-install COMMAND npm install WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) add_custom_target(${TARGET_NAME} - COMMAND npm run packager -- --out ${CMAKE_CURRENT_BINARY_DIR} ${PRODUCTION_OPTION} + COMMAND npm run packager -- --out ${CMAKE_CURRENT_BINARY_DIR} ${PRODUCTION_OPTION} ${CLIENT_ONLY_OPTION} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${TARGET_NAME}-npm-install ) @@ -29,7 +33,11 @@ endif() # set the packaged console folder depending on platform, so we can copy it if (APPLE) - set(PACKAGED_CONSOLE_FOLDER "Sandbox-darwin-x64/${CONSOLE_EXEC_NAME}") + if (CLIENT_ONLY) + set(PACKAGED_CONSOLE_FOLDER "Console-darwin-x64/${CONSOLE_EXEC_NAME}") + else () + set(PACKAGED_CONSOLE_FOLDER "Sandbox-darwin-x64/${CONSOLE_EXEC_NAME}") + endif() elseif (WIN32) set(PACKAGED_CONSOLE_FOLDER "server-console-win32-x64") elseif (UNIX) @@ -45,9 +53,9 @@ if (APPLE) COMPONENT ${SERVER_COMPONENT} ) install( - DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${PACKAGED_CONSOLE_FOLDER}" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${PACKAGED_CONSOLE_FOLDER}/" USE_SOURCE_PERMISSIONS - DESTINATION ${CONSOLE_INSTALL_DIR} + DESTINATION ${CONSOLE_INSTALL_DIR}/${CONSOLE_EXEC_NAME} COMPONENT ${CLIENT_COMPONENT} ) elseif (WIN32) diff --git a/server-console/packager.js b/server-console/packager.js index 31655fe565..00866ee1be 100644 --- a/server-console/packager.js +++ b/server-console/packager.js @@ -27,14 +27,13 @@ var options = { } const EXEC_NAME = "server-console"; -const SHORT_NAME = "Console"; -const OSX_SHORT_NAME = "Sandbox"; -const FULL_NAME = "High Fidelity Console"; +var SHORT_NAME = argv.client_only ? "Console" : "Sandbox"; +var FULL_NAME = argv.client_only ? "High Fidelity Console" : "High Fidelity Sandbox"; // setup per OS options if (osType == "Darwin") { options["app-bundle-id"] = "com.highfidelity.server-console" + (argv.production ? "" : "-dev") - options["name"] = OSX_SHORT_NAME + options["name"] = SHORT_NAME } else if (osType == "Windows_NT") { options["version-string"] = { CompanyName: "High Fidelity, Inc.",