installer:

- using Joost's patched pdfopen/pdfclose programs as these now also work for Acrobat 8 using the latest version
-> Could get rid of ugly hack that was only used for Acrobat 8

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18218 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2007-05-07 01:19:52 +00:00
parent 34a87dc41d
commit 01a780bd89
17 changed files with 22 additions and 415 deletions

View File

@ -1,8 +1,14 @@
Version LyX 1.5svn-xx-05-2007
- LyX 1.5svn from xx-05-2007
- fix bug, introduced with last version, that all margin notes in
a document are lost
- fix bug that LyX's menu language setting was ignored when LyX is
started by double-clicking on a LyX-file
- when Updating PDFs, the PDF is opened at the last viewed position
(only works with Acrobat/adobe Reader version <= 7)
- fix hopefully the case that PDFs couldn't be updated when
Adobe Reader 8 is used on Windows Vista
Version LyX 1.5svn-02-05-2007

View File

@ -50,22 +50,15 @@ Function ConfigureLyX
# set the preferences file
# (having one preferences file that is modified to fit the needs is possible but not easy to maintain
# therefore simply delete the files that shouldn't be used)
# therefore simply delete the file that shouldn't be used)
# if not Acrobat or Adobe Reader is used
${if} $Acrobat == "None" # clear the entries in the preferences file that define PDFView or PDFViewWin8 as viewer
${if} $Acrobat == "None" # no special PDF viewer is used
Rename "$INSTDIR\Resources\preferencesGSview" "$INSTDIR\Resources\preferences"
Delete "$INSTDIR\Resources\preferences7"
Delete "$INSTDIR\Resources\preferences8"
Delete "$INSTDIR\Resources\preferencesAcro"
${endif}
# if Acrobat or Adobe Reader is used
${if} $Acrobat == "7" # used for all Acrobat (Adobe Reader) versions <= 7
Rename "$INSTDIR\Resources\preferences7" "$INSTDIR\Resources\preferences"
Delete "$INSTDIR\Resources\preferences8"
Delete "$INSTDIR\Resources\preferencesGSview"
${endif}
${if} $Acrobat == "8"
Rename "$INSTDIR\Resources\preferences8" "$INSTDIR\Resources\preferences"
Delete "$INSTDIR\Resources\preferences7"
${if} $Acrobat == "Yes" # used for Acrobat / Adobe Reader
Rename "$INSTDIR\Resources\preferencesAcro" "$INSTDIR\Resources\preferences"
Delete "$INSTDIR\Resources\preferencesGSview"
${endif}

View File

@ -1,6 +1,7 @@
Function DeleteFiles
# list with deleted files for LyX 1.5svn xx-05-2007
Delete "$INSTDIR\bin\PDFViewWin8.exe"
Delete "$INSTDIR\Resources\examples\cv.lyx"
Delete "$INSTDIR\Resources\examples\TableExamples.lyx"
Delete "$INSTDIR\Resources\examples\de\TableExamples.lyx"

View File

@ -80,16 +80,8 @@ Function MissingPrograms
ReadRegStr $String HKCR ".pdf" ""
${if} $String != "AcroExch.Document" # this name is only used by Acrobat and Adobe Reader
StrCpy $Acrobat "None"
${endif}
${if} $Acrobat != "None"
ReadRegStr $String HKCR "AcroExch.Document\shell\open\command" ""
StrCpy $Search "8" # search for Acrobat or Adobe Reader 8 because then PDFViewWin8.exe is needed to view PDF-files
!insertmacro StrPointer $String $Search $Pointer # macro from LyXUtils
${if} $Pointer == "-1" # if nothing was found
StrCpy $Acrobat "7"
${else}
StrCpy $Acrobat "8"
${endif}
StrCpy $Acrobat "Yes"
${endif}
# test if a PostScript-viewer is installed, only check for GSview32

View File

@ -3,10 +3,15 @@ Function UpdateModifiedFiles
# list with modified files for LyX 1.5svn xx-05-2007
SetOutPath "$INSTDIR\bin"
File "${PRODUCT_SOURCEDIR}\bin\lyx.exe" # always here
File "${PRODUCT_SOURCEDIR}\bin\pdfclose.exe"
File "${PRODUCT_SOURCEDIR}\bin\pdfdde.exe"
File "${PRODUCT_SOURCEDIR}\bin\pdfopen.exe"
File "${PRODUCT_SOURCEDIR}\bin\PDFViewWin.exe"
File "${PRODUCT_SOURCEDIR}\bin\tex2lyx.exe" # always here
SetOutPath "$INSTDIR\Resources"
File "${PRODUCT_SOURCEDIR}\Resources\unicodesymbols"
File "${PRODUCT_SOURCEDIR}\Resources\encodings"
File "${PRODUCT_SOURCEDIR}\Resources\languages"
File "${PRODUCT_SOURCEDIR}\Resources\unicodesymbols"
File /r "${PRODUCT_SOURCEDIR}\Resources\images"
File /r "${PRODUCT_SOURCEDIR}\Resources\locale" # always here
SetOutPath "$INSTDIR\Resources\doc"

View File

@ -72,6 +72,6 @@ begin //begin program
end;
//rename file
RenameFile(Input,InputNew);
ExecWait('pdfopen --file "'+InputNew+'"');
ExecWait('pdfopen --file "'+InputNew+'" --back');
end. //end program

View File

@ -1,38 +0,0 @@
-$A8
-$B-
-$C+
-$D+
-$E-
-$F-
-$G+
-$H+
-$I+
-$J-
-$K-
-$L+
-$M-
-$N+
-$O+
-$P+
-$Q-
-$R-
-$S-
-$T-
-$U-
-$V+
-$W-
-$X+
-$YD
-$Z1
-cg
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-H+
-W+
-M
-$M16384,1048576
-K$00400000
-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
-w-UNSAFE_TYPE
-w-UNSAFE_CODE
-w-UNSAFE_CAST

View File

@ -1,139 +0,0 @@
[FileVersion]
Version=7.0
[Compiler]
A=8
B=0
C=1
D=1
E=0
F=0
G=1
H=1
I=1
J=0
K=0
L=1
M=0
N=1
O=1
P=1
Q=0
R=0
S=0
T=0
U=0
V=1
W=0
X=1
Y=1
Z=1
ShowHints=1
ShowWarnings=1
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
NamespacePrefix=
SymbolDeprecated=1
SymbolLibrary=1
SymbolPlatform=1
UnitLibrary=1
UnitPlatform=1
UnitDeprecated=1
HResultCompat=1
HidingMember=1
HiddenVirtual=1
Garbage=1
BoundsError=1
ZeroNilCompat=1
StringConstTruncated=1
ForLoopVarVarPar=1
TypedConstVarPar=1
AsgToTypedConst=1
CaseLabelRange=1
ForVariable=1
ConstructingAbstract=1
ComparisonFalse=1
ComparisonTrue=1
ComparingSignedUnsigned=1
CombiningSignedUnsigned=1
UnsupportedConstruct=1
FileOpen=1
FileOpenUnitSrc=1
BadGlobalSymbol=1
DuplicateConstructorDestructor=1
InvalidDirective=1
PackageNoLink=1
PackageThreadVar=1
ImplicitImport=1
HPPEMITIgnored=1
NoRetVal=1
UseBeforeDef=1
ForLoopVarUndef=1
UnitNameMismatch=1
NoCFGFileFound=1
MessageDirective=1
ImplicitVariants=1
UnicodeToLocale=1
LocaleToUnicode=1
ImagebaseMultiple=1
SuspiciousTypecast=1
PrivatePropAccessor=1
UnsafeType=0
UnsafeCode=0
UnsafeCast=0
[Linker]
MapFile=0
OutputObjs=0
ConsoleApp=1
DebugInfo=0
RemoteSymbols=0
MinStackSize=16384
MaxStackSize=1048576
ImageBase=4194304
ExeDescription=
[Directories]
OutputDir=
UnitOutputDir=
PackageDLLOutputDir=
PackageDCPOutputDir=
SearchPath=
Packages=vcl;rtl;vclx;indy;vclie;xmlrtl;inetdbbde;inet;inetdbxpress;dbrtl;soaprtl;dsnap;VclSmp;dbexpress;vcldb;dbxcds;inetdb;bdertl;vcldbx;adortl;teeui;teedb;tee;ibxpress;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL
Conditionals=
DebugSourceDirs=
UsePackages=0
[Parameters]
RunParams=
HostApplication=
Launcher=
UseLauncher=0
DebugCWD=
[Language]
ActiveLang=
ProjectLang=
RootDir=
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1031
CodePage=1252
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
[HistoryLists\hlUnitAliases]
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;

View File

@ -1,127 +0,0 @@
program PDFViewWin8;
// this program opens and closes PDF-files with Acrobat 8
// and with Adobe Reader 8
{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.
To open/close files in Acrobat, the programs "pdfopen" and "pdfclose",
written by Fabrice Popineau, which are used in PDFViewWin7, cannot be used
for Acrobat 8. In this program the PDFs are closed by closing its program
window.
In Acrobat 8 it is not possible to go to the position of a reopened modified
file were it was viewed the last time.}
{$APPTYPE CONSOLE}
uses
Windows,SysUtils,ShellApi,Forms,Messages;
var Input,InputNew,FileName : string;
FileTest : boolean;
InputNewName : PChar;
i : integer;
function RenameFile(const OldName, NewName: string): 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;
//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;
end; //end function }
procedure KillProcess(WindowHandle: HWND);
//kills a process given by its handle
var
processID: INTEGER;
processHandle: THandle;
Result: DWORD;
begin
SendMessageTimeout(WindowHandle, WM_CLOSE, 0, 0,
SMTO_ABORTIFHUNG or SMTO_NORMAL, 5000, Result);
if isWindow(WindowHandle) then //when window exists
begin
PostMessage(WindowHandle, WM_QUIT, 0, 0);
//get process ID of the window
GetWindowThreadProcessID(WindowHandle, @processID);
if processID <> 0 then //when correct ID
begin
//get process handle
processHandle:= OpenProcess(PROCESS_TERMINATE or PROCESS_QUERY_INFORMATION,
False, processID);
if processHandle <> 0 then //terminate the process when handle was found
begin
TerminateProcess(processHandle, 0);
CloseHandle(ProcessHandle);
end;
end;
end; //end if isWindow
end; //end procedure
begin //begin program
//Read given filename
Input:= ParamStr(1);
//InputNew = original filename with ending "-preview" (e.g. test-preview.pdf)
InputNew:= copy(Input,1,Length(Input)-4); //remove ".pdf"
InputNew:= InputNew+'-preview.pdf';
//check if renamed file exists
FileTest:= FileExists(InputNew);
if FileTest = true then //when file exists
begin
//extract filename
For i:= Length(InputNew) downto 1 do
begin
if (InputNew[i] = '\') or (InputNew[i] = '/') then
// '/' because some programs use Unix paths
begin
FileName:= copy(InputNew,i+1,Length(InputNew)-i);
break;
end;
end;
//close old file
//for Adobe Reader / Acrobat 8
InputNewName:= PChar(FileName+' - Adobe Reader');
KillProcess(FindWindow(nil,InputNewName));
InputNewName:= PChar(FileName+'- Adobe Acrobat Standard');
KillProcess(FindWindow(nil,InputNewName));
InputNewName:= PChar(FileName+'- Adobe Acrobat Professional');
KillProcess(FindWindow(nil,InputNewName));
//for Acrobat 7
//(this doesn't work for Acrobat 7 because it keeps the file opened
// also when the window of the PDF is closed (use PDFViewWin7 instead) )
InputNewName:= PChar('Adobe Acrobat Professional - ['+FileName+']');
KillProcess(FindWindow(nil,InputNewName));
InputNewName:= PChar('Adobe Acrobat Standard - ['+FileName+']');
KillProcess(FindWindow(nil,InputNewName));
//if one or more files are opened
InputNewName:= PChar(FileName);
KillProcess(FindWindow(nil,InputNewName));
//delete old file
DeleteFile(InputNew);
end; //end if FileTest = true
//rename file
RenameFile(Input,InputNew);
//open renamed file
ShellExecute(Application.Handle,PChar('open'),
PChar(InputNew),nil,nil,SW_SHOWNORMAL);
end. //end program

View File

@ -1,87 +0,0 @@
### This file is part of
### ========================================================
### LyX, The Document Processor
###
### Copyright 1995 Matthias Ettrich
### Copyright 1995-2001 The LyX Team.
###
### ========================================================
# This file is written by LyX, if you want to make your own
# modifications you should do them from inside LyX and save
#
# MISC SECTION ######################################
#
\preview_scale_factor 1.0
#
# SCREEN & FONTS SECTION ############################
#
\screen_zoom 120
#
# COLOR SECTION ###################################
#
#
# PRINTER SECTION ###################################
#
#
# EXPORT SECTION ####################################
#
#
# TEX SECTION #######################################
#
#
# FILE SECTION ######################################
#
#
# PLAIN TEXT EXPORT SECTION ##############################
#
#
# SPELLCHECKER SECTION ##############################
#
#
# LANGUAGE SUPPORT SECTION ##########################
#
#
# 2nd MISC SUPPORT SECTION ##########################
#
#
# FORMATS SECTION ##########################
#
\format "pdf3" "pdf" "PDF (dvipdfm)" "m" "PDFViewWin8" "" "document,vector"
\format "pdf2" "pdf" "PDF (pdflatex)" "F" "PDFViewWin8" "" "document,vector"
\format "pdf" "pdf" "PDF (ps2pdf)" "P" "PDFViewWin8" "" "document,vector"
#
# CONVERTERS SECTION ##########################
#
#
# COPIERS SECTION ##########################
#

View File

@ -4,6 +4,7 @@
[toolbars]
standard = 0 0
extra = 0 0
math_panels = 2 1
math = 2 1
minibuffer = 1 1
review = 2 1