Obsolete3

Version 2 (Joël Brogniart, 12/07/2017 01:51 pm)

1 1
h1. Installing AMC development version on macOS with a non MacPorts LaTeX installation
2 1
3 1
This is a translation of the French entry wiki.
4 1
5 2 Joël Brogniart
_This installation - AMC version 1.3.0 revision commit:b94e3a20ce34 3/28/2017 - was tested with macOS 10.12.4 (Xcode 8.3, MacPorts 2.4.1, MacTeX 2016)._
6 1
7 1
Auto Multiple Choice (AMC) is a software to manage questionnaires and multiple choice exams. It allows, from the definition of the multiple choice questions to generate sheets of questionnaires. The question types can be one only choice, multiple choices, question, right/wrong answers etc. Once the completed questionnaires are digitized, AMC automatically corrects the questionnaires. This software runs in a graphical environment X Window System on Linux and macOS. Linux is used as the develop environment, so it probably runs best there. Your mileage may vary.
8 1
9 1
This document briefly describes the installation of Auto Multiple Choice using a LaTeX installation external to MacPorts. The version of AMC installed is a recent development version. The files and installation procedure described here are different from "Installing the AMC development version using the LaTeX installation from MacPorts":http://project.auto-multiple-choice.net/projects/auto-multiple-choice/wiki/Building_AMC_for_MAC_OSX. Apart from this aspect, AMC, works in the same way. Also only the installation part is described here.
10 1
11 1
The installation described here requires some knowledge of Unix tools, the use of command lines, an understanding of the "MacPorts":http://www.macports.org ports architecture, a little understanding of the dependencies between different tools (Subversion, MacPorts, PERL, X11, ports ...) and the macOS architecture. It is also necessary to have administrative rights on the computer.
12 1
13 1
For this installation you will create a local MacPort repository. In this repository you will add macports description for AMC and possibly files for additional ports. Once these files are installed, the installation of AMC can be started.
14 1
15 1
h2. Prerequisites
16 1
17 2 Joël Brogniart
To work with the interface, AMC requires the graphical environment X Window System and X11, the Linux Libertine font, the DejaVu font family and the MacPorts installation system. A LaTeX installation (i.e. "MacTeX":http://www.tug.org/mactex/) should also be available.
18 1
19 1
h3. The X Window Environment
20 1
21 1
MacOS does not contain the standard X11 graphical environment. It is possible to fill this gap by installing XQuartz, an X Windows System environment running macOS. You can download the application on the XQuartz site. "XQuartz":http://xquartz.macosforge.org.
22 1
23 1
h3. Linux Libertine font
24 1
25 1
Linux Libertine font is a free font that covers code pages for Latin languages​​, Greek, Cyrillic languages​​, Hebrew, the International Phonetic Alphabet (and other). You need to download the package "OTF" on "LinuxLibertine.org":http://www.linuxlibertine.org site.
26 1
27 2 Joël Brogniart
*Caution* : XQuartz does not recognize the fonts installed in the user's folder. You must install the fonts by moving them in the "@/Library/Fonts@" folder.
28 1
29 1
h3. DejaVu font family
30 1
31 1
DejaVu fonts are used for japanese documentation generation. You need to download the fonts on "dejavu-fonts.org":http://dejavu-fonts.org/wiki/Download site.
32 1
33 1
*Caution* : The current version of XQuartz (2.7.11) does not recognize the fonts installed in the user's folder. You must install the fonts by moving them in the "@/Library/Fonts@" folder.
34 1
35 1
h3. MacPorts
36 1
37 1
MacPorts is a system to build, install and manage open source software. You need to download the macOS Yosemite installation package on the site "MacPorts":http://www.macports.org and install MacPorts.
38 1
39 1
h2. MacPorts and non MacPorts LaTeX installation
40 1
41 1
To build AMC with a non MacPorts LaTeX installation you need several things.
42 1
43 1
First, MacPorts build tools must be able to access external LaTeX tools. For example, with the MacTeX 2016 installation, these tools are available in the "@/Library/TeX/texbin@" folder. MacPorts configuration must be changed so that this folder is included in the @path@ of MacPorts.
44 1
45 1
Caution, as explained in the "MacPorts documentation":https://guide.macports.org/chunked/internals.configuration-files.html, editing the MacPorts' @path@ can have unpredictable effects and consequences for others tools. It should be avoided.
46 1
47 1
Edit the "@/opt/local/etc/macports/macports.conf@" file to add the following line.
48 1
49 1
<pre>binpath               /opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/Library/TeX/texbin</pre>
50 1
51 1
If you use a tool other than MacTeX, you must replace the last part of the @path@ with the folder containing the binaries of your LaTeX tool.
52 1
53 1
The @dblatex@ tool should also be build for this external LaTeX installation.
54 1
55 1
h2. MacPorts installation (port) files
56 1
57 1
The MacPorts port file contains information that allows a program to be installed into the MacPorts system. It shows what tools are needed for installation and operation of the program and how to install the program. 
58 1
MacPorts contains "many ports":http://www.macports.org/ports.php but it does not contain a port describing the AMC installation from the source code of the program. So we have to create the file port for the development version of AMC.
59 1
60 1
To avoid conflicts with ports already described in MacPorts, new ports will be installed in the folders of the user who installs, instead of being installed in folders directly managed by MacPorts.
61 1
62 1
h3. Local MacPorts repository
63 1
64 1
For MacPorts to use a local folder, you must create that local folder.
65 1
66 1
<pre>mkdir -p ~/nix</pre>
67 1
68 1
You should then tell MacPorts to take the local folder into account, before considering the standard MacPorts' hierarchy. To do this you must edit the file "@/opt/local/etc/macports/sources.conf@" and add a URL to the local file before the URL of the repository @rsync@ MacPorts.
69 1
70 1
<pre>file:///Users/julesvernes/nix/macports
71 1
rsync://rsync.macports.org/release/tarballs/ports.tar [default]</pre>
72 1
73 1
h3. Port Files
74 1
75 1
Two archives containing the port files are available for download:
76 1
* for installation on macO 10.9 and 10.10 attachment:macports-10.10.zip,
77 1
* for installation on macOS 10.11 and 10.12 attachment:macports-10.12.zip.
78 1
79 1
First archive contains the description for the @auto-multiple-choice-devel@ port and an adaptation of the @dblatex@ port that works also with a non MacPorts LaTeX installation. Archive for macOS 10.11 and 10.12 also includes an adaptation of ports @gcc5@ and @pdftk@ to make them working under these versions of macOS.
80 1
81 1
Download and uncompress the archive then move the "@macports@" folder inside the previously created folder.
82 1
83 1
The ports are grouped by categories and the port file organization reflects this grouping. Each port is in a main category and has its own folder. The main category of AMC in MacPorts is X11, so the port folder for AMC will be inside an x11 folder.
84 1
85 1
!port-hierarchy.png!
86 1
87 1
Each directory must contain a port document named @Portfile@. This document is a text document containing a description for the MacPorts installation tool.
88 1
89 1
h2. Installing AMC
90 1
91 1
Once the port files set up, generate the index of the new port.
92 1
<pre>cd ~/nix/macports
93 1
portindex</pre>
94 1
95 2 Joël Brogniart
Then, install the @dblatex@ port without its dependencies to a MacPorts' LaTeX installation.
96 1
<pre>sudo port install dblatex -latex</pre>
97 1
98 1
And finally, it is necessary to launch in the same way the installation of the development version of AMC.
99 1
<pre>sudo port install auto-multiple-choice-devel -latex</pre>
100 1
101 2 Joël Brogniart
The installation may take a while. When it is complete and if there is no error, @Auto Multiple Choice@ is ready to be used.
102 1
103 1
h2. Links
104 1
105 1
* Auto Multiple Choice, "http://home.gna.org/auto-qcm/":http://home.gna.org/auto-qcm/.
106 1
* Auto Multiple Choice, "Installation sous macOS":http://project.auto-multiple-choice.net/projects/auto-multiple-choice/wiki/Installation_d'AMC_sous_OS_X_Mountain_Lion.
107 1
* Auto Multiple Choice, "development version installation on macOS":http://project.auto-multiple-choice.net/projects/auto-multiple-choice/wiki/Building_AMC_for_MAC_OSX.
108 1
* MacPorts, "http://www.macports.org":http://www.macports.org.
109 1
* MacPorts, "Local Portfile Repositories":http://guide.macports.org/#development.local-repositories.
110 1
* MacPorts, "How to create portfiles for CPAN Perl modules":https://trac.macports.org/wiki/howto/cpan2port.
111 1
* XQuartz, http://xquartz.macosforge.org</a>.