diff --git a/src/tesseswebserver.cpp b/src/tesseswebserver.cpp index 6d867c6..0eb9656 100644 --- a/src/tesseswebserver.cpp +++ b/src/tesseswebserver.cpp @@ -1,3 +1,4 @@ +#if !defined(DISABLE_TWS) #include "tesseswebserver.hpp" #if defined(GEKKO) #include @@ -99,4 +100,5 @@ int main(int argc,char** argv) HttpServerListener::FreeServer(); return 0; -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/wwwgen.cpp b/wwwgen.cpp index c9693a4..6631ac9 100644 --- a/wwwgen.cpp +++ b/wwwgen.cpp @@ -378,7 +378,7 @@ int main(int argc,char** argv) std::vector resources; get_files(resources, indexes, enableListing,source,"/"); - std::string cls = "#pragma once\n/* Generated via wwwgen */\n#include \n#include \n#include \n#include \n#include \nclass " + name + "Resource {public: std::vector data; std::string mime; std::string path; bool isScript; " + name + "Resource(std::string path, std::string mime,bool isScript, std::initializer_list data) {this->path = path; this->mime = mime; this->isScript=isScript; this->data = data;} };\nclass " + name + " : public Tesses::WebServer::IServer {\n"; + std::string cls = "#pragma once\n/* Generated via wwwgen */\n#include \n#include \n#include \n#include \n#include \"tesseswebserver.hpp\"\nclass " + name + "Resource {public: std::vector data; std::string mime; std::string path; bool isScript; " + name + "Resource(std::string path, std::string mime,bool isScript, std::initializer_list data) {this->path = path; this->mime = mime; this->isScript=isScript; this->data = data;} };\nclass " + name + " : public Tesses::WebServer::IServer {\n"; if(enableScripts) {