summaryrefslogtreecommitdiffstats
path: root/gears/SConscript.dll
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 23:59:03 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 23:59:03 +0000
commitb0faad6b7aa2597115c07ca6fc3d6273c3c18191 (patch)
tree86b8e235ff0305b6eb586b707af9a58e8e7b0d26 /gears/SConscript.dll
parent6ea74bed6ddfe8f9f993a3770e303a7b5c6743ed (diff)
downloadchromium_src-b0faad6b7aa2597115c07ca6fc3d6273c3c18191.zip
chromium_src-b0faad6b7aa2597115c07ca6fc3d6273c3c18191.tar.gz
chromium_src-b0faad6b7aa2597115c07ca6fc3d6273c3c18191.tar.bz2
First cut at compiling Gears for Safari.
This contains the file list and correct compilation flags for the files. This doesn't yet link, but is only missing one custom builder. Review URL: http://codereview.chromium.org/8041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gears/SConscript.dll')
-rw-r--r--gears/SConscript.dll185
1 files changed, 165 insertions, 20 deletions
diff --git a/gears/SConscript.dll b/gears/SConscript.dll
index cdefdca..8136e54 100644
--- a/gears/SConscript.dll
+++ b/gears/SConscript.dll
@@ -9,6 +9,8 @@ Import('env')
env = env.Clone()
+env['USING_NPAPI'] = env['BROWSER'] in ['SF', 'NPAPI']
+
# TODO: move all these builders out to site_scons or somesuch.
# Building .stab files, using M4FLAGS.
@@ -70,6 +72,28 @@ elif env['BROWSER'] in ['FF2', 'FF3']:
env['GECKO_BASE'] = '$THIRD_PARTY_DIR/gecko_1.9'
env.PrependENVPath('PATH', env.Dir('#/$GECKO_BIN').abspath)
+elif env['BROWSER'] == 'SF':
+ env.Replace(
+# Enable breakpad for Safari on MacOSX.
+ USING_BREAKPAD_OSX = '1')
+
+ env.Append(
+ CPPDEFINES = [
+# Remove these - During development, it was convenient to have these defined in
+# the Safari port. Before release we want to clean this up, and replace these
+# with a single BROWSER_SF symbol.
+# We also want to consolidate the include paths, so we don't have to add these
+# paths here.
+ 'BROWSER_NPAPI',
+ 'BROWSER_WEBKIT',
+ 'BROWSER_SAFARI'
+ ],
+ CCFLAGS = [
+# These flags are needed so that instead of exporting all symbols defined in
+# the code, we just export those specifically marked, this reduces the output size.
+ '-fvisibility=hidden'
+ ],
+ CPPPATH = ['$THIRD_PARTY/spidermonkey/nspr/pr/include'])
def MyIdlEmitter(target, source, env):
"""Produce the list of outputs generated by our IDL compiler. Outputs
@@ -106,15 +130,18 @@ if env['BROWSER'] in ['FF2', 'FF3']:
env.Prepend(
CPPDEFINES = [
'BROWSER_${BROWSER}=1',
-# SpiderMonkey (the Firefox JS engine)'s JS_GET_CLASS macro in jsapi.h needs
-# this defined to work with the gecko SDK that we've built.
-# The definition of JS_THREADSAFE must be kept in sync with MOZJS_CPPFLAGS.
-# TODO(mpcomplete): we only need this for FF and SF, I think.
- 'JS_THREADSAFE',
],
)
if env['BROWSER'] in ['FF2', 'FF3']:
+
+ if env['OS'] == 'osx':
+ env.Prepend(
+ CPPDEFINES = [
+ 'LINUX'
+ ]
+ )
+
env.Prepend(
CPPDEFINES = [
# TODO(cprince): Update source files so we don't need this compatibility define?
@@ -157,6 +184,30 @@ env.Append(
],
)
+if env['OS'] == 'osx':
+ env.Append(
+ LINKFLAGS = [
+ '-mmacosx-version-min=10.4',
+ '-bundle'
+ ],
+ LIBS = [
+ 'mozjs-gears',
+ 'curl',
+ 'crypto',
+ 'leopard_support',
+ 'breakpad_osx-gears'
+ ],
+ LIBPATH = [
+ '$OPEN_DIR/tools/osx'
+ ],
+ FRAMEWORKS = [
+ 'Carbon',
+ 'CoreServices',
+ 'Cocoa',
+ 'WebKit',
+ ]
+ )
+
# Add in libraries for in-development APIs for non-official builds.
if not env['OFFICIAL_BUILD']:
if env['OS'] != 'wince':
@@ -296,6 +347,24 @@ if env['OS'] == 'win32':
# TODO: move to breakpad
env.Append(CPPFLAGS = ['/wd4018'])
+# Extra per-browser files
+browser_specific_objects = []
+
+if env['BROWSER'] == 'SF':
+ mozjs_sources = [
+ '$MOZJS_DIR/gears_npapi_bindings/mozjs_npruntime.cc',
+ '$MOZJS_DIR/gears_npapi_bindings/mozjs_npruntime_utils.cc',
+ '$OPEN_DIR/base/common/js_standalone_engine_mozjs.cc',
+ '$MOZJS_DIR/gears_npapi_bindings/mozjs_npapi_storage.cc'
+ ]
+ mozjs_objects = env.SharedObject(
+ mozjs_sources,
+ CPPPATH = env['CPPPATH'] + env['MOZJS_INCLUDE_PATHS'])
+ browser_specific_objects += mozjs_objects
+
+# TODO(playmobil): Create builder to generate required header files.
+# browser_specific_objects += \
+# env.SharedObject('$OPEN_DIR/base/safari/resource_archive.cc')
# Input file lists
def NewInputs():
@@ -341,6 +410,16 @@ if env['OS'] == 'win32':
]
#-----------------------------------------------------------------------------
+# third_party/breakpad_osx
+srcs['SF'] += [
+ '$OPEN_DIR/base/common/exception_handler_osx.mm',
+ '$OPEN_DIR/base/common/exception_handler_osx/google_breakpad.mm',
+ '$OPEN_DIR/base/common/exception_handler_osx/mach_ipc.mm',
+ '$OPEN_DIR/base/common/exception_handler_osx/on_demand_server.mm',
+ '$OPEN_DIR/base/common/exception_handler_osx/simple_string_dictionary.mm'
+]
+
+#-----------------------------------------------------------------------------
# third_party/v8/bindings
srcs['NPAPI'] += [
@@ -446,6 +525,13 @@ srcs['all'] += [
'$OPEN_DIR/base/common/vista_utils.cc',
]
+if env['OS'] == 'osx':
+ srcs['all'] += [
+ '$OPEN_DIR/base/common/common_osx.mm',
+ '$OPEN_DIR/base/safari/nsstring_utils.mm',
+ '$OPEN_DIR/base/common/user_config_osx.cc'
+ ]
+
#-----------------------------------------------------------------------------
# base/firefox
@@ -554,6 +640,33 @@ if env['OS'] == 'win32':
]
#-----------------------------------------------------------------------------
+# base/safari
+srcs['SF'] += [
+ '$OPEN_DIR/base/common/common_sf.mm',
+ '$OPEN_DIR/base/common/detect_version_collision_osx.cc',
+ '$OPEN_DIR/base/common/file_posix.cc',
+ '$OPEN_DIR/base/common/html_event_monitor_np.cc',
+ '$OPEN_DIR/base/common/ipc_message_queue_linux.cc',
+ '$OPEN_DIR/base/common/ipc_message_queue_test.cc',
+ '$OPEN_DIR/base/common/ipc_message_queue_test_osx.mm',
+ '$OPEN_DIR/base/common/js_runner_np.cc',
+ '$OPEN_DIR/base/common/message_queue_sf.cc',
+ '$OPEN_DIR/base/common/paths_sf.mm',
+ '$OPEN_DIR/base/common/paths_sf_more.mm',
+ '$OPEN_DIR/base/npapi/browser_utils.cc',
+ '$OPEN_DIR/base/npapi/module.cc',
+ '$OPEN_DIR/base/npapi/np_utils.cc',
+ '$OPEN_DIR/base/npapi/npn_bindings.cc',
+ '$OPEN_DIR/base/npapi/npp_bindings.cc',
+ '$OPEN_DIR/base/npapi/plugin.cc',
+ '$OPEN_DIR/base/safari/browser_load_hook.mm',
+ '$OPEN_DIR/base/safari/browser_utils_sf.cc',
+ '$OPEN_DIR/base/safari/curl_downloader.mm',
+ '$OPEN_DIR/base/safari/messagebox.mm',
+ '$OPEN_DIR/base/safari/safari_workarounds.m',
+]
+
+#-----------------------------------------------------------------------------
# console
srcs['all'] += [
@@ -675,9 +788,12 @@ srcs['FF3'] += [
'$OPEN_DIR/localserver/common/http_cookies.cc',
]
+srcs['SF'] += [
+ '$OPEN_DIR/localserver/common/http_cookies.cc',
+]
+
#-----------------------------------------------------------------------------
# localserver/chrome + npapi
-# TODO: safari
srcs['NPAPI'] += [
'$OPEN_DIR/localserver/chrome/gears_protocol_handler.cc',
@@ -690,6 +806,22 @@ srcs['NPAPI'] += [
]
#-----------------------------------------------------------------------------
+# localserver/safari
+
+srcs['SF'] += [
+ '$OPEN_DIR/localserver/safari/async_task_sf.mm',
+ '$OPEN_DIR/localserver/safari/http_cookies_sf.mm',
+ '$OPEN_DIR/localserver/safari/http_handler.mm',
+ '$OPEN_DIR/localserver/safari/http_request_delegate.mm',
+ '$OPEN_DIR/localserver/safari/http_request_sf.mm',
+ '$OPEN_DIR/localserver/safari/localserver_db_proxy.mm',
+ '$OPEN_DIR/localserver/common/progress_event.cc',
+ '$OPEN_DIR/localserver/safari/progress_input_stream.mm',
+ '$OPEN_DIR/localserver/common/safe_http_request.cc',
+ '$OPEN_DIR/localserver/safari/ui_thread.cc'
+]
+
+#-----------------------------------------------------------------------------
# localserver/firefox
srcs['FF3'] += [
@@ -767,6 +899,10 @@ srcs['FF3'] += [
'$OPEN_DIR/ui/common/settings_dialog.cc',
]
+srcs['SF'] += [
+ '$OPEN_DIR/ui/common/settings_dialog.cc',
+]
+
stabsrcs['all'] = [
'$OPEN_DIR/ui/common/permissions_dialog.js.stab',
'$OPEN_DIR/ui/common/settings_dialog.js.stab',
@@ -775,7 +911,6 @@ stabsrcs['all'] = [
#-----------------------------------------------------------------------------
# ui/npapi
-# TODO: safari
m4srcs['all'] += [
'$OPEN_DIR/ui/ie/ui_resources.rc.m4',
@@ -790,6 +925,16 @@ srcs['NPAPI'] += [
]
#-----------------------------------------------------------------------------
+# ui/safari
+
+srcs['SF'] += [
+ '$OPEN_DIR/ui/safari/html_dialog_sf.mm',
+ '$OPEN_DIR/ui/safari/html_modeless_dialog_sf.mm',
+ '$OPEN_DIR/ui/safari/native_dialogs_osx.mm',
+ '$OPEN_DIR/ui/safari/settings_menu.mm',
+]
+
+#-----------------------------------------------------------------------------
# ui/factory
m4srcs['FF3'] += [
@@ -850,13 +995,12 @@ elif env['OS'] == 'wince':
#-----------------------------------------------------------------------------
# workerpool/npapi
-# TODO: safari
-
-srcs['NPAPI'] += [
- '$OPEN_DIR/workerpool/common/workerpool_utils.cc',
- '$OPEN_DIR/workerpool/npapi/pool_threads_manager.cc',
- '$OPEN_DIR/workerpool/workerpool.cc',
-]
+if env['USING_NPAPI']:
+ srcs['all'] += [
+ '$OPEN_DIR/workerpool/common/workerpool_utils.cc',
+ '$OPEN_DIR/workerpool/npapi/pool_threads_manager.cc',
+ '$OPEN_DIR/workerpool/workerpool.cc',
+ ]
#-----------------------------------------------------------------------------
# workerpool/firefox
@@ -959,11 +1103,12 @@ if not env['OFFICIAL_BUILD'] and env['OS'] != 'wince':
#-----------------------------------------------------------------------------
# factory/npapi
-srcs['NPAPI'] += [
- '$OPEN_DIR/factory/factory_impl.cc',
- '$OPEN_DIR/factory/factory_np.cc',
- '$OPEN_DIR/factory/factory_utils.cc',
-]
+if env['USING_NPAPI']:
+ srcs['all'] += [
+ '$OPEN_DIR/factory/factory_impl.cc',
+ '$OPEN_DIR/factory/factory_np.cc',
+ '$OPEN_DIR/factory/factory_utils.cc',
+ ]
#-----------------------------------------------------------------------------
# factory/firefox
@@ -1180,7 +1325,7 @@ if env['OS'] in ['win32', 'wince']:
env.Depends(module_res, m4s)
module = env.ChromeSharedLibrary('gears',
- srcs['all'] + libs + dll_resources)
+ srcs['all'] + libs + dll_resources + browser_specific_objects)
env.Alias('gears', module)
if env['OS'] == 'wince':