Apply suggestions from code review [2022-05-11]

Co-authored-by: yvt <i@yvt.jp>
This commit is contained in:
ButterFinger 2022-05-25 15:54:23 +02:00 committed by GitHub
parent 730d694ada
commit 920e691188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,9 @@ flatpak install flathub jp.yvt.OpenSpades
Once installed, you'll be able to launch OpenSpades from inside the desktop menu or from your terminal with `flatpak run jp.yvt.OpenSpades`
#### Building from source
### On Linux (from source)
#### Building
1. Install dependencies:
*On Debian-derived distributions*:
@ -59,7 +61,7 @@ Once installed, you'll be able to launch OpenSpades from inside the desktop menu
*On other distributions*:
Install corresponding packages from your repository (or compile from source).
OpenSpades uses a C++ compiler, which is listed in dependencies above if you don't have your own.
Building OpenSpades requires a C++ compiler, which is included in the dependencies above in case you don't have one installed yet.
2. Clone OpenSpades repository:
@ -83,7 +85,10 @@ cd $REPO_DIRECTORY/openspades.mk; bin/openspades
```
To install the game to your system (recommended), take the following steps:
1. `sudo make install`
1. Execute the following command:
```
sudo make install
```
**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, or else it might load old resources.
2. Launch the game by typing `openspades` into command line, or search for it from start menu.
@ -92,15 +97,18 @@ Alternatively, to install the game to a different directory, take the following
1. Copy the Resources directory into bin (or else the game won't launch):
```cp -r ./Resources ./bin/```
```
cp -r ./Resources ./bin/
```
**note**: If you plan on distributing it, remember to remove CMake files and folders from Resources.
2. Move the "/openspades.mk" folder somewhere else, for example `/home/user/Games`, or `/opt/games` and rename it to "/OpenSpades".
3. The game's launcher is located at `bin/openspades`. You can create a shortcut for it on the desktop or a `.desktop` file placed in `/usr/share/applications/` for it to appear in Start Menu. Make sure to set the `bin` directory as the shortcut's working directory, or else you will get an error about missing resources.
**note**: If you choose a directory outside of your `/home/user`, for example `/opt/games`, remember to *chmod* the game launcher's permissions to 755.
After successful installation, optionally you can remove the source code and build outputs to save disk space (~100MB)
After successful installation, optionally you can remove the source code and build outputs to save disk space (~100MB).
### On Windows (with Visual Studio)
1. Get the required software if you haven't already: