Files
AnyPS5/core/relinker/cli/include/Cli.hpp
T
Eli Yarson 346b0a92ca feat(relinker): add conversion-time game patches
A per-game relinker-patches.toml (or --patches) replaces verified bytes in
the input executable and bundled modules before conversion. Entries are
checked against the expected bytes and against every in-place writer,
the ELF header range and relocation targets. An <output-stem>.patches.toml
manifest records the applied entries, and --verify-patches checks an input
or a converted output. With no patch file the output is unchanged.
2026-10-18 14:57:13 -03:00

52 lines
1.3 KiB
C++

#ifndef CORE_RELINKER_CLI_INCLUDE_CLI_HPP
#define CORE_RELINKER_CLI_INCLUDE_CLI_HPP
#include <set>
#include <string>
#include <vector>
#include <cstdint>
#include <optional>
namespace Cli {
struct Args {
bool showHelp = false;
bool skipSyscallCheck = false;
bool trapSdkSyscallStubs = false;
bool skipSceModule = false;
bool toIntel = false;
bool toRosetta = false;
bool writeRegistry = false;
bool toWindows = false;
bool toMacos = false;
bool lazyBinding = false;
bool autorun = false;
bool windowsDiagnostics = false;
bool windowsGui = false;
std::optional<std::uint64_t> windowsFixedBase;
bool traceImports = false;
std::optional<std::uint64_t> linuxFixedBase;
std::uint32_t unusedFilterLevel = 0;
std::string inputPath;
std::string outputPath;
std::string sceModulePath;
std::string patchesPath;
bool noPatches = false;
std::string verifyPatchesPath;
bool verifyOutput = false;
std::string runPath = "$ORIGIN/libs";
std::set<std::string> excludedSceModules;
std::vector<std::string> moduleDirectories;
std::vector<std::string> executables;
};
Args ParseArgs(int argc, char* argv[]);
const char* Usage();
int Autorun(const std::string& absPath, bool toWindows);
}
#endif