output runtime at startup

This commit is contained in:
Mitchell Hashimoto
2023-02-25 15:09:26 -08:00
parent f217cd24b9
commit d1a1ba4cb6
3 changed files with 7 additions and 2 deletions

View File

@ -16,7 +16,7 @@ dev/install:
# maintain it at the moment). # maintain it at the moment).
deb: deb:
rm -rf zig-out/ rm -rf zig-out/
zig build -Doptimize=ReleaseFast zig build -Doptimize=ReleaseFast -Dapp-runtime=gtk
fpm -C zig-out/ -s dir -t deb -n ghostty --prefix /usr ./ fpm -C zig-out/ -s dir -t deb -n ghostty --prefix /usr ./
.PHONY: deb .PHONY: deb

View File

@ -6,13 +6,17 @@ const std = @import("std");
const builtin = @import("builtin"); const builtin = @import("builtin");
const options = @import("build_options"); const options = @import("build_options");
const assert = std.debug.assert; const assert = std.debug.assert;
const apprt = @import("apprt.zig");
/// The artifact we're producing. This can be used to determine if we're /// The artifact we're producing. This can be used to determine if we're
/// building a standalone exe, an embedded lib, etc. /// building a standalone exe, an embedded lib, etc.
pub const artifact = Artifact.detect(); pub const artifact = Artifact.detect();
/// The runtime to back exe artifacts with. /// The runtime to back exe artifacts with.
pub const app_runtime = options.app_runtime; pub const app_runtime = std.meta.stringToEnum(
apprt.Runtime,
std.meta.tagName(options.app_runtime),
).?;
/// Whether our devmode UI is enabled or not. This requires imgui to be /// Whether our devmode UI is enabled or not. This requires imgui to be
/// compiled. /// compiled.

View File

@ -170,6 +170,7 @@ pub const GlobalState = struct {
pub fn init(self: *GlobalState) void { pub fn init(self: *GlobalState) void {
// Output some debug information right away // Output some debug information right away
std.log.info("runtime={}", .{build_config.app_runtime});
std.log.info("dependency harfbuzz={s}", .{harfbuzz.versionString()}); std.log.info("dependency harfbuzz={s}", .{harfbuzz.versionString()});
if (options.fontconfig) { if (options.fontconfig) {
std.log.info("dependency fontconfig={d}", .{fontconfig.version()}); std.log.info("dependency fontconfig={d}", .{fontconfig.version()});