Elaborate build instructions in README.

Not everyone knows how to check out the sources with git (or that
we require that, because of submodules), and has the basic build
tools like gcc installed, so point that out explicitly.
This commit is contained in:
whitequark 2017-08-08 12:22:40 +00:00
parent 49c64f7f15
commit afe2279a96

View File

@ -25,17 +25,19 @@ Building on Linux
### Building for Linux ### Building for Linux
You will need CMake, zlib, libpng, cairo, freetype. To build the GUI, you will need You will need the usual build tools, CMake, zlib, libpng, cairo, freetype.
fontconfig, gtkmm 3.0 (version 3.16 or later), pangomm 1.4, OpenGL and OpenGL GLU, and To build the GUI, you will need fontconfig, gtkmm 3.0 (version 3.16 or later), pangomm 1.4,
optionally, the Space Navigator client library. OpenGL and OpenGL GLU, and optionally, the Space Navigator client library.
On a Debian derivative (e.g. Ubuntu) these can be installed with: On a Debian derivative (e.g. Ubuntu) these can be installed with:
apt-get install cmake zlib1g-dev libpng-dev libcairo2-dev libfreetype6-dev apt-get install git build-essential cmake zlib1g-dev libpng-dev libcairo2-dev libfreetype6-dev
apt-get install libjson-c-dev libfontconfig1-dev libgtkmm-3.0-dev libpangomm-1.4-dev \ apt-get install libjson-c-dev libfontconfig1-dev libgtkmm-3.0-dev libpangomm-1.4-dev \
libgl-dev libglu-dev libspnav-dev libgl-dev libglu-dev libspnav-dev
Before building, check out the necessary submodules: Before building, check out the project and the necessary submodules:
git clone https://github.com/solvespace/solvespace
cd solvespace
git submodule update --init extlib/libdxfrw git submodule update --init extlib/libdxfrw
After that, build SolveSpace as following: After that, build SolveSpace as following:
@ -52,14 +54,16 @@ by passing the `-DENABLE_GUI=OFF` flag to the cmake invocation.
### Building for Windows ### Building for Windows
You will need CMake and a Windows cross-compiler. You will need the usual build tools, CMake and a Windows cross-compiler.
On a Debian derivative (e.g. Ubuntu) these can be installed with: On a Debian derivative (e.g. Ubuntu) these can be installed with:
apt-get install cmake mingw-w64 apt-get install git build-essential cmake mingw-w64
Before building, check out the necessary submodules: Before building, check out the project and the necessary submodules:
git submodule update --init git clone https://github.com/solvespace/solvespace
cd solvespace
git submodule update
After that, build 32-bit SolveSpace as following: After that, build 32-bit SolveSpace as following:
@ -88,13 +92,15 @@ Building on macOS
You will need XCode tools, CMake, libpng and Freetype. To build tests, you You will need XCode tools, CMake, libpng and Freetype. To build tests, you
will need cairo. Assuming you use [homebrew][], these can be installed with: will need cairo. Assuming you use [homebrew][], these can be installed with:
brew install cmake libpng freetype cairo brew install git cmake libpng freetype cairo
XCode has to be installed via AppStore or [the Apple website][appledeveloper]; XCode has to be installed via AppStore or [the Apple website][appledeveloper];
it requires a free Apple ID. it requires a free Apple ID.
Before building, check out the necessary submodules: Before building, check out the project and the necessary submodules:
git clone https://github.com/solvespace/solvespace
cd solvespace
git submodule update --init extlib/libdxfrw git submodule update --init extlib/libdxfrw
After that, build SolveSpace as following: After that, build SolveSpace as following:
@ -135,6 +141,8 @@ First, ensure that git and cl (the Visual C++ compiler driver) are in your
`%PATH%`; the latter is usually done by invoking `vcvarsall.bat` from your `%PATH%`; the latter is usually done by invoking `vcvarsall.bat` from your
Visual Studio install. Then, run the following in cmd or PowerShell: Visual Studio install. Then, run the following in cmd or PowerShell:
git clone https://github.com/solvespace/solvespace
cd solvespace
git submodule update --init git submodule update --init
mkdir build mkdir build
cd build cd build
@ -149,6 +157,8 @@ Space Navigator support will be disabled.
First, ensure that git and gcc are in your `$PATH`. Then, run the following First, ensure that git and gcc are in your `$PATH`. Then, run the following
in bash: in bash:
git clone https://github.com/solvespace/solvespace
cd solvespace
git submodule update --init git submodule update --init
mkdir build mkdir build
cd build cd build