Move tools in their own folder instead of Bigfoot Sources
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
/*********************************************************************
|
||||
* \file main.cpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date August 2026
|
||||
*********************************************************************/
|
||||
#include <System/File/File.hpp>
|
||||
|
||||
#include <Utils/Log/LogMacros.hpp>
|
||||
#include <Utils/TargetMacros.h>
|
||||
|
||||
#include <SasquatchBaker/SasquatchBaker.hpp>
|
||||
|
||||
#include <EASTL/string_view.h>
|
||||
#include <lyra/lyra.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
BIGFOOT_NOT_OPTIMIZED_ONLY(::Bigfoot::Singleton<::Bigfoot::Log>::Lifetime logLifetime);
|
||||
|
||||
bool showHelp = false;
|
||||
std::string bigFilePath;
|
||||
std::string outputPath;
|
||||
|
||||
const auto& cli = lyra::help(showHelp) |
|
||||
lyra::opt(bigFilePath, "bigfile")["-b"]["--bigfile"]("The BigFile to bake (must exist)")
|
||||
.required() |
|
||||
lyra::opt(outputPath, "output")["-o"]["--output"]("The Sasquatch file to write").required();
|
||||
|
||||
const lyra::parse_result result = cli.parse({argc, argv});
|
||||
if (!result)
|
||||
{
|
||||
std::cerr << result.message() << "\n\n" << cli << '\n';
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (showHelp)
|
||||
{
|
||||
std::cout << cli << '\n';
|
||||
return 0;
|
||||
}
|
||||
|
||||
const Bigfoot::BigFile bigFile {Bigfoot::File {eastl::string_view {bigFilePath.c_str()}}};
|
||||
Bigfoot::Bake(bigFile, Bigfoot::File {eastl::string_view {outputPath.c_str()}});
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user