dehydrate release v9

This commit is contained in:
Your Name 2025-05-21 21:35:13 +12:00
parent 8bab3d0426
commit fba807a958
2 changed files with 4 additions and 3 deletions

View File

@ -1 +1 @@
static const char *VERSION = "8";
static const char *VERSION = "9";

View File

@ -110,7 +110,7 @@ static bool _recreate_file_(const std::filesystem::path& outpath, uint64_t file_
if (needs_write) {
bool existed = fs::exists(outpath);
fs::create_directories(outpath.parent_path());
std::ofstream out(outpath, std::ios::binary);
out.write(reinterpret_cast<const char*>(filedata), filedata_len);
@ -145,6 +145,7 @@ void generate_file_code(const std::string& source, const std::string& destfolder
std::string ns = "recreate_" + sanitize(src.stem().string());
std::string cppname = "_" + src.stem().string() + ".cpp";
std::string hppname = "_" + src.stem().string() + ".hpp";
std::string bothname = "_" + src.stem().string() + "{.cpp,hpp}";
fs::create_directories(dest);
std::ifstream in(source, std::ios::binary);
std::ostringstream oss;
@ -221,7 +222,7 @@ bool recreate_file(std::string destination_folder) {
cpp << "}\n";
if (!silent) {
std::cout << "[dehydrate] Generated: " << (dest / cppname) << ", " << (dest / hppname) << std::endl;
std::cout << "[dehydrate] Generated: " << (dest / bothname) << std::endl;
}
}