]> git.lyx.org Git - features.git/blob - development/Win32/packaging/installer/setup/configure.nsh
Win installer: add support for the program rsvg
[features.git] / development / Win32 / packaging / installer / setup / configure.nsh
1 /*
2
3 configure.nsh
4
5 Write registry information and configure LyX
6
7 */
8
9 Var PathPrefix
10
11 #!define SHORTCUT '${APP_NAME} ${APP_SERIES_NAME}.lnk" "$INSTDIR\${APP_RUN}" "" "$INSTDIR\${APP_RUN}" "" "" "" "${APP_INFO}"'
12
13 #--------------------------------
14 # Registry information
15
16 Section -InstallData
17
18   # Registry information
19   WriteRegStr SHCTX ${APP_REGKEY} "" $INSTDIR
20   WriteRegStr SHCTX ${APP_REGKEY} "Version" "${APP_VERSION_NUMBER}"
21   WriteRegStr SHCTX ${APP_REGKEY_SETUP} "LaTeX Path" $PathLaTeX
22   
23   # Start Menu shortcut
24   SetOutPath "$INSTDIR\bin" # this is the folder in which the shortcut is executed
25   # we must assure that the folder is not empty (happens on silent install and can accidentally happen)
26   ${if} $StartmenuFolder == ""
27    StrCpy $StartmenuFolder "${APP_DIR}"
28   ${endif}
29   CreateDirectory "$SMPROGRAMS\$StartmenuFolder"
30   CreateShortCut "$SMPROGRAMS\$StartmenuFolder\${APP_NAME}.lnk" "$INSTDIR\${APP_RUN}" "" "$INSTDIR\${APP_RUN}" "" "" "" "${APP_INFO}"
31   # Link to www.lyx.org and to the Wiki
32   WriteINIStr "$SMPROGRAMS\$StartmenuFolder\${APP_WEBPAGE_INFO}.url" "InternetShortcut" "URL" "${APP_WEBPAGE}"
33   WriteINIStr "$SMPROGRAMS\$StartmenuFolder\${APP_WIKI_INFO}.url" "InternetShortcut" "URL" "${APP_WIKI}"
34   # create desktop icon
35   ${if} $CreateDesktopIcon == "true"
36    SetOutPath "$INSTDIR\bin"
37    CreateShortCut "$DESKTOP\${APP_NAME} ${APP_SERIES_NAME}.lnk" "$INSTDIR\${APP_RUN}" "" "$INSTDIR\${APP_RUN}" "" "" "" "${APP_INFO}"
38   ${endif}
39   
40   # Uninstaller information
41   ${If} $MultiUser.InstallMode == "CurrentUser"
42     WriteRegStr SHCTX ${APP_UNINST_KEY} "DisplayName" "${APP_NAME} ${APP_VERSION} $(TEXT_INSTALL_CURRENTUSER)"
43   ${Else}
44     WriteRegStr SHCTX ${APP_UNINST_KEY} "DisplayName" "${APP_NAME} ${APP_VERSION}"
45   ${EndIf}
46   
47   WriteRegStr SHCTX ${APP_UNINST_KEY} "UninstallString" '"$INSTDIR\${SETUP_UNINSTALLER}"'
48   WriteRegStr SHCTX ${APP_UNINST_KEY} "DisplayVersion" "${APP_VERSION}"
49   WriteRegStr SHCTX ${APP_UNINST_KEY} "DisplayIcon" "$INSTDIR\bin\lyx,0"
50   WriteRegStr SHCTX ${APP_UNINST_KEY} "URLUpdateInfo" "http://www.lyx.org/"
51   WriteRegStr SHCTX ${APP_UNINST_KEY} "URLInfoAbout" "http://www.lyx.org/about/"
52   WriteRegStr SHCTX ${APP_UNINST_KEY} "Publisher" "LyX Team"
53   WriteRegStr SHCTX ${APP_UNINST_KEY} "HelpLink" "http://www.lyx.org/internet/mailing.php"
54   WriteRegDWORD SHCTX ${APP_UNINST_KEY} "NoModify" 0x00000001
55   WriteRegDWORD SHCTX ${APP_UNINST_KEY} "NoRepair" 0x00000001
56   WriteRegStr SHCTX ${APP_UNINST_KEY} "StartMenu" "$SMPROGRAMS\$StartmenuFolder"
57   
58   # if we install over an older existing version, remove the old uninstaller information
59   ${if} $OldVersionNumber < ${APP_SERIES_KEY}
60    DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}$OldVersionNumber"
61    # also delete in the case of an emergency release
62    DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}$OldVersionNumber1"
63   ${endif}
64   
65 SectionEnd
66
67 #--------------------------------
68 # Write LyX configuration file
69
70 Section -Configure
71
72   # Associate .lyx files with LyX for current user or all users
73
74   ${if} $CreateFileAssociations == "true"
75    WriteRegStr SHCTX "${APP_DIR_REGKEY}" "" "$INSTDIR\${APP_RUN}"
76   ${endif}
77
78   # Write information about file type
79   #!define REG_FILETYPE 'WriteRegStr SHCTX "Software\Classes\${APP_REGNAME_DOC}"'
80   
81   ${if} $CreateFileAssociations == "true"
82    WriteRegStr SHCTX "${APP_DIR_REGKEY}" "OnlyWithLyX" "Yes${APP_SERIES_KEY}" # special entry to test if they were registered by this LyX version
83    WriteRegStr SHCTX "Software\Classes\${APP_REGNAME_DOC}" "" "${APP_NAME} Document"
84    WriteRegStr SHCTX "Software\Classes\${APP_REGNAME_DOC}\DefaultIcon" "" "$INSTDIR\${APP_RUN},0"
85    WriteRegStr SHCTX "Software\Classes\${APP_REGNAME_DOC}\Shell\open\command" "" '"$INSTDIR\${APP_RUN}" "%1"'
86    # we need to update also the automatically created entry about the lyx.exe
87    # otherwise .lyx-files will could be opened with an older LyX version
88    ReadRegStr $0 SHCTX "Software\Classes\Applications\${BIN_LYX}\shell\open\command" ""
89    ${if} $0 != "" # if something was found
90     WriteRegStr SHCTX "Software\Classes\Applications\${BIN_LYX}\shell\open\command" "" '"$INSTDIR\${APP_RUN}" "%1"'
91    ${endif}
92    # .lyx
93    WriteRegStr SHCTX "Software\Classes\${APP_EXT}" "" "${APP_REGNAME_DOC}"
94    WriteRegStr SHCTX "Software\Classes\${APP_EXT}" "Content Type" "${APP_MIME_TYPE}"
95    # .lyx13
96    WriteRegStr SHCTX "Software\Classes\${APP_EXT}13" "" "${APP_REGNAME_DOC}"
97    WriteRegStr SHCTX "Software\Classes\${APP_EXT}13" "Content Type" "${APP_MIME_TYPE}"
98    # .lyx14
99    WriteRegStr SHCTX "Software\Classes\${APP_EXT}14" "" "${APP_REGNAME_DOC}"
100    WriteRegStr SHCTX "Software\Classes\${APP_EXT}14" "Content Type" "${APP_MIME_TYPE}"
101    # .lyx15
102    WriteRegStr SHCTX "Software\Classes\${APP_EXT}15" "" "${APP_REGNAME_DOC}"
103    WriteRegStr SHCTX "Software\Classes\${APP_EXT}15" "Content Type" "${APP_MIME_TYPE}"
104    # .lyx16
105    WriteRegStr SHCTX "Software\Classes\${APP_EXT}16" "" "${APP_REGNAME_DOC}"
106    WriteRegStr SHCTX "Software\Classes\${APP_EXT}16" "Content Type" "${APP_MIME_TYPE}"
107    # .lyx20 don't set this, because this is designed to be opened with LyX 2.0.x
108   
109    # Refresh shell
110    ${RefreshShellIcons}
111   ${endif}
112   
113   # Install standard lyxrc.dist file
114   #SetOutPath "$INSTDIR\Resources"
115   #File "${FILES_DEPS}\Resources\lyxrc.dist"
116
117   # create the path prefix
118   # $$ represents a literal $ in an NSIS string
119   StrCpy $PathPrefix "$$LyXDir\bin;$$LyXDir\Python;$$LyXDir\Python\Lib;$$LyXDir\Perl\bin;$$LyXDir\imagemagick"
120   
121   ${if} $PathLaTeX != ""
122     StrCpy $PathPrefix "$PathPrefix;$PathLaTeX"
123   ${EndIf}
124   ${if} $PSVPath != ""
125     StrCpy $PathPrefix "$PathPrefix;$PSVPath"
126   ${endif}
127   ${if} $EditorPath != ""
128     StrCpy $PathPrefix "$PathPrefix;$EditorPath"
129   ${endif}
130   ${if} $ImageEditorPath != ""
131     StrCpy $PathPrefix "$PathPrefix;$ImageEditorPath"
132   ${endif}
133   ${if} $GhostscriptPath != ""
134    StrCpy $PathPrefix "$PathPrefix;$GhostscriptPath"
135   ${endif}
136   ${if} $SVGPath != ""
137    StrCpy $PathPrefix "$PathPrefix;$SVGPath"
138   ${endif}
139   ${if} $GnumericPath != ""
140    StrCpy $PathPrefix "$PathPrefix;$GnumericPath"
141   ${endif}
142   ${if} $PathBibTeXEditor != ""
143     StrCpy $PathPrefix "$PathPrefix;$PathBibTeXEditor"
144   ${EndIf}
145   ${if} $LilyPondPath != ""
146    StrCpy $PathPrefix "$PathPrefix;$LilyPondPath"
147   ${endif}
148   
149   # Set the path prefix in lyxrc.dist
150   ClearErrors
151   Delete "$INSTDIR\Resources\lyxrc.dist"
152   FileOpen $R1 "$INSTDIR\Resources\lyxrc.dist" w
153   # set the format to the latest LyXRC format
154   FileWrite $R1 'Format 15$\r$\n'
155   # set some general things
156   FileWrite $R1 '\screen_zoom 120$\r$\n'
157   ${if} "$PathPrefix" != ""
158    FileWrite $R1 '\path_prefix "$PathPrefix"$\r$\n'
159   ${endif}
160   
161   # use pdfview for all types of PDF files
162   FileWrite $R1 '\format "pdf5" "pdf" "PDF (LuaTeX)" "u" "pdfview" "" "document,vector,menu=export" "application/pdf"$\r$\n\
163                  \format "pdf4" "pdf" "PDF (XeTeX)" "X" "pdfview" "" "document,vector,menu=export" "application/pdf"$\r$\n\
164                  \format "pdf3" "pdf" "PDF (dvipdfm)" "m" "pdfview" "" "document,vector,menu=export" "application/pdf"$\r$\n\
165                  \format "pdf2" "pdf" "PDF (pdflatex)" "F" "pdfview" "" "document,vector,menu=export" "application/pdf"$\r$\n\
166                  \format "pdf" "pdf" "PDF (ps2pdf)" "P" "pdfview" "" "document,vector,menu=export" "application/pdf"$\r$\n'
167
168   # if LilyPondPath was found
169   # we need to add these entris because python scripts can only be executed
170   # if the full path is given
171   ${if} $LilyPondPath != ""
172    FileWrite $R1 '\format "lilypond-book" "lytex" "LilyPond book (LaTeX)" "" "" "auto" "document,menu=export" ""$\r$\n\
173                   \converter "lilypond-book" "pdflatex" "python \"$LilyPondPath\\lilypond-book.py\" --safe --pdf --latex-program=pdflatex --lily-output-dir=ly-pdf $$$$i" ""$\r$\n\
174                   \converter "lilypond-book" "xetex" "python \"$LilyPondPath\\lilypond-book.py\" --safe --pdf --latex-program=xelatex --lily-output-dir=ly-pdf $$$$i" ""$\r$\n\
175                   \converter "lilypond-book" "luatex" "python \"$LilyPondPath\\lilypond-book.py\" --safe --pdf --latex-program=lualatex --lily-output-dir=ly-pdf $$$$i" ""$\r$\n\
176                   \converter "lilypond-book" "latex" "python \"$LilyPondPath\\lilypond-book.py\" --safe --lily-output-dir=ly-eps $$$$i" ""$\r$\n'
177   ${endif}
178   FileClose $R1
179   IfErrors 0 +2
180    MessageBox MB_OK|MB_ICONEXCLAMATION "$(ModifyingConfigureFailed)" /SD IDOK
181   ClearErrors
182
183 SectionEnd
184
185 #--------------------------------
186 # Postscript printer for metafile to EPS converter
187
188 Section -PSPrinter
189
190   ${if} $MultiUser.Privileges == "Admin"
191   ${orif} $MultiUser.Privileges == "Power"
192    # Delete printer
193    ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"'
194    # Install printer and driver
195    ExecWait '$PrinterConf /if /f "$WINDIR\inf\ntprint.inf" /b "Metafile to EPS Converter" /r "FILE:" /m "MS Publisher Imagesetter"'
196   ${else}
197    MessageBox MB_OK|MB_ICONINFORMATION "$(MetafileNotAvailable)" /SD IDOK
198   ${endif}
199
200 SectionEnd
201
202 #--------------------------------
203 # Run the LyX configure.py script, so MiKTeX can download its packages
204
205 Var ConfigureReturn
206
207 Section -ConfigureScript
208
209   SetOutPath "$INSTDIR\Resources"
210   
211   # ask to update MiKTeX
212   ${if} $LaTeXInstalled == "MiKTeX"
213    Call UpdateMiKTeX # function from latex.nsh
214    # install all necessary packages at once because this is much faster then to install the packages one by one
215    # NOTE: the babel packages installation is only necessary for LyX 2.1.2 ans 2.1.3 because of the restructuration
216    # of babel in MiKTeX. This can be removed for LyX 2.1.4
217    # (due to a missing feature in MiKTeX each babel package has to be installed separately)
218    DetailPrint $(TEXT_CONFIGURE_LYX)
219    ${if} $MultiUser.Privileges != "Admin"
220    ${andif} $MultiUser.Privileges != "Power"
221     # call the non-admin version
222     # at first we need to synchronize the package database
223     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--update-db"'
224     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install-some=$INSTDIR\Resources\Packages.txt"'
225     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-albanian"'
226     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-bahasa"'
227     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-basque"'
228     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-breton"'
229     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-bulgarian"'
230     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-catalan"'
231     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-croatian"'
232     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-czech"'
233     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-danish"'
234     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-dutch"'
235     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-english"'
236     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-esperanto"'
237     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-estonian"'
238     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-finnish"'
239     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-french"'
240     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-galician"'
241     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-german"'
242     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-greek"'
243     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-hebrew"'
244     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-hungarian"'
245     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-icelandic"'
246     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-interlingua"'
247     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-irish"'
248     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-italian"'
249     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-kurmanji"'
250     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-latin"'
251     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-latvian"'
252     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-norsk"'
253     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-polish"'
254     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-portuges"'
255     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-romanian"'
256     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-russian"'
257     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-samin"'
258     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-scottish"'
259     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-serbian"'
260     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-serbianc"'
261     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-slovak"'
262     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-slovenian"'
263     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-sorbian"'
264     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-spanish"'
265     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-swedish"'
266     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-thai"'
267     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-turkish"'
268     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-ukrainian"'
269     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-vietnamese"'
270     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-welsh"'
271    ${else}
272     ${if} $MiKTeXUser != "HKCU" # call the admin version
273      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--update-db"'
274      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install-some=$INSTDIR\Resources\Packages.txt"'
275      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-albanian"'
276      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-bahasa"'
277      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-basque"'
278      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-breton"'
279      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-bulgarian"'
280      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-catalan"'
281      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-croatian"'
282      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-czech"'
283      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-danish"'
284      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-dutch"'
285      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-english"'
286      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-esperanto"'
287      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-estonian"'
288      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-finnish"'
289      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-french"'
290      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-galician"'
291      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-german"'
292      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-greek"'
293      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-hebrew"'
294      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-hungarian"'
295      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-icelandic"'
296      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-interlingua"'
297      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-irish"'
298      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-italian"'
299      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-kurmanji"'
300      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-latin"'
301      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-latvian"'
302      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-norsk"'
303      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-polish"'
304      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-portuges"'
305      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-romanian"'
306      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-russian"'
307      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-samin"'
308      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-scottish"'
309      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-serbian"'
310      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-serbianc"'
311      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-slovak"'
312      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-slovenian"'
313      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-sorbian"'
314      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-spanish"'
315      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-swedish"'
316      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-thai"'
317      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-turkish"'
318      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-ukrainian"'
319      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-vietnamese"'
320      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install=babel-welsh"'
321     ${else}
322      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--update-db"'
323      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install-some=$INSTDIR\Resources\Packages.txt"'
324      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-albanian"'
325      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-bahasa"'
326      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-basque"'
327      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-breton"'
328      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-bulgarian"'
329      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-catalan"'
330      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-croatian"'
331      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-czech"'
332      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-danish"'
333      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-dutch"'
334      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-english"'
335      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-esperanto"'
336      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-estonian"'
337      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-finnish"'
338      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-french"'
339      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-galician"'
340      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-german"'
341      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-greek"'
342      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-hebrew"'
343      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-hungarian"'
344      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-icelandic"'
345      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-interlingua"'
346      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-irish"'
347      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-italian"'
348      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-kurmanji"'
349      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-latin"'
350      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-latvian"'
351      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-norsk"'
352      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-polish"'
353      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-portuges"'
354      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-romanian"'
355      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-russian"'
356      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-samin"'
357      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-scottish"'
358      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-serbian"'
359      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-serbianc"'
360      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-slovak"'
361      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-slovenian"'
362      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-sorbian"'
363      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-spanish"'
364      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-swedish"'
365      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-thai"'
366      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-turkish"'
367      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-ukrainian"'
368      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-vietnamese"'
369      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install=babel-welsh"'
370     ${endif}
371    ${endif}
372   ${endif}
373   
374   DetailPrint $(TEXT_CONFIGURE_LYX)
375   nsExec::ExecToLog '"$INSTDIR\Python\python.exe" "$INSTDIR\Resources\configure.py"'
376   # $ConfigureReturn is "0" if successful, otherwise "1"
377   Pop $ConfigureReturn # Return value
378
379 SectionEnd
380
381 #--------------------------------
382 # Desktop shortcut
383
384 Function StartLyX
385
386   # run LyX in a command line window to give the users feedback about
387   # the time consuming LaTeX package installation
388   
389   #Exec 'cmd /K " "$INSTDIR\bin\lyx.exe""'
390   Exec "$INSTDIR\${APP_RUN}"
391
392 FunctionEnd
393
394 /*Function CheckDesktopShortcut
395
396   # Enable desktop icon creation when there is an icon already
397   # Old shortcuts need to be updated
398   
399   ${If} ${FileExists} "$DESKTOP\${APP_NAME} ${APP_SERIES_NAME}.lnk"
400     ${NSD_SetState} $mui.FinishPage.ShowReadme ${BST_CHECKED}
401   ${EndIf}
402
403 FunctionEnd
404
405 Function CreateDesktopShortcut
406
407   # Desktop icon creation is an option on the finish page
408   SetOutPath "$INSTDIR\bin"
409   CreateShortCut "$DESKTOP\${APP_NAME} ${APP_SERIES_NAME}.lnk" "$INSTDIR\${APP_RUN}" "" "$INSTDIR\${APP_RUN}" "" "" "" "${APP_INFO}"
410
411 FunctionEnd*/
412