Building AMC from mercurial repository

Version 1 (Anirvan Sarkar, 08/02/2014 06:01 pm) → Version 2/3 (Pieter Van den Hombergh, 08/02/2014 06:01 pm)

h1. Building AMC from @mercurial@ repository

This how to assumes a debian/ubuntu system and has been tested on all "stable versions of Ubuntu.":https://wiki.ubuntu.com/Releases#Current

The steps to execute are:

h3. 1) Install @mercurial@
<pre>
$ sudo apt-get install mercurial
</pre>

h3. 2) Clone the repository

<pre>
$ hg clone https://bitbucket.org/auto-multiple-choice/auto-multiple-choice
</pre>

h3. 3) Build

<pre>
$ cd auto-multiple-choice
$ make deb
</pre>

This might show some unfulfilled dependencies and therefore might fail.
The dependencies may include **libnetpbm10-dev *libnetpbm10-dev libcv-dev libhighgui-dev dblatex docbook-xsl librsvg2-bin libxml-libxml-perl g++ and libgtk2-notify-perl netpbm libopencv-dev libpoppler-glib-dev texlive-lang-french * g++*

h3. 4) Install dependencies

<pre>
$ sudo apt-get install libnetpbm10-dev libcv-dev libhighgui-dev dblatex docbook-xsl librsvg2-bin libxml-libxml-perl g++ libgtk2-notify-perl netpbm libopencv-dev libpoppler-glib-dev texlive-lang-french

$ make deb
</pre>

This should produce four .deb package in the /tmp directory, which can be checked.
The package will be named:
* auto-multiple-choice_x.y.z.u-v_w.deb
* auto-multiple-choice-common_x.y.z.u-v_all.deb
* auto-multiple-choice-doc_x.y.z.u-v_all.deb
* auto-multiple-choice-doc-pdf_x.y.z.u-v_all.deb,
where x, y, z, u, v and w depend on your processor architecture and the revision at the moment of your checkout.

h3. 5) Install AMC

# First install the platform independent files
<pre>
$ sudo dpkg -i /tmp/auto-multiple-choice-common_x.y.z.u-v_all.deb
</pre>
# Then install the documentation
<pre>
$ sudo dpkg -i /tmp/auto-multiple-choice-doc_x.y.z.u-v_all.deb
$ sudo dpkg -i /tmp/auto-multiple-choice-doc-pdf_x.y.z.u-v_all.deb
</pre>
# Now install the platform dependent files
<pre>
$ sudo dpkg -i /tmp/auto-multiple-choice_x.y.z.u-v_w.deb
</pre>

@dpkg@ might complain that some dependencies are not fulfilled. You can install them using @sudo apt-get install@ as above.
You should also consider installing the _recommended_ packages (see the @Recommends:@ line in source:debian/control) with @apt-get@, as @dpkg@ does not tell you if they are missing!

h3. 6) Update AMC

If you want to stay on the bleeding edge, update the cloned repository and then rerun the package making and installation process.
<pre>
$ cd .../auto-multiple-choice
$ hg pull
$ hg update
$ make deb
</pre>