mach: add is_app option to disable gamemode in desktop applications; use parseIp4 (#544)
* mach: add `is_app` option to disable gamemode in desktop applications * use parseIp4 instead of resolveIp (which throws a compile error in windows)
This commit is contained in:
parent
47d1544b64
commit
6043c7eae6
3 changed files with 48 additions and 45 deletions
|
|
@ -371,7 +371,7 @@ pub const App = struct {
|
|||
if (app.platform == .web) {
|
||||
const address = std.process.getEnvVarOwned(app.b.allocator, "MACH_ADDRESS") catch app.b.allocator.dupe(u8, "127.0.0.1") catch unreachable;
|
||||
const port = std.process.getEnvVarOwned(app.b.allocator, "MACH_PORT") catch app.b.allocator.dupe(u8, "8080") catch unreachable;
|
||||
const address_parsed = std.net.Address.resolveIp(address, std.fmt.parseInt(u16, port, 10) catch unreachable) catch unreachable;
|
||||
const address_parsed = std.net.Address.parseIp4(address, std.fmt.parseInt(u16, port, 10) catch unreachable) catch unreachable;
|
||||
const wasmserve = @import("tools/wasmserve/wasmserve.zig");
|
||||
const install_step_name = if (std.mem.startsWith(u8, app.step.name, "example-"))
|
||||
app.step.name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue