From 3ee5f78c40dea646bf125b21da6a0013775c529c Mon Sep 17 00:00:00 2001 From: utkarshgautamnyu Date: Mon, 7 Aug 2017 17:44:07 -0700 Subject: [PATCH 1/5] bug fixes for express installer --- cmake/templates/NSIS.template.in | 64 +++++++++++++------------------- 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 5af51ff8c9..cfb982d59d 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -518,7 +518,7 @@ FunctionEnd Function AbortFunction ; Check if Express is set, if so, abort the post install options page - Call HandleInstallTypes ; Sets Express if ExpressInstallRadioButton is checked and installs with defaults + ; Call HandleInstallTypes ; Sets Express if ExpressInstallRadioButton is checked StrCmp $Express "1" 0 end Abort end: @@ -529,10 +529,15 @@ Function PostInstallOptionsPage nsDialogs::Create 1018 Pop $PostInstallDialog - + ${If} $PostInstallDialog == error Abort ${EndIf} + + ; Check if Express is set, if so, abort the post install options page + StrCmp $Express "1" 0 end + Abort + end: StrCpy $CurrentOffset 0 StrCpy $OffsetUnits u @@ -617,12 +622,6 @@ Function PostInstallOptionsPage ${NSD_SetState} $CopyFromProductionCheckbox ${BST_UNCHECKED} ${EndIf} - ; Check if Express is set, if so, abort the post install options page - Call HandleInstallTypes ; Sets Express if ExpressInstallRadioButton is checked and installs with defaults - StrCmp $Express "1" 0 end - Abort - end: - nsDialogs::Show FunctionEnd @@ -638,15 +637,28 @@ Var LaunchServerNowState Var LaunchClientNowState Var CopyFromProductionState Var CleanInstallState -Var ExpressInstallState +Var ExpressInstallState Var CustomInstallState Function ReadInstallTypes - ${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@} - ; check if the user asked for express/custom install - ${NSD_GetState} $ExpressInstallRadioButton $ExpressInstallState - ${NSD_GetState} $CustomInstallRadioButton $CustomInstallState + ; check if the user asked for express/custom install + ${NSD_GetState} $ExpressInstallRadioButton $ExpressInstallState + ${NSD_GetState} $CustomInstallRadioButton $CustomInstallState + + ${If} $ExpressInstallState == ${BST_CHECKED} + StrCpy $Express "1" + + StrCpy $DesktopClientState ${BST_CHECKED} + StrCpy $ServerStartupState ${BST_CHECKED} + StrCpy $LaunchServerNowState ${BST_CHECKED} + StrCpy $LaunchClientNowState ${BST_CHECKED} + + ${If} @PR_BUILD@ == 1 + ${NSD_SetState} $CopyFromProductionCheckbox ${BST_UNCHECKED} + ${EndIf} + ${EndIf} + FunctionEnd Function ReadPostInstallOptions @@ -684,28 +696,6 @@ Function ReadPostInstallOptions ${EndIf} FunctionEnd -Function HandleInstallTypes - ${If} $ExpressInstallState == ${BST_CHECKED} - - StrCpy $Express "1" - - ; over ride custom checkboxes and select defaults - ${NSD_SetState} $DesktopClientCheckbox ${BST_CHECKED} - ${NSD_SetState} $ServerStartupCheckbox ${BST_CHECKED} - ${NSD_SetState} $LaunchServerNowCheckbox ${BST_CHECKED} - ${NSD_SetState} $LaunchClientNowCheckbox ${BST_CHECKED} - - ${If} @PR_BUILD@ == 1 - ${NSD_SetState} $CopyFromProductionCheckbox ${BST_UNCHECKED} - ${EndIf} - - ; call ReadPostInstallOptions and HandlePostInstallOptions with defaults selected - Call ReadPostInstallOptions - Call HandlePostInstallOptions - - ${EndIf} -FunctionEnd - Function HandlePostInstallOptions ${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@} ; check if the user asked for a desktop shortcut to High Fidelity @@ -853,8 +843,6 @@ Section "-Core installation" ; Rename the incorrectly cased Raleway font Rename "$INSTDIR\resources\qml\styles-uit\RalewaySemibold.qml" "$INSTDIR\resources\qml\styles-uit\RalewaySemiBold.qml" - ExecWait "$INSTDIR\vcredist_x64.exe /install /q /norestart" - ; Remove the Old Interface directory and vcredist_x64.exe (from installs prior to Server Console) RMDir /r "$INSTDIR\Interface" Delete "$INSTDIR\vcredist_x64.exe" @@ -955,7 +943,7 @@ Section "-Core installation" !insertmacro MUI_STARTMENU_WRITE_END -@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ + @CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ ; Handle whichever post install options were set Call HandlePostInstallOptions From c9c36bb19e5a4434d428330de8879e918d0a8e57 Mon Sep 17 00:00:00 2001 From: utkarshgautamnyu Date: Mon, 7 Aug 2017 17:50:53 -0700 Subject: [PATCH 2/5] indentation fixes --- cmake/templates/NSIS.template.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index cfb982d59d..da33741dce 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -518,7 +518,6 @@ FunctionEnd Function AbortFunction ; Check if Express is set, if so, abort the post install options page - ; Call HandleInstallTypes ; Sets Express if ExpressInstallRadioButton is checked StrCmp $Express "1" 0 end Abort end: @@ -942,9 +941,9 @@ Section "-Core installation" Call ConditionalAddToRegisty !insertmacro MUI_STARTMENU_WRITE_END - + @CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ - + ; Handle whichever post install options were set Call HandlePostInstallOptions From b80def995fd4c9a6e6cfd5e6873544935f80b547 Mon Sep 17 00:00:00 2001 From: utkarshgautamnyu Date: Mon, 7 Aug 2017 17:53:39 -0700 Subject: [PATCH 3/5] Update NSIS.template.in --- cmake/templates/NSIS.template.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index da33741dce..9df44d6473 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -939,7 +939,7 @@ Section "-Core installation" Push "StartMenu" Push "$STARTMENU_FOLDER" Call ConditionalAddToRegisty - + !insertmacro MUI_STARTMENU_WRITE_END @CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ From dc4121f9d1bbdea78452859c82ae2fe3ee31fecf Mon Sep 17 00:00:00 2001 From: utkarshgautamnyu Date: Mon, 7 Aug 2017 17:55:45 -0700 Subject: [PATCH 4/5] Update NSIS.template.in --- cmake/templates/NSIS.template.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 9df44d6473..d072e3dd06 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -942,7 +942,7 @@ Section "-Core installation" !insertmacro MUI_STARTMENU_WRITE_END - @CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ +@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ ; Handle whichever post install options were set Call HandlePostInstallOptions From 56c695acbb1c132715c07810cf03b0fcc8040b18 Mon Sep 17 00:00:00 2001 From: utkarshgautamnyu Date: Mon, 7 Aug 2017 18:34:20 -0700 Subject: [PATCH 5/5] Update NSIS.template.in --- cmake/templates/NSIS.template.in | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index d072e3dd06..de79b49a74 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -484,16 +484,14 @@ Function InstallTypesPage StrCpy $OffsetUnits u StrCpy $Express "0" - ${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@} - ${NSD_CreateRadioButton} 30% $CurrentOffset$OffsetUnits 100% 10u "Express Install (Recommended)"; $\nInstalls High Fidelity Interface and High Fidelity Sandbox" - pop $ExpressInstallRadioButton - ${NSD_OnClick} $ExpressInstallRadioButton ChangeExpressLabel - IntOp $CurrentOffset $CurrentOffset + 15 + ${NSD_CreateRadioButton} 30% $CurrentOffset$OffsetUnits 100% 10u "Express Install (Recommended)"; $\nInstalls High Fidelity Interface and High Fidelity Sandbox" + pop $ExpressInstallRadioButton + ${NSD_OnClick} $ExpressInstallRadioButton ChangeExpressLabel + IntOp $CurrentOffset $CurrentOffset + 15 - ${NSD_CreateRadiobutton} 30% $CurrentOffset$OffsetUnits 100% 10u "Custom Install (Advanced)" - pop $CustomInstallRadioButton - ${NSD_OnClick} $CustomInstallRadioButton ChangeCustomLabel - ${EndIf} + ${NSD_CreateRadiobutton} 30% $CurrentOffset$OffsetUnits 100% 10u "Custom Install (Advanced)" + pop $CustomInstallRadioButton + ${NSD_OnClick} $CustomInstallRadioButton ChangeCustomLabel ; Express Install selected by default ${NSD_Check} $ExpressInstallRadioButton @@ -651,9 +649,11 @@ Function ReadInstallTypes StrCpy $ServerStartupState ${BST_CHECKED} StrCpy $LaunchServerNowState ${BST_CHECKED} StrCpy $LaunchClientNowState ${BST_CHECKED} + StrCpy $CleanInstallState ${BST_UNCHECKED} + StrCpy $DesktopServerState ${BST_UNCHECKED} ${If} @PR_BUILD@ == 1 - ${NSD_SetState} $CopyFromProductionCheckbox ${BST_UNCHECKED} + StrCpy $CopyFromProductionState ${BST_UNCHECKED} ${EndIf} ${EndIf} @@ -842,6 +842,8 @@ Section "-Core installation" ; Rename the incorrectly cased Raleway font Rename "$INSTDIR\resources\qml\styles-uit\RalewaySemibold.qml" "$INSTDIR\resources\qml\styles-uit\RalewaySemiBold.qml" + ExecWait "$INSTDIR\vcredist_x64.exe /install /q /norestart" + ; Remove the Old Interface directory and vcredist_x64.exe (from installs prior to Server Console) RMDir /r "$INSTDIR\Interface" Delete "$INSTDIR\vcredist_x64.exe" @@ -939,10 +941,10 @@ Section "-Core installation" Push "StartMenu" Push "$STARTMENU_FOLDER" Call ConditionalAddToRegisty - + !insertmacro MUI_STARTMENU_WRITE_END -@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ + @CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ ; Handle whichever post install options were set Call HandlePostInstallOptions