mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
installer:
- fix 2 uninstaller issues - remove support for AFPL Ghostscript (license clash) - only install Ghostscript if not already installed - in case there are several Ghostscript installations, use the newest one - remove an unused variable git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39582 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
79f5d30c2c
commit
4810db1280
@ -100,10 +100,6 @@ Function LaTeXActions
|
||||
StrCpy $LaTeXName "TeXLive"
|
||||
${endif}
|
||||
|
||||
${if} $PathLaTeX == ""
|
||||
StrCpy $MissedProg "True"
|
||||
${endif}
|
||||
|
||||
FunctionEnd
|
||||
|
||||
# -------------------------------------------
|
||||
|
@ -34,53 +34,30 @@ FunctionEnd
|
||||
Function MissingPrograms
|
||||
# check if third-party programs are installed
|
||||
|
||||
# initialize variable, is later set to True when a program was not found
|
||||
${if} $MissedProg != "True" # is already True when LaTeX is missing
|
||||
StrCpy $MissedProg "False"
|
||||
${endif}
|
||||
|
||||
# test if Ghostscript is installed
|
||||
StrCpy $3 0
|
||||
GSloop:
|
||||
EnumRegKey $1 HKLM "Software\AFPL Ghostscript" 0
|
||||
${if} $1 == ""
|
||||
EnumRegKey $1 HKLM "Software\GPL Ghostscript" 0
|
||||
EnumRegKey $1 HKLM "Software\GPL Ghostscript" $3
|
||||
${if} $1 != ""
|
||||
StrCpy $2 "True"
|
||||
${endif}
|
||||
${endif}
|
||||
${if} $1 != ""
|
||||
${if} $2 == "True"
|
||||
ReadRegStr $3 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GPL Ghostscript $1" "DisplayName"
|
||||
ReadRegStr $2 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GPL Ghostscript $1" "DisplayName"
|
||||
StrCpy $0 "Software\GPL Ghostscript\$1"
|
||||
${else}
|
||||
ReadRegStr $3 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AFPL Ghostscript $1" "DisplayName"
|
||||
StrCpy $0 "Software\AFPL Ghostscript\$1"
|
||||
${if} $2 == "" # if nothing was found in the uninstall section
|
||||
ReadRegStr $2 HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX" # check if Ghostscript was installed together with LyX
|
||||
${endif}
|
||||
${if} $3 == "" # if nothing was found in the uninstall section
|
||||
ReadRegStr $3 HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX" # check if Ghostscript was installed together with LyX
|
||||
${endif}
|
||||
${if} $3 == "" # if nothing was found in the uninstall section
|
||||
${if} $2 == "" # if nothing was found in the uninstall section
|
||||
DeleteRegKey HKLM "$0"
|
||||
goto GSloop
|
||||
${else}
|
||||
ReadRegStr $GhostscriptPath HKLM $0 "GS_DLL"
|
||||
${if} $GhostscriptPath != ""
|
||||
StrCpy $GhostscriptPath "$GhostscriptPath" -12 # remove ending "gsdll32.dll"
|
||||
${else}
|
||||
StrCpy $MissedProg "True"
|
||||
${endif}
|
||||
${endif} # if $3
|
||||
${else} # if $1
|
||||
StrCpy $GhostscriptPath ""
|
||||
StrCpy $MissedProg "True"
|
||||
# there might be several versions installed and we want to use the newest one
|
||||
IntOp $3 $3 + 1
|
||||
goto GSloop
|
||||
${endif} # if $2
|
||||
${endif}
|
||||
|
||||
# test if Imagemagick is installed
|
||||
#ReadRegStr $ImageMagickPath HKLM "Software\ImageMagick\Current" "BinPath"
|
||||
#${if} $ImageMagickPath == ""
|
||||
# StrCpy $MissedProg "True"
|
||||
#${endif}
|
||||
|
||||
# test if Python is installed
|
||||
# only use an existing python when it is version 2.5 or newer because some
|
||||
# older Compaq and Dell PCs were delivered with outdated Python interpreters
|
||||
|
@ -33,7 +33,6 @@ Var LaTeXInstalled
|
||||
Var LilyPondPath
|
||||
Var MiKTeXUser
|
||||
Var MiKTeXVersion
|
||||
Var MissedProg
|
||||
Var Pointer
|
||||
Var PSVPath
|
||||
Var PythonPath
|
||||
|
@ -95,7 +95,7 @@ Section -Configure
|
||||
|
||||
# create the path prefix
|
||||
# $$ represents a literal $ in an NSIS string
|
||||
StrCpy $PathPrefix "$$LyXDir\bin;$$LyXDir\python;$$LyXDir\imagemagick;$$LyXDir\ghostscript"
|
||||
StrCpy $PathPrefix "$$LyXDir\bin;$$LyXDir\python;$$LyXDir\imagemagick"
|
||||
|
||||
${if} $PathLaTeX != ""
|
||||
StrCpy $PathPrefix "$PathPrefix;$PathLaTeX"
|
||||
@ -108,6 +108,9 @@ Section -Configure
|
||||
${endif}
|
||||
${if} $ImageEditorPath != ""
|
||||
StrCpy $PathPrefix "$PathPrefix;$ImageEditorPath"
|
||||
${endif}
|
||||
${if} $GhostscriptPath != ""
|
||||
StrCpy $PathPrefix "$PathPrefix;$GhostscriptPath"
|
||||
${endif}
|
||||
${if} $SVGPath != ""
|
||||
StrCpy $PathPrefix "$PathPrefix;$SVGPath"
|
||||
|
@ -83,9 +83,12 @@ Section -ProgramFiles SecProgramFiles
|
||||
WriteRegStr SHCTX "SOFTWARE\ImageMagick\Current" "Version" "${ImageMagickVersion}"
|
||||
|
||||
# Components of Ghostscript
|
||||
${if} $GhostscriptPath == ""
|
||||
SetOutPath "$INSTDIR\ghostscript"
|
||||
File /r "${FILES_GHOSTSCRIPT}\"
|
||||
!insertmacro FileListMSVC File "${FILES_MSVC}\"
|
||||
StrCpy $GhostscriptPath "$INSTDIR\ghostscript\bin"
|
||||
${endif}
|
||||
|
||||
!if ${SETUPTYPE} == BUNDLE
|
||||
|
||||
|
@ -95,6 +95,11 @@ Section "un.LyX" un.SecUnProgramFiles
|
||||
|
||||
${EndIf}
|
||||
|
||||
# clean other registry entries
|
||||
DeleteRegKey SHCTX "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\${APP_NAME}.exe"
|
||||
DeleteRegKey SHCTX "SOFTWARE\${APP_REGKEY}"
|
||||
|
||||
|
||||
SectionEnd
|
||||
|
||||
#---------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user