Skip to content

Commit

Permalink
Merge pull request #3 from cengique/install-scripts-docs
Browse files Browse the repository at this point in the history
initial edits and documentation
  • Loading branch information
dGr8LookinSparky committed Mar 27, 2021
2 parents 2305d17 + 819b4fa commit 260b6c4
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 11 deletions.
65 changes: 56 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ GrangerHub's STELLAR PREY™ game is a first person strategy shooter that chroni
This is the main repo for STELLAR PREY™ game and can be used to build and package releases, used as a development environment, as well as for the setup/operation of the client and/or the dedicated/master/auto-update servers. All related code, scripts, and assets can be found through submodules in this repo.

## Dependencies
### Linux

### Ubuntu Linux
* cmake
* cmake-curses-gui
* gdb
Expand All @@ -25,37 +26,83 @@ This is the main repo for STELLAR PREY™ game and can be used to build and pack
* libmysqlclient-dev
* libfreetype6-dev

## Setup
### Sources

- [CMake](http://www.cmake.org/) >= 3.16
- [GeoIP](https://github.com/maxmind/geoip-api-c)
- [SDL2](https://www.libsdl.org/download-2.0.php) - or simply install your OS package

## Building

### Initialize

To setup this repo, execute the following commands from the root of this repo in order:

```
```bash
./sp-tools.sh default_config
```
Set the values in the `config.sh` accordingly. Then continue with the following commands:
which will create a local file `config.sh` with your settings.

### Set up of `config.sh`

Set the values in the `config.sh` accordingly.

This section in `config.sh` turns on compiling different parts:
```make
BUILD_CLIENT="ON"
BUILD_SERVER="ON"
BUILD_AUTOUPDATE_SERVER="ON"
BUILD_MASTER_SERVER="ON"
BUILD_AUTH_SERVER="ON"
```

### Download submodules and paks

Then continue with the following commands:

```bash
./sp-tools.sh init
./sp-tools.sh install_default_paks
./sp-tools.sh configure_cmake both
./sp-tools.sh build both
```

To run an installed binary, use:
## Running

The built binaries can be run with the `run` subcommand:

```bash
./sp-tools.sh run client
```
./sp-tools.sh run

To see other options, run:

```bash
./sp-tools.sh help run
```

To debug an installed binary, use:
## Debugging

The built binaries can be debugged with the `debug` subcommand:

```bash
./sp-tools.sh debug client
```
./sp-tools.sh debug

To see other options, run:

```bash
./sp-tools.sh help debug
```

## More help

For more details on how to manage and use this repo, check:

```
./sp-tools.sh help
```

GrangerHub's STELLAR PREY™ game is originally based on darklegion development's Tremulous game. GrangerHub's STELLAR PREY™ game is built on TheDushan's OpenWolf Engine.
## Credits

GrangerHub's STELLAR PREY™ game is originally based on [Darklegion Development](https://github.com/darklegion)'s game [Tremulous](https://github.com/darklegion/tremulous). GrangerHub's STELLAR PREY™ game is built on [TheDushan](https://github.com/TheDushan)'s [OpenWolf Engine](https://github.com/TheDushan/OpenWolf-Engine).
5 changes: 3 additions & 2 deletions sp-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ Help_Subcommand() {
init)
echo "Initializes the $GAME_APP_NAME development environment."
echo "Use the init subcommand right after cloning this development environment repo."
echo "It will change the remote configurations of the submodules to original repos."

printf "\n"
echo "Usage:"
Expand Down Expand Up @@ -583,7 +584,7 @@ Build_game_logic() {
fi

cd $GAMELOGICPATH
make
make $MAKE_FLAGS
mkdir -p "$BASEPATH"
mkdir -p "$BASEPATH/$FS_GAME"
cp -a "$GAMELOGICPATH/main/." "$BASEPATH/$FS_GAME/"
Expand Down Expand Up @@ -663,7 +664,7 @@ Build_engine() {
fi

cd $ENGINEPATH
make
make $MAKE_FLAGS
mkdir -p "$BASEPATH"
mkdir -p "$BASEPATH/bin"
mkdir -p "$BINPATH"
Expand Down

0 comments on commit 260b6c4

Please sign in to comment.