init project

This commit is contained in:
2024-08-11 19:09:17 +02:00
parent 1886723da2
commit f1fed86329
9 changed files with 40 additions and 9 deletions

View File

@@ -6,7 +6,7 @@
-- target_platform: the target platform, like "Windows Desktop"
-- name: the export execute name, it will be endswith ".exe" on windows
task("export")
on_run((function(godot_project_folder, publish_folder)
on_run((function(godot_project_folder, publish_folder, project_name)
return function(target_platform)
local name = godot_project_folder
@@ -35,13 +35,13 @@ task("export")
local godot_project_file = path.join(godot_project_folder, "project.godot")
local export_path = path.absolute(path.join(publish_folder, name))
local export_path = path.absolute(path.join(publish_folder, project_name))
os.execv("echo", {"godot", godot_project_file, export_mode, target_platform, export_path})
os.exec("godot %s --headless --%s %s %s", godot_project_file, export_mode, "\"" .. target_platform .. "\"", export_path)
end
end)(GODOT_PROJECT_FOLDER, PUBLISH_FOLDER))
end)(GODOT_PROJECT_FOLDER, PUBLISH_FOLDER, PROJECT_NAME))
task_end()