1 # this file contains the installation actions for the third-party programs
5 # if GhostScript is not installed
6 ${if} $GhostscriptPath == ""
8 WriteRegStr HKLM "SOFTWARE\GPL Ghostscript\${GhostscriptVersion}" "GS_DLL" "${GhostscriptDir}\bin\gsdll32.dll"
9 WriteRegStr HKLM "SOFTWARE\GPL Ghostscript\${GhostscriptVersion}" "GS_LIB" "${GhostscriptDir}\lib"
11 WriteRegStr HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
12 StrCpy $GhostscriptPath "${GhostscriptDir}\bin"
14 # delete unnecessary files
15 RMDir /r ${GhostscriptDir}
16 StrCpy $DelGSDir "Yes" # used later in function ImageMagick
21 # -------------------------------------------
25 # if ImageMagick is not installed
26 ${if} $ImageMagickPath == ""
27 # register ImageMagick
28 WriteRegStr HKLM "SOFTWARE\Classes\Applications" "AutoRun" "${ImageMagickDir}\convert.exe $$"
29 WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "BinPath" "${ImageMagickDir}"
30 WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "CoderModulesPath" "${ImageMagickDir}\modules\coders"
31 WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "ConfigurePath" "${ImageMagickDir}\config"
32 WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "FilterModulesPath" "${ImageMagickDir}\modules\filters"
33 WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "LibPath" "${ImageMagickDir}"
35 WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "BinPath" "${ImageMagickDir}"
36 WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "CoderModulesPath" "${ImageMagickDir}\modules\coders"
37 WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "ConfigurePath" "${ImageMagickDir}\config"
38 WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "FilterModulesPath" "${ImageMagickDir}\modules\filters"
39 WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "LibPath" "${ImageMagickDir}"
40 WriteRegDWORD HKLM "SOFTWARE\ImageMagick\Current" "QuantumDepth" 0x00000010
41 WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "Version" "${ImageMagickVersion}"
43 WriteRegStr HKLM "Software\ImageMagick" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
44 StrCpy $ImageMagickPath ${ImageMagickDir}
46 # delete unnecessary files
47 RMDir /r ${ImageMagickDir}
48 # delete the "etc" folder when also the Ghostscript folder was deleted because it is then empty
49 ${if} $DelGSDir == "Yes"
50 ${andif} $DelWMFDir == "Yes"
51 RMDir /r "$INSTDIR\etc"
57 # -------------------------------------------
61 # install eLyXer as Python module
62 ${if} $PythonPath != ""
63 # a Python module cannot simply started with
64 # ExecWait '$PythonPath\python.exe "$INSTDIR\bin\setup.py" install'
65 # therefore run a script
66 StrCpy $1 $INSTDIR 2 # get drive letter
67 FileOpen $R1 "$INSTDIR\bin\eLyXer.bat" w
68 FileWrite $R1 '$1$\r$\n\
69 cd "$INSTDIR\bin"$\r$\n\
70 "$PythonPath\python.exe" setup.py install'
72 ExecWait '"$INSTDIR\bin\eLyXer.bat"'
73 Delete "$INSTDIR\bin\eLyXer.bat"
75 ExecWait '"$INSTDIR\bin\python.exe" "$INSTDIR\bin\setup.py" install'
80 # -------------------------------------------
84 # if Aiksaurus is not installed
85 ${if} $AiksaurusPath == ""
86 # extract Aiksaurus' program files
87 SetOutPath "$INSTDIR\external"
88 File /r "${PRODUCT_SOURCEDIR}\${AiksaurusInstall}"
89 # copy the files and register Aiksaurus
90 CopyFiles "$INSTDIR\${AiksaurusInstall}" "$APPDATA"
91 # WriteRegStr HKLM "Software\Aiksaurus" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
92 # WriteRegStr HKLM "Software\Aiksaurus" "Data Path" "${AiksaurusDir}"
97 # -------------------------------------------
101 ${if} ${AtLeastWinVista}
102 StrCpy $PrinterConf "printui.exe"
104 StrCpy $PrinterConf "rundll32.exe printui.dll,PrintUIEntry"
109 Function Metafile2eps
111 # if Metafile2eps is not installed
114 ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"'
115 # install printer and driver
116 ExecWait '$PrinterConf /if /f "$WINDIR\inf\ntprint.inf" /b "Metafile to EPS Converter" /r "FILE:" /m "MS Publisher Imagesetter"'
117 # restore DEVMODE with proper settings
118 ExecWait '$PrinterConf /q /Sr /n "Metafile to EPS Converter" /a "$INSTDIR\metafile2eps.dat" g'
120 WriteRegStr HKLM "SOFTWARE\InkNote Selector" "" ${Metafile2epsDir}
121 # register Metafile2eps
122 Var /GLOBAL RegLocation
123 StrCpy $RegLocation "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Metafile to EPS Converter"
124 WriteRegStr HKLM "$RegLocation" "InstallLocation" "${Metafile2epsDir}"
125 WriteRegStr HKLM "$RegLocation" "DisplayName" "Metafile to EPS Converter"
126 WriteRegStr HKLM "$RegLocation" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
127 StrCpy $WMFPath "${Metafile2epsDir}"
128 # delete temporary file
129 Delete "$INSTDIR\metafile2eps.dat"
131 # delete unnecessary files
132 RMDir /r "${Metafile2epsDir}"
133 StrCpy $DelWMFDir "Yes" # used later in function ImageMagick
138 # -------------------------------------------
140 !if ${INSTALLER_VERSION} == "Complete"
144 # if no PostScript viewer is installed
146 ${if} $InstallGSview == "true"
148 MessageBox MB_OK|MB_ICONINFORMATION "$(GSviewInfo)"
149 ExecWait "$INSTDIR\${GSviewInstall}"
150 # test if GSview is installed
152 ReadRegStr $PSVPath HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\gsview32.exe" "Path"
154 MessageBox MB_OK|MB_ICONEXCLAMATION "$(GSviewError)"
161 !endif # endif ${INSTALLER_VERSION} == "Complete"
163 # -------------------------------------------
165 !if ${INSTALLER_VERSION} == "Complete"
169 # if no BibTeX editor is installed
170 ${if} $BibTeXEditorPath == ""
171 ${if} $InstallJabRef == "true"
173 MessageBox MB_OK|MB_ICONINFORMATION "$(JabRefInfo)"
174 ExecWait "$INSTDIR\${JabRefInstall}"
175 # test if JabRef is installed
176 StrCpy $BibTeXEditorPath ""
177 ReadRegStr $BibTeXEditorPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
178 ${if} $BibTeXEditorPath == ""
179 MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)"
181 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
188 !endif # endif ${INSTALLER_VERSION} == "Complete"