mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 00:44:38 +02:00
Add logging to the windows installer to track install options
and install steps
This commit is contained in:
parent
1f06c87580
commit
48a48883b0
2 changed files with 33 additions and 1 deletions
|
@ -54,3 +54,4 @@ set(CLIENT_COMPONENT_CONDITIONAL "@CLIENT_COMPONENT_CONDITIONAL@")
|
||||||
set(INSTALLER_TYPE "@INSTALLER_TYPE@")
|
set(INSTALLER_TYPE "@INSTALLER_TYPE@")
|
||||||
set(APP_USER_MODEL_ID "@APP_USER_MODEL_ID@")
|
set(APP_USER_MODEL_ID "@APP_USER_MODEL_ID@")
|
||||||
set(BYPASS_SIGNING "@BYPASS_SIGNING@")
|
set(BYPASS_SIGNING "@BYPASS_SIGNING@")
|
||||||
|
set(HF_CMAKE_DIR "@HF_CMAKE_DIR@")
|
||||||
|
|
|
@ -28,6 +28,11 @@
|
||||||
|
|
||||||
!include "WinVer.nsh"
|
!include "WinVer.nsh"
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;Include Installer Logging
|
||||||
|
!addincludedir "@HF_CMAKE_DIR@\installer"
|
||||||
|
!include "TextLog.nsh"
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
; Utilities and Functions
|
; Utilities and Functions
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
@ -375,6 +380,10 @@ Var GAClientID
|
||||||
!insertmacro CreateGUID $GAClientID
|
!insertmacro CreateGUID $GAClientID
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
!macro LogStep Category Action Label Value
|
||||||
|
${LogText} "Step: ${Category} ${Action} ${Label} ${Value}"
|
||||||
|
!macroend
|
||||||
|
|
||||||
!macro GoogleAnalytics Category Action Label Value
|
!macro GoogleAnalytics Category Action Label Value
|
||||||
${If} "@GA_TRACKING_ID@" != ""
|
${If} "@GA_TRACKING_ID@" != ""
|
||||||
Push $0
|
Push $0
|
||||||
|
@ -557,11 +566,13 @@ Var Express
|
||||||
!macro MaybeSkipPage
|
!macro MaybeSkipPage
|
||||||
; Check if Express is set, if so, abort the post install options page
|
; Check if Express is set, if so, abort the post install options page
|
||||||
${If} $Express == "1"
|
${If} $Express == "1"
|
||||||
|
${LogText} "Express Install: Skipping Post Install Options Page"
|
||||||
Abort
|
Abort
|
||||||
${EndIf}
|
${EndIf}
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!macro DownloadSlideshowImages
|
!macro DownloadSlideshowImages
|
||||||
|
${LogText} "Download Slideshow Images"
|
||||||
InitPluginsDir
|
InitPluginsDir
|
||||||
|
|
||||||
Push $0
|
Push $0
|
||||||
|
@ -583,32 +594,40 @@ Var Express
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
Function OnUserAbort
|
Function OnUserAbort
|
||||||
|
!insertmacro LogStep "Installer" "Abort" "User Abort" ""
|
||||||
!insertmacro GoogleAnalytics "Installer" "Abort" "User Abort" ""
|
!insertmacro GoogleAnalytics "Installer" "Abort" "User Abort" ""
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
Function PageWelcomePre
|
Function PageWelcomePre
|
||||||
|
!insertmacro LogStep "Installer" "Welcome" "" ""
|
||||||
!insertmacro GoogleAnalytics "Installer" "Welcome" "" ""
|
!insertmacro GoogleAnalytics "Installer" "Welcome" "" ""
|
||||||
!insertmacro DownloadSlideshowImages
|
!insertmacro DownloadSlideshowImages
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
Function PageLicensePre
|
Function PageLicensePre
|
||||||
|
!insertmacro LogStep "Installer" "License" "" ""
|
||||||
!insertmacro GoogleAnalytics "Installer" "License" "" ""
|
!insertmacro GoogleAnalytics "Installer" "License" "" ""
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
Function PageDirectoryPre
|
Function PageDirectoryPre
|
||||||
!insertmacro MaybeSkipPage
|
!insertmacro MaybeSkipPage
|
||||||
|
!insertmacro LogStep "Installer" "Directory" "" ""
|
||||||
!insertmacro GoogleAnalytics "Installer" "Directory" "" ""
|
!insertmacro GoogleAnalytics "Installer" "Directory" "" ""
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
Function PageStartMenuPre
|
Function PageStartMenuPre
|
||||||
!insertmacro MaybeSkipPage
|
!insertmacro MaybeSkipPage
|
||||||
|
!insertmacro LogStep "Installer" "StartMenu" "" ""
|
||||||
!insertmacro GoogleAnalytics "Installer" "StartMenu" "" ""
|
!insertmacro GoogleAnalytics "Installer" "StartMenu" "" ""
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
Function PageComponentsPre
|
Function PageComponentsPre
|
||||||
!insertmacro MaybeSkipPage
|
!insertmacro MaybeSkipPage
|
||||||
|
!insertmacro LogStep "Installer" "Components" "" ""
|
||||||
!insertmacro GoogleAnalytics "Installer" "Components" "" ""
|
!insertmacro GoogleAnalytics "Installer" "Components" "" ""
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
Function PageInstallFilesPre
|
Function PageInstallFilesPre
|
||||||
|
!insertmacro LogStep "Installer" "Install" "" ""
|
||||||
!insertmacro GoogleAnalytics "Installer" "Install" "" ""
|
!insertmacro GoogleAnalytics "Installer" "Install" "" ""
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
!macro SetInstallOption Checkbox OptionName Default
|
!macro SetInstallOption Checkbox OptionName Default
|
||||||
|
${LogText} "SetInstallOption ${OptionName} ${Default}"
|
||||||
; reads the value for the given install option to the registry
|
; reads the value for the given install option to the registry
|
||||||
ReadRegStr $0 HKLM "@REGISTRY_HKLM_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\@POST_INSTALL_OPTIONS_REG_GROUP@" "${OptionName}"
|
ReadRegStr $0 HKLM "@REGISTRY_HKLM_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\@POST_INSTALL_OPTIONS_REG_GROUP@" "${OptionName}"
|
||||||
|
|
||||||
|
@ -625,6 +644,7 @@ FunctionEnd
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
Function InstallTypesPage
|
Function InstallTypesPage
|
||||||
|
!insertmacro LogStep "Installer" "Install Types" "" ""
|
||||||
!insertmacro GoogleAnalytics "Installer" "Install Types" "" ""
|
!insertmacro GoogleAnalytics "Installer" "Install Types" "" ""
|
||||||
|
|
||||||
!insertmacro MUI_HEADER_TEXT "Choose Installation Type" "Express or Custom Install"
|
!insertmacro MUI_HEADER_TEXT "Choose Installation Type" "Express or Custom Install"
|
||||||
|
@ -688,6 +708,7 @@ FunctionEnd
|
||||||
|
|
||||||
Function StartInstallSlideshow
|
Function StartInstallSlideshow
|
||||||
; create a slideshow file based on what files we have available
|
; create a slideshow file based on what files we have available
|
||||||
|
${LogText} "Start Installs Slideshow"
|
||||||
|
|
||||||
; stash $0 and $1
|
; stash $0 and $1
|
||||||
Push $0
|
Push $0
|
||||||
|
@ -730,7 +751,11 @@ Function StartInstallSlideshow
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function PostInstallOptionsPage
|
Function PostInstallOptionsPage
|
||||||
|
|
||||||
|
${LogText} "Install Directory: $INSTDIR"
|
||||||
|
|
||||||
!insertmacro MaybeSkipPage
|
!insertmacro MaybeSkipPage
|
||||||
|
!insertmacro LogStep "Installer" "Post Install Options" "" ""
|
||||||
!insertmacro GoogleAnalytics "Installer" "Post Install Options" "" ""
|
!insertmacro GoogleAnalytics "Installer" "Post Install Options" "" ""
|
||||||
|
|
||||||
!insertmacro MUI_HEADER_TEXT "Setup Options" ""
|
!insertmacro MUI_HEADER_TEXT "Setup Options" ""
|
||||||
|
@ -1225,6 +1250,7 @@ Section "-Core installation"
|
||||||
; Handle whichever post install options were set
|
; Handle whichever post install options were set
|
||||||
Call HandlePostInstallOptions
|
Call HandlePostInstallOptions
|
||||||
|
|
||||||
|
!insertmacro LogStep "Installer" "Done" "" ""
|
||||||
!insertmacro GoogleAnalytics "Installer" "Done" "" ""
|
!insertmacro GoogleAnalytics "Installer" "Done" "" ""
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
@ -1232,7 +1258,6 @@ SectionEnd
|
||||||
|
|
||||||
!macro PromptForRunningApplication applicationName displayName action prompter
|
!macro PromptForRunningApplication applicationName displayName action prompter
|
||||||
!define UniqueID ${__LINE__}
|
!define UniqueID ${__LINE__}
|
||||||
|
|
||||||
Prompt_${UniqueID}:
|
Prompt_${UniqueID}:
|
||||||
|
|
||||||
${nsProcess::FindProcess} ${applicationName} $R0
|
${nsProcess::FindProcess} ${applicationName} $R0
|
||||||
|
@ -1478,6 +1503,11 @@ InstallDirRegKey HKLM "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_RE
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
|
|
||||||
|
Delete "$TEMP\hifi_install.log"
|
||||||
|
${LogSetFileName} "$TEMP\hifi_install.log"
|
||||||
|
${LogSetOn}
|
||||||
|
${LogText} "In .onInit"
|
||||||
|
|
||||||
!ifdef INNER
|
!ifdef INNER
|
||||||
; If INNER is defined, then we aren't supposed to do anything except write out
|
; If INNER is defined, then we aren't supposed to do anything except write out
|
||||||
; the installer. This is better than processing a command line option as it means
|
; the installer. This is better than processing a command line option as it means
|
||||||
|
@ -1495,6 +1525,7 @@ Function .onInit
|
||||||
!insertmacro GoogleAnalytics "Installer" "Start" "$CampaignName" ""
|
!insertmacro GoogleAnalytics "Installer" "Start" "$CampaignName" ""
|
||||||
|
|
||||||
; make sure none of the installed applications are still running
|
; make sure none of the installed applications are still running
|
||||||
|
${LogText} "Checking For Running Applications"
|
||||||
!insertmacro CheckForRunningApplications "installed" "Installer"
|
!insertmacro CheckForRunningApplications "installed" "Installer"
|
||||||
${nsProcess::Unload}
|
${nsProcess::Unload}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue