Update InspireFace to 1.1.6

This commit is contained in:
tunm
2024-07-17 08:53:50 +08:00
parent b9c1d8bdba
commit 3a8dd7710f
30 changed files with 1278 additions and 426 deletions

View File

@@ -58,17 +58,17 @@ int main(int argc, char* argv[]) {
std::string packPath;
// Add command line options
auto cli = session.cli()
| Catch::clara::Opt(pack, "value")["--pack"]("Resource pack filename")
| Catch::clara::Opt(testDir, "value")["--test_dir"]("Test dir resource")
| Catch::clara::Opt(packPath, "value")["--pack_path"]("The specified path to the pack file");
auto cli =
session.cli() | Catch::clara::Opt(pack, "value")["--pack"]("Resource pack filename") |
Catch::clara::Opt(testDir, "value")["--test_dir"]("Test dir resource") |
Catch::clara::Opt(packPath, "value")["--pack_path"]("The specified path to the pack file");
// Set combined CLI to the session
session.cli(cli);
// Parse command line arguments
int returnCode = session.applyCommandLine(argc, argv);
if (returnCode != 0) // Indicate an error
if (returnCode != 0) // Indicate an error
return returnCode;
if (!testDir.empty()) {
@@ -84,12 +84,15 @@ int main(int argc, char* argv[]) {
SET_PACK_NAME(pack);
fullPath = GET_MODEL_FILE();
TEST_PRINT("Updated global Pack to: {}", TEST_MODEL_FILE);
SET_RUNTIME_FULLPATH_NAME(fullPath);
} else if (!packPath.empty()) {
fullPath = packPath;
TEST_PRINT("Updated global Pack File to: {}", packPath);
SET_RUNTIME_FULLPATH_NAME(packPath);
} else {
fullPath = GET_MODEL_FILE();
TEST_PRINT("Using default global Pack: {}", TEST_MODEL_FILE);
SET_RUNTIME_FULLPATH_NAME(fullPath);
}
std::cout << fullPath << std::endl;
@@ -102,5 +105,8 @@ int main(int argc, char* argv[]) {
// Set log level
HFSetLogLevel(HF_LOG_INFO);
return session.run();
ret = session.run();
HFTerminateInspireFace();
HFDeBugShowResourceStatistics();
return ret;
}