Installing AMC with MacPorts on macOS

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

1 28 Joël Brogniart
h1. Installing AMC on macOS with MacPorts
2 1
3 31 Joël Brogniart
The easiest way to install AMC on macOS is to use "homebrew":https://github.com/maelvalais/homebrew-amc wuth the formula
4 31 Joël Brogniart
@brew install maelvalais/amc/auto-multiple-choice@
5 31 Joël Brogniart
6 31 Joël Brogniart
This installation guide walks you through installing it with the "MacPorts":http://www.macports.org package manager. It requires some knowledge about Unix tools, the use of command lines and the installation of "MacPorts":http://www.macports.org. You must also have administrative rights on the computer. It is therefore not intended for everyone.
7 10 Joël Brogniart
8 9 Joël Brogniart
h2. Prerequisites
9 1
10 28 Joël Brogniart
To work with its interface, AMC requires the Linux Libertine, DejaVu, IPAexMincho, and IPAexGothic font families, the MacPorts installation system and an X Window System or X11 graphical environment.
11 20 Joël Brogniart
12 12 Joël Brogniart
h3. Linux Libertine font
13 1
14 7 Joël Brogniart
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 "sourceforge":https://sourceforge.net/projects/linuxlibertine/ site.
15 1
16 28 Joël Brogniart
*Caution*: X Window Ssstem does not recognize the fonts installed in the user's folder. You must install the fonts by moving them in the "@/Library/Fonts@" folder.
17 1
18 20 Joël Brogniart
h3. DejaVu font family
19 1
20 29 Joël Brogniart
DejaVu fonts are used for generating documentation. You need to download the fonts on "sourceforge":https://sourceforge.net/projects/dejavu/ site.
21 12 Joël Brogniart
22 28 Joël Brogniart
*Caution*: X Window Ssstem does not recognize the fonts installed in the user's folder. You must install the fonts by moving them in the "@/Library/Fonts@" folder.
23 28 Joël Brogniart
24 25 Joël Brogniart
h3. IPAexMincho and IPAexGothic fonts
25 1
26 29 Joël Brogniart
IPAexMincho and IPAexGothic fonts are used for generating documentation. You need to download the fonts on "IPA Font":https://ipafont.ipa.go.jp/node26#en.
27 1
28 1
*Caution*: X Window Ssstem 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 29 Joël Brogniart
**Caution too** Check also access rights and use if needed chmod 755 /Library/Fonts/<PoliceName> on the concerned fonts.
31 29 Joël Brogniart
32 1
h3. MacPorts
33 1
34 1
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.
35 1
36 28 Joël Brogniart
h3. X Window System environment
37 28 Joël Brogniart
38 28 Joël Brogniart
MacOS does not contain the standard X11 graphical environment. This system can be provided by "XQuartz":http://xquartz.macosforge.org or installed with MacPorts.
39 28 Joël Brogniart
40 28 Joël Brogniart
To install the X Window System environment with MacPorts, use the following command.
41 28 Joël Brogniart
<pre>sudo port install xorg-server</pre>
42 28 Joël Brogniart
43 28 Joël Brogniart
*Caution*: for the X Window System environment to be correctly taken into account, after its installation you must leave your session and connect again.
44 1
45 20 Joël Brogniart
h2. Installing AMC
46 23 Joël Brogniart
47 30 Joël Brogniart
It is possible to install one of the two versions of AMC. Either the @stable@ version (currently, version 1.4.0 of 12/29/2018), or the @development@ version (currently, revision fd2136db of 4/10/2020). 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.
48 20 Joël Brogniart
49 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.
50 23 Joël Brogniart
51 15 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 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.
52 1
53 20 Joël Brogniart
h3. Standard installation
54 19 Joël Brogniart
55 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.
56 20 Joël Brogniart
<pre>sudo port install auto-multiple-choice</pre>
57 4 Joël Brogniart
58 20 Joël Brogniart
Or use the following command to install the @development@ version of AMC.
59 20 Joël Brogniart
<pre>sudo port install auto-multiple-choice-devel</pre>
60 7 Joël Brogniart
61 20 Joël Brogniart
h3. Installing AMC for use with MacTeX
62 20 Joël Brogniart
63 28 Joël Brogniart
MacPorts build tools must be able to access MacTeX tools. For example, with the MacTeX 2018 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@.
64 20 Joël Brogniart
65 11 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.
66 20 Joël Brogniart
67 20 Joël Brogniart
Edit the @/opt/local/etc/macports/macports.conf@ file to add the following line.
68 1
<pre>binpath               /opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/Library/TeX/texbin</pre>
69 20 Joël Brogniart
70 5 Joël Brogniart
For the stable version of AMC, you must start the installation with the following command.
71 20 Joël Brogniart
<pre>sudo port install auto-multiple-choice +mactex</pre>
72 20 Joël Brogniart
73 5 Joël Brogniart
And for the development version of AMC it is necessary to use the command which follows.
74 5 Joël Brogniart
<pre>sudo port install auto-multiple-choice-devel +mactex</pre>
75 1
76 1
The installation may take a while. When it is complete and if there is no error, AMC is ready to be used.
77 5 Joël Brogniart
78 7 Joël Brogniart
h2. Using AMC
79 1
80 28 Joël Brogniart
You can start from the terminal or from the X Window system.
81 7 Joël Brogniart
82 5 Joël Brogniart
h3. In the Terminal
83 5 Joël Brogniart
84 5 Joël Brogniart
<pre>auto-multiple-choice</pre>
85 7 Joël Brogniart
86 5 Joël Brogniart
This command will launch XQuartz and AMC application.
87 5 Joël Brogniart
88 28 Joël Brogniart
h3. In the X Window System
89 5 Joël Brogniart
90 28 Joël Brogniart
The X Window system can be provided by the XQuartz application (in the @Applications@ folder) or the X11 application (in the @Applications/MacPorts@ folder). Launch the application.
91 5 Joël Brogniart
92 1
!xquartz.png!
93 5 Joël Brogniart
94 28 Joël Brogniart
We can immediately set the application to facilitate the launch of AMC. Open the @Applications > Customize...@ menu.
95 7 Joël Brogniart
96 7 Joël Brogniart
!xquartz-menu-applications-personnaliser.png!
97 5 Joël Brogniart
98 5 Joël Brogniart
In the Personalization window, click the button @Add an entry@.
99 7 Joël Brogniart
100 5 Joël Brogniart
!xquartz-fenetre-personnaliser-menu-applications.png!
101 7 Joël Brogniart
102 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.
103 7 Joël Brogniart
104 5 Joël Brogniart
!xquartz-fenetre-personnaliser-menu-applications-2.png!
105 7 Joël Brogniart
106 5 Joël Brogniart
Close the Customize window, then select the @Applications > Auto Multiple Choice@ menu.
107 5 Joël Brogniart
108 5 Joël Brogniart
!xquartz-menu-applications-amc.png!
109 7 Joël Brogniart
110 5 Joël Brogniart
AMC window should appear.
111 7 Joël Brogniart
112 5 Joël Brogniart
!auto-multiple-choice-window.png!
113 5 Joël Brogniart
114 5 Joël Brogniart
Auto-multiple-choice is now ready to work.
115 7 Joël Brogniart
116 5 Joël Brogniart
h2. Links
117 1
118 1
* DejaVu fonts, "https://sourceforge.net/projects/dejavu/":https://sourceforge.net/projects/dejavu/
119 25 Joël Brogniart
* IPAexMincho and IPAexGothic fonts, "https://ipafont.ipa.go.jp/node26#en":https://ipafont.ipa.go.jp/node26#en
120 25 Joël Brogniart
* Linux Libertine fonts, "https://sourceforge.net/projects/linuxlibertine/":https://sourceforge.net/projects/linuxlibertine/
121 1
* MacPorts, "http://www.macports.org":http://www.macports.org.
122 22 Joël Brogniart
* MacTeX, "http://www.tug.org/mactex/":http://www.tug.org/mactex/
123 22 Joël Brogniart
* XQuartz, "http://xquartz.macosforge.org":http://xquartz.macosforge.org.