From cae9a14cce495c7fc24e6e2c0a3daaf8ae9d2868 Mon Sep 17 00:00:00 2001 From: Joost Verburg Date: Mon, 6 Nov 2006 21:48:00 +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/branches/BRANCH_1_4_X@15772 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 118441597d..e582612eb9 100644 --- a/INSTALL.Win32 +++ b/INSTALL.Win32 @@ -95,10 +95,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 7dcde2df8c..7bd36a59fd 100644 --- a/development/Win32/launcher/launcher.nsi +++ b/development/Win32/launcher/launcher.nsi @@ -165,7 +165,7 @@ Section -Launch ;Start LyX and capture the command line output Push '"$EXEDIR\lyxc.exe" -geometry $Geometry $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 a2677f7494..97d1d46e04 100644 --- a/development/Win32/packaging/installer/components/core.nsh +++ b/development/Win32/packaging/installer/components/core.nsh @@ -104,7 +104,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 bddf77ea72..2fe3c01b44 100644 --- a/development/Win32/packaging/installer/components/uninstall.nsh +++ b/development/Win32/packaging/installer/components/uninstall.nsh @@ -50,8 +50,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 2614df920d..964b6a98ab 100644 --- a/development/Win32/packaging/installer/include/filelists.nsh +++ b/development/Win32/packaging/installer/include/filelists.nsh @@ -288,9 +288,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 9332e91813..a98ee3145a 100644 --- a/development/Win32/packaging/installer/settings.nsh +++ b/development/Win32/packaging/installer/settings.nsh @@ -35,6 +35,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 @@ -65,7 +67,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" @@ -115,6 +117,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"