diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-06-10 16:51:06 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-06-10 18:11:18 +0200 |
commit | c373b6ca6c3bc2597a54cecffd409ea84798905f (patch) | |
tree | 09f6067d368eeb8223553b3ac4a5254f4ace6547 | |
parent | 83a2bc6d446387d25fd10164e87627c9d49878eb (diff) |
Fix undefined symbols in debug builds.
process uses the same code as lib and decides at runtime which
code to run. Fix the debug build by making sure that all infrastructure
code is available in both process and lib by building common code
not shared directly through chromium sources in a separate static lib.
-rw-r--r-- | blinq.gyp | 1 | ||||
-rw-r--r-- | blinq.gypi | 1 | ||||
-rw-r--r-- | blinq.pro | 5 | ||||
-rw-r--r-- | build/exclude_chromium_sources.gypi | 1 | ||||
-rwxr-xr-x | build/gyp_blinq | 2 | ||||
-rw-r--r-- | build/qmake/mkspecs/features/gyp_generator.prf | 5 | ||||
-rw-r--r-- | lib/blinqapplication.cpp | 1 | ||||
-rw-r--r-- | lib/content_browser_client_qt.cpp | 1 | ||||
-rw-r--r-- | lib/content_browser_client_qt.h | 5 | ||||
-rw-r--r-- | lib/lib.pro | 13 | ||||
-rw-r--r-- | lib/web_contents_delegate_qt.cpp | 1 | ||||
-rw-r--r-- | lib/web_contents_view_qt.h | 7 | ||||
-rw-r--r-- | process/process.pro | 3 | ||||
-rw-r--r-- | shared/backing_store_qt.cpp (renamed from lib/backing_store_qt.cpp) | 0 | ||||
-rw-r--r-- | shared/backing_store_qt.h (renamed from lib/backing_store_qt.h) | 0 | ||||
-rw-r--r-- | shared/native_view_container_qt.h (renamed from lib/native_view_container_qt.h) | 0 | ||||
-rw-r--r-- | shared/native_view_qt.cpp (renamed from lib/native_view_qt.cpp) | 0 | ||||
-rw-r--r-- | shared/native_view_qt.h (renamed from lib/native_view_qt.h) | 0 | ||||
-rw-r--r-- | shared/raster_window.cpp (renamed from lib/raster_window.cpp) | 0 | ||||
-rw-r--r-- | shared/raster_window.h (renamed from lib/raster_window.h) | 0 | ||||
-rw-r--r-- | shared/render_widget_host_view_qt.cpp (renamed from lib/render_widget_host_view_qt.cpp) | 0 | ||||
-rw-r--r-- | shared/render_widget_host_view_qt.h (renamed from lib/render_widget_host_view_qt.h) | 0 | ||||
-rw-r--r-- | shared/shared.pro | 35 | ||||
-rw-r--r-- | shared/web_event_factory.cpp (renamed from lib/web_event_factory.cpp) | 0 | ||||
-rw-r--r-- | shared/web_event_factory.h (renamed from lib/web_event_factory.h) | 1 |
25 files changed, 59 insertions, 23 deletions
@@ -4,6 +4,7 @@ 'target_name': 'blinq', 'type': 'none', 'dependencies': [ + 'shared/shared.gyp:*', 'process/process.gyp:*', 'lib/lib.gyp:*', ], diff --git a/blinq.gypi b/blinq.gypi index 58346a323..96e15277f 100644 --- a/blinq.gypi +++ b/blinq.gypi @@ -32,6 +32,7 @@ '<(chromium_src_dir)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit_test_support', ], 'include_dirs': [ + '<(qtwebengine_src_dir)', '<(chromium_src_dir)', ], 'msvs_settings': { @@ -2,9 +2,10 @@ TEMPLATE = subdirs CONFIG += ordered -# The first two subdirs contain dummy .pro files that are used by qmake +# The first three subdirs contain dummy .pro files that are used by qmake # to generate a corresponding .gyp file -SUBDIRS = lib \ +SUBDIRS = shared \ + lib \ process \ build \ # This is where we use the generated qt_generated.gypi and run gyp example \ diff --git a/build/exclude_chromium_sources.gypi b/build/exclude_chromium_sources.gypi index 1f96a5789..9e876d251 100644 --- a/build/exclude_chromium_sources.gypi +++ b/build/exclude_chromium_sources.gypi @@ -2,6 +2,7 @@ 'target_defaults': { # patterns used to exclude chromium files from the build when we have a drop-in replacement 'sources/': [ + ['exclude', 'browser/renderer_host/gtk_im_context_wrapper\\.cc$'], ['exclude', 'browser/renderer_host/render_widget_host_view_gtk\\.(cc|h)$'], ['exclude', 'browser/renderer_host/render_widget_host_view_mac.*\\.(mm|h)$'], ['exclude', 'browser/renderer_host/render_widget_host_view_win.*\\.(cc|h)$'], diff --git a/build/gyp_blinq b/build/gyp_blinq index a7eff0d6f..51d2f4cdc 100755 --- a/build/gyp_blinq +++ b/build/gyp_blinq @@ -5,6 +5,7 @@ import os import subprocess import sys +qtwebengine_src = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) chrome_src = os.path.abspath(os.environ.get('CHROMIUM_SRC_DIR')) # null-checked in build.pro script_dir = os.path.abspath(os.path.join(chrome_src, 'build')) if not os.path.isdir(script_dir): @@ -104,6 +105,7 @@ if __name__ == '__main__': args.extend(["--toplevel-dir=" + toplevel]) # Chromium specific Hack: for Chromium to build, the depth has to be set to the chromium src dir. args.extend(["--depth=" + chrome_src]) + args.extend(['-D', 'qtwebengine_src_dir=' + qtwebengine_src]) args.extend(['-D', 'chromium_src_dir=' + chrome_src]) # Tweak the output location and format (hardcode ninja for now) args.extend(['--generator-output', os.path.abspath(get_output_dir())]) diff --git a/build/qmake/mkspecs/features/gyp_generator.prf b/build/qmake/mkspecs/features/gyp_generator.prf index e727d6946..5cf0e3eb5 100644 --- a/build/qmake/mkspecs/features/gyp_generator.prf +++ b/build/qmake/mkspecs/features/gyp_generator.prf @@ -50,6 +50,11 @@ for (lib, LIBS): GYPI_CONTENTS += " '$$lib'," GYPI_CONTENTS += " ]," +!isEmpty(GYPDEPENDENCIES) { + GYPI_CONTENTS += " 'dependencies': [" + for (dep, GYPDEPENDENCIES): GYPI_CONTENTS += " '$$dep'," + GYPI_CONTENTS += " ]," +} !isEmpty(DEFINES) { GYPI_CONTENTS += " 'defines': [" for (define, DEFINES): GYPI_CONTENTS += " '$$define'," diff --git a/lib/blinqapplication.cpp b/lib/blinqapplication.cpp index ae1efb728..732b7d1c7 100644 --- a/lib/blinqapplication.cpp +++ b/lib/blinqapplication.cpp @@ -57,7 +57,6 @@ #include "webkit/common/user_agent/user_agent_util.h" #include "content_browser_client_qt.h" -#include "web_contents_view_qt.h" #include "qquickwebcontentsview.h" namespace { diff --git a/lib/content_browser_client_qt.cpp b/lib/content_browser_client_qt.cpp index 8acad3b03..da8f08116 100644 --- a/lib/content_browser_client_qt.cpp +++ b/lib/content_browser_client_qt.cpp @@ -14,7 +14,6 @@ #include "net/base/net_util.h" #include "browser_context_qt.h" #include "web_contents_view_qt.h" -#include "web_contents_delegate_qt.h" static GURL GetStartupURL() { CommandLine* command_line = CommandLine::ForCurrentProcess(); diff --git a/lib/content_browser_client_qt.h b/lib/content_browser_client_qt.h index 0e695dd34..4783fa598 100644 --- a/lib/content_browser_client_qt.h +++ b/lib/content_browser_client_qt.h @@ -27,14 +27,13 @@ public: virtual content::WebContentsViewPort* OverrideCreateWebContentsView(content::WebContents* , content::RenderViewHostDelegateView**) /*Q_DECL_OVERRIDE*/; virtual content::BrowserMainParts* CreateBrowserMainParts(const content::MainFunctionParams& parameters) /*Q_DECL_OVERRIDE*/; - content::ShellBrowserContext *browser_context(); net::URLRequestContextGetter *CreateRequestContext(content::BrowserContext *content_browser_context, content::ProtocolHandlerMap *protocol_handlers); + private: BrowserContextQt* m_browser_context; - BrowserMainPartsQt* m_browserMainParts; - + BrowserMainPartsQt* m_browserMainParts; }; #endif // CONTENT_BROWSER_CLIENT_QT diff --git a/lib/lib.pro b/lib/lib.pro index 457e4ffdb..71fd95419 100644 --- a/lib/lib.pro +++ b/lib/lib.pro @@ -2,6 +2,7 @@ # We want the gyp generation step to happen after all the other config steps. For that we need to prepend # our gyp_generator.prf feature to the CONFIG variable since it is processed backwards CONFIG = gyp_generator $$CONFIG +GYPDEPENDENCIES += ../shared/shared.gyp:blinq_shared TEMPLATE = lib @@ -16,31 +17,21 @@ PER_CONFIG_DEFINES = BLINQ_PROCESS_PATH=\\\"$$getOutDir()/%config/$$BLINQ_PROCES # Keep Skia happy CONFIG(release, debug|release): DEFINES += NDEBUG -QT += gui-private widgets qml quick +QT += widgets quick SOURCES = \ - backing_store_qt.cpp \ blinqapplication.cpp \ content_browser_client_qt.cpp \ qquickwebcontentsview.cpp \ qwebcontentsview.cpp \ - render_widget_host_view_qt.cpp \ resource_context_qt.cpp \ - web_event_factory.cpp \ - native_view_qt.cpp \ web_contents_delegate_qt.cpp HEADERS = \ - backing_store_qt.h \ blinqapplication.h \ browser_context_qt.h \ content_browser_client_qt.h \ - native_view_container_qt.h \ - native_view_qt.h \ qquickwebcontentsview.h \ qwebcontentsview.h \ - render_widget_host_view_qt.h \ resource_context_qt.h \ - web_event_factory.h \ web_contents_delegate_qt.h - diff --git a/lib/web_contents_delegate_qt.cpp b/lib/web_contents_delegate_qt.cpp index 2757f59cd..bce05ee0c 100644 --- a/lib/web_contents_delegate_qt.cpp +++ b/lib/web_contents_delegate_qt.cpp @@ -2,6 +2,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/navigation_controller.h" + #include "web_contents_view_qt.h" #include "qwebcontentsview.h" #include "qquickwebcontentsview.h" diff --git a/lib/web_contents_view_qt.h b/lib/web_contents_view_qt.h index ed4e9af17..46e7fe7a9 100644 --- a/lib/web_contents_view_qt.h +++ b/lib/web_contents_view_qt.h @@ -47,8 +47,9 @@ #include "content/public/browser/render_widget_host.h" #include "content/port/browser/render_view_host_delegate_view.h" #include "content/port/browser/web_contents_view_port.h" -#include "render_widget_host_view_qt.h" -#include "native_view_container_qt.h" + +#include "shared/render_widget_host_view_qt.h" +#include "shared/native_view_container_qt.h" class WebContentsViewQt : public content::WebContentsViewPort @@ -66,7 +67,7 @@ public: return view; } - + virtual void CreateView(const gfx::Size& initial_size, gfx::NativeView context) { QT_NOT_YET_IMPLEMENTED } virtual content::RenderWidgetHostView* CreateViewForPopupWidget(content::RenderWidgetHost* render_widget_host) { return 0; } diff --git a/process/process.pro b/process/process.pro index d0b1ab9fe..a49813c89 100644 --- a/process/process.pro +++ b/process/process.pro @@ -2,10 +2,11 @@ # We want the gyp generation step to happen after all the other config steps. For that we need to prepend # our gyp_generator.prf feature to the CONFIG variable since it is processed backwards CONFIG = gyp_generator $$CONFIG +GYPDEPENDENCIES += ../shared/shared.gyp:blinq_shared TARGET = $$BLINQ_PROCESS_NAME TEMPLATE = app -QT -= gui core +QT += widgets quick SOURCES = main.cpp diff --git a/lib/backing_store_qt.cpp b/shared/backing_store_qt.cpp index 8920b72c3..8920b72c3 100644 --- a/lib/backing_store_qt.cpp +++ b/shared/backing_store_qt.cpp diff --git a/lib/backing_store_qt.h b/shared/backing_store_qt.h index 9f7e807d3..9f7e807d3 100644 --- a/lib/backing_store_qt.h +++ b/shared/backing_store_qt.h diff --git a/lib/native_view_container_qt.h b/shared/native_view_container_qt.h index 6937d146d..6937d146d 100644 --- a/lib/native_view_container_qt.h +++ b/shared/native_view_container_qt.h diff --git a/lib/native_view_qt.cpp b/shared/native_view_qt.cpp index d95cb6957..d95cb6957 100644 --- a/lib/native_view_qt.cpp +++ b/shared/native_view_qt.cpp diff --git a/lib/native_view_qt.h b/shared/native_view_qt.h index 80bb24e87..80bb24e87 100644 --- a/lib/native_view_qt.h +++ b/shared/native_view_qt.h diff --git a/lib/raster_window.cpp b/shared/raster_window.cpp index 778a6b290..778a6b290 100644 --- a/lib/raster_window.cpp +++ b/shared/raster_window.cpp diff --git a/lib/raster_window.h b/shared/raster_window.h index 8619b278c..8619b278c 100644 --- a/lib/raster_window.h +++ b/shared/raster_window.h diff --git a/lib/render_widget_host_view_qt.cpp b/shared/render_widget_host_view_qt.cpp index 351030c7a..351030c7a 100644 --- a/lib/render_widget_host_view_qt.cpp +++ b/shared/render_widget_host_view_qt.cpp diff --git a/lib/render_widget_host_view_qt.h b/shared/render_widget_host_view_qt.h index 94faf8205..94faf8205 100644 --- a/lib/render_widget_host_view_qt.h +++ b/shared/render_widget_host_view_qt.h diff --git a/shared/shared.pro b/shared/shared.pro new file mode 100644 index 000000000..0fb50e94c --- /dev/null +++ b/shared/shared.pro @@ -0,0 +1,35 @@ +# This is a dummy .pro file used to extract some aspects of the used configuration and feed them to gyp +# We want the gyp generation step to happen after all the other config steps. For that we need to prepend +# our gyp_generator.prf feature to the CONFIG variable since it is processed backwards +CONFIG = gyp_generator $$CONFIG +GYPINCLUDES += ../blinq.gypi + +TEMPLATE = lib +CONFIG += static + +TARGET = blinq_shared + +# Defining keywords such as 'signal' clashes with the chromium code base. +DEFINES += QT_NO_KEYWORDS + +# We need a way to tap into gyp´s Debug vs. Release configuration +PER_CONFIG_DEFINES = BLINQ_PROCESS_PATH=\\\"$$getOutDir()/%config/$$BLINQ_PROCESS_NAME\\\" + +# Keep Skia happy +CONFIG(release, debug|release): DEFINES += NDEBUG + +QT += widgets quick + +SOURCES = \ + backing_store_qt.cpp \ + render_widget_host_view_qt.cpp \ + web_event_factory.cpp \ + native_view_qt.cpp + +HEADERS = \ + backing_store_qt.h \ + native_view_container_qt.h \ + native_view_qt.h \ + render_widget_host_view_qt.h \ + web_event_factory.h + diff --git a/lib/web_event_factory.cpp b/shared/web_event_factory.cpp index ed24c5b6d..ed24c5b6d 100644 --- a/lib/web_event_factory.cpp +++ b/shared/web_event_factory.cpp diff --git a/lib/web_event_factory.h b/shared/web_event_factory.h index 74ad7022f..061200ccc 100644 --- a/lib/web_event_factory.h +++ b/shared/web_event_factory.h @@ -55,7 +55,6 @@ public: static WebKit::WebMouseEvent toWebMouseEvent(QMouseEvent*); static WebKit::WebMouseWheelEvent toWebWheelEvent(QWheelEvent*); static content::NativeWebKeyboardEvent toWebKeyboardEvent(QKeyEvent*); - }; |