Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #10

Merged
merged 7 commits into from
Oct 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,24 @@ sudo apt-get install libsdl2-dev libsdl2-net-dev libsdl2-image-dev libsdl2-mixer
and that's it.

### MacOS
I haven't any device with MacOS, I know for sure that it is possible to install and execute programs using VSGL2 library, if someone wants to help editing this section is welcomed.

To install vsgl2 on MacOS devices:

1. Install CodeBlocks [here](http://www.codeblocks.org/downloads) if you want, but I don't recommend it because MacOS version is very unstable. Instead of using CodeBlocks you can compile using g++ in the terminal (see below) and code using a text editor like SublimeText, Atom, Vim (only for pros), Emacs...

2. If you haven't got it, install [homebrew](https://brew.sh/index_it.html):

```
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```

3. Install sdl & sdl2:

```
brew install sdl2 sdl2_net sdl2_image sdl2_mixer sdl2_ttf
sudo chown root:wheel /usr/local/bin/brew
brew link sdl2 sdl2_net sdl2_image sdl2_mixer sdl2_ttf
```

## Installing VSGL2 library
The library is platform independent, so the steps are the same in all the platforms.
Expand All @@ -69,9 +86,22 @@ git pull https://github.com/alessandro-bugatti/vsgl2.git

There is a **.cbp** file inside each ```lesson```, it is a good place to start using the library with Codeblocks.

If you prefer compiling in the terminal using g++:

```
g++ your/file/path vsgl2.cpp/file/path -lsdl2 -lsdl2_net -lsdl2_image -lsdl2_mixer -lsdl2_ttf -std=c++11 -stdlib=libc++
```

And run what you've just compiled:

```
./a.out
```

## Design
Main features:
- Simple, every functions has to be clear and easy to use

- Only functions, not classes or objects (from the user prospective, the library code uses C++)
- Not a general library to do all the things, but only to do certain things in a easy manner. If you want to have full control of all the aspects, maybe it could be better to use SDL instead.

Expand Down