Installing AMC with MacPorts on macOS

Version 22 (Joël Brogniart, 03/23/2024 09:13 am)

1 20 Joël Brogniart
h1. Installing AMC on macOS
2 1
3 20 Joël Brogniart
The installation guide requires some knowledge about Unix tools, the use of command lines, the installation of "MacPorts":http://www.macports.org. You must also have administrative rights on the computer. It is therefore not intended for everyone.
4 10 Joël Brogniart
5 9 Joël Brogniart
h2. Prerequisites
6 1
7 20 Joël Brogniart
To work with its interface, AMC requires an X Window System or X11 graphical environment, the Linux Libertine font, the DejaVu font family, and the MacPorts installation system.
8 1
9 20 Joël Brogniart
h3. X Window System environment
10 1
11 20 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.
12 12 Joël Brogniart
13 1
h3. Linux Libertine font
14 7 Joël Brogniart
15 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.
16 1
17 20 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.
18 1
19 12 Joël Brogniart
h3. DejaVu font family
20 1
21 21 Joël Brogniart
DejaVu fonts are used for generating documentation in Japanese. You need to download the fonts on "dejavu-fonts.org":http://dejavu-fonts.org/wiki/Download site.
22 1
23 20 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.
24 1
25 20 Joël Brogniart
h3. MacPorts
26 1
27 20 Joël Brogniart
MacPorts is a system that compiles, installs and manages open source software. You need to download the installation package for your version of macOS from the "MacPorts":http://www.macports.org and install MacPorts. Follow the instructions carefully and don't forget to install Xcode.
28 1
29 20 Joël Brogniart
h2. Installing AMC
30 9 Joël Brogniart
31 20 Joël Brogniart
It is possible to install one of the two versions of AMC. Either the @stable@ version (currently, version 1.3.0.2132 of 20/11/2017), or the @development@ version. The @stable@ version evolves slowly and version changes are infrequent. Several months or years may pass between two version changes. The @development@ version is subject to more frequent changes. Some of the new features have not been fully tested and may not work as expected.
32 7 Joël Brogniart
33 20 Joël Brogniart
It is not possible to install both the @stable@ and the @development@ version. If one of these versions is installed, you must uninstall it before installing the other version.
34 7 Joël Brogniart
35 20 Joël Brogniart
For installation and operation AMC requires a @LaTeX@ environment. The standard installation will use MacPorts to install this environment. If you are using "MacTeX":http://www.tug.org/mactex/ and want AMC to use @MacTeX@ instead of the MacPort environment, the installation process differs from the standard installation. You will install the Perl programming language that is necessary for the operation of AMC. Then you should follow either the instructions of the standard installation, or those of the installation of a version of AMC using MacTeX. These descriptions assume that you have a fresh and up-to-date MacPorts installation.
36 1
37 20 Joël Brogniart
h3. Installing Perl 5.26
38 4 Joël Brogniart
39 20 Joël Brogniart
MacPort is in a transition phase from version 5.24 to version 5.26 of Perl. To avoid malfunctions, you must force the installation of version 5.26.
40 20 Joël Brogniart
<pre>sudo port install perl5 +perl5_26</pre>
41 15 Joël Brogniart
42 20 Joël Brogniart
h3. Standard installation
43 19 Joël Brogniart
44 20 Joël Brogniart
The standard installation uses MacPorts to install the LaTeX environment needed by AMC. Use the following command to install the @stable@ version of AMC.
45 20 Joël Brogniart
<pre>sudo port install auto-multiple-choice</pre>
46 4 Joël Brogniart
47 20 Joël Brogniart
Or use the following command to install the @development@ version of AMC.
48 20 Joël Brogniart
<pre>sudo port install auto-multiple-choice-devel</pre>
49 7 Joël Brogniart
50 20 Joël Brogniart
h3. Installing AMC for use with MacTeX
51 10 Joël Brogniart
52 20 Joël Brogniart
MacPorts build tools must be able to access MacTeX tools. For example, with the MacTeX 2017 installation, these tools are available in the @"/Library/TeX/texbin"@ folder. The MacPorts configuration needs to be changed to include this folder in MacPorts @path@.
53 10 Joël Brogniart
54 20 Joël Brogniart
Be careful, as noted in the "MacPorts documentation":https://guide.macports.org/chunked/internals.configuration-files.html, changing MacPorts' @path@ can have unpredictable effects and consequences for others tools. It must be avoided.
55 11 Joël Brogniart
56 20 Joël Brogniart
Edit the @/opt/local/etc/macports/macports.conf@ file to add the following line.
57 20 Joël Brogniart
<pre>binpath               /opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/Library/TeX/texbin</pre>
58 12 Joël Brogniart
59 20 Joël Brogniart
For the stable version of AMC, you must start the installation with the following command.
60 20 Joël Brogniart
<pre>sudo port install auto-multiple-choice +mactex</pre>
61 5 Joël Brogniart
62 20 Joël Brogniart
And for the development version of AMC it is necessary to use the command which follows.
63 20 Joël Brogniart
<pre>sudo port install auto-multiple-choice-devel +mactex</pre>
64 5 Joël Brogniart
65 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.
66 5 Joël Brogniart
67 5 Joël Brogniart
h2. Using AMC
68 7 Joël Brogniart
69 5 Joël Brogniart
You can start from the terminal or from XQuartz.
70 7 Joël Brogniart
71 5 Joël Brogniart
h3. In the Terminal
72 5 Joël Brogniart
73 5 Joël Brogniart
<pre>auto-multiple-choice</pre>
74 7 Joël Brogniart
75 5 Joël Brogniart
This command will launch XQuartz and AMC application.
76 5 Joël Brogniart
77 5 Joël Brogniart
h3. In XQuartz
78 5 Joël Brogniart
79 7 Joël Brogniart
Start XQuartz application.
80 5 Joël Brogniart
81 1
!xquartz.png!
82 5 Joël Brogniart
83 5 Joël Brogniart
We can immediately set XQuartz to facilitate the launch of AMC. Open the @Applications > Customize...@ menu.
84 7 Joël Brogniart
85 7 Joël Brogniart
!xquartz-menu-applications-personnaliser.png!
86 5 Joël Brogniart
87 5 Joël Brogniart
In the Personalization window, click the button @Add an entry@.
88 7 Joël Brogniart
89 5 Joël Brogniart
!xquartz-fenetre-personnaliser-menu-applications.png!
90 7 Joël Brogniart
91 5 Joël Brogniart
Set "@Auto Multiple Choice@" in the @Name@ column and "@auto-multiple-choice@" in the @Command@ column of the new menu item.
92 7 Joël Brogniart
93 5 Joël Brogniart
!xquartz-fenetre-personnaliser-menu-applications-2.png!
94 7 Joël Brogniart
95 5 Joël Brogniart
Close the Customize window, then select the @Applications > Auto Multiple Choice@ menu.
96 5 Joël Brogniart
97 5 Joël Brogniart
!xquartz-menu-applications-amc.png!
98 7 Joël Brogniart
99 5 Joël Brogniart
AMC window should appear.
100 7 Joël Brogniart
101 5 Joël Brogniart
!auto-multiple-choice-window.png!
102 5 Joël Brogniart
103 5 Joël Brogniart
Auto-multiple-choice is now ready to work.
104 5 Joël Brogniart
105 7 Joël Brogniart
h2. Links
106 5 Joël Brogniart
107 22 Joël Brogniart
* DejaVu fonts, "http://dejavu-fonts.org/wiki/Download":http://dejavu-fonts.org/wiki/Download
108 22 Joël Brogniart
* Linux Libertine font, "LinuxLibertine.org":http://www.linuxlibertine.org
109 1
* MacPorts, "http://www.macports.org":http://www.macports.org.
110 22 Joël Brogniart
* MacTeX, "http://www.tug.org/mactex/":http://www.tug.org/mactex/
111 22 Joël Brogniart
* XQuartz, "http://xquartz.macosforge.org":http://xquartz.macosforge.org.