You can get almost everything needed to build the emulator by using the [Play! Build](https://github.com/jpd002/Play-Build) project. You can also checkout every repository individually if you wish to do so, but make sure your working copies share the same parent folder.
if you dont have cmake or openal lib installed, you'll also require Qt (preferably version 5.6) you can install it using your OS packaging tool, e.g ubuntu `apt install cmake libalut-dev`
on UNIX systems there is 3 ways to setup a build, using qt creator, makefile or Ninja
- QT Creator
- Open Project -> `Play/build_cmake/CMakeLists.txt`
Note `CMAKE_PREFIX_PATH` refers to the qt directory containing bin/libs folder, the above example uses a backport repo to install qt5.6 on trusty, if you install qt from qt offical website, your `CMAKE_PREFIX_PATH` might look like this `~/Qt5.6.0/5.6/gcc_64/`
- add a newline `sdk.dir=/Users/USER_NAME/Library/Android/sdk` replacing `USER_NAME` with your macOS username
- add a newline `ndk.dir=/Users/USER_NAME/Library/Android/sdk/ndk-bundle` replacing `USER_NAME` with your macOS username
- UNIX:
- add a newline `sdk.dir=~/Android/Sdk`
- add a newline `ndk.dir=~/Android/Sdk/ndk-bundle`
- Windows:
- add a newline `sdk.dir=C:\Users\USER_NAME\AppData\Local\Android\sdk`
- add a newline `ndk.dir=C:\Users\USER_NAME\AppData\Local\Android\sdk\ndk-bundle`
- Please Leave an empty new line at the end of the file
Note, these examples are only valid if you installed NDK through Android Studio's SDK manager.
Otherwise you must specify the correct location to Android NDK.
Once this is done, you can start the build.
```
cd Play/build_android
sh gradlew assembleDebug
```
##### about Release/Signed builds. #####
Building through Android Studio, you have the option to “Generate Signed APK”.
Building through Gradle, you must create a text file `Play/build_android/keystore.properties` and add the following properties to it, `storeFile`,`storePassword`,`keyAlias`,`keyPassword`.
E.g of `keystore.properties`
```
storeFile=/location/to/my/key.jks
storePassword=mysuperhardpassword
keyAlias=myalias
keyPassword=myevenharderpassword
```
Please Leave an empty new line at the end of the file