Skip to content

Commit

Permalink
Always build GTK shell (flutter#17634)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartmorgan authored Apr 11, 2020
1 parent f779f09 commit 71d8edb
Show file tree
Hide file tree
Showing 7 changed files with 536 additions and 279 deletions.
5 changes: 4 additions & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ allowed_hosts = [
]

deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '0c64fd23eeedbad60c2bfa294710cd587ccb7c27',
'src': 'https://github.com/flutter/buildroot.git' + '@' + '036715c76da60220b39312ea066cd65d32c2157d',

# Fuchsia compatibility
#
Expand Down Expand Up @@ -179,6 +179,9 @@ deps = {
'src/third_party/icu':
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '5005010d694e16571b8dfbf07d70817841f80a69',

'src/third_party/khronos':
Var('chromium_git') + '/chromium/src/third_party/khronos.git' + '@' + '7122230e90547962e0f0c627f62eeed3c701f275',

'src/third_party/boringssl':
Var('github_git') + '/dart-lang/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'),

Expand Down
42 changes: 42 additions & 0 deletions ci/licenses_golden/licenses_gpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Signature: ffe64a3daaf0ad982854594ad155dd56

UNUSED LICENSES:


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
USED LICENSES:

====================================================================================================
LIBRARY: gpu
ORIGIN: ../../../flutter/LICENSE
TYPE: LicenseType.bsd
FILE: ../../../gpu/GLES2/gl2chromium.h
FILE: ../../../gpu/command_buffer/client/gles2_c_lib_export.h
----------------------------------------------------------------------------------------------------
Copyright 2013 The Flutter Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
====================================================================================================
Total license count: 1
372 changes: 250 additions & 122 deletions ci/licenses_golden/licenses_third_party

Large diffs are not rendered by default.

85 changes: 40 additions & 45 deletions shell/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,19 @@
assert(is_linux)

import("//flutter/shell/platform/glfw/config.gni")
import("//flutter/shell/platform/linux/config.gni")

group("linux") {
deps = []
deps = [
":flutter_linux_gtk",
":publish_headers_linux",
]
if (build_glfw_shell) {
deps += [
":flutter_linux_glfw",
"//flutter/shell/platform/glfw:publish_headers_glfw",
"//flutter/shell/platform/glfw/client_wrapper:publish_wrapper_glfw",
]
}
if (build_linux_shell) {
deps += [
":flutter_linux_gtk",
":publish_headers_linux",
]
}
}

# Temporary workaround for the issue describe in
Expand All @@ -46,50 +42,49 @@ if (build_glfw_shell) {
}
}

if (build_linux_shell) {
_public_headers = [
"public/flutter_linux/fl_dart_project.h",
"public/flutter_linux/fl_view.h",
"public/flutter_linux/flutter_linux.h",
]
_public_headers = [
"public/flutter_linux/fl_dart_project.h",
"public/flutter_linux/fl_view.h",
"public/flutter_linux/flutter_linux.h",
]

config("relative_flutter_linux_headers") {
include_dirs = [ "public" ]
}
config("relative_flutter_linux_headers") {
include_dirs = [ "public" ]
}

source_set("flutter_linux") {
public = _public_headers
source_set("flutter_linux") {
public = _public_headers

sources = [
"fl_dart_project.cc",
"fl_view.cc",
]
sources = [
"fl_dart_project.cc",
"fl_view.cc",
]

configs += [
"//flutter/shell/platform/linux/config:gtk",
"//flutter/shell/platform/linux/config:egl",
]
configs += [
"//flutter/shell/platform/linux/config:gtk",
"//flutter/shell/platform/linux/config:egl",
"//third_party/khronos:khronos_headers",
]

# Set flag to stop headers being directly included (library users should not do this)
defines = [ "FLUTTER_LINUX_COMPILATION" ]
# Set flag to stop headers being directly included (library users should not do this)
defines = [ "FLUTTER_LINUX_COMPILATION" ]

deps = [
"//flutter/shell/platform/embedder:embedder_with_symbol_prefix",
]
}
deps = [
"//flutter/shell/platform/embedder:embedder_with_symbol_prefix",
]
}

shared_library("flutter_linux_gtk") {
deps = [
":flutter_linux",
]
shared_library("flutter_linux_gtk") {
deps = [
":flutter_linux",
]

public_configs = [ "//flutter:config" ]
}
public_configs = [ "//flutter:config" ]
}

copy("publish_headers_linux") {
sources = _public_headers
outputs = [
"$root_out_dir/flutter_linux/{{source_file_part}}",
]
}
copy("publish_headers_linux") {
sources = _public_headers
outputs = [
"$root_out_dir/flutter_linux/{{source_file_part}}",
]
}
11 changes: 0 additions & 11 deletions shell/platform/linux/config.gni

This file was deleted.

14 changes: 6 additions & 8 deletions shell/platform/linux/config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
# found in the LICENSE file.

import("//build/config/linux/pkg_config.gni")
import("//flutter/shell/platform/linux/config.gni")

pkg_config("x11") {
packages = [ "x11" ]
}

if (build_linux_shell) {
pkg_config("gtk") {
packages = [ "gtk+-3.0" ]
}
pkg_config("egl") {
packages = [ "egl" ]
}
pkg_config("gtk") {
packages = [ "gtk+-3.0" ]
}

pkg_config("egl") {
packages = [ "egl" ]
}
Loading

0 comments on commit 71d8edb

Please sign in to comment.