Sanmill/Readme.md

104 lines
5.2 KiB
Markdown
Raw Normal View History

2020-12-22 01:23:40 +08:00
## Overview
2019-09-08 23:31:38 +08:00
[![YouTube](fastlane/metadata/android/en-US/images/featureGraphic.png)](https://www.youtube.com/channel/UCbGKXwhh1DkuINyZw05kyHw/featured)
<a href="https://github.com/calcitem/Sanmill/actions/workflows/flutter.yml?query=branch%3Amaster+is%3Asuccess+event%3Apush" target="_blank">
<img src="src/ui/flutter_app/assets/badges/get-it-on-github.png" alt="Get it on GitHub" height="80"/></a>
2021-05-13 22:00:54 +08:00
<a href="https://f-droid.org/packages/com.calcitem.sanmill/" target="_blank">
<img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="80"/></a>
<a href="https://play.google.com/store/apps/details?id=com.calcitem.sanmill" target="_blank">
<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="80"/></a>
2021-05-04 21:01:56 +08:00
<a href="https://cafebazaar.ir/app/com.calcitem.sanmill" target="_blank">
<img src="src/ui/flutter_app/assets/badges/get-it-on-cafebazaar.png" alt="Get it on CafeBazaar" height="54"/></a>
2020-12-22 01:23:40 +08:00
[![Build Status](https://ci.appveyor.com/api/projects/status/github/Calcitem/Sanmill?branch=master&svg=true)](https://ci.appveyor.com/project/Calcitem/Sanmill/branch/master)
2021-07-10 00:34:26 +08:00
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/dd51135302af45a989a382d3a3d9eadc)](https://www.codacy.com/gh/calcitem/Sanmill/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=calcitem/Sanmill&amp;utm_campaign=Badge_Grade)
2020-05-09 08:22:46 +08:00
2020-12-22 01:23:40 +08:00
[Sanmill](https://github.com/calcitem/Sanmill) is a free, powerful UCI-like N men's morris program with CUI, Flutter GUI and Qt GUI.
2019-09-08 23:31:38 +08:00
2020-12-22 01:45:43 +08:00
[**Nine men's morris**](https://en.wikipedia.org/wiki/Nine_men%27s_morris) is a [strategy](https://en.wikipedia.org/wiki/Abstract_strategy_game) [board game](https://en.wikipedia.org/wiki/Board_games) for two players dating at least to the [Roman Empire](https://en.wikipedia.org/wiki/Roman_Empire). The game is also known as **nine-man morris**, **mill**, **mills**, **the mill game**, **merels**, **merrills**, **merelles**, **marelles**, **morelles**, and **ninepenny marl** in English.
![image](https://github.com/calcitem/calcitem/raw/master/Sanmill/res/sanmill.gif)
2020-12-22 01:23:40 +08:00
## Files
2018-11-08 00:18:53 +08:00
2020-12-22 01:23:40 +08:00
This distribution of Sanmill consists of the following files:
2018-11-08 00:18:53 +08:00
2020-12-22 01:45:43 +08:00
* Readme.md, the file you are currently reading.
* Copying.txt, a text file containing the GNU General Public License version 3.
* src, a subdirectory containing the full source code, including a Makefile that can be used to compile Sanmill CUI on Unix-like systems.
* src/ui/flutter_app, a subdirectory containing a Flutter frontend.
2020-12-22 01:45:43 +08:00
* src/ui/qt, a subdirectory containing a Qt frontend.
2019-09-08 23:31:38 +08:00
2021-02-17 12:03:36 +08:00
## How to Build
### CUI
2018-11-08 00:18:53 +08:00
2020-12-22 01:45:43 +08:00
Sanmill CUI has support for 32 or 64-bit CPUs, certain hardware instructions, big-endian machines such as Power PC, and other platforms.
2018-11-08 00:18:53 +08:00
2020-12-22 01:45:43 +08:00
On Unix-like systems, it should be easy to compile Sanmill directly from the source code with the included Makefile in the folder `src`. In general it is recommended to run `make help` to see a list of make targets with corresponding descriptions.
2018-11-08 00:18:53 +08:00
2020-12-22 01:23:40 +08:00
```shell
2021-03-21 21:08:00 +08:00
cd src
make help
make build ARCH=x86-64-modern
2020-12-22 01:23:40 +08:00
```
2018-11-08 00:18:53 +08:00
2021-02-17 12:03:36 +08:00
When reporting an issue or a bug, please tell us which version and compiler you used to create your executable. These information can be found by typing the following commands in a console:
2018-11-08 00:18:53 +08:00
2020-12-22 01:23:40 +08:00
```shell
2021-03-21 21:08:00 +08:00
./sanmill compiler
2020-12-22 01:23:40 +08:00
```
2018-11-08 00:18:53 +08:00
2021-02-17 12:03:36 +08:00
### Qt Application
2021-03-21 21:08:00 +08:00
If you have started using Ubuntu or any Ubuntu-based Linux distribution, you must install Qt by running the following command as root:
```shell
sudo apt-get install qt5-default qtmultimedia5-dev qtcreator
```
2021-02-17 12:03:36 +08:00
Use Qt Creator to open `millgame.pro` , or use Visual Studio to open `millgame.sln` to build Qt Application.
### Flutter App
2021-03-16 00:17:14 +08:00
Run `./flutter-init.sh` , copy `src/ui/flutter_app/android/key.properties.example` to `src/ui/flutter_app/android/key.properties`, modify it, and then use Android Studio or Visual Studio Code to open `src/ui/flutter_app` to build Flutter App.
2021-02-17 12:03:36 +08:00
2020-12-22 01:23:40 +08:00
## Understanding the code base and participating in the project
2019-09-08 23:31:38 +08:00
2020-12-22 01:45:43 +08:00
Sanmill's improvement over the last couple of years has been a great community effort. There are a few ways to help contribute to its growth.
2018-11-08 00:18:53 +08:00
2020-12-22 01:23:40 +08:00
### Improving the code
2019-09-08 23:31:38 +08:00
2020-12-22 01:23:40 +08:00
If you want to help improve the code, there are several valuable resources:
2019-09-08 23:31:38 +08:00
2020-12-22 01:45:43 +08:00
* [In this wiki,](https://github.com/calcitem/Sanmill/wiki) many techniques used in Sanmill are explained with a lot of background information.
2020-12-22 01:23:40 +08:00
* The latest source can always be found on [GitHub](https://github.com/calcitem/Sanmill).
2020-12-22 01:45:43 +08:00
* Discussions about Sanmill take place in the [Discussions](https://github.com/calcitem/Sanmill/discussions).
2020-12-22 01:23:40 +08:00
## Terms of use
Sanmill is free, and distributed under the **GNU General Public License version 3**
(GPL v3). Essentially, this means you are free to do almost exactly
what you want with the program, including distributing it among your
friends, making it available for download from your website, selling
it (either by itself or as part of some bigger software package), or
using it as the starting point for a software project of your own.
The only real limitation is that whenever you distribute Sanmill in
some way, you must always include the full source code, or a pointer
to where the source code can be found. If you make any changes to the
source code, these changes must also be made available under the GPL.
For full details, read the copy of the GPL v3 found in the file named
2021-05-13 22:00:54 +08:00
*Copying.txt*.