forked from HeliumProject/Engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Prebuild.lua
42 lines (33 loc) · 1.16 KB
/
Prebuild.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require "Helium"
-- Pre-build script execution.
Helium.Prebuild = function()
local python = "python"
if os.get() == "windows" then
python = python .. ".exe"
else
python = python .. "3"
end
local pythonPath = os.pathsearch( python, os.getenv( 'PATH' ) )
if pythonPath == nil then
error( "\n\nYou must have Python 3.x installed and in your PATH to continue." )
end
local commands =
{
python .. " Prebuild-JobDefParser.py EngineJobs . .",
python .. " Prebuild-JobDefParser.py Framework . .",
python .. " Prebuild-JobDefParser.py GraphicsJobs . .",
python .. " Prebuild-JobDefParser.py TestJobs . .",
python .. " Prebuild-TypeParser.py D3D9Rendering EditorSupport Engine EngineJobs Framework FrameworkWin Graphics GraphicsJobs GraphicsTypes PcSupport PreprocessingPc Rendering TestJobs WinWindowing Windowing",
python .. " Prebuild-TypeParser.py -i Example -s Example -p EXAMPLE_ ExampleGame ExampleMain",
}
local result = 0
for i, commandString in ipairs( commands ) do
result = os.execute( commandString )
if result ~= 0 then
break
end
end
if result ~= 0 then
error( "An error occurred processing the pre-build scripts." )
end
end