]> git.lyx.org Git - lyx.git/blobdiff - development/Win32/packaging/installer/LyXWinInstaller/Aspell.nsh
Changed comment character from ';' to '#*
[lyx.git] / development / Win32 / packaging / installer / LyXWinInstaller / Aspell.nsh
index ede37a3f552bb71ca323d50ea80f04c37772c841..4910a430ea88e6450eca6108c9267668f2b8e960 100644 (file)
@@ -1,13 +1,13 @@
-; Aspell dictionaries
+# Aspell dictionaries
 
 Function DownloadDictionary
        
  FileOpen $R5 "$INSTDIR\Resources\AspellDictionaryNames.txt" r
  ${Do}
-  FileRead $R5 $String ; $String is now the dictionary name
-  StrCpy $R3 $String 2 ; $R3 is now the dictionary language code
+  FileRead $R5 $String # $String is now the dictionary name
+  StrCpy $R3 $String 2 # $R3 is now the dictionary language code
   ${if} $R3 == "tr"
-  ${andif} $DictCode != "tr" ; if nothing was found (the last line in the file starts with "tr")
+  ${andif} $DictCode != "tr" # if nothing was found (the last line in the file starts with "tr")
    FileClose $R5
    StrCpy $String ""
    StrCpy $AspellInstallYes "$RunNumber$AspellInstallYes"
@@ -16,23 +16,23 @@ Function DownloadDictionary
  ${LoopUntil} $DictCode == $R3
  FileClose $R5
 
-  StrCpy $String $String -2 ; delete the linebreak characters at the end
+  StrCpy $String $String -2 # delete the linebreak characters at the end
  
-  ; Download aspell dictionaries,
-  ; if first download repository is not available try the other ones listed in "AspellRepositories.txt"
+  # Download aspell dictionaries,
+  # if first download repository is not available try the other ones listed in "AspellRepositories.txt"
   FileOpen $R5 "$INSTDIR\Resources\AspellRepositories.txt" r
   ${For} $4 1 4
-   FileRead $R5 $Search ; $Search is now the AspellLocation
-   StrCpy $Search $Search -2 ; delete the linebreak characters at the end
+   FileRead $R5 $Search # $Search is now the AspellLocation
+   StrCpy $Search $Search -2 # delete the linebreak characters at the end
    Push $R0
    InetLoad::load /TIMEOUT=5000 "$Search/aspell6-$String.exe" "$INSTDIR\aspell6-$String.exe" /END
    Pop $R0
-   ; test if the downloaded file is really the expected one, because if the file didn't exist on the download server,
-   ; berlios.de downloads a text file with the name of the non-existing file that contains the line "File doesn't exist" 
+   # test if the downloaded file is really the expected one, because if the file didn't exist on the download server,
+   # berlios.de downloads a text file with the name of the non-existing file that contains the line "File doesn't exist" 
    FileOpen $R4 "$INSTDIR\aspell6-$String.exe" r
    FileRead $R4 $Search
    FileClose $R4
-   StrCpy $Search $Search -1 ; delete the unix linebreak character at the end
+   StrCpy $Search $Search -1 # delete the unix linebreak character at the end
    ${if} $Search == "File doesn't exist"
     StrCpy $R0 ""
    ${endif}
@@ -42,14 +42,14 @@ Function DownloadDictionary
   ${Next}
   FileClose $R5
   
-  ; Download failed
+  # Download failed
   ${if} $R0 != "OK"
    MessageBox MB_OK|MB_ICONEXCLAMATION "$(AspellDownloadFailed) $R0"
    StrCpy $AspellInstallYes "$RunNumber$AspellInstallYes"
    Goto abortinstall
   ${endif}
  
-  ; Download successful
+  # Download successful
   ExecWait '"$INSTDIR\aspell6-$String.exe" /NoDirChange /AutoClose'
   ${if} $AspellBaseReg == "HKLM"
    ReadRegStr $R2 HKLM "Software\Aspell\Dictionaries" $DictCode
@@ -66,16 +66,16 @@ Function DownloadDictionary
 
 FunctionEnd
 
-;--------------------------------
+#--------------------------------
 
 Function InstallAspellDictionary
        
  StrCpy $AspellInstallYes ""
 
; install the english dictionary if not already installed
# install the english dictionary if not already installed
  StrCpy $DictCode "en"
  StrCpy $RunNumber "1"
- ${if} $AspellBaseReg == "HKLM" ; $AspellBaseReg is either "HKLM" or if Aspell is already installed only for the current user "HKCU"
+ ${if} $AspellBaseReg == "HKLM" # $AspellBaseReg is either "HKLM" or if Aspell is already installed only for the current user "HKCU"
   ReadRegStr $R2 HKLM "Software\Aspell\Dictionaries" $DictCode
  ${else}
   ReadRegStr $R2 HKCU "Software\Aspell\Dictionaries" $DictCode
@@ -88,11 +88,11 @@ Function InstallAspellDictionary
   StrCpy $AspellInstallYes "$RunNumber$AspellInstallYes"
  ${endif}
  
; install the dictionary corresponding to the system and the chosen menu language
; check if the system language and the chosen menu language are the same, if not install
; both dictionaries
# install the dictionary corresponding to the system and the chosen menu language
# check if the system language and the chosen menu language are the same, if not install
# both dictionaries
  StrCpy $DictCode $LangCode 2
- StrCpy $0 $DictCode ; $0 is now the language code of the chosen LyX menu language
+ StrCpy $0 $DictCode # $0 is now the language code of the chosen LyX menu language
  StrCpy $RunNumber "2"
  ${if} $AspellInstallYes == "1"
  ${andif} $DictCode == "en"
@@ -111,7 +111,7 @@ Function InstallAspellDictionary
   ${else}
    StrCpy $AspellInstallYes "$RunNumber$AspellInstallYes"
   ${endif}
- ${endif} ; endif $AspellInstallYes == "1"
+ ${endif} # endif $AspellInstallYes == "1"
  ${if} $LangCodeSys != $DictCode
   StrCpy $RunNumber "3"
   ${if} $LangCodeSys == "en"
@@ -131,12 +131,12 @@ Function InstallAspellDictionary
    ${else}
     StrCpy $AspellInstallYes "$RunNumber$AspellInstallYes"
    ${endif}
-  ${endif} ; endif $LangCodeSys == "en"
- ${else} ; else ${if} $LangCodeSys != $DictCode
+  ${endif} # endif $LangCodeSys == "en"
+ ${else} # else ${if} $LangCodeSys != $DictCode
   StrCpy $AspellInstallYes "4$AspellInstallYes"
  ${endif}
 
; check the registry to divide between nothing installed or all already installed
# check the registry to divide between nothing installed or all already installed
  ${if} $AspellInstallYes == "321"
  ${orif} $AspellInstallYes == "421"
   ${if} $AspellBaseReg == "HKLM"
@@ -167,12 +167,12 @@ Function InstallAspellDictionary
  Delete "$INSTDIR\Resources\AspellDictionaryNames.txt"
  Delete "$INSTDIR\Resources\AspellRepositories.txt"
  
; show message about Aspell dictionaries
; the code rule to display the correct message:
; - when the englisch dictionary is already installed or couldn't be installed -> set a "1"
; - when the dictionary of the chosen LyX menu language is already installed or couldn't be installed -> set a "2"
; - when the dictionary of the Windows system language is already installed or couldn't be installed -> set a "3"
; - when the dictionary of the chosen LyX menu language is equal to the dictionary of the Windows system language -> set a "4"
# show message about Aspell dictionaries
# the code rule to display the correct message:
# - when the englisch dictionary is already installed or couldn't be installed -> set a "1"
# - when the dictionary of the chosen LyX menu language is already installed or couldn't be installed -> set a "2"
# - when the dictionary of the Windows system language is already installed or couldn't be installed -> set a "3"
# - when the dictionary of the chosen LyX menu language is equal to the dictionary of the Windows system language -> set a "4"
  ${if} $AspellInstallYes == "32"
  ${orif} $AspellInstallYes == "42"
   MessageBox MB_ICONINFORMATION|MB_DEFBUTTON2|MB_YESNO "$(AspellPartStart)$(AspellPart1)$(AspellPart4)" IDYES DownloadNow IDNO DownloadLater
@@ -208,14 +208,14 @@ Function InstallAspellDictionary
         
 FunctionEnd
  
-;---------------------------
+#---------------------------
 
 Function un.UninstAspell
 
     ReadRegStr $1 SHCTX "Software\Aspell" "Base Path"
-    ; delete Aspells' install folder
+    # delete Aspells' install folder
     RMDir /r $1
-    ; unregister Aspell and its dictionaries
+    # unregister Aspell and its dictionaries
     DeleteRegKey SHCTX "Software\Aspell"
     DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell"
     DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell6-Dictionary-af"