Only set app ID on sandbox link

Also pass down the app ID from CMake files to installer and
server-console.
This commit is contained in:
Simon Walton 2018-06-01 14:13:52 -07:00
parent 5e17ef5e21
commit 97613f1f07
5 changed files with 10 additions and 18 deletions

View file

@ -17,6 +17,7 @@ macro(SET_PACKAGING_PARAMETERS)
set(DEV_BUILD 0)
set(BUILD_GLOBAL_SERVICES "DEVELOPMENT")
set(USE_STABLE_GLOBAL_SERVICES 0)
set(APP_USER_MODEL_ID "com.highfidelity.sandbox-dev")
set_from_env(RELEASE_TYPE RELEASE_TYPE "DEV")
set_from_env(RELEASE_NUMBER RELEASE_NUMBER "")
@ -126,6 +127,7 @@ macro(SET_PACKAGING_PARAMETERS)
if (PRODUCTION_BUILD)
set(INTERFACE_SHORTCUT_NAME "High Fidelity Interface")
set(CONSOLE_SHORTCUT_NAME "Sandbox")
set(APP_USER_MODEL_ID "com.highfidelity.sandbox")
else ()
set(INTERFACE_SHORTCUT_NAME "High Fidelity Interface - ${BUILD_VERSION}")
set(CONSOLE_SHORTCUT_NAME "Sandbox - ${BUILD_VERSION}")

View file

@ -49,3 +49,4 @@ set(ADD_REMOVE_ICON_PATH "@ADD_REMOVE_ICON_PATH@")
set(SERVER_COMPONENT_CONDITIONAL "@SERVER_COMPONENT_CONDITIONAL@")
set(CLIENT_COMPONENT_CONDITIONAL "@CLIENT_COMPONENT_CONDITIONAL@")
set(INSTALLER_TYPE "@INSTALLER_TYPE@")
set(APP_USER_MODEL_ID "@APP_USER_MODEL_ID@")

View file

@ -1162,6 +1162,8 @@ Section "-Core installation"
${If} @SERVER_COMPONENT_CONDITIONAL@
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\@CONSOLE_SHORTCUT_NAME@.lnk" \
"$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
; Set appUserModelId
ApplicationID::Set "$SMPROGRAMS\$STARTMENU_FOLDER\@CONSOLE_SHORTCUT_NAME@.lnk" "@APP_USER_MODEL_ID@"
${EndIf}
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\@UNINSTALLER_NAME@"
@ -1173,18 +1175,6 @@ Section "-Core installation"
!insertmacro MUI_STARTMENU_WRITE_END
!if @PRODUCTION_BUILD@ == 1
${If} @SERVER_COMPONENT_CONDITIONAL@
ApplicationID::Set "$SMPROGRAMS\$STARTMENU_FOLDER\@CONSOLE_SHORTCUT_NAME@.lnk" "com.highfidelity.sandbox"
${EndIf}
ApplicationID::Set "$SMPROGRAMS\$STARTMENU_FOLDER\@INTERFACE_SHORTCUT_NAME@.lnk" "com.highfidelity.interface"
!else
${If} @SERVER_COMPONENT_CONDITIONAL@
ApplicationID::Set "$SMPROGRAMS\$STARTMENU_FOLDER\@CONSOLE_SHORTCUT_NAME@.lnk" "com.highfidelity.sandbox-dev"
${EndIf}
ApplicationID::Set "$SMPROGRAMS\$STARTMENU_FOLDER\@INTERFACE_SHORTCUT_NAME@.lnk" "com.highfidelity.interface-dev"
!endif
@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
; see if we have a campaign that we might need to grab special content for

View file

@ -1,4 +1,5 @@
{
"releaseType": "@RELEASE_TYPE@",
"buildIdentifier": "@BUILD_VERSION@"
"buildIdentifier": "@BUILD_VERSION@",
"appUserModelId": "@APP_USER_MODEL_ID@"
}

View file

@ -44,8 +44,6 @@ const LOG_FILE_REGEX = /(domain-server|ac-monitor|ac)-.*-std(out|err).txt/;
const HOME_CONTENT_URL = "http://cdn.highfidelity.com/content-sets/home-tutorial-RC40.tar.gz";
const APP_USER_MODEL_ID = 'com.highfidelity.sandbox'; // For Windows jump list, etc.
function getBuildInfo() {
var buildInfoPath = null;
@ -62,7 +60,7 @@ function getBuildInfo() {
}
}
const DEFAULT_BUILD_INFO = { releaseType: "", buildIdentifier: "dev" };
const DEFAULT_BUILD_INFO = { releaseType: "", buildIdentifier: "dev", appUserModelId: "com.highfidelity.sandbox-dev"};
var buildInfo = DEFAULT_BUILD_INFO;
if (buildInfoPath) {
@ -235,7 +233,7 @@ const configPath = path.join(getApplicationDataDirectory(), 'config.json');
var userConfig = new Config();
userConfig.load(configPath);
app.setAppUserModelId(APP_USER_MODEL_ID);
app.setAppUserModelId(buildInfo.appUserModelId);
// print out uncaught exceptions in the console
process.on('uncaughtException', function(err) {
@ -882,7 +880,7 @@ function onContentLoaded() {
title: 'An update is available!',
message: 'High Fidelity version ' + latestVersion + ' is available',
wait: true,
appID: APP_USER_MODEL_ID,
appID: buildInfo.appUserModelId,
url: url
});
hasShownUpdateNotification = true;