From b242920d19ca36040dd2a29b4b1f8b2fca4d6843 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Mon, 23 Sep 2024 22:43:47 -0500 Subject: [PATCH] Finished WWWGen --- src/tesseswebserver.cpp | 4 +++- wwwgen.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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) {