update dependencies
This commit is contained in:
parent
1165c53683
commit
7632329c92
14
build.zig
14
build.zig
@ -1,10 +1,13 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
|
const Build = std.Build;
|
||||||
const sokol = @import("sokol");
|
const sokol = @import("sokol");
|
||||||
|
|
||||||
pub fn build(b: *std.Build) !void {
|
pub fn build(b: *std.Build) !void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
|
const name = "sokol_template_v2";
|
||||||
|
|
||||||
const assets_dir = "assets";
|
const assets_dir = "assets";
|
||||||
const asset_files = [_][]const u8{
|
const asset_files = [_][]const u8{
|
||||||
"sokoban/sokoban_tilesheet.png",
|
"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_image", dep_stb.module("stb_image"));
|
||||||
exe_mod.addImport("stb_truetype", dep_stb.module("stb_truetype"));
|
exe_mod.addImport("stb_truetype", dep_stb.module("stb_truetype"));
|
||||||
|
|
||||||
|
var dep_sokol: *Build.Dependency = undefined;
|
||||||
const platform_mod = b.createModule(.{
|
const platform_mod = b.createModule(.{
|
||||||
.root_source_file = b.path("src/platform/root.zig")
|
.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);
|
platform_mod.addImport("math", math_mod);
|
||||||
|
|
||||||
const dep_sokol = b.dependency("sokol", .{
|
dep_sokol = b.dependency("sokol", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
.with_sokol_imgui = has_imgui
|
.with_sokol_imgui = has_imgui
|
||||||
@ -114,14 +118,10 @@ pub fn build(b: *std.Build) !void {
|
|||||||
platform_mod.addImport("tracy", dep_tracy.module("tracy"));
|
platform_mod.addImport("tracy", dep_tracy.module("tracy"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var run_cmd_step: *std.Build.Step = undefined;
|
var run_cmd_step: *std.Build.Step = undefined;
|
||||||
if (is_wasm) {
|
if (is_wasm) {
|
||||||
if (true) {
|
@panic("TODO: Test wasm support on 0.17");
|
||||||
@panic("TODO: test in 0.17");
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO:
|
|
||||||
// const build_step = buildWasm(b, .{
|
// const build_step = buildWasm(b, .{
|
||||||
// .name = "index",
|
// .name = "index",
|
||||||
// .root_module = exe_mod,
|
// .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
|
// TODO: Create a zip archive of all of the files. Would be useful for easier itch.io upload
|
||||||
} else {
|
} else {
|
||||||
const exe = buildNative(b, .{
|
const exe = buildNative(b, .{
|
||||||
.name = "sokol_template_v2",
|
.name = name,
|
||||||
.root_module = exe_mod
|
.root_module = exe_mod
|
||||||
});
|
});
|
||||||
b.installArtifact(exe);
|
b.installArtifact(exe);
|
||||||
|
|||||||
@ -2,11 +2,15 @@
|
|||||||
.name = .sokol_template_v2,
|
.name = .sokol_template_v2,
|
||||||
.version = "0.0.0",
|
.version = "0.0.0",
|
||||||
.fingerprint = 0xf440b4e6e51f5206, // Changing this has security and trust implications.
|
.fingerprint = 0xf440b4e6e51f5206, // Changing this has security and trust implications.
|
||||||
.minimum_zig_version = "0.16.0",
|
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.sokol = .{
|
.sokol = .{
|
||||||
.url = "git+https://github.com/floooh/sokol-zig.git#d4adaef70dd68d2ca8e8c3b6a392ab455181ab4a",
|
.url = "git+https://github.com/floooh/sokol-zig.git#ff40f04d4f51c73b2bf460d87fd2d7aa0dedc22f",
|
||||||
.hash = "sokol-0.1.0-pb1HK0EaQQDC6r1jTWJbUWiXbjxfpWuWEK3tz0z4K1aY",
|
.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 = .{
|
.stb = .{
|
||||||
.path = "./libs/stb",
|
.path = "./libs/stb",
|
||||||
@ -17,11 +21,6 @@
|
|||||||
.tracy = .{
|
.tracy = .{
|
||||||
.path = "./libs/tracy",
|
.path = "./libs/tracy",
|
||||||
},
|
},
|
||||||
.cimgui = .{
|
|
||||||
.url = "git+https://github.com/floooh/dcimgui.git#3c2b41a9333b1195e2c2f8ce6a2d3e50660a73bf",
|
|
||||||
.hash = "cimgui-0.1.0-44ClkR8dmgDqqnfloyLE1bUAtl4zSKTT1wxaHSEC0ikV",
|
|
||||||
.lazy = true
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
"build.zig",
|
"build.zig",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user