diff options
| author | gingerBill <bill@gingerbill.org> | 2021-04-26 20:54:18 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-04-26 20:54:18 +0100 |
| commit | 43942a61991e32a821bb577457e0a15aa4178e16 (patch) | |
| tree | ab650d3dc06fc6ae20c557a74774a7b69faecdbb /src/main.cpp | |
| parent | 53c7e65c57ff0042a0851781712d8fc1e5cae8be (diff) | |
Fix `odin run` on Windows
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index f1563477e..c34377bfa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2184,10 +2184,15 @@ int main(int arg_count, char const **arg_ptr) { remove_temp_files(gen.output_base); if (run_output) { + #if defined(GB_SYSTEM_WINDOWS) + return system_exec_command_line_app("odin run", "%.*s.exe %.*s", LIT(gen.output_base), LIT(run_args_string)); + #else + //NOTE(thebirk): This whole thing is a little leaky String output_ext = {}; String complete_path = concatenate_strings(heap_allocator(), gen.output_base, output_ext); complete_path = path_to_full_path(heap_allocator(), complete_path); return system_exec_command_line_app("odin run", "\"%.*s\" %.*s", LIT(complete_path), LIT(run_args_string)); + #endif } return 0; |