5 Initialization function
9 #--------------------------------
10 # Installer initialization
15 ${OrIfNot} ${AtLeastWin2000}
16 MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows 2000 or later."
20 !insertmacro MULTIUSER_INIT
23 Banner::show /NOUNLOAD "Checking system"
37 !insertmacro MULTIUSER_UNINIT
41 #--------------------------------
48 # COMPONENT can be LaTeX ImageMagick and Ghostscript
49 !macro EXTERNAL_INIT COMPONENT
51 # APP_REGKEY_SETUP = "Software\${APP_NAME}${APP_SERIES_KEY}\Setup"
52 # where ${APP_NAME}${APP_SERIES_KEY} is something like LyX16
53 ReadRegStr $ComponentPath SHELL_CONTEXT "${APP_REGKEY_SETUP}" "${COMPONENT} Path"
55 # BIN_LATEX etc are defined in settings.nsh
56 ${If} ${FileExists} "$ComponentPath\${BIN_${COMPONENT}}"
57 # set variables like PathLaTeX
58 StrCpy $Path${COMPONENT} $ComponentPath
65 # Get directories of components from registry
67 ReadRegStr $LyXPath SHELL_CONTEXT "${APP_REGKEY}" ""
70 StrCpy $INSTDIR $LyXPath
73 !insertmacro EXTERNAL_INIT LaTeX
74 !insertmacro EXTERNAL_INIT ImageMagick
75 !insertmacro EXTERNAL_INIT Ghostscript
79 ReadRegStr $LyXLangName SHELL_CONTEXT "${APP_REGKEY_SETUP}" "LyX Language"
81 ${If} $LyXLangName != ""
82 StrCpy $LangName $LyXLangName