mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-04 04:14:22 +02:00
Add disable_pty compile option
If disable_pty=yes then the PTY node and dependencies (LibuvUtils, Pipe) will be excluded. On platforms where the PTY node is not supported (e.g. HTML5), this will always be equivalent to `disable_pty=yes`.
This commit is contained in:
parent
29ff3efc49
commit
44ea56aa0f
2 changed files with 12 additions and 2 deletions
|
@ -62,6 +62,11 @@ opts.Add(EnumVariable(
|
|||
allowed_values=('debug', 'release'),
|
||||
ignorecase=2
|
||||
))
|
||||
opts.Add(BoolVariable(
|
||||
'disable_pty',
|
||||
'Disables the PTY and its dependencies (LibuvUtils and Pipe). Has no effect on platforms where PTY is not supported',
|
||||
False
|
||||
))
|
||||
|
||||
opts.Update(env)
|
||||
Help(opts.GenerateHelpText(env))
|
||||
|
@ -258,8 +263,11 @@ sources = []
|
|||
sources.append('src/libgodotxtermnative.cpp')
|
||||
sources.append('src/terminal.cpp')
|
||||
|
||||
|
||||
# PTY not supported on HTML5 or Windows (yet).
|
||||
if env['platform'] != 'javascript' and env['platform'] != 'windows':
|
||||
if env['disable_pty'] or env['platform'] == 'javascript' or env['platform'] == 'windows':
|
||||
env.Append(CPPDEFINES=['_PTY_DISABLED'])
|
||||
else:
|
||||
sources.append('src/pipe.cpp')
|
||||
sources.append('src/libuv_utils.cpp')
|
||||
sources.append('src/node_pty/unix/pty.cc')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue