Skip to content

Class RuntimeFolder

Namespace: Apogee.Export
Assembly: Apogee.Export.dll

The published runtime that an export is made from: a folder with the NativeAOT Apogee.Runtime (./build.sh aot, or the CI artifact apogee-<rid>), its native libraries and its compiled shaders. The runtime is a native program of one platform, so the folder has to be published for the target; this class finds it and checks, by reading the executable's header.

public static class RuntimeFolder

Inheritance

object ← RuntimeFolder

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Fields

ProgramName

The name of the runtime's program, without .exe.

public const string ProgramName = "Apogee.Runtime"

Field Value

string

Methods

Detect(string)

Reads the operating system and processor an executable is for from its header (PE for Windows, ELF for Linux, thin Mach-O for macOS).

public static ExportTarget Detect(string executable)

Parameters

executable string

Returns

ExportTarget

Exceptions

ExportException

The file is none of these, is for a processor the engine does not support, or is a universal (fat) Mach-O.

ProgramPath(string, bool)

The runtime's program in folder: Apogee.Runtime.exe for Windows, Apogee.Runtime otherwise.

public static string ProgramPath(string folder, bool windows)

Parameters

folder string

windows bool

Returns

string

Resolve(string?, ExportTarget)

The runtime folder to export target from: given (--runtime); else the folder of the running program when that is the NativeAOT runtime itself; else the Bin/publish/runtime of the nearest folder above the running program or the current folder (a checkout of the engine). Checked to be published for target.

public static string Resolve(string? given, ExportTarget target)

Parameters

given string?

target ExportTarget

Returns

string

Exceptions

ExportException

There is no runtime folder, or it is for another platform.

Ships(string)

Whether a file of the runtime folder goes into an export. Left out: debug files (.pdb, .dbg, .dSYM), import libraries (.lib, .exp), the Slang compiler's libraries (a shipped game loads compiled shaders and never the compiler) and the shader sources (Shaders/.slang; Shaders/imported stays), and what only a development folder has: steam_appid.txt (the dev switch of Steam), game.xml and data/ (the export writes its own).

public static bool Ships(string relativePath)

Parameters

relativePath string

The path in the runtime folder, with / or \ as separators.

Returns

bool