mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
installer: various fixed for immediate release
- LaTeX.nsh: fix bug that installer stopped working if LyX was installed the first time on a computer - init.nsh: - fix failing installation of Slovakian spellcheck dictionary - expand list of available dictionaries as requested by users - dictionaries.nsh: prevent case that the installer could run an infinite loop if the installation of dictionaries was interrupted - settings.nsh: use a HTTP repository for MiKTeX instead of FTP because many companies deny FTP access by default in their firewalls
This commit is contained in:
parent
428d5f8978
commit
22cfcab074
@ -1,4 +1,18 @@
|
||||
Changelog for LyX-205-5:
|
||||
Bugfixes:
|
||||
- fix bug that installer stopped working if LyX was installed
|
||||
the first time on a computer
|
||||
- fix failing installation of Slovakian spellcheck dictionary
|
||||
- prevent case that the installer could run an infinite loop if the
|
||||
installation of dictionaries was interrupted
|
||||
- added missing files to the installer source zip-file so that it can now really be
|
||||
used to compile the installer
|
||||
- updated to Qt 4.8.4 (Fixes a problem that with some screen font zooms, lines and dots disappeared.)
|
||||
|
||||
New features:
|
||||
- give feedback about the state of the package installation
|
||||
(Especially if LyX is installed the first time, the package installation can take several minutes.
|
||||
Now the installer prints in the progress window the name of the package that is currently installed.)
|
||||
- the installer supports now the usage of TeXLive as LaTeX distribution.
|
||||
(TeXLive must be manually installed before LyX.)
|
||||
- updated spell-checker dictionaries for Scottish and Swedish
|
||||
|
@ -84,6 +84,12 @@ Function LaTeXActions
|
||||
|
||||
${if} $PathLaTeX != ""
|
||||
StrCpy $LaTeXInstalled "MiKTeX"
|
||||
# on some installations the path ends with a "\" on some not
|
||||
# therefore assure that we remove it if it exists
|
||||
StrCpy $0 $PathLaTeX "" -1
|
||||
${if} $0 == "\"
|
||||
StrCpy $PathLaTeX "$PathLaTeX" -1 # delete "\"
|
||||
${endif}
|
||||
${endif}
|
||||
|
||||
# test if TeXLive is installed
|
||||
@ -108,7 +114,7 @@ Function LaTeXActions
|
||||
ReadRegStr $String HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\TeXLive2012" "UninstallString"
|
||||
${endif}
|
||||
${if} $String != ""
|
||||
StrCpy $String $String -27 # remove 'tlpkg\installer\uninst.bat"'
|
||||
StrCpy $String $String -28 # remove '\tlpkg\installer\uninst.bat"'
|
||||
StrCpy $String $String "" 1 # remove the leading quote
|
||||
${endif}
|
||||
StrCpy $PathLaTeX "$String\bin\win32"
|
||||
@ -148,22 +154,11 @@ FunctionEnd
|
||||
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)"
|
||||
ExecWait ${MiKTeXInstall}
|
||||
# test if MiKTeX is installed
|
||||
ReadRegStr $String HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path"
|
||||
StrCpy $Search "miktex"
|
||||
Call LaTeXCheck # function from LyXUtils.nsh
|
||||
Call LaTeXActions
|
||||
${if} $PathLaTeX != ""
|
||||
StrCpy $MiKTeXUser "HKLM"
|
||||
${else}
|
||||
StrCpy $MiKTeXUser "HKCU"
|
||||
ReadRegStr $String HKCU "Environment" "Path"
|
||||
StrCpy $Search "miktex"
|
||||
Call LaTeXCheck # function from LyXUtils.nsh
|
||||
${endif}
|
||||
${if} $PathLaTeX != ""
|
||||
# set package repository (MiKTeX's primary package repository)
|
||||
# special entry that it was installed together with LyX
|
||||
# so that we can later uninstall it together with LyX
|
||||
${if} $MiKTeXUser == "HKCU"
|
||||
# special entry that it was installed together with LyX
|
||||
# so that we can later uninstall it together with LyX
|
||||
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
|
||||
${else}
|
||||
WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
|
||||
@ -303,7 +298,6 @@ Function UpdateMiKTeX
|
||||
|
||||
MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater
|
||||
UpdateNow:
|
||||
StrCpy $0 $PathLaTeX -4 # remove "\bin"
|
||||
# the update wizard is started by the miktex-update.exe
|
||||
${if} $MultiUser.Privileges != "Admin"
|
||||
${andif} $MultiUser.Privileges != "Power"
|
||||
|
@ -77,7 +77,7 @@ Function DownloadHunspellDictionaries
|
||||
# if first download repository is not available try the other ones listed in "DictionaryMirrors.txt"
|
||||
FileOpen $R4 "$INSTDIR\Resources\DictionaryMirrors.txt" r
|
||||
|
||||
${For} $4 1 8
|
||||
${For} $4 1 8 # we know about 8 mirrors
|
||||
FileRead $R4 $Search # $Search is now the mirror
|
||||
StrCpy $Search $Search -2 # delete the linebreak characters at the end
|
||||
Push $R0
|
||||
@ -155,24 +155,29 @@ FunctionEnd
|
||||
Function InstallHunspellDictionaries
|
||||
# installs the selected hunspell dictionaries except of already existing ones
|
||||
|
||||
# download the dictionaries
|
||||
${Do}
|
||||
# take the first code
|
||||
StrCpy $Search ","
|
||||
StrCpy $String $DictCodes
|
||||
Call StrPoint
|
||||
# we always have a "," for each code, so in case in case something
|
||||
# went wrong, empty the code list to exit the loop
|
||||
${if} $Pointer == "-1"
|
||||
StrCpy $DictCodes ""
|
||||
${endif}
|
||||
${if} $Pointer != "-1"
|
||||
StrCpy $DictCode $DictCodes $Pointer
|
||||
# remove the taken code from the list
|
||||
IntOp $Pointer $Pointer + 1
|
||||
StrCpy $DictCodes $DictCodes "" $Pointer
|
||||
${endif}
|
||||
# don't dowload existing ones thus check if $DictCode is in $FoundDict
|
||||
StrCpy $String $FoundDict
|
||||
StrCpy $Search $DictCode
|
||||
Call StrPoint # function from LyXUtils.nsh
|
||||
${if} $Pointer == "-1"
|
||||
Call DownloadHunspellDictionaries
|
||||
# don't dowload existing ones thus check if $DictCode is in $FoundDict
|
||||
StrCpy $String $FoundDict
|
||||
StrCpy $Search $DictCode
|
||||
Call StrPoint # function from LyXUtils.nsh
|
||||
${if} $Pointer == "-1"
|
||||
# download the dictionaries
|
||||
Call DownloadHunspellDictionaries
|
||||
${endif}
|
||||
${endif}
|
||||
${LoopUntil} $DictCodes == ""
|
||||
|
||||
@ -183,17 +188,29 @@ FunctionEnd
|
||||
Function InstallThesaurusDictionaries
|
||||
# installs the selected thesaurus dictionaries except of already existing ones
|
||||
|
||||
# download the dictionaries
|
||||
${Do}
|
||||
# all codes have 5 characters
|
||||
StrCpy $ThesCode $ThesCodes 5 # take the first code
|
||||
StrCpy $ThesCodes $ThesCodes "" 5 # remove the taken code from the list
|
||||
# don't dowload existing ones thus check if $ThesCode is in $FoundThes
|
||||
StrCpy $String $FoundThes
|
||||
StrCpy $Search $ThesCode
|
||||
Call StrPoint # function from LyXUtils.nsh
|
||||
# take the first code
|
||||
StrCpy $Search ","
|
||||
StrCpy $String $ThesCodes
|
||||
Call StrPoint
|
||||
# we always have a "," for each code, so in case in case something
|
||||
# went wrong, empty the code list to exit the loop
|
||||
${if} $Pointer == "-1"
|
||||
Call DownloadThesaurusDictionaries
|
||||
StrCpy $ThesCodes ""
|
||||
${endif}
|
||||
${if} $Pointer != "-1"
|
||||
StrCpy $ThesCode $ThesCodes $Pointer
|
||||
# remove the taken code from the list
|
||||
IntOp $Pointer $Pointer + 1
|
||||
StrCpy $ThesCodes $ThesCodes "" $Pointer
|
||||
# don't dowload existing ones thus check if $ThesCode is in $FoundThes
|
||||
StrCpy $String $FoundThes
|
||||
StrCpy $Search $ThesCode
|
||||
Call StrPoint # function from LyXUtils.nsh
|
||||
${if} $Pointer == "-1"
|
||||
# download the dictionaries
|
||||
Call DownloadThesaurusDictionaries
|
||||
${endif}
|
||||
${endif}
|
||||
${LoopUntil} $ThesCodes == ""
|
||||
|
||||
|
@ -63,7 +63,10 @@ SectionEnd
|
||||
SectionEnd
|
||||
!endif
|
||||
|
||||
SectionGroup "Dictionaries" SecDictionaries
|
||||
# Expand the list of dictionaries by default as this was requested by several
|
||||
# users. For the thesaurus this is was not requested because this section
|
||||
# is by default empty.
|
||||
SectionGroup /e "Dictionaries" SecDictionaries
|
||||
|
||||
Section /o "Afrikaans" SecDAfrikaans
|
||||
StrCpy $DictCodes "af_ZA,$DictCodes"
|
||||
@ -368,7 +371,7 @@ Section /o "Sloven
|
||||
SectionEnd
|
||||
|
||||
Section /o "Slovenský" SecDSlovakian
|
||||
StrCpy $DictCodes "sk_SK$ThesCodes"
|
||||
StrCpy $DictCodes "sk_SK,$DictCodes"
|
||||
AddSize 4090
|
||||
SectionEnd
|
||||
|
||||
@ -379,7 +382,7 @@ SectionEnd
|
||||
|
||||
Section /o "Svenska" SecDSwedish
|
||||
StrCpy $DictCodes "sv_SE,$DictCodes"
|
||||
AddSize 2030
|
||||
AddSize 2028
|
||||
SectionEnd
|
||||
|
||||
# enable this for LyX 2.1!
|
||||
@ -421,112 +424,112 @@ SectionGroupEnd
|
||||
SectionGroup "Thesaurus" SecThesaurus
|
||||
|
||||
Section /o "Bulgarian" SecTBulgarian
|
||||
StrCpy $ThesCodes "bg_BG$ThesCodes"
|
||||
StrCpy $ThesCodes "bg_BG,$ThesCodes"
|
||||
AddSize 3020
|
||||
SectionEnd
|
||||
|
||||
Section /o "Català" SecTCatalan
|
||||
StrCpy $ThesCodes "ca_ES$ThesCodes"
|
||||
StrCpy $ThesCodes "ca_ES,$ThesCodes"
|
||||
AddSize 731
|
||||
SectionEnd
|
||||
|
||||
Section /o "Ceština" SecTCzech
|
||||
StrCpy $ThesCodes "cs_CZ$ThesCodes"
|
||||
StrCpy $ThesCodes "cs_CZ,$ThesCodes"
|
||||
AddSize 635
|
||||
SectionEnd
|
||||
|
||||
Section /o "Dansk" SecTDanish
|
||||
StrCpy $ThesCodes "da_DK$ThesCodes"
|
||||
StrCpy $ThesCodes "da_DK,$ThesCodes"
|
||||
AddSize 2360
|
||||
SectionEnd
|
||||
|
||||
Section /o "Deutsch (D/A)" SecTGermanDA
|
||||
StrCpy $ThesCodes "de_DE$ThesCodes"
|
||||
StrCpy $ThesCodes "de_DE,$ThesCodes"
|
||||
AddSize 14600
|
||||
SectionEnd
|
||||
|
||||
Section /o "Deutsch (CH)" SecTGermanCH
|
||||
StrCpy $ThesCodes "de_CH$ThesCodes"
|
||||
StrCpy $ThesCodes "de_CH,$ThesCodes"
|
||||
AddSize 14600
|
||||
SectionEnd
|
||||
|
||||
Section /o "English (GB)" SecTEnglishGB
|
||||
StrCpy $ThesCodes "en_GB$ThesCodes"
|
||||
StrCpy $ThesCodes "en_GB,$ThesCodes"
|
||||
AddSize 20600
|
||||
SectionEnd
|
||||
|
||||
Section /o "English (US/AU)" SecTEnglishUSAU
|
||||
StrCpy $ThesCodes "en_US$ThesCodes"
|
||||
StrCpy $ThesCodes "en_US,$ThesCodes"
|
||||
AddSize 20600
|
||||
SectionEnd
|
||||
|
||||
Section /o "Español" SecTSpanish
|
||||
StrCpy $ThesCodes "es_ES$ThesCodes"
|
||||
StrCpy $ThesCodes "es_ES,$ThesCodes"
|
||||
AddSize 2860
|
||||
SectionEnd
|
||||
|
||||
Section /o "Français" SecTFrench
|
||||
StrCpy $ThesCodes "fr_FR$ThesCodes"
|
||||
StrCpy $ThesCodes "fr_FR,$ThesCodes"
|
||||
AddSize 5060
|
||||
SectionEnd
|
||||
|
||||
Section /o "Gaeilge" SecTGaelic
|
||||
StrCpy $ThesCodes "ga_IR$ThesCodes"
|
||||
StrCpy $ThesCodes "ga_IR,$ThesCodes"
|
||||
AddSize 30600
|
||||
SectionEnd
|
||||
|
||||
Section /o "Greek" SecTGreek
|
||||
StrCpy $ThesCodes "el_GR$ThesCodes"
|
||||
StrCpy $ThesCodes "el_GR,$ThesCodes"
|
||||
AddSize 903
|
||||
SectionEnd
|
||||
|
||||
Section /o "Italiano" SecTItalian
|
||||
StrCpy $ThesCodes "it_IT$ThesCodes"
|
||||
StrCpy $ThesCodes "it_IT,$ThesCodes"
|
||||
AddSize 2640
|
||||
SectionEnd
|
||||
|
||||
Section /o "Magyar" SecTHungarian
|
||||
StrCpy $ThesCodes "hu_HU$ThesCodes"
|
||||
StrCpy $ThesCodes "hu_HU,$ThesCodes"
|
||||
AddSize 632
|
||||
SectionEnd
|
||||
|
||||
Section /o "Norsk" SecTNorwegian
|
||||
StrCpy $ThesCodes "no_NO$ThesCodes"
|
||||
StrCpy $ThesCodes "no_NO,$ThesCodes"
|
||||
AddSize 2470
|
||||
SectionEnd
|
||||
|
||||
Section /o "Polski" SecTPolish
|
||||
StrCpy $ThesCodes "pl_PL$ThesCodes"
|
||||
StrCpy $ThesCodes "pl_PL,$ThesCodes"
|
||||
AddSize 5580
|
||||
SectionEnd
|
||||
|
||||
Section /o "Português" SecTPortuguese
|
||||
StrCpy $ThesCodes "pt_PT$ThesCodes"
|
||||
StrCpy $ThesCodes "pt_PT,$ThesCodes"
|
||||
AddSize 855
|
||||
SectionEnd
|
||||
|
||||
Section /o "Româna" SecTRomanian
|
||||
StrCpy $ThesCodes "ro_RO$ThesCodes"
|
||||
StrCpy $ThesCodes "ro_RO,$ThesCodes"
|
||||
AddSize 3640
|
||||
SectionEnd
|
||||
|
||||
Section /o "Russian" SecTRussian
|
||||
StrCpy $ThesCodes "ru_RU$ThesCodes"
|
||||
StrCpy $ThesCodes "ru_RU,$ThesCodes"
|
||||
AddSize 2080
|
||||
SectionEnd
|
||||
|
||||
Section /o "Slovenšcina" SecTSlovenian
|
||||
StrCpy $ThesCodes "sl_SI$ThesCodes"
|
||||
StrCpy $ThesCodes "sl_SI,$ThesCodes"
|
||||
AddSize 1037
|
||||
SectionEnd
|
||||
|
||||
Section /o "Slovenský" SecTSlovakian
|
||||
StrCpy $ThesCodes "sk_SK$ThesCodes"
|
||||
StrCpy $ThesCodes "sk_SK,$ThesCodes"
|
||||
AddSize 907
|
||||
SectionEnd
|
||||
|
||||
Section /o "Svenska" SecTSwedish
|
||||
StrCpy $ThesCodes "sv_SE$ThesCodes"
|
||||
StrCpy $ThesCodes "sv_SE,$ThesCodes"
|
||||
AddSize 720
|
||||
SectionEnd
|
||||
|
||||
|
@ -46,7 +46,9 @@ These typically need to be modified for each LyX release
|
||||
# MiKTeX
|
||||
# Sizes in KB
|
||||
|
||||
!define MiKTeXRepo "ftp://ftp.tu-chemnitz.de/pub/tex/systems/win32/miktex/tm/packages/"
|
||||
# it seems that some companies block ftp access by default, therefore http access is preferred here
|
||||
!define MiKTeXRepo "http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/systems/win32/miktex/tm/packages/"
|
||||
#!define MiKTeXRepo "ftp://ftp.tu-chemnitz.de/pub/tex/systems/win32/miktex/tm/packages/"
|
||||
|
||||
!define JabRefVersion "2.8.1"
|
||||
!define MiKTeXDeliveredVersion "2.9"
|
||||
|
@ -195,6 +195,7 @@ Section -ConfigureScript
|
||||
SetOutPath "$INSTDIR\Resources"
|
||||
DetailPrint $(TEXT_CONFIGURE_LYX)
|
||||
nsExec::ExecToLog '"$INSTDIR\Python\python.exe" "$INSTDIR\Resources\configure.py"'
|
||||
# $ConfigureReturn is "0" if successful, otherwise "1"
|
||||
Pop $ConfigureReturn # Return value
|
||||
|
||||
# ask to update MiKTeX
|
||||
|
Loading…
Reference in New Issue
Block a user