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
35 !ifndef BUNDLE_IMAGEMAGICK & BUNDLE_GHOSTSCRIPT
36 # Warn the user when no Administrator or Power user privileges are available
37 # These privileges are required to install ImageMagick or Ghostscript
38 ${If} $MultiUser.Privileges != "Admin"
39 ${AndIf} $MultiUser.Privileges != "Power"
40 MessageBox MB_OK|MB_ICONEXCLAMATION $(TEXT_NO_PRIVILEDGES)
44 # Show banner while installer is intializating
45 Banner::show /NOUNLOAD "Checking system"
59 !insertmacro PRINTER_INIT
60 !insertmacro MULTIUSER_UNINIT
64 #--------------------------------
70 # COMPONENT can be LaTeX ImageMagick and Ghostscript
71 !macro EXTERNAL_INIT COMPONENT
73 # APP_REGKEY_SETUP = "Software\${APP_NAME}${APP_SERIES_KEY}\Setup"
74 # where ${APP_NAME}${APP_SERIES_KEY} is something like LyX16
75 ReadRegStr $ComponentPath SHELL_CONTEXT "${APP_REGKEY_SETUP}" "${COMPONENT} Path"
77 # BIN_LATEX etc are defined in settings.nsh
78 ${If} ${FileExists} "$ComponentPath\${BIN_${COMPONENT}}"
79 # set variables like PathLaTeX
80 StrCpy $Path${COMPONENT} $ComponentPath
87 # Get directories of components from registry
89 !insertmacro EXTERNAL_INIT LaTeX
90 !insertmacro EXTERNAL_INIT ImageMagick
91 !insertmacro EXTERNAL_INIT Ghostscript
95 ReadRegStr $LyXLangName SHELL_CONTEXT "${APP_REGKEY_SETUP}" "LyX Language"
97 ${If} $LyXLangName != ""
98 StrCpy $LangName $LyXLangName