+2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
+
+ waf build fixes for Windows/MSVC.
+
+ * wscript:
+
2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
Build fix for building on Windows.
jscore_excludes.extend(get_excludes(jscore_dir, ['*Win.cpp', '*None.cpp']))
if building_on_win32:
- jscore_excludes.append('ExecutableAllocatorPosix.cpp')
- sources.append('jit/ExecutableAllocatorWin.cpp')
+ jscore_excludes += ['ExecutableAllocatorPosix.cpp', 'MarkStackPosix.cpp']
+ sources += ['jit/ExecutableAllocatorWin.cpp', 'runtime/MarkStackWin.cpp']
else:
jscore_excludes.append('JSStringRefBSTR.cpp')
full_dirs = get_dirs_for_features(jscore_dir, features=[build_port], dirs=jscore_dirs)
- print 'full_dirs = %r' % full_dirs
-
includes = common_includes + full_dirs
# 1. A simple program
includes = '. .. assembler wrec DerivedSources ForwardingHeaders ' + ' '.join(includes),
source = sources,
target = 'jscore',
- uselib = 'WX ICU ' + waf_configname,
+ uselib = 'WX ICU ' + get_config(),
uselib_local = '',
install_path = output_dir)
includes = '. .. assembler wrec DerivedSources ForwardingHeaders ' + ' '.join(includes),
source = 'jsc.cpp',
target = 'jsc',
- uselib = 'WX ICU ' + waf_configname,
+ uselib = 'WX ICU ' + get_config(),
uselib_local = 'jscore',
install_path = output_dir,
)
+2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
+
+ waf build fixes for Windows/MSVC.
+
+ * wscript:
+
2009-09-02 Ben Murdoch <benm@google.com>
Unreviewed build fix for Chromium.
source = ' '.join(flattenSources(webcore_sources.values())),
cxxflags = cxxflags,
target = 'webcore',
- uselib = 'WX ICU XML XSLT CURL ' + waf_configname,
+ uselib = 'WX ICU XML XSLT CURL ' + get_config(),
uselib_local = '',
install_path = output_dir,
)
excludes = get_excludes(webcore_dir, ['*None.cpp', '*CF.cpp', '*Qt.cpp', '*Win.cpp', '*Wince.cpp', '*Gtk.cpp', '*Mac.cpp', '*Safari.cpp', '*Chromium*.cpp','*SVG*.cpp', '*AllInOne.cpp', 'test*bindings.*'])
excludes.extend(['UserStyleSheetLoader.cpp', 'RenderMediaControls.cpp'])
+
+ # FIXME: undo this once these classes are fully implemented
+ excludes.append('SocketStreamErrorBase.cpp')
+ excludes.append('SocketStreamHandleBase.cpp')
+
# intermediate sources
excludes.append('CSSValueKeywords.c')
excludes.append('CSSPropertyNames.cpp')
+2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
+
+ waf build fixes for Windows/MSVC.
+
+ * bindings/python/wscript:
+ * wscript:
+
2009-09-02 Kevin Watters <kevinwatters@gmail.com>
Reviewed by Kevin Ollivier.
common_set_options(opt)
def configure(conf):
- common_configure(conf)
- conf.check_tool('swig', tooldir='.')
- conf.check_swig_version('1.3.29')
+ if Options.options.wxpython:
+ common_configure(conf)
+ conf.check_tool('swig', tooldir='.')
+ conf.check_swig_version('1.3.29')
def build(bld):
if Options.options.wxpython:
swig_flags = ' '.join(wx_swig_args),
defines = defines,
target = '_webview',
- uselib = 'WX CURL ICU XSLT XML SQLITE3 WXWEBKIT ' + waf_configname,
+ uselib = 'WX CURL ICU XSLT XML SQLITE3 WXWEBKIT ' + get_config(),
libpath = [output_dir],
uselib_local = '',
os.path.join(wk_root, 'WebCore', 'platform', 'graphics', 'wx'),
]
+windows_deps = [
+ 'lib/pthreadVC2.dll',
+ 'bin/icuuc40.dll', 'bin/icudt40.dll', 'bin/icuin40.dll',
+ 'bin/libcurl.dll', 'bin/libeay32.dll', 'bin/ssleay32.dll', 'bin/zlib1.dll',
+ 'lib/sqlite3.dll', 'bin/libxml2.dll', 'bin/libxslt.dll', 'bin/iconv.dll',
+ ]
+
webcore_include_dirs = []
for dir in webcore_dirs + ['DerivedSources']:
include_paths.append(os.path.join(wk_root, 'WebCore', dir))
The wxWebKit library should be rebuilt if jscore or webcore changes,
so we make those static libs as dependencies.
"""
- libjscore = os.path.join(output_dir, 'libjscore.a')
- libwebcore = os.path.join(output_dir, 'libwebcore.a')
+
+ ext = '.a'
+ if sys.platform.startswith('win'):
+ ext = '.lib'
+
+ libjscore = os.path.join(output_dir, 'libjscore%s' % ext)
+ libwebcore = os.path.join(output_dir, 'libwebcore%s' % ext)
assert os.path.exists(libjscore)
assert os.path.exists(libwebcore)
includes = ' '.join(include_paths + js_include_dirs),
target = 'wxwebkit',
defines = ['WXMAKINGDLL_WEBKIT'],
- uselib = 'WX CURL ICU XSLT XML SQLITE3 WEBCORE JSCORE ' + waf_configname,
+ uselib = 'WX CURL ICU XSLT XML SQLITE3 WEBCORE JSCORE ' + get_config(),
libpath = [output_dir],
uselib_local = '',
install_path = output_dir)
obj.find_sources_in_dirs(webkit_dirs)
+
+ 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)])
+2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
+
+ waf build fixes for Windows/MSVC and Mac/Snow Leopard.
+
+ * wx/browser/wscript:
+ * wx/build/build_utils.py:
+ * wx/build/settings.py:
+
2009-08-10 Kevin Ollivier <kevino@theolliviers.com>
Reviewed by Eric Seidel.
includes = ' '.join(include_paths),
source = 'browser.cpp',
target = 'wxBrowser',
- uselib = 'WX CURL ICU XSLT XML WXWEBKIT ' + waf_configname,
+ uselib = 'WX CURL ICU XSLT XML WXWEBKIT ' + get_config(),
libpath = [output_dir],
uselib_local = '',
install_path = output_dir)
#
# Helper functions for the WebKit build.
+import commands
import glob
import os
import sys
"""
Windows-compatible function for getting output from a command.
"""
- f = os.popen(command)
- return f.read().strip()
+ if sys.platform.startswith('win'):
+ f = os.popen(command)
+ return f.read().strip()
+ else:
+ return commands.getoutput(command)
def get_excludes(root, patterns):
"""
import commands
import os
import platform
+import re
import sys
+import Options
+
from build_utils import *
from waf_extensions import *
if os.path.exists(config_file):
config = open(config_file).read()
-output_dir = os.path.join(wk_root, 'WebKitBuild', config)
+try:
+ branches = commands.getoutput("git branch --no-color")
+ match = re.search('^\* (.*)', branches, re.MULTILINE)
+ if match:
+ config += ".%s" % match.group(1)
+except:
+ pass
-waf_configname = config.upper()
+output_dir = os.path.join(wk_root, 'WebKitBuild', config)
build_port = "wx"
building_on_win32 = sys.platform.startswith('win')
-if building_on_win32:
- if config == 'Release':
- waf_configname = waf_configname + ' CRT_MULTITHREADED_DLL'
- else:
- waf_configname = waf_configname + ' CRT_MULTITHREADED_DLL_DBG'
+def get_config():
+ waf_configname = config.upper().strip()
+ if building_on_win32:
+ isReleaseCRT = (config == 'Release')
+ if build_port == 'wx':
+ if Options.options.wxpython:
+ isReleaseCRT = True
+
+ if isReleaseCRT:
+ waf_configname = waf_configname + ' CRT_MULTITHREADED_DLL'
+ else:
+ waf_configname = waf_configname + ' CRT_MULTITHREADED_DLL_DBG'
+
+ return waf_configname
create_hash_table = wk_root + "/JavaScriptCore/create_hash_table"
if building_on_win32:
feature_defines = ['ENABLE_DATABASE', 'ENABLE_XSLT', 'ENABLE_JAVASCRIPT_DEBUGGER']
+msvc_version = 'msvc2008'
+
+msvclibs_dir = os.path.join(wklibs_dir, msvc_version, 'win')
+
+def get_path_to_wxconfig():
+ if 'WX_CONFIG' in os.environ:
+ return os.environ['WX_CONFIG']
+ else:
+ return 'wx-config'
+
def common_set_options(opt):
"""
Initialize common options provided to the user.
"""
Configuration used by all targets, called from the target's configure() step.
"""
+
+ if sys.platform.startswith('darwin') and build_port == 'wx':
+ import platform
+ if platform.release().startswith('10'): # Snow Leopard
+ config = commands.getoutput('%s --selected-config' % get_path_to_wxconfig())
+ if config.find('osx_cocoa') == -1:
+ # wx/Carbon only supports 32-bit compilation, so we want gcc-4.0 instead of 4.2 on Snow Leopard
+ conf.env['CC'] = 'gcc-4.0'
+ conf.env['CXX'] = 'g++-4.0'
conf.check_tool('compiler_cxx')
conf.check_tool('compiler_cc')
conf.check_tool('python')
if sys.platform.startswith('darwin'):
conf.check_tool('osx')
- msvc_version = 'msvc2008'
+ global msvc_version
+ global msvclibs_dir
+
if building_on_win32:
found_versions = conf.get_msvc_versions()
if found_versions[0][0] == 'msvc 9.0':
msvc_version = 'msvc2008'
elif found_versions[0][0] == 'msvc 8.0':
msvc_version = 'msvc2005'
-
- msvclibs_dir = ''
+
+ msvclibs_dir = os.path.join(wklibs_dir, msvc_version, 'win')
+
if build_port == "wx":
update_wx_deps(wk_root, msvc_version)
- msvclibs_dir = os.path.join(wklibs_dir, msvc_version, 'win')
conf.env.append_value('CXXDEFINES', ['BUILDING_WX__=1', 'WTF_USE_WXGC=1'])
conf.env.append_value('CPPPATH', wklibs_dir)
conf.env.append_value('LIBPATH', wklibs_dir)
+
+ # WebKit only supports 10.4+
+ mac_target = 'MACOSX_DEPLOYMENT_TARGET'
+ if mac_target in os.environ and os.environ[mac_target] == '10.3':
+ os.environ[mac_target] = '10.4'
+
+ if mac_target in conf.env and conf.env[mac_target] == '10.3':
+ conf.env[mac_target] = '10.4'
#conf.env['PREFIX'] = output_dir
conf.env.append_value('CPPPATH', os.path.join(wklibs_dir, 'unix', 'include'))
conf.env.append_value('CXXFLAGS', ['-fPIC', '-DPIC'])
- conf.check_cfg(path='wx-config', args='--cxxflags --libs', package='', uselib_store='WX')
+ conf.check_cfg(path=get_path_to_wxconfig(), args='--cxxflags --libs', package='', uselib_store='WX')
conf.check_cfg(path='xslt-config', args='--cflags --libs', package='', uselib_store='XSLT')
conf.check_cfg(path='xml2-config', args='--cflags --libs', package='', uselib_store='XML')