Installing AMC with MacPorts on macOS

Version 19 (Joël Brogniart, 03/23/2024 09:13 am) → Version 20/46 (Joël Brogniart, 03/23/2024 09:13 am)

h1. Installing AMC development version on macOS

The This is a translation of the French entry wiki. First translation was done by Pieter Van den Hombergh.

_(This
installation guide requires some knowledge about Unix tools, - AMC version 1.3.0 revision commit:f540cd2af512 10/12/2017 - was tested with_
* _macOS 10.13 (MacPorts 2.4.2, Xcode 9)._

Auto Multiple Choice (AMC) is a software to manage questionnaires and multiple choice exams. It allows, from
the use definition of command lines, 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.

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.

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.

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 "MacPorts":http://www.macports.org. Xcode. You must 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. It This manual is therefore unfortunately not intended for everyone.

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.

h2. Prerequisites

The requirements are the same as the installation of version 1.1.2 AMC. To work with its the interface, AMC requires an the graphical environment X Window System or X11 graphical environment, and X11, the Linux Libertine font, the DejaVu font family, family and the MacPorts installation system.

h3. X Window System environment

MacOS
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.

h3. MacPorts

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.

h3.
Linux Libertine font

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.

*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.

h3. DejaVu font family

DejaVu fonts are used for japanese documentation generation.
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.

*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.

h3. h2. MacPorts installation (port) files

The MacPorts is port file contains information that allows a system that compiles, installs and manages open source software. You need program to download be installed into the MacPorts system. It shows what tools are needed for installation package for your version and operation of macOS from the "MacPorts":http://www.macports.org program and how to install MacPorts. Follow the instructions carefully and don't forget to install Xcode.

h2. Installing
program.
MacPorts contains "many ports":http://www.macports.org/ports.php but it does not contain a port describing the
AMC

It is possible to install one
installation from the source code of the two versions program. So we have to create the file port for the development version of AMC. Either

To avoid conflicts with ports already described in MacPorts, new ports will be installed in
the @stable@ version (currently, version 1.3.0.2132 folders 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 user who installs, instead of the new features have not been fully tested and may not work as expected. being installed in folders directly managed by MacPorts.

It is not possible h3. Local MacPorts repository

For MacPorts
to install both the @stable@ and the @development@ version. If one of these versions is installed, use a local folder, you must uninstall it create that local folder.

<pre>mkdir -p ~/nix</pre>

You should then tell MacPorts to take the local folder into account,
before installing considering the other version.

For installation and operation AMC requires a @LaTeX@ environment. The
standard installation will use MacPorts to install hierarchy MacPorts. To do this environment. If you are using "MacTeX":http://www.tug.org/mactex/ must edit the file "@/opt/local/etc/macports/sources.conf@" and want AMC add a URL to use @MacTeX@ instead of the MacPort environment, local file before the installation process differs from URL of the standard installation. You will install repository @rsync@ MacPorts.

<pre>file:///Users/julesvernes/nix/macports
rsync://rsync.macports.org/release/tarballs/ports.tar [default]</pre>

h3. Port Files

An archive containing
the Perl programming language that file port described here is necessary available for download: attachment:macports.zip.

Download and uncompress this archive then move
the operation of AMC. Then you should follow either "@macports@" folder inside 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. previously created folder.

h3. Installing Perl 5.26 !port-hierarchy.png!

MacPort Each directory must contain a port document named @Portfile@. This document is in a transition phase from version 5.24 to version 5.26 of Perl. To avoid malfunctions, you must force text document containing a description for the MacPorts installation of version 5.26. tool.

h4. Excerpt for @x11/auto-multiple-choice-devel/Portfile@

<pre>sudo port install <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

PortSystem 1.0
PortGroup bitbucket 1.0
PortGroup
perl5 +perl5_26</pre> 1.0
PortGroup texlive 1.0


h3. Standard installation

The standard installation uses MacPorts to install the LaTeX environment needed by AMC. Use the following command to install the @stable@
set bitbucket_commit "f540cd2af512"
set amc_revision "2104"
#2104:f540cd2af512
bitbucket.setup auto-multiple-choice auto-multiple-choice ${bitbucket_commit}
name auto-multiple-choice-devel
version of AMC. 1.3.${amc_revision}
<pre>sudo port install auto-multiple-choice</pre> categories x11 tex education
platforms darwin
license GPL-2+
maintainers laposte.fr:joel.brogniart,openmaintainer


Or use the following command to install the @development@ version of AMC. description Auto Multiple Choice - Multiple Choice Papers Management
<pre>sudo port install auto-multiple-choice-devel</pre>

h3. Installing AMC for use with MacTeX

MacPorts build tools must be able
long_description Utility to access MacTeX tools. For example, manage multiple choice questionnaires, \
with the MacTeX 2017 installation, these tools optionally mixed questions and answers. \
AMC provides automatic marking from papers' scans. \
Annotated papers
are available in the @"/Library/TeX/texbin"@ folder. The MacPorts configuration needs to produced. Marks can be changed to include this folder in MacPorts @path@.

Be careful,
exported \
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. an OpenOffice.org sheet file.

Edit the @/opt/local/etc/macports/macports.conf@ file to add the following line. homepage http://www.auto-multiple-choice.net/
<pre>binpath conflicts /opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/Library/TeX/texbin</pre> auto-multiple-choice

For checksums rmd160 9fa96fd9133c957c7fa618ffcee37e835c0d0e92 \
sha256 533e3904d0091777825acdfbf2ad5da0281bd59208f1a6fb3af5ebe7abd9d4f2

depends_build-append \
port:dblatex \
port:p${perl5.major}-xml-libxml
</pre>

h2. Installing AMC

Once
the stable version port files set up, generate the index of AMC, you must start the installation with the following command. new port.
<pre>sudo port install auto-multiple-choice +mactex</pre> <pre>cd ~/nix/macports
portindex</pre>


And for the *Warning*: standard and development version of AMC versions can't be installed simultaneously. If a standard version was previously installed, you must uninstall it is necessary to use before installing the command which follows.
development version.

<pre>sudo port uninstall auto-multiple-choice</pre>

Finally
install auto-multiple-choice-devel +mactex</pre> AMC.

<pre>sudo port install auto-multiple-choice-devel</pre>


The installation may take a while. When it is complete and if there is no error, AMC is ready to be used.

h2. Using AMC

You can start from the terminal or from XQuartz.

h3. In the Terminal

<pre>auto-multiple-choice</pre>

This command will launch XQuartz and AMC application.

h3. In XQuartz

Start XQuartz application.

!xquartz.png!

We can immediately set XQuartz to facilitate the launch of AMC. Open the @Applications > Customize...@ menu.

!xquartz-menu-applications-personnaliser.png!

In the Personalization window, click the button @Add an entry@.

!xquartz-fenetre-personnaliser-menu-applications.png!

Set "@Auto Multiple Choice@" in the @Name@ column and "@auto-multiple-choice@" in the @Command@ column of the new menu item.

!xquartz-fenetre-personnaliser-menu-applications-2.png!

Close the Customize window, then select the @Applications > Auto Multiple Choice@ menu.

!xquartz-menu-applications-amc.png!

AMC window should appear.

!auto-multiple-choice-window.png!

Auto-multiple-choice is now ready to work.

h2. Links

* Auto Multiple Choice, "http://www.auto-multiple-choice.net":http://www.auto-multiple-choice.net.
* 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.
* MacPorts, "http://www.macports.org":http://www.macports.org.
* MacPorts, "Local Portfile Repositories":http://guide.macports.org/#development.local-repositories.
* MacPorts, "How to create portfiles for CPAN Perl modules":https://trac.macports.org/wiki/howto/cpan2port.
* XQuartz, http://xquartz.macosforge.org</a>.