]> git.lyx.org Git - lyx.git/blobdiff - development/Win32/pdfview/pdfview.nsi
document flag for PDF
[lyx.git] / development / Win32 / pdfview / pdfview.nsi
index f4aba8cdd64daeec6ce51b479d1f7de28d4b231c..2d86bd5bd11081f80ac2d76058ddfb8dd4d10746 100644 (file)
@@ -21,6 +21,7 @@ http://magic.aladdin.cs.cmu.edu/2005/07/15/pdfopen-and-pdfclose/
 ;--------------------------------\r
 ;Settings\r
 \r
+Caption "PDF Viewer"\r
 OutFile pdfview.exe\r
 Icon "..\packaging\icons\lyx_32x32.ico"\r
 SilentInstall silent\r
@@ -57,7 +58,7 @@ Var CurrentTimeLow
 !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
@@ -101,7 +102,13 @@ Section "View PDF file"
   !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