authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-24 01:13:23 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-24 01:13:23 -07:00
log2fd38506b2ff92f511fbb16372f6a62588d86799
treee14b8243a92fd80d7c2c73d7590c9c411f3a85e3
parentc9752714e5a141f4bf6e8816900e2b13d1cda271

add marlersoft/zigwin32 to enable ansi escape codes on windows terminals


5 files changed, 16 insertions(+), 1 deletions(-)

deps.zig+7-1
...@@ -53,6 +53,7 @@ const dirs = struct {...@@ -53,6 +53,7 @@ const dirs = struct {
53 pub const _u9w9dpp6p804 = cache ++ "/git/github.com/MasterQ32/zig-uri";53 pub const _u9w9dpp6p804 = cache ++ "/git/github.com/MasterQ32/zig-uri";
54 pub const _ocmr9rtohgcc = cache ++ "/git/github.com/nektro/zig-json";54 pub const _ocmr9rtohgcc = cache ++ "/git/github.com/nektro/zig-json";
55 pub const _tnj3qf44tpeq = cache ++ "/git/github.com/nektro/zig-range";55 pub const _tnj3qf44tpeq = cache ++ "/git/github.com/nektro/zig-range";
56 pub const _o6ogpor87xc2 = cache ++ "/git/github.com/marlersoft/zigwin32";
56};57};
5758
58pub const package_data = struct {59pub const package_data = struct {
...@@ -113,9 +114,14 @@ pub const package_data = struct {...@@ -113,9 +114,14 @@ pub const package_data = struct {
113 .pkg = Pkg{ .name = "range", .path = .{ .path = dirs._tnj3qf44tpeq ++ "/src/lib.zig" }, .dependencies = null },114 .pkg = Pkg{ .name = "range", .path = .{ .path = dirs._tnj3qf44tpeq ++ "/src/lib.zig" }, .dependencies = null },
114 };115 };
115116
117 pub const _o6ogpor87xc2 = Package{
118 .directory = dirs._o6ogpor87xc2,
119 .pkg = Pkg{ .name = "win32", .path = .{ .path = dirs._o6ogpor87xc2 ++ "/win32.zig" }, .dependencies = null },
120 };
121
116 pub const _89ujp8gq842x = Package{122 pub const _89ujp8gq842x = Package{
117 .directory = dirs._89ujp8gq842x,123 .directory = dirs._89ujp8gq842x,
118 .pkg = Pkg{ .name = "zigmod", .path = .{ .path = dirs._89ujp8gq842x ++ "/src/lib.zig" }, .dependencies = &.{ _s84v9o48ucb0.pkg.?, _2ta738wrqbaq.pkg.?, _0npcrzfdlrvk.pkg.?, _ejw82j2ipa0e.pkg.?, _ocmr9rtohgcc.pkg.?, _tnj3qf44tpeq.pkg.? } },124 .pkg = Pkg{ .name = "zigmod", .path = .{ .path = dirs._89ujp8gq842x ++ "/src/lib.zig" }, .dependencies = &.{ _s84v9o48ucb0.pkg.?, _2ta738wrqbaq.pkg.?, _0npcrzfdlrvk.pkg.?, _ejw82j2ipa0e.pkg.?, _ocmr9rtohgcc.pkg.?, _tnj3qf44tpeq.pkg.?, _o6ogpor87xc2.pkg.? } },
119 };125 };
120126
121 pub const _root = Package{127 pub const _root = Package{
src/main.zig+6
...@@ -3,6 +3,7 @@ const builtin = std.builtin;...@@ -3,6 +3,7 @@ const builtin = std.builtin;
33
4pub const build_options = @import("build_options");4pub const build_options = @import("build_options");
5const zigmod = @import("zigmod");5const zigmod = @import("zigmod");
6const win32 = @import("win32");
67
7pub const u = @import("./util/index.zig");8pub const u = @import("./util/index.zig");
8pub const common = @import("./common.zig");9pub const common = @import("./common.zig");
...@@ -33,6 +34,11 @@ pub fn main() !void {...@@ -33,6 +34,11 @@ pub fn main() !void {
33 return;34 return;
34 }35 }
3536
37 if (builtin.os.tag == .windows) {
38 const console = win32.system.console;
39 console.SetConsoleMode(std.io.getStdOut().handle, console.ENABLE_VIRTUAL_TERMINAL_PROCESSING);
40 }
41
36 inline for (std.meta.declarations(available)) |decl| {42 inline for (std.meta.declarations(available)) |decl| {
37 if (std.mem.eql(u8, args[0], decl.name)) {43 if (std.mem.eql(u8, args[0], decl.name)) {
38 const cmd = @field(available, decl.name);44 const cmd = @field(available, decl.name);
zig.mod+1
...@@ -35,3 +35,4 @@ dependencies:...@@ -35,3 +35,4 @@ dependencies:
35 - src: git https://github.com/truemedian/zfetch35 - src: git https://github.com/truemedian/zfetch
36 - src: git https://github.com/nektro/zig-json36 - src: git https://github.com/nektro/zig-json
37 - src: git https://github.com/nektro/zig-range37 - src: git https://github.com/nektro/zig-range
38 - src: git https://github.com/marlersoft/zigwin32
zigmod.lock+1
...@@ -10,3 +10,4 @@ git https://github.com/MasterQ32/zig-network commit-b9c91769d8ebd626c8e45b2abb05...@@ -10,3 +10,4 @@ git https://github.com/MasterQ32/zig-network commit-b9c91769d8ebd626c8e45b2abb05
10git https://github.com/MasterQ32/zig-uri commit-52cdd2061bec0579519f0d30280597f3a1db8b7510git https://github.com/MasterQ32/zig-uri commit-52cdd2061bec0579519f0d30280597f3a1db8b75
11git https://github.com/nektro/zig-json commit-72e555fbc0776f2600aee19b01e5ab1855ebec7a11git https://github.com/nektro/zig-json commit-72e555fbc0776f2600aee19b01e5ab1855ebec7a
12git https://github.com/nektro/zig-range commit-890ca308fe09b3d5c866d5cfb3b3d7a95dbf939f12git https://github.com/nektro/zig-range commit-890ca308fe09b3d5c866d5cfb3b3d7a95dbf939f
13git https://github.com/marlersoft/zigwin32 commit-ca6b8e5c378e31655fa11b886b44b62f703ef090
zigmod.sum+1
...@@ -9,3 +9,4 @@ blake3-21f91e48333ac0ca7f4704c96352831c25216e7056d02ce24de95d03fc942246 git/gith...@@ -9,3 +9,4 @@ blake3-21f91e48333ac0ca7f4704c96352831c25216e7056d02ce24de95d03fc942246 git/gith
9blake3-030ebb03f1ed21122e681b06786bea6f2f1b810e8eb9f2029d0eee4f4fb3103f git/github.com/MasterQ32/zig-uri9blake3-030ebb03f1ed21122e681b06786bea6f2f1b810e8eb9f2029d0eee4f4fb3103f git/github.com/MasterQ32/zig-uri
10blake3-1893709ffc6359c5f9cd2f9409abccf78a94ed37bb2c6dd075c603356d17c94b git/github.com/nektro/zig-json10blake3-1893709ffc6359c5f9cd2f9409abccf78a94ed37bb2c6dd075c603356d17c94b git/github.com/nektro/zig-json
11blake3-09698753782139ab4877d08f33235170836f68b73e482b65cdee5637a6addf86 git/github.com/nektro/zig-range11blake3-09698753782139ab4877d08f33235170836f68b73e482b65cdee5637a6addf86 git/github.com/nektro/zig-range
12blake3-949c3cd2c9e834190feeecb010c59ab5047fa721cfbdf67e0f0fd847194a6dad git/github.com/marlersoft/zigwin32