mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 20:08:56 +02:00
parent
af6db93b70
commit
eec565e7f4
6 changed files with 140 additions and 127 deletions
|
@ -18,7 +18,7 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
set(BUILD_GLOBAL_SERVICES "DEVELOPMENT")
|
set(BUILD_GLOBAL_SERVICES "DEVELOPMENT")
|
||||||
set(USE_STABLE_GLOBAL_SERVICES 0)
|
set(USE_STABLE_GLOBAL_SERVICES 0)
|
||||||
set(BUILD_NUMBER 0)
|
set(BUILD_NUMBER 0)
|
||||||
set(APP_USER_MODEL_ID "com.highfidelity.console")
|
set(APP_USER_MODEL_ID "com.highfidelity.sandbox-dev")
|
||||||
|
|
||||||
set_from_env(RELEASE_TYPE RELEASE_TYPE "DEV")
|
set_from_env(RELEASE_TYPE RELEASE_TYPE "DEV")
|
||||||
set_from_env(RELEASE_NUMBER RELEASE_NUMBER "")
|
set_from_env(RELEASE_NUMBER RELEASE_NUMBER "")
|
||||||
|
@ -176,15 +176,15 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
# shortcut names
|
# shortcut names
|
||||||
if (PRODUCTION_BUILD)
|
if (PRODUCTION_BUILD)
|
||||||
set(INTERFACE_SHORTCUT_NAME "High Fidelity Interface")
|
set(INTERFACE_SHORTCUT_NAME "High Fidelity Interface")
|
||||||
set(CONSOLE_SHORTCUT_NAME "High Fidelity Console")
|
set(CONSOLE_SHORTCUT_NAME "Sandbox")
|
||||||
set(APP_USER_MODEL_ID "com.highfidelity.console")
|
set(APP_USER_MODEL_ID "com.highfidelity.sandbox")
|
||||||
else ()
|
else ()
|
||||||
set(INTERFACE_SHORTCUT_NAME "High Fidelity Interface - ${BUILD_VERSION_NO_SHA}")
|
set(INTERFACE_SHORTCUT_NAME "High Fidelity Interface - ${BUILD_VERSION_NO_SHA}")
|
||||||
set(CONSOLE_SHORTCUT_NAME "High Fidelity Console - ${BUILD_VERSION_NO_SHA}")
|
set(CONSOLE_SHORTCUT_NAME "Sandbox - ${BUILD_VERSION_NO_SHA}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(INTERFACE_HF_SHORTCUT_NAME "${INTERFACE_SHORTCUT_NAME}")
|
set(INTERFACE_HF_SHORTCUT_NAME "${INTERFACE_SHORTCUT_NAME}")
|
||||||
set(CONSOLE_HF_SHORTCUT_NAME "${CONSOLE_SHORTCUT_NAME}")
|
set(CONSOLE_HF_SHORTCUT_NAME "High Fidelity ${CONSOLE_SHORTCUT_NAME}")
|
||||||
|
|
||||||
set(PRE_SANDBOX_INTERFACE_SHORTCUT_NAME "High Fidelity")
|
set(PRE_SANDBOX_INTERFACE_SHORTCUT_NAME "High Fidelity")
|
||||||
set(PRE_SANDBOX_CONSOLE_SHORTCUT_NAME "Server Console")
|
set(PRE_SANDBOX_CONSOLE_SHORTCUT_NAME "Server Console")
|
||||||
|
|
|
@ -13,7 +13,7 @@ set(INTERFACE_DISPLAY_NAME "Interface")
|
||||||
set(INTERFACE_SHORTCUT_NAME "@INTERFACE_SHORTCUT_NAME@")
|
set(INTERFACE_SHORTCUT_NAME "@INTERFACE_SHORTCUT_NAME@")
|
||||||
set(INTERFACE_HF_SHORTCUT_NAME "@INTERFACE_HF_SHORTCUT_NAME@")
|
set(INTERFACE_HF_SHORTCUT_NAME "@INTERFACE_HF_SHORTCUT_NAME@")
|
||||||
set(INTERFACE_WIN_EXEC_NAME "@INTERFACE_EXEC_PREFIX@.exe")
|
set(INTERFACE_WIN_EXEC_NAME "@INTERFACE_EXEC_PREFIX@.exe")
|
||||||
set(CONSOLE_DISPLAY_NAME "Console")
|
set(CONSOLE_DISPLAY_NAME "Sandbox")
|
||||||
set(CONSOLE_INSTALL_SUBDIR "@CONSOLE_INSTALL_DIR@")
|
set(CONSOLE_INSTALL_SUBDIR "@CONSOLE_INSTALL_DIR@")
|
||||||
set(CONSOLE_SHORTCUT_NAME "@CONSOLE_SHORTCUT_NAME@")
|
set(CONSOLE_SHORTCUT_NAME "@CONSOLE_SHORTCUT_NAME@")
|
||||||
set(CONSOLE_HF_SHORTCUT_NAME "@CONSOLE_HF_SHORTCUT_NAME@")
|
set(CONSOLE_HF_SHORTCUT_NAME "@CONSOLE_HF_SHORTCUT_NAME@")
|
||||||
|
|
|
@ -405,14 +405,6 @@ Var GAClientID
|
||||||
Section "-Previous Install Cleanup"
|
Section "-Previous Install Cleanup"
|
||||||
; Remove the resources folder so we don't end up including removed QML files
|
; Remove the resources folder so we don't end up including removed QML files
|
||||||
RMDir /r "$INSTDIR\resources"
|
RMDir /r "$INSTDIR\resources"
|
||||||
|
|
||||||
; delete old assignment-client and domain-server so they're no longer present
|
|
||||||
; in client only installs.
|
|
||||||
Delete "$INSTDIR\@DS_EXEC_NAME@"
|
|
||||||
Delete "$INSTDIR\@AC_EXEC_NAME@"
|
|
||||||
|
|
||||||
; delete interface so it's not there for server-only installs
|
|
||||||
Delete "$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
@CPACK_NSIS_INSTALLATION_TYPES@
|
@CPACK_NSIS_INSTALLATION_TYPES@
|
||||||
|
@ -540,9 +532,9 @@ SectionEnd
|
||||||
|
|
||||||
Var PostInstallDialog
|
Var PostInstallDialog
|
||||||
Var DesktopClientCheckbox
|
Var DesktopClientCheckbox
|
||||||
Var DesktopConsoleCheckbox
|
Var DesktopServerCheckbox
|
||||||
Var ConsoleStartupCheckbox
|
Var ServerStartupCheckbox
|
||||||
Var LaunchConsoleNowCheckbox
|
Var LaunchServerNowCheckbox
|
||||||
Var LaunchClientNowCheckbox
|
Var LaunchClientNowCheckbox
|
||||||
Var CleanInstallCheckbox
|
Var CleanInstallCheckbox
|
||||||
Var CurrentOffset
|
Var CurrentOffset
|
||||||
|
@ -754,8 +746,28 @@ Function PostInstallOptionsPage
|
||||||
!insertmacro SetInstallOption $DesktopClientCheckbox @CLIENT_DESKTOP_SHORTCUT_REG_KEY@ ${BST_CHECKED}
|
!insertmacro SetInstallOption $DesktopClientCheckbox @CLIENT_DESKTOP_SHORTCUT_REG_KEY@ ${BST_CHECKED}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
; set the checkbox state depending on what is present in the registry
|
${If} @SERVER_COMPONENT_CONDITIONAL@
|
||||||
!insertmacro SetInstallOption $DesktopConsoleCheckbox @CONSOLE_DESKTOP_SHORTCUT_REG_KEY@ ${BST_UNCHECKED}
|
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Create a desktop shortcut for @CONSOLE_HF_SHORTCUT_NAME@"
|
||||||
|
Pop $DesktopServerCheckbox
|
||||||
|
IntOp $CurrentOffset $CurrentOffset + 15
|
||||||
|
|
||||||
|
; set the checkbox state depending on what is present in the registry
|
||||||
|
!insertmacro SetInstallOption $DesktopServerCheckbox @CONSOLE_DESKTOP_SHORTCUT_REG_KEY@ ${BST_UNCHECKED}
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
${If} @SERVER_COMPONENT_CONDITIONAL@
|
||||||
|
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @CONSOLE_HF_SHORTCUT_NAME@ after install"
|
||||||
|
Pop $LaunchServerNowCheckbox
|
||||||
|
|
||||||
|
; set the checkbox state depending on what is present in the registry
|
||||||
|
!insertmacro SetInstallOption $LaunchServerNowCheckbox @SERVER_LAUNCH_NOW_REG_KEY@ ${BST_CHECKED}
|
||||||
|
${StrContains} $substringResult "/forceNoLaunchServer" $CMDLINE
|
||||||
|
${IfNot} $substringResult == ""
|
||||||
|
${NSD_SetState} $LaunchServerNowCheckbox ${BST_UNCHECKED}
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
IntOp $CurrentOffset $CurrentOffset + 15
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @INTERFACE_HF_SHORTCUT_NAME@ after install"
|
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @INTERFACE_HF_SHORTCUT_NAME@ after install"
|
||||||
|
@ -770,42 +782,28 @@ Function PostInstallOptionsPage
|
||||||
${EndIf}
|
${EndIf}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Create a desktop shortcut for @CONSOLE_HF_SHORTCUT_NAME@"
|
${If} @SERVER_COMPONENT_CONDITIONAL@
|
||||||
Pop $DesktopConsoleCheckbox
|
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @CONSOLE_HF_SHORTCUT_NAME@ on startup"
|
||||||
IntOp $CurrentOffset $CurrentOffset + 15
|
Pop $ServerStartupCheckbox
|
||||||
|
IntOp $CurrentOffset $CurrentOffset + 15
|
||||||
|
|
||||||
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @CONSOLE_HF_SHORTCUT_NAME@ after install"
|
; set the checkbox state depending on what is present in the registry
|
||||||
Pop $LaunchConsoleNowCheckbox
|
!insertmacro SetInstallOption $ServerStartupCheckbox @CONSOLE_STARTUP_REG_KEY@ ${BST_CHECKED}
|
||||||
|
|
||||||
; set the checkbox state depending on what is present in the registry
|
|
||||||
!insertmacro SetInstallOption $LaunchConsoleNowCheckbox @SERVER_LAUNCH_NOW_REG_KEY@ ${BST_CHECKED}
|
|
||||||
${StrContains} $substringResult "/forceNoLaunchServer" $CMDLINE
|
|
||||||
${IfNot} $substringResult == ""
|
|
||||||
${NSD_SetState} $LaunchConsoleNowCheckbox ${BST_UNCHECKED}
|
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
IntOp $CurrentOffset $CurrentOffset + 15
|
|
||||||
|
|
||||||
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Launch @CONSOLE_HF_SHORTCUT_NAME@ on startup"
|
|
||||||
Pop $ConsoleStartupCheckbox
|
|
||||||
IntOp $CurrentOffset $CurrentOffset + 15
|
|
||||||
|
|
||||||
; set the checkbox state depending on what is present in the registry
|
|
||||||
!insertmacro SetInstallOption $ConsoleStartupCheckbox @CONSOLE_STARTUP_REG_KEY@ ${BST_CHECKED}
|
|
||||||
|
|
||||||
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Perform a clean install (Delete older settings and content)"
|
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Perform a clean install (Delete older settings and content)"
|
||||||
Pop $CleanInstallCheckbox
|
Pop $CleanInstallCheckbox
|
||||||
IntOp $CurrentOffset $CurrentOffset + 15
|
IntOp $CurrentOffset $CurrentOffset + 15
|
||||||
|
|
||||||
${If} @PR_BUILD@ == 1
|
${If} @PR_BUILD@ == 1
|
||||||
; a PR build defaults all install options expect LaunchConsoleNowCheckbox, LaunchClientNowCheckbox and the settings copy to unchecked
|
; a PR build defaults all install options expect LaunchServerNowCheckbox, LaunchClientNowCheckbox and the settings copy to unchecked
|
||||||
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
${NSD_SetState} $DesktopClientCheckbox ${BST_UNCHECKED}
|
${NSD_SetState} $DesktopClientCheckbox ${BST_UNCHECKED}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${If} @SERVER_COMPONENT_CONDITIONAL@
|
${If} @SERVER_COMPONENT_CONDITIONAL@
|
||||||
${NSD_SetState} $DesktopConsoleCheckbox ${BST_UNCHECKED}
|
${NSD_SetState} $DesktopServerCheckbox ${BST_UNCHECKED}
|
||||||
${NSD_SetState} $ConsoleStartupCheckbox ${BST_UNCHECKED}
|
${NSD_SetState} $ServerStartupCheckbox ${BST_UNCHECKED}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
; push the offset
|
; push the offset
|
||||||
|
@ -826,9 +824,9 @@ FunctionEnd
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
Var DesktopClientState
|
Var DesktopClientState
|
||||||
Var DesktopConsoleState
|
Var DesktopServerState
|
||||||
Var ConsoleStartupState
|
Var ServerStartupState
|
||||||
Var LaunchConsoleNowState
|
Var LaunchServerNowState
|
||||||
Var LaunchClientNowState
|
Var LaunchClientNowState
|
||||||
Var CopyFromProductionState
|
Var CopyFromProductionState
|
||||||
Var CleanInstallState
|
Var CleanInstallState
|
||||||
|
@ -844,11 +842,11 @@ Function ReadInstallTypes
|
||||||
StrCpy $Express "1"
|
StrCpy $Express "1"
|
||||||
|
|
||||||
StrCpy $DesktopClientState ${BST_CHECKED}
|
StrCpy $DesktopClientState ${BST_CHECKED}
|
||||||
StrCpy $ConsoleStartupState ${BST_CHECKED}
|
StrCpy $ServerStartupState ${BST_CHECKED}
|
||||||
StrCpy $LaunchConsoleNowState ${BST_CHECKED}
|
StrCpy $LaunchServerNowState ${BST_CHECKED}
|
||||||
StrCpy $LaunchClientNowState ${BST_CHECKED}
|
StrCpy $LaunchClientNowState ${BST_CHECKED}
|
||||||
StrCpy $CleanInstallState ${BST_UNCHECKED}
|
StrCpy $CleanInstallState ${BST_UNCHECKED}
|
||||||
StrCpy $DesktopConsoleState ${BST_UNCHECKED}
|
StrCpy $DesktopServerState ${BST_UNCHECKED}
|
||||||
|
|
||||||
${If} @PR_BUILD@ == 1
|
${If} @PR_BUILD@ == 1
|
||||||
StrCpy $CopyFromProductionState ${BST_UNCHECKED}
|
StrCpy $CopyFromProductionState ${BST_UNCHECKED}
|
||||||
|
@ -862,25 +860,28 @@ Function ReadInstallTypes
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function ReadPostInstallOptions
|
Function ReadPostInstallOptions
|
||||||
|
|
||||||
; check if the user asked for a desktop shortcut to console
|
|
||||||
${NSD_GetState} $DesktopConsoleCheckbox $DesktopConsoleState
|
|
||||||
|
|
||||||
; check if the user asked to have console launched every startup
|
|
||||||
${NSD_GetState} $ConsoleStartupCheckbox $ConsoleStartupState
|
|
||||||
|
|
||||||
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
; check if the user asked for a desktop shortcut to High Fidelity
|
; check if the user asked for a desktop shortcut to High Fidelity
|
||||||
${NSD_GetState} $DesktopClientCheckbox $DesktopClientState
|
${NSD_GetState} $DesktopClientCheckbox $DesktopClientState
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
|
${If} @SERVER_COMPONENT_CONDITIONAL@
|
||||||
|
; check if the user asked for a desktop shortcut to Sandbox
|
||||||
|
${NSD_GetState} $DesktopServerCheckbox $DesktopServerState
|
||||||
|
|
||||||
|
; check if the user asked to have Sandbox launched every startup
|
||||||
|
${NSD_GetState} $ServerStartupCheckbox $ServerStartupState
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
${If} @PR_BUILD@ == 1
|
${If} @PR_BUILD@ == 1
|
||||||
; check if we need to copy settings/content from production for this PR build
|
; check if we need to copy settings/content from production for this PR build
|
||||||
${NSD_GetState} $CopyFromProductionCheckbox $CopyFromProductionState
|
${NSD_GetState} $CopyFromProductionCheckbox $CopyFromProductionState
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
; check if we need to launch the console post-install
|
${If} @SERVER_COMPONENT_CONDITIONAL@
|
||||||
${NSD_GetState} $LaunchConsoleNowCheckbox $LaunchConsoleNowState
|
; check if we need to launch the server post-install
|
||||||
|
${NSD_GetState} $LaunchServerNowCheckbox $LaunchServerNowState
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
; check if we need to launch the client post-install
|
; check if we need to launch the client post-install
|
||||||
|
@ -892,17 +893,6 @@ Function ReadPostInstallOptions
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function HandlePostInstallOptions
|
Function HandlePostInstallOptions
|
||||||
|
|
||||||
; check if the user asked for a desktop shortcut to the console
|
|
||||||
${If} $DesktopConsoleState == ${BST_CHECKED}
|
|
||||||
CreateShortCut "$DESKTOP\@CONSOLE_HF_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
|
|
||||||
!insertmacro WriteInstallOption @CONSOLE_DESKTOP_SHORTCUT_REG_KEY@ YES
|
|
||||||
; Set appUserModelId
|
|
||||||
ApplicationID::Set "$DESKTOP\@CONSOLE_HF_SHORTCUT_NAME@.lnk" "@APP_USER_MODEL_ID@"
|
|
||||||
${Else}
|
|
||||||
!insertmacro WriteInstallOption @CONSOLE_DESKTOP_SHORTCUT_REG_KEY@ NO
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
; check if the user asked for a desktop shortcut to High Fidelity
|
; check if the user asked for a desktop shortcut to High Fidelity
|
||||||
${If} $DesktopClientState == ${BST_CHECKED}
|
${If} $DesktopClientState == ${BST_CHECKED}
|
||||||
|
@ -911,24 +901,38 @@ Function HandlePostInstallOptions
|
||||||
${Else}
|
${Else}
|
||||||
!insertmacro WriteInstallOption @CLIENT_DESKTOP_SHORTCUT_REG_KEY@ NO
|
!insertmacro WriteInstallOption @CLIENT_DESKTOP_SHORTCUT_REG_KEY@ NO
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
; check if the user asked to have Console launched every startup
|
${If} @SERVER_COMPONENT_CONDITIONAL@
|
||||||
${If} $ConsoleStartupState == ${BST_CHECKED}
|
; check if the user asked for a desktop shortcut to Sandbox
|
||||||
; in case we added a shortcut in the global context, pull that now
|
${If} $DesktopServerState == ${BST_CHECKED}
|
||||||
SetShellVarContext all
|
CreateShortCut "$DESKTOP\@CONSOLE_HF_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
|
||||||
Delete "$SMSTARTUP\@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@.lnk"
|
!insertmacro WriteInstallOption @CONSOLE_DESKTOP_SHORTCUT_REG_KEY@ YES
|
||||||
|
; Set appUserModelId
|
||||||
|
ApplicationID::Set "$DESKTOP\@CONSOLE_HF_SHORTCUT_NAME@.lnk" "@APP_USER_MODEL_ID@"
|
||||||
|
${Else}
|
||||||
|
!insertmacro WriteInstallOption @CONSOLE_DESKTOP_SHORTCUT_REG_KEY@ NO
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
; make a startup shortcut in this user's current context
|
|
||||||
SetShellVarContext current
|
|
||||||
CreateShortCut "$SMSTARTUP\@CONSOLE_HF_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
|
|
||||||
|
|
||||||
; reset the shell var context back
|
; check if the user asked to have Sandbox launched every startup
|
||||||
SetShellVarContext all
|
${If} $ServerStartupState == ${BST_CHECKED}
|
||||||
|
; in case we added a shortcut in the global context, pull that now
|
||||||
|
SetShellVarContext all
|
||||||
|
Delete "$SMSTARTUP\@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@.lnk"
|
||||||
|
|
||||||
!insertmacro WriteInstallOption @CONSOLE_STARTUP_REG_KEY@ YES
|
; make a startup shortcut in this user's current context
|
||||||
${Else}
|
SetShellVarContext current
|
||||||
!insertmacro WriteInstallOption @CONSOLE_STARTUP_REG_KEY@ NO
|
CreateShortCut "$SMSTARTUP\@CONSOLE_HF_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
|
||||||
|
|
||||||
|
; reset the shell var context back
|
||||||
|
SetShellVarContext all
|
||||||
|
|
||||||
|
!insertmacro WriteInstallOption @CONSOLE_STARTUP_REG_KEY@ YES
|
||||||
|
${Else}
|
||||||
|
!insertmacro WriteInstallOption @CONSOLE_STARTUP_REG_KEY@ NO
|
||||||
|
${EndIf}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
; check if the user asked for a clean install
|
; check if the user asked for a clean install
|
||||||
|
@ -978,15 +982,16 @@ Function HandlePostInstallOptions
|
||||||
${EndIf}
|
${EndIf}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${If} $LaunchConsoleNowState == ${BST_CHECKED}
|
${If} @SERVER_COMPONENT_CONDITIONAL@
|
||||||
|
${AndIf} $LaunchServerNowState == ${BST_CHECKED}
|
||||||
!insertmacro WriteInstallOption @SERVER_LAUNCH_NOW_REG_KEY@ YES
|
!insertmacro WriteInstallOption @SERVER_LAUNCH_NOW_REG_KEY@ YES
|
||||||
|
|
||||||
; both launches use the explorer trick in case the user has elevated permissions for the installer
|
; both launches use the explorer trick in case the user has elevated permissions for the installer
|
||||||
${If} $LaunchClientNowState == ${BST_CHECKED}
|
${If} $LaunchClientNowState == ${BST_CHECKED}
|
||||||
!insertmacro WriteInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ YES
|
!insertmacro WriteInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ YES
|
||||||
; create shortcut with ARGUMENTS
|
; create shortcut with ARGUMENTS
|
||||||
CreateShortCut "$TEMP\ConsoleShortcut.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@" "-- --launchInterface"
|
CreateShortCut "$TEMP\SandboxShortcut.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@" "-- --launchInterface"
|
||||||
Exec '"$WINDIR\explorer.exe" "$TEMP\ConsoleShortcut.lnk"'
|
Exec '"$WINDIR\explorer.exe" "$TEMP\SandboxShortcut.lnk"'
|
||||||
${Else}
|
${Else}
|
||||||
!insertmacro WriteInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ NO
|
!insertmacro WriteInstallOption @CLIENT_LAUNCH_NOW_REG_KEY@ NO
|
||||||
Exec '"$WINDIR\explorer.exe" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"'
|
Exec '"$WINDIR\explorer.exe" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"'
|
||||||
|
@ -1159,11 +1164,13 @@ Section "-Core installation"
|
||||||
|
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
; handling for server console shortcut
|
; Conditional handling for server console shortcut
|
||||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\@CONSOLE_SHORTCUT_NAME@.lnk" \
|
${If} @SERVER_COMPONENT_CONDITIONAL@
|
||||||
"$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
|
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\@CONSOLE_SHORTCUT_NAME@.lnk" \
|
||||||
; Set appUserModelId
|
"$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
|
||||||
ApplicationID::Set "$SMPROGRAMS\$STARTMENU_FOLDER\@CONSOLE_SHORTCUT_NAME@.lnk" "@APP_USER_MODEL_ID@"
|
; 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@"
|
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\@UNINSTALLER_NAME@"
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Server Console")
|
||||||
set_target_properties(${TARGET_NAME}-npm-install PROPERTIES FOLDER "hidden/Server Console")
|
set_target_properties(${TARGET_NAME}-npm-install PROPERTIES FOLDER "hidden/Server Console")
|
||||||
|
|
||||||
# add a dependency from the package target to the server components
|
# add a dependency from the package target to the server components
|
||||||
add_dependencies(${TARGET_NAME} assignment-client domain-server interface)
|
add_dependencies(${TARGET_NAME} assignment-client domain-server)
|
||||||
|
|
||||||
# set the packaged console folder depending on platform, so we can copy it
|
# set the packaged console folder depending on platform, so we can copy it
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
@ -36,7 +36,6 @@ if (APPLE)
|
||||||
PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${PACKAGED_CONSOLE_FOLDER}"
|
PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${PACKAGED_CONSOLE_FOLDER}"
|
||||||
DESTINATION ${CONSOLE_INSTALL_DIR}
|
DESTINATION ${CONSOLE_INSTALL_DIR}
|
||||||
COMPONENT ${SERVER_COMPONENT}
|
COMPONENT ${SERVER_COMPONENT}
|
||||||
COMPONENT ${CLIENT_COMPONENT}
|
|
||||||
)
|
)
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
set(CONSOLE_DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/${PACKAGED_CONSOLE_FOLDER}")
|
set(CONSOLE_DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/${PACKAGED_CONSOLE_FOLDER}")
|
||||||
|
@ -45,7 +44,6 @@ elseif (WIN32)
|
||||||
DIRECTORY "${CONSOLE_DESTINATION}/"
|
DIRECTORY "${CONSOLE_DESTINATION}/"
|
||||||
DESTINATION ${CONSOLE_INSTALL_DIR}
|
DESTINATION ${CONSOLE_INSTALL_DIR}
|
||||||
COMPONENT ${SERVER_COMPONENT}
|
COMPONENT ${SERVER_COMPONENT}
|
||||||
COMPONENT ${CLIENT_COMPONENT}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# sign the copied server console executable after install
|
# sign the copied server console executable after install
|
||||||
|
|
|
@ -104,12 +104,12 @@ userConfig.load(configPath);
|
||||||
const ipcMain = electron.ipcMain;
|
const ipcMain = electron.ipcMain;
|
||||||
|
|
||||||
|
|
||||||
function isInterfaceInstalled() {
|
function isServerInstalled() {
|
||||||
return interfacePath;
|
return interfacePath && userConfig.get("serverInstalled", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isServerInstalled() {
|
function isInterfaceInstalled() {
|
||||||
return dsPath && acPath;
|
return dsPath && acPath && userConfig.get("interfaceInstalled", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
var isShuttingDown = false;
|
var isShuttingDown = false;
|
||||||
|
@ -263,10 +263,6 @@ interfacePath = pathFinder.discoveredPath("Interface", binaryType, buildInfo.rel
|
||||||
dsPath = pathFinder.discoveredPath("domain-server", binaryType, buildInfo.releaseType);
|
dsPath = pathFinder.discoveredPath("domain-server", binaryType, buildInfo.releaseType);
|
||||||
acPath = pathFinder.discoveredPath("assignment-client", binaryType, buildInfo.releaseType);
|
acPath = pathFinder.discoveredPath("assignment-client", binaryType, buildInfo.releaseType);
|
||||||
|
|
||||||
console.log("Domain Server Path: " + dsPath);
|
|
||||||
console.log("Assignment Client Path: " + acPath);
|
|
||||||
console.log("Interface Path: " + interfacePath);
|
|
||||||
|
|
||||||
function binaryMissingMessage(displayName, executableName, required) {
|
function binaryMissingMessage(displayName, executableName, required) {
|
||||||
var message = "The " + displayName + " executable was not found.\n";
|
var message = "The " + displayName + " executable was not found.\n";
|
||||||
|
|
||||||
|
@ -290,6 +286,18 @@ function binaryMissingMessage(displayName, executableName, required) {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if at this point any of the paths are null, we're missing something we wanted to find
|
||||||
|
|
||||||
|
if (!dsPath) {
|
||||||
|
dialog.showErrorBox("Domain Server Not Found", binaryMissingMessage("domain-server", "domain-server", true));
|
||||||
|
app.exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!acPath) {
|
||||||
|
dialog.showErrorBox("Assignment Client Not Found", binaryMissingMessage("assignment-client", "assignment-client", true));
|
||||||
|
app.exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
function openFileBrowser(path) {
|
function openFileBrowser(path) {
|
||||||
// Add quotes around path
|
// Add quotes around path
|
||||||
path = '"' + path + '"';
|
path = '"' + path + '"';
|
||||||
|
@ -807,33 +815,33 @@ function onContentLoaded() {
|
||||||
// Disable splash window for now.
|
// Disable splash window for now.
|
||||||
// maybeShowSplash();
|
// maybeShowSplash();
|
||||||
|
|
||||||
|
if (buildInfo.releaseType == 'PRODUCTION' && !argv.noUpdater) {
|
||||||
|
|
||||||
|
const CHECK_FOR_UPDATES_INTERVAL_SECONDS = 60 * 30;
|
||||||
|
var hasShownUpdateNotification = false;
|
||||||
|
const updateChecker = new updater.UpdateChecker(buildInfo, CHECK_FOR_UPDATES_INTERVAL_SECONDS);
|
||||||
|
updateChecker.on('update-available', function(latestVersion, url) {
|
||||||
|
if (!hasShownUpdateNotification) {
|
||||||
|
notifier.notify({
|
||||||
|
icon: notificationIcon,
|
||||||
|
title: 'An update is available!',
|
||||||
|
message: 'High Fidelity version ' + latestVersion + ' is available',
|
||||||
|
wait: true,
|
||||||
|
appID: buildInfo.appUserModelId,
|
||||||
|
url: url
|
||||||
|
});
|
||||||
|
hasShownUpdateNotification = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
notifier.on('click', function(notifierObject, options) {
|
||||||
|
log.debug("Got click", options.url);
|
||||||
|
shell.openExternal(options.url);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteOldFiles(logPath, DELETE_LOG_FILES_OLDER_THAN_X_SECONDS, LOG_FILE_REGEX);
|
||||||
|
|
||||||
if (isServerInstalled()) {
|
if (isServerInstalled()) {
|
||||||
if (buildInfo.releaseType == 'PRODUCTION' && !argv.noUpdater) {
|
|
||||||
|
|
||||||
const CHECK_FOR_UPDATES_INTERVAL_SECONDS = 60 * 30;
|
|
||||||
var hasShownUpdateNotification = false;
|
|
||||||
const updateChecker = new updater.UpdateChecker(buildInfo, CHECK_FOR_UPDATES_INTERVAL_SECONDS);
|
|
||||||
updateChecker.on('update-available', function(latestVersion, url) {
|
|
||||||
if (!hasShownUpdateNotification) {
|
|
||||||
notifier.notify({
|
|
||||||
icon: notificationIcon,
|
|
||||||
title: 'An update is available!',
|
|
||||||
message: 'High Fidelity version ' + latestVersion + ' is available',
|
|
||||||
wait: true,
|
|
||||||
appID: buildInfo.appUserModelId,
|
|
||||||
url: url
|
|
||||||
});
|
|
||||||
hasShownUpdateNotification = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
notifier.on('click', function(notifierObject, options) {
|
|
||||||
log.debug("Got click", options.url);
|
|
||||||
shell.openExternal(options.url);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteOldFiles(logPath, DELETE_LOG_FILES_OLDER_THAN_X_SECONDS, LOG_FILE_REGEX);
|
|
||||||
|
|
||||||
var dsArguments = ['--get-temp-name',
|
var dsArguments = ['--get-temp-name',
|
||||||
'--parent-pid', process.pid];
|
'--parent-pid', process.pid];
|
||||||
domainServer = new Process('domain-server', dsPath, dsArguments, logPath);
|
domainServer = new Process('domain-server', dsPath, dsArguments, logPath);
|
||||||
|
|
|
@ -34,7 +34,7 @@ exports.getBuildInfo = function() {
|
||||||
buildNumber: "0",
|
buildNumber: "0",
|
||||||
stableBuild: "0",
|
stableBuild: "0",
|
||||||
organization: "High Fidelity - dev",
|
organization: "High Fidelity - dev",
|
||||||
appUserModelId: "com.highfidelity.console"
|
appUserModelId: "com.highfidelity.sandbox-dev"
|
||||||
};
|
};
|
||||||
var buildInfo = DEFAULT_BUILD_INFO;
|
var buildInfo = DEFAULT_BUILD_INFO;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue