]> git.lyx.org Git - lyx.git/commitdiff
Windows Vista: these applications don't need any special rights
authorJoost Verburg <joostverburg@users.sourceforge.net>
Thu, 28 Jun 2007 17:00:30 +0000 (17:00 +0000)
committerJoost Verburg <joostverburg@users.sourceforge.net>
Thu, 28 Jun 2007 17:00:30 +0000 (17:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18930 a592a061-630c-0410-9148-cb99ea01b6c8

development/Win32/launcher/launcher.nsi
development/Win32/pdfview/pdfview.nsi

index 9fe97f3afc506130e9dfecbbc43e1882f934e1d3..d6e3a3cd549baeedfa662c3c765ecc9f4d4ea60c 100644 (file)
@@ -21,10 +21,18 @@ ${StrStr}
 
 !include "..\packaging\installer\settings.nsh" #Version info from installer
 
+#--------------------------------
+#Settings
+
 Caption "${APP_NAME} ${APP_VERSION}"
 OutFile lyx.exe
 BrandingText " "
 
+#--------------------------------
+#Windows Vista settings
+
+RequestExecutionLevel user
+
 #--------------------------------
 #Variables
 
index 1179fd8713e95582f4406f2980666b8913af780e..f00457be526ac6b218c0cdb9661ad63a50f01e64 100644 (file)
@@ -18,22 +18,27 @@ http://magic.aladdin.cs.cmu.edu/2005/07/15/pdfopen-and-pdfclose/
 !insertmacro GetParameters
 !insertmacro GetFileName
 
-;--------------------------------
-;Settings
+#--------------------------------
+#Settings
 
 Caption "PDF Viewer"
 OutFile pdfview.exe
 Icon "..\packaging\icons\lyx_32x32.ico"
 SilentInstall silent
 
-;--------------------------------
-;Constants
+#--------------------------------
+#Windows Vista settings
+
+RequestExecutionLevel user
+
+#--------------------------------
+#Constants
 
 !define FALSE 0
 !define TRUE 1
 
-;--------------------------------
-;Variables
+#--------------------------------
+#Variables
 
 Var Dummy
 Var OriginalFile
@@ -45,8 +50,8 @@ Var OriginalTimeLow
 Var CurrentTimeHigh
 Var CurrentTimeLow
 
-;--------------------------------
-;Macros
+#--------------------------------
+#Macros
 
 !macro SystemCall STACK
 
@@ -67,18 +72,18 @@ Var CurrentTimeLow
 
 !macroend
 
-;--------------------------------
-;PDF vieweing
+#--------------------------------
+#PDF vieweing
 
 Section "View PDF file"
 
-  InitPluginsDir ;Temporary directory for PDF file
+  InitPluginsDir #Temporary directory for PDF file
 
-  ;Command line parameters
+  #Command line parameters
   Call GetParameters
   Pop $OriginalFile
 
-  ;Trim quotes
+  #Trim quotes
   StrCpy $Dummy $OriginalFile 1
   ${if} $Dummy == '"'
     StrCpy $OriginalFile $OriginalFile "" 1
@@ -93,11 +98,11 @@ Section "View PDF file"
   Call GetFileName
   Pop $OriginalFileName
 
-  SetOutPath $TEMP ;The LyX tmpbuf should not be locked
+  SetOutPath $TEMP #The LyX tmpbuf should not be locked
 
   StrCpy $PDFFile $PLUGINSDIR\$OriginalFileName
 
-  ;Check whether the file will be opened with Adobe Reader or Adobe Acrobat
+  #Check whether the file will be opened with Adobe Reader or Adobe Acrobat
   Push $OriginalFile
   !insertmacro SystemCall "shell32::FindExecutable(t s, t '', t .s)"
   Call GetFileName
@@ -112,20 +117,20 @@ Section "View PDF file"
   ${if} $Viewer == "AcroRd32.exe"
     ${orif} $Viewer == "Acrobat.exe"
     
-    ;Using Adobe viewer
+    #Using Adobe viewer
     
-    ;Close existing view
+    #Close existing view
     ${if} ${fileexists} $PDFFile
       !insertmacro HideConsole '"$EXEDIR\pdfclose.exe" --file "$PDFFile"'
     ${endif}
     
-    ;Copy PDF to temporary file to allow LyX to overwrite the original
+    #Copy PDF to temporary file to allow LyX to overwrite the original
     CopyFiles /SILENT $OriginalFile $PDFFile
     
-    ;Open a new view
+    #Open a new view
     !insertmacro HideConsole '"$EXEDIR\pdfopen.exe" --back --file "$PDFFile"'
     
-    ;Monitor for updates of the original file
+    #Monitor for updates of the original file
     
     GetFileTime $OriginalFile $OriginalTimeHigh $OriginalTimeLow
     
@@ -136,7 +141,7 @@ Section "View PDF file"
       FileOpen $Dummy $PDFFile a
       
       ${if} $Dummy != ""
-        ;File no longer locked, reader closed
+        #File no longer locked, reader closed
         FileClose $Dummy
         Delete $PDFFile
         Quit
@@ -149,7 +154,7 @@ Section "View PDF file"
         ${if} $OriginalTimeHigh != $CurrentTimeHigh
           ${orif} $OriginalTimeLow != $CurrentTimeLow
           
-          ;Original has been modified, update!
+          #Original has been modified, update!
           
           StrCpy $OriginalTimeHigh $CurrentTimeHigh
           StrCpy $OriginalTimeLow  $CurrentTimeLow
@@ -165,8 +170,8 @@ Section "View PDF file"
     
   ${else}
   
-    ;Another PDF viewer like GSView is used
-    ;No need for special actions, just forward to ShellExecute
+    #Another PDF viewer like GSView is used
+    #No need for special actions, just forward to ShellExecute
     ExecShell open $OriginalFile
     
   ${endif}