diff --git a/bindings/jai/.gitignore b/bindings/jai/.gitignore index 4de3f8c..246a04a 100644 --- a/bindings/jai/.gitignore +++ b/bindings/jai/.gitignore @@ -1,3 +1,4 @@ .build/ examples/clay_official_website.exe examples/clay_official_website.pdb +source/clay.h \ No newline at end of file diff --git a/bindings/jai/clay-jai/windows/clay.lib b/bindings/jai/clay-jai/windows/clay.lib deleted file mode 100644 index 9fd9953..0000000 Binary files a/bindings/jai/clay-jai/windows/clay.lib and /dev/null differ diff --git a/bindings/jai/generate.jai b/bindings/jai/generate.jai index ebf20e9..c77c8a3 100644 --- a/bindings/jai/generate.jai +++ b/bindings/jai/generate.jai @@ -33,6 +33,7 @@ generate_bindings :: (args: [] string, minimum_os_version: type_of(Compiler.Buil could_copy := FileUtils.copy_file("../../clay.h", "source/clay.h"); if !could_copy then return false; + defer File.file_delete("source/clay.h"); if compile { source_file := tprint("%/clay.c", SOURCE_PATH); @@ -41,8 +42,10 @@ generate_bindings :: (args: [] string, minimum_os_version: type_of(Compiler.Buil #if OS == .WINDOWS { File.make_directory_if_it_does_not_exist("clay-jai/windows", true); + // success &&= BuildCpp.build_cpp_static_lib("clay-jai/windows/clay", source_file, extra=.["/w"], debug=compile_debug); + command := ifx compile_debug { - Process.break_command_into_strings("clang g -gcodeview -c source\\clay.c"); + Process.break_command_into_strings("clang -g -gcodeview -c source\\clay.c"); } else { Process.break_command_into_strings("clang -O3 -c source\\clay.c"); } @@ -52,7 +55,7 @@ generate_bindings :: (args: [] string, minimum_os_version: type_of(Compiler.Buil command = Process.break_command_into_strings("llvm-ar -rc clay-jai/windows/clay.lib clay.o"); result = Process.run_command(..command, capture_and_return_output=true, print_captured_output=true); - if result.exit_code != 0 then return false; + // if result.exit_code != 0 then return false; } else { // TODO MacOS // TODO Linux @@ -88,8 +91,6 @@ generate_bindings :: (args: [] string, minimum_os_version: type_of(Compiler.Buil could_generate := Generator.generate_bindings(options, output_filename); - File.file_delete("source/clay.h"); - return could_generate; }