2018-05-09 05:22:33 +00:00
|
|
|
/*
|
|
|
|
4coder_project_commands.h - type header paired with 4coder_project_commands.cpp
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
|
|
|
#if !defined(FCODER_PROJECT_COMMANDS_H)
|
|
|
|
#define FCODER_PROJECT_COMMANDS_H
|
|
|
|
|
|
|
|
enum{
|
|
|
|
OpenAllFilesFlag_Recursive = 1,
|
|
|
|
};
|
|
|
|
|
|
|
|
///////////////////////////////
|
|
|
|
|
2018-05-28 05:30:31 +00:00
|
|
|
struct Project_File_Pattern{
|
2019-06-01 23:58:28 +00:00
|
|
|
List_String_Const_u8 absolutes;
|
2018-05-26 07:49:37 +00:00
|
|
|
};
|
|
|
|
|
2018-05-28 05:30:31 +00:00
|
|
|
struct Project_File_Pattern_Array{
|
|
|
|
Project_File_Pattern *patterns;
|
2019-02-26 23:08:42 +00:00
|
|
|
i32 count;
|
2018-05-26 07:49:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Project_File_Load_Path{
|
2019-06-01 23:58:28 +00:00
|
|
|
String_Const_u8 path;
|
2019-02-26 23:08:42 +00:00
|
|
|
b32 recursive;
|
|
|
|
b32 relative;
|
2018-05-26 07:49:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Project_File_Load_Path_Array{
|
|
|
|
Project_File_Load_Path *paths;
|
2019-02-26 23:08:42 +00:00
|
|
|
i32 count;
|
2018-05-26 07:49:37 +00:00
|
|
|
};
|
|
|
|
|
2018-05-28 05:30:31 +00:00
|
|
|
struct Project_Command{
|
2019-06-01 23:58:28 +00:00
|
|
|
String_Const_u8 name;
|
|
|
|
String_Const_u8 cmd;
|
|
|
|
String_Const_u8 out;
|
2019-02-26 23:08:42 +00:00
|
|
|
b32 footer_panel;
|
|
|
|
b32 save_dirty_files;
|
|
|
|
b32 cursor_at_end;
|
2018-05-26 07:49:37 +00:00
|
|
|
};
|
|
|
|
|
2018-05-28 05:30:31 +00:00
|
|
|
struct Project_Command_Array{
|
|
|
|
Project_Command *commands;
|
2019-02-26 23:08:42 +00:00
|
|
|
i32 count;
|
2018-05-09 05:22:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Project{
|
2019-02-26 23:08:42 +00:00
|
|
|
b32 loaded;
|
2018-05-09 05:22:33 +00:00
|
|
|
|
2019-06-01 23:58:28 +00:00
|
|
|
String_Const_u8 dir;
|
|
|
|
String_Const_u8 name;
|
2018-05-09 05:22:33 +00:00
|
|
|
|
2018-05-26 07:49:37 +00:00
|
|
|
Project_File_Pattern_Array pattern_array;
|
|
|
|
Project_File_Pattern_Array blacklist_pattern_array;
|
|
|
|
Project_File_Load_Path_Array load_path_array;
|
|
|
|
Project_Command_Array command_array;
|
|
|
|
|
2019-02-26 23:08:42 +00:00
|
|
|
i32 fkey_commands[16];
|
2018-05-26 07:49:37 +00:00
|
|
|
};
|
|
|
|
|
2019-02-26 23:08:42 +00:00
|
|
|
typedef i32 Project_OS_Match_Level;
|
2018-06-16 20:57:32 +00:00
|
|
|
enum{
|
|
|
|
ProjectOSMatchLevel_NoMatch = 0,
|
|
|
|
ProjectOSMatchLevel_PassiveMatch = 1,
|
|
|
|
ProjectOSMatchLevel_ActiveMatch = 2,
|
|
|
|
};
|
|
|
|
|
2018-05-26 07:49:37 +00:00
|
|
|
struct Project_Parse_Result{
|
|
|
|
Config *parsed;
|
|
|
|
Project *project;
|
2018-05-09 05:22:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
///////////////////////////////
|
|
|
|
|
|
|
|
struct Project_Setup_Status{
|
2019-02-26 23:08:42 +00:00
|
|
|
b32 bat_exists;
|
|
|
|
b32 sh_exists;
|
|
|
|
b32 project_exists;
|
|
|
|
b32 everything_exists;
|
2018-05-09 05:22:33 +00:00
|
|
|
};
|
|
|
|
|
2018-06-02 00:29:36 +00:00
|
|
|
struct Project_Key_Strings{
|
2019-02-26 23:08:42 +00:00
|
|
|
b32 success;
|
2019-06-01 23:58:28 +00:00
|
|
|
String_Const_u8 script_file;
|
|
|
|
String_Const_u8 code_file;
|
|
|
|
String_Const_u8 output_dir;
|
|
|
|
String_Const_u8 binary_file;
|
2018-06-02 00:29:36 +00:00
|
|
|
};
|
|
|
|
|
2019-10-25 23:33:50 +00:00
|
|
|
///////////////////////////////
|
|
|
|
|
|
|
|
struct Project_Command_Lister_Result{
|
|
|
|
b32 success;
|
|
|
|
i32 index;
|
|
|
|
};
|
|
|
|
|
2018-05-09 05:22:33 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// BOTTOM
|
|
|
|
|