diff --git a/include/version.hpp b/include/version.hpp index 4e79690..8b0d5cf 100644 --- a/include/version.hpp +++ b/include/version.hpp @@ -1 +1 @@ -static const char *VERSION = "8"; +static const char *VERSION = "9"; diff --git a/src/generator.cpp b/src/generator.cpp index 2ea79c9..fcf1c4d 100644 --- a/src/generator.cpp +++ b/src/generator.cpp @@ -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(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; } }