3 Install type setting (current user/all users)
7 #--------------------------------
10 !macro GetDirExternal COMPONENT
12 ReadRegStr $R0 SHELL_CONTEXT "${APP_REGKEY_SETUP}" "${COMPONENT} Path"
14 ${if} ${FileExists} "$R0\${BIN_${COMPONENT}}"
17 StrCpy $Path${COMPONENT} $R0
24 #--------------------------------
29 #Get directories from registry
31 ReadRegStr $R0 SHELL_CONTEXT "${APP_REGKEY}" ""
37 !insertmacro GetDirExternal LaTeX
38 !insertmacro GetDirExternal ImageMagick
39 !insertmacro GetDirExternal Ghostscript
41 #Set directories in dialogs
43 !insertmacro InitDialogExternalDir latex ${TRUE}
44 !insertmacro InitDialogExternalDir imagemagick ${FALSE}
45 !insertmacro InitDialogExternalDir ghostscript ${FALSE}
49 ReadRegStr $R0 SHELL_CONTEXT "${APP_REGKEY_SETUP}" "LyX Language"
52 !insertmacro MUI_INSTALLOPTIONS_WRITE "langselect.ini" "Field 2" "State" $R0
57 #--------------------------------
62 #Only show page if installing for all users is possible
63 ${if} $AdminOrPowerUser == ${FALSE}
68 !insertmacro MUI_HEADER_TEXT $(TEXT_USER_TITLE) $(TEXT_USER_SUBTITLE)
69 !insertmacro MUI_INSTALLOPTIONS_DISPLAY "user.ini"
73 Function PageUserValidate
75 !insertmacro MUI_INSTALLOPTIONS_READ $R0 "user.ini" "Field 2" "State"
78 SetShellVarContext all
79 StrCpy $CurrentUserInstall ${FALSE}
81 SetShellVarContext current
82 StrCpy $CurrentUserInstall ${TRUE}