Preparations
Devices
You need the following devices to follow these instructions:
- Windows computer — Windows 10 or later, 16 GB or 32 GB RAM, 512 GB or 1 TB SSD space.
-
Android device — Android 8.0 Oreo (API 26) or later (as defined by
SupportedOSPlatformVersioninGnollHackM.csproj), but preferably Android 12 or later, 3 GB or more RAM, 4 GB or more free storage space. Note: historically Android 5.0 was supported on older Xamarin versions.
Software Installation
- Install the latest Visual Studio version with up-to-date support for .NET MAUI. Make sure to also select the Mobile development with C++ workload in the Visual Studio Installer (which includes the C++ Android cross-compilation toolchain and Android NDK), as it is explicitly required by
gnollhackdroid.vcxproj. -
Install Tile Sets and FMOD Sound Banks (must be placed in
win\win32\tilesetandwin\win32\bank\Mobilebefore building the native solution). - Install Secrets File.
- Install Windows Subsystem for Linux.
- Before building the native solution, start the SSH service in WSL:
sudo service ssh start. The SSH connection to WSL must also be configured in Visual Studio under Tools → Options → Cross Platform → Connection Manager (Host Name:127.0.0.1, Port:22, User Name & Password: your WSL credentials). - Open the native solution
win\win32\vs\GnollHack.sln. - Select the Android+Windows platform configuration and rebuild the solution. This compiles the native C core game engine into the Android library (
libgnollhackdroid.sofor botharm64-v8aandx86_64) and automatically runsmakedefsdroidto translate the shared XAML UI files fromGnollHackXtoGnollHackMformats.
Android Device Preparation
- Enable Developer Mode and USB Debugging — Configure on-device developer options in Android
Starting Debugging or Creating Archive
- Open GnollHackM Solution in Visual Studio. This is different from the normal GnollHack solution.
- Select the right solution configuration in the menu bar:
- Debugging — Select Debug.
- Archiving — Select Release.
Debugging
- Attach your Android device to your computer using a USB cable.
- Allow USB debugging on the device if asked.
- Select your Android device from the Android local devices menu of the device dropdown list with a green start button in the menu bar.
- Rebuild Solution.
- Hit the green Start button to start debugging.
- If the deployment succeeds but debugging does not start, please just try again. It works at some point.
🛠️ CLI Build Command
dotnet build win/win32/xpl/GnollHackM/GnollHackM.csproj -c Debug -f net10.0-android