mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-04-23 01:01:26 +00:00
35 lines
684 B
C++
35 lines
684 B
C++
#include "pch.h"
|
|
#include "test_recompiler.h"
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
const char* path =
|
|
#ifdef CONFIG_FILE_PATH
|
|
CONFIG_FILE_PATH
|
|
#else
|
|
argv[1]
|
|
#endif
|
|
;
|
|
|
|
if (std::filesystem::is_regular_file(path))
|
|
{
|
|
Recompiler recompiler;
|
|
recompiler.LoadConfig(path);
|
|
recompiler.Analyse();
|
|
|
|
auto entry = recompiler.image.symbols.find(recompiler.image.entry_point);
|
|
if (entry != recompiler.image.symbols.end())
|
|
{
|
|
entry->name = "_xstart";
|
|
}
|
|
|
|
recompiler.Recompile();
|
|
}
|
|
else
|
|
{
|
|
TestRecompiler::RecompileTests(path, argv[2]);
|
|
}
|
|
|
|
return 0;
|
|
}
|