Further progress towards Godot 4.0 support

- Primary example scenes (menu, terminal, and asciicast) working but
  still a lot of warning/error messages and some regressions.
- Editor integrated terminal works, but still a lot of warning/error
  messages and some regressions.
- Added support for "blink" display attribute.
- Removed GDScript terminal code. Terminal node is now purely a
  GDExtension. So is LibuvUtils.
- GUT tests not working yet.
- Still a lot of things to fix.
- So far, only built for and manually tested on Linux x86_64.
This commit is contained in:
Leroy Hopson 2023-01-08 22:41:48 +13:00
parent aad8e39dae
commit ad7f97e493
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
30 changed files with 1385 additions and 1459 deletions

View file

@ -1,9 +1,9 @@
extends "res://addons/godot_xterm/terminal.gd"
extends Terminal
@export var exec_path: String := "bash"
@export var socat_path: String := "socat" # E.g. /usr/bin/socat
@export var port: int := 2023
@export var verbose: bool := false
@export var exec_path := "bash"
@export var socat_path := "socat" # E.g. /usr/bin/socat
@export var port := 2023
@export var verbose := false
var _timeout = 30
var _pid: int
@ -15,7 +15,7 @@ func _ready():
args.append("tcp-l:%d,reuseaddr,fork" % port)
args.append("exec:%s,pty,setsid,setpgid,stderr,ctty" % exec_path)
_pid = OS.execute(socat_path, args, false)
_pid = OS.create_process(socat_path, args)
func _process(delta):
@ -25,7 +25,7 @@ func _process(delta):
if _timeout < 1:
_error("Timeout: could not connect to socat")
if not _stream.is_connected_to_host():
if _stream.get_connected_host().is_empty():
if _stream.connect_to_host("127.0.0.1", port) != OK:
_error("Could not connect to socat")

View file

@ -1,14 +1,11 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=2 format=3 uid="uid://bc5o6m6ty0ejn"]
[ext_resource path="res://examples/socat_terminal/socat_terminal.gd" type="Script" id=1]
[ext_resource type="Script" path="res://examples/socat_terminal/socat_terminal.gd" id="1"]
[node name="Terminal" type="Control"]
[node name="Terminal" type="Terminal"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
focus_mode = 2
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="data_sent" from="." to="." method="_on_Terminal_data_sent"]
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1")