2007-05-15 22:43:05 +00:00
# this file contains the installation actions for the third-party programs
2007-04-24 22:08:27 +00:00
Function Ghostscript
2007-05-01 17:55:54 +00:00
# if GhostScript is not installed
2007-02-08 21:09:30 +00:00
${if} $GhostscriptPath == ""
2007-05-01 17:55:54 +00:00
# register Ghostscript
2007-02-08 21:09:30 +00:00
WriteRegStr HKLM "SOFTWARE\GPL Ghostscript\${GhostscriptVersion}" "GS_DLL" "${GhostscriptDir}\bin\gsdll32.dll"
2008-09-25 21:15:38 +00:00
WriteRegStr HKLM "SOFTWARE\GPL Ghostscript\${GhostscriptVersion}" "GS_LIB" "${GhostscriptDir}\lib"
2007-02-08 21:09:30 +00:00
2007-05-01 17:55:54 +00:00
WriteRegStr HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
2007-02-08 21:09:30 +00:00
StrCpy $GhostscriptPath "${GhostscriptDir}\bin"
${else}
2007-05-01 17:55:54 +00:00
# delete unnecessary files
2007-05-08 00:24:52 +00:00
RMDir /r ${GhostscriptDir}
2007-06-04 01:05:38 +00:00
StrCpy $DelGSDir "Yes" # used later in function ImageMagick
2007-02-08 21:09:30 +00:00
${endif}
2007-04-24 22:08:27 +00:00
FunctionEnd
2007-05-01 17:55:54 +00:00
# -------------------------------------------
2007-04-24 22:08:27 +00:00
Function ImageMagick
2007-05-01 17:55:54 +00:00
# if ImageMagick is not installed
2007-02-08 21:09:30 +00:00
${if} $ImageMagickPath == ""
2007-05-01 17:55:54 +00:00
# register ImageMagick
2007-02-08 21:09:30 +00:00
WriteRegStr HKLM "SOFTWARE\Classes\Applications" "AutoRun" "${ImageMagickDir}\convert.exe $$"
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "BinPath" "${ImageMagickDir}"
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "CoderModulesPath" "${ImageMagickDir}\modules\coders"
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "ConfigurePath" "${ImageMagickDir}\config"
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "FilterModulesPath" "${ImageMagickDir}\modules\filters"
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "LibPath" "${ImageMagickDir}"
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "BinPath" "${ImageMagickDir}"
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "CoderModulesPath" "${ImageMagickDir}\modules\coders"
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "ConfigurePath" "${ImageMagickDir}\config"
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "FilterModulesPath" "${ImageMagickDir}\modules\filters"
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "LibPath" "${ImageMagickDir}"
WriteRegDWORD HKLM "SOFTWARE\ImageMagick\Current" "QuantumDepth" 0x00000010
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "Version" "${ImageMagickVersion}"
2007-05-01 17:55:54 +00:00
WriteRegStr HKLM "Software\ImageMagick" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
2007-02-08 21:09:30 +00:00
StrCpy $ImageMagickPath ${ImageMagickDir}
${else}
2007-05-01 17:55:54 +00:00
# delete unnecessary files
2007-02-08 21:09:30 +00:00
RMDir /r ${ImageMagickDir}
2007-06-04 01:05:38 +00:00
# delete the "etc" folder when also the Ghostscript folder was deleted because it is then empty
${if} $DelGSDir == "Yes"
RMDir /r "$INSTDIR\etc"
${endif}
2007-02-08 21:09:30 +00:00
${endif}
2007-04-24 22:08:27 +00:00
FunctionEnd
2007-05-01 17:55:54 +00:00
# -------------------------------------------
2007-04-24 22:08:27 +00:00
Function Aiksaurus
2007-05-01 17:55:54 +00:00
# if Aiksaurus is not installed
2007-02-08 21:09:30 +00:00
${if} $AiksaurusPath == ""
2007-05-01 17:55:54 +00:00
# extract Aiksaurus' program files
2007-02-08 21:09:30 +00:00
SetOutPath "$INSTDIR\external"
File /r "${PRODUCT_SOURCEDIR}\${AiksaurusInstall}"
2007-05-01 17:55:54 +00:00
# copy the files and register Aiksaurus
2007-02-08 21:09:30 +00:00
CopyFiles "$INSTDIR\${AiksaurusInstall}" "$APPDATA"
2007-05-01 17:55:54 +00:00
# WriteRegStr HKLM "Software\Aiksaurus" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
# WriteRegStr HKLM "Software\Aiksaurus" "Data Path" "${AiksaurusDir}"
2007-02-08 21:09:30 +00:00
${endif}
2007-04-24 22:08:27 +00:00
FunctionEnd
2007-05-01 17:55:54 +00:00
# -------------------------------------------
2007-04-24 22:08:27 +00:00
2007-05-15 22:43:05 +00:00
!if ${INSTALLER_VERSION} == "Complete"
2007-04-24 22:08:27 +00:00
2007-05-15 22:43:05 +00:00
Function PostScript
# if no PostScript viewer is installed
2007-02-08 21:09:30 +00:00
${if} $PSVPath == ""
${if} $InstallGSview == "true"
2007-05-01 17:55:54 +00:00
# launch installer
2007-02-08 21:09:30 +00:00
MessageBox MB_OK|MB_ICONINFORMATION "$(GSviewInfo)"
ExecWait "$INSTDIR\${GSviewInstall}"
2007-05-01 17:55:54 +00:00
# test if GSview is installed
2007-02-08 21:09:30 +00:00
StrCpy $PSVPath ""
ReadRegStr $PSVPath HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\gsview32.exe" "Path"
${if} $PSVPath == ""
MessageBox MB_OK|MB_ICONEXCLAMATION "$(GSviewError)"
${endif}
${endif}
${endif}
2007-04-19 00:55:52 +00:00
2007-05-15 22:43:05 +00:00
FunctionEnd
!endif # endif ${INSTALLER_VERSION} == "Complete"
2007-04-24 22:08:27 +00:00
2007-05-01 17:55:54 +00:00
# -------------------------------------------
2007-04-24 22:08:27 +00:00
2007-05-15 22:43:05 +00:00
!if ${INSTALLER_VERSION} == "Complete"
2007-04-24 22:08:27 +00:00
2007-05-15 22:43:05 +00:00
Function BibTeX
# if no BibTeX editor is installed
2007-02-08 21:09:30 +00:00
${if} $BibTeXEditorPath == ""
${if} $InstallJabRef == "true"
2007-05-01 17:55:54 +00:00
# launch installer
2007-02-08 21:09:30 +00:00
MessageBox MB_OK|MB_ICONINFORMATION "$(JabRefInfo)"
ExecWait "$INSTDIR\${JabRefInstall}"
2007-05-01 17:55:54 +00:00
# test if JabRef is installed
2007-02-08 21:09:30 +00:00
StrCpy $BibTeXEditorPath ""
2007-08-25 19:56:18 +00:00
ReadRegStr $BibTeXEditorPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
2007-02-08 21:09:30 +00:00
${if} $BibTeXEditorPath == ""
MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)"
${else}
2007-08-25 19:56:18 +00:00
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
2007-02-08 21:09:30 +00:00
${endif}
${endif}
${endif}
2007-05-15 22:43:05 +00:00
FunctionEnd
!endif # endif ${INSTALLER_VERSION} == "Complete"
2007-02-08 21:09:30 +00:00