@@ -2,6 +2,7 @@ const std = @import("std");
22const builtin = @import ("builtin" );
33
44pub const generate_ide = @import ("src/tools/generate_ide.zig" );
5+ const zbgfx = @import ("zbgfx" );
56
67const min_zig_version = std .SemanticVersion .parse ("0.15.1" ) catch @panic ("Where is .zigversion?" );
78const cetech1_version = std .SemanticVersion .parse (@embedFile (".version" )) catch @panic ("Where is .version?" );
@@ -131,6 +132,8 @@ pub fn createKernelExe(
131132 ignored_modules : ? []const []const u8 ,
132133 ignored_modules_prefix : ? []const []const u8 ,
133134) ! * std.Build.Step.Compile {
135+ const use_lld = ! target .result .os .tag .isDarwin ();
136+
134137 const exe = b .addExecutable (.{
135138 .name = bin_name ,
136139 .version = versionn ,
@@ -140,6 +143,7 @@ pub fn createKernelExe(
140143 .optimize = optimize ,
141144 }),
142145 .use_llvm = true ,
146+ .use_lld = use_lld ,
143147 });
144148 exe .root_module .link_libc = true ;
145149 exe .root_module .addImport ("kernel" , cetech1_kernel );
@@ -172,7 +176,7 @@ pub fn createStudioExe(
172176 return try createKernelExe (
173177 b ,
174178 base_bin_name ++ "_studio" ,
175- "studio" ,
179+ "run- studio" ,
176180 "Run studio" ,
177181 root_source ,
178182 cetech1_kernel ,
@@ -246,7 +250,7 @@ pub fn build(b: *std.Build) !void {
246250 .nfd_portal = b .option (bool , "nfd_portal" , "build NFD with xdg-desktop-portal instead of GTK. ( Linux, nice for steamdeck;) )" ) orelse true ,
247251
248252 // ZGUI
249- .with_freetype = b .option (bool , "with_freetype" , "build coreui with freetype support" ) orelse false ,
253+ .with_freetype = b .option (bool , "with_freetype" , "build coreui with freetype support" ) orelse true ,
250254
251255 // BGFX
252256 .with_shaderc = b .option (bool , "with_shaderc" , "build with shaderc support" ) orelse true ,
@@ -264,6 +268,8 @@ pub fn build(b: *std.Build) !void {
264268 }
265269 const options_module = options_step .createModule ();
266270
271+ const use_lld = ! target .result .os .tag .isDarwin ();
272+
267273 //
268274 // Extrnals
269275 //
@@ -343,7 +349,8 @@ pub fn build(b: *std.Build) !void {
343349 );
344350
345351 // ZBGFX
346- const zbgfx = b .dependency (
352+ // TODO: Remove
353+ const zbgfx_dep = b .dependency (
347354 "zbgfx" ,
348355 .{
349356 .target = target ,
@@ -384,7 +391,6 @@ pub fn build(b: *std.Build) !void {
384391 .target = b .graph .host ,
385392 }),
386393 });
387- b .installArtifact (generate_ide_tool );
388394
389395 // Modules
390396 const ModulesSet = std .StringArrayHashMapUnmanaged (void );
@@ -418,6 +424,7 @@ pub fn build(b: *std.Build) !void {
418424 // TODO: Problem with debugdraw in dll on windows.
419425 if (target .result .os .tag == .windows ) {
420426 try static_modules .put (b .allocator , "gpu_bgfx" , {});
427+ try static_modules .put (b .allocator , "physics_jolt" , {});
421428 }
422429
423430 // Dynamic modules.
@@ -475,7 +482,6 @@ pub fn build(b: *std.Build) !void {
475482 const gen_ide_step = b .step ("gen-ide" , "init/update IDE configs" );
476483 {
477484 const ide = b .option (generate_ide .EditorType , "ide" , "IDE for gen-ide command" ) orelse .VSCode ;
478- const no_zls = b .option (bool , "no_zls" , "Dont write zls path with gen-ide command" ) orelse false ;
479485
480486 const gen_ide = b .addRunArtifact (generate_ide_tool );
481487
@@ -493,10 +499,6 @@ pub fn build(b: *std.Build) !void {
493499 gen_ide .addArg ("--config" );
494500 gen_ide .addDirectoryArg (b .path (".ide.zon" ));
495501
496- if (no_zls ) {
497- gen_ide .addArg ("--no-zls" );
498- }
499-
500502 gen_ide_step .dependOn (& gen_ide .step );
501503 }
502504
@@ -520,7 +522,8 @@ pub fn build(b: *std.Build) !void {
520522 });
521523
522524 if (options .with_shaderc ) {
523- b .installArtifact (zbgfx .artifact ("shaderc" ));
525+ const shaderc_install = try zbgfx .build_step .installShaderc (b , zbgfx_dep );
526+ b .getInstallStep ().dependOn (shaderc_install );
524527 }
525528
526529 //
@@ -570,14 +573,14 @@ pub fn build(b: *std.Build) !void {
570573 .name = "gamecontrollerdb" ,
571574 .module = b .createModule (.{ .root_source_file = b .path ("externals/shared/lib/SDL_GameControllerDB/gamecontrollerdb.txt" ) }),
572575 },
573- .{
574- .name = "fa-solid-900" ,
575- .module = b .createModule (.{ .root_source_file = b .path ("externals/shared/fonts/fa-solid-900.ttf" ) }),
576- },
577576 .{
578577 .name = "Roboto-Medium" ,
579578 .module = b .createModule (.{ .root_source_file = b .path ("externals/shared/fonts/Roboto-Medium.ttf" ) }),
580579 },
580+ .{
581+ .name = "lucide" ,
582+ .module = b .createModule (.{ .root_source_file = b .path ("externals/shared/fonts/lucide.ttf" ) }),
583+ },
581584 };
582585
583586 //
@@ -655,6 +658,7 @@ pub fn build(b: *std.Build) !void {
655658 .imports = & imports ,
656659 }),
657660 .use_llvm = true ,
661+ .use_lld = use_lld ,
658662 });
659663 useSystemSDK (b , target , tests );
660664 b .installArtifact (tests );
0 commit comments