+5
-3
lines changedFilter options
+5
-3
lines changed Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ local target = io.open(target_file, 'w')
28
28
29
29
target:write('#include <stdint.h>\n\n')
30
30
31
+
local warn_on_missing_compiler = true
31
32
local varnames = {}
32
33
for argi = 2, #arg, 2 do
33
34
local source_file = arg[argi]
@@ -42,10 +43,11 @@ for argi = 2, #arg, 2 do
42
43
local output
43
44
if options.c then
44
45
local luac = os.getenv("LUAC_PRG")
45
-
if luac then
46
+
if luac and luac ~= "" then
46
47
output = io.popen(luac:format(source_file), "r"):read("*a")
47
-
else
48
-
print("LUAC_PRG is undefined")
48
+
elseif warn_on_missing_compiler then
49
+
print("LUAC_PRG is missing, embedding raw source")
50
+
warn_on_missing_compiler = false
49
51
end
50
52
end
51
53
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4