Put all OSes on the same command execution rule in build commands
This commit is contained in:
parent
d12c4aa2e6
commit
18f7f6e67a
|
@ -63,7 +63,7 @@ standard_build_exec_command(Application_Links *app, View_ID view, String_Const_u
|
|||
standard_build_exec_flags);
|
||||
}
|
||||
|
||||
function b32
|
||||
function b32
|
||||
standard_search_and_build_from_dir(Application_Links *app, View_ID view, String_Const_u8 start_dir){
|
||||
Scratch_Block scratch(app);
|
||||
|
||||
|
@ -82,15 +82,9 @@ standard_search_and_build_from_dir(Application_Links *app, View_ID view, String_
|
|||
if (result){
|
||||
// NOTE(allen): Build
|
||||
String_Const_u8 path = string_remove_last_folder(full_file_path);
|
||||
#if OS_WINDOWS
|
||||
String_Const_u8 command = push_u8_stringf(scratch, "\"%.*s/%.*s\"",
|
||||
string_expand(path),
|
||||
string_expand(cmd_string));
|
||||
#elif OS_LINUX || OS_MAC
|
||||
String_Const_u8 command = cmd_string;
|
||||
#else
|
||||
#error OS needs standard search and build rules
|
||||
#endif
|
||||
if (global_config.automatically_save_changes_on_build){
|
||||
save_all_dirty_buffers(app);
|
||||
}
|
||||
|
@ -153,7 +147,7 @@ get_or_open_build_panel(Application_Links *app){
|
|||
return(view);
|
||||
}
|
||||
|
||||
function void
|
||||
function void
|
||||
set_fancy_compilation_buffer_font(Application_Links *app){
|
||||
Buffer_ID buffer = get_comp_buffer(app);
|
||||
Font_Load_Location font = {};
|
||||
|
|
|
@ -258,12 +258,12 @@ static Command_Metadata fcoder_metacmd_table[229] = {
|
|||
{ PROC_LINKS(backspace_alpha_numeric_boundary, 0), false, "backspace_alpha_numeric_boundary", 32, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 154 },
|
||||
{ PROC_LINKS(backspace_char, 0), false, "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 96 },
|
||||
{ PROC_LINKS(basic_change_active_panel, 0), false, "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 611 },
|
||||
{ PROC_LINKS(build_in_build_panel, 0), false, "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 165 },
|
||||
{ PROC_LINKS(build_search, 0), false, "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 128 },
|
||||
{ PROC_LINKS(build_in_build_panel, 0), false, "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 159 },
|
||||
{ PROC_LINKS(build_search, 0), false, "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 122 },
|
||||
{ PROC_LINKS(center_view, 0), false, "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 197 },
|
||||
{ PROC_LINKS(change_active_panel, 0), false, "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 284 },
|
||||
{ PROC_LINKS(change_active_panel_backwards, 0), false, "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 290 },
|
||||
{ PROC_LINKS(change_to_build_panel, 0), false, "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 186 },
|
||||
{ PROC_LINKS(change_to_build_panel, 0), false, "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 180 },
|
||||
{ PROC_LINKS(clean_all_lines, 0), false, "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 576 },
|
||||
{ PROC_LINKS(clear_all_themes, 0), false, "clear_all_themes", 16, "Clear the theme list", 20, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 480 },
|
||||
{ PROC_LINKS(click_set_cursor, 0), false, "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 233 },
|
||||
|
@ -271,7 +271,7 @@ static Command_Metadata fcoder_metacmd_table[229] = {
|
|||
{ PROC_LINKS(click_set_cursor_if_lbutton, 0), false, "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 243 },
|
||||
{ PROC_LINKS(click_set_mark, 0), false, "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 255 },
|
||||
{ PROC_LINKS(close_all_code, 0), false, "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 842 },
|
||||
{ PROC_LINKS(close_build_panel, 0), false, "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 180 },
|
||||
{ PROC_LINKS(close_build_panel, 0), false, "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 174 },
|
||||
{ PROC_LINKS(close_panel, 0), false, "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 619 },
|
||||
{ PROC_LINKS(command_documentation, 0), true, "command_documentation", 21, "Prompts the user to select a command then loads a doc buffer for that item", 74, "/Users/allenwebster/4ed/code/custom/4coder_docs.cpp", 51, 190 },
|
||||
{ PROC_LINKS(command_lister, 0), true, "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "/Users/allenwebster/4ed/code/custom/4coder_lists.cpp", 52, 753 },
|
||||
|
|
Loading…
Reference in New Issue