Skip to content

Engine → Engine

export.h

The export pipeline: the one owner of conjure_editor --export <dir> and the editor's project.export command. Synchronous, main thread, outside a frame. Steps, each logged; the first that fails ends the export with EXPORT_FAILED, the steps before it keep their output, and step 5 (a copy file by file) keeps the files it had copied:

Structs

File Description
export_report
export_settings

Classes

File Description
export_pipeline

Type Aliases

progress_fn

using progress_fn = std::function<void(std::string_view step, f32 fraction)>;

Called before each step with its name and the fraction of steps completed so far.

Functions

Public

dotnet_sdk_download_page

[[nodiscard]] CONJURE_API std::string dotnet_sdk_download_page();

Microsoft's official download page of the release that holds required_dotnet_sdk_version(), named by its major and minor version ("https://dotnet.microsoft.com/download/dotnet/10.0").

find_dotnet_sdk

[[nodiscard]] CONJURE_API core::result<std::string> find_dotnet_sdk(
    std::string_view dotnet,
    const std::filesystem::path &workingDirectory,
    f64 timeoutSeconds);

Runs <dotnet> --version in workingDirectory (dotnet reads the global.json in it or above it from there) and returns the version of the SDK it selects. DEPENDENCY_FAILURE (core) carrying missing_dotnet_sdk_message() when dotnet could not be started, did not answer within timeoutSeconds (0 waits without a limit), exited with a code other than 0 (no SDK installed, or none that such a global.json accepts) or printed a version that is_usable_dotnet_sdk_version() refuses. workingDirectory must exist; empty runs in the current directory. Blocks the calling thread while dotnet runs.

is_usable_dotnet_sdk_version

[[nodiscard]] CONJURE_API bool is_usable_dotnet_sdk_version(
    std::string_view version) noexcept;

True when version, the text dotnet --version prints ("10.0.103", "11.0.100-preview.1"), names required_dotnet_sdk_version() or a later SDK. Major, minor and patch compare as numbers, and a prerelease of the required version itself is older than it. Whitespace around the text is ignored; text that does not start with three dot-separated numbers, or that continues after them with anything but a '-' or '+' suffix, is false.

missing_dotnet_sdk_message

[[nodiscard]] CONJURE_API std::string missing_dotnet_sdk_message(
    std::string_view detail);

The message for a build that found no usable SDK: detail (what was found instead), the version required as global.json names it and the download page. It never asks for anything to be fetched automatically.

required_dotnet_sdk_version

[[nodiscard]] CONJURE_API std::string_view required_dotnet_sdk_version() noexcept;

The SDK version global.json at the root of the engine's source names ("10.0.100"), as it read when the engine was configured.