mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 01:22:33 +00:00
a7594d6ca8
* Installation for all users is the default for Power Users and Administrators * For silent installation, it is possible to use the /AllUsers or /CurrentUser command line parameter to choose for which users you want to install * Updated list of supported languages. The "red" languages from http://www.lyx.org/devel/i18n.php have been removed. * Language and dictionary names are no longer in English but are translated in the language itself * One single list with language names, ISO codes and identifiers * Both the installer and uninstaller automatically detect the user interface language * Added more space in the user interface for translated texts * Added all Python encoding files so there will be no problems with future Python scripts git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15200 a592a061-630c-0410-9148-cb99ea01b6c8
87 lines
1.8 KiB
Plaintext
87 lines
1.8 KiB
Plaintext
/*
|
|
|
|
Install type setting (current user/all users)
|
|
|
|
*/
|
|
|
|
;--------------------------------
|
|
;Macros
|
|
|
|
!macro GetDirExternal COMPONENT
|
|
|
|
ReadRegStr $R0 SHELL_CONTEXT "${APP_REGKEY_SETUP}" "${COMPONENT} Path"
|
|
|
|
${if} ${FileExists} "$R0\${BIN_${COMPONENT}}"
|
|
|
|
${if} $R0 != ""
|
|
StrCpy $Path${COMPONENT} $R0
|
|
${endif}
|
|
|
|
${endif}
|
|
|
|
!macroend
|
|
|
|
;--------------------------------
|
|
;Functions
|
|
|
|
Function InitUser
|
|
|
|
;Get directories from registry
|
|
|
|
ReadRegStr $R0 SHELL_CONTEXT "${APP_REGKEY}" ""
|
|
|
|
${if} $R0 != ""
|
|
StrCpy $INSTDIR $R0
|
|
${endif}
|
|
|
|
!insertmacro GetDirExternal LaTeX
|
|
!insertmacro GetDirExternal ImageMagick
|
|
!insertmacro GetDirExternal Ghostscript
|
|
|
|
;Set directories in dialogs
|
|
|
|
!insertmacro InitDialogExternalDir latex ${TRUE}
|
|
!insertmacro InitDialogExternalDir imagemagick ${FALSE}
|
|
!insertmacro InitDialogExternalDir ghostscript ${FALSE}
|
|
|
|
;Get LyX language
|
|
|
|
ReadRegStr $R0 SHELL_CONTEXT "${APP_REGKEY_SETUP}" "LyX Language"
|
|
|
|
${if} $R0 != ""
|
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "langselect.ini" "Field 2" "State" $R0
|
|
${endif}
|
|
|
|
FunctionEnd
|
|
|
|
;--------------------------------
|
|
;Page functions
|
|
|
|
Function PageUser
|
|
|
|
;Only show page if installing for all users is possible
|
|
${if} $AdminOrPowerUser == ${FALSE}
|
|
Call InitUser
|
|
Abort
|
|
${endif}
|
|
|
|
!insertmacro MUI_HEADER_TEXT $(TEXT_USER_TITLE) $(TEXT_USER_SUBTITLE)
|
|
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "user.ini"
|
|
|
|
FunctionEnd
|
|
|
|
Function PageUserValidate
|
|
|
|
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "user.ini" "Field 2" "State"
|
|
|
|
${if} $R0 == "1"
|
|
SetShellVarContext all
|
|
StrCpy $CurrentUserInstall ${FALSE}
|
|
${else}
|
|
SetShellVarContext current
|
|
StrCpy $CurrentUserInstall ${TRUE}
|
|
${endif}
|
|
|
|
Call InitUser
|
|
|
|
FunctionEnd |