From: Uwe Stöhr Date: Sun, 20 May 2007 14:36:18 +0000 (+0000) Subject: installer: X-Git-Tag: 1.6.10~9683 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f2ccc2af03eb7141ac717985a12f52db3e94b76d;p=features.git installer: - 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 --- diff --git a/development/Win32/packaging/AltInstaller/ChangeLog.txt b/development/Win32/packaging/AltInstaller/ChangeLog.txt index 2670dc08dd..ace677fe3f 100644 --- a/development/Win32/packaging/AltInstaller/ChangeLog.txt +++ b/development/Win32/packaging/AltInstaller/ChangeLog.txt @@ -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 diff --git a/development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.dpr b/development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.dpr index a316b3f4e1..b91a20de62 100644 --- a/development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.dpr +++ b/development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.dpr @@ -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 diff --git a/development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.exe b/development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.exe index 8daf29e730..c638a039d6 100644 Binary files a/development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.exe and b/development/Win32/packaging/AltInstaller/specials/PDFViewWin/PDFViewWin.exe differ diff --git a/development/Win32/packaging/AltInstaller/specials/powerdot.layout b/development/Win32/packaging/AltInstaller/specials/powerdot.layout index 5dd6bd1a3b..5305e82627 100644 --- a/development/Win32/packaging/AltInstaller/specials/powerdot.layout +++ b/development/Win32/packaging/AltInstaller/specials/powerdot.layout @@ -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 #