generated from Persson-dev/Godot-Xmake
xmake things
This commit is contained in:
@@ -41,8 +41,9 @@ target(PROJECT_NAME)
|
|||||||
on_run(
|
on_run(
|
||||||
(function(godot_project_folder)
|
(function(godot_project_folder)
|
||||||
return function(target)
|
return function(target)
|
||||||
os.execv("echo", {"godot --path", godot_project_folder})
|
local cmd = format("godot --path %s", godot_project_folder)
|
||||||
os.exec("godot --path " .. godot_project_folder)
|
os.execv("echo", {cmd})
|
||||||
|
os.exec(cmd)
|
||||||
end
|
end
|
||||||
end)(GODOT_PROJECT_FOLDER)
|
end)(GODOT_PROJECT_FOLDER)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -37,8 +37,10 @@ task("export")
|
|||||||
|
|
||||||
local export_path = path.absolute(path.join(publish_folder, project_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})
|
local cmd = format("godot %s --headless --%s %s %s", 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)
|
|
||||||
|
os.execv("echo", {cmd})
|
||||||
|
os.exec(cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
end)(GODOT_PROJECT_FOLDER, PUBLISH_FOLDER, PROJECT_NAME))
|
end)(GODOT_PROJECT_FOLDER, PUBLISH_FOLDER, PROJECT_NAME))
|
||||||
@@ -202,3 +204,22 @@ android.release.arm64 = "res://lib/libProjectName.android_release_arm64.so"
|
|||||||
description = "Generate gdextension file",
|
description = "Generate gdextension file",
|
||||||
}
|
}
|
||||||
task_end()
|
task_end()
|
||||||
|
|
||||||
|
|
||||||
|
task("import-assets")
|
||||||
|
on_run((function(godot_project_folder, project_name)
|
||||||
|
return function ()
|
||||||
|
local godot_project_file = path.join(godot_project_folder, "project.godot")
|
||||||
|
|
||||||
|
local cmd = format("godot --headless --import %s", godot_project_file)
|
||||||
|
os.execv("echo", {cmd})
|
||||||
|
os.exec(cmd)
|
||||||
|
end
|
||||||
|
end)(GODOT_PROJECT_FOLDER, PROJECT_NAME))
|
||||||
|
|
||||||
|
set_menu {
|
||||||
|
usage = "xmake import-assets",
|
||||||
|
|
||||||
|
description = "Import project assets",
|
||||||
|
}
|
||||||
|
task_end()
|
||||||
Reference in New Issue
Block a user