mirror of
https://onedev.site.tesses.net/crosslang
synced 2026-05-10 21:40:20 +00:00
Add single file runtime binaries
This commit is contained in:
28
src/programs/crosslangdump.cpp
Normal file
28
src/programs/crosslangdump.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "CrossLang.hpp"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
using namespace Tesses::Framework;
|
||||
using namespace Tesses::CrossLang;
|
||||
using namespace Tesses::Framework::Filesystem;
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
TF_InitWithConsole();
|
||||
if(argc > 0)
|
||||
TF_AllowPortable(argv[0]);
|
||||
|
||||
for(int i = 1; i < argc; i++)
|
||||
{
|
||||
VFSPath path(argv[i]);
|
||||
if(LocalFS->FileExists(path))
|
||||
{
|
||||
std::cout << "File: " << path.ToString() << std::endl;
|
||||
auto strm = LocalFS->OpenFile(path, "rb");
|
||||
Programs::CrossLangDump(strm);
|
||||
}
|
||||
else {
|
||||
std::cout << "File: " << path.ToString() << " does not exist." << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user