Section -Core SecCore
- #Install and register the core LyX files
-
+ # Install and register the core LyX files
+ # Initializes the plug-ins dir ($PLUGINSDIR) if not already initialized.
+ # $PLUGINSDIR is automatically deleted when the installer exits.
InitPluginsDir
- #Binaries
+ # Binaries
SetOutPath "$INSTDIR\bin"
+ # launcher becomes lyx.exe while the real lyx.exe is renamed to lyxc.exe
File "${FILES_LAUNCHER}\lyx.exe"
File /oname=lyxc.exe "${FILES_LYX}\bin\lyx.exe"
+ # The macros are defined in filelists.nsh
+ # the parameters are COMMAND DIRECTORY that form command '${COMMAND} "${DIRECTORY}files"
+'
!insertmacro FileListLyXBin File "${FILES_LYX}\bin\"
!insertmacro FileListQtBin File "${FILES_QT}\bin\"
!insertmacro FileListPDFViewBin File "${FILES_PDFVIEW}\"
!insertmacro FileListPDFToolsBin File "${FILES_PDFTOOLS}\"
- #Icons
+ # Icons
SetOutPath "$INSTDIR\bin"
!insertmacro FileListLyXIcons File "${FILES_ICONS}\"
- #Resources
+ # Resources
SetOutPath "$INSTDIR"
+ # recursively copy all files under Resources
File /r "${FILES_LYX}\Resources"
SetOutPath "$INSTDIR\Resources\fonts"
+ # put additional fonts to Resources\fonts
!insertmacro FileListFonts File "${FILES_FONTS}\"
#Components of Python
SetOutPath "$INSTDIR\python\Lib\encodings"
!insertmacro FileListPythonLibEncodings File "${FILES_PYTHON}\Lib\encodings\"
- #Aspell
+ # Aspell
+ # copy installer to pluginsdir (a temp dir)
File /oname=$PLUGINSDIR\AspellData.exe "${FILES_ASPELLDATA}\AspellData.exe"
+ # silently install AspellData.exe (/S option)
${if} $CurrentUserInstall == ${TRUE}
ExecWait '"$PLUGINSDIR\AspellData.exe" /S /CurrentUser'
${else}
ExecWait '"$PLUGINSDIR\AspellData.exe" /S /AllUsers'
${endif}
+ # remove the installer
Delete "$PLUGINSDIR\AspellData.exe"
- #Aiksarus data
+ # Aiksarus data
SetOutPath "$INSTDIR\aiksaurus"
!insertmacro FileListAiksaurusData File "${FILES_AIKSAURUS}\"
- #Helper DLLs for NSIS-based tools
+ # Helper DLLs for NSIS-based tools
SetOutPath "$INSTDIR\bin"
!insertmacro FileListNSISPluginsStandard File "${NSISDIR}\Plugins\"
!insertmacro FileListNSISPlugins File "${FILES_NSISPLUGINS}\"
- #Create uninstaller
+ # Create uninstaller
WriteUninstaller "$INSTDIR\${SETUP_UNINSTALLER}"
SectionEnd
\r
!include "include\declarations.nsh"\r
\r
+#--------------------------------\r
+# The following commands use makensis to compile two applications.\r
+# Although these applications are written in NSIS, they do not install anything.\r
+\r
#--------------------------------\r
#Compile the launcher\r
\r
\r
#--------------------------------\r
#LyX Installer, output file can be specified using command line option\r
-# /DExeFile=/path/to/installer\r
+# /DExeFile=/path/to/installer or /DBundleExeFile=/path/to/installer if \r
+# SETUPTYPE_BUNDLE is defined.\r
\r
-!ifdef ExeFile\r
+# bundle installer\r
!ifdef SETUPTYPE_BUNDLE\r
+!ifdef BundleExeFile\r
OutFile "${BundleExeFile}"\r
!else\r
-OutFile "${ExeFile}"\r
+Outfile "${SETUP_EXE}"\r
!endif\r
+# regular installer \r
+!else\r
+!ifdef ExeFile\r
+OutFile "${ExeFile}"\r
!else\r
Outfile "${SETUP_EXE}"\r
!endif\r
+!endif\r
\r
#--------------------------------\r
#Components\r