diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-18 12:23:28 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-18 12:23:28 -0500 |
commit | e239b66691200163c1983b645c28b34825f32ea4 (patch) | |
tree | bad2b6a2f685462504898855880f8e84fbd69a28 /build.c | |
parent | 14811a586d77ab9a1fa8bef360250992aead55d1 (diff) |
:build working on windows
Diffstat (limited to 'build.c')
-rw-r--r-- | build.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -45,17 +45,22 @@ static void build_start(Ted *ted) { if (cargo) { program = "cargo"; argv[0] = "build"; + } else if (fs_file_exists("make.bat")) { + program = "make.bat"; } else { program = "make"; } #endif - process_exec(&ted->build_process, program, argv); - ted->building = true; - ted->build_shown = true; - buffer_new_file(&ted->build_buffer, NULL); - ted->build_buffer.store_undo_events = false; // don't need undo events for build output buffer - ted->build_buffer.view_only = true; + if (process_exec(&ted->build_process, program, argv)) { + ted->building = true; + ted->build_shown = true; + buffer_new_file(&ted->build_buffer, NULL); + ted->build_buffer.store_undo_events = false; // don't need undo events for build output buffer + ted->build_buffer.view_only = true; + } else { + ted_seterr("Couldn't start build: %s", process_geterr(&ted->build_process)); + } } static void build_stop(Ted *ted) { |