]> git.lyx.org Git - features.git/commitdiff
installer:
authorUwe Stöhr <uwestoehr@web.de>
Sun, 20 May 2007 14:36:18 +0000 (14:36 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Sun, 20 May 2007 14:36:18 +0000 (14:36 +0000)
- make the PDF view program Vista compatible
- fixed powerdot.layout again

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18433 a592a061-630c-0410-9148-cb99ea01b6c8

development/Win32/packaging/AltInstaller/ChangeLog.txt
development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.dpr
development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.exe
development/Win32/packaging/AltInstaller/specials/powerdot.layout

index 2670dc08ddfb392a8d688cecd94584ca1adbae72..ace677fe3f0f432c2fd4cbf5c3e30912cfaf3a1b 100644 (file)
@@ -2,6 +2,7 @@
 - LyX 1.5 pre1 from xx-05-2007
 
 - new Windows Vista-compatible launcher for LyX
+- fixed PDF view program to make it Windows Vista-compatible
 - fixed layout file for the LaTeX-package powerdot
 
 
index a316b3f4e1f9a42cb77f3b980830b4a5eb687dc3..b91a20de6253b4660ab518f642e22591826a5da1 100644 (file)
@@ -1,12 +1,27 @@
 program PDFViewWin;
+// this program opens and closes PDF-files with Acrobat or Adobe Reader
+// author: Uwe Stöhr
+
+{The problematic is the following:
+ A PDF-file should be modified while it is opened with Acrobat.
+ This is not possible because Acrobat understands itself as editor, not as
+ reader and therefore opens PDFs always with write access, so that other
+ programs cannot modifiy them.
+ The idea to solve the problem is the following:
+ The file that should be shown in Acrobat is copied and then renamed -
+ the suffix "-preview" is attached. The renamed copy is opened by Acrobat
+ while the unrenamed version can be modified. When the modified version should
+ be displayed, the eventually opened renamed version is closed in Acrobat and
+ the modified version is copied, renamed and opened in Acrobat.}
 
 {$APPTYPE CONSOLE}
 
 uses
-  Windows,SysUtils,ShellApi,Forms;
+  Windows, SysUtils, ShellApi;
 
 var Input,InputNew : string;
     FileTest : boolean;
+    hConsole : THandle;
 
     
 function ExecWait(const CommandLine: string;
@@ -39,23 +54,32 @@ begin
 end; // end function
 
 
-function RenameFile(const OldName, NewName: string): boolean;
-//renames files
+function RenameFile(const OldName,NewName: string; hConsole: THandle): boolean;
+//renames files, taken from
+//http://www.dsdt.info/tipps/?id=128&search=RenameFile
 var
   sh: TSHFileOpStruct;
 begin
-  sh.Wnd := Application.Handle;
-  sh.wFunc := fo_Rename;
+  sh.Wnd:= hConsole;
+  sh.wFunc:= fo_Rename;
   //terminate with null byte to set list ending
-  sh.pFrom := PChar(OldName + #0);
-  sh.pTo := PChar(NewName + #0);
-  sh.fFlags := fof_Silent or fof_MultiDestFiles;
-  Result:=ShFileOperation(sh)=0;
+  sh.pFrom:= PChar(OldName + #0);
+  sh.pTo:= PChar(NewName + #0);
+  sh.fFlags:= fof_Silent or fof_MultiDestFiles;
+  Result:= ShFileOperation(sh)=0;
 end; //end function
 
 
 begin //begin program 
 
+ //Read path to this application
+ Input:= ParamStr(0);
+
+ //get handle of this console window
+ hConsole := FindWindow(nil,Pchar(Input));
+ // hide the window of this console application
+ ShowWindow(hConsole,SW_HIDE);
+
  //Read given filename
  Input:= ParamStr(1);
  //InputNew = original filename with ending "-preview" (e.g. test-preview.pdf)
@@ -71,7 +95,7 @@ begin //begin program
   DeleteFile(InputNew);
  end;
  //rename file
- RenameFile(Input,InputNew);
+ RenameFile(Input,InputNew,hConsole);
  ExecWait('pdfopen --file "'+InputNew+'" --back');
 
 end. //end program 
index 8daf29e73010e9c358d674c78a5876ad22bdf5fb..c638a039d6b5927dda967a159d64c096000f519e 100644 (file)
Binary files a/development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.exe and b/development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.exe differ
index 5dd6bd1a3b5999e0025b7ffe1d6e004d08950c7c..5305e82627b46ba52036ba440be6370d658e272a 100644 (file)
@@ -1,7 +1,6 @@
 #% Do not delete the line below; configure depends on this
-#  \DeclareLaTeXClass[powerdot,enumitem.sty,rotate-textures.sty,listings.sty,xkeyval.sty]{presentation (powerdot)}
+#  \DeclareLaTeXClass[powerdot,enumitem.sty,listings.sty,pstricks.sty,xkeyval.sty]{presentation (powerdot)}
 # PowerDot textclass definition file.
-# The rotate-textures.sty is part of the genmisc-package that is required by powerdot.
 # Created (29.Aug.05): Mael Hilléreau
 # Last modified: 20-May-06 by Uwe Stöhr
 #