Merge pull request #7515 from birarda/console-to-sandbox

rename the Server Console to Sandbox
This commit is contained in:
Clément Brisset 2016-03-30 17:29:15 -07:00
commit be07426d5a
11 changed files with 63 additions and 190 deletions

View file

@ -85,8 +85,8 @@ macro(GENERATE_INSTALLERS)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
cpack_add_component(${CLIENT_COMPONENT} DISPLAY_NAME "High Fidelity Client")
cpack_add_component(${SERVER_COMPONENT} DISPLAY_NAME "High Fidelity Server")
cpack_add_component(${CLIENT_COMPONENT} DISPLAY_NAME "High Fidelity Interface")
cpack_add_component(${SERVER_COMPONENT} DISPLAY_NAME "High Fidelity Sandbox")
include(CPack)
endmacro()

View file

@ -53,7 +53,7 @@ macro(SET_PACKAGING_PARAMETERS)
set(CONSOLE_INSTALL_DIR ${DMG_SUBFOLDER_NAME})
set(INTERFACE_INSTALL_DIR ${DMG_SUBFOLDER_NAME})
set(CONSOLE_EXEC_NAME "Server Console.app")
set(CONSOLE_EXEC_NAME "Sandbox.app")
set(CONSOLE_INSTALL_APP_PATH "${CONSOLE_INSTALL_DIR}/${CONSOLE_EXEC_NAME}")
set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents")
@ -84,12 +84,19 @@ macro(SET_PACKAGING_PARAMETERS)
# shortcut names
if (PRODUCTION_BUILD)
set(INTERFACE_SHORTCUT_NAME "High Fidelity")
set(CONSOLE_SHORTCUT_NAME "Server Console")
set(INTERFACE_SHORTCUT_NAME "Interface")
set(CONSOLE_SHORTCUT_NAME "Sandbox")
else ()
set(INTERFACE_SHORTCUT_NAME "High Fidelity - ${BUILD_VERSION}")
set(CONSOLE_SHORTCUT_NAME "Server Console - ${BUILD_VERSION}")
set(INTERFACE_SHORTCUT_NAME "Interface - ${BUILD_VERSION}")
set(CONSOLE_SHORTCUT_NAME "Sandbox - ${BUILD_VERSION}")
endif ()
set(INTERFACE_HF_SHORTCUT_NAME "High Fidelity ${INTERFACE_SHORTCUT_NAME}")
set(CONSOLE_HF_SHORTCUT_NAME "High Fidelity ${CONSOLE_SHORTCUT_NAME}")
set(PRE_SANDBOX_INTERFACE_SHORTCUT_NAME "High Fidelity")
set(PRE_SANDBOX_CONSOLE_SHORTCUT_NAME "Server Console")
# check if we need to find signtool
if (PRODUCTION_BUILD OR PR_BUILD)
find_program(SIGNTOOL_EXECUTABLE signtool PATHS "C:/Program Files (x86)/Windows Kits/8.1" PATH_SUFFIXES "bin/x64")

View file

@ -10,10 +10,14 @@
#
set(INTERFACE_SHORTCUT_NAME "@INTERFACE_SHORTCUT_NAME@")
set(INTERFACE_HF_SHORTCUT_NAME "@INTERFACE_HF_SHORTCUT_NAME@")
set(INTERFACE_WIN_EXEC_NAME "@INTERFACE_EXEC_PREFIX@.exe")
set(CONSOLE_INSTALL_SUBDIR "@CONSOLE_INSTALL_DIR@")
set(CONSOLE_SHORTCUT_NAME "@CONSOLE_SHORTCUT_NAME@")
set(CONSOLE_HF_SHORTCUT_NAME "@CONSOLE_HF_SHORTCUT_NAME@")
set(CONSOLE_WIN_EXEC_NAME "@CONSOLE_EXEC_NAME@")
set(PRE_SANDBOX_INTERFACE_SHORTCUT_NAME "@PRE_SANDBOX_INTERFACE_SHORTCUT_NAME@")
set(PRE_SANDBOX_CONSOLE_SHORTCUT_NAME "@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@")
set(DS_EXEC_NAME "@DS_EXEC_NAME@")
set(AC_EXEC_NAME "@AC_EXEC_NAME@")
set(HIGH_FIDELITY_PROTOCOL "@HIGH_FIDELITY_PROTOCOL@")

View file

@ -387,7 +387,7 @@ Function PostInstallOptionsPage
StrCpy $OffsetUnits u
${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Create a desktop shortcut for @INTERFACE_SHORTCUT_NAME@"
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Create a desktop shortcut for @INTERFACE_HF_SHORTCUT_NAME@"
Pop $DesktopClientCheckbox
IntOp $CurrentOffset $CurrentOffset + 15
@ -396,7 +396,7 @@ Function PostInstallOptionsPage
${EndIf}
${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@}
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Create a desktop shortcut for High Fidelity @CONSOLE_SHORTCUT_NAME@"
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Create a desktop shortcut for @CONSOLE_HF_SHORTCUT_NAME@"
Pop $DesktopServerCheckbox
; set the checkbox state depending on what is present in the registry
@ -404,7 +404,7 @@ Function PostInstallOptionsPage
IntOp $CurrentOffset $CurrentOffset + 15
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch High Fidelity @CONSOLE_SHORTCUT_NAME@ on startup"
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @CONSOLE_HF_SHORTCUT_NAME@ on startup"
Pop $ServerStartupCheckbox
; set the checkbox state depending on what is present in the registry
@ -414,9 +414,9 @@ Function PostInstallOptionsPage
${EndIf}
${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@}
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch High Fidelity Server Console after install"
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @CONSOLE_HF_SHORTCUT_NAME@ after install"
${Else}
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch High Fidelity after install"
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @INTERFACE_HF_SHORTCUT_NAME@ after install"
${EndIf}
Pop $LaunchNowCheckbox
@ -465,10 +465,10 @@ Function ReadPostInstallOptions
${EndIf}
${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@}
; check if the user asked for a desktop shortcut to Server Console
; check if the user asked for a desktop shortcut to Sandbox
${NSD_GetState} $DesktopServerCheckbox $DesktopServerState
; check if the user asked to have Server Console launched every startup
; check if the user asked to have Sandbox launched every startup
${NSD_GetState} $ServerStartupCheckbox $ServerStartupState
${EndIf}
@ -485,7 +485,7 @@ Function HandlePostInstallOptions
${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
; check if the user asked for a desktop shortcut to High Fidelity
${If} $DesktopClientState == ${BST_CHECKED}
CreateShortCut "$DESKTOP\@INTERFACE_SHORTCUT_NAME@.lnk" "$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"
CreateShortCut "$DESKTOP\@INTERFACE_HF_SHORTCUT_NAME@.lnk" "$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"
!insertmacro WritePostInstallOption "@CLIENT_DESKTOP_SHORTCUT_REG_KEY@" YES
${Else}
!insertmacro WritePostInstallOption @CLIENT_DESKTOP_SHORTCUT_REG_KEY@ NO
@ -494,23 +494,23 @@ Function HandlePostInstallOptions
${EndIf}
${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@}
; check if the user asked for a desktop shortcut to Server Console
; check if the user asked for a desktop shortcut to Sandbox
${If} $DesktopServerState == ${BST_CHECKED}
CreateShortCut "$DESKTOP\@CONSOLE_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
CreateShortCut "$DESKTOP\@CONSOLE_HF_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
!insertmacro WritePostInstallOption @CONSOLE_DESKTOP_SHORTCUT_REG_KEY@ YES
${Else}
!insertmacro WritePostInstallOption @CONSOLE_DESKTOP_SHORTCUT_REG_KEY@ NO
${EndIf}
; check if the user asked to have Server Console launched every startup
; check if the user asked to have Sandbox launched every startup
${If} $ServerStartupState == ${BST_CHECKED}
; in case we added a shortcut in the global context, pull that now
SetShellVarContext all
Delete "$SMSTARTUP\@CONSOLE_SHORTCUT_NAME@.lnk"
Delete "$SMSTARTUP\@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@.lnk"
; make a startup shortcut in this user's current context
SetShellVarContext current
CreateShortCut "$SMSTARTUP\@CONSOLE_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
CreateShortCut "$SMSTARTUP\@CONSOLE_HF_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
; reset the shell var context back
SetShellVarContext all
@ -589,6 +589,19 @@ Section "-Core installation"
Delete "$INSTDIR\version"
Delete "$INSTDIR\xinput1_3.dll"
; Delete old desktop shortcuts before they were renamed during Sandbox rename
Delete "$DESKTOP\@PRE_SANDBOX_INTERFACE_SHORTCUT_NAME@.lnk"
Delete "$DESKTOP\@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@.lnk"
; Delete old Start Menu shortcuts before Sandbox rename
Delete "$SMPROGRAMS\$STARTMENU_FOLDER\@PRE_SANDBOX_INTERFACE_SHORTCUT_NAME@.lnk"
Delete "$SMPROGRAMS\$STARTMENU_FOLDER\@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@.lnk"
; Delete old startup item for Server Console before Sandbox rename
SetShellVarContext current
Delete "$SMSTARTUP\@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@.lnk"
SetShellVarContext all
; Rename the incorrectly cased Raleway font
Rename "$INSTDIR\resources\qml\styles-uit\RalewaySemibold.qml" "$INSTDIR\resources\qml\styles-uit\RalewaySemiBold.qml"
@ -724,8 +737,8 @@ SectionEnd
!macroend
!macro CheckForRunningApplications action prompter
!insertmacro PromptForRunningApplication "@INTERFACE_WIN_EXEC_NAME@" "High Fidelity client" ${action} ${prompter}
!insertmacro PromptForRunningApplication "@CONSOLE_WIN_EXEC_NAME@" "Server Console" ${action} ${prompter}
!insertmacro PromptForRunningApplication "@INTERFACE_WIN_EXEC_NAME@" "@CONSOLE_SHORTCUT_NAME@" ${action} ${prompter}
!insertmacro PromptForRunningApplication "@CONSOLE_WIN_EXEC_NAME@" "@INTERFACE_SHORTCUT_NAME@" ${action} ${prompter}
!insertmacro PromptForRunningApplication "@DS_EXEC_NAME@" "Domain Server" ${action} ${prompter}
!insertmacro PromptForRunningApplication "@AC_EXEC_NAME@" "Assignment Client" ${action} ${prompter}
!macroend
@ -869,12 +882,12 @@ Section "Uninstall"
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\@INTERFACE_SHORTCUT_NAME@.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\@CONSOLE_SHORTCUT_NAME@.lnk"
Delete "$DESKTOP\@INTERFACE_SHORTCUT_NAME@.lnk"
Delete "$DESKTOP\@CONSOLE_SHORTCUT_NAME@.lnk"
Delete "$DESKTOP\@INTERFACE_HF_SHORTCUT_NAME@.lnk"
Delete "$DESKTOP\@CONSOLE_HF_SHORTCUT_NAME@.lnk"
; if it exists, delete the startup shortcut for the current user
SetShellVarContext current
Delete "$SMSTARTUP\@CONSOLE_SHORTCUT_NAME@.lnk"
Delete "$SMSTARTUP\@CONSOLE_HF_SHORTCUT_NAME@.lnk"
SetShellVarContext all
@CPACK_NSIS_DELETE_ICONS@

View file

@ -1,5 +1,6 @@
Server\ Console-*/
server-console-*/
Sandbox-*/
electron-packager/
npm-debug.log
logs/

View file

@ -23,7 +23,7 @@ add_dependencies(${TARGET_NAME} assignment-client domain-server)
# set the packaged console folder depending on platform, so we can copy it
if (APPLE)
set(PACKAGED_CONSOLE_FOLDER "Server\\ Console-darwin-x64/${CONSOLE_EXEC_NAME}")
set(PACKAGED_CONSOLE_FOLDER "Sandbox-darwin-x64/${CONSOLE_EXEC_NAME}")
elseif (WIN32)
set(PACKAGED_CONSOLE_FOLDER "server-console-win32-x64")
elseif (UNIX)

View file

@ -23,12 +23,12 @@ var options = {
arch: "x64",
platform: platform,
icon: "resources/" + iconName,
ignore: "logs|(S|s)erver(\\s|-)(C|c)onsole-\\S+|electron-packager|README.md|CMakeLists.txt|packager.js|.gitignore"
ignore: "logs|(S|s)erver(\\s|-)(C|c)onsole-\\S+|(S|s)andbox-\\S+|electron-packager|README.md|CMakeLists.txt|packager.js|.gitignore"
}
const EXEC_NAME = "server-console";
const SHORT_NAME = "Server Console";
const FULL_NAME = "High Fidelity Server Console";
const SHORT_NAME = "Sandbox";
const FULL_NAME = "High Fidelity Sandbox";
// setup per OS options
if (osType == "Darwin") {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -111,8 +111,8 @@ function shutdown() {
dialog.showMessageBox({
type: 'question',
buttons: ['Yes', 'No'],
title: 'Stopping Server Console',
message: 'Quitting will stop your Server Console and your Home domain will no longer be running.\nDo you wish to continue?'
title: 'Stopping High Fidelity Sandbox',
message: 'Quitting will stop your Sandbox and your Home domain will no longer be running.\nDo you wish to continue?'
}, shutdownCallback);
} else {
shutdownCallback(0);
@ -212,7 +212,7 @@ var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory)
});
if (shouldQuit) {
console.warn("Another instance of the Server Console is already running - this instance will quit.");
console.warn("Another instance of the Sandbox is already running - this instance will quit.");
app.quit();
return;
}
@ -237,7 +237,7 @@ function binaryMissingMessage(displayName, executableName, required) {
var message = "The " + displayName + " executable was not found.\n";
if (required) {
message += "It is required for the Server Console to run.\n\n";
message += "It is required for the High Fidelity Sandbox to run.\n\n";
} else {
message += "\n";
}
@ -250,7 +250,7 @@ function binaryMissingMessage(displayName, executableName, required) {
message += paths.join("\n");
} else {
message += "It is expected to be found beside this executable.\n";
message += "You may need to re-install the Server Console.";
message += "You may need to re-install the High Fidelity Sandbox.";
}
return message;
@ -347,134 +347,6 @@ function goHomeClicked() {
}
}
function stackManagerBasePath() {
var dataPath = 'High Fidelity/Stack Manager/resources';
if (process.platform == "win32") {
return path.resolve(osHomeDir(), 'AppData/Local', dataPath);
} else if (process.platform == "darwin") {
return path.resolve(osHomeDir(), 'Library/Application Support', dataPath);
} else {
return ""
}
}
function isStackManagerContentPresent() {
var modelsPath = path.resolve(stackManagerBasePath(), 'models.json.gz');
try {
var stats = fs.lstatSync(modelsPath);
if (stats.isFile()) {
console.log("Stack Manager entities file discovered at " + modelsPath)
// we found a content file
return true;
}
} catch (e) {
console.log("Stack Manager entities file not found at " + modelsPath);
}
}
function promptToMigrateContent() {
dialog.showMessageBox({
type: 'question',
buttons: ['Yes', 'No'],
title: 'Migrate Content',
message: 'Are you sure?\n\nThis will stop your home server and replace everything in your home with your content from Stack Manager.'
}, function(index) {
if (index == 0) {
if (homeServer.state != ProcessGroupStates.STOPPED) {
var stopThenMigrateCallback = function(processGroup) {
if (isShuttingDown) {
homeServer.removeListener('state-update', stopThenMigrateCallback);
} else if (processGroup.state == ProcessGroupStates.STOPPED) {
performContentMigration();
homeServer.removeListener('state-update', stopThenMigrateCallback);
}
};
homeServer.on('state-update', stopThenMigrateCallback);
homeServer.stop();
} else {
performContentMigration();
}
}
});
}
function performContentMigration() {
// check if there is a models file to migrate
var modelsPath = path.resolve(stackManagerBasePath(), 'models.json.gz');
try {
var stats = fs.lstatSync(modelsPath);
} catch (e) {
// no entities file
dialog.showMessageBox({
type: 'info',
buttons: ['OK'],
title: 'Models File Not Found',
message: 'There is no models file at ' + modelsPath + '\n\nStack Manager content migration can not proceed.'
}, null);
return;
}
function showMigrationCompletionDialog(copyError) {
if (!copyError) {
// show message for successful migration
dialog.showMessageBox({
type: 'info',
buttons: ['OK'],
title: 'Migration Complete',
message: 'Your Stack Manager content has been migrated.\n\nYour home server will now be restarted.'
}, null);
} else {
// show error message for copy fail
dialog.showMessageBox({
type: 'info',
buttons: ['OK'],
title: 'Migration Failed',
message: 'There was an error copying your Stack Manager content: ' + copyError + '\n\nPlease try again.'
}, null);
}
}
// we have a models file, try and copy it
var newModelsPath = path.resolve(getAssignmentClientResourcesDirectory(), 'entities/models.json.gz')
console.log("Copying Stack Manager entity file from " + modelsPath + " to " + newModelsPath);
try {
fs.copySync(modelsPath, newModelsPath);
// check if there are any assets to copy
var oldAssetsPath = path.resolve(stackManagerBasePath(), 'assets');
var assets = fs.readdirSync(oldAssetsPath);
if (assets.length > 0) {
// assume this means the directory is not empty
// and that we should copy it
var newAssetsPath = path.resolve(getAssignmentClientResourcesDirectory(), 'assets');
console.log("Copying Stack Manager assets from " + oldAssetsPath + " to " + newAssetsPath);
// attempt to copy the assets folder
fs.copySync(oldAssetsPath, newAssetsPath, {
preserveTimestamps: true
});
}
showMigrationCompletionDialog(null);
} catch (error) {
showMigrationCompletionDialog(error);
}
homeServer.start();
}
var logWindow = null;
var labels = {
@ -530,12 +402,6 @@ var labels = {
shell.openExternal('http://localhost:40100/settings/?action=share')
}
},
migrateContent: {
label: 'Migrate Stack Manager Content',
click: function() {
promptToMigrateContent();
}
},
shuttingDown: {
label: "Shutting down...",
enabled: false
@ -569,13 +435,6 @@ function buildMenuArray(serverState) {
menuArray.push(labels.share);
menuArray.push(separator);
menuArray.push(labels.quit);
var foundStackManagerContent = isStackManagerContentPresent();
if (foundStackManagerContent) {
// add a separator and the stack manager content migration option
menuArray.splice(menuArray.length - 1, 0, labels.migrateContent, separator);
}
}
@ -724,7 +583,7 @@ function maybeShowSplash() {
var window = new BrowserWindow({
icon: appIcon,
width: 1600 * zoomFactor,
height: 737 * zoomFactor,
height: 650 * zoomFactor,
center: true,
frame: true,
useContentSize: true,
@ -770,7 +629,7 @@ app.on('ready', function() {
// Create tray icon
tray = new Tray(trayIcons[ProcessGroupStates.STOPPED]);
tray.setToolTip('High Fidelity Server Console');
tray.setToolTip('High Fidelity Sandbox');
tray.on('click', function() {
tray.popUpContextMenu(tray.menu);

View file

@ -122,11 +122,6 @@ h2 {
#main-content {
height: 350px;
border-bottom: 2px solid #F5F6F6;
}
#existing-resources-area {
padding-top: 20px;
}
.footer {
@ -143,4 +138,4 @@ h2 {
input[type="checkbox"] {
-webkit-transform: scale(1.4);
display: inline-block;
}
}

View file

@ -23,7 +23,7 @@ High Fidelity is now installed and your Home domain is ready for you to explore.
</p>
<p>
You can make your home yours by uploading your own models and scripts, and adding items from the Market.
You can make your home yours by uploading your own models and scripts.
</p>
@ -67,12 +67,6 @@ You can make your home yours by uploading your own models and scripts, and addin
</script>
</div>
</div>
<div id="existing-resources-area">
<p>
<h2>Your existing Stack Manager content is safe.</h2>
Server Console comes with demo content but does not overwrite your data. <a target="_blank" href="https://docs.highfidelity.com/v1.0/docs/migrate-sm-to-sc">See our guide to importing content previously managed with Stack Manager</a>.
</p>
</div>
</div>
<div class="bottom">
<div class="content footer">