Obsolete3
Version 3 (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 | 3 | Joël Brogniart | _(This installation - AMC version 1.3.0 revision commit:eb15ba78bfe7 4/11/2017 - was tested with_ |
6 | 3 | Joël Brogniart | * _macOS 10.12.4 (MacPorts 2.4.1, Xcode 8.3.1)._ |
7 | 1 | ||
8 | 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. |
|
9 | 1 | ||
10 | 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. |
|
11 | 1 | ||
12 | 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. |
|
13 | 1 | ||
14 | 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. |
|
15 | 1 | ||
16 | 1 | h2. Prerequisites |
|
17 | 1 | ||
18 | 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. |
19 | 1 | ||
20 | 1 | h3. The X Window Environment |
|
21 | 1 | ||
22 | 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. |
|
23 | 1 | ||
24 | 1 | h3. Linux Libertine font |
|
25 | 1 | ||
26 | 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. |
|
27 | 1 | ||
28 | 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. |
29 | 1 | ||
30 | 1 | h3. DejaVu font family |
|
31 | 1 | ||
32 | 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. |
|
33 | 1 | ||
34 | 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. |
|
35 | 1 | ||
36 | 1 | h3. MacPorts |
|
37 | 1 | ||
38 | 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. |
|
39 | 1 | ||
40 | 1 | h2. MacPorts and non MacPorts LaTeX installation |
|
41 | 1 | ||
42 | 1 | To build AMC with a non MacPorts LaTeX installation you need several things. |
|
43 | 1 | ||
44 | 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. |
|
45 | 1 | ||
46 | 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. |
|
47 | 1 | ||
48 | 1 | Edit the "@/opt/local/etc/macports/macports.conf@" file to add the following line. |
|
49 | 1 | ||
50 | 1 | <pre>binpath /opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/Library/TeX/texbin</pre> |
|
51 | 1 | ||
52 | 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. |
|
53 | 1 | ||
54 | 1 | The @dblatex@ tool should also be build for this external LaTeX installation. |
|
55 | 1 | ||
56 | 1 | h2. MacPorts installation (port) files |
|
57 | 1 | ||
58 | 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. |
|
59 | 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. |
|
60 | 1 | ||
61 | 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. |
|
62 | 1 | ||
63 | 1 | h3. Local MacPorts repository |
|
64 | 1 | ||
65 | 1 | For MacPorts to use a local folder, you must create that local folder. |
|
66 | 1 | ||
67 | 1 | <pre>mkdir -p ~/nix</pre> |
|
68 | 1 | ||
69 | 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. |
|
70 | 1 | ||
71 | 1 | <pre>file:///Users/julesvernes/nix/macports |
|
72 | 1 | rsync://rsync.macports.org/release/tarballs/ports.tar [default]</pre> |
|
73 | 1 | ||
74 | 1 | h3. Port Files |
|
75 | 1 | ||
76 | 1 | Two archives containing the port files are available for download: |
|
77 | 1 | * for installation on macO 10.9 and 10.10 attachment:macports-10.10.zip, |
|
78 | 1 | * for installation on macOS 10.11 and 10.12 attachment:macports-10.12.zip. |
|
79 | 1 | ||
80 | 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. |
|
81 | 1 | ||
82 | 1 | Download and uncompress the archive then move the "@macports@" folder inside the previously created folder. |
|
83 | 1 | ||
84 | 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. |
|
85 | 1 | ||
86 | 1 | !port-hierarchy.png! |
|
87 | 1 | ||
88 | 1 | Each directory must contain a port document named @Portfile@. This document is a text document containing a description for the MacPorts installation tool. |
|
89 | 1 | ||
90 | 1 | h2. Installing AMC |
|
91 | 1 | ||
92 | 1 | Once the port files set up, generate the index of the new port. |
|
93 | 1 | <pre>cd ~/nix/macports |
|
94 | 1 | portindex</pre> |
|
95 | 1 | ||
96 | 2 | Joël Brogniart | Then, install the @dblatex@ port without its dependencies to a MacPorts' LaTeX installation. |
97 | 1 | <pre>sudo port install dblatex -latex</pre> |
|
98 | 1 | ||
99 | 1 | And finally, it is necessary to launch in the same way the installation of the development version of AMC. |
|
100 | 1 | <pre>sudo port install auto-multiple-choice-devel -latex</pre> |
|
101 | 1 | ||
102 | 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. |
103 | 1 | ||
104 | 1 | h2. Links |
|
105 | 1 | ||
106 | 1 | * Auto Multiple Choice, "http://home.gna.org/auto-qcm/":http://home.gna.org/auto-qcm/. |
|
107 | 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. |
|
108 | 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. |
|
109 | 1 | * MacPorts, "http://www.macports.org":http://www.macports.org. |
|
110 | 1 | * MacPorts, "Local Portfile Repositories":http://guide.macports.org/#development.local-repositories. |
|
111 | 1 | * MacPorts, "How to create portfiles for CPAN Perl modules":https://trac.macports.org/wiki/howto/cpan2port. |
|
112 | 1 | * XQuartz, http://xquartz.macosforge.org</a>. |