Files
Ink-Shader-Language/first.jai
Niels Bross 603b625e21 Rename of files, improved for handling, add cb hints
- Rename Test to Ink as main file
- Support more errors for for loops.
- Add hints to cbs
2025-09-02 11:55:27 +02:00

53 lines
935 B
Plaintext

#import "Basic";
#import "File";
#import "Compiler";
build :: () {
w := compiler_create_workspace("Ink Build");
if !w {
print("Workspace creation failed.\n");
return;
}
EXECUTABLE_NAME :: "ink";
MAIN_FILE :: "Ink.jai";
options := get_build_options(w);
options.write_added_strings = true;
args := options.compile_time_command_line;
for arg : args {
if arg == {
case "check"; {
options.output_type = .NO_OUTPUT;
}
}
}
new_path: [..] string;
array_add(*new_path, ..options.import_path);
array_add(*new_path, "modules");
// array_add(*new_path, "modules/shader_parsing");
options.import_path = new_path;
options.output_executable_name = EXECUTABLE_NAME;
wd := get_working_directory();
set_build_options(options, w);
compiler_begin_intercept(w);
add_build_file(MAIN_FILE, w);
compiler_end_intercept(w);
print("\nDone!\n\n");
set_build_options_dc(.{do_output=false});
}
#run build();