summaryrefslogtreecommitdiffstats
path: root/docs/release/scripts/genie.lua
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2017-01-27 23:14:12 +1100
committer Robbbert <Robbbert@users.noreply.github.com>2017-01-27 23:14:12 +1100
commit26cd861a9385b035d3227fd8cd71cdd9aa0b5181 (patch)
tree5c847a0fe396f241e42eedfa93ba23a654e934ad /docs/release/scripts/genie.lua
parenta69112f29d7f574b50c048d8c0861da7fdff444d (diff)
Added remaining CPS-2 games from mame++.
Diffstat (limited to 'docs/release/scripts/genie.lua')
-rw-r--r--docs/release/scripts/genie.lua21
1 files changed, 20 insertions, 1 deletions
diff --git a/docs/release/scripts/genie.lua b/docs/release/scripts/genie.lua
index 7a4668e7d14..e905e3b6aef 100644
--- a/docs/release/scripts/genie.lua
+++ b/docs/release/scripts/genie.lua
@@ -386,6 +386,11 @@ newoption {
description = "Produce WebAssembly output when building with Emscripten.",
}
+newoption {
+ trigger = "PROJECT",
+ description = "Select projects to be built. Will look into project folder for files.",
+}
+
dofile ("extlib.lua")
if _OPTIONS["SHLIB"]=="1" then
@@ -516,7 +521,14 @@ msgprecompile ("Precompiling $(subst ../,,$<)...")
messageskip { "SkipCreatingMessage", "SkipBuildingMessage", "SkipCleaningMessage" }
-if (_OPTIONS["SOURCES"] == nil) then
+if (_OPTIONS["PROJECT"] ~= nil) then
+ PROJECT_DIR = path.join(path.getabsolute(".."),"projects",_OPTIONS["PROJECT"]) .. "/"
+ if (not os.isfile(path.join("..", "projects", _OPTIONS["PROJECT"], "scripts", "target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))) then
+ error("File definition for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist")
+ end
+ dofile (path.join(".." ,"projects", _OPTIONS["PROJECT"], "scripts", "target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))
+end
+if (_OPTIONS["SOURCES"] == nil and _OPTIONS["PROJECT"] == nil) then
if (not os.isfile(path.join("target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))) then
error("File definition for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist")
end
@@ -1305,6 +1317,13 @@ configuration { "Debug", "gmake" }
configuration { }
if (_OPTIONS["SOURCES"] ~= nil) then
+ local str = _OPTIONS["SOURCES"]
+ for word in string.gmatch(str, '([^,]+)') do
+ if (not os.isfile(path.join(MAME_DIR ,word))) then
+ print("File " .. word.. " does not exist")
+ os.exit()
+ end
+ end
OUT_STR = os.outputof( PYTHON .. " " .. MAME_DIR .. "scripts/build/makedep.py " .. MAME_DIR .. " " .. _OPTIONS["SOURCES"] .. " target " .. _OPTIONS["subtarget"])
load(OUT_STR)()
os.outputof( PYTHON .. " " .. MAME_DIR .. "scripts/build/makedep.py " .. MAME_DIR .. " " .. _OPTIONS["SOURCES"] .. " drivers " .. _OPTIONS["subtarget"] .. " > ".. GEN_DIR .. _OPTIONS["target"] .. "/" .. _OPTIONS["subtarget"]..".flt")