From f02fb2f7fdaa43b23512a980db4ba9f300ca7d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Tue, 8 May 2007 00:24:52 +0000 Subject: [PATCH] installer: move all Aspell parts to Aspell.nsh git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18231 a592a061-630c-0410-9148-cb99ea01b6c8 --- .../installer/LyXWinInstaller/Aspell.nsh | 38 ++++++++++++++++- .../InstallActions-complete.nsh | 42 ++++--------------- .../LyXWinInstaller/InstallActions-small.nsh | 36 +++------------- 3 files changed, 50 insertions(+), 66 deletions(-) diff --git a/development/Win32/packaging/installer/LyXWinInstaller/Aspell.nsh b/development/Win32/packaging/installer/LyXWinInstaller/Aspell.nsh index 24acf69e80..20072a676a 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/Aspell.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/Aspell.nsh @@ -1,9 +1,43 @@ # 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 @@ -72,6 +106,7 @@ FunctionEnd #-------------------------------- + !if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer Function InstallAspellDictionary @@ -218,6 +253,7 @@ FunctionEnd #--------------------------- + Function un.UninstAspell ReadRegStr $1 SHCTX "Software\Aspell" "Base Path" diff --git a/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-complete.nsh b/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-complete.nsh index 01155eb32d..8adadc8a04 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-complete.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-complete.nsh @@ -18,22 +18,22 @@ Section "-Installation actions" SecInstallation # 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 @@ -153,7 +153,7 @@ Function Ghostscript StrCpy $GhostscriptPath "${GhostscriptDir}\bin" ${else} # delete unnecessary files - RMDir /r ${GhostscriptDir} + RMDir /r ${GhostscriptDir} ${endif} FunctionEnd @@ -191,32 +191,6 @@ 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 diff --git a/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-small.nsh b/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-small.nsh index a94414fb84..c4354b7d90 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-small.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-small.nsh @@ -14,16 +14,16 @@ Section "-Installation actions" SecInstallation 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 @@ -144,32 +144,6 @@ 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