diff --git a/scripts/kiwix-compile-resources b/scripts/kiwix-compile-resources index 65262ffa8..e4993ba68 100755 --- a/scripts/kiwix-compile-resources +++ b/scripts/kiwix-compile-resources @@ -106,16 +106,8 @@ master_c_template = """//This file is automaically generated. Do not modify it. #include #include -#include #include "{include_file}" -class ResourceNotFound : public std::runtime_error {{ - public: - ResourceNotFound(const std::string& what_arg): - std::runtime_error(what_arg) - {{ }}; -}}; - static std::string init_resource(const char* name, const unsigned char* content, int len) {{ char * resPath = getenv(name); @@ -153,11 +145,19 @@ master_h_template = """//This file is automaically generated. Do not modify it. #define KIWIX_{BASENAME} #include +#include namespace RESOURCE {{ {RESOURCES} }}; +class ResourceNotFound : public std::runtime_error {{ + public: + ResourceNotFound(const std::string& what_arg): + std::runtime_error(what_arg) + {{ }}; +}}; + const std::string& getResource_{basename}(const std::string& name); #define getResource(a) (getResource_{basename}(a))