X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2FWin32%2Fpdfview%2Fpdfview.nsi;h=a30e9dfa84f677171964cafa2c189b211814c4b5;hb=72c31a4e73d25e4be783f86c5c413a9a6f5ffde5;hp=03d1966205098ca4d607ea1799a967fa005b572c;hpb=c4e4fe6e2d9c664df0b598031204af8f6af61d65;p=lyx.git diff --git a/development/Win32/pdfview/pdfview.nsi b/development/Win32/pdfview/pdfview.nsi index 03d1966205..a30e9dfa84 100644 --- a/development/Win32/pdfview/pdfview.nsi +++ b/development/Win32/pdfview/pdfview.nsi @@ -26,7 +26,7 @@ http://magic.aladdin.cs.cmu.edu/2005/07/15/pdfopen-and-pdfclose/ Caption "PDF Viewer" OutFile pdfview.exe -Icon "..\packaging\icons\lyx_32x32.ico" +Icon "..\packaging\icons\lyx.ico" SilentInstall silent #-------------------------------- @@ -92,7 +92,7 @@ Var CurrentTimeLow !macroend #-------------------------------- -# PDF vieweing +# PDF viewing Section "View PDF file" @@ -155,10 +155,17 @@ Section "View PDF file" ${Do} !insertmacro SystemCall "kernel32::WaitForSingleObject(i $ChangeNotification, i 10000) i.s" - Pop $WaitReturn - - # Check whether a lock is still active. - # If not, Adode Reader is closed and we can close this application as well + Pop $WaitReturn + + # Check whether the PDF still exists (if not, LyX is being closed) + + ${IfNot} ${FileExists} $LockedFile + # Quit this application + !insertmacro SystemCall "kernel32::FindCloseChangeNotification(i $ChangeNotification)" + Quit + ${EndIf} + + # Check whether the lock is still active (if not, Adobe Reader being closed) FileOpen $LockedFile $PDFFile a