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 # Warn the user when no Administrator or Power user privileges are available
35 # These privileges are required to install ImageMagick or Ghostscript
36 ${If} $MultiUser.Privileges != "Admin"
37 ${andif} $MultiUser.Privileges != "Power"
38 MessageBox MB_OK|MB_ICONEXCLAMATION $(TEXT_NO_PRIVILEDGES)
41 # Show banner while installer is intializating
42 Banner::show /NOUNLOAD "Checking system"
56 !insertmacro PRINTER_INIT
57 !insertmacro MULTIUSER_UNINIT
61 #--------------------------------
67 # COMPONENT can be LaTeX ImageMagick and Ghostscript
68 !macro EXTERNAL_INIT COMPONENT
70 # APP_REGKEY_SETUP = "Software\${APP_NAME}${APP_SERIES_KEY}\Setup"
71 # where ${APP_NAME}${APP_SERIES_KEY} is something like LyX16
72 ReadRegStr $ComponentPath SHELL_CONTEXT "${APP_REGKEY_SETUP}" "${COMPONENT} Path"
74 # BIN_LATEX etc are defined in settings.nsh
75 ${If} ${FileExists} "$ComponentPath\${BIN_${COMPONENT}}"
76 # set variables like PathLaTeX
77 StrCpy $Path${COMPONENT} $ComponentPath
84 # Get directories of components from registry
86 !insertmacro EXTERNAL_INIT LaTeX
87 !insertmacro EXTERNAL_INIT ImageMagick
88 !insertmacro EXTERNAL_INIT Ghostscript
92 ReadRegStr $LyXLangName SHELL_CONTEXT "${APP_REGKEY_SETUP}" "LyX Language"
94 ${If} $LyXLangName != ""
95 StrCpy $LangName $LyXLangName