From 129a520bd9d2e346c2074ad2c01cc105407522eb Mon Sep 17 00:00:00 2001 From: Joost Verburg Date: Mon, 6 Nov 2006 21:51:43 +0000 Subject: [PATCH] * Custom NSIS plug-ins will be included in the dependency packages * New Console plug-in with support for restricted users * Warning message if no PDF viewer is installed git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15773 a592a061-630c-0410-9148-cb99ea01b6c8 --- INSTALL.Win32 | 4 ---- development/Win32/launcher/launcher.nsi | 2 +- .../Win32/packaging/installer/components/core.nsh | 3 ++- .../packaging/installer/components/uninstall.nsh | 5 +++-- .../Win32/packaging/installer/include/filelists.nsh | 9 +++++++-- development/Win32/packaging/installer/settings.nsh | 9 ++++++++- development/Win32/pdfview/pdfview.nsi | 11 +++++++++-- 7 files changed, 30 insertions(+), 13 deletions(-) diff --git a/INSTALL.Win32 b/INSTALL.Win32 index 080de517c9..a796ee3787 100644 --- a/INSTALL.Win32 +++ b/INSTALL.Win32 @@ -44,10 +44,6 @@ Creating the Installer 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. diff --git a/development/Win32/launcher/launcher.nsi b/development/Win32/launcher/launcher.nsi index 16b0c3c169..a20c7ee82b 100644 --- a/development/Win32/launcher/launcher.nsi +++ b/development/Win32/launcher/launcher.nsi @@ -123,7 +123,7 @@ Section -Launch ;Start LyX and capture the command line output Push '"$EXEDIR\lyxc.exe" $Parameters' - CallInstDLL "$EXEDIR\nsExec.dll" ExecToLog + CallInstDLL "$EXEDIR\Console.dll" ExecToLog Pop $ReturnValue ;Return value SectionEnd diff --git a/development/Win32/packaging/installer/components/core.nsh b/development/Win32/packaging/installer/components/core.nsh index 75a9142dcc..189d5a9b7f 100644 --- a/development/Win32/packaging/installer/components/core.nsh +++ b/development/Win32/packaging/installer/components/core.nsh @@ -77,7 +77,8 @@ Section -Core SecCore ;Helper DLLs for NSIS-based tools SetOutPath "$INSTDIR\bin" - !insertmacro FileListNSISDll File "${NSISDIR}\Plugins\" + !insertmacro FileListNSISPluginsStandard File "${NSISDIR}\Plugins\" + !insertmacro FileListNSISPlugins File "${FILES_NSISPLUGINS}\" ;Create uninstaller WriteUninstaller "$INSTDIR\${SETUP_UNINSTALLER}" diff --git a/development/Win32/packaging/installer/components/uninstall.nsh b/development/Win32/packaging/installer/components/uninstall.nsh index e5749aad04..8a57e0d350 100644 --- a/development/Win32/packaging/installer/components/uninstall.nsh +++ b/development/Win32/packaging/installer/components/uninstall.nsh @@ -44,8 +44,9 @@ Section "un.Program Files" un.SecProgramFiles RMDir "$INSTDIR\aiksaurus" ;Helper DLLs for NSIS-based tools - - !insertmacro FileListNSISDll Delete "$INSTDIR\bin\" + + !insertmacro FileListNSISPluginsStandard Delete "$INSTDIR\bin\" + !insertmacro FileListNSISPlugins Delete "$INSTDIR\bin\" ;Shortcuts diff --git a/development/Win32/packaging/installer/include/filelists.nsh b/development/Win32/packaging/installer/include/filelists.nsh index de04771fc7..8b932edf68 100644 --- a/development/Win32/packaging/installer/include/filelists.nsh +++ b/development/Win32/packaging/installer/include/filelists.nsh @@ -273,9 +273,14 @@ Lists of files to include in the installer !macroend -!macro FileListNSISDll COMMAND DIRECTORY +!macro FileListNSISPluginsStandard COMMAND DIRECTORY - ${FILE}nsExec.dll" ${FILE}System.dll" !macroend + +!macro FileListNSISPlugins COMMAND DIRECTORY + + ${FILE}Console.dll" + +!macroend diff --git a/development/Win32/packaging/installer/settings.nsh b/development/Win32/packaging/installer/settings.nsh index 6cc9bd4102..f6c410bbad 100644 --- a/development/Win32/packaging/installer/settings.nsh +++ b/development/Win32/packaging/installer/settings.nsh @@ -26,6 +26,8 @@ Settings for LyX installer !define FILES_DVIPOSTDATA "${FILES_DEPS}\dvipost" !define FILES_ASPELLDATA "${FILES_DEPS}\aspell" +!define FILES_NSISPLUGINS "${FILES_DEPS}\nsis" + ;-------------------------------- ;Locations of components to download @@ -56,7 +58,7 @@ Settings for LyX installer ;Locations of setup files for components (for bundled setup) !define INSTALL_LATEX "basic-miktex-2.5.2471.exe" -!define INSTALL_IMAGEMAGICK "ImageMagick-6.3.0-0-Q16-windows-dll.exe" +!define INSTALL_IMAGEMAGICK "ImageMagick-6.3.0-2-Q16-windows-dll.exe" !define INSTALL_GHOSTSCRIPT "gs854w32.exe" !define INSTALL_VIEWER "gsv48w32.exe" @@ -106,6 +108,11 @@ Settings for LyX installer !define BIN_IMAGEMAGICK "convert.exe" !define BIN_GHOSTSCRIPT "gswin32c.exe" +;-------------------------------- +;Custom NSIS plug-ins + +!addplugindir "${FILES_NSISPLUGINS}" + ;-------------------------------- ;Compession diff --git a/development/Win32/pdfview/pdfview.nsi b/development/Win32/pdfview/pdfview.nsi index f4aba8cdd6..2d86bd5bd1 100644 --- a/development/Win32/pdfview/pdfview.nsi +++ b/development/Win32/pdfview/pdfview.nsi @@ -21,6 +21,7 @@ http://magic.aladdin.cs.cmu.edu/2005/07/15/pdfopen-and-pdfclose/ ;-------------------------------- ;Settings +Caption "PDF Viewer" OutFile pdfview.exe Icon "..\packaging\icons\lyx_32x32.ico" SilentInstall silent @@ -57,7 +58,7 @@ Var CurrentTimeLow !macro HideConsole COMMAND_LINE Push `${COMMAND_LINE}` - CallInstDLL "$EXEDIR\nsExec.dll" Exec + CallInstDLL "$EXEDIR\Console.dll" Exec Pop $Dummy ${if} $Dummy == "error" @@ -101,7 +102,13 @@ Section "View PDF file" !insertmacro SystemCall "shell32::FindExecutable(t s, t '', t .s)" Call GetFileName Pop $Viewer - + + ${if} $Viewer == "" + MessageBox MB_OK|MB_ICONEXCLAMATION "No PDF viewer is installed. \ + Please install a PDF viewer such as Adobe Reader." + Quit + ${endif} + ${if} $Viewer == "AcroRd32.exe" ${orif} $Viewer == "Acrobat.exe"