5 Initialization function
9 #--------------------------------
10 # Installer initialization
14 ${If} ${AtLeastWinVista}
15 StrCpy $PrinterConf "printui.exe"
17 StrCpy $PrinterConf "rundll32.exe printui.dll,PrintUIEntry"
25 ${OrIfNot} ${AtLeastWin2000}
26 MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows 2000 or later."
30 !insertmacro PRINTER_INIT
31 !insertmacro MULTIUSER_INIT
34 Banner::show /NOUNLOAD "Checking system"
48 !insertmacro PRINTER_INIT
49 !insertmacro MULTIUSER_UNINIT
53 #--------------------------------
60 # COMPONENT can be LaTeX ImageMagick and Ghostscript
61 !macro EXTERNAL_INIT COMPONENT
63 # APP_REGKEY_SETUP = "Software\${APP_NAME}${APP_SERIES_KEY}\Setup"
64 # where ${APP_NAME}${APP_SERIES_KEY} is something like LyX16
65 ReadRegStr $ComponentPath SHELL_CONTEXT "${APP_REGKEY_SETUP}" "${COMPONENT} Path"
67 # BIN_LATEX etc are defined in settings.nsh
68 ${If} ${FileExists} "$ComponentPath\${BIN_${COMPONENT}}"
69 # set variables like PathLaTeX
70 StrCpy $Path${COMPONENT} $ComponentPath
77 # Get directories of components from registry
79 ReadRegStr $LyXPath SHELL_CONTEXT "${APP_REGKEY}" ""
82 StrCpy $INSTDIR $LyXPath
85 !insertmacro EXTERNAL_INIT LaTeX
86 !insertmacro EXTERNAL_INIT ImageMagick
87 !insertmacro EXTERNAL_INIT Ghostscript
91 ReadRegStr $LyXLangName SHELL_CONTEXT "${APP_REGKEY_SETUP}" "LyX Language"
93 ${If} $LyXLangName != ""
94 StrCpy $LangName $LyXLangName