Browse Source

Add chromedriver to build
Make sure certain paths/files don't make it into the dist zip
Don't build the content shell test_runner
Make sure libffmpeg.dylib gets put in the right place
Run verify-ffmpeg on Mac builds
Add ffmpeg build to VSTS

John Kleinschmidt 6 years ago
parent
commit
e78d84165a
4 changed files with 36 additions and 9 deletions
  1. 5 8
      BUILD.gn
  2. 1 1
      brightray/BUILD.gn
  3. 23 0
      build/zip.py
  4. 7 0
      vsts.yml

+ 5 - 8
BUILD.gn

@@ -222,6 +222,7 @@ static_library("electron_lib") {
     "//base",
     "//base:i18n",
     "//chrome/common:constants",
+    "//chrome/test/chromedriver",
     "//components/network_session_configurator/common",
     "//components/prefs",
     "//components/printing/common",
@@ -497,14 +498,10 @@ if (is_mac) {
     ]
   }
 
-  if (!is_component_build) {
+  if (is_component_ffmpeg) {
     bundle_data("electron_framework_libraries") {
-      sources = []
-      public_deps = []
-      if (is_component_ffmpeg) {
-        sources += [ "$root_out_dir/libffmpeg.dylib" ]
-        public_deps += [ "//third_party/ffmpeg:ffmpeg" ]
-      }
+      sources =  [ "$root_out_dir/libffmpeg.dylib" ]
+      public_deps = [ "//third_party/ffmpeg:ffmpeg" ]
       outputs = [
         "{{bundle_contents_dir}}/Libraries/{{source_file_part}}",
       ]
@@ -531,7 +528,7 @@ if (is_mac) {
   mac_framework_bundle("electron_framework") {
     output_name = electron_framework_name
     framework_version = electron_framework_version
-    framework_contents = [ "Resources" ]
+    framework_contents = [ "Resources", "Libraries" ]
     public_deps = [
       ":electron_lib",
     ]

+ 1 - 1
brightray/BUILD.gn

@@ -7,7 +7,7 @@ static_library("brightray") {
     "//components/network_session_configurator/common",
     "//components/prefs",
     "//content/public/browser",
-    "//content/shell:resources",
+    "//content/shell:copy_shell_resources",
     "//net:extras",
     "//net:net_with_v8",
     "//skia",

+ 23 - 0
build/zip.py

@@ -10,6 +10,27 @@ LINUX_BINARIES_TO_STRIP = [
   'libnode.so'
 ]
 
+EXTENSIONS_TO_SKIP = [
+  '.pdb'
+]
+
+PATHS_TO_SKIP = [
+  'angledata',
+  'swiftshader',
+  'resources/inspector'
+]
+
+def skip_path(dep):
+  should_skip = False
+  for path in PATHS_TO_SKIP:
+    if dep.startswith(path):
+      print 'Skipping: '+dep
+      should_skip = True
+  for extension in EXTENSIONS_TO_SKIP:
+    if dep.endswith(extension):
+      print 'Skipping: '+dep
+      should_skip = True
+
 def strip_binaries(target_cpu, dep):
   for binary in LINUX_BINARIES_TO_STRIP:
     if dep.endswith(binary):
@@ -48,6 +69,8 @@ def main(argv):
       for dep in dist_files:
         if target_os == 'linux':
             strip_binaries(target_cpu, dep)
+        if skip_path(dep):
+          continue
         if os.path.isdir(dep):
           for root, dirs, files in os.walk(dep):
             for file in files:

+ 7 - 0
vsts.yml

@@ -51,6 +51,13 @@ jobs:
       ninja -C out/Default electron:electron_app
     displayName: Ninja build app
 
+  - bash: |
+      cd src
+      gn gen out/ffmpeg --args='import("//electron/build/args/ffmpeg.gn") cc_wrapper="'"$SCCACHE_PATH"'"'" $GN_EXTRA_ARGS"
+      ninja -C out/ffmpeg third_party/ffmpeg
+    displayName: Non proprietary ffmpeg build
+    condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
+
   - bash: |
       "$SCCACHE_BINARY" --stop-server
     displayName: Check sccache stats after build