Installing AMC with MacPorts on macOS
Version 12 (Joël Brogniart, 03/23/2024 09:13 am)
1 | 12 | Joël Brogniart | h1. Installing AMC development version on macOS |
---|---|---|---|
2 | 1 | ||
3 | 1 | This is a translation of the French entry wiki. First translation was done by Pieter Van den Hombergh. |
|
4 | 12 | Joël Brogniart | 1966:d6719412b9a3 |
5 | 12 | Joël Brogniart | _(This installation - AMC version 1.3.0 revision 1966 d6719412b9a3 11/21/2016 - was tested with_ |
6 | 12 | Joël Brogniart | * _macOS 10.12.1 (Xcode 8.2, MacPorts 2.3.5),_ |
7 | 12 | Joël Brogniart | * _macOS 10.10.5 (Xcode 7.2.1, MacPorts 2.3.5),_ |
8 | 12 | Joël Brogniart | * _macOS 10.9.5 (Xcode 6.2, MacPorts 2.3.5)._ |
9 | 9 | Joël Brogniart | |
10 | 12 | Joël Brogniart | 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. |
11 | 1 | ||
12 | 9 | Joël Brogniart | In previous versions of this note, the source code of all necessary files were shown. As these sources are provided in the associated archive and not to burden the instructions, source code no longer appear in the note. |
13 | 10 | Joël Brogniart | |
14 | 9 | Joël Brogniart | It is possible to install the "1.1.2 pre-compiled version":http://project.auto-multiple-choice.net/projects/auto-multiple-choice/wiki/Installation_d'AMC_sous_OS_X , but you would miss the newest developments happening in this active project. You can also install from the source, directly from the development repository. This will give you the bleeding edge version. |
15 | 10 | Joël Brogniart | |
16 | 12 | Joël Brogniart | For the moment, this installation guide is quite technical and has only been tested on macOS 10.11.5, 10.10.5 and 10.9.5 with the corresponding latest version of Xcode. You will need "MacPorts":http://www.macports.org, a little understanding of the dependencies between different tools (Subversion, MacPorts, PERL, X11, port ...) and the macOS architecture. You should also have administrative rights on the computer. This manual is therefore unfortunately not for everyone. |
17 | 9 | Joël Brogniart | |
18 | 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. |
|
19 | 1 | ||
20 | 1 | h2. Prerequisites |
|
21 | 9 | Joël Brogniart | |
22 | 1 | The requirements are the same as the installation of version 1.1.2 AMC. 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. |
|
23 | 1 | ||
24 | 12 | Joël Brogniart | 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. |
25 | 7 | Joël Brogniart | |
26 | 1 | h3. MacPorts |
|
27 | 1 | ||
28 | 12 | Joël Brogniart | 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. |
29 | 1 | ||
30 | 1 | h3. Linux Libertine font |
|
31 | 9 | Joël Brogniart | |
32 | 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. |
|
33 | 9 | Joël Brogniart | |
34 | 12 | Joël Brogniart | *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 | 9 | Joël Brogniart | |
36 | 9 | Joël Brogniart | h3. DejaVu font family |
37 | 9 | Joël Brogniart | |
38 | 9 | Joël Brogniart | DejaVu fonts are used for japanese documentation generation. |
39 | 9 | Joël Brogniart | Ces polices sont utilisées pour la génération des documentations en japonais. You need to download the fonts on "dejavu-fonts.org":http://dejavu-fonts.org/wiki/Download site. |
40 | 9 | Joël Brogniart | |
41 | 12 | Joël Brogniart | *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. |
42 | 1 | ||
43 | 7 | Joël Brogniart | h2. MacPorts installation (port) files |
44 | 7 | Joël Brogniart | |
45 | 2 | Joël Brogniart | 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. |
46 | 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. |
|
47 | 4 | Joël Brogniart | |
48 | 7 | Joël Brogniart | 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. |
49 | 4 | Joël Brogniart | |
50 | 7 | Joël Brogniart | h3. Local MacPorts repository |
51 | 7 | Joël Brogniart | |
52 | 1 | For MacPorts to use a local folder, you must create that local folder. |
|
53 | 1 | ||
54 | 1 | <pre>mkdir -p ~/nix</pre> |
|
55 | 1 | ||
56 | 7 | Joël Brogniart | You should then tell MacPorts to take the local folder into account, before considering the standard hierarchy MacPorts. 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. |
57 | 9 | Joël Brogniart | |
58 | 7 | Joël Brogniart | <pre>file:///Users/julesvernes/nix/macports |
59 | 1 | rsync://rsync.macports.org/release/tarballs/ports.tar [default]</pre> |
|
60 | 1 | ||
61 | 1 | h3. Port Files |
|
62 | 1 | ||
63 | 12 | Joël Brogniart | Three archives containing the port files are available for download: |
64 | 12 | Joël Brogniart | * for installation on OSÂ X 10.9 and 10.10 attachment:macports-10.10.zip, |
65 | 12 | Joël Brogniart | * for installation on macOS 10.11 attachment:macports-10.11.zip, |
66 | 12 | Joël Brogniart | * for installation on macOS 10.12 attachment:macports-10.12.zip. |
67 | 1 | ||
68 | 12 | Joël Brogniart | La première archive ne contient que la description du port AMC. L'archive pour macOS 10.11 comprend une adaptation des ports @gcc5@ et @pdftk@ permettant leur fonctionnement sous cette version de macOS. L'archive pour macOS 10.12 contient une adaptation du port @opencv@ en plus des adaptations des ports @gcc5@ et @pdftk@. |
69 | 12 | Joël Brogniart | |
70 | 12 | Joël Brogniart | First archive contains only AMC port description. Archive for macOS 10.11 includes an adaptation of ports @gcc5@ and @pdftk@ to make them working under this version of macOS. The archive for macOS 10.12 contains an adaptation of port @opencv@ in addition to port adaptations @gcc5@ and @pdftk@. |
71 | 12 | Joël Brogniart | |
72 | 4 | Joël Brogniart | Download and uncompress this archive then move the "@macports@" folder inside the previously created folder. |
73 | 4 | Joël Brogniart | |
74 | 4 | Joël Brogniart | !port-hierarchy.png! |
75 | 7 | Joël Brogniart | |
76 | 9 | Joël Brogniart | Each directory must contain a port document named @Portfile@. This document is a text document containing a description for the MacPorts installation tool. |
77 | 1 | ||
78 | 1 | h4. Excerpt for @x11/auto-multiple-choice-devel/Portfile@ |
|
79 | 1 | <pre title="x11/auto-multiple-choice-devel/Portfile"># -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
|
80 | 12 | Joël Brogniart | # $Id$ |
81 | 4 | Joël Brogniart | |
82 | 9 | Joël Brogniart | PortSystem 1.0 |
83 | 1 | PortGroup bitbucket 1.0 |
|
84 | 1 | PortGroup perl5 1.0 |
|
85 | 9 | Joël Brogniart | |
86 | 12 | Joël Brogniart | set bitbucket_commit "d6719412b9a3" |
87 | 12 | Joël Brogniart | set amc_revision "1966" |
88 | 12 | Joël Brogniart | #1966:d6719412b9a3 |
89 | 4 | Joël Brogniart | bitbucket.setup auto-multiple-choice auto-multiple-choice ${bitbucket_commit} |
90 | 9 | Joël Brogniart | name auto-multiple-choice-devel |
91 | 7 | Joël Brogniart | version 1.3.${amc_revision} |
92 | 4 | Joël Brogniart | categories x11 tex education |
93 | 7 | Joël Brogniart | platforms darwin |
94 | 7 | Joël Brogniart | license GPL-2+ |
95 | 7 | Joël Brogniart | maintainers laposte.fr:joel.brogniart,openmaintainer |
96 | 4 | Joël Brogniart | |
97 | 4 | Joël Brogniart | description Auto Multiple Choice - Multiple Choice Papers Management |
98 | 7 | Joël Brogniart | long_description Utility to manage multiple choice questionnaires, \ |
99 | 4 | Joël Brogniart | with optionally mixed questions and answers. \ |
100 | 7 | Joël Brogniart | AMC provides automatic marking from papers' scans. \ |
101 | 9 | Joël Brogniart | Annotated papers are produced. Marks can be exported \ |
102 | 4 | Joël Brogniart | as an OpenOffice.org sheet file. |
103 | 9 | Joël Brogniart | |
104 | 1 | homepage http://home.gna.org/auto-qcm |
|
105 | 1 | ||
106 | 12 | Joël Brogniart | checksums rmd160 2d3597af254da3219e17c1d9dadc6c6fe4edd518 \ |
107 | 12 | Joël Brogniart | sha256 9207cfd1cd63d3889aa51eca7a987f2435bb053fabf6e4d9e5e9383be72d34e8 |
108 | 1 | ||
109 | 9 | Joël Brogniart | depends_build-append \ |
110 | 4 | Joël Brogniart | port:dblatex \ |
111 | 1 | port:p${perl5.major}-xml-libxml |
|
112 | 4 | Joël Brogniart | </pre> |
113 | 7 | Joël Brogniart | |
114 | 1 | h2. Installing AMC |
|
115 | 10 | Joël Brogniart | |
116 | 1 | Once the port files set up, generate the index of the new port. |
|
117 | 1 | <pre>cd ~/nix/macports |
|
118 | 1 | portindex</pre> |
|
119 | 10 | Joël Brogniart | |
120 | 1 | *Warning*: standard and development of AMC versions can't be installed simultaneously. If a standard version was previously installed, you must uninstall it before installing the development version. |
|
121 | 1 | ||
122 | 1 | <pre>sudo port uninstall auto-multiple-choice</pre> |
|
123 | 10 | Joël Brogniart | |
124 | 10 | Joël Brogniart | The installation of the development version of AMC can be launched. AMC depends on many other ports. The calculation and verification of all dependencies generates the opening of a large number of files that can cause installation failure. To avoid a failure, it is best to proceed in stages. First install the @pdftk@ port. |
125 | 10 | Joël Brogniart | |
126 | 10 | Joël Brogniart | <pre>sudo port install pdftk</pre> |
127 | 11 | Joël Brogniart | |
128 | 12 | Joël Brogniart | Then install @pdflatex@ port. |
129 | 11 | Joël Brogniart | |
130 | 12 | Joël Brogniart | <pre>sudo port install pdflatex</pre> |
131 | 10 | Joël Brogniart | |
132 | 7 | Joël Brogniart | Finally install AMC. |
133 | 5 | Joël Brogniart | |
134 | 7 | Joël Brogniart | <pre>sudo port install auto-multiple-choice-devel</pre> |
135 | 5 | Joël Brogniart | |
136 | 5 | Joël Brogniart | The installation may take a while. When it is complete and if there is no error, AMC is ready to be used. |
137 | 5 | Joël Brogniart | |
138 | 5 | Joël Brogniart | h2. Using AMC |
139 | 5 | Joël Brogniart | |
140 | 7 | Joël Brogniart | You can start from the terminal or from XQuartz. |
141 | 5 | Joël Brogniart | |
142 | 7 | Joël Brogniart | h3. In the Terminal |
143 | 5 | Joël Brogniart | |
144 | 5 | Joël Brogniart | <pre>auto-multiple-choice</pre> |
145 | 5 | Joël Brogniart | |
146 | 7 | Joël Brogniart | This command will launch XQuartz and AMC application. |
147 | 5 | Joël Brogniart | |
148 | 5 | Joël Brogniart | h3. In XQuartz |
149 | 5 | Joël Brogniart | |
150 | 5 | Joël Brogniart | Start XQuartz application. |
151 | 7 | Joël Brogniart | |
152 | 5 | Joël Brogniart | !xquartz.png! |
153 | 1 | ||
154 | 5 | Joël Brogniart | We can immediately set XQuartz to facilitate the launch of AMC. Open the @Applications > Customize...@ menu. |
155 | 5 | Joël Brogniart | |
156 | 7 | Joël Brogniart | !xquartz-menu-applications-personnaliser.png! |
157 | 7 | Joël Brogniart | |
158 | 5 | Joël Brogniart | In the Personalization window, click the button @Add an entry@. |
159 | 5 | Joël Brogniart | |
160 | 7 | Joël Brogniart | !xquartz-fenetre-personnaliser-menu-applications.png! |
161 | 5 | Joël Brogniart | |
162 | 7 | Joël Brogniart | Set "@Auto Multiple Choice@" in the @Name@ column and "@auto-multiple-choice@" in the @Command@ column of the new menu item. |
163 | 5 | Joël Brogniart | |
164 | 7 | Joël Brogniart | !xquartz-fenetre-personnaliser-menu-applications-2.png! |
165 | 5 | Joël Brogniart | |
166 | 7 | Joël Brogniart | Close the Customize window, then select the @Applications > Auto Multiple Choice@ menu. |
167 | 5 | Joël Brogniart | |
168 | 5 | Joël Brogniart | !xquartz-menu-applications-amc.png! |
169 | 5 | Joël Brogniart | |
170 | 7 | Joël Brogniart | AMC window should appear. |
171 | 5 | Joël Brogniart | |
172 | 7 | Joël Brogniart | !auto-multiple-choice-window.png! |
173 | 5 | Joël Brogniart | |
174 | 5 | Joël Brogniart | Auto-multiple-choice is now ready to work. |
175 | 5 | Joël Brogniart | |
176 | 5 | Joël Brogniart | h2. Links |
177 | 7 | Joël Brogniart | |
178 | 5 | Joël Brogniart | * Auto Multiple Choice, "http://home.gna.org/auto-qcm/":http://home.gna.org/auto-qcm/. |
179 | 12 | Joël Brogniart | * Auto Multiple Choice, "Installation sous macOS (10.8)":http://project.auto-multiple-choice.net/projects/auto-multiple-choice/wiki/Installation_d'AMC_sous_OS_X_Mountain_Lion. |
180 | 5 | Joël Brogniart | * MacPorts, "http://www.macports.org":http://www.macports.org. |
181 | 5 | Joël Brogniart | * MacPorts, "Local Portfile Repositories":http://guide.macports.org/#development.local-repositories. |
182 | 1 | * MacPorts, "How to create portfiles for CPAN Perl modules":https://trac.macports.org/wiki/howto/cpan2port. |
|
183 | 1 | * XQuartz, http://xquartz.macosforge.org</a>. |