Restructure bin/: deployables at root, tests and tools in subfolders
Only the shipping artifacts (coop_host.exe, coop_hook.dll, coop_hook_x86.dll, coop_inject_x86.exe, steam_api64.dll, steam_input_actions.vdf) now land in the bin/<config>/ root, so it can be copied wholesale into a donor game folder. Test exes (plus the coop_tone fixture) build into bin/<config>/tests/ and the dev probes into bin/<config>/tools/, via a new coop_output_subdir() CMake helper. The probes resolve coop_hook.dll / the x86 injector from the deployable root one level up (new common/coop/tool_paths.hpp: deployed_artifact_path checks next-to-exe then parent). coop_tone is co-located with the tests so audio_loopback_test's "spawn coop_tone.exe next to me" lookup is unchanged. Verified from a clean bin/: root holds only deployables; ctest x64 7/7 and x86 3/3 green (incl. audio_loopback_test driving coop_tone from tests/). Also convert the roadmap Planned list to bullets and drop this (now-done) item. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -4,3 +4,4 @@
|
||||
add_executable(coop_audio_probe main.cpp)
|
||||
target_link_libraries(coop_audio_probe PRIVATE coop_common)
|
||||
set_target_properties(coop_audio_probe PROPERTIES OUTPUT_NAME "coop_audio_probe")
|
||||
coop_output_subdir(tools coop_audio_probe) # dev tool -> bin/<config>/tools/
|
||||
|
||||
@@ -23,21 +23,16 @@
|
||||
#include "coop/log_ring.hpp"
|
||||
#include "coop/protocol.hpp"
|
||||
#include "coop/shared_memory.hpp"
|
||||
#include "coop/tool_paths.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
// coop_hook.dll ships in the deployable bin/<config>/ root; this probe runs from
|
||||
// bin/<config>/tools/, so resolve next-to-self first, then one level up.
|
||||
std::wstring dll_path_next_to_self()
|
||||
{
|
||||
wchar_t exe[MAX_PATH] = {};
|
||||
GetModuleFileNameW(nullptr, exe, MAX_PATH);
|
||||
std::wstring path(exe);
|
||||
const size_t slash = path.find_last_of(L"\\/");
|
||||
if (slash != std::wstring::npos)
|
||||
{
|
||||
path.resize(slash + 1);
|
||||
}
|
||||
return path + L"coop_hook.dll";
|
||||
return coop::deployed_artifact_path(L"coop_hook.dll");
|
||||
}
|
||||
|
||||
std::wstring sibling_of(const std::wstring& path, const wchar_t* name)
|
||||
|
||||
Reference in New Issue
Block a user