{"id":126,"date":"2011-04-08T13:37:41","date_gmt":"2011-04-08T12:37:41","guid":{"rendered":"http:\/\/blogs.oucs.ox.ac.uk\/darrencollins\/?p=126"},"modified":"2024-04-10T10:06:46","modified_gmt":"2024-04-10T09:06:46","slug":"miktex-2-9-packaging-and-deployment","status":"publish","type":"post","link":"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/2011\/04\/08\/miktex-2-9-packaging-and-deployment\/","title":{"rendered":"MiKTeX 2.9 &#8211; Packaging and Deployment"},"content":{"rendered":"<p>Quote from\u00a0<a href=\"http:\/\/miktex.org\/about\">http:\/\/miktex.org\/about<\/a>:<\/p>\n<blockquote>\n<h3><span style=\"color: #990000\">About MiKTeX<\/span><\/h3>\n<\/blockquote>\n<blockquote><p><span style=\"color: #990000\">MiKTeX (pronounced\u00a0<em>mick-tech<\/em>) is an up-to-date implementation of\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/TeX\">TeX<\/a> and related programs for Windows (all current variants).<\/span><\/p><\/blockquote>\n<p>I&#8217;m afraid I don&#8217;t know how to use the software, but later on I&#8217;ll you&#8217;ll see the simple test I did to check the software was working at a basic level.<\/p>\n<h3><strong>1. Download<\/strong><\/h3>\n<p>First I downloaded the MiKTeX setup [<strong>setup-2.9.3959.exe<\/strong>] from here:<br \/>\n<a href=\"http:\/\/miktex.org\/2.9\/setup\">http:\/\/miktex.org\/2.9\/setup<br \/>\n<\/a>&#8230; using the &#8220;Installing the complete MiKTeX system&#8221; link (5.51MB).<\/p>\n<p>Then to download <em>all<\/em> the MiKTeX packages, I ran:<\/p>\n<pre>\"path\\to\\setup-2.9.3959.exe\" --download-only<\/pre>\n<p>(All the command line options are documented here:\u00a0<a href=\"http:\/\/docs.miktex.org\/manual\/setupwiz.html\">http:\/\/docs.miktex.org\/manual\/setupwiz.html<\/a>)<br \/>\nI used the FTP &#8216;mirror.ox.ac.uk&#8217; option and pointed the GUI at a folder to download ALL the files to.<br \/>\nThe download halted a couple of times, but I just reran the command line above. \u00a0One time I thought it froze (on the &#8216;cm-super.tar.lzma&#8217; package), so I hit cancel and the restarted it. \u00a0The downloader automatically picked up from where it left off. \u00a0BUT after I restarted it, that file took a really long time to download for some reason. \u00a0It is about 64MB but the length of time it took still doesn&#8217;t seem justified.<\/p>\n<h3><strong>2. Unattended Installation Command<\/strong><\/h3>\n<p>The first major milestone of any packaging is to end up with a scriptable unattended installation. \u00a0The command line I last used when I packaged version 2.7 was:<\/p>\n<div style=\"width: 650px;overflow: auto\">\n<pre>\"setup-2.7.3224.exe\" --local-package-repository=\"path\\to\\Packages\" --unattended --package-set=complete<\/pre>\n<\/div>\n<div>\n<p>.<\/p>\n<p>&#8230; but looking at the command line <a href=\"http:\/\/docs.miktex.org\/manual\/setupwiz.html\">web page<\/a> I think that we may need a couple more:<\/p>\n<\/div>\n<div style=\"width: 650px;overflow: auto\">\n<pre>\"setup-2.9.3959.exe\" --install-from-local-repository --local-package-repository=\"path\\to\\Packages\" --shared --unattended --package-set=complete<\/pre>\n<\/div>\n<div>\n<p>.<\/p>\n<h3><strong>4. Testing MiKTeX 2.9 is working<\/strong><\/h3>\n<p>In order to test that MiKTeX is working I needed a test file. \u00a0I downloaded and installed GhostScript and GhostView from here,\u00a0<a href=\"http:\/\/pages.cs.wisc.edu\/~ghost\/\">http:\/\/pages.cs.wisc.edu\/~ghost\/<\/a>, then I found a test Tex file here: <a href=\"http:\/\/no-paste.ch\/download\/code_183.txt\">http:\/\/no-paste.ch\/download\/code_183.txt<\/a> and saved it as &#8216;samplefile.tex&#8217; (although the same file is available from many sources).<\/p>\n<p>I double-clicked the sample\u00a0Tex\u00a0file and hit the &#8216;play&#8217; button on the toolbar. \u00a0Within a few seconds I had a nice PDF showing me the delights of Tex.<\/p>\n<p>I should just add here that we already have working versions of GhostScript and GSView packaged in an unattended installation. \u00a0I included the above download link for completeness.<\/p>\n<p>.<\/p>\n<h3><strong>3. Deployment of the Unattended Installation<\/strong><\/h3>\n<p>I now have a package folder containing the following:<\/p>\n<pre><span style=\"color: #0000ff\">packages\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;folder&gt;\r\nsetup-2.9.3959.exe\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 5779.46KB\u00a0\u00a0\u00a0\u00a0\u00a0 04\/04\/2011 12:26:09<\/span><\/pre>\n<p>The packages folder contains \u00a0over 2,100 files that were downloaded as a result of the &#8216;&#8211;download-only&#8217; command in step (1) above.<\/p>\n<p>I have an installation wrapper I wrote (<a href=\"http:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/2011\/01\/13\/the-general-installer-progress\/\">General Installer<\/a>) that I have used to call the setup.exe command line in (2) above and log to a central server. \u00a0This now \u00a0perfectly performs an unattended installation.<\/p>\n<p>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.<\/p>\n<p>One problem I&#8217;ve had is that MiKTeX 2.7 is already installed on the computers that this needs to go to. \u00a0There is not (that I could find) an unattended <em>uninstallation<\/em> 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.<\/p>\n<p><strong><br \/>\n<\/strong><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Quote from\u00a0http:\/\/miktex.org\/about: About MiKTeX MiKTeX (pronounced\u00a0mick-tech) is an up-to-date implementation of\u00a0TeX and related programs for Windows (all current variants). I&#8217;m afraid I don&#8217;t know how to use the software, but later on I&#8217;ll you&#8217;ll see the simple test I did &hellip; <a href=\"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/2011\/04\/08\/miktex-2-9-packaging-and-deployment\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8374],"tags":[8394,8385,8393,8391,8392,8395],"class_list":["post-126","post","type-post","status-publish","format-standard","hentry","category-work","tag-2-9","tag-deployment","tag-general-installer","tag-miktex","tag-packaging","tag-unattended"],"_links":{"self":[{"href":"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/wp-json\/wp\/v2\/posts\/126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/wp-json\/wp\/v2\/comments?post=126"}],"version-history":[{"count":85,"href":"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/wp-json\/wp\/v2\/posts\/126\/revisions"}],"predecessor-version":[{"id":209,"href":"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/wp-json\/wp\/v2\/posts\/126\/revisions\/209"}],"wp:attachment":[{"href":"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/wp-json\/wp\/v2\/media?parent=126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/wp-json\/wp\/v2\/categories?post=126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs-new.it.ox.ac.uk\/darrencollins\/wp-json\/wp\/v2\/tags?post=126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}