Added docs reference to installing dependencies page

This commit is contained in:
Jonathan Moallem 2020-11-24 19:07:24 +11:00 committed by GitHub
parent c79441dc18
commit 512e811d3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,65 +24,12 @@ So that being said, we hope that this repository finds you well and wholehearted
### Installing Dependencies
#### Installing Apple Developer Tools (macOS only)
To do anything of value in the later versions of macOS, you're going to need the Xcode developer tools. Fortunately, if you want to skip downloading the behemoth of an IDE, then you can just get the command line tools package with the following command:
```console
$ xcode-select --install
```
#### Installing MinGW (Windows only)
Building raylib libraries requires the installation of MinGW ([32](http://www.mingw.org/) and [64](http://mingw-w64.org/doku.php/download) bit versions). Please ensure that you link MinGW's `bin` directory to your system environment variables for BOTH the 32 and 64 bit versions. You can follow the instructions here for the [32-bit](https://www.youtube.com/watch?v=sXW2VLrQ3Bs) and here for the [64-bit](https://code.visualstudio.com/docs/cpp/config-mingw) bit versions.
After installing MinGW, you should have G++ installed. You can verify this by running:
```console
> g++ --version
g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
```
#### Installing G++ & Make (Linux only)
Some Linux distributions do not come preinstalled with the basic build tools required to do C/C++ development. In the case that you do not have them and you're on a Debian-based system, you can install them all with one very handy meta-package aptly named `build-essential`. Otherwise if you're using Fedora, you can install them each individually. Run the following lines to install them:
##### Debian/Ubuntu
```console
$ sudo apt update
$ sudo apt install build-essential
```
##### Fedora
```console
$ sudo dnf check-update
$ sudo dnf install make automake gcc gcc-c++ kernel-devel
```
After installing the package, you should have both G++ and Make installed. You can verify this by running:
```console
$ g++ --version
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
$ make --version
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
```
#### Installing ALSA, Mesa & X11 (Linux only)
On Linux, raylib is reliant on a number of libraries for audio, graphics, and windowing that may not come preinstalled, these being ALSA, Mesa & X11 respecively. Fortunately they can all be easily installed through your distribution's package manager with just a few lines:
##### Debian/Ubuntu
```console
$ sudo apt update
$ sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
```
##### Fedora
```console
$ sudo dnf check-update
$ sudo dnf install alsa-lib-devel mesa-libGL-devel libX11-devel libXrandr-devel libXi-devel libXcursor-devel libXinerama-devel
```
Before building the project, you will need to install all relevant dependencies for your platform so that the project has access to all the tools required, and raylib can compile and link correctly. You can find intructions for installing dependencies on macOS, Linux, and Windows in the [docs file on installing dependencies](https://github.com/CapsCollective/raylib-cpp-starter/blob/main/docs/InstallingDependencies.md).
### Building the Project
#### macOS & Linux
Once you have cloned this repository and installed the relevant dependencies for your platform, building the project is as simple as running these two commands in its root directory:
Once you have cloned this repository and installed dependencies, building the project is as simple as running these two commands in its root directory:
```console
$ make setup
@ -123,8 +70,6 @@ Unfortunately **we do not yet have automated project setup configured for Window
- It is recommended that your code should go into the `/src` directory, which is automatically included in the compile process when you run `make`.
- If you wish to change the program entry point from `/src/main.cpp`, add more libraries, or really anything about your project, all build instructions are specified in the `Makefile` no smoke and mirrors!
---
## Todo
- [x] Get static linking to work with C++ bindings
- [x] Setup for at least one compiler on each platform