MiKTeX 2.9 – Packaging and Deployment

Quote from http://miktex.org/about:

About MiKTeX

MiKTeX (pronounced mick-tech) is an up-to-date implementation of TeX and related programs for Windows (all current variants).

I’m afraid I don’t know how to use the software, but later on I’ll you’ll see the simple test I did to check the software was working at a basic level.

1. Download

First I downloaded the MiKTeX setup [setup-2.9.3959.exe] from here:
http://miktex.org/2.9/setup
… using the “Installing the complete MiKTeX system” link (5.51MB).

Then to download all the MiKTeX packages, I ran:

"path\to\setup-2.9.3959.exe" --download-only

(All the command line options are documented here: http://docs.miktex.org/manual/setupwiz.html)
I used the FTP ‘mirror.ox.ac.uk’ option and pointed the GUI at a folder to download ALL the files to.
The download halted a couple of times, but I just reran the command line above.  One time I thought it froze (on the ‘cm-super.tar.lzma’ package), so I hit cancel and the restarted it.  The downloader automatically picked up from where it left off.  BUT after I restarted it, that file took a really long time to download for some reason.  It is about 64MB but the length of time it took still doesn’t seem justified.

2. Unattended Installation Command

The first major milestone of any packaging is to end up with a scriptable unattended installation.  The command line I last used when I packaged version 2.7 was:

"setup-2.7.3224.exe" --local-package-repository="path\to\Packages" --unattended --package-set=complete

.

… but looking at the command line web page I think that we may need a couple more:

"setup-2.9.3959.exe" --install-from-local-repository --local-package-repository="path\to\Packages" --shared --unattended --package-set=complete

.

4. Testing MiKTeX 2.9 is working

In order to test that MiKTeX is working I needed a test file.  I downloaded and installed GhostScript and GhostView from here, http://pages.cs.wisc.edu/~ghost/, then I found a test Tex file here: http://no-paste.ch/download/code_183.txt and saved it as ‘samplefile.tex’ (although the same file is available from many sources).

I double-clicked the sample Tex file and hit the ‘play’ button on the toolbar.  Within a few seconds I had a nice PDF showing me the delights of Tex.

I should just add here that we already have working versions of GhostScript and GSView packaged in an unattended installation.  I included the above download link for completeness.

.

3. Deployment of the Unattended Installation

I now have a package folder containing the following:

packages                          <folder>
setup-2.9.3959.exe                5779.46KB      04/04/2011 12:26:09

The packages folder contains  over 2,100 files that were downloaded as a result of the ‘–download-only’ command in step (1) above.

I have an installation wrapper I wrote (General Installer) that I have used to call the setup.exe command line in (2) above and log to a central server.  This now  perfectly performs an unattended installation.

We use Altiris Deployment Server 6.9 to deploy our packages and I have a job on there that will install MiKTeX without user interaction.

One problem I’ve had is that MiKTeX 2.7 is already installed on the computers that this needs to go to.  There is not (that I could find) an unattended uninstallation for any MiKTeX installations, so for the time being I am just deleting the MiKTeX 2.7 icon group from the Start menu at the end of the MiKTeX 2.9 installation.


Posted in Work | Tagged , , , , , | Leave a comment

Leave a Reply