From db22a6da7931fededa4a0e22bc9e37ae438904d5 Mon Sep 17 00:00:00 2001 From: roblabla Date: Wed, 13 Dec 2023 00:34:48 +0100 Subject: [PATCH 1/2] Correctly name PDB file After the switch to ninja, the PDB file was named th06e.exe.pdb, which broke a lot of tools that assume the debug file is in th06e.pdb. This commit fixes it by passing the correct name to link.exe. --- scripts/configure.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/configure.py b/scripts/configure.py index bd1a48e0..0a0162e6 100644 --- a/scripts/configure.py +++ b/scripts/configure.py @@ -52,7 +52,8 @@ def configure(build_type): writer.rule("as", "$gas -o $out $in") writer.rule("rc", "$rc /fo $out $in") writer.rule( - "link", "$link /out:$out $link_flags /debug /pdb:$out.pdb $link_libs $in" + "link", + """cmd /c "for %F in ("$out") do $link /out:%F $link_flags /debug /pdb:%~pdnF.pdb $link_libs $in" """, ) writer.rule( "copyicon", From 5a06751de8cd15ec9af8ec743e75b883df239b9f Mon Sep 17 00:00:00 2001 From: roblabla Date: Mon, 18 Dec 2023 23:03:05 +0100 Subject: [PATCH 2/2] Rename Supervisor::Parse to Supervisor::LoadConfig --- config/implemented.csv | 2 +- src/Supervisor.cpp | 2 +- src/Supervisor.hpp | 2 +- src/main.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/implemented.csv b/config/implemented.csv index 9564dfbf..094a772a 100644 --- a/config/implemented.csv +++ b/config/implemented.csv @@ -43,7 +43,7 @@ FileSystem::WriteDataToFile Supervisor::AddedCallback Supervisor::LoadPbg3 Supervisor::RegisterChain -Supervisor::Parse +Supervisor::LoadConfig InitD3dDevice InitD3dRendering Clear diff --git a/src/Supervisor.cpp b/src/Supervisor.cpp index fc0a81b7..bab48dac 100644 --- a/src/Supervisor.cpp +++ b/src/Supervisor.cpp @@ -31,7 +31,7 @@ i32 InitD3dInterface(void) } // TODO: Not a perfect match. -ZunResult Supervisor::Parse(char *path) +ZunResult Supervisor::LoadConfig(char *path) { u8 *data; FILE *wavFile; diff --git a/src/Supervisor.hpp b/src/Supervisor.hpp index 0d6862bb..7a4c555c 100644 --- a/src/Supervisor.hpp +++ b/src/Supervisor.hpp @@ -86,7 +86,7 @@ struct Supervisor i32 LoadPbg3(i32 pbg3FileIdx, char *filename); void ReleasePbg3(i32 pbg3FileIdx); - ZunResult Parse(char *path); + ZunResult LoadConfig(char *path); void TickTimer(i32 *frames, f32 *subframes); diff --git a/src/main.cpp b/src/main.cpp index 1ef4569c..1ad499db 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -504,7 +504,7 @@ int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL g_Supervisor.hInstance = hInstance; - if (g_Supervisor.Parse(TH_CONFIG_FILE) != ZUN_SUCCESS) + if (g_Supervisor.LoadConfig(TH_CONFIG_FILE) != ZUN_SUCCESS) { g_GameErrorContext.Flush(); return -1;