mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
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
This commit is contained in:
parent
0d1a0c9b27
commit
f2ccc2af03
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Binary file not shown.
@ -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
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user