From 1a6db06ff94501a6441044ae30940fae8117986a Mon Sep 17 00:00:00 2001 From: jagt Date: Wed, 12 Jan 2022 21:00:29 +0800 Subject: [PATCH] fix x86 build due to a zig bug; tick license --- LICENSE | 2 +- build.zig | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/LICENSE b/LICENSE index 9351214..bb388bd 100644 --- a/LICENSE +++ b/LICENSE @@ -2,7 +2,7 @@ clumsy (https://jagt.github.io/clumsy/) is licensed under the MIT License. MIT License -Copyright (c) 2013-2021 Chen Tao and contributors +Copyright (c) 2013-2022 Chen Tao and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/build.zig b/build.zig index b69581a..75a0b17 100644 --- a/build.zig +++ b/build.zig @@ -48,21 +48,23 @@ pub fn build(b: *std.build.Builder) void { b.pathJoin(&.{windows_kit_bin_root, @tagName(arch)}), }) catch @panic("unable to find `rc.exe`, check your windows_kit_bin_root"); + const archFlag = switch (arch) { + .x86 => "X86", + .x64 => "X64", + }; const cmd = b.addSystemCommand(&.{ rc_exe, "/nologo", "/d", "NDEBUG", "/d", - switch (arch) { - .x64 => "X64", - .x86 => "X86", - }, + archFlag, "/r", "/fo", res_obj_path, "etc/clumsy.rc", }); + cmd.print = true; const exe = b.addExecutable("clumsy", null);