Imagine++
MacOS installation

After installation, you can check the setup following this check guide.

Requirements

  1. Install CMake (https://www.cmake.org/download/)
  2. Install XCode tools. Launch in a terminal:
    xcode-select --install
  3. Install Qt 6 (https://www.qt.io/download-qt-installer). You must create a Qt account, then install the following four components:
    qtmac.png
  4. If you already had installed a previous version of QtCreator before, it may interfere with the newly installed one. To restart from scratch:
    rm -rf ~/.config/QtProject
  5. You may need to enter the following lines in a terminal to get around a bug regarding running a debug program:
    source /Library/Frameworks/Imagine.Framework/Versions/Current/Resources/doc/html/fixQtDebug.sh
    If the file does not exist, download it fixQtDebug.sh, and run in terminal:
    source $HOME/Downloads/fixQtDebug.sh
    If some error message appears, your installation is not standard:
    find . -name Qt6CoreConfig.cmake
    cat $HOME/Downloads/fixQtDebug.sh
    Replace the first three cd commands with the full path (up to, and not including, macos), for instance:
    cd /Users/pascal/Qt/6.2.0

and run the subsequent commands of the script by copy-pasting them in the terminal.

Install package

Warning: the installer below is for MacOS with Intel architecture. If yours is Apple Silicon (M1-M4), you must build yourself by going to Alternative: compiling from source.

Use the installer (which installs in folder /Library/Frameworks):

Warning: Some MacOS versions do not have OpenGL support by default. If this is your case, 3D does not work in Imagine++ and you will have trouble when compiling. In that case, you must use one package below:

Go to Usage and check the tests.

Alternative: compiling from source

This follows the same procedure as for Linux:

  1. Build
after downloading and extracting the source package. Enter the following commands in the terminal one by one. Do not proceed if one of them signals a problem. Be careful about the end of third line: the path ~/Qt/6.2.0/macos must be adapted to the version of Qt6 that you installed.

wget https://imagine.enpc.fr/~monasse/Imagine++/downloads/ImaginePP-6.0.0-Source.tar.gz
tar xzf ImaginePP-6.0.0-Source.tar.gz
/Applications/CMake.app/Contents/bin/cmake -S ImaginePP-6.0.0-Source -B buildImagine -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/Qt/6.2.0/macos

You are ready for the build itself:

/Applications/CMake.app/Contents/bin/cmake --build buildImagine
/Applications/CMake.app/Contents/bin/cmake --build buildImagine -t doc
/Applications/CMake.app/Contents/bin/cmake --build buildImagine -t package
cd buildImagine
source ../ImaginePP-6.0.0-Source/CMake/mkFramework.sh Imagine++-6.0.0-Darwin-x86_64.tar.gz
open Imagine++-6.0.0-Darwin-x86_64.pkg

It creates and launches your installer.

Cleanup after installation (optional):

 rm Imagine++-6.0.0-Source.tar.gz
 rm -rf Imagine++-6.0.0-Source buildImagine

Uninstallation

sudo rm -rf /Library/Frameworks/Imagine.framework