]> git.lyx.org Git - features.git/commitdiff
installer: new method to install LaTeX-packages
authorUwe Stöhr <uwestoehr@lyx.org>
Mon, 28 Jan 2013 01:54:31 +0000 (02:54 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Mon, 28 Jan 2013 01:54:31 +0000 (02:54 +0100)
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)

development/Win32/packaging/installer/Packages.txt [new file with mode: 0644]
development/Win32/packaging/installer/setup/configure.nsh

diff --git a/development/Win32/packaging/installer/Packages.txt b/development/Win32/packaging/installer/Packages.txt
new file mode 100644 (file)
index 0000000..ea25357
--- /dev/null
@@ -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
\ No newline at end of file
index 1c1446f9f7456a891b96f274873342740596e3b0..8df91d6c4f623a311a36a3dda3e0c37f559a1f07 100644 (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