Knowledge Base‎ > ‎

Building from Source on Mac

Note: Building for mac from the master branch of our current repository will no longer work, if you need it to work and think you can help, come visit us on freenode #singularityviewer. We'd eagerly accept the assistance.

Note: This will only work on Mac OS X 10.9 and newer, using Xcode 5.

Preparation

Login to the Apple Dev Center and in the download section search for, download and install the latest version of Xcode 5. Run Xcode once, to agree to its license terms.
Now, back at the Apple Dev Center's download section, search for and download Xcode 4.3.3. Mount it by double clicking it. Do not attempt to install this old version!
Open System Preferences -> Security & Privacy, change "Allow apps downloaded from:" setting to "Anywhere" (This is needed in order to download and run Cmake installer).
Download and install CMake, when it asks, select the option to install command line tools.

In a terminal, clone the Singularity source and configure it for building:
git clone https://github.com/singularity-viewer/SingularityViewer.git singularity
cd singularity/
bash scripts/xcode_fix.sh
python indra/develop.py -G "Unix Makefiles" -t Release configure -DPACKAGE:BOOL=ON -DLL_TESTS:BOOL=OFF -DFMODSTUDIO:BOOL=ON

Compiling

Open a terminal and run the following:
cd singularity/build-darwin-i686/
make -j#
Note: Replace # with the number of processor cores you wish to dedicate to compiling.

Compiling may take a while, take a break.

Running

In finder you will be able to navigate from your home folder to singularity/build-darwin-i686/newview where you can find Singularity.app which you can run directly and dmg installer image with a name like Singularity_1_8_5_5752.dmg.

Updating

In a terminal, you may check for updates by running:
cd singularity/
git fetch
If this command gives any output, that means there's new code available, download it by running:
git pull
To have the build number change for certain:
touch indra/newview/CMakeLists.txt
Finally, repeat the Compiling step to update your build.
Comments