Closed gvanem closed 9 months ago
ZLIB
is marked as experimental in Civetweb, so we did not include it by default. But I guess it's a good idea to add the mod_zlib.inl
into src/civetweb
.
Ok. And what about the others like openssl_dl.inl
and the mod_lua*.inl
stuff?
I feel something like:
#if defined(WEBUI_TLS) || defined(USE_LUA)
#error "An unsupported feature was detected"
#endif
should be added to webui.c
since it's rather hard to know what is supported in WebUI or not.
Seriously. Thank you @gvanem, for reporting this. While digging into what features WebUI integrated web server should have... while digging I found how much WebUI will be helpful if we can use it with an external powerful web server like NGINX or Apache, or someone like in your case where you want Civetweb to have a specific feature like ZLIB and Lua.
WebUI, since the first day, was designed to only, and only be used with the internal built-in web server. Now, with this commit, and also this one. We can make WebUI use a custom web port, and open a new window with a specific URL. This results in an app that uses NGINX/Apache as a web server for example, while keeping the connection to the back-end using WebUI.
Example:
webui_set_port(win, 9090)
webui.js
link to your HTML files http://localhost:9090/webui.js
webui_show(win, "http://localhost:8080/");
I just discovered this cool project and built
text-editor.exe
using MSVC/clang-cl. And it worked just fine!Now trying to build with
-DUSE_ZLIB
, I get an error from this missing file insrc/civetweb/civetweb.c
:I see in this Civetweb PR that it's merged into that project.
I'm not sure about the relationship between these 2 projects.
I fixed this by just D/L this
"mod_zlib.inl"
from Civetweb's repo. Perhaps it should be added here too? Or add Civetweb's repo to a.gitmodule
?