From 9d37883a959b73adcd0fdcf2a24edd27b44cab34 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sun, 6 Aug 2017 08:08:37 +0000 Subject: [PATCH 01/16] [Bringup] Fix net related linking error The net needs to be exported by chromium-efl. >> undefined reference to `net::CreateProxyServiceUsingV8ProxyResolver(...) Change-Id: Ic4ac0b535a8586d6695f9a107d3d76c3a7361a4a Signed-off-by: Youngsoo Choi --- vendor/brightray/browser/url_request_context_getter.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vendor/brightray/browser/url_request_context_getter.cc b/vendor/brightray/browser/url_request_context_getter.cc index a9e0a22..2da99e1 100644 --- a/vendor/brightray/browser/url_request_context_getter.cc +++ b/vendor/brightray/browser/url_request_context_getter.cc @@ -235,6 +235,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { storage_->set_proxy_service(net::ProxyService::CreateFixed( proxy_config)); } else { +#if !defined(USE_EFL) storage_->set_proxy_service( net::CreateProxyServiceUsingV8ProxyResolver( std::move(proxy_config_service_), @@ -243,6 +244,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { host_resolver.get(), nullptr, url_request_context_->network_delegate())); +#endif } std::vector schemes; -- 2.7.4 From 9b6c15f1821d7cb85e7828aa4434fc30e28be03d Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sun, 6 Aug 2017 05:50:50 +0000 Subject: [PATCH 02/16] [Bringup] Fix security_state related linking error EFL port needs to be implemented. >> undefined reference to `security_state::GetSecurityInfo(...) The chromium-efl does not support security_state. Change-Id: Ic9332d2ba4e298a5d2ffb21d22d4450c97ba02bf Signed-off-by: Youngsoo Choi --- atom/browser/common_web_contents_delegate.cc | 15 ++++++++++++--- .../chrome/browser/ssl/security_state_tab_helper.cc | 14 ++++++++++++++ .../chrome/browser/ssl/security_state_tab_helper.h | 8 ++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index 22bca61..252e8db 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -22,8 +22,11 @@ #include "chrome/common/pref_names.h" #include "components/prefs/pref_service.h" #include "components/prefs/scoped_user_pref_update.h" +// FIXME: The chromium-efl does not support security_state. +#if !defined(USE_EFL) #include "components/security_state/content/content_utils.h" #include "components/security_state/core/security_state.h" +#endif #include "content/public/browser/browser_thread.h" #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/render_process_host.h" @@ -238,10 +241,11 @@ content::ColorChooser* CommonWebContentsDelegate::OpenColorChooser( content::WebContents* web_contents, SkColor color, const std::vector& suggestions) { -#if !defined(USE_EFL) - return chrome::ShowColorChooser(web_contents, color); -#else +#if defined(USE_EFL) + NOTIMPLEMENTED(); return nullptr; +#else + return chrome::ShowColorChooser(web_contents, color); #endif } @@ -290,10 +294,15 @@ blink::WebSecurityStyle CommonWebContentsDelegate::GetSecurityStyle( SecurityStateTabHelper* helper = SecurityStateTabHelper::FromWebContents(web_contents); DCHECK(helper); + // FIXME: The chromium-efl does not support security_state. +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else security_state::SecurityInfo security_info; helper->GetSecurityInfo(&security_info); return security_state::GetSecurityStyle(security_info, security_style_explanations); +#endif } void CommonWebContentsDelegate::DevToolsSaveToFile( diff --git a/chromium_src/chrome/browser/ssl/security_state_tab_helper.cc b/chromium_src/chrome/browser/ssl/security_state_tab_helper.cc index 81da280..5c29952 100644 --- a/chromium_src/chrome/browser/ssl/security_state_tab_helper.cc +++ b/chromium_src/chrome/browser/ssl/security_state_tab_helper.cc @@ -17,7 +17,10 @@ #include "chrome/browser/safe_browsing/ui_manager.h" #endif #include "components/prefs/pref_service.h" +// FIXME: The chromium-efl does not support security_state. +#if !defined(USE_EFL) #include "components/security_state/content/content_utils.h" +#endif #if 0 #include "components/ssl_config/ssl_config_prefs.h" #endif @@ -46,14 +49,21 @@ SecurityStateTabHelper::SecurityStateTabHelper( SecurityStateTabHelper::~SecurityStateTabHelper() {} +// FIXME: The chromium-efl does not support security_state. +#if !defined(USE_EFL) void SecurityStateTabHelper::GetSecurityInfo( security_state::SecurityInfo* result) const { security_state::GetSecurityInfo(GetVisibleSecurityState(), UsedPolicyInstalledCertificate(), base::Bind(&content::IsOriginSecure), result); } +#endif void SecurityStateTabHelper::VisibleSecurityStateChanged() { +// FIXME: The chromium-efl does not support security_state. +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else if (logged_http_warning_on_current_navigation_) return; @@ -102,6 +112,7 @@ void SecurityStateTabHelper::VisibleSecurityStateChanged() { "Security.HTTPBad.UserWarnedAboutSensitiveInput.Password", warning_is_user_visible); } +#endif } void SecurityStateTabHelper::DidStartNavigation( @@ -201,6 +212,8 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const { } #endif +// FIXME: The chromium-efl does not support security_state. +#if !defined(USE_EFL) std::unique_ptr SecurityStateTabHelper::GetVisibleSecurityState() const { auto state = security_state::GetVisibleSecurityState(web_contents()); @@ -213,3 +226,4 @@ SecurityStateTabHelper::GetVisibleSecurityState() const { return state; } +#endif diff --git a/chromium_src/chrome/browser/ssl/security_state_tab_helper.h b/chromium_src/chrome/browser/ssl/security_state_tab_helper.h index 13b2567..4da8da0 100644 --- a/chromium_src/chrome/browser/ssl/security_state_tab_helper.h +++ b/chromium_src/chrome/browser/ssl/security_state_tab_helper.h @@ -8,7 +8,9 @@ #include #include "base/macros.h" +#if !defined(USE_EFL) #include "components/security_state/core/security_state.h" +#endif #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" #include "third_party/WebKit/public/platform/WebSecurityStyle.h" @@ -26,9 +28,12 @@ class SecurityStateTabHelper public: ~SecurityStateTabHelper() override; + // FIXME: The chromium-efl does not support security_state. +#if !defined(USE_EFL) // See security_state::GetSecurityInfo. void GetSecurityInfo( security_state::SecurityInfo* result) const; +#endif // Called when the NavigationEntry's SSLStatus or other security // information changes. @@ -49,8 +54,11 @@ class SecurityStateTabHelper #if 0 security_state::MaliciousContentStatus GetMaliciousContentStatus() const; #endif + // FIXME: The chromium-efl does not support security_state. +#if !defined(USE_EFL) std::unique_ptr GetVisibleSecurityState() const; +#endif // True if a console message has been logged about an omnibox warning that // will be shown in future versions of Chrome for insecure HTTP pages. This -- 2.7.4 From fed74c093668c3ffd09d870ad28cdf0e2812e0e5 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sun, 6 Aug 2017 04:27:34 +0000 Subject: [PATCH 03/16] [Bringup] Fix OffScreenRenderWidgetHostView related linking error The DelegatedFrameHost is not used in chromium-efl. >> undefined reference to `content::DelegatedFrameHost::WasHidden()' >> undefined reference to `content::DelegatedFrameHost::ResetCompositor()' Change-Id: Ibd5631c41153b35bcb8674db48fd57ca1cb2f8ce Signed-off-by: Youngsoo Choi --- atom/browser/osr/osr_render_widget_host_view.cc | 28 +++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index 2003118..b54f4e7 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -105,7 +105,11 @@ class AtomCopyFrameGenerator { damage_rect)); request->set_area(gfx::Rect(view_->GetPhysicalBackingSize())); +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else view_->GetRootLayer()->RequestCopyOfOutput(std::move(request)); +#endif } void CopyFromCompositingSurfaceHasResult( @@ -151,6 +155,9 @@ class AtomCopyFrameGenerator { return; } +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else content::ImageTransportFactory* factory = content::ImageTransportFactory::GetInstance(); display_compositor::GLHelper* gl_helper = factory->GetGLHelper(); @@ -186,6 +193,7 @@ class AtomCopyFrameGenerator { base::Passed(&bitmap_), base::Passed(&bitmap_pixels_lock)), display_compositor::GLHelper::SCALER_QUALITY_FAST); +#endif } static void CopyFromCompositingSurfaceFinishedProxy( @@ -196,12 +204,16 @@ class AtomCopyFrameGenerator { std::unique_ptr bitmap_pixels_lock, bool result) { gpu::SyncToken sync_token; +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else if (result) { display_compositor::GLHelper* gl_helper = content::ImageTransportFactory::GetInstance()->GetGLHelper(); if (gl_helper) gl_helper->GenerateSyncToken(&sync_token); } +#endif const bool lost_resource = !sync_token.HasData(); release_callback->Run(sync_token, lost_resource); @@ -363,7 +375,9 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView( root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); #endif -#if defined(OS_MACOSX) +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#elif defined(OS_MACOSX) CreatePlatformWidget(); #else compositor_.reset( @@ -769,7 +783,9 @@ std::unique_ptr bool OffScreenRenderWidgetHostView::InstallTransparency() { if (transparent_) { SetBackgroundColor(SkColor()); -#if defined(OS_MACOSX) +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#elif defined(OS_MACOSX) browser_compositor_->SetHasTransparentBackground(true); #else compositor_->SetHostHasTransparentBackground(true); @@ -848,8 +864,12 @@ void OffScreenRenderWidgetHostView::SetupFrameRate(bool force) { frame_rate_threshold_ms_ = 1000 / frame_rate_; +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else GetCompositor()->vsync_manager()->SetAuthoritativeVSyncInterval( base::TimeDelta::FromMilliseconds(frame_rate_threshold_ms_)); +#endif if (copy_frame_generator_) { copy_frame_generator_->set_frame_rate_threshold_ms( @@ -890,8 +910,12 @@ void OffScreenRenderWidgetHostView::ResizeRootLayer() { const gfx::Size& size_in_pixels = gfx::ConvertSizeToPixel(scale_factor_, size); +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else GetRootLayer()->SetBounds(gfx::Rect(size)); GetCompositor()->SetScaleAndSize(scale_factor_, size_in_pixels); +#endif } void OffScreenRenderWidgetHostView::OnWindowResize() { -- 2.7.4 From 65370084e0e2e3697871a986ed5899a60a497b38 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sat, 5 Aug 2017 08:17:11 +0000 Subject: [PATCH 04/16] [Bringup] Fix DelegatedFrameHost related linking error The DelegatedFrameHost needs to be handled in EFL port. >> undefined reference to `content::DelegatedFrameHost::*' Change-Id: I5a286d8a0bec110548184ebdb11695a05141d1a2 Signed-off-by: Youngsoo Choi --- atom/browser/osr/osr_render_widget_host_view.cc | 60 ++++++++++++++++++++++--- atom/browser/osr/osr_render_widget_host_view.h | 6 +++ 2 files changed, 60 insertions(+), 6 deletions(-) diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index b54f4e7..dda58b0 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -366,7 +366,9 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView( DCHECK(render_widget_host_); render_widget_host_->SetView(this); -#if !defined(OS_MACOSX) +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#elif !defined(OS_MACOSX) content::ImageTransportFactory* factory = content::ImageTransportFactory::GetInstance(); delegated_frame_host_ = base::MakeUnique( @@ -397,7 +399,9 @@ OffScreenRenderWidgetHostView::~OffScreenRenderWidgetHostView() { if (native_window_) native_window_->RemoveObserver(this); -#if defined(OS_MACOSX) +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#elif defined(OS_MACOSX) if (is_showing_) browser_compositor_->SetRenderWidgetHostIsHidden(true); #else @@ -464,7 +468,11 @@ void OffScreenRenderWidgetHostView::SetSize(const gfx::Size& size) { ResizeRootLayer(); if (render_widget_host_) render_widget_host_->WasResized(); +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else GetDelegatedFrameHost()->WasResized(); +#endif } void OffScreenRenderWidgetHostView::SetBounds(const gfx::Rect& new_bounds) { @@ -495,7 +503,12 @@ bool OffScreenRenderWidgetHostView::HasFocus() const { } bool OffScreenRenderWidgetHostView::IsSurfaceAvailableForCopy() const { +#if defined(USE_EFL) + NOTIMPLEMENTED(); + return false; +#else return GetDelegatedFrameHost()->CanCopyToBitmap(); +#endif } void OffScreenRenderWidgetHostView::Show() { @@ -504,7 +517,9 @@ void OffScreenRenderWidgetHostView::Show() { is_showing_ = true; -#if defined(OS_MACOSX) +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#elif defined(OS_MACOSX) browser_compositor_->SetRenderWidgetHostIsHidden(false); #else delegated_frame_host_->SetCompositor(compositor_.get()); @@ -522,7 +537,9 @@ void OffScreenRenderWidgetHostView::Hide() { if (render_widget_host_) render_widget_host_->WasHidden(); -#if defined(OS_MACOSX) +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#elif defined(OS_MACOSX) browser_compositor_->SetRenderWidgetHostIsHidden(true); #else GetDelegatedFrameHost()->WasHidden(); @@ -583,7 +600,9 @@ void OffScreenRenderWidgetHostView::OnSwapCompositorFrame( // The compositor will draw directly to the SoftwareOutputDevice which // then calls OnPaint. -#if defined(OS_MACOSX) +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#elif defined(OS_MACOSX) browser_compositor_->SwapCompositorFrame(output_surface_id, std::move(frame)); #else @@ -605,7 +624,9 @@ void OffScreenRenderWidgetHostView::OnSwapCompositorFrame( gfx::ToEnclosingRect(gfx::RectF(root_pass->damage_rect)); damage_rect.Intersect(gfx::Rect(frame_size)); -#if defined(OS_MACOSX) +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#elif defined(OS_MACOSX) browser_compositor_->SwapCompositorFrame(output_surface_id, std::move(frame)); #else @@ -621,7 +642,11 @@ void OffScreenRenderWidgetHostView::OnSwapCompositorFrame( } void OffScreenRenderWidgetHostView::ClearCompositorFrame() { +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else GetDelegatedFrameHost()->ClearDelegatedFrame(); +#endif } void OffScreenRenderWidgetHostView::InitAsPopup( @@ -666,29 +691,50 @@ void OffScreenRenderWidgetHostView::CopyFromCompositingSurface( const gfx::Size& dst_size, const content::ReadbackRequestCallback& callback, const SkColorType preferred_color_type) { +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else GetDelegatedFrameHost()->CopyFromCompositingSurface( src_subrect, dst_size, callback, preferred_color_type); +#endif } void OffScreenRenderWidgetHostView::CopyFromCompositingSurfaceToVideoFrame( const gfx::Rect& src_subrect, const scoped_refptr& target, const base::Callback& callback) { +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else GetDelegatedFrameHost()->CopyFromCompositingSurfaceToVideoFrame( src_subrect, target, callback); +#endif } bool OffScreenRenderWidgetHostView::CanCopyToVideoFrame() const { +#if defined(USE_EFL) + NOTIMPLEMENTED(); + return false; +#else return GetDelegatedFrameHost()->CanCopyToVideoFrame(); +#endif } void OffScreenRenderWidgetHostView::BeginFrameSubscription( std::unique_ptr subscriber) { +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else GetDelegatedFrameHost()->BeginFrameSubscription(std::move(subscriber)); +#endif } void OffScreenRenderWidgetHostView::EndFrameSubscription() { +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else GetDelegatedFrameHost()->EndFrameSubscription(); +#endif } bool OffScreenRenderWidgetHostView::HasAcceleratedSurface(const gfx::Size &) { @@ -852,11 +898,13 @@ ui::Layer* OffScreenRenderWidgetHostView::GetRootLayer() const { return root_layer_.get(); } +#if !defined(USE_EFL) content::DelegatedFrameHost* OffScreenRenderWidgetHostView::GetDelegatedFrameHost() const { return delegated_frame_host_.get(); } #endif +#endif void OffScreenRenderWidgetHostView::SetupFrameRate(bool force) { if (!force && frame_rate_threshold_ms_ != 0) diff --git a/atom/browser/osr/osr_render_widget_host_view.h b/atom/browser/osr/osr_render_widget_host_view.h index 7380476..224b6d4 100644 --- a/atom/browser/osr/osr_render_widget_host_view.h +++ b/atom/browser/osr/osr_render_widget_host_view.h @@ -196,7 +196,10 @@ class OffScreenRenderWidgetHostView ui::Compositor* GetCompositor() const; ui::Layer* GetRootLayer() const; + // TODO: Enable DelegatedFrameHost for EFL port +#if !defined(USE_EFL) content::DelegatedFrameHost* GetDelegatedFrameHost() const; +#endif void Invalidate(); @@ -231,7 +234,10 @@ class OffScreenRenderWidgetHostView std::unique_ptr root_layer_; std::unique_ptr compositor_; + // TODO: Enable DelegatedFrameHost for EFL port +#if !defined(USE_EFL) std::unique_ptr delegated_frame_host_; +#endif std::unique_ptr copy_frame_generator_; std::unique_ptr begin_frame_timer_; -- 2.7.4 From b2dab08c19f14242d03b51c4bac9156211d73b65 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sun, 6 Aug 2017 10:02:31 +0000 Subject: [PATCH 05/16] [Bringup] Fix gtk related linking error EFL port needs to be implemented for LibnotifyNotification::Show. >> undefined reference to `libgtkui::GdkPixbufFromSkBitmap(SkBitmap const&)' Change-Id: Ibd4d3280aa3b1d86b421e41806508a8924663ca7 Signed-off-by: Youngsoo Choi --- vendor/brightray/browser/linux/libnotify_notification.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vendor/brightray/browser/linux/libnotify_notification.cc b/vendor/brightray/browser/linux/libnotify_notification.cc index dad3acb..061ef5f 100644 --- a/vendor/brightray/browser/linux/libnotify_notification.cc +++ b/vendor/brightray/browser/linux/libnotify_notification.cc @@ -105,6 +105,10 @@ void LibnotifyNotification::Show(const base::string16& title, nullptr); } + // FIXME: The chromium-efl does not support gtk port. +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else if (!icon.drawsNothing()) { GdkPixbuf* pixbuf = libgtkui::GdkPixbufFromSkBitmap(icon); libnotify_loader_.notify_notification_set_image_from_pixbuf( @@ -113,6 +117,7 @@ void LibnotifyNotification::Show(const base::string16& title, notification_, NOTIFY_EXPIRES_DEFAULT); g_object_unref(pixbuf); } +#endif if (!tag.empty()) { GQuark id = g_quark_from_string(tag.c_str()); -- 2.7.4 From d51fe699d358a6fd9f30cd2d1c3cae7d21bed258 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sat, 5 Aug 2017 07:40:31 +0000 Subject: [PATCH 06/16] [Bringup] Fix unity related linking error The chromium only has unity_service for gtk port. So, the unity_service needs to be implemented for EFL port in chromium-efl. >> undefined reference to `unity::*' Change-Id: I3cfc26b94f118274e9854296395de9faf169b0fa Signed-off-by: Youngsoo Choi --- atom/browser/browser_linux.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/atom/browser/browser_linux.cc b/atom/browser/browser_linux.cc index f569040..6fe9aac 100644 --- a/atom/browser/browser_linux.cc +++ b/atom/browser/browser_linux.cc @@ -10,7 +10,9 @@ #include "atom/browser/window_list.h" #include "atom/common/atom_version.h" #include "brightray/common/application_info.h" +#if !defined(USE_EFL) #include "chrome/browser/ui/libgtkui/unity_service.h" +#endif namespace atom { @@ -49,6 +51,9 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol, } bool Browser::SetBadgeCount(int count) { +#if defined(USE_EFL) + return false; +# else if (IsUnityRunning()) { unity::SetDownloadCount(count); badge_count_ = count; @@ -56,6 +61,7 @@ bool Browser::SetBadgeCount(int count) { } else { return false; } +#endif } void Browser::SetLoginItemSettings(LoginItemSettings settings) { @@ -75,7 +81,11 @@ std::string Browser::GetExecutableFileProductName() const { } bool Browser::IsUnityRunning() { +#if defined(USE_EFL) + return false; +#else return unity::IsRunning(); +#endif } } // namespace atom -- 2.7.4 From b93deaaf76f3972edbab7c3ec79b47552406e979 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Wed, 9 Aug 2017 11:17:53 +0000 Subject: [PATCH 07/16] fixup! Remove x11, aura, gtk and views dependency This adds filter for suffix auralinux.* not to include aura implementation in build. Change-Id: Ic37f941be430feac69d0fb2096cd59352f6d93a1 Signed-off-by: Youngsoo Choi --- vendor/brightray/filename_rules.gypi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/brightray/filename_rules.gypi b/vendor/brightray/filename_rules.gypi index f24b961..4ef1c07 100644 --- a/vendor/brightray/filename_rules.gypi +++ b/vendor/brightray/filename_rules.gypi @@ -78,7 +78,7 @@ ['exclude', '_x11(_unittest)?\\.(h|cc)$'], ['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'], ['exclude', '(^|/)x11/'], - ['exclude', '_aura(_browsertest|_unittest)?\\.(h|cc)$'], + ['exclude', '_aura(_browsertest|_unittest|linux)?\\.(h|cc)$'], ['exclude', '(^|/)aura/'], ['exclude', '_views\\.(h|cc)$'], ['exclude', '(^|/)views/'], -- 2.7.4 From 60248145c287d4a11ce2805aaf2c95e5718314cc Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Thu, 10 Aug 2017 20:47:00 +0900 Subject: [PATCH 08/16] fixup! Support EFL libraries via jhbuild This adds missing libraries. Change-Id: I22340bfea3e1810a3240231ebd141f64b6775ee6 Signed-off-by: Youngsoo Choi --- efl/build/jhbuild/jhbuild.modules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/efl/build/jhbuild/jhbuild.modules b/efl/build/jhbuild/jhbuild.modules index a00df1b..4ab0926 100755 --- a/efl/build/jhbuild/jhbuild.modules +++ b/efl/build/jhbuild/jhbuild.modules @@ -6,6 +6,10 @@ + + + + -- 2.7.4 From dd657af1ca4ce7557441956cee4653d479cfe2f3 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Wed, 9 Aug 2017 11:01:59 +0000 Subject: [PATCH 09/16] Make directory for filenames.gypi while building There should be '/PATH/TO/vendor/brightray/vendor/download/libchromiumcontent' so that filenames.gypi can be generated. Otherwise, following error occurs. >> IOError: [Errno 2] No such file or directory: >> '/PATH/TO/vendor/brightray/vendor/download/libchromiumcontent/filenames.gypi' Change-Id: I5f3bdc37d183ba222846bdd67eb7c5318066c20f Signed-off-by: Youngsoo Choi --- vendor/brightray/script/bootstrap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vendor/brightray/script/bootstrap b/vendor/brightray/script/bootstrap index 3ced740..88711dc 100755 --- a/vendor/brightray/script/bootstrap +++ b/vendor/brightray/script/bootstrap @@ -82,7 +82,8 @@ def setup_libchromiumcontent(is_dev, commit, target_arch, url, args = ['-f', '-c', commit, '--target_arch', target_arch, url, target_dir] if libcc_chromium_efl_path != None: args += ['--libcc_chromium_efl_path', libcc_chromium_efl_path] - if (libcc_source_path != None and + mkdir_p(target_dir) + elif (libcc_source_path != None and libcc_shared_library_path != None and libcc_static_library_path != None): args += ['--libcc_source_path', libcc_source_path, -- 2.7.4 From 46c9c06b3ae8e90e1118bfc672a20de965951879 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Fri, 18 Sep 2015 10:48:04 +0900 Subject: [PATCH 10/16] Implement initial native window This implements initial native window. Original CL: http://suprem.sec.samsung.net/gerrit/#/c/48867 This implements initial native webview. Change-Id: I79283c5aff50b65c477f7f696507e42b01c947b6 Signed-off-by: Youngsoo Choi --- atom/app/atom_main.cc | 9 ++ atom/browser/atom_browser_main_parts.cc | 10 +++ atom/browser/native_window.h | 6 +- atom/browser/native_window_efl.cc | 100 +++++++++++++++------ atom/browser/native_window_efl.h | 23 ++++- atom/browser/ui/accelerator_util_efl.cc | 4 +- efl/build/system.gyp | 17 ++++ electron.gyp | 2 + .../browser/inspectable_web_contents_impl.cc | 5 -- .../browser/inspectable_web_contents_view_efl.cc | 16 ++++ vendor/brightray/filenames.gypi | 1 + 11 files changed, 154 insertions(+), 39 deletions(-) create mode 100644 vendor/brightray/browser/inspectable_web_contents_view_efl.cc diff --git a/atom/app/atom_main.cc b/atom/app/atom_main.cc index 9c255db..c464de2 100644 --- a/atom/app/atom_main.cc +++ b/atom/app/atom_main.cc @@ -27,6 +27,10 @@ #include "atom/app/atom_library_main.h" #endif // defined(OS_MACOSX) +#if defined(USE_EFL) +#include "efl/init.h" +#endif + #include "atom/app/node_main.h" #include "atom/common/atom_command_line.h" #include "base/at_exit.h" @@ -124,6 +128,11 @@ int main(int argc, const char* argv[]) { return atom::NodeMain(argc, const_cast(argv)); } +#if defined(USE_EFL) + if (efl::Initialize(argc, argv)) + return 1; +#endif + atom::AtomMainDelegate delegate; content::ContentMainParams params(&delegate); params.argc = argc; diff --git a/atom/browser/atom_browser_main_parts.cc b/atom/browser/atom_browser_main_parts.cc index d3f8237..c5155be 100644 --- a/atom/browser/atom_browser_main_parts.cc +++ b/atom/browser/atom_browser_main_parts.cc @@ -30,6 +30,12 @@ #include "ui/events/devices/x11/touch_factory_x11.h" #endif +#if defined(USE_EFL) +#include "ui/display/screen_efl.h" +#endif + +#include "atom/common/node_includes.h" + namespace atom { namespace { @@ -180,6 +186,10 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() { libgtkui::GtkInitFromCommandLine(*base::CommandLine::ForCurrentProcess()); #endif +#if defined(USE_EFL) + ui::InstallScreenInstance(); +#endif + #if !defined(OS_MACOSX) // The corresponding call in macOS is in AtomApplicationDelegate. Browser::Get()->WillFinishLaunching(); diff --git a/atom/browser/native_window.h b/atom/browser/native_window.h index d3f18d8..654b68e 100644 --- a/atom/browser/native_window.h +++ b/atom/browser/native_window.h @@ -270,9 +270,9 @@ class NativeWindow : public base::SupportsUserData, bool is_modal() const { return is_modal_; } protected: - NativeWindow(brightray::InspectableWebContents* inspectable_web_contents, - const mate::Dictionary& options, - NativeWindow* parent); + explicit NativeWindow(brightray::InspectableWebContents* web_contents, + const mate::Dictionary& options, + NativeWindow* parent); // Convert draggable regions in raw format to SkRegion format. Caller is // responsible for deleting the returned SkRegion instance. diff --git a/atom/browser/native_window_efl.cc b/atom/browser/native_window_efl.cc index d92c00b..031d5b7 100755 --- a/atom/browser/native_window_efl.cc +++ b/atom/browser/native_window_efl.cc @@ -4,22 +4,63 @@ #include "atom/browser/native_window_efl.h" -#include "base/logging.h" +#include + +#include "atom/common/options_switches.h" +#include "base/command_line.h" +#include "content/public/browser/web_contents.h" +#include "efl/window_factory.h" +#include "ui/gfx/geometry/rect.h" +#include "ui/gfx/geometry/size.h" +#include "ui/gfx/image/image.h" namespace atom { +namespace { + +const int kDefaultWindowWidthDip = 800; +const int kDefaultWindowHeightDip = 600; + +} + NativeWindowEfl::NativeWindowEfl( - brightray::InspectableWebContents* web_contents, + brightray::InspectableWebContents* inspectable_web_contents, const mate::Dictionary& options, NativeWindow* parent) - : NativeWindow(web_contents, options, parent) { -} + : NativeWindow(inspectable_web_contents, options, parent) { +// options.Get(switches::kTitle, &title_); + + // Create Host window via elf::WindowFactory + window_ = efl::WindowFactory::GetHostWindow(web_contents_); + DCHECK(window_); + + gfx::Size size = gfx::Size(kDefaultWindowWidthDip, kDefaultWindowHeightDip); -NativeWindowEfl::~NativeWindowEfl() { + evas_object_smart_callback_add(window_, "delete,request", + OnWindowDeleteRequest, this); + + evas_object_resize(window_, size.width(), size.height()); + + // Add a new box to the parent. + Evas_Object* box = elm_box_add(window_); + evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(window_, box); + evas_object_show(box); + + // Add view at the end of the pack list. + Evas_Object* view = static_cast(web_contents_->GetNativeView()); + evas_object_size_hint_align_set(view, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(view, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_box_pack_end(box, view); + + web_contents_->Focus(); } void NativeWindowEfl::Close() { - NOTIMPLEMENTED(); + if(window_) + evas_object_del(window_); + window_ = nullptr; } void NativeWindowEfl::CloseImmediately() { @@ -36,7 +77,7 @@ bool NativeWindowEfl::IsFocused() { } void NativeWindowEfl::Show() { - NOTIMPLEMENTED(); + evas_object_show(window_); } void NativeWindowEfl::ShowInactive() { @@ -44,7 +85,7 @@ void NativeWindowEfl::ShowInactive() { } void NativeWindowEfl::Hide() { - NOTIMPLEMENTED(); + evas_object_hide(window_); } bool NativeWindowEfl::IsVisible() { @@ -58,16 +99,15 @@ bool NativeWindowEfl::IsEnabled() { } void NativeWindowEfl::Maximize() { - NOTIMPLEMENTED(); + elm_win_maximized_set(window_, EINA_TRUE); } void NativeWindowEfl::Unmaximize() { - NOTIMPLEMENTED(); + elm_win_maximized_set(window_, EINA_FALSE); } bool NativeWindowEfl::IsMaximized() { - NOTIMPLEMENTED(); - return true; + return elm_win_maximized_get(window_); } void NativeWindowEfl::Minimize() { @@ -79,26 +119,27 @@ void NativeWindowEfl::Restore() { } bool NativeWindowEfl::IsMinimized() { - NOTIMPLEMENTED(); - return true; + return !elm_win_maximized_get(window_); } void NativeWindowEfl::SetFullScreen(bool fullscreen) { - NOTIMPLEMENTED(); + elm_win_fullscreen_set(window_, fullscreen); } bool NativeWindowEfl::IsFullscreen() const { - NOTIMPLEMENTED(); - return true; + return elm_win_fullscreen_get(window_); } void NativeWindowEfl::SetBounds(const gfx::Rect& bounds, bool animate) { - NOTIMPLEMENTED(); + //evas_object_resize(window_, size.width(), size.height()); } + gfx::Rect NativeWindowEfl::GetBounds() { - NOTIMPLEMENTED(); return gfx::Rect(); +// int width, height; +// evas_object_geometry_get(window_, nullptr, nullptr, &width, &height); +// return gfx::Size(width, height); } void NativeWindowEfl::SetResizable(bool resizable) { @@ -175,11 +216,12 @@ void NativeWindowEfl::Invalidate() { } void NativeWindowEfl::SetTitle(const std::string& title) { - NOTIMPLEMENTED(); + title_ = title; + elm_win_title_set(window_, title.c_str()); } std::string NativeWindowEfl::GetTitle() { - NOTIMPLEMENTED(); + return title_; } void NativeWindowEfl::FlashFrame(bool flash) { NOTIMPLEMENTED(); @@ -224,8 +266,7 @@ void NativeWindowEfl::SetBrowserView(NativeBrowserView* browser_view) { } gfx::NativeWindow NativeWindowEfl::GetNativeWindow() { - NOTIMPLEMENTED(); - return gfx::NativeWindow(); + return window_; } gfx::AcceleratedWidget NativeWindowEfl::GetAcceleratedWidget() { @@ -265,11 +306,20 @@ gfx::Rect NativeWindowEfl::WindowBoundsToContentBounds(const gfx::Rect& bounds) } // static +void NativeWindowEfl::OnWindowDeleteRequest(void* data, Evas_Object*, void*) { + NativeWindowEfl* thiz = static_cast(data); + if(!elm_win_autodel_get(thiz->window_)) + thiz->Close(); + thiz->window_ = nullptr; + thiz->web_contents_->Close(); +} + +// static NativeWindow* NativeWindow::Create( - brightray::InspectableWebContents* inspectable_web_contents, + brightray::InspectableWebContents* web_contents, const mate::Dictionary& options, NativeWindow* parent) { - return new NativeWindowEfl(inspectable_web_contents, options, parent); + return new NativeWindowEfl(web_contents, options, parent); } } diff --git a/atom/browser/native_window_efl.h b/atom/browser/native_window_efl.h index bd4eb26..ea2afd4 100755 --- a/atom/browser/native_window_efl.h +++ b/atom/browser/native_window_efl.h @@ -7,17 +7,24 @@ #include "atom/browser/native_window.h" +#include + #include #include +namespace content { + +class WebContents; + +} // namespace content + namespace atom { class NativeWindowEfl : public NativeWindow { public: - NativeWindowEfl(brightray::InspectableWebContents* inspectable_web_contents, - const mate::Dictionary& options, - NativeWindow* parent); - virtual ~NativeWindowEfl() override; + explicit NativeWindowEfl(brightray::InspectableWebContents* inspectable_web_contents, + const mate::Dictionary& options, + NativeWindow* parent); void Close() override; void CloseImmediately() override; @@ -85,6 +92,14 @@ class NativeWindowEfl : public NativeWindow { // Converts between content bounds and window bounds. virtual gfx::Rect ContentBoundsToWindowBounds(const gfx::Rect& bounds) override; virtual gfx::Rect WindowBoundsToContentBounds(const gfx::Rect& bounds) override; + ~NativeWindowEfl() override {}; + + static void OnWindowDeleteRequest(void* data, Evas_Object*, void*); + + Evas_Object* window_; + content::WebContents* web_contents_; + + std::string title_; DISALLOW_COPY_AND_ASSIGN(NativeWindowEfl); }; diff --git a/atom/browser/ui/accelerator_util_efl.cc b/atom/browser/ui/accelerator_util_efl.cc index d7b7736..41fe4a1 100644 --- a/atom/browser/ui/accelerator_util_efl.cc +++ b/atom/browser/ui/accelerator_util_efl.cc @@ -1,5 +1,5 @@ -// Copyright (c) 2013 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be +// Copyright 2017 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "atom/browser/ui/accelerator_util.h" diff --git a/efl/build/system.gyp b/efl/build/system.gyp index e1894c0..542bf0b 100644 --- a/efl/build/system.gyp +++ b/efl/build/system.gyp @@ -69,6 +69,23 @@ ], }, # elementary { + 'target_name': 'evas', + 'type': 'none', + 'direct_dependent_settings': { + 'cflags': [ + ' Date: Fri, 18 Aug 2017 11:56:26 +0900 Subject: [PATCH 11/16] Add LD_LIBRARY_PATH Change-Id: I2c5e688aacf668df8bf685204eb66ef8d630ff0e Signed-off-by: Youngsoo Choi --- efl/build/build_desktop.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/efl/build/build_desktop.sh b/efl/build/build_desktop.sh index 0888006..2406afd 100755 --- a/efl/build/build_desktop.sh +++ b/efl/build/build_desktop.sh @@ -42,6 +42,7 @@ elif [ "${host_arch}" == "x86" ]; then _LIBDIR=lib fi export PKG_CONFIG_PATH="${JHBUILD_DEPS}/${_LIBDIR}/pkgconfig" +export LD_LIBRARY_PATH="${JHBUILD_DEPS}/${_LIBDIR}" $SCRIPTDIR/jhbuild/handle_exceptional_libs.sh jhbuild --no-interact -f ${SCRIPTDIR}/jhbuild/jhbuildrc -- 2.7.4 From c6333b584f028528a6dbbc351df7b7680963c650 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Fri, 18 Aug 2017 11:56:54 +0900 Subject: [PATCH 12/16] Remove unused library This removes unused library gst-plugins-good. Change-Id: Ic8d253c13e69d74e3d46e7f73696a819ee32619b Signed-off-by: Youngsoo Choi --- efl/build/jhbuild/jhbuild.modules | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/efl/build/jhbuild/jhbuild.modules b/efl/build/jhbuild/jhbuild.modules index 4ab0926..f68bd2f 100755 --- a/efl/build/jhbuild/jhbuild.modules +++ b/efl/build/jhbuild/jhbuild.modules @@ -7,7 +7,6 @@ - @@ -162,19 +161,6 @@ hash="sha256:c75dd400e451526ed71e1c4955e33d470a2581f5e71ecf84920a41c0a5c75322"/> - - - - - - - - - -- 2.7.4 From 7289646c6c4cd54ac656b3a70fb082e38436ab6d Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Mon, 21 Aug 2017 15:07:12 +0900 Subject: [PATCH 13/16] Init AtomCommandLine when render thread is started This patch initializes AtomCommandLine at AtomRendererClient::RenderThreadStarted. In case of Chromium-efl, AtomMain is not called when renderer process is executed, because it is executed by zygote. So we need to initialize AtomCommandLine at the other place. Original CL: http://suprem.sec.samsung.net/gerrit/#/c/51683 Change-Id: I2b91428269701398713a92efeb09a8e5e0a4db6e Signed-off-by: Youngsoo Choi --- atom/renderer/atom_renderer_client.cc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/atom/renderer/atom_renderer_client.cc b/atom/renderer/atom_renderer_client.cc index 5dafe08..1a9343e 100644 --- a/atom/renderer/atom_renderer_client.cc +++ b/atom/renderer/atom_renderer_client.cc @@ -7,6 +7,9 @@ #include #include +#if defined(USE_EFL) +#include "atom/common/atom_command_line.h" +#endif #include "atom_natives.h" // NOLINT: This file is generated with js2c #include "atom/common/api/atom_bindings.h" @@ -37,6 +40,17 @@ bool IsDevToolsExtension(content::RenderFrame* render_frame) { .SchemeIs("chrome-extension"); } +#if defined(USE_EFL) +//scoped_ptr StringVectorToArgArray( +const char** StringVectorToArgArray( + const std::vector& vector) { + const char** array = new const char*[vector.size()]; + for (size_t i = 0; i < vector.size(); ++i) + array[i] = vector[i].c_str(); + return array; +} +#endif + } // namespace AtomRendererClient::AtomRendererClient() @@ -52,6 +66,15 @@ AtomRendererClient::~AtomRendererClient() { } void AtomRendererClient::RenderThreadStarted() { +#if defined(USE_EFL) + // In case of Chromium-efl, AtomMain is not called when renderer process + // is executed, because it is executed by zygote. + // So we need to initialize AtomCommandLine at the other place. + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + base::CommandLine::StringVector argv = command_line->argv(); + const char** c_argv = StringVectorToArgArray(argv); + atom::AtomCommandLine::Init(argv.size(), c_argv); +#endif OverrideNodeArrayBuffer(); RendererClientBase::RenderThreadStarted(); } -- 2.7.4 From 473bdb4e78c3b826cd7902ffa7575409c49b8255 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Mon, 21 Aug 2017 11:16:51 +0900 Subject: [PATCH 14/16] Add switches for EFL port This adds switches for EFL port. Original CL: http://suprem.sec.samsung.net/gerrit/#/c/49196 Change-Id: Ide9709bb21518c543b671bfaaf72f269fac4e9e0 Signed-off-by: Youngsoo Choi --- atom/app/atom_main.cc | 14 ++++++++++++++ vendor/brightray/browser/browser_main_parts.cc | 1 + 2 files changed, 15 insertions(+) diff --git a/atom/app/atom_main.cc b/atom/app/atom_main.cc index c464de2..013652f 100644 --- a/atom/app/atom_main.cc +++ b/atom/app/atom_main.cc @@ -40,6 +40,12 @@ namespace { const char* kRunAsNode = "ELECTRON_RUN_AS_NODE"; +// Default command line flags for all profiles and platforms +const char* kDefaultCommandLineFlags[] = { + "allow-file-access-from-files", + "enable-tizen-app-container", +}; + bool IsEnvSet(const char* name) { #if defined(OS_WIN) size_t required_size; @@ -131,6 +137,14 @@ int main(int argc, const char* argv[]) { #if defined(USE_EFL) if (efl::Initialize(argc, argv)) return 1; + + // Add params for EFL port + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + + static std::vector flags; + for (auto arg : kDefaultCommandLineFlags) + command_line->AppendSwitch(const_cast(arg)); + efl::AppendPortParams(*command_line); #endif atom::AtomMainDelegate delegate; diff --git a/vendor/brightray/browser/browser_main_parts.cc b/vendor/brightray/browser/browser_main_parts.cc index aa2a60e..b0008ba 100644 --- a/vendor/brightray/browser/browser_main_parts.cc +++ b/vendor/brightray/browser/browser_main_parts.cc @@ -206,6 +206,7 @@ void BrowserMainParts::PreMainMessageLoopStart() { #if defined(OS_MACOSX) InitializeMainNib(); #endif + media::SetLocalizedStringProvider(MediaStringProvider); } -- 2.7.4 From bbbb7a18c50e44319307aa05bb82b9628db375e5 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Mon, 21 Aug 2017 15:34:22 +0900 Subject: [PATCH 15/16] Add scripts for launching electron on desktop This adds scripts for launching electron on desktop. Change-Id: I91d9df8829049e435c391fcd1dff129e80834623 Signed-off-by: Youngsoo Choi --- efl/build/desktop/electron.sh | 4 +++ efl/build/desktop/launch.sh | 63 +++++++++++++++++++++++++++++++++++++++++++ electron.gyp | 14 ++++++++++ 3 files changed, 81 insertions(+) create mode 100755 efl/build/desktop/electron.sh create mode 100755 efl/build/desktop/launch.sh diff --git a/efl/build/desktop/electron.sh b/efl/build/desktop/electron.sh new file mode 100755 index 0000000..9061e05 --- /dev/null +++ b/efl/build/desktop/electron.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +SCRIPTDIR=$(readlink -e $(dirname $0)) +${SCRIPTDIR}/launch.sh electron "$@" diff --git a/efl/build/desktop/launch.sh b/efl/build/desktop/launch.sh new file mode 100755 index 0000000..5d041e9 --- /dev/null +++ b/efl/build/desktop/launch.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +EXECUTABLE=$1 +MAIN_JS=$2 +CHROMIUM_EFL_PATH=$3 + +echo "CHROMIUM_EFL_PATH: $CHROMIUM_EFL_PATH" + +if [ ! $EXECUTABLE ]; then + echo launch_exec.sh takes the name of an executable argument >&2 + exit 1 +fi + +shift + +HOST_ARCH=$(uname -m) + +if [ $HOST_ARCH = "x86_64" -o $HOST_ARCH = "amd64" ]; then + _LIBDIR=lib64 +else + _LIBDIR=lib +fi + +SCRIPTDIR=$(readlink -e $(dirname $0)) +OUT_DIR=$(echo $SCRIPTDIR | grep -Po "(?<=/)out\..*?(?=/)") + +if echo $SCRIPTDIR | grep -qw "Debug"; then + BUILD_MODE=Debug +else + BUILD_MODE=Release +fi + +# [M56_2924] ELECTRON_EFL_LIBDIR should be fixed. +# ELECTRON_EFL_LIBDIR=$(readlink -e $SCRIPTDIR/lib) +ELECTRON_EFL_LIBDIR=$(readlink -e $SCRIPTDIR) +ELECTRON_EFL_DEPENDENCIES_LIBDIR=$(readlink -e $SCRIPTDIR/../Dependencies/Root/$_LIBDIR) +echo "ELECTRON_EFL_LIBDIR: $ELECTRON_EFL_LIBDIR" +echo "ELECTRON_EFL_DEPENDENCIES_LIBDIR: $ELECTRON_EFL_DEPENDENCIES_LIBDIR" + +export LD_LIBRARY_PATH=$ELECTRON_EFL_DEPENDENCIES_LIBDIR:$ELECTRON_EFL_LIBDIR:$CHROMIUM_EFL_PATH:${LD_LIBRARY_PATH} +echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" + +# Allow chromium-efl to work with llvmpipe or softpipe mesa backends +export EVAS_GL_NO_BLACKLIST=1 + +debug=0 +while [ $# -gt 0 ]; do + case "$1" in + -g | --debug ) + debug=1 + shift + ;; + * ) + break + ;; + esac +done + +if [ $debug -eq 1 ] ; then + exec gdb --args ${SCRIPTDIR}/$EXECUTABLE "$@" +else + exec ${SCRIPTDIR}/$EXECUTABLE "$MAIN_JS" +fi diff --git a/electron.gyp b/electron.gyp index 9fc0032..fa56224 100644 --- a/electron.gyp +++ b/electron.gyp @@ -363,6 +363,7 @@ '<(DEPTH)/efl/build/system.gyp:elementary', '<(DEPTH)/efl/build/system.gyp:evas', '<(DEPTH)/efl/build/system.gyp:icu', + 'electron_shell_copy', ], 'sources': [ 'chromium_src/chrome/browser/icon_loader_efllinux.cc', @@ -390,6 +391,19 @@ ], }, # target <(product_name)_lib { + 'target_name': 'electron_shell_copy', + 'type': 'none', + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)', + 'files': [ + '<(DEPTH)/efl/build/desktop/electron.sh', + '<(DEPTH)/efl/build/desktop/launch.sh', + ], + }, + ], + }, # target atom_js2c_copy + { 'target_name': 'js2asar', 'type': 'none', 'actions': [ -- 2.7.4 From 2d4f43d7f3301d5609108f7950f63ef2be55f033 Mon Sep 17 00:00:00 2001 From: nke94 Date: Thu, 31 Aug 2017 19:04:15 +0900 Subject: [PATCH 16/16] remove build from .git ignore list Change-Id: Ic43ee6e2087f3195b9ea9a7c1d89815368d59105 Signed-off-by: nke94 --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index d9f918d..0e82dcf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ .DS_Store .tags* /.idea/ -/build/ /dist/ /external_binaries/ /out/ -- 2.7.4