| 1 | # [fheroes2](README.md) build and contribution guide |
| 2 | |
| 3 | ## Building the fheroes2 Project |
| 4 | |
| 5 | Please follow the instructions below to be able to build the project from source: |
| 6 | |
| 7 | **Note:** You will need to clone the `fheroes2` project before following the instructions below. |
| 8 | |
| 9 | ### Windows |
| 10 | |
| 11 | * Go to the directory `script/windows` and run the file `install_packages.bat`. This script will install all the |
| 12 | required packages to build the project using Microsoft Visual Studio. |
| 13 | * If you have the original game, then copy the subdirectories `ANIM`, `DATA`, `MAPS` and `MUSIC` (some of them may |
| 14 | be missing depending on the version of the original game) to the project root directory. |
| 15 | * Alternatively, go to the directory `script/demo` and run the file `download_demo_version.bat`. |
| 16 | This script will download a demo version of the original game, which is the minimum required for development. |
| 17 | * Open the file `fheroes2-vs2019.vcxproj` (targeted for Visual Studio 2019) and build the project. |
| 18 | * Visual Studio will automatically copy game files in the root directory to the build directory. |
| 19 | |
| 20 | ### macOS and Linux |
| 21 | |
| 22 | * Depending on your OS, run the following scripts to install the dependencies required for the build: |
| 23 | * macOS: go to the directory `script/macos` and run `brew bundle` to install the required dependencies. |
| 24 | * Linux: go to the directory `script/linux` and run the file `install_sdl2_dev.sh`. |
| 25 | * If you have the original game, then copy the subdirectories `ANIM`, `DATA`, `MAPS` and `MUSIC` (some of them may |
| 26 | be missing depending on the version of the original game) to the project root directory. |
| 27 | * Alternatively, go to the directory `script/demo` and run the file `download_demo_version.sh`. |
| 28 | This script will download a demo version of the original game, which is the minimum required for development. |
| 29 | * Run the `make` command in the root directory of the project to build it. |
| 30 | |
| 31 | ### Android |
| 32 | |
| 33 | * Go to the directory `script/android` and run the file `install_packages.bat` if your development platform is Windows or |
| 34 | `install_packages.sh` if your development platform is macOS or Linux. This script will install all the required packages |
| 35 | to build the project using Android Studio. |
| 36 | * Launch Android Studio, open the project in the `android` directory and run the build. |
| 37 | |
| 38 | ### iOS |
| 39 | |
| 40 | * To build this build you need to have the necessary Data, Anim, Maps and Music folders for the engine present in the fheroes2 project's folder. |
| 41 | * Download and install Xcode on your macos device. Download the iOS SDK during installation. |
| 42 | * Go to the directory `script/ios` and run the file `install_packages.sh`. This script will install all the required packages to build the project using Xcode. |
| 43 | * Open `fheroes2.xcodeproj` in the "iOS" folder". |
| 44 | * In the Editor area select "fheroes2" under the "Targets" menu instead of "Projects". Open the "Signing & Capabilities" tab. Under "Signing", add your AppleID in |
| 45 | the "Team" field. |
| 46 | * Connect your iOS device to your mac device with the necessary cable. Select the device in the devices in Xcode's upper Toolbar. |
| 47 | * Click the play button or command + B to build. If asked if you want to download the Metal toolchain, agree to this as it is necessary for the app. After this |
| 48 | you will be prompted to enable developer mode on your iOS device. Follow the steps provided on your macOS and iOS devices to enable this. |
| 49 | * Once you have setup developer mode on your device and added your AppleID to Xcode, you can build and run the project. The first build will likely take a while. |
| 50 | Once fheroes2 starts on your iOS device a white screen will show for a minute or more. |
| 51 | |
| 52 | ### PlayStation Vita |
| 53 | |
| 54 | If you would like to build and run this project on PlayStation Vita please follow the instructions on [**this page**](README_PSV.md). |
| 55 | |
| 56 | ### Nintendo Switch |
| 57 | |
| 58 | If you would like to build and run this project on Nintendo Switch please follow the instructions on [**this page**](README_switch.md). |
| 59 | |
| 60 | ### Emscripten (Wasm) |
| 61 | |
| 62 | If you would like to run this project in a web browser please follow the instructions on [**this page**](README_emscripten.md). |
| 63 | |
| 64 | ### Build with CMake |
| 65 | |
| 66 | If you would like to build the project using CMake please follow the instructions on [**this page**](README_cmake.md). |
| 67 | |
| 68 | ## Building the front end website |
| 69 | |
| 70 | We host the website on Github pages, which is a highly customized version of the |
| 71 | Jekyll static site engine. The instructions for developing the website can be |
| 72 | found in the [**website local dev**](WEBSITE_LOCAL_DEV.md) guide. |
| 73 | |
| 74 | ## Contribution |
| 75 | |
| 76 | We welcome and appreciate any help, even if it is a tiny text or code change. Please read our |
| 77 | [**contribution guide**](../CONTRIBUTING.md) before starting work on a pull request. |
| 78 | Not sure what to start with? Feel free to refer to |
| 79 | [**good first issue**](https://github.com/ihhub/fheroes2/issues?q=is%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22) or |
| 80 | [**help wanted**](https://github.com/ihhub/fheroes2/issues?q=is%3Aissue%20is%3Aopen%20label%3A%22help%20wanted%22) tags. |