windows: add support for the glfw backend on Windows

Changes:
- Add WindowsPty, which uses the ConPTY API to create a pseudo console
- Pty now selects between PosixPty and WindowsPty
- Windows support in Command, including the ability to launch a process with a pseudo console
- Enable Command tests on windows
- Add some environment variable abstractions to handle the missing libc APIs on Windows
- Windows version of ReadThread
This commit is contained in:
kcbanner
2023-10-29 04:03:06 -04:00
committed by Mitchell Hashimoto
parent 04ef21653f
commit 232df8de8f
13 changed files with 795 additions and 234 deletions

View File

@@ -61,11 +61,8 @@ pub fn create(
// Find our resources directory once for the app so every launch
// hereafter can use this cached value.
var resources_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined;
const resources_dir = if (try internal_os.resourcesDir(&resources_buf)) |dir|
try alloc.dupe(u8, dir)
else
null;
const resources_dir = try internal_os.resourcesDir(alloc);
errdefer if (resources_dir) |dir| alloc.free(dir);
app.* = .{
.alloc = alloc,