feat(pty): add initial pty node

This commit is contained in:
Leroy Hopson 2024-02-24 19:47:12 +13:00
parent d223a458cd
commit 1514f42b54
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
21 changed files with 2819 additions and 71 deletions

View file

@ -15,6 +15,8 @@ env.Append(CPPPATH=[
"thirdparty/libtsm/src/tsm",
"thirdparty/libtsm/external",
"thirdparty/libtsm/src/shared",
'thirdparty/libuv/src',
'thirdparty/libuv/include',
])
sources = Glob("src/*.cpp") + Glob("thirdparty/libtsm/src/tsm/*.c")
@ -23,6 +25,11 @@ sources.append([
'thirdparty/libtsm/src/shared/shl-htable.c',
])
if env['platform'] == 'linux' or env['platform'] == 'macos':
env.Append(LIBS=['util', env.File('thirdparty/libuv/build/libuv_a.a')])
else:
env.Append(CPPDEFINES=['_PTY_DISABLED'])
if env["platform"] == "macos":
library = env.SharedLibrary(
"bin/libgodot-xterm.{}.{}.framework/libgodot-xterm.{}.{}".format(
@ -30,6 +37,11 @@ if env["platform"] == "macos":
),
source=sources,
)
spawn_helper = env.Program(
"bin/spawn-helper",
source="thirdparty/node-pty/src/unix/spawn-helper.cc"
)
Default(spawn_helper)
else:
library = env.SharedLibrary(
"bin/libgodot-xterm{}{}".format(env["suffix"], env["SHLIBSUFFIX"]),