installer: new method to install LaTeX-packages

LyX 2.0.x supports currently 147 LaTeX-packages. When LyX is first installed on a PC it took therefore about 10 minutes to install all supported and required packages. With the new installation method the installation speed only depends on the Internet speed and lasts with an average bandwidth now only 3.5 minutes.
(chkconfig.ltx asks LaTeX for each package separately and after each package installation the file name database of LaTeX was rebuild. And that cost a lot of time/CPU power)
This commit is contained in:
Uwe Stöhr 2013-01-28 02:54:31 +01:00
parent 0d5f5d107e
commit 82b9f919aa
2 changed files with 167 additions and 10 deletions

View File

@ -0,0 +1,148 @@
l3kernel
l3packages
mptopdf
bezos
algorithms
arabi
bibtopic
booktabs
braille
breakurl
cjk
covington
csquotes
cyrillic
endnotes
enumitem
esint
eso-pic
greek-inputenc
fancybox
fancyhdr
framed
hyphenat
jurabib
lettrine
listings
lithuanian
genmisc
mhchem
mongolian-babel
natbib
units
nomencl
polyglossia
pdfpages
prettyref
preview
refstyle
rotating
rotfloat
setspace
soul
splitindex
subfig
turkmen
ulem
undertilde
units
url
wrapfig
xargs
xcolor
arydshln
braket
cancel
caption
colortbl
diagbox
etoolbox
fp
koma-script
marginnote
picinpar
pict2e
sidecap
was
charter
mathpazo
bera
ccfonts
cmbright
eco
feyn
fourier
luxi
symbol
tipa
wasy
zhmetrics
ascii
bbding
ifsym
marvosym
textgreek
txfonts
wasysym
aastex
achemso
aguplus
apa6
apacite
apa
arabtex
beamer
bigfoot
changepage
cite
cleveref
ctex
dinbrief
dtk
elsarticle
endfloat
epsf
europecv
extsizes
fancyvrb
filecontents
footmisc
frletter
g-brief
harvard
ieeetran
ifmtarg
kluwer
lastpage
lettre
lineno
mciteplus
memoir
microtype
moderncv
ms
mwcls
paper
paralist
pgf
placeins
powerdot
pst-grad
pst-node
revtex4
sauerj
savesym
seminar
simplecv
skak
spie
sttools
textcase
titlesec
tufte-latex
tugboat
type1cm
ucs
upquote
xecjk
xifthen

View File

@ -193,20 +193,29 @@ Var ConfigureReturn
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
${if} $LaTeXInstalled == "MiKTeX"
Call UpdateMiKTeX # function from latex.nsh
# especially for new installations a second run is necessary to install all missing package
# the reason for this is unknown, most probably it is a timeout problem, because with a fast
# Internet connection one run is sometimes sufficient
# a new installed MiKTeX needs some time until it is ready to install packages
nsExec::ExecToLog '"$INSTDIR\Python\python.exe" "$INSTDIR\Resources\configure.py"'
# install all necessary packages at once
DetailPrint $(TEXT_CONFIGURE_LYX)
${if} $MultiUser.Privileges != "Admin"
${andif} $MultiUser.Privileges != "Power"
# call the non-admin version
nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install-some=$INSTDIR\Resources\Packages.txt"'
${else}
${if} $MiKTeXUser != "HKCU" # call the admin version
nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--verbose" "--install-some=$INSTDIR\Resources\Packages.txt"'
${else}
nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--verbose" "--install-some=$INSTDIR\Resources\Packages.txt"'
${endif}
${endif}
${endif}
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
SectionEnd