[wx] Build fixes for recent changes.
[WebKit-https.git] / wscript
diff --git a/wscript b/wscript
index 3fac8e2255970438a23d0817b63433369bce71d9..8942d1388ea59833e0be0bd9785ceb7c2896afce 100644 (file)
--- a/wscript
+++ b/wscript
@@ -29,22 +29,26 @@ import Options
 
 from settings import *
 
-webcore_dirs.extend(['WebKit/wx', 'WebKit/wx/WebKitSupport'])
+if build_port == "wx":
+    webcore_dirs.extend(['WebKit/wx', 'WebKit/wx/WebKitSupport'])
 
 wk_includes = ['.', 'WebCore', 'WebCore/DerivedSources',
                 os.path.join(wk_root, 'JavaScriptCore'),
                 os.path.join(wk_root, 'JavaScriptCore', 'wtf', 'text'),
                 os.path.join(wk_root, 'WebCore'),
-                os.path.join(wk_root, 'WebKit/wx'),
                 os.path.join(output_dir),
                 'WebCore/platform/image-decoders',
                 'WebCore/platform/win',
-                'WebCore/platform/wx/wxcode',
                 'WebCore/workers',
         ]
 
+if build_port == "wx":
+    wk_includes.append(os.path.join(wk_root, 'WebKit/wx'))
+    wk_includes.append('WebCore/platform/wx/wxcode')
+
 if sys.platform.startswith("win"):
     wk_includes.append(os.path.join(wk_root, 'WebCore','platform','win'))
+    wk_includes.append(os.path.join(wk_root, 'WebCore','platform','graphics','win'))
 
 windows_deps = [
                 'lib/pthreadVC2.dll',
@@ -65,6 +69,7 @@ if build_port == "wx":
         webcore_sources['wx-win'] = [
                'WebCore/platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp',
                'WebCore/platform/graphics/win/TransformationMatrixWin.cpp',
+               'WebCore/platform/ScrollAnimatorWin.cpp',
                # wxTimer on Windows has a bug that causes it to eat crashes in callbacks
                # so we need to use the Win port's implementation until the wx bug fix is
                # widely available (it was fixed in 2.8.10).
@@ -160,7 +165,7 @@ def configure(conf):
     common_configure(conf)
     generate_jscore_derived_sources()
     generate_webcore_derived_sources()
-    if sys.platform.startswith('win'):
+    if build_port == "wx" and sys.platform.startswith('win'):
         graphics_dir = os.path.join(wk_root, 'WebCore', 'platform', 'graphics')
         # HACK ALERT: MSVC automatically adds the source file's directory as the first entry in the
         # path. Unfortunately, that means when compiling these files we will end up including
@@ -178,7 +183,7 @@ def configure(conf):
     for api_file in glob.glob(os.path.join(jscore_dir, 'API/*.h')):
         shutil.copy(api_file, os.path.join(jscore_out_dir, os.path.basename(api_file)))
 
-    if Options.options.wxpython:
+    if build_port == "wx" and Options.options.wxpython:
         common_configure(conf)
         conf.check_tool('swig', tooldir='WebKit/wx/bindings/python')
         conf.check_swig_version('1.3.29')
@@ -196,7 +201,7 @@ def build(bld):
     features = [build_port]
     exclude_patterns = ['*AllInOne.cpp', '*Brew.cpp', '*CFNet.cpp', '*Chromium*.cpp', 
             '*Efl.cpp', '*Gtk.cpp', '*Haiku.cpp', '*Mac.cpp', '*None.cpp', '*Qt.cpp', '*Safari.cpp',
-            'test*bindings.*', '*Wince.cpp', "WebDOMCanvas*.cpp", "WebDOMSVG*.cpp"]
+            'test*bindings.*', '*WinCE.cpp', "WebDOMCanvas*.cpp", "WebDOMSVG*.cpp"]
     if build_port == 'wx':
         features.append('curl')
         exclude_patterns.append('*Win.cpp')
@@ -254,6 +259,9 @@ def build(bld):
         excludes.append('HTMLEntityNames.cpp')
         excludes.append('tokenizer.cpp')
 
+        # Qt specific file in common sources
+        excludes.append('ContextShadow.cpp')
+
         # FIXME: these three require headers that I can't seem to find in trunk.
         # Investigate how to resolve these issues.
         excludes.append('JSAbstractView.cpp')
@@ -305,8 +313,18 @@ def build(bld):
             webcore.includes += ' WebKit/mac/WebCoreSupport WebCore/platform/mac'
             webcore.source += " WebKit/mac/WebCoreSupport/WebSystemInterface.mm"
             
+        if building_on_win32:
+            for wxlib in bld.env['LIB_WX']:
+                wxlibname = os.path.join(bld.env['LIBPATH_WX'][0], wxlib + '_vc.dll')
+                if os.path.exists(wxlibname):
+                    bld.install_files(obj.install_path, [wxlibname])
+        
+            for dep in windows_deps:
+                bld.install_files(obj.install_path, [os.path.join(msvclibs_dir, dep)])
+
     webcore.find_sources_in_dirs(full_dirs, excludes = excludes, exts=['.c', '.cpp'])
 
     bld.add_group()
     
-    bld.add_subdirs(['WebKitTools/DumpRenderTree', 'WebKitTools/wx/browser', 'WebKit/wx/bindings/python'])
+    if build_port == "wx":    
+        bld.add_subdirs(['WebKitTools/DumpRenderTree', 'WebKitTools/wx/browser', 'WebKit/wx/bindings/python'])