updated docs, got win32 build working in platform folder

This commit is contained in:
Allen Webster 2017-06-30 14:20:34 -04:00
parent 1f615a9756
commit 1298496ae7
8 changed files with 30 additions and 5 deletions

View File

@ -580,6 +580,10 @@ DOC_PARAM(name, The name parameter specifies the buffer name to try to get. The
DOC_PARAM(len, The len parameter specifies the length of the name string.) DOC_PARAM(len, The len parameter specifies the length of the name string.)
DOC_PARAM(access, The access parameter determines what levels of protection this call can access.) DOC_PARAM(access, The access parameter determines what levels of protection this call can access.)
DOC_RETURN(This call returns a summary that describes the indicated buffer if it exists and is accessible.) DOC_RETURN(This call returns a summary that describes the indicated buffer if it exists and is accessible.)
DOC(This call searches the buffers by their buffer name. The buffer name is the short name in the file bar. The name must match exactly including any alterations put on the buffer name to avoid duplicates.)
DOC_SEE(get_buffer_by_file_name)
DOC_SEE(Buffer_Summary) DOC_SEE(Buffer_Summary)
DOC_SEE(Access_Flag) DOC_SEE(Access_Flag)
*/{ */{
@ -599,7 +603,20 @@ DOC_SEE(Access_Flag)
} }
API_EXPORT Buffer_Summary API_EXPORT Buffer_Summary
Get_Buffer_By_File_Name(Application_Links *app, char *name, int32_t len, Access_Flag access){ Get_Buffer_By_File_Name(Application_Links *app, char *name, int32_t len, Access_Flag access)
/*
DOC_PARAM(name, The name parameter specifies the buffer name to try to get. The string need not be null terminated.)
DOC_PARAM(len, The len parameter specifies the length of the name string.)
DOC_PARAM(access, The access parameter determines what levels of protection this call can access.)
DOC_RETURN(This call returns a summary that describes the indicated buffer if it exists and is accessible.)
DOC(This call searches the buffers by their canonicalized file names. Not all buffers have file names, only buffers that are tied to files. For instance *scratch* does not have a file name. Every file has one canonicalized file name. For instance on windows this involves converting w:/a/b into W:\a\b. If the name passed is not canonicalized a canonicalized copy is made first. This includes turning relative paths to files that exist into full paths. So the passed in name can be relative to the working directory.)
DOC_SEE(get_buffer_by_name)
DOC_SEE(Buffer_Summary)
DOC_SEE(Access_Flag)
*/
{
Command_Data *cmd = (Command_Data*)app->cmd_context; Command_Data *cmd = (Command_Data*)app->cmd_context;
Buffer_Summary buffer = {0}; Buffer_Summary buffer = {0};
System_Functions *system = cmd->system; System_Functions *system = cmd->system;

View File

@ -152,7 +152,7 @@ init_build_line(Build_Line *line){
#define CL_X86 "-MACHINE:X86" #define CL_X86 "-MACHINE:X86"
static void static void
build(u32 flags, char *code_path, char *code_file, char *out_path, char *out_file, char *exports){ build(u32 flags, char *code_path, char **code_files, char *out_path, char *out_file, char *exports, char *inc_flags){
Build_Line line; Build_Line line;
init_build_line(&line); init_build_line(&line);
@ -186,6 +186,10 @@ build(u32 flags, char *code_path, char *code_file, char *out_path, char *out_fil
build_ap(line, CL_SITE_INCLUDES); build_ap(line, CL_SITE_INCLUDES);
} }
if (inc_flags != 0 && inc_flags[0] != 0){
build_ap(line, "%s", inc_flags);
}
if (flags & LIBS){ if (flags & LIBS){
if (flags & X86){ if (flags & X86){
build_ap(line, CL_LIBS_X86); build_ap(line, CL_LIBS_X86);
@ -241,12 +245,16 @@ build(u32 flags, char *code_path, char *code_file, char *out_path, char *out_fil
} }
build_ap(link_line, "%s", link_type_string); build_ap(link_line, "%s", link_type_string);
for (u32 i = 0; code_files[i]; ++i){
build_ap(line, "\"%s\\%s\"", code_path, code_files[i]);
}
swap_ptr(&line.build_options, &line.build_options_prev); swap_ptr(&line.build_options, &line.build_options_prev);
swap_ptr(&link_line.build_options, &link_line.build_options_prev); swap_ptr(&link_line.build_options, &link_line.build_options_prev);
swap_ptr(&line_prefix.build_options, &line_prefix.build_options_prev); swap_ptr(&line_prefix.build_options, &line_prefix.build_options_prev);
Temp_Dir temp = pushdir(out_path); Temp_Dir temp = pushdir(out_path);
systemf("%scl %s \"%s\\%s\" /Fe%s /link /INCREMENTAL:NO %s", line_prefix.build_options, line.build_options, code_path, code_file, out_file, link_line.build_options); systemf("%scl %s /Fe%s /link /INCREMENTAL:NO %s", line_prefix.build_options, line.build_options, out_file, link_line.build_options);
popdir(temp); popdir(temp);
} }
@ -415,9 +423,9 @@ buildsuper(char *code_path, char *out_path, char *filename, b32 x86_build){
#if defined(IS_WINDOWS) #if defined(IS_WINDOWS)
char *PLAT_LAYER[] = { "win32_4ed.cpp", 0 }; char *PLAT_LAYER[] = { "platform_win32\\win32_4ed.cpp", 0 };
# if defined(IS_CL) # if defined(IS_CL)
# define PLAT_INC "/I..\\code\\platform_all" # define PLAT_INC "/I..\\code /I..\\code\\platform_all"
# else # else
# error PLAT_INC not defines for this compiler/platform combo # error PLAT_INC not defines for this compiler/platform combo
# endif # endif