-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathoriginal.v
More file actions
33 lines (24 loc) · 694 Bytes
/
original.v
File metadata and controls
33 lines (24 loc) · 694 Bytes
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
module builder
import os
//https://www.creationkit.com/index.php?title=Papyrus_Compiler_Reference
@[inline]
fn (mut b Builder) compile_original() {
mut header_dirs := ""
for path in b.pref.header_dirs {
header_dirs += '${path}' + ";"
}
header_dirs = header_dirs[..header_dirs.len-1]
for file in b.files {
cmd := '"${compiler_exe_path}" "${file}" -quiet -i="${header_dirs}" -o="${b.pref.output_dir}" -f="${compiler_flags_path}"'
b.print("executing: `${cmd}`")
res := unsafe { os.raw_execute(cmd) }
if res.exit_code == 0 {
b.print('successfully - ${file}')
}
else {
b.print('failed - ${file}')
b.print('console output:')
b.print(res.output)
}
}
}