-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.jsn
186 lines (170 loc) · 4.9 KB
/
config.jsn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
{
// configure build tools
tools<windows>: {
pmfx: "hotline-data/bin/win32/pmfx/pmfx.exe"
texturec: "hotline-data/bin/win32/texturec/texturec.exe"
pmfx_dev: "../pmfx-shader/pmfx.py"
}
tools_help: {
pmfx: {
help_arg: "-help"
}
texturec: {
help_arg: "-help"
}
pmfx_dev(pmfx): {}
}
tools_update: {
pmfx: {
tag_name: latest
repository: "https://api.github.com/repos/polymonster/pmfx-shader/releases"
asset_name<windows>: Windows-x64.zip
}
}
// ensure -run always comes last
post_build_order: [
"cargo_examples"
"run"
]
// build client executable and plugin dynamic libs
hotline: {
jsn_vars: {
config_flags: ""
config: "debug"
}
client: {
type: shell
commands: [
"cargo build --manifest-path plugins/Cargo.toml ${config_flags}"
]
}
plugins: {
type: shell
commands: [
"cargo build ${config_flags}"
]
}
}
// generic build jobs, platform agnostic
base: {
jsn_vars: {
data_dir: "target/data"
temp_dir: "target/temp"
src_data_dir: "hotline-data/src"
}
// clean build and temp dirs
clean: {
directories: [
"${data_dir}"
"${temp_dir}"
]
}
// copy generic data
copy_base: {
type: copy
files: [
// copy fonts to data dir
["${src_data_dir}/fonts", "${data_dir}/fonts"]
// default imgui layouts form the client.. todo. move to target
["plugins/imgui.ini", "target/debug/imgui.ini"]
["plugins/imgui.ini", "target/debug/imgui.ini"]
["plugins/imgui.ini", "target/debug/deps/imgui.ini"]
// default user config for the client
["plugins/user_config.json", "target/user_config.json"]
// copy prebuilt dds-textures
["${src_data_dir}/textures/**.dds", "${data_dir}/textures"]
]
}
// convert png, jpg, tga, gif to dds and pack cubemaps / arrays
texturec: {
args: [
"-f %{input_file}"
"%{export_args}"
"-o %{output_file}"
]
files: [
["${src_data_dir}/textures", "${data_dir}/textures"]
]
excludes: [
"*.DS_Store"
"export.jsn"
"*.txt"
"*.dds"
]
change_ext: ".dds"
dependencies: true
}
}
// windows specific data, will also build (base)
win32-data(base): {
pmfx: {
args: [
"-shader_platform hlsl"
"-shader_version 6_0"
"-i ${src_data_dir}/shaders/"
"-o ${data_dir}/shaders"
"-t ${temp_dir}/shaders"
"-num_threads 1"
"-args"
"-Zpr"
]
}
pmfx_dev: {
explicit: true
args: [
"-shader_platform hlsl"
"-shader_version 6_0"
"-i ${src_data_dir}/shaders/"
"-o ${data_dir}/shaders"
"-t ${temp_dir}/shaders"
"-num_threads 1"
"-f"
"-args"
"-Zpr"
]
}
}
// win32 debug client, plugins and data
win32-debug(win32-data, hotline): {
copy: {
files: [
// copies the win pix event run time for inserting pix events
["hotline-data/bin/win32/WinPixEventRuntime.dll", "target/${config}/WinPixEventRuntime.dll"]
["hotline-data/bin/win32/WinPixEventRuntime.dll", "target/${config}/examples/WinPixEventRuntime.dll"]
]
}
// launch client
run: {
explicit: true
type: shell
commands: [
".\\target\\${config}\\client.exe"
]
}
}
// win32 release client, plugins and data
win32-release(win32-debug): {
jsn_vars: {
config_flags: "--release"
config: "release"
}
}
// win32 examples
win32-examples(win32-data): {
cargo_examples: {
type: shell
commands: [
"cargo build --examples"
]
}
}
// runs cargo test single threaded to make it more firendly for using d3d devices and client instances
test: {
cargo_test: {
type: shell
commands: [
"cargo test -- --test-threads=1 --nocapture"
]
}
}
}