fixing things up for MSVC 2017 build
This commit is contained in:
parent
12c8b920d2
commit
0373016da3
|
@ -11,7 +11,7 @@ SET BUILD_MODE=%1
|
||||||
if "%BUILD_MODE%" == "" (SET BUILD_MODE="/DDEV_BUILD")
|
if "%BUILD_MODE%" == "" (SET BUILD_MODE="/DDEV_BUILD")
|
||||||
|
|
||||||
pushd ..\build
|
pushd ..\build
|
||||||
cl %OPTS% ..\code\meta\build.cpp /Zi /Febuild %BUILD_MODE%
|
cl %OPTS% kernel32.lib ..\code\meta\build.cpp /Zi /Febuild %BUILD_MODE%
|
||||||
if %ERRORLEVEL% neq 0 (set FirstError=1)
|
if %ERRORLEVEL% neq 0 (set FirstError=1)
|
||||||
if %ERRORLEVEL% neq 0 (goto END)
|
if %ERRORLEVEL% neq 0 (goto END)
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#define IS_64BIT
|
#define IS_64BIT
|
||||||
|
|
||||||
#define BEGIN_TIME_SECTION() uint64_t start = get_time()
|
#define BEGIN_TIME_SECTION() uint64_t start = get_time()
|
||||||
#define END_TIME_SECTION(n) uint64_t total = get_time() - start; printf("%-20s: %.2lu.%.6lu\n", (n), total/1000000, total%1000000);
|
#define END_TIME_SECTION(n) uint64_t total = get_time() - start; printf("%-20s: %.2llu.%.6llu\n", (n), total/1000000, total%1000000);
|
||||||
|
|
||||||
//
|
//
|
||||||
// 4coder specific
|
// 4coder specific
|
||||||
|
@ -230,7 +230,7 @@ build_cl(u32 flags, char *code_path, char *code_file, char *out_path, char *out_
|
||||||
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 \"%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);
|
||||||
popdir(temp);
|
popdir(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,7 +468,7 @@ build_main(char *cdir, u32 flags){
|
||||||
{
|
{
|
||||||
DECL_STR(file, "4ed_app_target.cpp");
|
DECL_STR(file, "4ed_app_target.cpp");
|
||||||
BEGIN_TIME_SECTION();
|
BEGIN_TIME_SECTION();
|
||||||
build(OPTS | INCLUDES | SHARED_CODE | flags, cdir, file, dir, "4ed_app"DLL, "/EXPORT:app_get_functions");
|
build(OPTS | INCLUDES | SHARED_CODE | flags, cdir, file, dir, "4ed_app" DLL, "/EXPORT:app_get_functions");
|
||||||
END_TIME_SECTION("build 4ed_app");
|
END_TIME_SECTION("build 4ed_app");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -624,8 +624,8 @@ package(char *cdir){
|
||||||
clear_folder(par_dir);
|
clear_folder(par_dir);
|
||||||
make_folder_if_missing(dir, "3rdparty");
|
make_folder_if_missing(dir, "3rdparty");
|
||||||
make_folder_if_missing(pack_dir, zip_dir);
|
make_folder_if_missing(pack_dir, zip_dir);
|
||||||
copy_file(build_dir, "4ed"EXE, dir, 0, 0);
|
copy_file(build_dir, "4ed" EXE, dir, 0, 0);
|
||||||
copy_file(build_dir, "4ed_app"DLL, dir, 0, 0);
|
copy_file(build_dir, "4ed_app" DLL, dir, 0, 0);
|
||||||
copy_all (pack_data_dir, "*", dir);
|
copy_all (pack_data_dir, "*", dir);
|
||||||
copy_file(0, "README.txt", dir, 0, 0);
|
copy_file(0, "README.txt", dir, 0, 0);
|
||||||
copy_file(0, "TODO.txt", dir, 0, 0);
|
copy_file(0, "TODO.txt", dir, 0, 0);
|
||||||
|
@ -692,11 +692,9 @@ package(char *cdir){
|
||||||
make_folder_if_missing(dir, "3rdparty");
|
make_folder_if_missing(dir, "3rdparty");
|
||||||
make_folder_if_missing(pack_dir, zip_dir);
|
make_folder_if_missing(pack_dir, zip_dir);
|
||||||
|
|
||||||
copy_file(build_dir, "4ed"EXE, dir, 0, 0);
|
copy_file(build_dir, "4ed" EXE, dir, 0, 0);
|
||||||
//ONLY_WINDOWS(copy_file(build_dir, "4ed"PDB, dir, 0, 0));
|
copy_file(build_dir, "4ed_app" DLL, dir, 0, 0);
|
||||||
copy_file(build_dir, "4ed_app"DLL, dir, 0, 0);
|
copy_file(build_dir, "custom_4coder" DLL, dir, 0, 0);
|
||||||
//ONLY_WINDOWS(copy_file(build_dir, "4ed_app"PDB, dir, 0, 0));
|
|
||||||
copy_file(build_dir, "custom_4coder"DLL, dir, 0, 0);
|
|
||||||
|
|
||||||
copy_all (pack_data_dir, "*", dir);
|
copy_all (pack_data_dir, "*", dir);
|
||||||
copy_file(0, "README.txt", dir, 0, 0);
|
copy_file(0, "README.txt", dir, 0, 0);
|
||||||
|
@ -705,7 +703,7 @@ package(char *cdir){
|
||||||
|
|
||||||
copy_all(0, "4coder_*", dir);
|
copy_all(0, "4coder_*", dir);
|
||||||
|
|
||||||
copy_file(0, "buildsuper"BAT, dir, 0, 0);
|
copy_file(0, "buildsuper" BAT, dir, 0, 0);
|
||||||
|
|
||||||
DECL_STR(custom_dir, "4coder_API");
|
DECL_STR(custom_dir, "4coder_API");
|
||||||
DECL_STR(custom_helper_dir, "4coder_helper");
|
DECL_STR(custom_helper_dir, "4coder_helper");
|
||||||
|
@ -720,18 +718,18 @@ package(char *cdir){
|
||||||
};
|
};
|
||||||
i32 dir_count = ArrayCount(dir_array);
|
i32 dir_count = ArrayCount(dir_array);
|
||||||
|
|
||||||
for (i32 i = 0; i < dir_count; ++i){
|
for (i32 j = 0; j < dir_count; ++j){
|
||||||
char *d = dir_array[i];
|
char *d = dir_array[j];
|
||||||
make_folder_if_missing(dir, d);
|
make_folder_if_missing(dir, d);
|
||||||
|
|
||||||
char space[256];
|
char space[256];
|
||||||
String str = make_fixed_width_string(space);
|
String copy_name = make_fixed_width_string(space);
|
||||||
append_sc(&str, dir);
|
append_sc(©_name, dir);
|
||||||
append_s_char(&str, platform_correct_slash);
|
append_s_char(©_name, platform_correct_slash);
|
||||||
append_sc(&str, d);
|
append_sc(©_name, d);
|
||||||
terminate_with_null(&str);
|
terminate_with_null(©_name);
|
||||||
|
|
||||||
copy_all(d, "*", str.str);
|
copy_all(d, "*", copy_name.str);
|
||||||
}
|
}
|
||||||
|
|
||||||
get_4coder_dist_name(&str, true, zip_dir, tier, arch, "zip");
|
get_4coder_dist_name(&str, true, zip_dir, tier, arch, "zip");
|
||||||
|
|
|
@ -284,7 +284,7 @@ typedef enum Doc_Note_Type{
|
||||||
} Doc_Note_Type;
|
} Doc_Note_Type;
|
||||||
|
|
||||||
static String
|
static String
|
||||||
doc_note_string[] = {
|
defined_doc_notes[] = {
|
||||||
make_lit_string("DOC_PARAM"),
|
make_lit_string("DOC_PARAM"),
|
||||||
make_lit_string("DOC_RETURN"),
|
make_lit_string("DOC_RETURN"),
|
||||||
make_lit_string("DOC"),
|
make_lit_string("DOC"),
|
||||||
|
@ -446,7 +446,7 @@ perform_doc_parse(Partition *part, String doc_string, Documentation *doc){
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
int32_t doc_note_type;
|
int32_t doc_note_type;
|
||||||
if (string_set_match(doc_note_string, ArrayCount(doc_note_string), doc_note, &doc_note_type)){
|
if (string_set_match(defined_doc_notes, ArrayCount(defined_doc_notes), doc_note, &doc_note_type)){
|
||||||
|
|
||||||
doc_parse_note_string(doc_string, &pos);
|
doc_parse_note_string(doc_string, &pos);
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ perform_doc_parse(Partition *part, String doc_string, Documentation *doc){
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
int32_t doc_note_type;
|
int32_t doc_note_type;
|
||||||
if (string_set_match(doc_note_string, ArrayCount(doc_note_string), doc_note, &doc_note_type)){
|
if (string_set_match(defined_doc_notes, ArrayCount(defined_doc_notes), doc_note, &doc_note_type)){
|
||||||
|
|
||||||
String doc_note_string = doc_parse_note_string(doc_string, &pos);
|
String doc_note_string = doc_parse_note_string(doc_string, &pos);
|
||||||
|
|
||||||
|
@ -760,10 +760,10 @@ static int32_t
|
||||||
enum_parse(Partition *part, Parse_Context *context, Item_Node *item){
|
enum_parse(Partition *part, Parse_Context *context, Item_Node *item){
|
||||||
int32_t result = false;
|
int32_t result = false;
|
||||||
|
|
||||||
String doc_string = {0};
|
String parent_doc_string = {0};
|
||||||
get_doc_string_from_prev(context, &doc_string);
|
get_doc_string_from_prev(context, &parent_doc_string);
|
||||||
|
|
||||||
Cpp_Token *start_token = get_token(context);
|
Cpp_Token *parent_start_token = get_token(context);
|
||||||
Cpp_Token *token = 0;
|
Cpp_Token *token = 0;
|
||||||
|
|
||||||
for (; (token = get_token(context)) != 0; get_next_token(context)){
|
for (; (token = get_token(context)) != 0; get_next_token(context)){
|
||||||
|
@ -773,7 +773,7 @@ enum_parse(Partition *part, Parse_Context *context, Item_Node *item){
|
||||||
}
|
}
|
||||||
|
|
||||||
if (token){
|
if (token){
|
||||||
String name = {0};
|
String parent_name = {0};
|
||||||
Cpp_Token *token_j = 0;
|
Cpp_Token *token_j = 0;
|
||||||
|
|
||||||
for (; (token_j = get_token(context)) != 0; get_prev_token(context)){
|
for (; (token_j = get_token(context)) != 0; get_prev_token(context)){
|
||||||
|
@ -782,10 +782,10 @@ enum_parse(Partition *part, Parse_Context *context, Item_Node *item){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
name = get_lexeme(*token_j, context->data);
|
parent_name = get_lexeme(*token_j, context->data);
|
||||||
|
|
||||||
set_token(context, token);
|
set_token(context, token);
|
||||||
for (; (token = get_token(context)) > start_token; get_next_token(context)){
|
for (; (token = get_token(context)) > parent_start_token; get_next_token(context)){
|
||||||
if (token->type == CPP_TOKEN_BRACE_OPEN){
|
if (token->type == CPP_TOKEN_BRACE_OPEN){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -855,8 +855,8 @@ enum_parse(Partition *part, Parse_Context *context, Item_Node *item){
|
||||||
get_next_token(context);
|
get_next_token(context);
|
||||||
|
|
||||||
item->t = Item_Enum;
|
item->t = Item_Enum;
|
||||||
item->name = name;
|
item->name = parent_name;
|
||||||
item->doc_string = doc_string;
|
item->doc_string = parent_doc_string;
|
||||||
item->first_child = first_member;
|
item->first_child = first_member;
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue