Skip to content

Commit

Permalink
Replace osArchName with @TagName
Browse files Browse the repository at this point in the history
  • Loading branch information
OneAvargeCoder193 committed Jun 16, 2024
1 parent a755295 commit 16810ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/windows/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub fn play(_:usize) void {

if (builtin.target.os.tag == .windows) {
var buf: [128]u8 = undefined;
const zig_http = std.fmt.bufPrint(&buf, "https://ziglang.org/builds/zig-{s}-{s}-{s}.zip", .{@tagName(builtin.target.os.tag), builtin.target.osArchName(), ver}) catch |err| {
const zig_http = std.fmt.bufPrint(&buf, "https://ziglang.org/builds/zig-{s}-{s}-{s}.zip", .{@tagName(builtin.target.os.tag), @tagName(builtin.target.cpu.arch), ver}) catch |err| {
std.log.err("Error getting the http url: {}\n", .{err});
return;
};
Expand All @@ -78,7 +78,7 @@ pub fn play(_:usize) void {
};

var commandBuf: [1024]u8 = undefined;
const command = std.fmt.bufPrint(&commandBuf, ".\\compiler\\zig-{s}-{s}-{s}\\zig.exe", .{@tagName(builtin.target.os.tag), builtin.target.osArchName(), ver}) catch |err| {
const command = std.fmt.bufPrint(&commandBuf, ".\\compiler\\zig-{s}-{s}-{s}\\zig.exe", .{@tagName(builtin.target.os.tag), @tagName(builtin.target.cpu.arch), ver}) catch |err| {
std.log.err("Error creating the run command: {}\n", .{err});
return;
};
Expand All @@ -92,7 +92,7 @@ pub fn play(_:usize) void {
};
} else {
var buf: [128]u8 = undefined;
const zig_http = std.fmt.bufPrint(&buf, "https://ziglang.org/builds/zig-{s}-{s}-{s}.tar.xz", .{@tagName(builtin.target.os.tag), builtin.target.osArchName(), ver}) catch |err| {
const zig_http = std.fmt.bufPrint(&buf, "https://ziglang.org/builds/zig-{s}-{s}-{s}.tar.xz", .{@tagName(builtin.target.os.tag), @tagName(builtin.target.cpu.arch), ver}) catch |err| {
std.log.err("Error getting the http url: {}\n", .{err});
return;
};
Expand All @@ -113,7 +113,7 @@ pub fn play(_:usize) void {
};

var commandBuf: [1024]u8 = undefined;
const command = std.fmt.bufPrint(&commandBuf, "./compiler/zig-{s}-{s}-{s}/zig", .{@tagName(builtin.target.os.tag), builtin.target.osArchName(), ver}) catch |err| {
const command = std.fmt.bufPrint(&commandBuf, "./compiler/zig-{s}-{s}-{s}/zig", .{@tagName(builtin.target.os.tag), @tagName(builtin.target.cpu.arch), ver}) catch |err| {
std.log.err("Error creating the run command: {}\n", .{err});
return;
};
Expand Down

0 comments on commit 16810ba

Please sign in to comment.