Win installer: updates and fixes

- enable support for Georgian
- update file sizes
- re-introduce the dictionary download because it is necessary to step through several mirrors if necessary. This function was once added because as it is now, only one mirror is used, if it is dead the user won't get the dictionary
- update the mirror list
This commit is contained in:
Uwe Stöhr 2019-02-11 00:17:42 +01:00
parent f19bd163de
commit 028cf852dc
5 changed files with 62 additions and 21 deletions

View File

@ -2,21 +2,23 @@ astuteinternet
ayera ayera
cfhcable cfhcable
cytranet cytranet
datapacket
excellmedia excellmedia
freefr freefr
iweb iweb
jaist jaist
kent kent
liquidtelecom liquidtelecom
managedway
nchc nchc
netcologne netcologne
netix netix
netcologne
newcontinuum newcontinuum
phoenixnap phoenixnap
pilotfiber
razaoinfo razaoinfo
superb-dca2 superb-dca2
superb-sea2 svwh
ufpr ufpr
versaweb versaweb
vorboss vorboss

View File

@ -82,6 +82,8 @@ is_IS.aff
is_IS.dic is_IS.dic
it_IT.aff it_IT.aff
it_IT.dic it_IT.dic
ka_GE.aff
ka_GE.dic
kk_KZ.aff kk_KZ.aff
kk_KZ.dic kk_KZ.dic
ko_KR.aff ko_KR.aff

View File

@ -100,6 +100,7 @@ lettrine
listings listings
lithuanian lithuanian
genmisc genmisc
georgian
mathtools mathtools
mhchem mhchem
mongolian-babel mongolian-babel

View File

@ -28,8 +28,8 @@ Function FindDictionaries
# read out the possible spell-checker filenames from the file # read out the possible spell-checker filenames from the file
FileOpen $R5 "$INSTDIR\Resources\HunspellDictionaryNames.txt" r FileOpen $R5 "$INSTDIR\Resources\HunspellDictionaryNames.txt" r
${for} $5 1 72 ${for} $5 1 73
# the file has 144 lines, but we only need to check for one of the 2 dictionary files per language # the file has 146 lines, but we only need to check for one of the 2 dictionary files per language
# therefore check only for every second line # therefore check only for every second line
FileRead $R5 $String # skip the .aff file FileRead $R5 $String # skip the .aff file
FileRead $R5 $String # $String is now the .dic filename FileRead $R5 $String # $String is now the .dic filename
@ -66,20 +66,32 @@ Function DownloadHunspellDictionaries
# read out the locations from the file # read out the locations from the file
FileOpen $R5 "$INSTDIR\Resources\HunspellDictionaryNames.txt" r FileOpen $R5 "$INSTDIR\Resources\HunspellDictionaryNames.txt" r
${For} $5 1 144 # the file has 144 lines ${For} $5 1 146 # the file has 146 lines
FileRead $R5 $String # $String is now the dictionary name FileRead $R5 $String # $String is now the dictionary name
StrCpy $R3 $String -6 # $R3 is now the dictionary language code StrCpy $R3 $String -6 # $R3 is now the dictionary language code
${if} $DictCode == $R3 ${if} $DictCode == $R3
StrCpy $String $String -2 # delete the linebreak characters at the end StrCpy $String $String -2 # delete the linebreak characters at the end
# Download hunspell dictionaries # Download hunspell dictionaries,
Push $R0 # if first download repository is not available try the other ones listed in "DictionaryMirrors.txt"
inetc::get /RECEIVETIMEOUT=5000 "https://sourceforge.net/projects/lyxwininstaller/files/hunspell/$String" "$INSTDIR\Resources\dicts\$String" /END FileOpen $R4 "$INSTDIR\Resources\DictionaryMirrors.txt" r
Pop $R0
${For} $4 1 24 # there are 24 mirrors in the file
FileRead $R4 $Search # $Search is now the mirror
StrCpy $Search $Search -2 # delete the linebreak characters at the end
Push $R0
inetc::get /TIMEOUT=5000 "https://$Search.dl.sourceforge.net/project/lyxwininstaller/hunspell/$String" "$INSTDIR\Resources\dicts\$String" /END
Pop $R0
${if} $R0 == "OK"
${ExitFor}
${endif}
${Next}
FileClose $R4
# if download failed # if download failed
${if} $R0 != "OK" ${if} $R0 != "OK"
MessageBox MB_OK|MB_ICONEXCLAMATION "$(HunspellFailed): $R0" MessageBox MB_OK|MB_ICONEXCLAMATION "$(HunspellFailed)"
Goto abortinstall Goto abortinstall
${endif} ${endif}
${endif} # end if $DictCode == $R3 ${endif} # end if $DictCode == $R3
@ -107,13 +119,25 @@ Function DownloadThesaurusDictionaries
${if} $ThesCode == $R3 ${if} $ThesCode == $R3
StrCpy $String $String -2 # delete the linebreak characters at the end StrCpy $String $String -2 # delete the linebreak characters at the end
# Download thesaurus files # Download thesaurus files,
Push $R0 # if first download repository is not available try the other ones listed in "DictionaryMirrors.txt"
inetc::get /POPUP /RECEIVETIMEOUT=5000 "https://sourceforge.net/projects/lyxwininstaller/files/thesaurus/$String" "$INSTDIR\Resources\thes\$String" /END FileOpen $R4 "$INSTDIR\Resources\DictionaryMirrors.txt" r
Pop $R0
${For} $4 1 24 # there are 24 mirrors in the file
FileRead $R4 $Search # $Search is now the mirror
StrCpy $Search $Search -2 # delete the linebreak characters at the end
Push $R0
inetc::get /TIMEOUT=5000 "https://$Search.dl.sourceforge.net/project/lyxwininstaller/thesaurus/$String" "$INSTDIR\Resources\thes\$String" /END
Pop $R0
${if} $R0 == "OK"
${ExitFor}
${endif}
${Next}
FileClose $R4
# if download failed # if download failed
${if} $R0 != "OK" ${if} $R0 != "OK"
MessageBox MB_OK|MB_ICONEXCLAMATION "$(ThesaurusFailed): $R0" MessageBox MB_OK|MB_ICONEXCLAMATION "$(ThesaurusFailed)"
Goto abortinstall Goto abortinstall
${endif} ${endif}
${endif} # end if $ThesCode == $R3 ${endif} # end if $ThesCode == $R3

View File

@ -151,19 +151,19 @@ SectionEnd
Section /o "English (AU)" SecDEnglishAU Section /o "English (AU)" SecDEnglishAU
StrCpy $DictCodes "en_AU,$DictCodes" StrCpy $DictCodes "en_AU,$DictCodes"
AddSize 552 AddSize 557
SectionEnd SectionEnd
Section /o "English (CA)" SecDEnglishCA Section /o "English (CA)" SecDEnglishCA
StrCpy $DictCodes "en_CA,$DictCodes" StrCpy $DictCodes "en_CA,$DictCodes"
AddSize 550 AddSize 557
SectionEnd SectionEnd
Section "English (GB)" SecDEnglishGB Section "English (GB)" SecDEnglishGB
# already installed by default # already installed by default
SectionIn RO SectionIn RO
#StrCpy $DictCodes "en_GB,$DictCodes" #StrCpy $DictCodes "en_GB,$DictCodes"
AddSize 742 AddSize 1044
SectionEnd SectionEnd
Section /o "English (NZ)" SecDEnglishNZ Section /o "English (NZ)" SecDEnglishNZ
@ -175,7 +175,7 @@ Section "English (US)" SecDEnglishUS
# already installed by default # already installed by default
SectionIn RO SectionIn RO
#StrCpy $DictCodes "en_US,$DictCodes" #StrCpy $DictCodes "en_US,$DictCodes"
AddSize 548 AddSize 551
SectionEnd SectionEnd
Section "Español (ES)" SecDSpanishES Section "Español (ES)" SecDSpanishES
@ -234,6 +234,11 @@ Section /o "Galego" SecDGalician
AddSize 3911 AddSize 3911
SectionEnd SectionEnd
Section /o "ქართული ენა" SecDGeorgian
StrCpy $DictCodes "ka_GE,$DictCodes"
AddSize 3952
SectionEnd
Section /o "עִברִית" SecDHebrew Section /o "עִברִית" SecDHebrew
StrCpy $DictCodes "he_IL,$DictCodes" StrCpy $DictCodes "he_IL,$DictCodes"
AddSize 3120 AddSize 3120
@ -406,7 +411,7 @@ SectionEnd
Section /o "Türkmençe" SecDTurkmen Section /o "Türkmençe" SecDTurkmen
StrCpy $DictCodes "tk_TM,$DictCodes" StrCpy $DictCodes "tk_TM,$DictCodes"
AddSize 950 AddSize 2797
SectionEnd SectionEnd
Section /o "Türkçe" SecDTurkish Section /o "Türkçe" SecDTurkish
@ -416,7 +421,7 @@ SectionEnd
Section /o "Українська" SecDUkrainian Section /o "Українська" SecDUkrainian
StrCpy $DictCodes "uk_UA,$DictCodes" StrCpy $DictCodes "uk_UA,$DictCodes"
AddSize 6375 AddSize 6905
SectionEnd SectionEnd
Section /o "اردو" SecDUrdu Section /o "اردو" SecDUrdu
@ -922,6 +927,13 @@ Function .onInit
SectionSetFlags ${SecDGalician} $0 SectionSetFlags ${SecDGalician} $0
SectionSetSize ${SecDGalician} 0 SectionSetSize ${SecDGalician} 0
${endif} ${endif}
StrCpy $Search "ka_GE"
Call StrPoint
${if} $Pointer != "-1"
IntOp $0 ${SF_SELECTED} | ${SF_RO}
SectionSetFlags ${SecDGeorgian} $0
SectionSetSize ${SecDGeorgian} 0
${endif}
StrCpy $Search "he_IL" StrCpy $Search "he_IL"
Call StrPoint Call StrPoint
${if} $Pointer != "-1" ${if} $Pointer != "-1"