| name | description |
|---|---|
| compile_custom_skiasharp | Step-by-step instructions for building a custom version of Mono SkiaSharp library. |
👉 This skill outlines the specialized procedure for building custom SkiaSharp native assets and managed libraries, which GnollHack uses for its cross-platform rendering engine.
🛠️ Prerequisites
- Visual Studio: Install Visual Studio with mobile development workloads and the ASP.NET and web development workload.
-
Tizen Extensions:
- Install Visual Studio Tools for Tizen via Extensions.
- Install the Tizen Package Manager and then the 7.0 Mobile package.
-
Repository: Clone
https://github.com/mono/SkiaSharp.gittoC:\repos\mono\SkiaSharp.- Run
git submodule update --init --recursiveto fetch dependencies.
- Run
-
Tools:
- Install .NET Cake:
dotnet tool install -g cake.tool - Install Python 3 via the Microsoft Store.
- Install 7-zip and LLVM using the provided PowerShell scripts in
SkiaSharp\scripts\. - Add 7-Zip and LLVM to your
PATHenvironment variable.
- Install .NET Cake:
-
Environment Variables:
- Set
LLVM_HOMEto your LLVM installation path. - Set
ANDROID_NDK_HOMEto your Android NDK path (e.g.,C:\Microsoft\AndroidNDK\android-ndk-r23c).
- Set
⚙️ Building Native Assets
Android
- Open PowerShell and navigate to
native\androidwithin the SkiaSharp repository. - Run
dotnet cake. - This process invokes the NDK tools to build
libSkiaSharp.soandlibHarfBuzz.sofor the supported Android ABIs. The output is placed inoutput\native\android\{abi}\.
📦 Building Managed Code (C#)
- Open PowerShell and navigate to the
sourcedirectory within the SkiaSharp repository. - Run
dotnet build. - This step compiles the managed C# DLLs which wrap the native SkiaSharp implementations. The resulting libraries will be located in the respective
bindirectories and can be integrated into GnollHack.