Added some versioning-related features.

This commit is contained in:
Izaya 2017-04-24 01:12:24 +10:00
parent 7968f2a4f5
commit 468adf140d
3 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,5 @@
optimise yes optimise yes
listmods no listmods yes
test yes test yes
log yes log yes
opath kernel.lua opath kernel.lua

View File

@ -76,11 +76,16 @@ print(tostring(#tm).." modules loaded.\n")
-- Generate source -- Generate source
print("Generating source") print("Generating source")
if cfg.listmods == "yes" then if cfg.listmods == "yes" then
ss=ss.."modules={" ss=ss.."modules,_OSVERSION={"
for k,v in ipairs(tm) do for k,v in ipairs(tm) do
ss=ss..'"'..v..'",' ss=ss..'"'..v..'",'
end end
ss=ss.."}\n" ss=ss.."},"
if _OSVERSION == nil then
ss=ss..'"MultICE '..io.popen("git rev-parse HEAD"):read("*a"):sub(1,7)..'"\n'
else
ss=ss..'"MultICE DR0"\n'
end
end end
for k,v in pairs(ts) do for k,v in pairs(ts) do
ss=ss..v ss=ss..v

View File

@ -0,0 +1 @@
_OSVERSION="MultICE DR1"