]> git.lyx.org Git - features.git/commitdiff
installer: move all Aspell parts to Aspell.nsh
authorUwe Stöhr <uwestoehr@web.de>
Tue, 8 May 2007 00:24:52 +0000 (00:24 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Tue, 8 May 2007 00:24:52 +0000 (00:24 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18231 a592a061-630c-0410-9148-cb99ea01b6c8

development/Win32/packaging/installer/LyXWinInstaller/Aspell.nsh
development/Win32/packaging/installer/LyXWinInstaller/InstallActions-complete.nsh
development/Win32/packaging/installer/LyXWinInstaller/InstallActions-small.nsh

index 24acf69e80c7f204a7d98b9b0d271986e8a00ad4..20072a676ad6d8c1f528bfed73fbdcc9c1fbbf14 100644 (file)
@@ -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"
index 01155eb32db0f08eb45435a9020e00b86903cc25..8adadc8a04e5431e973cfbc84e6aa563ab40410f 100644 (file)
@@ -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
index a94414fb84ef3582109f29549152fc14e2a8ee33..c4354b7d9076c45516b7cebc83f0bb14345ed84c 100644 (file)
@@ -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