changeset 1856:285bf986e4fd

Get HTML support building with MinGW... some warnings need to be fixed in browser.c but it works now.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 28 Feb 2013 13:02:25 +0000
parents 72a75442c51d
children 417176df4755
files makefile.mingw win/dw.c
diffstat 2 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/makefile.mingw	Thu Feb 28 11:57:26 2013 +0000
+++ b/makefile.mingw	Thu Feb 28 13:02:25 2013 +0000
@@ -23,11 +23,11 @@
 
 # Had to disable -Wunused-value due to every Win32 macro generating this warning...
 # GCC has marked this as  WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24900
-CFLAGS = -O -g -DMSVC $(PLATFORM_DEF) $(PLATFORM_CFLAGS) -D__WIN32__ -DGDIPLUS -DUNICODE -D_UNICODE -DISOLATION_AWARE_ENABLED=1 -I./win -I. -I./platform -Wall -Wno-unused-value -mthreads -o $(@)
-LDFLAGS = -shared -mwindows -mthreads -lcomctl32 -lole32 -loleaut32 -luserenv -lmsimg32 -lgdiplus
+CFLAGS = -O -g -DMSVC $(PLATFORM_DEF) $(PLATFORM_CFLAGS) -D__WIN32__ -DBUILD_DLL -DGDIPLUS -DUNICODE -D_UNICODE -DISOLATION_AWARE_ENABLED=1 -I./win -I. -I./platform -Wall -Wno-unused-value -mthreads -o $(@)
+LDFLAGS = -shared -mwindows -mthreads -lcomctl32 -lole32 -loleaut32 -luserenv -lmsimg32 -lgdiplus -luuid
 
 COMPATOBJECTS = dwcompat.o dirent.o
-OBJECTS = dw.o XBrowseForFolder.o
+OBJECTS = dw.o browser.o XBrowseForFolder.o
 
 VPATH=../ ../win
 
@@ -56,6 +56,9 @@
 dw.o: win/dw.c
 	$(CC) $(CFLAGS) -DBUILD_DLL -c $<	
 
+browser.o: win/browser.c
+	$(CC) $(CFLAGS) -DBUILD_DLL -c $<	
+
 XBrowseForFolder.o: win/XBrowseForFolder.cpp
 	$(CC) $(CFLAGS) -DBUILD_DLL -c $<	
 
--- a/win/dw.c	Thu Feb 28 11:57:26 2013 +0000
+++ b/win/dw.c	Thu Feb 28 13:02:25 2013 +0000
@@ -302,7 +302,7 @@
 
 HFONT _DefaultFont = NULL;
 
-#if (defined(BUILD_DLL) || defined(BUILD_HTML)) && !defined(__MINGW32__)
+#if (defined(BUILD_DLL) || defined(BUILD_HTML))
 LRESULT CALLBACK _browserWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
 #endif
 LRESULT CALLBACK _colorwndproc(HWND hWnd, UINT msg, WPARAM mp1, LPARAM mp2);
@@ -3869,7 +3869,7 @@
 
    RegisterClass(&wc);
 
-#if (defined(BUILD_DLL) || defined(BUILD_HTML)) && !defined(__MINGW32__)
+#if (defined(BUILD_DLL) || defined(BUILD_HTML))
    /* Register HTML renderer class */
    memset(&wc, 0, sizeof(WNDCLASS));
    wc.lpfnWndProc = (WNDPROC)_browserWindowProc;
@@ -5260,7 +5260,7 @@
  */
 HWND API dw_html_new(unsigned long id)
 {
-#if (defined(BUILD_DLL) || defined(BUILD_HTML)) && !defined(__MINGW32__)
+#if (defined(BUILD_DLL) || defined(BUILD_HTML))
    return CreateWindow(BrowserClassName,
                   NULL,
                   WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS,
@@ -5275,7 +5275,7 @@
 #endif
 }
 
-#if (defined(BUILD_DLL) || defined(BUILD_HTML)) && !defined(__MINGW32__)
+#if (defined(BUILD_DLL) || defined(BUILD_HTML))
 void _dw_html_action(HWND hwnd, int action);
 int _dw_html_raw(HWND hwnd, char *string);
 int _dw_html_url(HWND hwnd, char *url);
@@ -5289,7 +5289,7 @@
  */
 void API dw_html_action(HWND handle, int action)
 {
-#if (defined(BUILD_DLL) || defined(BUILD_HTML)) && !defined(__MINGW32__)
+#if (defined(BUILD_DLL) || defined(BUILD_HTML))
    _dw_html_action(handle, action);
 #endif
 }
@@ -5305,7 +5305,7 @@
  */
 int API dw_html_raw(HWND handle, char *string)
 {
-#if (defined(BUILD_DLL) || defined(BUILD_HTML)) && !defined(__MINGW32__)
+#if (defined(BUILD_DLL) || defined(BUILD_HTML))
    return _dw_html_raw(handle, string);
 #else
    return DW_ERROR_GENERAL;
@@ -5323,7 +5323,7 @@
  */
 int API dw_html_url(HWND handle, char *url)
 {
-#if (defined(BUILD_DLL) || defined(BUILD_HTML)) && !defined(__MINGW32__)
+#if (defined(BUILD_DLL) || defined(BUILD_HTML))
    return _dw_html_url(handle, url);
 #else
    return DW_ERROR_GENERAL;