diff --git a/build_all.py b/build_all.py index 24ee466a2..b0b400610 100755 --- a/build_all.py +++ b/build_all.py @@ -98,48 +98,15 @@ def run_per_platform(cmds_windows=[], cmds_macOS=[], cmds_linux=[], cwd='.'): # physTest sample if 'physTest' in BUILD_PROJECTS: - proj_dir = 'prog/samples/physTest' - if 'code' in BUILD_COMPONENTS: - run('jam', cwd=proj_dir) - run(['jam', '-f', 'jamfile-test-jolt'], cwd=proj_dir) - if 'shaders' in BUILD_COMPONENTS: - run_per_platform( - cmds_windows = ['compile_game_shaders-dx11.bat', 'compile_game_shaders-metal.bat', 'compile_game_shaders-spirv.bat'], - cmds_macOS = ['./compile_shaders_metal.sh'], - cmds_linux = ['./compile_shaders_spirv.sh'], - cwd=proj_dir+'/shaders') + run([sys.executable, './build.py'] + PY_ADD_CMDLINE, cwd='prog/samples/physTest') # skiesSample if 'skiesSample' in BUILD_PROJECTS: - proj_dir = 'samples/skiesSample/prog' - print('=== building '+proj_dir); - if 'code' in BUILD_COMPONENTS: - run('jam', cwd=proj_dir) - if 'shaders' in BUILD_COMPONENTS: - run_per_platform( - cmds_windows = ['compile_shaders_dx12.bat', 'compile_shaders_dx11.bat', 'compile_shaders_metal.bat', 'compile_shaders_spirv.bat', - 'compile_shaders_tools.bat'], - cmds_macOS = ['./compile_shaders_metal.sh', './compile_tool_shaders_metal.sh'], - cmds_linux = ['./compile_shaders_spirv.sh', './compile_tool_shaders_spirv.sh'], - cwd=proj_dir+'/shaders') - if 'assets' in BUILD_COMPONENTS: - run(DABUILD_CMD + ['../application.blk'], cwd='samples/skiesSample/develop') + run([sys.executable, './build.py'] + PY_ADD_CMDLINE, cwd='samples/skiesSample/prog') # testGI sample if 'testGI' in BUILD_PROJECTS: - proj_dir = 'samples/testGI/prog' - print('=== building '+proj_dir); - if 'code' in BUILD_COMPONENTS: - run('jam', cwd=proj_dir) - if 'shaders' in BUILD_COMPONENTS: - run_per_platform( - cmds_windows = ['compile_shaders_dx12.bat', 'compile_shaders_dx11.bat', 'compile_shaders_metal.bat', 'compile_shaders_spirv.bat', - 'compile_shaders_tools.bat'], - cmds_macOS = ['./compile_shaders_metal.sh', './compile_tool_shaders_metal.sh'], - cmds_linux = ['./compile_shaders_spirv.sh', './compile_tool_shaders_spirv.sh'], - cwd=proj_dir+'/shaders') - if 'assets' in BUILD_COMPONENTS: - run(DABUILD_CMD + ['../application.blk'], cwd='samples/testGI/develop') + run([sys.executable, './build.py'] + PY_ADD_CMDLINE, cwd='samples/testGI/prog') # Outer Space game sample if 'outerSpace' in BUILD_PROJECTS: diff --git a/prog/samples/physTest/build.py b/prog/samples/physTest/build.py new file mode 100755 index 000000000..a80b12885 --- /dev/null +++ b/prog/samples/physTest/build.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 +import sys +sys.path.append('../../..') +from build_all import run, run_per_platform, BUILD_COMPONENTS +sys.path.pop() + + +# build EXE +if 'code' in BUILD_COMPONENTS: + run('jam') + run(['jam', '-f', 'jamfile-test-jolt']) + +# build shaders +if 'shaders' in BUILD_COMPONENTS: + run_per_platform( + cmds_windows = ['compile_game_shaders-dx11.bat', 'compile_game_shaders-metal.bat', 'compile_game_shaders-spirv.bat'], + cmds_macOS = ['./compile_shaders_metal.sh'], + cmds_linux = ['./compile_shaders_spirv.sh'], + cwd='./shaders') diff --git a/samples/skiesSample/prog/build.py b/samples/skiesSample/prog/build.py new file mode 100755 index 000000000..778c690f7 --- /dev/null +++ b/samples/skiesSample/prog/build.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +import sys +sys.path.append('../../..') +from build_all import run, run_per_platform, DABUILD_CMD, BUILD_COMPONENTS +sys.path.pop() + + +# build EXE +if 'code' in BUILD_COMPONENTS: + run('jam') + +# build shaders +if 'shaders' in BUILD_COMPONENTS: + run_per_platform( + cmds_windows = ['compile_shaders_dx12.bat', 'compile_shaders_dx11.bat', 'compile_shaders_metal.bat', 'compile_shaders_spirv.bat', + 'compile_shaders_tools.bat'], + cmds_macOS = ['./compile_shaders_metal.sh', './compile_tool_shaders_metal.sh'], + cmds_linux = ['./compile_shaders_spirv.sh', './compile_tool_shaders_spirv.sh'], + cwd='./shaders') + +# dabuild assets +if 'assets' in BUILD_COMPONENTS: + run(DABUILD_CMD + ['../application.blk'], cwd='../develop') diff --git a/samples/testGI/prog/build.py b/samples/testGI/prog/build.py new file mode 100755 index 000000000..778c690f7 --- /dev/null +++ b/samples/testGI/prog/build.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +import sys +sys.path.append('../../..') +from build_all import run, run_per_platform, DABUILD_CMD, BUILD_COMPONENTS +sys.path.pop() + + +# build EXE +if 'code' in BUILD_COMPONENTS: + run('jam') + +# build shaders +if 'shaders' in BUILD_COMPONENTS: + run_per_platform( + cmds_windows = ['compile_shaders_dx12.bat', 'compile_shaders_dx11.bat', 'compile_shaders_metal.bat', 'compile_shaders_spirv.bat', + 'compile_shaders_tools.bat'], + cmds_macOS = ['./compile_shaders_metal.sh', './compile_tool_shaders_metal.sh'], + cmds_linux = ['./compile_shaders_spirv.sh', './compile_tool_shaders_spirv.sh'], + cwd='./shaders') + +# dabuild assets +if 'assets' in BUILD_COMPONENTS: + run(DABUILD_CMD + ['../application.blk'], cwd='../develop')