Skip to content

Latest commit

 

History

History
179 lines (139 loc) · 4.94 KB

compiling.asciidoc

File metadata and controls

179 lines (139 loc) · 4.94 KB

Compiling

The following instructions will allow you to compile RapCAD from source on various platforms.

Linux

Prerequisites

The source code is hosted in a git repository so you might want to install git first

git
sudo apt-get install git-core
Dependencies
sudo apt-get install g++ libcgal-dev libqt5opengl5-dev bison flex libreadline-dev
RapCAD
git clone https://github.com/GilesBathgate/RapCAD.git

cd rapcad &&
qmake &&
make

Note: Some distros have both qt4 and qt5 in which case qmake should be replaced with qt5-qmake

Windows

Qt (MinGW)

CMake

  • Download CMake installer cmake-3.4.0-rc2-win32-x86.exe

  • Check the 'Add cmake to the system path for the current user' checkbox

  • Install to default location C:\Program Files\CMake 3.4

Boost

  • Download Boost source boost_1.59.0.7z

  • Extract all to C:\ (sources will end up in C:\boost_1_59_0\ )

  • Use the QT Development Command Prompt
    Start->Program Files->Qt by Nokia v5.5.1 (MinGW OpenSource)->QT 5.5.1 Command Prompt

cd "C:\boost_1_55_0"
bootstrap.bat mingw
.\b2 toolset=gcc variant=release --with-thread --with-system

CGAL

Note
CGAL-4.7-Setup.exe is not a binary distribution, just an installer that installs the source.
  • No need for 'CGAL Examples and Demos'

  • Make sure 'mpfr and gmp precompiled libs' is checked

  • Install to C:\CGAL-4.7\

  • Make sure 'CGAL_DIR' environment checked.

  • Use the QT Development Command Prompt
    Start->Program Files->Qt by Nokia v5.5.1 (MinGW OpenSource)->QT 5.5.1 Command Prompt

set PATH=%PATH%;"C:\Program Files\CMake 3.4\bin"
set BOOST_ROOT=C:\boost_1_59_0
cd "C:\CGAL-4.7"
cmake -G"MinGW Makefiles" .
mingw32-make

macOS X

Current instructions were tested with macOS X 10.15.2 and XCode 11.3.1.

Xcode

Download the latest version of XCode from the app store. If you just downloaded it, then you will need to accept the license:

sudo xcodebuild -license

MacPorts

Download the MacPorts Installer. Install the package accepting the default options.

Dependencies
sudo port install cgal qt5-mac
RapCAD
export CXX="clang -std=c++11 -stdlib=libc++"
export CPLUS_INCLUDE_PATH="/opt/local/include"
export CFLAGS="-I /opt/local/include"
export LIBRARY_PATH=/opt/local/lib

mkdir build
cd build
/opt/local/libexec/qt5/bin/qmake -o Makefile ../rapcad.pro -spec macx-clang CONFIG+=official

make

If all goes well, you will see rapcad.app as a result, in your build folder. Note, that currently the app uses a generic app icon.

Packaging

If you wish to make a disk image containing the app, then you can use hdiutil, as follows:

hdiutil create -volname RapCAD -srcfolder rapcad.app -ov -format UDZO RapCAD.dmg