Mercurial > games > semicongine
diff config.nims @ 979:6406766a222d
fix: tests
author | sam <sam@basx.dev> |
---|---|
date | Sat, 06 Apr 2024 15:27:09 +0700 |
parents | fe48b091e83f |
children | 5934c5615f13 |
line wrap: on
line diff
--- a/config.nims Fri Apr 05 23:19:45 2024 +0700 +++ b/config.nims Sat Apr 06 15:27:09 2024 +0700 @@ -12,7 +12,19 @@ semicongine_build_switches(buildname = "dev") setCommand "c" let outdir = semicongine_builddir(buildname = "dev") - semicongine_pack(outdir, bundleType = "exe", resourceRoot = "resources") + semicongine_pack(outdir, bundleType = "exe", resourceRoot = "tests/resources", withSteam = false) + +task build_dev_zip, "build dev zip": + semicongine_build_switches(buildname = "dev") + setCommand "c" + let outdir = semicongine_builddir(buildname = "dev") + semicongine_pack(outdir, bundleType = "zip", resourceRoot = "tests/resources", withSteam = false) + +task build_dev_dir, "build dev dir": + semicongine_build_switches(buildname = "dev") + setCommand "c" + let outdir = semicongine_builddir(buildname = "dev") + semicongine_pack(outdir, bundleType = "dir", resourceRoot = "tests/resources", withSteam = false) task build_release, "build release": switch "define", "release" @@ -20,7 +32,7 @@ semicongine_build_switches(buildname = "release") setCommand "c" let outdir = semicongine_builddir(buildname = "release") - semicongine_pack(outdir, bundleType = "exe", resourceRoot = "resources") + semicongine_pack(outdir, bundleType = "exe", resourceRoot = "tests/resources", withSteam = false) task build_all_debug, "build all examples for debug": @@ -36,11 +48,11 @@ task test_all, "Run all test programs": for file in listFiles("tests"): if file.endsWith(".nim") and not file.endsWith("test_resources.nim"): - exec(&"nim build --run {file}") + exec(&"nim build_dev --run {file}") - exec("nim build -d:BUILD_RESOURCEROOT=tests/resources -d:PACKAGETYPE=dir --run tests/test_resources.nim") - exec("nim build -d:BUILD_RESOURCEROOT=tests/resources -d:PACKAGETYPE=zip --run tests/test_resources.nim") - exec("nim build -d:BUILD_RESOURCEROOT=tests/resources -d:PACKAGETYPE=exe --run tests/test_resources.nim") + exec("nim build_dev --run tests/test_resources.nim") + exec("nim build_dev_zip --run tests/test_resources.nim") + exec("nim build_dev_dir --run tests/test_resources.nim") task publish, "publish all build": for file in listDirs("build/debug/linux"):