# Aspell dictionaries
+!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer
+
+Function InstallAspell
+ # install Aspell when it is not already installed
+
+ ${if} $AspellPath == ""
+ # extract Aspell's program files
+ SetOutPath "$INSTDIR\external"
+ File /r "${PRODUCT_SOURCEDIR}\${AspellInstall}"
+ # copy the files and register Aspell
+ CopyFiles "$INSTDIR\${AspellInstall}" "$APPDATA"
+
+ WriteRegStr HKLM "SOFTWARE\Aspell" "Base Path" "${AspellDir}"
+ WriteRegStr HKLM "SOFTWARE\Aspell" "Dictionary Path" "${AspellDictPath}"
+ WriteRegStr HKLM "SOFTWARE\Aspell" "Personal Path" "${AspellPersonalPath}"
+
+ WriteRegStr HKLM "Software\Aspell" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
+
+ WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "DisplayName" "${AspellDisplay}"
+ WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "NoModify" 0x00000001
+ WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "NoRepair" 0x00000001
+ WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "UninstallString" "${AspellDir}\${AspellUninstall}"
+ ${endif}
+
+FunctionEnd
+
+!endif # endif ${INSTALLER_TYPE} == "NotUpdate"
+
+#--------------------------------
+
+
!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer
Function DownloadDictionary
-
+ # Downloads Aspell dictionaries from a location that is given in the file
+ # $INSTDIR\Resources\AspellDictionaryNames.txt
+
+ # read out the locations from the file
FileOpen $R5 "$INSTDIR\Resources\AspellDictionaryNames.txt" r
${Do}
FileRead $R5 $String # $String is now the dictionary name
#--------------------------------
+
!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer
Function InstallAspellDictionary
#---------------------------
+
Function un.UninstAspell
ReadRegStr $1 SHCTX "Software\Aspell" "Base Path"
# install MiKTeX if not already installed
Call MiKTeX
- # install Ghostscript if it not installed
+ # install Ghostscript if not already installed
Call Ghostscript
- # install ImageMagick if it not installed
+ # install ImageMagick if not already installed
Call ImageMagick
- # install ImageMAspellagick if it not installed
- Call Aspell
+ # install Aspell if not already installed
+ Call InstallAspell # function from Aspell.nsh
- # install Aiksaurus if it not installed
+ # install Aiksaurus if not already installed
Call Aiksaurus
- # install GSview if it not installed and the user selected it
+ # install GSview if not already installed and the user selected it
Call PostScript
- # install JabRef if it not installed and the user selected it
+ # install JabRef if not already installed and the user selected it
Call BibTeX
# install the LaTeX class files that are delivered with LyX
StrCpy $GhostscriptPath "${GhostscriptDir}\bin"
${else}
# delete unnecessary files
- RMDir /r ${GhostscriptDir}
+ RMDir /r ${GhostscriptDir}
${endif}
FunctionEnd
# -------------------------------------------
-Function Aspell
-
- # if Aspell is not installed
- ${if} $AspellPath == ""
- # extract Aspell's program files
- SetOutPath "$INSTDIR\external"
- File /r "${PRODUCT_SOURCEDIR}\${AspellInstall}"
- # copy the files and register Aspell
- CopyFiles "$INSTDIR\${AspellInstall}" "$APPDATA"
-
- WriteRegStr HKLM "SOFTWARE\Aspell" "Base Path" "${AspellDir}"
- WriteRegStr HKLM "SOFTWARE\Aspell" "Dictionary Path" "${AspellDictPath}"
- WriteRegStr HKLM "SOFTWARE\Aspell" "Personal Path" "${AspellPersonalPath}"
-
- WriteRegStr HKLM "Software\Aspell" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
-
- WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "DisplayName" "${AspellDisplay}"
- WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "NoModify" 0x00000001
- WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "NoRepair" 0x00000001
- WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "UninstallString" "${AspellDir}\${AspellUninstall}"
- ${endif}
-
-FunctionEnd
-
-# -------------------------------------------
-
Function Aiksaurus
# if Aiksaurus is not installed
File /r "${PRODUCT_SOURCEDIR}\etc"
File /r "${PRODUCT_SOURCEDIR}\Resources"
- # install GhostScript if it not installed
+ # install GhostScript if not already installed
Call Ghostscript
- # install ImageMagick if it not installed
+ # install ImageMagick if not already installed
Call ImageMagick
- # install Aspell if it not installed
- Call Aspell
+ # install Aspell if not already installed
+ Call InstallAspell # function from Aspell.nsh
- # install Aiksaurus if it not installed
+ # install Aiksaurus if not already installed
Call Aiksaurus
# install the LaTeX class files that are delivered with LyX
# -------------------------------------------
-Function Aspell
-
- # if Aspell is not installed
- ${if} $AspellPath == ""
- # extract Aspell's program files
- SetOutPath "$INSTDIR\external"
- File /r "${PRODUCT_SOURCEDIR}\${AspellInstall}"
- # copy the files and register Aspell
- CopyFiles "$INSTDIR\${AspellInstall}" "$APPDATA"
-
- WriteRegStr HKLM "SOFTWARE\Aspell" "Base Path" "${AspellDir}"
- WriteRegStr HKLM "SOFTWARE\Aspell" "Dictionary Path" "${AspellDictPath}"
- WriteRegStr HKLM "SOFTWARE\Aspell" "Personal Path" "${AspellPersonalPath}"
-
- WriteRegStr HKLM "Software\Aspell" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
-
- WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "DisplayName" "${AspellDisplay}"
- WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "NoModify" 0x00000001
- WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "NoRepair" 0x00000001
- WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "UninstallString" "${AspellDir}\${AspellUninstall}"
- ${endif}
-
-FunctionEnd
-
-# -------------------------------------------
-
Function Aiksaurus
# if Aiksaurus is not installed