Add optional output argument for raylua builder.
This commit is contained in:
parent
42e0ff62db
commit
99a4f8b6ea
@ -52,7 +52,7 @@ print ">> Raylua builder <<"
|
|||||||
if #arg == 0 then
|
if #arg == 0 then
|
||||||
print "TODO: Improve builder usage."
|
print "TODO: Improve builder usage."
|
||||||
|
|
||||||
print "Usage: raylua_e <input>"
|
print "Usage: raylua_e <input> [output]"
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -69,17 +69,19 @@ end
|
|||||||
print("Self is " .. self_path)
|
print("Self is " .. self_path)
|
||||||
|
|
||||||
if t == "directory" then
|
if t == "directory" then
|
||||||
local path = input_path
|
local output = arg[2]
|
||||||
|
|
||||||
if ffi.os == "Windows" then
|
if not output then
|
||||||
path = path .. ".exe"
|
if ffi.os == "Windows" then
|
||||||
else
|
output = output .. ".exe"
|
||||||
path = path .. ".elf"
|
else
|
||||||
|
output = output .. ".elf"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
print("Building " .. path)
|
print("Building " .. output)
|
||||||
|
|
||||||
local builder = builder_new(self_path, path)
|
local builder = builder_new(self_path, output)
|
||||||
assert(builder, "Can't initialize builder")
|
assert(builder, "Can't initialize builder")
|
||||||
|
|
||||||
local have_main = false
|
local have_main = false
|
||||||
|
Loading…
Reference in New Issue
Block a user