Add lock around deleting arrows for commanding cards Add support for Qt6 w/ Backwards Qt5 Handle Qt5/6 cross compilation better Last cleanups caps matter Fix serv Prevent crash on 6.3.0 Linux & bump to 5.8 min Prevent out of bounds indexing Delete shutdown timer if it exists Fixup ticket comments, remove unneeded guards Try to add support for missing OSes Update .ci/release_template.md Update PR based on comments Update XML name after done and remove Hirsute Address local game crash Address comments from PR (again) Tests don't work on mac, will see if a problem on other OSes make soundengine more consistent across qt versions disable tests on distros that are covered by others Fix Oracle Crash due to bad memory access Update Oracle to use new Qt6 way of adding translations Add support for Qt5/Qt6 compiling of Cockatrice Remove unneeded calls to QtMath/cmath/math.h Update how we handle bitwise comparisons for enums with Tray Icon Change header guards to not duplicate function Leave comment & Fix Path for GHA Qt Update common/server.h Update cockatrice/src/window_main.cpp Rollback change on cmake module path for NSIS check docker image requirements add size limit to ccache put variables in quotes properly set build type on mac avoid names used in cmake fix up cmake module path cmake 3.10 does not recognize prepend Support Tests in FindQtRuntime set ccache size on non debug builds as well immediately return when removing non existing client handle incTxBytes with a signal instead don't set common link libraries in cockatrice/CMakeLists.txt add comments set macos qt version to 6 Try upgrading XCode versions to latest they can be supported on Ensure Qt gets linked add tmate so i can see what's going on Qt6 points two directories further down than Qt5 with regard to the top lib path, so we need to account for this Establish Plugins directory for Qt6 Establish TLS plugins for Qt6 services Minor change for release channel network manager Let windows build in parallel cores Wrong symbols Qt6 patch up for signal add missing qt6 package on deb builds boolean expressions are hard negative indexes should go to the end Intentionally fail cache move size checks to individual zone types Hardcode libs needed for building on Windows, as the regex was annoying Update wording use the --parallel option in all builds clean up the .ci scripts some more tweak fedora build add os parameter to compile.sh I don't really like this but it seems the easiest way I'd prefer if these types of quirks would live in the main configuration file, the yml fixup yml readd appended cache key to vcpkg step fix windows 32 quirk the json hash is already added to the key as well remove os parameter and clean up ci files set name_build.sh to output relative paths set backwards compatible version of xcode and qt on mac set QTDIR for mac builds on qt5 has no effect for qt6 export BUILD_DIR to name_build.sh merge mac build steps merge homebrew steps, set package suffix link qt5 remove brew link set qtdir to qt5 only compile.sh vars need to be empty not 0 fix sets manager search bar on qt 5.12/15 fix oracle subprocess errors being ignored on qt 5 clean up translation loading move en@source translation file so it will not get included in packages NOTE: this needs to be done at transifex as well! Use generator platform over osname Short circuit if not Win defined
166 lines
11 KiB
Markdown
166 lines
11 KiB
Markdown
<p align='center'><img src=https://cloud.githubusercontent.com/assets/9874850/7516775/b00b8e36-f4d1-11e4-8da4-3df294d01f86.png></p>
|
|
|
|
---
|
|
|
|
<p align='center'>
|
|
<a href="#cockatrice"><b>Cockatrice</b></a> <b>|</b>
|
|
<a href="#download-">Download</a> <b>|</b>
|
|
<a href="#get-involved--">Get Involved</a> <b>|</b>
|
|
<a href="#community-resources">Community</a> <b>|</b>
|
|
<a href="#translations-">Translations</a> <b>|</b>
|
|
<a href="#build--">Build</a> <b>|</b>
|
|
<a href="#run">Run</a> <b>|</b>
|
|
<a href="#license-">License</a>
|
|
</p>
|
|
|
|
---
|
|
|
|
<br><pre>
|
|
<b>To get started, ⇢ [view our webpage](https://cockatrice.github.io/)</b><br>
|
|
<b>To get support or suggest changes ⇢ [file an issue](https://github.com/Cockatrice/Cockatrice/issues) ([How?](https://github.com/Cockatrice/Cockatrice/wiki/How-to-Create-a-GitHub-Ticket-Regarding-Cockatrice))</b>
|
|
<b>To help with development, see how to [get involved](#get-involved-)</b>
|
|
</pre><br>
|
|
|
|
|
|
# Cockatrice
|
|
|
|
Cockatrice is an open-source, multiplatform program for playing tabletop card games over a network. The program's server design prevents users from manipulating the game for unfair advantage. The client also provides a single-player mode, which allows users to brew while offline. This project uses C++ and the Qt5 libraries.<br>
|
|
|
|
|
|
# Download [](https://tooomm.github.io/github-release-stats/?username=Cockatrice&repository=Cockatrice)
|
|
|
|
Downloads are available for full releases and the current beta version in development. There is no strict release schedule for either of them.
|
|
|
|
- Latest `stable` release: [](https://github.com/cockatrice/cockatrice/releases/latest) [](https://tooomm.github.io/github-release-stats/?username=Cockatrice&repository=Cockatrice)<br>
|
|
- Stable versions are checkpoints featuring major feature and UI enhancements.
|
|
- **Recommended for most users!**
|
|
|
|
- Latest `beta` release: [](https://github.com/cockatrice/cockatrice/releases) [](https://tooomm.github.io/github-release-stats/?username=Cockatrice&repository=Cockatrice)
|
|
- Beta versions include the most recently added features and bugfixes, but can be unstable.
|
|
- To be a Cockatrice Beta Tester, use this version. Find more information [here](https://github.com/Cockatrice/Cockatrice/wiki/Release-Channels)!
|
|
|
|
|
|
# Get Involved [](https://discord.gg/3Z9yzmA) [](https://gitter.im/Cockatrice/Cockatrice)
|
|
|
|
Join our [Discord community](https://discord.gg/3Z9yzmA) to connect with the project or fellow users of the app. The Cockatrice developers are also available on [Gitter](https://gitter.im/Cockatrice/Cockatrice). Come here to talk about the application, features, or just to hang out.<br>
|
|
For support regarding specific servers, please contact that server's admin or forum for support rather than asking here.<br>
|
|
|
|
To contribute code to the project, please review [the guidelines](https://github.com/Cockatrice/Cockatrice/blob/master/.github/CONTRIBUTING.md).
|
|
We maintain two tags for contributors to find issues to work on:
|
|
- [Good first issue](https://github.com/Cockatrice/Cockatrice/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22Good%20first%20issue%22%20): issues tagged in this way provide a simple way to get started. They don't require much experience to be worked on.
|
|
- [Help wanted](https://github.com/Cockatrice/Cockatrice/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22Help%20Wanted%22%20): This tag is used for issues that we are looking for a contributor to work on. Often this is for feature suggestions we are willing to accept, but don't have the time to work on ourselves.
|
|
|
|
For both tags, we're willing to provide help to contributors in showing them where and how they can make changes, as well as code review for changes they submit.
|
|
|
|
Read the long-term project **roadmap** to see planned edits and milestones [here](https://docs.google.com/document/d/1Ewe5uSaRE2nR2pNPMaGmP6gVZdqgFbBgwSscGqIr4W0/edit).
|
|
|
|
We try to be responsive to new issues. We'll provide advice on how best to implement a feature; alternately, we can show you where the codebase is doing something similar before you get too far along.
|
|
|
|
Cockatrice uses the [Google Developer Documentation Style Guide](https://developers.google.com/style/) to ensure consistent documentation. We encourage you to improve the documentation by suggesting edits based on this guide.
|
|
|
|
|
|
# Community Resources
|
|
|
|
- [Cockatrice Official Site](https://cockatrice.github.io)
|
|
- [Cockatrice Official Wiki](https://github.com/Cockatrice/Cockatrice/wiki)
|
|
- [Cockatrice Official Discord](https://discord.gg/3Z9yzmA)
|
|
- [reddit r/Cockatrice](https://reddit.com/r/cockatrice)
|
|
|
|
|
|
# Translations [](https://www.transifex.com/projects/p/cockatrice/)
|
|
|
|
Cockatrice uses Transifex for translations. You can help us bring Cockatrice and Oracle to your language or just edit single wordings right from within your browser by visiting our [Transifex project page](https://www.transifex.com/projects/p/cockatrice/).<br>
|
|
|
|
| Cockatrice | Oracle |
|
|
|:-:|:-:|
|
|
| [](https://www.transifex.com/projects/p/cockatrice/) | [](https://www.transifex.com/projects/p/cockatrice/) |
|
|
|
|
Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ) for more information about contributing!<br>
|
|
|
|
|
|
# Build [](https://github.com/Cockatrice/Cockatrice/actions/workflows/desktop-build.yml?query=branch%3Amaster+event%3Apush) [](https://github.com/Cockatrice/Cockatrice/actions/workflows/web-build.yml?query=branch%3Amaster+event%3Apush)
|
|
|
|
**Detailed compiling instructions can be found on the Cockatrice wiki under [Compiling Cockatrice](https://github.com/Cockatrice/Cockatrice/wiki/Compiling-Cockatrice)**
|
|
|
|
Dependencies: *(for minimum requirements search our [CMake file](https://github.com/Cockatrice/Cockatrice/blob/master/CMakeLists.txt))*
|
|
- [Qt](https://www.qt.io/developers/)
|
|
- [protobuf](https://github.com/protocolbuffers/protobuf)
|
|
- [CMake](https://www.cmake.org/)
|
|
|
|
Oracle can optionally use zlib and xz to load compressed files:
|
|
- [xz](https://tukaani.org/xz/)
|
|
- [zlib](https://www.zlib.net/)
|
|
|
|
To compile:
|
|
|
|
mkdir build
|
|
cd build
|
|
cmake ..
|
|
make
|
|
|
|
You can then run
|
|
|
|
make install
|
|
|
|
to get a cockatrice installation inside the `release` folder, or:
|
|
|
|
make package
|
|
|
|
to create a system-specific installation package.
|
|
|
|
The following flags can be passed to `cmake`:
|
|
|
|
- `-DWITH_SERVER=1` Whether to build the server (default 0 = no).
|
|
- `-DWITH_CLIENT=0` Whether to build the client (default 1 = yes).
|
|
- `-DWITH_ORACLE=0` Whether to build oracle (default 1 = yes).
|
|
- `-DCMAKE_BUILD_TYPE=Debug` Compile in debug mode. Enables extra logging output, debug symbols, and much more verbose compiler warnings (default `Release`).
|
|
- `-DWARNING_AS_ERROR=0` Whether to treat compilation warnings as errors in debug mode (default 1 = yes).
|
|
- `-DUPDATE_TRANSLATIONS=1` Configure `make` to update the translation .ts files for new strings in the source code. Note: Running `make clean` will remove the .ts files (default 0 = no).
|
|
- `-DTEST=1` Enable regression tests (default 0 = no). Note: needs googletest, will be downloaded on the fly if unavailable. To run tests: ```make test```.
|
|
- `-DFORCE_USE_QT5=1` Skip looking for Qt6 before trying to find Qt5
|
|
|
|
|
|
# Run
|
|
|
|
`Cockatrice` is the game client<br>
|
|
`Oracle` fetches card data<br>
|
|
`Servatrice` is the server<br>
|
|
|
|
**Servatrice Docker container**
|
|
|
|
You can run an instance of Servatrice (the Cockatrice server) using [Docker](https://www.docker.com/what-docker) and the Cockatrice Dockerfile.<br>
|
|
|
|
First, create an image from the Dockerfile<br>
|
|
`cd /path/to/Cockatrice-Repo/`
|
|
`docker build -t servatrice .`<br>
|
|
And then run it<br>
|
|
`docker run -i -p 4747:4747/tcp -t servatrice:latest`<br>
|
|
|
|
>Note: Running this command exposes the TCP port 4747 of the docker container<br>
|
|
to permit connections to the server.
|
|
|
|
Find more information on how to use Servatrice with Docker in our [wiki](https://github.com/Cockatrice/Cockatrice/wiki/Setting-up-Servatrice#using-docker).
|
|
|
|
**Docker compose**
|
|
|
|
There is also a docker-compose file available which will configure and run both a MySQL server and Servatrice. The docker-compose setup scripts can be found in the `servatrice/docker` folder and vary only slightly from the default sql and server .ini files. The setup scripts can either be modified in place, or docker-compose can mount alternative files into the images, as you prefer.
|
|
|
|
To run Servatrice via docker-compose, first install docker-compose following the [install instructions](https://docs.docker.com/compose/install/). Once installed, run the following from the root of the repository:
|
|
```bash
|
|
docker-compose build # Build the Servatrice image using the same Dockerfile as above.
|
|
docker-compose up # Setup and run both the MySQL server and Servatrice.
|
|
```
|
|
|
|
>Note: Similar to the above Docker setup, this will expose TCP ports 4747 and 4748.
|
|
|
|
>Note: The first time running the docker-compose setup, the MySQL server will take a little time to run the initial setup scripts. Due to this, the Servatrice instance may fail the first few attempts to connect to the database. Servatrice is set to `restart: always` in the docker-compose.yml, which will allow it to continue attempting to start up. Once the MySQL scripts have completed, Servatrice should then connect automatically on the next attempt.
|
|
|
|
**Docker compose in Windows**
|
|
A out of box working docker-compose file has been added to help setup in Windows.
|
|
|
|
Docker in Windows requires additional steps in form of using Docker Desktop to allow resource sharing from the drive the volumes are mapped from, as well as potential workarounds needed to get file sharing working in Windows. This [StackOverflow discussion sheds some light on it](https://stackoverflow.com/questions/42203488/settings-to-windows-firewall-to-allow-docker-for-windows-to-share-drive)
|
|
|
|
|
|
# License [](https://github.com/Cockatrice/Cockatrice/blob/master/LICENSE)
|
|
|
|
Cockatrice is free software, licensed under the [GPLv2](https://github.com/Cockatrice/Cockatrice/blob/master/LICENSE).
|