mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:37:29 +02:00
handle client section in component-less install
This commit is contained in:
parent
6ee6f88087
commit
932c55ca08
4 changed files with 21 additions and 18 deletions
|
@ -62,6 +62,16 @@ macro(GENERATE_INSTALLERS)
|
||||||
if (CLIENT_ONLY OR SERVER_ONLY)
|
if (CLIENT_ONLY OR SERVER_ONLY)
|
||||||
set(CPACK_MONOLITHIC_INSTALL 1)
|
set(CPACK_MONOLITHIC_INSTALL 1)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# setup conditional checks for server component selection depending on
|
||||||
|
# the inclusion of the server component at all
|
||||||
|
if (CLIENT_ONLY)
|
||||||
|
set(SERVER_COMPONENT_CONDITIONAL "0 == 1")
|
||||||
|
set(CLIENT_COMPONENT_CONDITIONAL "1 == 1")
|
||||||
|
else ()
|
||||||
|
set(SERVER_COMPONENT_CONDITIONAL "\\\${SectionIsSelected} \\\${${SERVER_COMPONENT}}")
|
||||||
|
set(CLIENT_COMPONENT_CONDITIONAL "\\\${SectionIsSelected} \\\${${CLIENT_COMPONENT}}")
|
||||||
|
endif ()
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
# produce a drag and drop DMG on OS X
|
# produce a drag and drop DMG on OS X
|
||||||
set(CPACK_GENERATOR "DragNDrop")
|
set(CPACK_GENERATOR "DragNDrop")
|
||||||
|
|
|
@ -156,14 +156,6 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
set(CUSTOM_INSTALL_REG_KEY "CustomInstall")
|
set(CUSTOM_INSTALL_REG_KEY "CustomInstall")
|
||||||
set(CLIENT_ID_REG_KEY "ClientGUID")
|
set(CLIENT_ID_REG_KEY "ClientGUID")
|
||||||
set(GA_TRACKING_ID $ENV{GA_TRACKING_ID})
|
set(GA_TRACKING_ID $ENV{GA_TRACKING_ID})
|
||||||
|
|
||||||
# setup conditional checks for server component selection depending on
|
|
||||||
# the inclusion of the server component at all
|
|
||||||
if (CLIENT_ONLY)
|
|
||||||
set(SERVER_COMPONENT_CONDITIONAL "0 == 1")
|
|
||||||
else ()
|
|
||||||
set(SERVER_COMPONENT_CONDITIONAL "\${SectionIsSelected} \${${SERVER_COMPONENT_NAME}}")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# print out some results for testing this new build feature
|
# print out some results for testing this new build feature
|
||||||
|
|
|
@ -47,3 +47,4 @@ set(INSTALLER_HEADER_IMAGE "@INSTALLER_HEADER_IMAGE@")
|
||||||
set(UNINSTALLER_HEADER_IMAGE "@UNINSTALLER_HEADER_IMAGE@")
|
set(UNINSTALLER_HEADER_IMAGE "@UNINSTALLER_HEADER_IMAGE@")
|
||||||
set(ADD_REMOVE_ICON_PATH "@ADD_REMOVE_ICON_PATH@")
|
set(ADD_REMOVE_ICON_PATH "@ADD_REMOVE_ICON_PATH@")
|
||||||
set(SERVER_COMPONENT_CONDITIONAL "@SERVER_COMPONENT_CONDITIONAL@")
|
set(SERVER_COMPONENT_CONDITIONAL "@SERVER_COMPONENT_CONDITIONAL@")
|
||||||
|
set(CLIENT_COMPONENT_CONDITIONAL "@CLIENT_COMPONENT_CONDITIONAL@")
|
||||||
|
|
|
@ -649,7 +649,7 @@ Function PostInstallOptionsPage
|
||||||
StrCpy $CurrentOffset 0
|
StrCpy $CurrentOffset 0
|
||||||
StrCpy $OffsetUnits u
|
StrCpy $OffsetUnits u
|
||||||
|
|
||||||
${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
|
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Create a desktop shortcut for @INTERFACE_HF_SHORTCUT_NAME@"
|
${NSD_CreateCheckbox} 0 $CurrentOffset$OffsetUnits 100% 10u "&Create a desktop shortcut for @INTERFACE_HF_SHORTCUT_NAME@"
|
||||||
Pop $DesktopClientCheckbox
|
Pop $DesktopClientCheckbox
|
||||||
IntOp $CurrentOffset $CurrentOffset + 15
|
IntOp $CurrentOffset $CurrentOffset + 15
|
||||||
|
@ -681,7 +681,7 @@ Function PostInstallOptionsPage
|
||||||
IntOp $CurrentOffset $CurrentOffset + 15
|
IntOp $CurrentOffset $CurrentOffset + 15
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
|
${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"
|
||||||
Pop $LaunchClientNowCheckbox
|
Pop $LaunchClientNowCheckbox
|
||||||
IntOp $CurrentOffset $CurrentOffset + 30
|
IntOp $CurrentOffset $CurrentOffset + 30
|
||||||
|
@ -711,7 +711,7 @@ Function PostInstallOptionsPage
|
||||||
|
|
||||||
${If} @PR_BUILD@ == 1
|
${If} @PR_BUILD@ == 1
|
||||||
; a PR build defaults all install options expect LaunchServerNowCheckbox, LaunchClientNowCheckbox and the settings copy to unchecked
|
; a PR build defaults all install options expect LaunchServerNowCheckbox, LaunchClientNowCheckbox and the settings copy to unchecked
|
||||||
${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
|
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
${NSD_SetState} $DesktopClientCheckbox ${BST_UNCHECKED}
|
${NSD_SetState} $DesktopClientCheckbox ${BST_UNCHECKED}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
|
@ -774,7 +774,7 @@ Function ReadInstallTypes
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function ReadPostInstallOptions
|
Function ReadPostInstallOptions
|
||||||
${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
|
${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}
|
||||||
|
@ -797,19 +797,19 @@ Function ReadPostInstallOptions
|
||||||
${NSD_GetState} $LaunchServerNowCheckbox $LaunchServerNowState
|
${NSD_GetState} $LaunchServerNowCheckbox $LaunchServerNowState
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
|
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
; check if we need to launch the client post-install
|
; check if we need to launch the client post-install
|
||||||
${NSD_GetState} $LaunchClientNowCheckbox $LaunchClientNowState
|
${NSD_GetState} $LaunchClientNowCheckbox $LaunchClientNowState
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
|
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
; check if the user asked for a clean install
|
; check if the user asked for a clean install
|
||||||
${NSD_GetState} $CleanInstallCheckbox $CleanInstallState
|
${NSD_GetState} $CleanInstallCheckbox $CleanInstallState
|
||||||
${EndIf}
|
${EndIf}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function HandlePostInstallOptions
|
Function HandlePostInstallOptions
|
||||||
${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
|
${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}
|
||||||
CreateShortCut "$DESKTOP\@INTERFACE_HF_SHORTCUT_NAME@.lnk" "$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"
|
CreateShortCut "$DESKTOP\@INTERFACE_HF_SHORTCUT_NAME@.lnk" "$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"
|
||||||
|
@ -849,7 +849,7 @@ Function HandlePostInstallOptions
|
||||||
${EndIf}
|
${EndIf}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
|
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
; check if the user asked for a clean install
|
; check if the user asked for a clean install
|
||||||
${If} $CleanInstallState == ${BST_CHECKED}
|
${If} $CleanInstallState == ${BST_CHECKED}
|
||||||
SetShellVarContext current
|
SetShellVarContext current
|
||||||
|
@ -1026,7 +1026,7 @@ Section "-Core installation"
|
||||||
@CPACK_NSIS_CREATE_ICONS_EXTRA@
|
@CPACK_NSIS_CREATE_ICONS_EXTRA@
|
||||||
|
|
||||||
; Conditional handling for Interface specific options
|
; Conditional handling for Interface specific options
|
||||||
${If} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
|
${If} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\@INTERFACE_SHORTCUT_NAME@.lnk" \
|
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\@INTERFACE_SHORTCUT_NAME@.lnk" \
|
||||||
"$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"
|
"$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"
|
||||||
|
|
||||||
|
@ -1185,7 +1185,7 @@ Function .onSelChange
|
||||||
!insertmacro SectionList MaybeSelectionChanged
|
!insertmacro SectionList MaybeSelectionChanged
|
||||||
|
|
||||||
; if neither component is selected, disable the install button
|
; if neither component is selected, disable the install button
|
||||||
${IfNot} ${SectionIsSelected} ${@CLIENT_COMPONENT_NAME@}
|
${IfNot} @CLIENT_COMPONENT_CONDITIONAL@
|
||||||
${AndIfNot} @SERVER_COMPONENT_CONDITIONAL@
|
${AndIfNot} @SERVER_COMPONENT_CONDITIONAL@
|
||||||
GetDlgItem $0 $HWNDPARENT 1
|
GetDlgItem $0 $HWNDPARENT 1
|
||||||
EnableWindow $0 0
|
EnableWindow $0 0
|
||||||
|
|
Loading…
Reference in a new issue