1# [LibreMines](https://github.com/Bollos00/LibreMines) 2 3![](./share/Screenshots/Screenshot2.png) 4 5## Introduction 6 7LibreMines is a [Free/Libre](https://en.wikipedia.org/wiki/Free_software) and [Open Source](https://en.wikipedia.org/wiki/Open-source_software) software Qt based Minesweeper clone available for GNU/Linux, FreeBSD and Windows systems. 8 9The game has dark and light themes, is widely customizable, has options to create customizable fields, allows the user to play with the keyboard, among other things. 10 11The source code is licensed under the [GNU General Public License at version 3](https://www.gnu.org/licenses/gpl-3.0.en.html) (or any later version), this includes all files inside the `src` directory. The artworks are licensed under the [Creative Commons Attribution-Share Alike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/), this includes all files on the `share` directory, except the files on `share/application_stylesheets` directory, which licenses are indicated with the `LICENSE` files inside subdirectories. 12 13## Installing from Package Manager 14 15### Arch User Repository 16 17[LibreMines is available on the Arch User Repository](https://aur.archlinux.org/packages/libremines/). With `yay` it can be installed with: 18 19```sh 20yay -S libremines 21``` 22### Flatpak 23 24There is a [package for LibreMines available on FlatHub](https://flathub.org/apps/details/io.github.Bollos00.LibreMines). The package can be installed, via command line, with: 25 26```sh 27flatpak install flathub io.github.Bollos00.LibreMines 28``` 29 30## Binary installation for Windows 31 32For windows systems, if you do not want to install LibreMines from the source code, you can just get one of the releases [here](https://github.com/Bollos00/LibreMines/releases). And follow those steps: 33 34* Download the file `libremines_vX.X.X_windows_release.zip` of the last version available; 35* Extract it on your preferred location; 36 37The executable `libremines.exe` will be inside the folder extracted. You can also add a Desktop shortcut or put it on the taskbar. 38 39## Installing from the source code 40 41### Installation Dependencies 42 43The following dependencies are required for building and running LibreMines: 44* [Qt5 Core](https://doc.qt.io/qt-5/qtcore-index.html) >= 5.12 45* [Qt5 Gui](https://doc.qt.io/qt-5/qtgui-index.html) >= 5.12 46* [Qt5 Widgets](https://doc.qt.io/qt-5/qtwidgets-index.html) >= 5.12 47* [Qt5 SVG](https://doc.qt.io/qt-5/qtsvg-index.html) >= 5.12 48* [CMake](https://cmake.org/) >= 3.1 49 50Note: Qt6 is also supported 51 52On Arch Linux and derivatives systems, the dependencies can be installed with `pacman`: 53```sh 54sudo pacman -S base-devel qt5-base qt5-svg cmake 55``` 56 57For Ubuntu, you can install the dependencies with the following command: 58```sh 59sudo apt-get install build-essential qt5-default cmake libqt5svg5-dev 60``` 61 62On Fedora, install the dependencies with: 63```sh 64sudo dnf install @development-tools 65sudo dnf install qt-devel qt5-qtbase-devel qt5-qtsvg-devel cmake 66``` 67 68On FreeBSD systems, install the packages [qt5-core](https://www.freshports.org/devel/qt5-core), [qt5-widgets](https://www.freshports.org/x11-toolkits/qt5-widgets/), [qt5-svg](https://www.freshports.org/graphics/qt5-svg/), [qt5-buildtools](https://www.freshports.org/devel/qt5-buildtools/), [qt5-qmake](https://www.freshports.org/devel/qt5-qmake/) [git](https://www.freshports.org/devel/git/) and [cmake](https://www.freshports.org/devel/cmake/). 69 70```sh 71su - 72pkg install qt5-core qt5-widgets qt5-svg git cmake qt5-buildtools qt5-qmake 73``` 74 75For others systems, check the [qt online installers](https://download.qt.io/official_releases/online_installers/) or your preferred package manager. 76 77### Building 78 79In order to build LibreMines from the source code, follow those steps: 80```sh 81git clone https://github.com/Bollos00/LibreMines.git 82cd LibreMines 83mkdir build && cd build 84cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. 85make 86``` 87 88You can also get a stable release from [here](https://github.com/Bollos00/LibreMines/releases). 89 90Note that the option `CMAKE_INSTALL_PREFIX` determines the target directory of the installation. If you want to install LibreMines using Qt6 libraries, additionally pass the argument `-DUSE_QT6="YES"` on the fourth step (the `cmake` part). Also, in order to install _alternative\_dark_ and _alternative\_light_ [minefield_themes](https://github.com/Bollos00/LibreMines/blob/master/share/minefield_themes/README.md), pass the argument `-DINSTALL_EXTRA_MINEFIELD_THEMES="YES"`. 91 92The executable `libremines` will be generated in the build directory, now it is possible to run it with: 93```sh 94./libremines 95``` 96 97### Installing on the system (Unix only) 98 99At least, if you want install LibreMines on your system, use the following command: 100```sh 101sudo make install 102``` 103 104For uninstall LibreMines, on the `build` directory, run: 105```sh 106sudo xargs rm < install_manifest.txt 107``` 108 109Or manually remove the files listed on `install_manifest.txt`. 110 111 112## How to play 113 114### First Steps 115 116When you initialize the application, you will face this screen: 117 118![](./share/Screenshots/Screenshot0.png) 119 120 121Here you can start to play one of the predefined game modes -- easy, medium and hard --, or you can customize the field the way that you want to play. Select one of those options and you will be ready to start. (Note the options on the upper left of the screen). 122 123You will start the timer of the new game when you release the first cell, you can play with your mouse or with your keyboard. 124 125### Playing with the mouse 126 127* **Left Click**: release the cell which the mouse is pointing on; 128* **Right Click**: flag/unflag the cell which the mouse is pointing on. 129 130### Playing with the keyboard 131 132For activate the keyboard controller mode, press one of the following keys: **A|S|D|W** 133 134* **Escape**: Exit keyboard controller mode; 135 136* **A**: Move Current Cell Left; 137 138* **S**: Move Current Cell Downwards; 139 140* **D**: Move Current Cell Right; 141 142* **W**: Move Current Cell Upwards; 143 144* **O**: Release Current Cell; 145 146* **P**: Flag/Unflag Current Cell; 147 148* **Space**: Locate current cell on middle of the scroll bar; 149 150* **CTRL + R**: Retart the game; 151 152* **CTRL + SHIFT + P**: Save minefield as image; 153 154If you do not feel comfortable with those keys, you can edit them going to the main menu, then Options > Preferences. 155 156Tip: hold the **CTRL** modifier while moving in order to move faster. 157 158## Contributing 159 160All kinds of contributions are welcome on this project. You can help: 161 162* Making artworks (SVG) for [minefield themes](https://github.com/Bollos00/LibreMines/blob/master/share/minefield_themes/README.md) and new faces reaction; 163* Documenting the source code and making tutorials of the game; 164* Sharing the game in order to attract more users; 165* Adapting the software for other Operational Systems; 166* Packaging the software for other distributions; 167* Increasing the playability and adding new features by making changes on the source code; 168* Reporting new [issues](https://github.com/Bollos00/LibreMines/issues) or solving existing ones; 169* Adding or improve the [translations](https://github.com/Bollos00/LibreMines/blob/master/etc/translations/README.md). 170 171# Third party Repositories used in this software 172* [BreezeStyleSheets](https://github.com/Alexhuszagh/BreezeStyleSheets) 173* [GTRONICK/QSS](https://github.com/GTRONICK/QSS) 174* [QDarkStyleSheet](https://github.com/ColinDuquesnoy/QDarkStyleSheet) 175* [TwEmoji](https://github.com/twitter/twemoji) 176* [OpenEmoji](https://github.com/hfg-gmuend/openmoji) 177* [socialify](https://github.com/wei/socialify) 178