mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-25 14:17:29 -04:00
gd: sandbox_executable
This commit is contained in:
parent
5ed6c09f68
commit
50066d318e
3 changed files with 9 additions and 2 deletions
|
@ -84,6 +84,7 @@ gate_events = ExtResource("2_ot8b0")
|
|||
script = ExtResource("1_5swiq")
|
||||
gate_events = ExtResource("2_ot8b0")
|
||||
render_result = NodePath("../../WorldCanvas/RenderResult")
|
||||
sandbox_executable = "godot.windows.editor.dev.sandbox.x86_64.exe"
|
||||
|
||||
[node name="UICanvas" type="CanvasLayer" parent="."]
|
||||
follow_viewport_enabled = true
|
||||
|
|
|
@ -3,6 +3,7 @@ class_name PackLoader
|
|||
|
||||
@export var gate_events: GateEvents
|
||||
@export var render_result: RenderResult
|
||||
@export var sandbox_executable: String
|
||||
|
||||
var gate: Gate
|
||||
var pid: int
|
||||
|
@ -15,7 +16,8 @@ func _ready() -> void:
|
|||
func create_process(_gate: Gate) -> void:
|
||||
gate = _gate
|
||||
|
||||
var sandbox_path = "/home/nordup/projects/godot/the-gates-folder/the-gates/bin/godot.linuxbsd.editor.dev.sandbox.x86_64.llvm"
|
||||
var executable_dir = OS.get_executable_path().get_base_dir() + "/"
|
||||
var sandbox_path = executable_dir + sandbox_executable
|
||||
var pack_file = ProjectSettings.globalize_path(gate.resource_pack)
|
||||
|
||||
var args = [
|
||||
|
@ -26,6 +28,7 @@ func create_process(_gate: Gate) -> void:
|
|||
Debug.logclr(sandbox_path + " " + " ".join(args), Color.DARK_VIOLET)
|
||||
pid = OS.create_process(sandbox_path, args)
|
||||
|
||||
if OS.get_name() == "Windows": render_result.fd_path += "|" + str(pid)
|
||||
gate_events.gate_entered_emit()
|
||||
|
||||
|
||||
|
|
|
@ -7,14 +7,17 @@ class_name RenderResult
|
|||
|
||||
@onready var width = get_viewport().size.x
|
||||
@onready var height = get_viewport().size.y
|
||||
var fd_path = "/tmp/external_texture"
|
||||
|
||||
var fd_path: String
|
||||
var rd: RenderingDevice
|
||||
var ext_texure: ExternalTexture
|
||||
var texture_rid: RID
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if OS.get_name() == "Windows": fd_path = "ipc://external_texture"
|
||||
else: fd_path = "/tmp/external_texture"
|
||||
|
||||
gate_events.gate_entered.connect(create_external_texture)
|
||||
command_events.send_filehandle.connect(send_filehandle)
|
||||
initialize()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue