mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
output runtime at startup
This commit is contained in:
2
Makefile
2
Makefile
@ -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
|
||||||
|
|
||||||
|
@ -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.
|
||||||
|
@ -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()});
|
||||||
|
Reference in New Issue
Block a user