Merge branch 'sysTraySetup' of https://github.com/roxanneskelly/hifi into sysTraySetup

This commit is contained in:
Roxanne Skelly 2018-10-02 10:02:40 -07:00
commit 35f662d767
3 changed files with 21 additions and 9 deletions

View file

@ -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")

View file

@ -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)

View file

@ -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.",