output editor_include to src dir

This commit is contained in:
jacob 2025-07-29 16:23:29 -05:00
parent 0b12e8b650
commit 7edf600db8

View File

@ -476,7 +476,7 @@ void OnBuild(StringList cli_args)
Bool should_embed_in_rc = !!arg_msvc; Bool should_embed_in_rc = !!arg_msvc;
D_Tag executable_file = D_TagFromPath(&perm, StringF(&perm, Lit("%F/PowerPlay.exe"), FmtStr(out_bin_dir_path)), D_TagKind_File); D_Tag executable_file = D_TagFromPath(&perm, StringF(&perm, Lit("%F/PowerPlay.exe"), FmtStr(out_bin_dir_path)), D_TagKind_File);
D_Tag editor_include_file = D_TagFromPath(&perm, StringF(&perm, Lit("build/editor_include.h")), D_TagKind_File); D_Tag editor_include_file = D_TagFromPath(&perm, Lit("src/editor_include.h"), D_TagKind_File);
D_Tag dxc_dir = D_TagFromPath(&perm, out_dxc_dir_path, D_TagKind_Dir); D_Tag dxc_dir = D_TagFromPath(&perm, out_dxc_dir_path, D_TagKind_Dir);
D_Tag res_dir = D_TagFromPath(&perm, Lit("res"), D_TagKind_Dir); D_Tag res_dir = D_TagFromPath(&perm, Lit("res"), D_TagKind_Dir);
D_Tag icon_file = D_TagFromPath(&perm, Lit("icon.ico"), D_TagKind_File); D_Tag icon_file = D_TagFromPath(&perm, Lit("icon.ico"), D_TagKind_File);
@ -1043,7 +1043,9 @@ void OnBuild(StringList cli_args)
for (D_TagListNode *n = header_files.first; n; n = n->next) for (D_TagListNode *n = header_files.first; n; n = n->next)
{ {
D_Tag tag = n->tag; D_Tag tag = n->tag;
String include_path = tag.full_path; String name = D_GetName(tag);
String name_no_extension = StringPathNoExtension(name);
String include_path = StringF(&perm, Lit("%F/%F"), FmtStr(name_no_extension), FmtStr(name));
String line = StringF(&perm, Lit("#include \"%F\""), FmtStr(include_path)); String line = StringF(&perm, Lit("#include \"%F\""), FmtStr(include_path));
StringListAppend(&perm, &file_contents, line); StringListAppend(&perm, &file_contents, line);
} }