Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling xml converter #259

Merged
merged 10 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions PackDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const executable_path: String = "./xml_converter/build/xml_converter"
var protobin_data_folder: String
var split_protobin_data_folder: String
var user_data_dir: String
onready var output_dialog = $OutputDialog
onready var output_label = $OutputDialog/ScrollContainer/OutputLabel

func _ready():
var dir = Directory.new()
Expand Down Expand Up @@ -37,15 +35,10 @@ func _on_FileDialog_dir_selected(dir_path):
"--output-waypoint-path", new_path,
"--output-split-waypoint-path", self.split_protobin_data_folder
]
custom_print(args)
var result: int = OS.execute(self.executable_path, args, true, output)
custom_print(output)
print(args)
var result: int = OS.execute(self.executable_path, args, true, output, true)
AsherGlick marked this conversation as resolved.
Show resolved Hide resolved
print(output)
if result != OK:
print("Failed to execute the command. Error code:", result)
else:
print("Command executed successfully.")

func custom_print(message: Array):
output_dialog.show()
for line in message:
output_label.text += line + "\n"
24 changes: 0 additions & 24 deletions Spatial.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -198,30 +198,6 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="OutputDialog" type="WindowDialog" parent="Control/Dialogs/ImportPackDialog"]
margin_left = 689.0
margin_top = 1.0
margin_right = 1344.0
margin_bottom = 455.0
__meta__ = {
"_edit_use_anchors_": false
}

[node name="ScrollContainer" type="ScrollContainer" parent="Control/Dialogs/ImportPackDialog/OutputDialog"]
margin_right = 653.0
margin_bottom = 453.0
__meta__ = {
"_edit_use_anchors_": false
}

[node name="OutputLabel" type="Label" parent="Control/Dialogs/ImportPackDialog/OutputDialog/ScrollContainer"]
margin_right = 100.0
margin_bottom = 100.0
rect_min_size = Vector2( 100, 100 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="MainMenu" type="WindowDialog" parent="Control/Dialogs"]
margin_left = 55.0
margin_top = 60.0
Expand Down