2016-11-23 18:30:28 +01:00
# OpenSpades [![Build status](https://travis-ci.org/yvt/openspades.png?branch=master)](https://travis-ci.org/yvt/openspades)
2014-03-11 16:56:20 +09:00
2016-11-22 17:20:27 -02:00
![OpenSpades banner ](https://dl.dropboxusercontent.com/u/37804131/github/OpenSpadesBanner.jpg )
2016-11-06 20:59:15 +09:00
2016-11-22 17:20:27 -02:00
[Official website ](http://openspades.yvt.jp ) — [Download ](https://github.com/yvt/openspades/releases ) — [Community ](http://buildandshoot.com ) — [Trello board ](https://trello.com/b/3rfpvODj/openspades-roadmap )
2016-11-06 21:15:53 +09:00
2016-11-22 17:20:27 -02:00
## What is it?
2013-09-03 22:21:12 -04:00
OpenSpades is a compatible client of Ace of Spades 0.75.
2013-08-18 16:55:06 +09:00
* Can connect to a vanilla/pyspades/pysnip server.
2016-11-06 20:59:15 +09:00
* Uses OpenGL/AL for better experience.
2013-08-18 16:55:06 +09:00
* Open source, and cross platform.
2016-11-22 17:20:27 -02:00
## How to Build/Install?
2016-11-22 17:31:07 -02:00
**Before you start:** In case you're having issues to build OpenSpades, it may be because this README file is outdated, if so:
1. See the [Building Guide ](https://github.com/yvt/openspades/wiki/Building ), which may be up to date
2. Or [open an issue ](https://github.com/yvt/openspades/issues ) if the problem persists
2013-08-18 16:55:06 +09:00
### On Linux
2016-11-19 23:35:06 +09:00
GCC 4.9 / Clang 3.2 or later is recommended because OpenSpades relies on C++11 features heavily.
2014-03-22 22:43:10 +09:00
2014-03-03 19:27:28 +10:00
1. Install dependencies:
*On Debian-derived distributions* :
2016-11-06 20:59:15 +09:00
```
sudo apt-get install pkg-config libglew-dev libcurl3-openssl-dev libsdl2-dev libsdl2-image-dev libalut-dev
```
(because of a bug in some distributions, you might also
have to install more packages by `sudo apt-get install libjpeg-dev libxinerama-dev libxft-dev` )
2014-03-03 19:27:28 +10:00
*On other distributions* :
Install corresponding packages from your repository (or compile from source).
2014-04-27 21:25:13 +11:00
2. Download & install `SDL-2.0.2`
2014-04-13 19:51:12 +11:00
```bash
2014-04-27 21:25:13 +11:00
wget http://www.libsdl.org/release/SDL2-2.0.2.tar.gz
tar -zxvf SDL2-2.0.2.tar.gz
cd SDL2-2.0.2/
2014-03-03 19:27:28 +10:00
./configure & & make & & sudo make install
2014-03-18 01:37:39 +10:00
cd ../
2014-03-03 19:27:28 +10:00
```
Additional dependencies may be required.
2014-04-27 21:25:13 +11:00
3. Download & install `SDL2_image-2.0.0`
2014-04-13 19:51:12 +11:00
```bash
2014-03-03 19:27:28 +10:00
wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.0.tar.gz
2014-07-17 13:22:56 +09:00
tar -zxvf SDL2_image-2.0.0.tar.gz
2014-04-27 21:48:38 +11:00
cd SDL2_image-2.0.0/
2015-09-13 23:39:00 +02:00
./configure --disable-png-shared & & make & & sudo make install
2014-03-18 01:37:39 +10:00
cd ../
2014-03-03 19:27:28 +10:00
```
Additional dependencies may be required.
2014-03-07 00:58:43 +09:00
4. Clone OpenSpades repository:
2016-11-06 20:59:15 +09:00
```bash
git clone https://github.com/yvt/openspades.git & & cd openspades
```
2014-03-07 00:58:43 +09:00
5. Create directory `openspades.mk` in cloned/downloaded openspades repo and compile:
2014-03-03 19:27:28 +10:00
2014-05-31 10:04:51 +09:00
```bash
mkdir openspades.mk
cd openspades.mk
2014-05-31 21:43:18 +11:00
cmake .. -DCMAKE_BUILD_TYPE=Release & & make
2014-05-31 10:04:51 +09:00
```
2014-03-03 19:27:28 +10:00
2014-03-07 00:58:43 +09:00
6. Install openspades:
2014-03-03 19:27:28 +10:00
2016-11-06 20:59:15 +09:00
`sudo make install`
2014-03-03 19:27:28 +10:00
2016-11-12 18:24:35 +09:00
**note** : If you have a previous installation of OpenSpades, you have to uninstall it manually by `sudo rm -rf /usr/local/share/games/openspades` before installing a new one.
2014-03-03 19:27:28 +10:00
2014-03-07 00:58:43 +09:00
7. Get shared files:
2016-11-22 17:20:27 -02:00
* If you're compiling certain release (0.0.10 for example):
2014-03-03 19:27:28 +10:00
Download windows binary of OpenSpades from
https://sites.google.com/a/yvt.jp/openspades/downloads, extract it, and copy the .pak files
2014-04-11 17:23:11 +11:00
inside Resources directory into `/usr/local/share/games/openspades/Resources` or
2014-04-13 19:51:12 +11:00
`$XDG_DATA_HOME/openspades/Resources` . If there were some files in these directories, you probably
should remove them.
**note** : use `~/.openspades/Resources` in old releases.
2016-11-22 19:33:37 -02:00
* If you're compiling straight from source (git clone):
2014-04-13 20:07:12 +11:00
2014-04-13 19:51:12 +11:00
All needed resources would be downloaded while `make install` , so no need to worry.
2014-03-03 19:27:28 +10:00
2016-11-22 19:33:37 -02:00
If you didn't launch `make install` , you can install resources manually.
2014-03-03 19:27:28 +10:00
See `Resources/PakLocation.txt` to find out where get latest shared files.
2014-04-11 17:23:11 +11:00
Download, extract, and place them into `/usr/local/share/games/openspades/Resources` or
`$XDG_DATA_HOME/openspades/Resources`
2014-03-03 19:27:28 +10:00
2014-03-07 00:58:43 +09:00
8. Launch:
2014-03-03 19:27:28 +10:00
`openspades` or `cd $REPO_DIRECTORY; ./openspades.mk/bin/OpenSpades` and enjoy
2013-08-18 16:55:06 +09:00
2013-11-01 21:22:54 +01:00
2016-11-15 17:20:14 +02:00
### On Windows (with Visual Studio)
2016-11-22 19:08:21 -02:00
1. Get CMake, Visual Studio 2013 (Express) or Visual Studio 2015 (experimental support, should work fine), and the OpenSpades source.
2013-11-01 21:22:54 +01:00
Official: https://github.com/yvt/openspades
Unofficial: https://github.com/learn-more/openspades
2016-11-06 20:59:15 +09:00
2. Extract or checkout the source (all examples will assume `E:/Projects/openspades` , update paths in the examples to reflect yours)
3. Get (pre-compiled) copies of fltk, glew, curl, sdl2 and zlib, and place them in `E:/Projects/openspades/Sources/Externals` .
2016-11-22 19:38:47 -02:00
See the file `E:/Projects/openspades/Sources/Externals/readme.txt` for details (and a pre-compiled set of libraries, make sure to pick the right one for your version of VS).
2013-11-01 21:22:54 +01:00
4. Run CMake, using the paths:
2016-11-06 20:59:15 +09:00
Source: `E:/Projects/openspades` ,
Binaries: `E:/Projects/openspades/OpenSpades.msvc`
2016-11-19 06:02:18 +09:00
Generator: Visual Studio 12 (2013) or 14 (2015) (not Win64!)
2016-11-06 20:59:15 +09:00
2016-11-22 19:28:42 -02:00
For your convenience, create the directory: `E:/Projects/openspades/OpenSpades.msvc/os.Resources` , and extract the [Non-free pak ](https://dl.dropboxusercontent.com/u/37804131/openspades/DevPaks29.zip ) (`pak000-Nonfree.pak` ) into it. Also, please note you can't distribute this pak separately from OpenSpades releases or binaries, as noted on `Resources/PakLocation.txt`
2016-11-22 17:20:27 -02:00
2016-11-22 19:28:42 -02:00
set `OPENSPADES_RESDIR` to point to `os.Resources` . (Run CMake again, now when running debug builds openspades will also read resources from this directory)
2016-11-22 17:26:53 -02:00
2016-11-22 19:28:42 -02:00
**Note:** `OPENSPADES_RESDIR` must be set using slashes instead of backslashes (`E:/Projects/openspades/os.Resources` instead of `E:\Projects\openspades\os.Resources` ). Also, no slashes at end.
5. Open `E:/Projects/openspades/OpenSpades.msvc/OpenSpades.sln` in Visual Studio.
2016-11-18 04:44:57 -08:00
6. Build the solution.
2016-11-22 19:28:42 -02:00
7. Copy all `.dll` files from `Source/Externals/lib` to the build output directory.
2016-11-18 04:44:57 -08:00
8. Download [Windows release of OpenSpades ](https://github.com/yvt/openspades/releases ), extract it, and copy `openal32.dll` and `YSRSpades.dll` to the build output directory.
2013-11-01 21:22:54 +01:00
2016-11-22 19:33:37 -02:00
**Note:** In case OpenSpades still fails to find any dll, copy all the remaing dlls which aren't there yet, it should solve the problem.
2016-11-22 19:28:42 -02:00
2016-11-22 19:33:37 -02:00
9. In case it's a debug build, copy `E:/Projects/openspades/Resources` folder to your build directory, which is probably `E:/Projects/openspades/openspades.msvc/bin/Debug`
2016-11-22 19:28:42 -02:00
In case you haven't set OPENSPADES_RESDIR and extracted the [Non-free pak ](https://dl.dropboxusercontent.com/u/37804131/openspades/DevPaks29.zip ) into it, extract it and merge it inside the `Resources` folder you just copied.
2014-04-07 01:04:56 +09:00
### On Mac OS X (with Xcode)
1. Get the latest version of Xcode and OpenSpades source.
2. Download and install [SDL2 development libraries for OS X ](http://www.libsdl.org/download-2.0.php ) to `/Library/Frameworks` .
3. Download and install [SDL2_image development libraries for OS X ](https://www.libsdl.org/projects/SDL_image/ ) to `/Library/Frameworks` .
4. Download [OS X release of OpenSpades ](https://github.com/yvt/openspades/releases ), show the package contents, and copy `libysrspades.dylib` to the root of OpenSpades source tree.
5. Open `OpenSpades.xcodeproj` and build.
2016-11-15 17:20:14 +02:00
## Troubleshooting
For troubleshooting and common problems see [TROUBLESHOOTING ](TROUBLESHOOTING.md ).
2016-11-22 17:20:27 -02:00
## Licensing
2014-02-11 00:08:33 +09:00
Please see the file named LICENSE.
2013-08-18 16:58:10 +09:00