rename startup to compiling authored by Malin Freeborn's avatar Malin Freeborn
## Linux
### Arch Linux
```bash
sudo pacman -S texlive-most inkscape git git-lfs make texlive-binextra
git clone git@gitlab.com:bindrpg/core.git
cd core
make all
```
### Debian
```bash
sudo apt install texlive-full inkscape git git-lfs make
git clone git@gitlab.com:bindrpg/core.git
cd core
make all
```
### Void Linux
```bash
sudo xbps-install texlive-most inkscape git git-lfs make texlive-latexmk
git clone git@gitlab.com:bindrpg/core.git
cd core
make all
```
### Docker
You can select any number of books, then compile them via docker.
Just list the books at the end.
```bash
books='core stories oneshot'
docker run -it --rm --name texbooks andonome/texbind gimme $books
```
## Windows
You have two options on Windows: WSL (the built-in Linux), and Cygwin.
### WSL
The 'Windows Subsystem for Linux' virtualises Linux.
1. Install it using these [instructions](https://learn.microsoft.com/en-us/windows/wsl/install).
1. Install Ubuntu (or anything really).
1. Open the terminal and access your Windows desktop by typing `cd /mnt/c/Users/$YOURNAME/Desktop`
1. Follow the Debian instructions (above).
### Cygwin
If you want to replicate a *nix-style workflow on a Windows platform, the following setup may work for you:
+ Install [Cygwin](https://www.cygwin.com/) making sure to select the git and make packages.
* If you wish to use SSH for git access, instead of HTTPS, then add the openssh package also
+ Open up the Cygwin bash console so that it can create a home folder within it's folder structure for you.
+ Download the Windows binary for [git-lfs](https://github.com/git-lfs/git-lfs/releases) and place the executable in a location that is in the PATH. One option is to create a "bin" subfolder in your Cygwin home folder and add it to your path by editing `.bash_profile`. You could also place it elsewhere on your filesystem and just edit the Windows PATH environment variable in order to add that location.
+ Install [TeX Live](https://www.tug.org/texlive/windows.html)
+ Install [Inkscape](https://inkscape.org/release)
+ From a **newly opened** Cygwin bash console and clone the repo with one of the following commands:
* `git clone git@gitlab.com:bindrpg/core.git`
* `git clone https://gitlab.com/bindrpg/core.git`
+ Then execute the following commands:
* `cd core`
* `make`
The above process should build the Core Rulebook. If you wish to execute the build of the `config` repository itself, there is one additional step that will be required. Typical Windows installations do not support symlinks. The config repository utilizes a symlink in order to emulate the folder structure of the other document repositories. At the top of the config repo, you will find a symlink named "config" that points to the config repo folder itself. In order to execute builds of the `config` repo on Windows, execute the following commands before `make`:
+ `cd config`
+ `rm config`
+ `mkdir config`
+ `shopt -s extglob`
+ `cp -R !(config) config/`
+ `make`
## MacOS
I don't have a Mac to test on, but this will probably work with `homebrew`.
# Learning Git
If you modify a weapon and someone else adds a spell, nobody wants to deal with merging those two ideas together. Git puts your changes together for you.
If you have an idea, but you want to show it to someone before committing to it, git lets you make a copy of the project, then give someone your copy and your new ideas. They can then make changes before putting it into the book.
Git gives you a lot of toys, but beginners will only need a few:
Make a new branch to play with called 'new'.
```bash
git switch -c new
```
You can mess around here, making the changes you want.
But if you don't like your changes, just reset everything:
```bash
git reset --hard HEAD
```
Tell git you've made changes:
```bash
git add -A
```
Explain what you did in a few words, e.g. `add rule for half-swording`, with a commit message:
```bash
git commit
```
Push your changes to gitlab, so everyone sees them.
```bash
git push origin new
```
Remember you are pushing your own branch, so replace 'new' with whatever name you gave your branch.