* fix a link flag * another hack to find weirdly named libraries * Fix handling VCRedistInstall.exe * add src folders to win-scons include paths * use path.join * more weird library suffixes * fix old python syntax in an SConscript file * find vcpkg libraries and headers * add icon dir to windows include paths * remove non-recursive os.listdir line * remove bad lib paths * tools build with env["bits"] * hard-code vcvarsall.bat path, with a note * pass in other lib paths * fix syntax without trying to use f-strings * more bundled libs on windows * add bin folders for windows installation to find dlls * fix CheckLib stuff * test scons pass X86 correctly * make 64-bit builds the default for scons * add package flag for building installers
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
|
|
import subprocess
|
|
|
|
Import("env platform party_classes common_sources")
|
|
arch_short = '64' if (env['bits'] == '64') else '86'
|
|
|
|
# Add path to scons
|
|
env.Append(CPPPATH=['./deps/Catch2/single_include'])
|
|
|
|
test_sources = Glob("""*.cpp""") + Split("""
|
|
#build/obj/scenedit/scen.fileio.cpp
|
|
""")
|
|
|
|
if str(platform) == "win32" and 'msvc' in env["TOOLS"]:
|
|
test = env.Program("#build/bin/boe_test", party_classes + common_sources + test_sources, LINKFLAGS=f'/nologo /SUBSYSTEM:CONSOLE /MACHINE:X{arch_short}')
|
|
else:
|
|
test = env.Program("#build/bin/boe_test", test_sources + party_classes + common_sources)
|
|
|
|
def run_tests(env,target,source):
|
|
import subprocess
|
|
app = str(source[0].abspath)
|
|
if not subprocess.call(app):
|
|
open(target[0].abspath,'w').write("PASSED\n")
|
|
|
|
env.Install("#build/test/", test)
|
|
env.AlwaysBuild(env.Install("#build/test/", Dir("#test/files")))
|
|
env.AlwaysBuild(env.Install("#build/rsrc/", Dir("#rsrc/strings")))
|
|
env.Command("#build/test/junk/", '', 'mkdir "' + Dir("#build/test/junk").path + '"')
|
|
env.Command("#build/test/passed", test, run_tests, chdir=True)
|