« Previous - Version 3/46 (diff) - Next » - Current version
Joël Brogniart, 03/23/2024 09:13 am


Building AMC for MAC OSX

This is a translation of the original wiki entry by Joël Brogniart. Any spelling or translation errors are either mine or Google translate's.

(This installation is running OS X 10.7.5 and OS X 10.8.3 with Xcode 4.6.2 and MacPorts 2.1.3)

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 OS X.
Linux is used as the develop environment, so it probably runs best there. Your mileage may vary.

It is possible to install the pre-compiled version 1.1.1 , 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 involves only OS X 10.8 (and 10.7.5 with the latest version of XCode).

You will need MacPorts, a little understanding of the dependencies between different tools (Subversion, MacPorts, PERL, X11, port ...) and the OS X-architecture.

You should also have administrative rights on the computer. This manual is therefore unfortunately not for everyone. There is a little problem for communication with the printing tools and the installed version can not print directly, so you might miss some comfort compared to the Linux version. (But you will be producing pdf files which can be handled by your mac quite well). Documents generated by AMC will be printed from OS X.

For this installation you will create a local MacPort repository. In this repository you will add macports description files unknown to macports. The procedure will create a port file for AMC and some additional port files for tools needed to run AMC. Once these files are installed by macport, the installation of AMC can de started.

Prerequisites

The requirements are the same as the installation of version 1.1.1 AMC. To work with the interface, AMC requires the graphical environment X Window System and X11 font Linux Libertine characters and and installation MacPorts system.

OS X does not contain the standard X11 graphical environment. It is possible to fill this gap by installing XQuartz, an X Windows System environment running OS X. You can download the application on the XQuartz site. XQuartz.

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 site. LinuxLibertine.org.

Attention : The current version of XQuartz (2.7.4) does not recognize the fonts installed in the user's folder. You must install the fonts by moving in the "/ Library / Fonts" folder.

MacPorts

MacPorts is a system to build, install and manage open source software. You need to download the installation package Mountain Lion on the site "MacPorts" http://www.macports.org and install MacPorts.

MacPorts files installation (port) files

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.
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. Some tools required for installation and operation of AMC are absent from MacPorts. So we have to create the files to port these tools and file port for the development version of AMC.

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.

Note: MacPorts is a collaborative effort and many developers are involved in its development. The files described here they have been proposed to be added to the files referenced in MacPorts. When and if an addition is accepted, the local port file is no longer needed. One day a MacPorts update may be accepted in the standard hierarchy of MacPorts.

Local repository MacPorts

For MacPorts to use a local folder, you must create that local folder.

mkdir -p ~/nix/macports

An archive containing files ports described here is available for download: attachment:macports.zip.

Ports are grouped into categories and file organization reflects this port group. Each port is part of a main category and has its own folder. The main category of AMC in MacPorts X11 is also the case for AMC port will be located within a folder X11. AMC is developed in PERL and requires many CPAN modules. PERL modules to be added will be in the file perl. The following PERL ports will be added. -The following ports will be updated because the version currently available in MacPort is too old. -
  • p5-class-load (module CPAN Class::Load) (plus nécessaire, mis à jour dans MacPorts)
  • p5-email-mime (module CPAN Email::MIME) (plus nécessaire, mis à jour dans MacPorts)
  • p5-email-simple (module CPAN Email::Simple) (plus nécessaire, mis à jour dans MacPorts)

Here is a command to create the hierarchy.

cd ~/nix/macports
mkdir -p perl/p5-email-abstract perl/p5-email-sender perl/p5-moo \
    perl/p5-moox-types-mooselike perl/p5-role-tiny perl/p5-strictures \
    perl/p5-throwable x11/auto-multiple-choice-devel

This should produce:

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.

auto-multiple-choice-window-2.png (35.1 kB) Joël Brogniart, 07/18/2022 10:56 am