To create an installer with LyX and all related components, download
and install the latest NSIS from http://nsis.sourceforge.net
- Also download the InetLoad plug-in from
- http://nsis.sourceforge.net/InetLoad_plug-in and save InetLoad.dll in
- the NSIS Plugins directory.
-
Open development\Win32\packaging\installer\setttings.user.nsh and modify
the settings depending on your build environment.
;Start LyX and capture the command line output\r
\r
Push '"$EXEDIR\lyxc.exe" $Parameters'\r
- CallInstDLL "$EXEDIR\nsExec.dll" ExecToLog\r
+ CallInstDLL "$EXEDIR\Console.dll" ExecToLog\r
Pop $ReturnValue ;Return value\r
\r
SectionEnd\r
;Helper DLLs for NSIS-based tools\r
\r
SetOutPath "$INSTDIR\bin"\r
- !insertmacro FileListNSISDll File "${NSISDIR}\Plugins\"\r
+ !insertmacro FileListNSISPluginsStandard File "${NSISDIR}\Plugins\"\r
+ !insertmacro FileListNSISPlugins File "${FILES_NSISPLUGINS}\"\r
\r
;Create uninstaller\r
WriteUninstaller "$INSTDIR\${SETUP_UNINSTALLER}"\r
RMDir "$INSTDIR\aiksaurus"\r
\r
;Helper DLLs for NSIS-based tools\r
- \r
- !insertmacro FileListNSISDll Delete "$INSTDIR\bin\" \r
+\r
+ !insertmacro FileListNSISPluginsStandard Delete "$INSTDIR\bin\"\r
+ !insertmacro FileListNSISPlugins Delete "$INSTDIR\bin\" \r
\r
;Shortcuts\r
\r
\r
!macroend\r
\r
-!macro FileListNSISDll COMMAND DIRECTORY\r
+!macro FileListNSISPluginsStandard COMMAND DIRECTORY\r
\r
- ${FILE}nsExec.dll"\r
${FILE}System.dll"\r
\r
!macroend\r
+\r
+!macro FileListNSISPlugins COMMAND DIRECTORY\r
+\r
+ ${FILE}Console.dll"\r
+\r
+!macroend\r
!define FILES_DVIPOSTDATA "${FILES_DEPS}\dvipost"\r
!define FILES_ASPELLDATA "${FILES_DEPS}\aspell"\r
\r
+!define FILES_NSISPLUGINS "${FILES_DEPS}\nsis"\r
+\r
;--------------------------------\r
;Locations of components to download\r
\r
;Locations of setup files for components (for bundled setup)\r
\r
!define INSTALL_LATEX "basic-miktex-2.5.2471.exe"\r
-!define INSTALL_IMAGEMAGICK "ImageMagick-6.3.0-0-Q16-windows-dll.exe"\r
+!define INSTALL_IMAGEMAGICK "ImageMagick-6.3.0-2-Q16-windows-dll.exe"\r
!define INSTALL_GHOSTSCRIPT "gs854w32.exe"\r
!define INSTALL_VIEWER "gsv48w32.exe"\r
\r
!define BIN_IMAGEMAGICK "convert.exe"\r
!define BIN_GHOSTSCRIPT "gswin32c.exe"\r
\r
+;--------------------------------\r
+;Custom NSIS plug-ins\r
+\r
+!addplugindir "${FILES_NSISPLUGINS}"\r
+\r
;--------------------------------\r
;Compession\r
\r
;--------------------------------\r
;Settings\r
\r
+Caption "PDF Viewer"\r
OutFile pdfview.exe\r
Icon "..\packaging\icons\lyx_32x32.ico"\r
SilentInstall silent\r
!macro HideConsole COMMAND_LINE\r
\r
Push `${COMMAND_LINE}`\r
- CallInstDLL "$EXEDIR\nsExec.dll" Exec\r
+ CallInstDLL "$EXEDIR\Console.dll" Exec\r
Pop $Dummy\r
\r
${if} $Dummy == "error"\r
!insertmacro SystemCall "shell32::FindExecutable(t s, t '', t .s)"\r
Call GetFileName\r
Pop $Viewer\r
- \r
+\r
+ ${if} $Viewer == ""\r
+ MessageBox MB_OK|MB_ICONEXCLAMATION "No PDF viewer is installed. \\r
+ Please install a PDF viewer such as Adobe Reader."\r
+ Quit \r
+ ${endif}\r
+\r
${if} $Viewer == "AcroRd32.exe"\r
${orif} $Viewer == "Acrobat.exe"\r
\r