Skip to content

Commit

Permalink
WebUI v2.3.0 Release
Browse files Browse the repository at this point in the history
* Final WebUI v2.3.0 Release
  • Loading branch information
hassandraga committed May 13, 2023
1 parent bf757a7 commit 914c988
Show file tree
Hide file tree
Showing 29 changed files with 9 additions and 39 deletions.
Binary file modified Release/Windows/GCC/libwebui-2-static-x64.a
Binary file not shown.
Binary file modified Release/Windows/GCC/webui-2-x64.dll
Binary file not shown.
Binary file modified Release/Windows/MSVC/webui-2-static-x64.lib
Binary file not shown.
Binary file modified Release/Windows/MSVC/webui-2-x64.dll
Binary file not shown.
Binary file modified Release/Windows/MSVC/webui-2-x64.lib
Binary file not shown.
Binary file modified Release/Windows/TCC/libwebui-2-static-x64.a
Binary file not shown.
Binary file modified Release/webui-linux-x64-v2.3.0.zip
Binary file not shown.
Binary file modified Release/webui-macos-x64-v2.3.0.zip
Binary file not shown.
Binary file modified Release/webui-windows-x64-v2.3.0.zip
Binary file not shown.
Binary file modified build/Linux/Clang/libwebui-2-static-x64.a
Binary file not shown.
Binary file modified build/Linux/Clang/webui-2-x64.so
Binary file not shown.
Binary file modified build/Linux/GCC/libwebui-2-static-x64.a
Binary file not shown.
Binary file modified build/Linux/GCC/webui-2-x64.so
Binary file not shown.
Binary file modified build/Windows/GCC/libwebui-2-static-x64.a
Binary file not shown.
Binary file modified build/Windows/GCC/webui-2-x64.dll
Binary file not shown.
Binary file modified build/Windows/MSVC/webui-2-static-x64.lib
Binary file not shown.
Binary file modified build/Windows/MSVC/webui-2-x64.dll
Binary file not shown.
Binary file modified build/Windows/MSVC/webui-2-x64.lib
Binary file not shown.
Binary file modified build/Windows/TCC/libwebui-2-static-x64.a
Binary file not shown.
10 changes: 0 additions & 10 deletions build/linux_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ echo "";

cd "$RootPath"

# Golang
cp -f "include/webui.h" "examples/Go/hello_world/webui/webui.h"
cp -f "build/Linux/GCC/libwebui-2-static-x64.a" "examples/Go/hello_world/webui/libwebui-2-static-x64.a"

# Deno
cp -f "build/Linux/GCC/webui-2-x64.so" "examples/TypeScript/Deno/webui-2-x64.so"

# Python
cp -f "build/Linux/GCC/webui-2-x64.so" "examples/Python/PyPI/Package/src/webui/webui-2-x64.so"

# C - Text Editor
cp -f "include/webui.h" "examples/C/text-editor/webui.h"
cp -f "build/Linux/GCC/webui-2-x64.so" "examples/C/text-editor/webui-2-x64.so"
Expand Down
Binary file modified build/macOS/Clang/libwebui-2-static-x64.a
Binary file not shown.
Binary file modified build/macOS/Clang/webui-2-x64.dyn
Binary file not shown.
10 changes: 0 additions & 10 deletions build/macos_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ echo "";

cd "$RootPath"

# Golang
cp -f "include/webui.h" "examples/Go/hello_world/webui/webui.h"
cp -f "build/macOS/Clang/libwebui-2-static-x64.a" "examples/Go/hello_world/webui/libwebui-2-static-x64.a"

# Deno
cp -f "build/macOS/Clang/webui-2-x64.dyn" "examples/TypeScript/Deno/webui-2-x64.dyn"

# Python
cp -f "build/macOS/Clang/webui-2-x64.dyn" "examples/Python/PyPI/Package/src/webui/webui-2-x64.dyn"

# C - Text Editor
cp -f "include/webui.h" "examples/C/text-editor/webui.h"
cp -f "build/macOS/Clang/webui-2-x64.dyn" "examples/C/text-editor/webui-2-x64.dyn"
Expand Down
10 changes: 0 additions & 10 deletions build/windows_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@ echo.

cd "%RootPath%"

REM Golang
copy /Y "include\webui.h" "examples\Go\hello_world\webui\webui.h"
copy /Y "build\Windows\GCC\libwebui-2-static-x64.a" "examples\Go\hello_world\webui\libwebui-2-static-x64.a"

REM Deno
copy /Y "build\Windows\MSVC\webui-2-x64.dll" "examples\TypeScript\Deno\webui-2-x64.dll"

REM Python
copy /Y "build\Windows\MSVC\webui-2-x64.dll" "examples\Python\PyPI\Package\src\webui\webui-2-x64.dll"

REM C++ (Visual Studio 2022)
copy /Y "include\webui.h" "examples\C++\VS2022\serve_a_folder\my_webui_app\webui.h"
copy /Y "include\webui.hpp" "examples\C++\VS2022\serve_a_folder\my_webui_app\webui.hpp"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified examples/C/text-editor/webui-2-x64.dll
Binary file not shown.
18 changes: 9 additions & 9 deletions src/webui.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ char* webui_encode(const char* str) {
size_t buf_len = (((len + 2) / 3) * 4) + 8;
char* buf = (char*) _webui_malloc(buf_len);

int ret = mg_base64_encode(str, len, buf, &buf_len);
int ret = mg_base64_encode((const unsigned char*)str, len, buf, &buf_len);

if(ret > (-1)) {

Expand Down Expand Up @@ -939,7 +939,7 @@ char* webui_decode(const char* str) {
#endif

size_t buf_len = (((len + 2) / 3) * 4) + 8;
char* buf = (char*) _webui_malloc(buf_len);
unsigned char* buf = (unsigned char*) _webui_malloc(buf_len);

int ret = mg_base64_decode(str, len, buf, &buf_len);

Expand All @@ -958,7 +958,7 @@ char* webui_decode(const char* str) {
#endif

// Success
return buf;
return (char*)buf;
}

void webui_free(void* ptr) {
Expand Down Expand Up @@ -1792,7 +1792,7 @@ static int _webui_serve_file(struct mg_connection *conn) {

mg_send_http_error(
conn, 404,
webui_html_res_not_available
"%s", webui_html_res_not_available
);
// _webui_http_send(
// conn, // 200
Expand Down Expand Up @@ -1929,7 +1929,7 @@ static int _webui_interpret_file(_webui_window_t* win, struct mg_connection *con

mg_send_http_error(
conn, 404,
webui_html_res_not_available
"%s", webui_html_res_not_available
);
// _webui_http_send(
// conn, // 200
Expand Down Expand Up @@ -1995,7 +1995,7 @@ static int _webui_interpret_file(_webui_window_t* win, struct mg_connection *con

mg_send_http_error(
conn, 500,
webui_deno_not_found
"%s", webui_deno_not_found
);
// _webui_http_send(
// conn, // 200
Expand Down Expand Up @@ -2044,7 +2044,7 @@ static int _webui_interpret_file(_webui_window_t* win, struct mg_connection *con

mg_send_http_error(
conn, 500,
webui_nodejs_not_found
"%s", webui_nodejs_not_found
);
// _webui_http_send(
// conn, // 200
Expand Down Expand Up @@ -4347,7 +4347,7 @@ static int _webui_http_handler(struct mg_connection *conn, void *_win) {

mg_send_http_error(
conn, 403,
webui_html_served
"%s", webui_html_served
);
// _webui_http_send(
// conn, // 200
Expand Down Expand Up @@ -4376,7 +4376,7 @@ static int _webui_http_handler(struct mg_connection *conn, void *_win) {
// Inject WebUI JS-Bridge into HTML
size_t len = _webui_strlen(win->html) + _webui_strlen(js) + 128;
html = (char*) _webui_malloc(len);
if(html != NULL) {
if(win->html != NULL && js != NULL) {
sprintf(html,
"%s \n <script type = \"text/javascript\"> \n %s \n </script>",
win->html, js
Expand Down
Binary file removed webui.png
Binary file not shown.

0 comments on commit 914c988

Please sign in to comment.