Fix build.bat file.
This commit is contained in:
42
first.jai
Normal file
42
first.jai
Normal file
@@ -0,0 +1,42 @@
|
||||
#import "Basic";
|
||||
#import "File";
|
||||
#import "Compiler";
|
||||
|
||||
build :: () {
|
||||
w := compiler_create_workspace("Shader Compiler Test Build");
|
||||
if !w {
|
||||
print("Workspace creation failed.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
EXECUTABLE_NAME :: "test";
|
||||
MAIN_FILE :: "Test.jai";
|
||||
|
||||
options := get_build_options(w);
|
||||
|
||||
options.write_added_strings = true;
|
||||
|
||||
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();
|
||||
Reference in New Issue
Block a user