update dependencies

This commit is contained in:
Rokas Puzonas 2026-09-22 02:01:14 +03:00
parent 1165c53683
commit 7632329c92
2 changed files with 14 additions and 15 deletions

View File

@ -1,10 +1,13 @@
const std = @import("std");
const Build = std.Build;
const sokol = @import("sokol");
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const name = "sokol_template_v2";
const assets_dir = "assets";
const asset_files = [_][]const u8{
"sokoban/sokoban_tilesheet.png",
@ -41,6 +44,7 @@ pub fn build(b: *std.Build) !void {
exe_mod.addImport("stb_image", dep_stb.module("stb_image"));
exe_mod.addImport("stb_truetype", dep_stb.module("stb_truetype"));
var dep_sokol: *Build.Dependency = undefined;
const platform_mod = b.createModule(.{
.root_source_file = b.path("src/platform/root.zig")
});
@ -58,7 +62,7 @@ pub fn build(b: *std.Build) !void {
});
platform_mod.addImport("math", math_mod);
const dep_sokol = b.dependency("sokol", .{
dep_sokol = b.dependency("sokol", .{
.target = target,
.optimize = optimize,
.with_sokol_imgui = has_imgui
@ -114,14 +118,10 @@ pub fn build(b: *std.Build) !void {
platform_mod.addImport("tracy", dep_tracy.module("tracy"));
}
var run_cmd_step: *std.Build.Step = undefined;
if (is_wasm) {
if (true) {
@panic("TODO: test in 0.17");
}
@panic("TODO: Test wasm support on 0.17");
// TODO:
// const build_step = buildWasm(b, .{
// .name = "index",
// .root_module = exe_mod,
@ -137,7 +137,7 @@ pub fn build(b: *std.Build) !void {
// TODO: Create a zip archive of all of the files. Would be useful for easier itch.io upload
} else {
const exe = buildNative(b, .{
.name = "sokol_template_v2",
.name = name,
.root_module = exe_mod
});
b.installArtifact(exe);

View File

@ -2,11 +2,15 @@
.name = .sokol_template_v2,
.version = "0.0.0",
.fingerprint = 0xf440b4e6e51f5206, // Changing this has security and trust implications.
.minimum_zig_version = "0.16.0",
.dependencies = .{
.sokol = .{
.url = "git+https://github.com/floooh/sokol-zig.git#d4adaef70dd68d2ca8e8c3b6a392ab455181ab4a",
.hash = "sokol-0.1.0-pb1HK0EaQQDC6r1jTWJbUWiXbjxfpWuWEK3tz0z4K1aY",
.url = "git+https://github.com/floooh/sokol-zig.git#ff40f04d4f51c73b2bf460d87fd2d7aa0dedc22f",
.hash = "sokol-0.1.0-pb1HKygbQQCINV-qSe4SFm92QWaT_95VpWTJkwYqzOrX",
},
.cimgui = .{
.url = "git+https://github.com/floooh/dcimgui.git#e2f0e0d93adec02743c55940be23ffe286e857f7",
.hash = "cimgui-0.1.0-44ClkR8dmgDqqnfloyLE1bUAtl4zSKTT1wxaHSEC0ikV",
.lazy = true
},
.stb = .{
.path = "./libs/stb",
@ -17,11 +21,6 @@
.tracy = .{
.path = "./libs/tracy",
},
.cimgui = .{
.url = "git+https://github.com/floooh/dcimgui.git#3c2b41a9333b1195e2c2f8ce6a2d3e50660a73bf",
.hash = "cimgui-0.1.0-44ClkR8dmgDqqnfloyLE1bUAtl4zSKTT1wxaHSEC0ikV",
.lazy = true
},
},
.paths = .{
"build.zig",