annotate config.nims @ 149:0aa18fe8f7f1

add: base code structure for cross-platform sound
author Sam <sam@basx.dev>
date Thu, 27 Apr 2023 00:36:45 +0700
parents 5e19aead2b61
children 93f661a20f74
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
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
5 const BUILDBASE = "build"
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
6 const DEBUG = "debug"
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
7 const RELEASE = "release"
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
8 const LINUX = "linux"
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
9 const WINDOWS = "windows"
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
10
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
11 proc compilerFlags() =
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
12 switch("path", "src")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
13 switch("mm", "orc")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
14 switch("experimental", "strictEffects")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
15 switch("threads", "on")
83
5e19aead2b61 add: new vulkan api wrapper, not done yet
Sam <sam@basx.dev>
parents: 82
diff changeset
16 if defined(linux):
5e19aead2b61 add: new vulkan api wrapper, not done yet
Sam <sam@basx.dev>
parents: 82
diff changeset
17 switch("define", "VK_USE_PLATFORM_XLIB_KHR")
5e19aead2b61 add: new vulkan api wrapper, not done yet
Sam <sam@basx.dev>
parents: 82
diff changeset
18 if defined(windows):
5e19aead2b61 add: new vulkan api wrapper, not done yet
Sam <sam@basx.dev>
parents: 82
diff changeset
19 switch("define", "VK_USE_PLATFORM_WIN32_KHR")
5e19aead2b61 add: new vulkan api wrapper, not done yet
Sam <sam@basx.dev>
parents: 82
diff changeset
20
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
21
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
22 proc compilerFlagsDebug() =
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
23 switch("debugger", "native")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
24 switch("checks", "on")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
25 switch("assertions", "on")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
26
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
27 proc compilerFlagsRelease() =
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
28 switch("define", "release")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
29 switch("checks", "off")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
30 switch("assertions", "off")
54
a24c6b87ae83 fix: use console for debug buids
Sam <sam@basx.dev>
parents: 53
diff changeset
31 switch("app", "gui")
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
32
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
33 task single_linux_debug, "build linux debug":
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
34 compilerFlags()
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
35 compilerFlagsDebug()
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
36 switch("outdir", BUILDBASE / DEBUG / LINUX)
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
37 setCommand "c"
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
38 mkDir(BUILDBASE / DEBUG / LINUX)
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
39
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
40 task single_linux_release, "build linux release":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
41 compilerFlags()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
42 compilerFlagsRelease()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
43 switch("outdir", BUILDBASE / RELEASE / LINUX)
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
44 setCommand "c"
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
45 mkDir(BUILDBASE / RELEASE / LINUX)
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
46
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
47 task single_windows_debug, "build windows debug":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
48 compilerFlags()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
49 compilerFlagsDebug()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
50 switch("outdir", BUILDBASE & "/" & DEBUG & "/" & WINDOWS)
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
51 setCommand "c"
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
52 mkDir(BUILDBASE & "/" & DEBUG & "/" & WINDOWS)
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
53
46
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
54
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
55 task single_windows_release, "build windows release":
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
56 compilerFlags()
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
57 compilerFlagsRelease()
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
58 switch("outdir", BUILDBASE & "/" & RELEASE & "/" & WINDOWS)
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
59 setCommand "c"
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
60 mkDir(BUILDBASE & "/" & RELEASE & "/" & WINDOWS)
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
61
46
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
62 task single_crosscompile_windows_debug, "build crosscompile windows debug":
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
63 switch("define", "mingw")
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
64 single_windows_debugTask()
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
65
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
66 task single_crosscompile_windows_release, "build crosscompile windows release":
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
67 switch("define", "mingw")
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
68 single_windows_releaseTask()
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
69
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
70 task build_all_linux_debug, "build all examples with linux/debug":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
71 for file in listFiles("examples"):
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
72 if file.endsWith(".nim"):
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
73 selfExec(&"single_linux_debug {file}")
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
74
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
75 task build_all_linux_release, "build all examples with linux/release":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
76 for file in listFiles("examples"):
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
77 if file.endsWith(".nim"):
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
78 selfExec(&"single_linux_release {file}")
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
79
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
80 task build_all_windows_debug, "build all examples with windows/debug":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
81 for file in listFiles("examples"):
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
82 if file.endsWith(".nim"):
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
83 exec(&"nim single_windows_debug --define:mingw {file}")
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
84
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
85 task build_all_windows_release, "build all examples with windows/release":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
86 for file in listFiles("examples"):
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
87 if file.endsWith(".nim"):
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
88 exec(&"nim single_windows_release --define:mingw {file}")
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
89
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
90 task build_all_debug, "build all examples with */debug":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
91 build_all_linux_debugTask()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
92 build_all_windows_debugTask()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
93
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
94 task build_all_release, "build all examples with */release":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
95 build_all_linux_releaseTask()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
96 build_all_windows_releaseTask()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
97
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
98 task build_all_linux, "build all examples with linux/*":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
99 build_all_linux_debugTask()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
100 build_all_linux_releaseTask()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
101
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
102 task build_all_windows, "build all examples with windows/*":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
103 build_all_windows_debugTask()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
104 build_all_windows_releaseTask()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
105
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
106 task build_all, "build all examples":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
107 build_all_linuxTask()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
108 build_all_windowsTask()
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
109
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
110 task clean, "remove all build files":
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
111 exec(&"rm -rf {BUILDBASE}")
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
112
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
113 task publish, "publish all build":
53
4c3891eb9ef9 add: improve build on windows
Sam <sam@basx.dev>
parents: 46
diff changeset
114 for file in listFiles("build/debug/linux"):
4c3891eb9ef9 add: improve build on windows
Sam <sam@basx.dev>
parents: 46
diff changeset
115 exec(&"scp {file} sam@mail.basx.dev:/var/www/public.basx.dev/semicongine/debug/linux/")
4c3891eb9ef9 add: improve build on windows
Sam <sam@basx.dev>
parents: 46
diff changeset
116 for file in listFiles("build/release/linux"):
4c3891eb9ef9 add: improve build on windows
Sam <sam@basx.dev>
parents: 46
diff changeset
117 exec(&"scp {file} sam@mail.basx.dev:/var/www/public.basx.dev/semicongine/release/linux/")
4c3891eb9ef9 add: improve build on windows
Sam <sam@basx.dev>
parents: 46
diff changeset
118 for file in listFiles("build/debug/windows"):
4c3891eb9ef9 add: improve build on windows
Sam <sam@basx.dev>
parents: 46
diff changeset
119 exec(&"scp {file} sam@mail.basx.dev:/var/www/public.basx.dev/semicongine/debug/windows/")
4c3891eb9ef9 add: improve build on windows
Sam <sam@basx.dev>
parents: 46
diff changeset
120 for file in listFiles("build/release/windows"):
4c3891eb9ef9 add: improve build on windows
Sam <sam@basx.dev>
parents: 46
diff changeset
121 exec(&"scp {file} sam@mail.basx.dev:/var/www/public.basx.dev/semicongine/release/windows/")
4c3891eb9ef9 add: improve build on windows
Sam <sam@basx.dev>
parents: 46
diff changeset
122
36
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
123 task glslangValidator, "Download glslangValidator (required for linux compilation)":
62
7153eadb07eb fix: some formatting, bug when opening on windows.
Sam <sam@basx.dev>
parents: 55
diff changeset
124 let dirname = "/tmp/glslang_download"
36
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
125 exec &"mkdir -p {dirname}"
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
126 exec &"cd {dirname} && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip"
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
127 exec &"cd {dirname} && unzip *.zip"
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
128 exec &"mv {dirname}/bin/glslangValidator examples/"
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
129 exec &"rm -rf {dirname}"
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
130
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
131 task glslangValidator_exe, "Download glslangValidator.exe (required for windows compilation)":
62
7153eadb07eb fix: some formatting, bug when opening on windows.
Sam <sam@basx.dev>
parents: 55
diff changeset
132 let dirname = "/tmp/glslang_download"
36
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
133 exec &"mkdir -p {dirname}"
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
134 exec &"cd {dirname} && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Release.zip"
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
135 exec &"cd {dirname} && unzip *.zip"
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
136 exec &"mv {dirname}/bin/glslangValidator.exe examples/"
2979b69eef55 did: migrate rest of make functionality
Sam <sam@basx.dev>
parents: 35
diff changeset
137 exec &"rm -rf {dirname}"
33
94c38e4b5782 did: refactoring, move more from make to nimscript
Sam <sam@basx.dev>
parents: 24
diff changeset
138
62
7153eadb07eb fix: some formatting, bug when opening on windows.
Sam <sam@basx.dev>
parents: 55
diff changeset
139 task run_all, "Run all binaries":
39
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
140 for file in listFiles("build/debug/linux"):
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
141 exec file
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
142 for file in listFiles("build/release/linux"):
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
143 exec file
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
144 for file in listFiles("build/debug/windows"):
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
145 exec &"wine {file}"
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
146 for file in listFiles("build/release/windows"):
0cb294c5d2fd fix: hello cube, add: run_all command
Sam <sam@basx.dev>
parents: 38
diff changeset
147 exec &"wine {file}"
46
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
148
78
f67496a189cb add: vulkan api generator, not finished yet
Sam <sam@basx.dev>
parents: 62
diff changeset
149 task get_vulkan_wrapper, "Download vulkan wrapper":
f67496a189cb add: vulkan api generator, not finished yet
Sam <sam@basx.dev>
parents: 62
diff changeset
150 exec &"curl https://raw.githubusercontent.com/nimgl/nimgl/master/src/nimgl/vulkan.nim > src/semicongine/vulkan/c_api.nim"
f67496a189cb add: vulkan api generator, not finished yet
Sam <sam@basx.dev>
parents: 62
diff changeset
151
f67496a189cb add: vulkan api generator, not finished yet
Sam <sam@basx.dev>
parents: 62
diff changeset
152 const api_generator_name = "vulkan_api_generator"
f67496a189cb add: vulkan api generator, not finished yet
Sam <sam@basx.dev>
parents: 62
diff changeset
153
f67496a189cb add: vulkan api generator, not finished yet
Sam <sam@basx.dev>
parents: 62
diff changeset
154 task generate_vulkan_api, "Generate Vulkan API":
f67496a189cb add: vulkan api generator, not finished yet
Sam <sam@basx.dev>
parents: 62
diff changeset
155 selfExec &"c -d:ssl --run src/vulkan_api/{api_generator_name}.nim"
82
9e7937b7bcc8 did: complete vulkan api generator pipeline for now
Sam <sam@basx.dev>
parents: 78
diff changeset
156 mkDir "src/semicongine/vulkan/"
9e7937b7bcc8 did: complete vulkan api generator pipeline for now
Sam <sam@basx.dev>
parents: 78
diff changeset
157 cpFile "src/vulkan_api/output/api.nim", "src/semicongine/vulkan/api.nim"
9e7937b7bcc8 did: complete vulkan api generator pipeline for now
Sam <sam@basx.dev>
parents: 78
diff changeset
158 cpDir "src/vulkan_api/output/platform", "src/semicongine/vulkan/platform"
78
f67496a189cb add: vulkan api generator, not finished yet
Sam <sam@basx.dev>
parents: 62
diff changeset
159
46
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
160 if getCommand() in ["c", "compile", "r", "dump", "check", "idetools"]:
9e81f06a5c57 add: some changes to build on windows host
Sam <sam@basx.dev>
parents: 44
diff changeset
161 compilerFlags()