The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit c67419ffbb89946c8f596df230a077062caf6e34
Author: Uwe Stöhr <uwesto...@lyx.org>
Date:   Tue Nov 20 21:53:35 2012 +0100

    installer: remove unnecessary check for Adobe Reader/Acrobat
    
    This is already done by the program pdfview every time it is called. This 
additionally fixes the bug that viewing PDF files could fail if Acrobat was not 
the default PDF viewer of the system while LyX was installed, but became later 
the default PDF viewer.

diff --git a/development/Win32/packaging/installer/ChangeLog.txt 
b/development/Win32/packaging/installer/ChangeLog.txt
index 2f17750..86653a7 100644
--- a/development/Win32/packaging/installer/ChangeLog.txt
+++ b/development/Win32/packaging/installer/ChangeLog.txt
@@ -2,6 +2,9 @@
 - support to update the view as PDF if Adobe Reader XI is used
 - fix long standing bug that updating a PDF view failed for larger
   LyX documents if Adobe Reader or Acrobat was used as PDF viewer
+- fixed bug that viewing PDF files could fail if Acrobat or Adobe Reader was
+  not used as default PDF viewer of the system while LyX was installed, but
+  it became later the default PDF viewer
 - fixed bug that EPS and PDF images were not displayed if LyX was installed
   this time without admin privileges
   but an older LyX version was once installed with admin privileges
diff --git a/development/Win32/packaging/installer/include/detection.nsh 
b/development/Win32/packaging/installer/include/detection.nsh
index 6ebf133..3f792da 100644
--- a/development/Win32/packaging/installer/include/detection.nsh
+++ b/development/Win32/packaging/installer/include/detection.nsh
@@ -97,14 +97,9 @@ Function MissingPrograms
    StrCpy $DelPythonFiles "True"
   ${endif}
   
-  # test if Acrobat or Adobe Reader is used as PDF-viewer
-  ReadRegStr $String HKCR ".pdf" ""
-  ${if} $String != "AcroExch.Document" # this name is only used by Acrobat and 
Adobe Reader
-   StrCpy $Acrobat "None"
-  ${else}
-   StrCpy $Acrobat "Yes"
-  ${endif}
-
+  # No test necessary for Acrobat or Adobe Reader because pdfview does this job
+  # each time it is called.
+  
   # test if a PostScript-viewer is installed, only check for GSview
   # check all cases:
   # 1. 32bit Windows
diff --git a/development/Win32/packaging/installer/include/variables.nsh 
b/development/Win32/packaging/installer/include/variables.nsh
index c403fe8..65bfccc 100644
--- a/development/Win32/packaging/installer/include/variables.nsh
+++ b/development/Win32/packaging/installer/include/variables.nsh
@@ -10,10 +10,6 @@ Var PathLaTeX
 Var PathLaTeXLocal
 Var PathBibTeXEditor
 
-#Var SetupLaTeX
-#Var SizeLaTeX
-
-Var Acrobat
 Var APPDATemp
 Var AppPre
 var AppSubfolder
diff --git a/development/Win32/packaging/installer/setup/configure.nsh 
b/development/Win32/packaging/installer/setup/configure.nsh
index 7419415..40700b0 100644
--- a/development/Win32/packaging/installer/setup/configure.nsh
+++ b/development/Win32/packaging/installer/setup/configure.nsh
@@ -143,22 +143,23 @@ Section -Configure
   ${if} "$PathPrefix" != ""
    FileWrite $R1 '\path_prefix "$PathPrefix"$\r$\n'
   ${endif}
-  ${if} $Acrobat == "Yes" # use pdfview for Acrobat / Adobe Reader
-   FileWrite $R1 '\format "pdf5" "pdf" "PDF (LuaTeX)" "u" "pdfview" "" 
"document,vector,menu=export"$\r$\n\
-                 \format "pdf4" "pdf" "PDF (XeTeX)" "X" "pdfview" "" 
"document,vector,menu=export"$\r$\n\
-                 \format "pdf3" "pdf" "PDF (dvipdfm)" "m" "pdfview" "" 
"document,vector,menu=export"$\r$\n\
-                 \format "pdf2" "pdf" "PDF (pdflatex)" "F" "pdfview" "" 
"document,vector,menu=export"$\r$\n\
-                 \format "pdf" "pdf" "PDF (ps2pdf)" "P" "pdfview" "" 
"document,vector,menu=export"$\r$\n'
-  ${endif}
+  
+  # use pdfview for all types of PDF files
+  FileWrite $R1 '\format "pdf5" "pdf" "PDF (LuaTeX)" "u" "pdfview" "" 
"document,vector,menu=export"$\r$\n\
+                \format "pdf4" "pdf" "PDF (XeTeX)" "X" "pdfview" "" 
"document,vector,menu=export"$\r$\n\
+                \format "pdf3" "pdf" "PDF (dvipdfm)" "m" "pdfview" "" 
"document,vector,menu=export"$\r$\n\
+                \format "pdf2" "pdf" "PDF (pdflatex)" "F" "pdfview" "" 
"document,vector,menu=export"$\r$\n\
+                \format "pdf" "pdf" "PDF (ps2pdf)" "P" "pdfview" "" 
"document,vector,menu=export"$\r$\n'
+
   # if LilyPondPath was found
   # we need to add these entris because python scripts can only be executed
   # if the full path is given
   ${if} $LilyPondPath != ""
    FileWrite $R1 '\format "lilypond-book" "lytex" "LilyPond book (LaTeX)" "" 
"" "auto" "document,menu=export"$\r$\n\
-                 \converter "lilypond-book" "pdflatex" "python 
\"$LilyPondPath\\lilypond-book.py\" --safe --pdf --latex-program=pdflatex 
--lily-output-dir=ly-pdf $$$$i" ""$\r$\n\
-                 \converter "lilypond-book" "xetex" "python 
\"$LilyPondPath\\lilypond-book.py\" --safe --pdf --latex-program=xelatex 
--lily-output-dir=ly-pdf $$$$i" ""$\r$\n\
-                 \converter "lilypond-book" "luatex" "python 
\"$LilyPondPath\\lilypond-book.py\" --safe --pdf --latex-program=lualatex 
--lily-output-dir=ly-pdf $$$$i" ""$\r$\n\
-                 \converter "lilypond-book" "latex" "python 
\"$LilyPondPath\\lilypond-book.py\" --safe --lily-output-dir=ly-eps $$$$i" 
""$\r$\n'
+                 \converter "lilypond-book" "pdflatex" "python 
\"$LilyPondPath\\lilypond-book.py\" --safe --pdf --latex-program=pdflatex 
--lily-output-dir=ly-pdf $$$$i" ""$\r$\n\
+                 \converter "lilypond-book" "xetex" "python 
\"$LilyPondPath\\lilypond-book.py\" --safe --pdf --latex-program=xelatex 
--lily-output-dir=ly-pdf $$$$i" ""$\r$\n\
+                 \converter "lilypond-book" "luatex" "python 
\"$LilyPondPath\\lilypond-book.py\" --safe --pdf --latex-program=lualatex 
--lily-output-dir=ly-pdf $$$$i" ""$\r$\n\
+                 \converter "lilypond-book" "latex" "python 
\"$LilyPondPath\\lilypond-book.py\" --safe --lily-output-dir=ly-eps $$$$i" 
""$\r$\n'
   ${endif}
   FileClose $R1
   IfErrors 0 +2

-----------------------------------------------------------------------

Summary of changes:
 .../Win32/packaging/installer/ChangeLog.txt        |    3 ++
 .../packaging/installer/include/detection.nsh      |   11 ++-------
 .../packaging/installer/include/variables.nsh      |    4 ---
 .../Win32/packaging/installer/setup/configure.nsh  |   23 ++++++++++---------
 4 files changed, 18 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to