annotate config.nims @ 1346:e6fdd7327847

add: option to bind descriptor without pipeline, but only pipeline layout
author sam <sam@basx.dev>
date Tue, 27 Aug 2024 19:53:24 +0700
parents 3cd5fd36150e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
1 import std/strformat
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
2 import std/strutils
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
3 import std/os
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
4
1271
3cd5fd36150e fix: config still revering to v2
sam <sam@basx.dev>
parents: 1223
diff changeset
5 import semicongine/build
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
6
950
fe48b091e83f did: tons of small improvments, on the way to make GPU sync (more) correct I guess
sam <sam@basx.dev>
parents: 438
diff changeset
7 task build_dev, "build dev":
fe48b091e83f did: tons of small improvments, on the way to make GPU sync (more) correct I guess
sam <sam@basx.dev>
parents: 438
diff changeset
8 semicongine_build_switches(buildname = "dev")
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
9 setCommand "c"
950
fe48b091e83f did: tons of small improvments, on the way to make GPU sync (more) correct I guess
sam <sam@basx.dev>
parents: 438
diff changeset
10 let outdir = semicongine_builddir(buildname = "dev")
979
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
11 semicongine_pack(outdir, bundleType = "exe", resourceRoot = "tests/resources", withSteam = false)
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
12
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
13 task build_dev_zip, "build dev zip":
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
14 semicongine_build_switches(buildname = "dev")
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
15 setCommand "c"
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
16 let outdir = semicongine_builddir(buildname = "dev")
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
17 semicongine_pack(outdir, bundleType = "zip", resourceRoot = "tests/resources", withSteam = false)
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
18
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
19 task build_dev_dir, "build dev dir":
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
20 semicongine_build_switches(buildname = "dev")
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
21 setCommand "c"
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
22 let outdir = semicongine_builddir(buildname = "dev")
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
23 semicongine_pack(outdir, bundleType = "dir", resourceRoot = "tests/resources", withSteam = false)
950
fe48b091e83f did: tons of small improvments, on the way to make GPU sync (more) correct I guess
sam <sam@basx.dev>
parents: 438
diff changeset
24
fe48b091e83f did: tons of small improvments, on the way to make GPU sync (more) correct I guess
sam <sam@basx.dev>
parents: 438
diff changeset
25 task build_release, "build release":
fe48b091e83f did: tons of small improvments, on the way to make GPU sync (more) correct I guess
sam <sam@basx.dev>
parents: 438
diff changeset
26 switch "define", "release"
fe48b091e83f did: tons of small improvments, on the way to make GPU sync (more) correct I guess
sam <sam@basx.dev>
parents: 438
diff changeset
27 switch "app", "gui"
fe48b091e83f did: tons of small improvments, on the way to make GPU sync (more) correct I guess
sam <sam@basx.dev>
parents: 438
diff changeset
28 semicongine_build_switches(buildname = "release")
fe48b091e83f did: tons of small improvments, on the way to make GPU sync (more) correct I guess
sam <sam@basx.dev>
parents: 438
diff changeset
29 setCommand "c"
fe48b091e83f did: tons of small improvments, on the way to make GPU sync (more) correct I guess
sam <sam@basx.dev>
parents: 438
diff changeset
30 let outdir = semicongine_builddir(buildname = "release")
979
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
31 semicongine_pack(outdir, bundleType = "exe", resourceRoot = "tests/resources", withSteam = false)
950
fe48b091e83f did: tons of small improvments, on the way to make GPU sync (more) correct I guess
sam <sam@basx.dev>
parents: 438
diff changeset
32
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
33
213
b5d9410a8184 add: resource packaging and loading for different resource types, simplify build commands, update readme
Sam <sam@basx.dev>
parents: 207
diff changeset
34 task build_all_debug, "build all examples for debug":
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
35 for file in listFiles("examples"):
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
36 if file.endsWith(".nim"):
213
b5d9410a8184 add: resource packaging and loading for different resource types, simplify build commands, update readme
Sam <sam@basx.dev>
parents: 207
diff changeset
37 exec(&"nim build {file}")
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
38
213
b5d9410a8184 add: resource packaging and loading for different resource types, simplify build commands, update readme
Sam <sam@basx.dev>
parents: 207
diff changeset
39 task build_all_release, "build all examples for release":
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
40 for file in listFiles("examples"):
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
41 if file.endsWith(".nim"):
213
b5d9410a8184 add: resource packaging and loading for different resource types, simplify build commands, update readme
Sam <sam@basx.dev>
parents: 207
diff changeset
42 exec(&"nim build -d:release {file}")
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
43
316
b145a05c2459 add: changing rendering system, not finished yet, also upgrading to Nim 2
Sam <sam@basx.dev>
parents: 273
diff changeset
44 task test_all, "Run all test programs":
b145a05c2459 add: changing rendering system, not finished yet, also upgrading to Nim 2
Sam <sam@basx.dev>
parents: 273
diff changeset
45 for file in listFiles("tests"):
438
1ab09f8cc68d did: refactor and improve packaging API
Sam <sam@basx.dev>
parents: 383
diff changeset
46 if file.endsWith(".nim") and not file.endsWith("test_resources.nim"):
979
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
47 exec(&"nim build_dev --run {file}")
316
b145a05c2459 add: changing rendering system, not finished yet, also upgrading to Nim 2
Sam <sam@basx.dev>
parents: 273
diff changeset
48
979
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
49 exec("nim build_dev --run tests/test_resources.nim")
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
50 exec("nim build_dev_zip --run tests/test_resources.nim")
6406766a222d fix: tests
sam <sam@basx.dev>
parents: 950
diff changeset
51 exec("nim build_dev_dir --run tests/test_resources.nim")
438
1ab09f8cc68d did: refactor and improve packaging API
Sam <sam@basx.dev>
parents: 383
diff changeset
52
62
7153eadb07eb fix: some formatting, bug when opening on windows.
Sam <sam@basx.dev>
parents: 55
diff changeset
53 task run_all, "Run all binaries":
39
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
54 for file in listFiles("build/debug/linux"):
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
55 exec file
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
56 for file in listFiles("build/release/linux"):
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
57 exec file
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
58 for file in listFiles("build/debug/windows"):
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
59 exec &"wine {file}"
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
60 for file in listFiles("build/release/windows"):
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
61 exec &"wine {file}"
46
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
62
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
63 if getCommand() in ["c", "compile", "r", "dump", "check", "idetools"]:
213
b5d9410a8184 add: resource packaging and loading for different resource types, simplify build commands, update readme
Sam <sam@basx.dev>
parents: 207
diff changeset
64 if defined(linux):
438
1ab09f8cc68d did: refactor and improve packaging API
Sam <sam@basx.dev>
parents: 383
diff changeset
65 --d: VK_USE_PLATFORM_XLIB_KHR
213
b5d9410a8184 add: resource packaging and loading for different resource types, simplify build commands, update readme
Sam <sam@basx.dev>
parents: 207
diff changeset
66 if defined(windows):
438
1ab09f8cc68d did: refactor and improve packaging API
Sam <sam@basx.dev>
parents: 383
diff changeset
67 --d: VK_USE_PLATFORM_WIN32_KHR