mirror of
https://github.com/webui-dev/webui.git
synced 2024-08-16 17:30:25 +03:00
Disable Linux WebView in Dynamic Version
This commit is contained in:
parent
0826a2c5f8
commit
9c07d87041
@ -118,7 +118,7 @@ endif
|
||||
@cd "$(BUILD_DIR)/debug" \
|
||||
&& echo "Build WebUI library ($(CC) $(TARGET)debug dynamic)..." \
|
||||
&& $(CC) $(TARGET) $(CIVETWEB_BUILD_FLAGS) $(CIVETWEB_DEFINE_FLAGS) -g -fPIC \
|
||||
&& $(CC) $(TARGET) $(WEBUI_BUILD_FLAGS) $(WARNING_LOG) -g -fPIC -DWEBUI_LOG \
|
||||
&& $(CC) $(TARGET) $(WEBUI_BUILD_FLAGS) $(WARNING_LOG) -g -fPIC -DWEBUI_LOG -DWEBUI_DYNAMIC \
|
||||
&& $(CC) $(TARGET) -shared -o $(LIB_DYN_OUT) webui.o civetweb.o $(WEBKIT_OBJ) -g -L"$(WEBUI_TLS_LIB)" $(TLS_LDFLAG_DYNAMIC) $(LWS2_OPT) $(WKWEBKIT_LINK_FLAGS)
|
||||
ifeq ($(PLATFORM),windows)
|
||||
@cd "$(BUILD_DIR)/debug" && del *.o >nul 2>&1
|
||||
@ -151,7 +151,7 @@ endif
|
||||
@cd "$(BUILD_DIR)" \
|
||||
&& echo "Build WebUI library ($(CC) $(TARGET)release dynamic)..." \
|
||||
&& $(CC) $(TARGET) $(CIVETWEB_BUILD_FLAGS) $(CIVETWEB_DEFINE_FLAGS) -Os -fPIC \
|
||||
&& $(CC) $(TARGET) $(WEBUI_BUILD_FLAGS) $(WARNING_RELEASE) -O3 -fPIC \
|
||||
&& $(CC) $(TARGET) $(WEBUI_BUILD_FLAGS) $(WARNING_RELEASE) -O3 -fPIC -DWEBUI_DYNAMIC \
|
||||
&& $(CC) $(TARGET) -shared -o $(LIB_DYN_OUT) webui.o civetweb.o $(WEBKIT_OBJ) -L"$(WEBUI_TLS_LIB)" $(TLS_LDFLAG_DYNAMIC) $(LWS2_OPT) $(WKWEBKIT_LINK_FLAGS)
|
||||
# Clean
|
||||
ifeq ($(PLATFORM),windows)
|
||||
|
4
Makefile
4
Makefile
@ -53,7 +53,7 @@ debug:
|
||||
# Dynamic with Debug info
|
||||
@echo Build WebUI Library (MSVC Debug Dynamic)...
|
||||
@cl /Zi $(CIVETWEB_BUILD_FLAGS) $(CIVETWEB_DEFINE_FLAGS)
|
||||
@cl /Zi $(WEBUI_BUILD_FLAGS) $(WARNING_LOG) /D WEBUI_LOG
|
||||
@cl /Zi $(WEBUI_BUILD_FLAGS) $(WARNING_LOG) /D WEBUI_LOG /D WEBUI_DYNAMIC
|
||||
@link $(LIB_DYN_OUT)
|
||||
# Clean
|
||||
@- del *.obj >nul 2>&1
|
||||
@ -72,7 +72,7 @@ release:
|
||||
# Dynamic Release
|
||||
@echo Build WebUI Library (MSVC Release Dynamic)...
|
||||
@cl $(CIVETWEB_BUILD_FLAGS) $(CIVETWEB_DEFINE_FLAGS)
|
||||
@cl $(WEBUI_BUILD_FLAGS) $(WARNING_RELEASE)
|
||||
@cl $(WEBUI_BUILD_FLAGS) $(WARNING_RELEASE) /D WEBUI_DYNAMIC
|
||||
@link $(LIB_DYN_OUT)
|
||||
# Clean
|
||||
@- del *.pdb >nul 2>&1
|
||||
|
16
src/webui.c
16
src/webui.c
@ -116,6 +116,12 @@
|
||||
#define WEBUI_WS_PROTOCOL "ws://"
|
||||
#endif
|
||||
|
||||
#ifdef WEBUI_DYNAMIC
|
||||
#define WEBUI_LIB_TYPE "Dynamic"
|
||||
#else
|
||||
#define WEBUI_LIB_TYPE "Static"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WEBUI_OS "Microsoft Windows"
|
||||
#elif __APPLE__
|
||||
@ -3741,7 +3747,7 @@ static void * _webui_malloc(size_t size) {
|
||||
static _webui_window_t* _webui_dereference_win_ptr(void * ptr) {
|
||||
|
||||
#ifdef WEBUI_LOG_VERBOSE
|
||||
printf("[Core]\t\t_webui_dereference_win_ptr()\n");
|
||||
//printf("[Core]\t\t_webui_dereference_win_ptr()\n");
|
||||
#endif
|
||||
|
||||
if (_webui_mutex_is_exit_now(WEBUI_MUTEX_NONE))
|
||||
@ -7395,6 +7401,7 @@ static void _webui_init(void) {
|
||||
WEBUI_VERSION " ("
|
||||
WEBUI_OS ", "
|
||||
WEBUI_COMPILER ", "
|
||||
WEBUI_LIB_TYPE ", "
|
||||
WEBUI_SECURE ")\n");
|
||||
printf("[Core]\t\t_webui_init()\n");
|
||||
#endif
|
||||
@ -10762,6 +10769,13 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) {
|
||||
|
||||
// Linux GTK WebView
|
||||
|
||||
#ifdef WEBUI_DYNAMIC
|
||||
#ifdef WEBUI_LOG
|
||||
printf("[Core]\t\t_webui_wv_show() -> WebUI dynamic version does not support Linux WebView\n");
|
||||
#endif
|
||||
return false;
|
||||
#endif
|
||||
|
||||
if (_webui.is_browser_main_run)
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user