build: remove gyp build files (#14097)
* build: remove gyp build files * docs: update build instructions * build: temporary restore electron.gyp * build: do not update Electron version in the electron.gyp * chore: remove unused submodules * ci: remove obsolete CI scripts and configs * chore: remove obsolete scripts * chore: remove obsolete functions from lib/util.py * ci: send Slack notification for nightly build results
This commit is contained in:
Родитель
98eee52fac
Коммит
72526927d9
|
@ -19,134 +19,6 @@ notify-slack-success: ¬ify-slack-success
|
|||
fi
|
||||
when: on_success
|
||||
|
||||
build-steps: &build-steps
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Install Node.js 10 on MacOS
|
||||
command: |
|
||||
if [ "$INSTALL_MACOS_NODE" == "true" ]; then
|
||||
echo 'Installing Node.js 10 for MacOS'
|
||||
brew update
|
||||
brew install node@10
|
||||
fi
|
||||
- run:
|
||||
name: Check for release
|
||||
command: |
|
||||
if [ -n "${RUN_RELEASE_BUILD}" ]; then
|
||||
echo 'release build triggered from api'
|
||||
echo 'export ELECTRON_RELEASE=1 UPLOAD_TO_S3=1' >> $BASH_ENV
|
||||
fi
|
||||
- run:
|
||||
name: Bootstrap
|
||||
command: |
|
||||
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||
echo "Bootstrapping Electron for release build for $TARGET_ARCH"
|
||||
script/bootstrap.py --target_arch=$TARGET_ARCH
|
||||
else
|
||||
echo "Bootstrapping Electron for debug build for $TARGET_ARCH"
|
||||
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
|
||||
fi
|
||||
- run:
|
||||
name: Lint
|
||||
command: npm run lint
|
||||
- run:
|
||||
name: Build
|
||||
command: |
|
||||
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||
echo 'Building Electron for release'
|
||||
script/build.py -c R
|
||||
else
|
||||
echo 'Building Electron for debug'
|
||||
script/build.py -c D
|
||||
fi
|
||||
- run:
|
||||
name: Create distribution
|
||||
command: |
|
||||
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||
echo 'Creating Electron release distribution'
|
||||
script/create-dist.py
|
||||
else
|
||||
echo 'Skipping create distribution because build is not for release'
|
||||
fi
|
||||
- run:
|
||||
name: Upload distribution
|
||||
command: |
|
||||
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$UPLOAD_TO_S3" != "1" ]; then
|
||||
echo 'Uploading Electron release distribution to github releases'
|
||||
script/upload.py
|
||||
elif [ "$ELECTRON_RELEASE" == "1" ] && [ "$UPLOAD_TO_S3" == "1" ]; then
|
||||
echo 'Uploading Electron release distribution to s3'
|
||||
script/upload.py --upload_to_s3
|
||||
else
|
||||
echo 'Skipping upload distribution because build is not for release'
|
||||
fi
|
||||
- run:
|
||||
name: Setup for headless testing
|
||||
command: |
|
||||
if [ "$RUN_HEADLESS_TESTS" == "true" ]; then
|
||||
echo 'Setup for headless testing'
|
||||
sh -e /etc/init.d/xvfb start
|
||||
else
|
||||
echo 'Headless testing not needed'
|
||||
fi
|
||||
- run:
|
||||
name: Test
|
||||
environment:
|
||||
MOCHA_FILE: junit/test-results.xml
|
||||
MOCHA_REPORTER: mocha-junit-reporter
|
||||
command: |
|
||||
if [ "$RUN_TESTS" == "true" ]; then
|
||||
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
||||
echo 'Testing Electron debug build'
|
||||
mkdir junit
|
||||
script/test.py --ci --rebuild_native_modules
|
||||
else
|
||||
if [ "$UPLOAD_TO_S3" == "1" ]; then
|
||||
echo 'Testing Electron release build'
|
||||
mkdir junit
|
||||
script/test.py --ci --rebuild_native_modules -c R
|
||||
else
|
||||
echo 'Skipping tests on GitHub release'
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo 'Skipping tests due to configuration'
|
||||
fi
|
||||
- run:
|
||||
name: Verify FFmpeg
|
||||
command: |
|
||||
if [ "$RUN_TESTS" == "true" ]; then
|
||||
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
||||
echo 'Verifying ffmpeg on debug build'
|
||||
script/verify-ffmpeg.py
|
||||
else
|
||||
echo 'Verifying ffmpeg on release build'
|
||||
script/verify-ffmpeg.py -c R
|
||||
fi
|
||||
else
|
||||
echo 'Skipping tests due to configuration'
|
||||
fi
|
||||
|
||||
- run:
|
||||
name: Generate Typescript Definitions
|
||||
command: |
|
||||
if [ "$CREATE_TYPESCRIPT_DEFS" == "true" ]; then
|
||||
npm run create-typescript-definitions
|
||||
fi
|
||||
- <<: *notify-slack-failure
|
||||
- <<: *notify-slack-success
|
||||
- persist_to_workspace:
|
||||
root: out
|
||||
paths:
|
||||
- "*"
|
||||
- store_test_results:
|
||||
path: junit
|
||||
- store_artifacts:
|
||||
path: junit
|
||||
- store_artifacts:
|
||||
path: out
|
||||
|
||||
gn-build-steps: &gn-build-steps
|
||||
steps:
|
||||
- run:
|
||||
|
@ -251,6 +123,8 @@ gn-build-steps: &gn-build-steps
|
|||
(cd electron/spec && npm install)
|
||||
python electron/script/lib/dbus_mock.py ./out/Default/electron electron/spec --ci --enable-logging
|
||||
fi
|
||||
- <<: *notify-slack-failure
|
||||
- <<: *notify-slack-success
|
||||
- store_test_results:
|
||||
path: src/junit
|
||||
- store_artifacts:
|
||||
|
@ -327,6 +201,8 @@ gn-mac-build-steps: &gn-mac-build-steps
|
|||
(cd electron/spec && npm install)
|
||||
./out/Default/Electron.app/Contents/MacOS/Electron electron/spec --ci --enable-logging
|
||||
fi
|
||||
- <<: *notify-slack-failure
|
||||
- <<: *notify-slack-success
|
||||
- store_test_results:
|
||||
path: src/junit
|
||||
- store_artifacts:
|
||||
|
@ -344,172 +220,8 @@ gn-mac-build-machine: &gn-mac-build-machine
|
|||
xcode: "8.3.3"
|
||||
resource_class: large
|
||||
|
||||
build-defaults: &build-defaults
|
||||
docker:
|
||||
- image: electronbuilds/electron:0.0.8
|
||||
<<: *build-steps
|
||||
|
||||
version: 2
|
||||
jobs:
|
||||
electron-linux-arm:
|
||||
environment:
|
||||
TARGET_ARCH: arm
|
||||
<<: *build-defaults
|
||||
resource_class: 2xlarge
|
||||
|
||||
electron-linux-arm-test:
|
||||
machine: true
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /tmp/workspace/project/out
|
||||
- checkout
|
||||
- run:
|
||||
name: Test in ARM docker container
|
||||
command: |
|
||||
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
docker run -it \
|
||||
--mount type=bind,source=/tmp/workspace,target=/tmp/workspace \
|
||||
--rm electronbuilds/electronarm7:0.0.5 > version.txt
|
||||
cat version.txt
|
||||
if grep -q `script/get-version.py` version.txt; then
|
||||
echo "Versions match"
|
||||
else
|
||||
echo "Versions do not match"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Skipping test for release build"
|
||||
fi
|
||||
|
||||
electron-linux-arm-release-nightly:
|
||||
environment:
|
||||
TARGET_ARCH: arm
|
||||
RUN_RELEASE_BUILD: true
|
||||
NIGHTLY_BUILD: true
|
||||
<<: *build-defaults
|
||||
resource_class: 2xlarge
|
||||
|
||||
electron-linux-arm64:
|
||||
environment:
|
||||
TARGET_ARCH: arm64
|
||||
<<: *build-defaults
|
||||
resource_class: 2xlarge
|
||||
|
||||
electron-linux-arm64-test:
|
||||
machine: true
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /tmp/workspace/project/out
|
||||
- checkout
|
||||
- run:
|
||||
name: Test in ARM64 docker container
|
||||
command: |
|
||||
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
docker run -it \
|
||||
--mount type=bind,source=/tmp/workspace,target=/tmp/workspace \
|
||||
--rm electronbuilds/electronarm64:0.0.6 > version.txt
|
||||
cat version.txt
|
||||
if grep -q `script/get-version.py` version.txt; then
|
||||
echo "Versions match"
|
||||
else
|
||||
echo "Versions do not match"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Skipping test for release build"
|
||||
fi
|
||||
|
||||
electron-linux-arm64-release-nightly:
|
||||
environment:
|
||||
TARGET_ARCH: arm64
|
||||
RUN_RELEASE_BUILD: true
|
||||
NIGHTLY_BUILD: true
|
||||
<<: *build-defaults
|
||||
resource_class: 2xlarge
|
||||
|
||||
electron-linux-ia32:
|
||||
environment:
|
||||
TARGET_ARCH: ia32
|
||||
DISPLAY: ':99.0'
|
||||
RUN_TESTS: true
|
||||
RUN_HEADLESS_TESTS: true
|
||||
<<: *build-defaults
|
||||
resource_class: xlarge
|
||||
|
||||
electron-linux-ia32-release-nightly:
|
||||
environment:
|
||||
TARGET_ARCH: ia32
|
||||
RUN_RELEASE_BUILD: true
|
||||
NIGHTLY_BUILD: true
|
||||
<<: *build-defaults
|
||||
resource_class: xlarge
|
||||
|
||||
electron-linux-mips64el:
|
||||
environment:
|
||||
TARGET_ARCH: mips64el
|
||||
<<: *build-defaults
|
||||
resource_class: xlarge
|
||||
|
||||
electron-linux-x64:
|
||||
environment:
|
||||
TARGET_ARCH: x64
|
||||
DISPLAY: ':99.0'
|
||||
RUN_TESTS: true
|
||||
RUN_HEADLESS_TESTS: true
|
||||
CREATE_TYPESCRIPT_DEFS: true
|
||||
<<: *build-defaults
|
||||
resource_class: xlarge
|
||||
|
||||
electron-linux-x64-release-nightly:
|
||||
environment:
|
||||
TARGET_ARCH: x64
|
||||
RUN_RELEASE_BUILD: true
|
||||
NIGHTLY_BUILD: true
|
||||
<<: *build-defaults
|
||||
resource_class: xlarge
|
||||
|
||||
electron-osx-x64:
|
||||
environment:
|
||||
TARGET_ARCH: x64
|
||||
RUN_TESTS: true
|
||||
INSTALL_MACOS_NODE: true
|
||||
macos:
|
||||
xcode: "8.3.3"
|
||||
<<: *build-steps
|
||||
|
||||
electron-osx-x64-release-nightly:
|
||||
environment:
|
||||
TARGET_ARCH: x64
|
||||
RUN_RELEASE_BUILD: true
|
||||
INSTALL_MACOS_NODE: true
|
||||
NIGHTLY_BUILD: true
|
||||
macos:
|
||||
xcode: "8.3.3"
|
||||
<<: *build-steps
|
||||
|
||||
electron-mas-x64:
|
||||
environment:
|
||||
TARGET_ARCH: x64
|
||||
MAS_BUILD: 1
|
||||
RUN_TESTS: true
|
||||
INSTALL_MACOS_NODE: true
|
||||
macos:
|
||||
xcode: "8.3.3"
|
||||
<<: *build-steps
|
||||
|
||||
electron-mas-x64-release-nightly:
|
||||
environment:
|
||||
TARGET_ARCH: x64
|
||||
MAS_BUILD: 1
|
||||
RUN_RELEASE_BUILD: true
|
||||
INSTALL_MACOS_NODE: true
|
||||
NIGHTLY_BUILD: true
|
||||
macos:
|
||||
xcode: "8.3.3"
|
||||
<<: *build-steps
|
||||
|
||||
electron-gn-linux-x64-debug-fyi:
|
||||
environment:
|
||||
DISPLAY: ':99.0'
|
||||
|
@ -531,6 +243,7 @@ jobs:
|
|||
DISPLAY: ':99.0'
|
||||
GN_CONFIG: //electron/build/args/release.gn
|
||||
BUILD_FFMPEG: true
|
||||
NIGHTLY_BUILD: true
|
||||
<<: *gn-linux-build-machine
|
||||
<<: *gn-build-steps
|
||||
|
||||
|
@ -561,6 +274,7 @@ jobs:
|
|||
GN_EXTRA_ARGS: 'target_cpu = "x86"'
|
||||
NPM_CONFIG_ARCH: ia32
|
||||
BUILD_FFMPEG: true
|
||||
NIGHTLY_BUILD: true
|
||||
<<: *gn-linux-build-machine
|
||||
<<: *gn-build-steps
|
||||
|
||||
|
@ -591,6 +305,7 @@ jobs:
|
|||
BUILD_FFMPEG: true
|
||||
BUILD_NATIVE_MKSNAPSHOT: true
|
||||
MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm
|
||||
NIGHTLY_BUILD: true
|
||||
<<: *gn-linux-build-machine
|
||||
<<: *gn-build-steps
|
||||
|
||||
|
@ -621,6 +336,7 @@ jobs:
|
|||
BUILD_FFMPEG: true
|
||||
BUILD_NATIVE_MKSNAPSHOT: true
|
||||
MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm64
|
||||
NIGHTLY_BUILD: true
|
||||
<<: *gn-linux-build-machine
|
||||
<<: *gn-build-steps
|
||||
|
||||
|
@ -628,6 +344,7 @@ jobs:
|
|||
environment:
|
||||
GN_CONFIG: //electron/build/args/release.gn
|
||||
RUN_TESTS: true
|
||||
NIGHTLY_BUILD: true
|
||||
<<: *gn-mac-build-machine
|
||||
<<: *gn-mac-build-steps
|
||||
|
||||
|
@ -650,6 +367,7 @@ jobs:
|
|||
GN_CONFIG: //electron/build/args/release.gn
|
||||
RUN_TESTS: true
|
||||
GN_EXTRA_ARGS: 'is_mas_build = true'
|
||||
NIGHTLY_BUILD: true
|
||||
<<: *gn-mac-build-machine
|
||||
<<: *gn-mac-build-steps
|
||||
|
||||
|
@ -671,30 +389,6 @@ jobs:
|
|||
|
||||
workflows:
|
||||
version: 2
|
||||
build-arm:
|
||||
jobs:
|
||||
- electron-linux-arm
|
||||
- electron-linux-arm-test:
|
||||
requires:
|
||||
- electron-linux-arm
|
||||
build-arm64:
|
||||
jobs:
|
||||
- electron-linux-arm64
|
||||
- electron-linux-arm64-test:
|
||||
requires:
|
||||
- electron-linux-arm64
|
||||
build-ia32:
|
||||
jobs:
|
||||
- electron-linux-ia32
|
||||
build-x64:
|
||||
jobs:
|
||||
- electron-linux-x64
|
||||
build-osx-x64:
|
||||
jobs:
|
||||
- electron-osx-x64
|
||||
build-mas-x64:
|
||||
jobs:
|
||||
- electron-mas-x64
|
||||
build-gn-linux:
|
||||
jobs:
|
||||
- electron-gn-linux-x64-debug-fyi
|
||||
|
@ -712,24 +406,6 @@ workflows:
|
|||
- electron-gn-osx-debug-fyi
|
||||
- electron-gn-osx-testing-fyi
|
||||
|
||||
nightly-release-test:
|
||||
triggers:
|
||||
- schedule:
|
||||
cron: "0 0 * * *"
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- 3-0-x
|
||||
- 2-0-x
|
||||
- 1-8-x
|
||||
- 1-7-x
|
||||
jobs:
|
||||
- electron-linux-arm-release-nightly
|
||||
- electron-linux-arm64-release-nightly
|
||||
- electron-linux-ia32-release-nightly
|
||||
- electron-linux-x64-release-nightly
|
||||
|
||||
nightly-gn-release-test:
|
||||
triggers:
|
||||
- schedule:
|
||||
|
|
|
@ -1,27 +1,9 @@
|
|||
[submodule "vendor/node"]
|
||||
path = vendor/node
|
||||
url = https://github.com/electron/node.git
|
||||
[submodule "vendor/depot_tools"]
|
||||
path = vendor/depot_tools
|
||||
url = https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
[submodule "vendor/breakpad"]
|
||||
path = vendor/breakpad
|
||||
url = https://github.com/electron/chromium-breakpad.git
|
||||
[submodule "vendor/crashpad"]
|
||||
path = vendor/crashpad
|
||||
url = https://github.com/electron/crashpad.git
|
||||
[submodule "vendor/requests"]
|
||||
path = vendor/requests
|
||||
url = https://github.com/kennethreitz/requests
|
||||
[submodule "vendor/boto"]
|
||||
path = vendor/boto
|
||||
url = https://github.com/boto/boto.git
|
||||
[submodule "vendor/pdf_viewer"]
|
||||
path = vendor/pdf_viewer
|
||||
url = https://github.com/electron/pdf-viewer.git
|
||||
[submodule "vendor/gyp"]
|
||||
path = vendor/gyp
|
||||
url = https://github.com/electron/gyp
|
||||
[submodule "vendor/libchromiumcontent"]
|
||||
path = vendor/libchromiumcontent
|
||||
url = https://github.com/electron/libchromiumcontent
|
||||
|
|
34
.travis.yml
34
.travis.yml
|
@ -1,34 +0,0 @@
|
|||
git:
|
||||
depth: 10
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
before_install:
|
||||
- export BOTO_CONFIG=/dev/null
|
||||
|
||||
language: node_js
|
||||
node_js:
|
||||
- "4"
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
env:
|
||||
- TARGET_ARCH=x64
|
||||
osx_image: xcode7.3
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: TARGET_ARCH=arm
|
||||
- os: linux
|
||||
env: TARGET_ARCH=ia32
|
||||
- os: linux
|
||||
env: TARGET_ARCH=arm64
|
||||
allow_failures:
|
||||
- os: osx
|
||||
|
||||
script: './script/cibuild'
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
41
BUILD.gn
41
BUILD.gn
|
@ -1,6 +1,7 @@
|
|||
import("build/asar.gni")
|
||||
import("build/npm.gni")
|
||||
import("electron_paks.gni")
|
||||
import("filenames.gni")
|
||||
import("//build/config/locales.gni")
|
||||
import("//build/config/win/manifest.gni")
|
||||
import("//pdf/features.gni")
|
||||
|
@ -50,15 +51,6 @@ if (is_mas_build) {
|
|||
"It doesn't make sense to build a MAS build on a non-mac platform")
|
||||
}
|
||||
|
||||
filenames_gypi =
|
||||
exec_script("//build/gypi_to_gn.py",
|
||||
[
|
||||
rebase_path("filenames.gypi"),
|
||||
"--replace=<(SHARED_INTERMEDIATE_DIR)=$target_gen_dir",
|
||||
],
|
||||
"scope",
|
||||
[ "filenames.gypi" ])
|
||||
|
||||
config("branding") {
|
||||
defines = [
|
||||
"ATOM_PRODUCT_NAME=\"$electron_product_name\"",
|
||||
|
@ -159,7 +151,7 @@ action("atom_js2c") {
|
|||
":atom_js2c_copy",
|
||||
]
|
||||
|
||||
js2c_sources = filenames_gypi.js2c_sources
|
||||
js2c_sources = filenames.js2c_sources
|
||||
|
||||
browserify_sources = [
|
||||
"$target_gen_dir/js2c/isolated_bundle.js",
|
||||
|
@ -179,7 +171,7 @@ action("atom_js2c") {
|
|||
}
|
||||
|
||||
asar("js2asar") {
|
||||
sources = filenames_gypi.js_sources
|
||||
sources = filenames.js_sources
|
||||
if (enable_desktop_capturer) {
|
||||
sources += [
|
||||
"lib/browser/desktop-capturer.js",
|
||||
|
@ -202,7 +194,7 @@ asar("js2asar") {
|
|||
}
|
||||
|
||||
asar("app2asar") {
|
||||
sources = filenames_gypi.default_app_sources
|
||||
sources = filenames.default_app_sources
|
||||
outputs = [
|
||||
"$root_out_dir/resources/default_app.asar",
|
||||
]
|
||||
|
@ -301,16 +293,21 @@ static_library("electron_lib") {
|
|||
|
||||
set_sources_assignment_filter(
|
||||
sources_assignment_filter + extra_source_filters)
|
||||
sources = filenames_gypi.lib_sources
|
||||
sources = filenames.lib_sources
|
||||
set_sources_assignment_filter(sources_assignment_filter)
|
||||
|
||||
sources += [ "$target_gen_dir/atom_natives.h" ]
|
||||
|
||||
if (is_component_build) {
|
||||
defines += [ "NODE_SHARED_MODE" ]
|
||||
}
|
||||
|
||||
if (enable_fake_location_provider) {
|
||||
defines += [ "OVERRIDE_LOCATION_PROVIDER" ]
|
||||
sources += filenames_gypi.lib_sources_location_provider
|
||||
sources += [
|
||||
"atom/browser/fake_location_provider.cc",
|
||||
"atom/browser/fake_location_provider.h",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
|
@ -364,11 +361,11 @@ static_library("electron_lib") {
|
|||
# Disable warnings for g_settings_list_schemas.
|
||||
"GLIB_DISABLE_DEPRECATION_WARNINGS",
|
||||
]
|
||||
sources += filenames_gypi.lib_sources_linux
|
||||
sources += filenames_gypi.lib_sources_nss
|
||||
sources += filenames.lib_sources_linux
|
||||
sources += filenames.lib_sources_nss
|
||||
}
|
||||
if (is_win) {
|
||||
sources += filenames_gypi.lib_sources_win
|
||||
sources += filenames.lib_sources_win
|
||||
libs += [ "dwmapi.lib" ]
|
||||
}
|
||||
if (is_linux || is_win) {
|
||||
|
@ -550,7 +547,7 @@ if (is_mac) {
|
|||
]
|
||||
|
||||
include_dirs = [ "." ]
|
||||
sources = filenames_gypi.framework_sources
|
||||
sources = filenames.framework_sources
|
||||
|
||||
libs = [
|
||||
"Carbon.framework",
|
||||
|
@ -581,7 +578,7 @@ if (is_mac) {
|
|||
deps = [
|
||||
":electron_framework+link",
|
||||
]
|
||||
sources = filenames_gypi.app_sources
|
||||
sources = filenames.app_sources
|
||||
include_dirs = [ "." ]
|
||||
info_plist = "atom/renderer/resources/mac/Info.plist"
|
||||
extra_substitutions = [ "ATOM_BUNDLE_ID=$electron_mac_bundle_id.helper" ]
|
||||
|
@ -614,7 +611,7 @@ if (is_mac) {
|
|||
|
||||
mac_app_bundle("electron_login_helper") {
|
||||
output_name = electron_login_helper_name
|
||||
sources = filenames_gypi.login_helper_sources
|
||||
sources = filenames.login_helper_sources
|
||||
include_dirs = [ "." ]
|
||||
libs = [ "AppKit.framework" ]
|
||||
info_plist = "atom/app/resources/mac/loginhelper-Info.plist"
|
||||
|
@ -651,7 +648,7 @@ if (is_mac) {
|
|||
|
||||
mac_app_bundle("electron_app") {
|
||||
output_name = electron_product_name
|
||||
sources = filenames_gypi.app_sources
|
||||
sources = filenames.app_sources
|
||||
include_dirs = [ "." ]
|
||||
deps = [
|
||||
":electron_app_framework_bundle_data",
|
||||
|
@ -678,7 +675,7 @@ if (is_mac) {
|
|||
|
||||
executable("electron_app") {
|
||||
output_name = electron_project_name
|
||||
sources = filenames_gypi.app_sources
|
||||
sources = filenames.app_sources
|
||||
include_dirs = [ "." ]
|
||||
deps = [
|
||||
":app2asar",
|
||||
|
|
73
appveyor.yml
73
appveyor.yml
|
@ -1,73 +0,0 @@
|
|||
version: 1.0.{build}
|
||||
branches:
|
||||
except:
|
||||
- /^release$|^release-\d-\d-x$/
|
||||
build_cloud: electron-16
|
||||
image: electron-16-vs2017-15.4.5
|
||||
environment:
|
||||
DISABLE_CRASH_REPORTER_TESTS: true
|
||||
build_script:
|
||||
- ps: >-
|
||||
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
|
||||
Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild
|
||||
} else {
|
||||
Add-Path "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64"
|
||||
$env:path = "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64;$env:path"
|
||||
if($env:APPVEYOR_SCHEDULED_BUILD -eq 'True') {
|
||||
$env:RUN_RELEASE_BUILD = "1"
|
||||
}
|
||||
$Message = (git log --format=%B -n 1 HEAD) | Out-String
|
||||
if ((Test-Path Env:\RUN_RELEASE_BUILD)) {
|
||||
$env:ELECTRON_RELEASE = '1'
|
||||
Write-Output "release build triggered from api"
|
||||
}
|
||||
if ((Test-Path Env:\ELECTRON_RELEASE)) {
|
||||
Write-Output "Running release build"
|
||||
python script\bootstrap.py --target_arch=$env:TARGET_ARCH
|
||||
python script\build.py -c R
|
||||
python script\create-dist.py
|
||||
} else {
|
||||
Write-Output "Running debug build"
|
||||
python script\bootstrap.py --target_arch=$env:TARGET_ARCH --dev
|
||||
python script\build.py -c D
|
||||
}
|
||||
if ($? -ne 'True') {
|
||||
throw "Build failed with exit code $?"
|
||||
} else {
|
||||
"Build succeeded."
|
||||
}
|
||||
Push-AppveyorArtifact out
|
||||
}
|
||||
test_script:
|
||||
- ps: >-
|
||||
if (Test-Path Env:\ELECTRON_RELEASE) {
|
||||
Write-Output "Skipping tests for release build"
|
||||
} else {
|
||||
Write-Output "Running tests for debug build"
|
||||
python script\test.py --ci --rebuild_native_modules
|
||||
if ($LASTEXITCODE -ne '0') {
|
||||
throw "Tests failed with exit code $LASTEXITCODE"
|
||||
} else {
|
||||
Write-Output "Tests succeeded."
|
||||
}
|
||||
python script\verify-ffmpeg.py
|
||||
if ($LASTEXITCODE -ne '0') {
|
||||
throw "Verify ffmpeg failed with exit code $LASTEXITCODE"
|
||||
} else {
|
||||
"Verify ffmpeg succeeded."
|
||||
}
|
||||
}
|
||||
artifacts:
|
||||
- path: test-results.xml
|
||||
name: test-results.xml
|
||||
deploy_script:
|
||||
- ps: >-
|
||||
if (Test-Path Env:\ELECTRON_RELEASE) {
|
||||
if (Test-Path Env:\RUN_RELEASE_BUILD) {
|
||||
Write-Output "Uploading Electron release distribution to s3"
|
||||
& python script\upload.py --upload_to_s3
|
||||
} else {
|
||||
Write-Output "Uploading Electron release distribution to github releases"
|
||||
& python script\upload.py
|
||||
}
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
import("//build/config/ui.gni")
|
||||
|
||||
filenames_gypi = exec_script("//build/gypi_to_gn.py",
|
||||
[ rebase_path("filenames.gypi") ],
|
||||
"scope",
|
||||
[ "filenames.gypi" ])
|
||||
|
||||
static_library("brightray") {
|
||||
deps = [
|
||||
"//base",
|
||||
|
@ -41,6 +36,110 @@ static_library("brightray") {
|
|||
|
||||
set_sources_assignment_filter(
|
||||
sources_assignment_filter + extra_source_filters)
|
||||
sources = filenames_gypi.brightray_sources
|
||||
sources = [
|
||||
"browser/brightray_paths.h",
|
||||
"browser/browser_client.cc",
|
||||
"browser/browser_client.h",
|
||||
"browser/browser_context.cc",
|
||||
"browser/browser_context.h",
|
||||
"browser/browser_main_parts.cc",
|
||||
"browser/browser_main_parts.h",
|
||||
"browser/browser_main_parts_mac.mm",
|
||||
"browser/devtools_contents_resizing_strategy.cc",
|
||||
"browser/devtools_contents_resizing_strategy.h",
|
||||
"browser/devtools_embedder_message_dispatcher.cc",
|
||||
"browser/devtools_embedder_message_dispatcher.h",
|
||||
"browser/devtools_file_system_indexer.cc",
|
||||
"browser/devtools_file_system_indexer.h",
|
||||
"browser/devtools_manager_delegate.cc",
|
||||
"browser/devtools_manager_delegate.h",
|
||||
"browser/devtools_ui.cc",
|
||||
"browser/devtools_ui.h",
|
||||
"browser/inspectable_web_contents.cc",
|
||||
"browser/inspectable_web_contents.h",
|
||||
"browser/inspectable_web_contents_delegate.h",
|
||||
"browser/inspectable_web_contents_view_delegate.cc",
|
||||
"browser/inspectable_web_contents_view_delegate.h",
|
||||
"browser/inspectable_web_contents_impl.cc",
|
||||
"browser/inspectable_web_contents_impl.h",
|
||||
"browser/inspectable_web_contents_view.h",
|
||||
"browser/inspectable_web_contents_view_mac.h",
|
||||
"browser/inspectable_web_contents_view_mac.mm",
|
||||
"browser/io_thread.cc",
|
||||
"browser/io_thread.h",
|
||||
"browser/mac/bry_inspectable_web_contents_view.h",
|
||||
"browser/mac/bry_inspectable_web_contents_view.mm",
|
||||
"browser/mac/cocoa_notification.h",
|
||||
"browser/mac/cocoa_notification.mm",
|
||||
"browser/mac/event_dispatching_window.h",
|
||||
"browser/mac/event_dispatching_window.mm",
|
||||
"browser/mac/notification_center_delegate.h",
|
||||
"browser/mac/notification_center_delegate.mm",
|
||||
"browser/mac/notification_presenter_mac.h",
|
||||
"browser/mac/notification_presenter_mac.mm",
|
||||
"browser/media/media_capture_devices_dispatcher.cc",
|
||||
"browser/media/media_capture_devices_dispatcher.h",
|
||||
"browser/media/media_device_id_salt.cc",
|
||||
"browser/media/media_device_id_salt.h",
|
||||
"browser/media/media_stream_devices_controller.cc",
|
||||
"browser/media/media_stream_devices_controller.h",
|
||||
"browser/net/require_ct_delegate.cc",
|
||||
"browser/net/require_ct_delegate.h",
|
||||
"browser/net_log.cc",
|
||||
"browser/net_log.h",
|
||||
"browser/notification_delegate.h",
|
||||
"browser/notification_presenter.cc",
|
||||
"browser/notification_presenter.h",
|
||||
"browser/notification.cc",
|
||||
"browser/notification.h",
|
||||
"browser/platform_notification_service.cc",
|
||||
"browser/platform_notification_service.h",
|
||||
"browser/linux/libnotify_loader.h",
|
||||
"browser/linux/libnotify_loader.cc",
|
||||
"browser/linux/libnotify_notification.h",
|
||||
"browser/linux/libnotify_notification.cc",
|
||||
"browser/linux/notification_presenter_linux.h",
|
||||
"browser/linux/notification_presenter_linux.cc",
|
||||
"browser/win/notification_presenter_win.cc",
|
||||
"browser/win/notification_presenter_win.h",
|
||||
"browser/win/notification_presenter_win7.cc",
|
||||
"browser/win/notification_presenter_win7.h",
|
||||
"browser/win/scoped_hstring.cc",
|
||||
"browser/win/scoped_hstring.h",
|
||||
"browser/win/win32_desktop_notifications/common.h",
|
||||
"browser/win/win32_desktop_notifications/desktop_notification_controller.cc",
|
||||
"browser/win/win32_desktop_notifications/desktop_notification_controller.h",
|
||||
"browser/win/win32_desktop_notifications/toast.cc",
|
||||
"browser/win/win32_desktop_notifications/toast.h",
|
||||
"browser/win/win32_notification.cc",
|
||||
"browser/win/win32_notification.h",
|
||||
"browser/win/windows_toast_notification.cc",
|
||||
"browser/win/windows_toast_notification.h",
|
||||
"browser/url_request_context_getter.cc",
|
||||
"browser/url_request_context_getter.h",
|
||||
"browser/views/inspectable_web_contents_view_views.h",
|
||||
"browser/views/inspectable_web_contents_view_views.cc",
|
||||
"browser/views/views_delegate.cc",
|
||||
"browser/views/views_delegate.h",
|
||||
"browser/web_ui_controller_factory.cc",
|
||||
"browser/web_ui_controller_factory.h",
|
||||
"browser/zoom_level_delegate.cc",
|
||||
"browser/zoom_level_delegate.h",
|
||||
"common/application_info.h",
|
||||
"common/application_info.cc",
|
||||
"common/application_info_mac.mm",
|
||||
"common/application_info_win.cc",
|
||||
"common/content_client.cc",
|
||||
"common/content_client.h",
|
||||
"common/mac/main_application_bundle.h",
|
||||
"common/mac/main_application_bundle.mm",
|
||||
"common/main_delegate.cc",
|
||||
"common/main_delegate.h",
|
||||
"common/main_delegate_mac.mm",
|
||||
"common/switches.cc",
|
||||
"common/switches.h",
|
||||
"common/platform_util_linux.cc",
|
||||
"common/platform_util.h",
|
||||
]
|
||||
set_sources_assignment_filter(sources_assignment_filter)
|
||||
}
|
||||
|
|
|
@ -1,463 +0,0 @@
|
|||
{
|
||||
'variables': {
|
||||
# The libraries brightray will be compiled to.
|
||||
'linux_system_libraries': 'gtk+-3.0 atk-bridge-2.0 dbus-1 x11 x11-xcb xcb xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gconf-2.0 gmodule-2.0 nss',
|
||||
'conditions': [
|
||||
['target_arch=="mips64el"', {
|
||||
'linux_system_libraries': '<(linux_system_libraries) libpulse',
|
||||
}],
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'filenames.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'brightray',
|
||||
'type': 'static_library',
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'<(libchromiumcontent_src_dir)',
|
||||
'<(libchromiumcontent_src_dir)/skia/config',
|
||||
'<(libchromiumcontent_src_dir)/third_party/boringssl/src/include',
|
||||
'<(libchromiumcontent_src_dir)/third_party/skia/include/core',
|
||||
'<(libchromiumcontent_src_dir)/third_party/skia/include/gpu',
|
||||
'<(libchromiumcontent_src_dir)/third_party/mojo/src',
|
||||
'<(libchromiumcontent_src_dir)/third_party/WebKit',
|
||||
'<(libchromiumcontent_src_dir)/third_party/khronos',
|
||||
'<(libchromiumcontent_src_dir)/third_party/protobuf/src',
|
||||
'<(libchromiumcontent_dir)/gen',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'../vendor',
|
||||
'<(libchromiumcontent_src_dir)',
|
||||
'<(libchromiumcontent_src_dir)/gpu',
|
||||
'<(libchromiumcontent_src_dir)/skia/config',
|
||||
'<(libchromiumcontent_src_dir)/third_party/boringssl/src/include',
|
||||
'<(libchromiumcontent_src_dir)/third_party/skia/include/core',
|
||||
'<(libchromiumcontent_src_dir)/third_party/skia/include/gpu',
|
||||
'<(libchromiumcontent_src_dir)/third_party/skia/include/config',
|
||||
'<(libchromiumcontent_src_dir)/third_party/icu/source/common',
|
||||
'<(libchromiumcontent_src_dir)/third_party/mojo/src',
|
||||
'<(libchromiumcontent_src_dir)/third_party/khronos',
|
||||
'<(libchromiumcontent_src_dir)/third_party/WebKit',
|
||||
'<(libchromiumcontent_dir)/gen',
|
||||
'<(libchromiumcontent_dir)/gen/third_party/WebKit',
|
||||
],
|
||||
},
|
||||
'defines': [
|
||||
# See Chromium's "src/third_party/protobuf/BUILD.gn".
|
||||
'GOOGLE_PROTOBUF_NO_RTTI',
|
||||
'GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER',
|
||||
],
|
||||
'sources': [ '<@(brightray_sources)' ],
|
||||
'conditions': [
|
||||
# Link with libraries of libchromiumcontent.
|
||||
['OS=="linux" and libchromiumcontent_component==0', {
|
||||
# On Linux we have to use "--whole-archive" to force executable
|
||||
# to include all symbols, otherwise we will have plenty of
|
||||
# unresolved symbols errors.
|
||||
'direct_dependent_settings': {
|
||||
'ldflags': [
|
||||
'-Wl,--whole-archive',
|
||||
'<@(libchromiumcontent_libraries)',
|
||||
'-Wl,--no-whole-archive',
|
||||
],
|
||||
}
|
||||
}, { # (Release build on Linux)
|
||||
'link_settings': {
|
||||
'libraries': [ '<@(libchromiumcontent_libraries)' ]
|
||||
},
|
||||
}], # (Normal builds)
|
||||
# Linux specific link settings.
|
||||
['OS=="linux"', {
|
||||
'link_settings': {
|
||||
'ldflags': [
|
||||
'<!@(<(pkg-config) --libs-only-L --libs-only-other <(linux_system_libraries))',
|
||||
],
|
||||
'libraries': [
|
||||
'-lpthread',
|
||||
'-latomic',
|
||||
'<!@(<(pkg-config) --libs-only-l <(linux_system_libraries))',
|
||||
],
|
||||
},
|
||||
'cflags': [
|
||||
'<!@(<(pkg-config) --cflags <(linux_system_libraries))',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'cflags': [
|
||||
'<!@(<(pkg-config) --cflags <(linux_system_libraries))',
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['clang==1', {
|
||||
'cflags_cc': [
|
||||
'-Wno-reserved-user-defined-literal',
|
||||
],
|
||||
'cflags': [
|
||||
# Needed by using libgtkui:
|
||||
'-Wno-deprecated-register',
|
||||
'-Wno-sentinel',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'cflags': [
|
||||
'-Wno-deprecated-register',
|
||||
'-Wno-sentinel',
|
||||
],
|
||||
},
|
||||
}],
|
||||
['libchromiumcontent_component', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
# Following libraries are always linked statically.
|
||||
'<(libchromiumcontent_dir)/libbase_static.a',
|
||||
'<(libchromiumcontent_dir)/libextras.a',
|
||||
'<(libchromiumcontent_dir)/libgtkui.a',
|
||||
'<(libchromiumcontent_dir)/libhttp_server.a',
|
||||
'<(libchromiumcontent_dir)/libdevice_service.a',
|
||||
'<(libchromiumcontent_dir)/libdom_keycode_converter.a',
|
||||
'<(libchromiumcontent_dir)/libsystem_wrappers.a',
|
||||
'<(libchromiumcontent_dir)/librtc_base.a',
|
||||
'<(libchromiumcontent_dir)/librtc_base_generic.a',
|
||||
'<(libchromiumcontent_dir)/libwebrtc_common.a',
|
||||
'<(libchromiumcontent_dir)/libinit_webrtc.a',
|
||||
'<(libchromiumcontent_dir)/libyuv.a',
|
||||
'<(libchromiumcontent_dir)/libsecurity_state.a',
|
||||
'<(libchromiumcontent_dir)/libviz_service.a',
|
||||
# services/device/wake_lock/power_save_blocker/
|
||||
'<(libchromiumcontent_dir)/libpower_save_blocker.a',
|
||||
# chrome/renderer/media/chrome_key_systems
|
||||
'<(libchromiumcontent_dir)/libcdm_support.a',
|
||||
'<(libchromiumcontent_dir)/librenderer.a',
|
||||
# Friends of libpdf.a:
|
||||
# On Linux we have to use "--whole-archive" to include
|
||||
# all symbols, otherwise there will be plenty of
|
||||
# unresolved symbols errors.
|
||||
'-Wl,--whole-archive',
|
||||
'<(libchromiumcontent_dir)/libpdf.a',
|
||||
'<(libchromiumcontent_dir)/libppapi_cpp_objects.a',
|
||||
'<(libchromiumcontent_dir)/libppapi_internal_module.a',
|
||||
'<(libchromiumcontent_dir)/libpdfium.a',
|
||||
'<(libchromiumcontent_dir)/libpdfium_skia_shared.a',
|
||||
'<(libchromiumcontent_dir)/libfdrm.a',
|
||||
'<(libchromiumcontent_dir)/libformfiller.a',
|
||||
'<(libchromiumcontent_dir)/libfpdfapi.a',
|
||||
'<(libchromiumcontent_dir)/libfpdfdoc.a',
|
||||
'<(libchromiumcontent_dir)/libfpdftext.a',
|
||||
'<(libchromiumcontent_dir)/libfxcodec.a',
|
||||
'<(libchromiumcontent_dir)/libfxge.a',
|
||||
'<(libchromiumcontent_dir)/libfxjs.a',
|
||||
'<(libchromiumcontent_dir)/libpwl.a',
|
||||
'<(libchromiumcontent_dir)/libfx_agg.a',
|
||||
'<(libchromiumcontent_dir)/libfx_lcms2.a',
|
||||
'<(libchromiumcontent_dir)/libfx_libopenjpeg.a',
|
||||
'<(libchromiumcontent_dir)/libfx_zlib.a',
|
||||
'-Wl,--no-whole-archive',
|
||||
],
|
||||
},
|
||||
}, {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
# Link with ffmpeg.
|
||||
'<(libchromiumcontent_dir)/libffmpeg.so',
|
||||
# Following libraries are required by libchromiumcontent:
|
||||
'-lasound',
|
||||
'-lcap',
|
||||
'-lcups',
|
||||
'-lrt',
|
||||
'-ldl',
|
||||
'-lresolv',
|
||||
'-lfontconfig',
|
||||
'-lexpat',
|
||||
],
|
||||
},
|
||||
}],
|
||||
# This lib does not exist on arm.
|
||||
['target_arch=="arm"', {
|
||||
'link_settings': {
|
||||
'libraries!': [
|
||||
'<(libchromiumcontent_dir)/libdesktop_capture_differ_sse2.a',
|
||||
],
|
||||
},
|
||||
}],
|
||||
# Due to strange linker behavior, component build of arm needs to
|
||||
# be linked with libjpeg.a explicitly.
|
||||
['target_arch=="arm" and libchromiumcontent_component==1', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'<(libchromiumcontent_dir)/libjpeg.a',
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
}], # OS=="linux"
|
||||
['OS=="mac"', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
|
||||
# Required by webrtc:
|
||||
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
|
||||
# Required by media:
|
||||
'$(SDKROOT)/System/Library/Frameworks/VideoToolbox.framework',
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['libchromiumcontent_component', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
# Following libraries are always linked statically.
|
||||
'<(libchromiumcontent_dir)/libbase_static.a',
|
||||
'<(libchromiumcontent_dir)/libextras.a',
|
||||
'<(libchromiumcontent_dir)/libhttp_server.a',
|
||||
'<(libchromiumcontent_dir)/libdevice_service.a',
|
||||
'<(libchromiumcontent_dir)/libdom_keycode_converter.a',
|
||||
'<(libchromiumcontent_dir)/librtc_base.a',
|
||||
'<(libchromiumcontent_dir)/librtc_base_generic.a',
|
||||
'<(libchromiumcontent_dir)/libsystem_wrappers.a',
|
||||
'<(libchromiumcontent_dir)/libwebrtc_common.a',
|
||||
'<(libchromiumcontent_dir)/libinit_webrtc.a',
|
||||
'<(libchromiumcontent_dir)/libyuv.a',
|
||||
'<(libchromiumcontent_dir)/libpdfium_skia_shared.a',
|
||||
'<(libchromiumcontent_dir)/librenderer.a',
|
||||
'<(libchromiumcontent_dir)/libsecurity_state.a',
|
||||
'<(libchromiumcontent_dir)/libviz_service.a',
|
||||
# services/device/wake_lock/power_save_blocker/
|
||||
'<(libchromiumcontent_dir)/libpower_save_blocker.a',
|
||||
# chrome/renderer/media/chrome_key_systems
|
||||
'<(libchromiumcontent_dir)/libcdm_support.a',
|
||||
# Friends of libpdf.a:
|
||||
'<(libchromiumcontent_dir)/libpdf.a',
|
||||
'<(libchromiumcontent_dir)/libppapi_cpp_objects.a',
|
||||
'<(libchromiumcontent_dir)/libppapi_internal_module.a',
|
||||
'<(libchromiumcontent_dir)/libjpeg.a',
|
||||
'<(libchromiumcontent_dir)/libpdfium.a',
|
||||
'<(libchromiumcontent_dir)/libfdrm.a',
|
||||
'<(libchromiumcontent_dir)/libformfiller.a',
|
||||
'<(libchromiumcontent_dir)/libfpdfapi.a',
|
||||
'<(libchromiumcontent_dir)/libfpdfdoc.a',
|
||||
'<(libchromiumcontent_dir)/libfpdftext.a',
|
||||
'<(libchromiumcontent_dir)/libfxcodec.a',
|
||||
'<(libchromiumcontent_dir)/libfxcrt.a',
|
||||
'<(libchromiumcontent_dir)/libfxge.a',
|
||||
'<(libchromiumcontent_dir)/libfxjs.a',
|
||||
'<(libchromiumcontent_dir)/libpwl.a',
|
||||
'<(libchromiumcontent_dir)/libfx_agg.a',
|
||||
'<(libchromiumcontent_dir)/libfx_lcms2.a',
|
||||
'<(libchromiumcontent_dir)/libfx_libopenjpeg.a',
|
||||
'<(libchromiumcontent_dir)/libfx_zlib.a',
|
||||
],
|
||||
},
|
||||
}, {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
# Link with ffmpeg.
|
||||
'<(libchromiumcontent_dir)/libffmpeg.dylib',
|
||||
# Link with system frameworks.
|
||||
# ui_base.gypi:
|
||||
'$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
|
||||
# net.gypi:
|
||||
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/Security.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
|
||||
'-lresolv',
|
||||
# media.gyp:
|
||||
'$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/AVFoundation.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/CoreMedia.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
|
||||
# surface.gyp:
|
||||
'$(SDKROOT)/System/Library/Frameworks/IOSurface.framework',
|
||||
# content_common.gypi:
|
||||
'$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
|
||||
# base.gyp:
|
||||
'$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
|
||||
# device/gamepad/BUILD.gn:
|
||||
'$(SDKROOT)/System/Library/Frameworks/ForceFeedback.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/GameController.framework',
|
||||
# content_browser.gypi:
|
||||
'-lbsm',
|
||||
# content_common.gypi:
|
||||
'-lsandbox',
|
||||
# bluetooth.gyp:
|
||||
'$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework',
|
||||
# components/wifi/BUILD.gn:
|
||||
'$(SDKROOT)/System/Library/Frameworks/CoreWLAN.framework',
|
||||
# printing/BUILD.gn:
|
||||
'-lcups',
|
||||
],
|
||||
},
|
||||
}],
|
||||
]
|
||||
}], # OS=="mac"
|
||||
['OS=="win"', {
|
||||
'link_settings': {
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
'AdditionalOptions': [
|
||||
# warning /DELAYLOAD:dll ignored; no imports found from dll
|
||||
'/ignore:4199',
|
||||
],
|
||||
'AdditionalDependencies': [
|
||||
'delayimp.lib',
|
||||
],
|
||||
'DelayLoadDLLs': [
|
||||
'wtsapi32.dll',
|
||||
# content_common.gypi:
|
||||
'd3d9.dll',
|
||||
'd3d11.dll',
|
||||
'dxva2.dll',
|
||||
# media.gyp:
|
||||
'mf.dll',
|
||||
'mfplat.dll',
|
||||
'mfreadwrite.dll',
|
||||
# bluetooth.gyp:
|
||||
'BluetoothApis.dll',
|
||||
'Bthprops.cpl',
|
||||
'setupapi.dll',
|
||||
# base.gyp:
|
||||
'cfgmgr32.dll',
|
||||
'powrprof.dll',
|
||||
'setupapi.dll',
|
||||
# net_common.gypi:
|
||||
'crypt32.dll',
|
||||
'dhcpcsvc.dll',
|
||||
'rpcrt4.dll',
|
||||
'secur32.dll',
|
||||
'urlmon.dll',
|
||||
'winhttp.dll',
|
||||
# windows runtime
|
||||
'API-MS-WIN-CORE-WINRT-L1-1-0.DLL',
|
||||
'API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
'conditions': [
|
||||
['libchromiumcontent_component', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
# Needed by desktop_capture.lib:
|
||||
'-ld3d11.lib',
|
||||
'-ldxgi.lib',
|
||||
# Following libs are always linked statically.
|
||||
'<(libchromiumcontent_dir)/base_static.lib',
|
||||
'<(libchromiumcontent_dir)/extras.lib',
|
||||
'<(libchromiumcontent_dir)/sandbox.lib',
|
||||
'<(libchromiumcontent_dir)/sandbox_helper_win.lib',
|
||||
'<(libchromiumcontent_dir)/http_server.lib',
|
||||
'<(libchromiumcontent_dir)/device_service.lib',
|
||||
'<(libchromiumcontent_dir)/dom_keycode_converter.lib',
|
||||
'<(libchromiumcontent_dir)/rtc_base.lib',
|
||||
'<(libchromiumcontent_dir)/rtc_base_generic.lib',
|
||||
'<(libchromiumcontent_dir)/system_wrappers.lib',
|
||||
'<(libchromiumcontent_dir)/webrtc_common.lib',
|
||||
'<(libchromiumcontent_dir)/init_webrtc.lib',
|
||||
'<(libchromiumcontent_dir)/libyuv.lib',
|
||||
'<(libchromiumcontent_dir)/pdfium_skia_shared.lib',
|
||||
'<(libchromiumcontent_dir)/renderer.lib',
|
||||
'<(libchromiumcontent_dir)/security_state.lib',
|
||||
'<(libchromiumcontent_dir)/viz_service.lib',
|
||||
# services/device/wake_lock/power_save_blocker/
|
||||
'<(libchromiumcontent_dir)/power_save_blocker.lib',
|
||||
# chrome/renderer/media/chrome_key_systems
|
||||
'<(libchromiumcontent_dir)/cdm_support.lib',
|
||||
# Friends of pdf.lib:
|
||||
'<(libchromiumcontent_dir)/pdf.lib',
|
||||
'<(libchromiumcontent_dir)/ppapi_cpp_objects.lib',
|
||||
'<(libchromiumcontent_dir)/ppapi_internal_module.lib',
|
||||
'<(libchromiumcontent_dir)/libjpeg.lib',
|
||||
'<(libchromiumcontent_dir)/pdfium.lib',
|
||||
'<(libchromiumcontent_dir)/fdrm.lib',
|
||||
'<(libchromiumcontent_dir)/formfiller.lib',
|
||||
'<(libchromiumcontent_dir)/fpdfapi.lib',
|
||||
'<(libchromiumcontent_dir)/fpdfdoc.lib',
|
||||
'<(libchromiumcontent_dir)/fpdftext.lib',
|
||||
'<(libchromiumcontent_dir)/fpdftext.lib',
|
||||
'<(libchromiumcontent_dir)/fxcodec.lib',
|
||||
'<(libchromiumcontent_dir)/fxcrt.lib',
|
||||
'<(libchromiumcontent_dir)/fxge.lib',
|
||||
'<(libchromiumcontent_dir)/fxjs.lib',
|
||||
'<(libchromiumcontent_dir)/pwl.lib',
|
||||
'<(libchromiumcontent_dir)/fx_agg.lib',
|
||||
'<(libchromiumcontent_dir)/fx_lcms2.lib',
|
||||
'<(libchromiumcontent_dir)/fx_libopenjpeg.lib',
|
||||
'<(libchromiumcontent_dir)/fx_zlib.lib',
|
||||
'<(libchromiumcontent_dir)/desktop_capture_generic.lib',
|
||||
'<(libchromiumcontent_dir)/desktop_capture.lib',
|
||||
],
|
||||
},
|
||||
}, {
|
||||
# Link with system libraries.
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
# Link with ffmpeg.
|
||||
'<(libchromiumcontent_dir)/ffmpeg.dll',
|
||||
# content_browser.gypi:
|
||||
'-lsensorsapi.lib',
|
||||
'-lportabledeviceguids.lib',
|
||||
# content_common.gypi:
|
||||
'-ld3d9.lib',
|
||||
'-ld3d11.lib',
|
||||
'-ldxgi.lib',
|
||||
'-ldxva2.lib',
|
||||
'-lstrmiids.lib',
|
||||
'-lmf.lib',
|
||||
'-lmfplat.lib',
|
||||
'-lmfuuid.lib',
|
||||
# media.gyp:
|
||||
'-ldxguid.lib',
|
||||
'-lmfreadwrite.lib',
|
||||
'-lmfuuid.lib',
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
'AdditionalDependencies': [
|
||||
'advapi32.lib',
|
||||
'dbghelp.lib',
|
||||
'dwmapi.lib',
|
||||
'gdi32.lib',
|
||||
'hid.lib',
|
||||
'netapi32.lib',
|
||||
'oleacc.lib',
|
||||
'user32.lib',
|
||||
'usp10.lib',
|
||||
'version.lib',
|
||||
'winspool.lib',
|
||||
'wtsapi32.lib',
|
||||
# bluetooth.gyp:
|
||||
'Bthprops.lib',
|
||||
'BluetoothApis.lib',
|
||||
# base.gyp:
|
||||
'cfgmgr32.lib',
|
||||
'powrprof.lib',
|
||||
'setupapi.lib',
|
||||
# net_common.gypi:
|
||||
'crypt32.lib',
|
||||
'dhcpcsvc.lib',
|
||||
'ncrypt.lib',
|
||||
'rpcrt4.lib',
|
||||
'secur32.lib',
|
||||
'urlmon.lib',
|
||||
'winhttp.lib',
|
||||
# ui/gfx/BUILD.gn:
|
||||
'dwrite.lib',
|
||||
# skia/BUILD.gn:
|
||||
'fontsub.lib',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
}], # libchromiumcontent_component
|
||||
],
|
||||
}], # OS=="win"
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
|
@ -1,417 +0,0 @@
|
|||
{
|
||||
'includes': [
|
||||
'../vendor/download/libchromiumcontent/filenames.gypi',
|
||||
],
|
||||
'variables': {
|
||||
'libchromiumcontent_component%': 1,
|
||||
'pkg-config%': 'pkg-config',
|
||||
'conditions': [
|
||||
# The "libchromiumcontent_component" is defined when calling "gyp".
|
||||
['libchromiumcontent_component', {
|
||||
'libchromiumcontent_dir%': '<(libchromiumcontent_shared_libraries_dir)',
|
||||
'libchromiumcontent_libraries%': '<(libchromiumcontent_shared_libraries)',
|
||||
'libchromiumcontent_v8_libraries%': '<(libchromiumcontent_shared_v8_libraries)',
|
||||
}, {
|
||||
'libchromiumcontent_dir%': '<(libchromiumcontent_static_libraries_dir)',
|
||||
'libchromiumcontent_libraries%': '<(libchromiumcontent_static_libraries)',
|
||||
'libchromiumcontent_v8_libraries%': '<(libchromiumcontent_static_v8_libraries)',
|
||||
}],
|
||||
],
|
||||
},
|
||||
'target_defaults': {
|
||||
'includes': [
|
||||
# Rules for excluding e.g. foo_win.cc from the build on non-Windows.
|
||||
'filename_rules.gypi',
|
||||
],
|
||||
# Putting this in "configurations" will make overrides not working.
|
||||
'xcode_settings': {
|
||||
'ALWAYS_SEARCH_USER_PATHS': 'NO',
|
||||
'ARCHS': ['x86_64'],
|
||||
'COMBINE_HIDPI_IMAGES': 'YES',
|
||||
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
|
||||
'GCC_ENABLE_CPP_RTTI': 'NO',
|
||||
'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES',
|
||||
'CLANG_CXX_LANGUAGE_STANDARD': 'c++14',
|
||||
'MACOSX_DEPLOYMENT_TARGET': '10.9',
|
||||
'RUN_CLANG_STATIC_ANALYZER': 'YES',
|
||||
'USE_HEADER_MAP': 'NO',
|
||||
},
|
||||
'msvs_configuration_attributes': {
|
||||
'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)',
|
||||
'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
|
||||
'CharacterSet': '1',
|
||||
},
|
||||
'msvs_system_include_dirs': [
|
||||
'$(VSInstallDir)/VC/atlmfc/include',
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCCLCompilerTool': {
|
||||
'AdditionalOptions': ['/MP'],
|
||||
'MinimalRebuild': 'false',
|
||||
'BufferSecurityCheck': 'true',
|
||||
'EnableFunctionLevelLinking': 'true',
|
||||
'RuntimeTypeInfo': 'false',
|
||||
'WarningLevel': '4',
|
||||
'WarnAsError': 'true',
|
||||
'DebugInformationFormat': '3',
|
||||
},
|
||||
'VCLinkerTool': {
|
||||
'GenerateDebugInformation': 'true',
|
||||
'MapFileName': '$(OutDir)\\$(TargetName).map',
|
||||
'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
|
||||
'LargeAddressAware': '2',
|
||||
'AdditionalOptions': [
|
||||
# ATL 8.0 included in WDK 7.1 makes the linker to generate
|
||||
# following
|
||||
# warnings:
|
||||
# - warning LNK4254: section 'ATL' (50000040) merged into
|
||||
# '.rdata' (40000040) with different attributes
|
||||
# - warning LNK4078: multiple 'ATL' sections found with
|
||||
# different attributes
|
||||
'/ignore:4254',
|
||||
'/ignore:4078',
|
||||
# views_chromiumcontent.lib generates this warning because it's
|
||||
# symobls are defined as dllexport but used as static library:
|
||||
# - warning LNK4217: locally defined symbol imported in function
|
||||
# - warning LNK4049: locally defined symbol imported
|
||||
'/ignore:4217',
|
||||
'/ignore:4049',
|
||||
],
|
||||
},
|
||||
},
|
||||
'configurations': {
|
||||
# The "Debug" and "Release" configurations are not actually used.
|
||||
'Debug': {},
|
||||
'Release': {},
|
||||
|
||||
'Common_Base': {
|
||||
'abstract': 1,
|
||||
'defines': [
|
||||
# Needed by gin:
|
||||
'V8_USE_EXTERNAL_STARTUP_DATA',
|
||||
# Special configuration for node:
|
||||
'V8_PROMISE_INTERNAL_FIELD_COUNT=1',
|
||||
# From skia_for_chromium_defines.gypi:
|
||||
'SK_SUPPORT_LEGACY_GETTOPDEVICE',
|
||||
'SK_SUPPORT_LEGACY_BITMAP_CONFIG',
|
||||
'SK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE',
|
||||
'SK_SUPPORT_LEGACY_N32_NAME',
|
||||
'SK_SUPPORT_LEGACY_SETCONFIG',
|
||||
'SK_IGNORE_ETC1_SUPPORT',
|
||||
'SK_IGNORE_GPU_DITHER',
|
||||
# NACL is not enabled:
|
||||
'DISABLE_NACL',
|
||||
],
|
||||
'conditions': [
|
||||
['OS!="mac"', {
|
||||
'defines': [
|
||||
'TOOLKIT_VIEWS',
|
||||
'USE_AURA',
|
||||
],
|
||||
}],
|
||||
['OS in ["mac", "win"]', {
|
||||
'defines': [
|
||||
'USE_OPENSSL',
|
||||
],
|
||||
}, {
|
||||
'defines': [
|
||||
'USE_X11',
|
||||
# "use_nss_certs" is set to 1 in libchromiumcontent.
|
||||
'USE_NSS_CERTS',
|
||||
'USE_NSS', # deprecated after Chrome 45.
|
||||
],
|
||||
}],
|
||||
['OS in ["linux", "mac"]', {
|
||||
'defines': [
|
||||
'WEBRTC_POSIX',
|
||||
'UCHAR_TYPE=uint16_t',
|
||||
],
|
||||
}],
|
||||
['OS=="linux"', {
|
||||
'defines': [
|
||||
'_LARGEFILE_SOURCE',
|
||||
'_LARGEFILE64_SOURCE',
|
||||
'_FILE_OFFSET_BITS=64',
|
||||
'WEBRTC_LINUX',
|
||||
],
|
||||
'cflags_cc': [
|
||||
'-D__STRICT_ANSI__',
|
||||
'-fno-exceptions',
|
||||
'-fno-rtti',
|
||||
],
|
||||
'ldflags': [
|
||||
'-Wl,-z,noexecstack',
|
||||
],
|
||||
}], # OS=="linux"
|
||||
['OS=="linux" and target_arch in ["ia32", "x64", "arm64"]', {
|
||||
'ldflags': [
|
||||
'-fuse-ld=lld', # Chromium Clang uses lld for linking
|
||||
],
|
||||
}], # OS=="linux" and target_arch in ["ia32", "x64", "arm64"]
|
||||
['OS=="mac"', {
|
||||
'defines': [
|
||||
# The usage of "webrtc/modules/desktop_capture/desktop_capture_options.h"
|
||||
# is required to see this macro.
|
||||
'WEBRTC_MAC',
|
||||
],
|
||||
}], # OS=="mac"
|
||||
['OS=="win"', {
|
||||
'defines': [
|
||||
'_WIN32_WINNT=0x0602',
|
||||
'WINVER=0x0602',
|
||||
'WIN32',
|
||||
'_WINDOWS',
|
||||
'NOMINMAX',
|
||||
'PSAPI_VERSION=1',
|
||||
'_CRT_RAND_S',
|
||||
'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
|
||||
'WIN32_LEAN_AND_MEAN',
|
||||
'_ATL_NO_OPENGL',
|
||||
'_SECURE_ATL',
|
||||
# The usage of "webrtc/modules/desktop_capture/desktop_capture_options.h"
|
||||
# is required to see this macro.
|
||||
'WEBRTC_WIN',
|
||||
'UCHAR_TYPE=wchar_t',
|
||||
],
|
||||
'conditions': [
|
||||
['target_arch=="x64"', {
|
||||
'msvs_configuration_platform': 'x64',
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
'MinimumRequiredVersion': '5.02', # Server 2003.
|
||||
'TargetMachine': '17', # x86 - 64
|
||||
# Doesn't exist x64 SDK. Should use oleaut32 in any case.
|
||||
'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
|
||||
},
|
||||
'VCLibrarianTool': {
|
||||
'TargetMachine': '17', # x64
|
||||
},
|
||||
},
|
||||
}],
|
||||
],
|
||||
}], # OS=="win"
|
||||
],
|
||||
}, # Common_Base
|
||||
'Debug_Base': {
|
||||
'abstract': 1,
|
||||
'defines': [
|
||||
# Use this instead of "NDEBUG" to determine whether we are in
|
||||
# Debug build, because "NDEBUG" is already used by Chromium.
|
||||
'DEBUG',
|
||||
'_DEBUG',
|
||||
# Require when using libchromiumcontent.
|
||||
'COMPONENT_BUILD',
|
||||
'GURL_DLL',
|
||||
'SKIA_DLL',
|
||||
'USING_V8_SHARED',
|
||||
'WEBKIT_DLL',
|
||||
'V8_ENABLE_CHECKS',
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCCLCompilerTool': {
|
||||
'RuntimeLibrary': '3', # /MDd (debug DLL)
|
||||
'Optimization': '0', # 0 = /Od
|
||||
# See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
|
||||
'BasicRuntimeChecks': '3', # 3 = all checks enabled, 0 = off
|
||||
},
|
||||
'VCLinkerTool': {
|
||||
'OptimizeReferences': 2, # /OPT:REF
|
||||
'EnableCOMDATFolding': 2, # /OPT:ICF
|
||||
},
|
||||
},
|
||||
'conditions': [
|
||||
['OS=="linux" and target_arch=="x64"', {
|
||||
'defines': [
|
||||
'_GLIBCXX_DEBUG',
|
||||
],
|
||||
'cflags': [
|
||||
'-g',
|
||||
],
|
||||
}], # OS=="linux"
|
||||
],
|
||||
}, # Debug_Base
|
||||
'Release_Base': {
|
||||
'abstract': 1,
|
||||
'defines': [
|
||||
'NDEBUG',
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCCLCompilerTool': {
|
||||
'RuntimeLibrary': '2', # /MD (nondebug DLL)
|
||||
'Optimization': '2', # /O2
|
||||
'WholeProgramOptimization': 'true', # /GL
|
||||
# See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
|
||||
'InlineFunctionExpansion': '2', # 2 = max
|
||||
# See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
|
||||
'OmitFramePointers': 'false',
|
||||
# The above is not sufficient (http://crbug.com/106711): it
|
||||
# simply eliminates an explicit "/Oy", but both /O2 and /Ox
|
||||
# perform FPO regardless, so we must explicitly disable.
|
||||
# We still want the false setting above to avoid having
|
||||
# "/Oy /Oy-" and warnings about overriding.
|
||||
'AdditionalOptions': ['/Oy-', '/guard:cf'],
|
||||
},
|
||||
'VCLibrarianTool': {
|
||||
'LinkTimeCodeGeneration': 'true', # /LTCG
|
||||
},
|
||||
'VCLinkerTool': {
|
||||
# Control Flow Guard is a security feature in Windows
|
||||
# 8.1 and higher designed to prevent exploitation of
|
||||
# indirect calls in executables.
|
||||
# Control Flow Guard is enabled using the /d2guard4
|
||||
# compiler setting in combination with the /guard:cf
|
||||
# linker setting.
|
||||
'AdditionalOptions': ['/guard:cf'],
|
||||
# Turn off incremental linking to save binary size.
|
||||
'LinkIncremental': '1', # /INCREMENTAL:NO
|
||||
'LinkTimeCodeGeneration': '1', # /LTCG
|
||||
'OptimizeReferences': 2, # /OPT:REF
|
||||
'EnableCOMDATFolding': 2, # /OPT:ICF
|
||||
},
|
||||
},
|
||||
'conditions': [
|
||||
['OS=="linux"', {
|
||||
'cflags': [
|
||||
'-O2',
|
||||
# Generate symbols, will be stripped later.
|
||||
'-g',
|
||||
# Don't emit the GCC version ident directives, they just end up
|
||||
# in the .comment section taking up binary size.
|
||||
'-fno-ident',
|
||||
# Put data and code in their own sections, so that unused symbols
|
||||
# can be removed at link time with --gc-sections.
|
||||
'-fdata-sections',
|
||||
'-ffunction-sections',
|
||||
],
|
||||
'ldflags': [
|
||||
# Specifically tell the linker to perform optimizations.
|
||||
# See http://lwn.net/Articles/192624/ .
|
||||
'-Wl,-O1',
|
||||
'-Wl,--as-needed',
|
||||
'-Wl,--gc-sections',
|
||||
],
|
||||
}], # OS=="linux"
|
||||
['OS=="linux" and target_arch in ["ia32", "x64", "arm64"]', {
|
||||
'cflags': [
|
||||
'-flto=thin',
|
||||
],
|
||||
'ldflags': [
|
||||
'-flto=thin',
|
||||
'-Wl,--icf=all',
|
||||
'-Wl,--lto-O0', # this could be removed in future; see https://codereview.chromium.org/2939923004
|
||||
'-Wl,-mllvm,-function-sections',
|
||||
'-Wl,-mllvm,-data-sections',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}, # Release_Base
|
||||
'conditions': [
|
||||
['libchromiumcontent_component', {
|
||||
'D': {
|
||||
'inherit_from': ['Common_Base', 'Debug_Base'],
|
||||
}, # D (Debug)
|
||||
}, {
|
||||
'R': {
|
||||
'inherit_from': ['Common_Base', 'Release_Base'],
|
||||
}, # R (Release)
|
||||
}], # libchromiumcontent_component
|
||||
['OS=="win"', {
|
||||
'conditions': [
|
||||
# gyp always assumes "_x64" targets on Windows.
|
||||
['libchromiumcontent_component', {
|
||||
'D_x64': {
|
||||
'inherit_from': ['Common_Base', 'Debug_Base'],
|
||||
}, # D_x64
|
||||
}, {
|
||||
'R_x64': {
|
||||
'inherit_from': ['Common_Base', 'Release_Base'],
|
||||
}, # R_x64
|
||||
}], # libchromiumcontent_component
|
||||
],
|
||||
}], # OS=="win"
|
||||
],
|
||||
}, # configurations
|
||||
'target_conditions': [
|
||||
# Putting this under "configurations" doesn't work.
|
||||
['libchromiumcontent_component', {
|
||||
'xcode_settings': {
|
||||
'GCC_OPTIMIZATION_LEVEL': '0',
|
||||
},
|
||||
}, { # "Debug_Base"
|
||||
'xcode_settings': {
|
||||
'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
|
||||
'GCC_OPTIMIZATION_LEVEL': '2',
|
||||
'OTHER_CFLAGS': [
|
||||
'-fno-inline',
|
||||
'-fno-omit-frame-pointer',
|
||||
'-fno-builtin',
|
||||
'-fno-optimize-sibling-calls',
|
||||
],
|
||||
},
|
||||
}], # "Release_Base"
|
||||
['OS=="mac" and libchromiumcontent_component==0 and _type in ["executable", "shared_library"]', {
|
||||
'xcode_settings': {
|
||||
# Generates symbols and strip the binary.
|
||||
'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
|
||||
'DEPLOYMENT_POSTPROCESSING': 'YES',
|
||||
'STRIP_INSTALLED_PRODUCT': 'YES',
|
||||
'STRIPFLAGS': '-x',
|
||||
},
|
||||
}], # OS=="mac" and libchromiumcontent_component==0 and _type in ["executable", "shared_library"]
|
||||
['OS=="linux" and target_arch=="ia32" and _toolset=="target"', {
|
||||
'ldflags': [
|
||||
# Workaround for linker OOM.
|
||||
'-Wl,--no-keep-memory',
|
||||
],
|
||||
}],
|
||||
], # target_conditions
|
||||
# Ignored compiler warnings of Chromium/Node.js
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'xcode_settings': {
|
||||
'WARNING_CFLAGS': [
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-missing-field-initializers',
|
||||
'-Wno-deprecated-declarations',
|
||||
'-Wno-undefined-var-template', # https://crbug.com/604888
|
||||
'-Wno-unneeded-internal-declaration',
|
||||
'-Wno-inconsistent-missing-override',
|
||||
'-Wno-tautological-unsigned-enum-zero-compare',
|
||||
],
|
||||
},
|
||||
}],
|
||||
['OS=="linux" and clang==1', {
|
||||
'cflags': [
|
||||
'-Wno-inconsistent-missing-override',
|
||||
'-Wno-undefined-var-template', # https://crbug.com/604888
|
||||
'-Wno-tautological-unsigned-enum-zero-compare',
|
||||
],
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'msvs_disabled_warnings': [
|
||||
4100, # unreferenced formal parameter
|
||||
4102, # unreferencd label
|
||||
4121, # alignment of a member was sensitive to packing
|
||||
4127, # conditional expression is constant
|
||||
4189, # local variable is initialized but not referenced
|
||||
4244, # 'initializing' : conversion from 'double' to 'size_t', possible loss of data
|
||||
4245, # 'initializing' : conversion from 'int' to 'const net::QuicVersionTag', signed/unsigned mismatch
|
||||
4251, # class 'std::xx' needs to have dll-interface.
|
||||
4310, # cast truncates constant value
|
||||
4355, # 'this' : used in base member initializer list
|
||||
4480, # nonstandard extension used: specifying underlying type for enum
|
||||
4481, # nonstandard extension used: override specifier 'override'
|
||||
4510, # default constructor could not be generated
|
||||
4512, # assignment operator could not be generated
|
||||
4610, # user defined constructor required
|
||||
4702, # unreachable code
|
||||
4715, # not all control paths return a value
|
||||
4819, # The file contains a character that cannot be represented in the current code page
|
||||
4275, # non dll-interface class used as base for dll-interface class
|
||||
],
|
||||
}],
|
||||
], # conditions
|
||||
}, # target_defaults
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# This gypi file defines the patterns used for determining whether a
|
||||
# file is excluded from the build on a given platform. It is
|
||||
# included by common.gypi for chromium_code.
|
||||
|
||||
{
|
||||
'target_conditions': [
|
||||
['OS!="win"', {
|
||||
'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
|
||||
['exclude', '(^|/)win/'],
|
||||
['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
|
||||
}],
|
||||
['OS!="mac"', {
|
||||
'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc|mm?)$'],
|
||||
['exclude', '(^|/)(cocoa|mac)/'] ],
|
||||
}],
|
||||
['OS!="ios"', {
|
||||
'sources/': [ ['exclude', '_ios(_unittest)?\\.(h|cc|mm?)$'],
|
||||
['exclude', '(^|/)ios/'] ],
|
||||
}],
|
||||
['OS!="mac" and OS!="ios"', {
|
||||
'sources/': [ ['exclude', '\\.mm?$' ] ],
|
||||
}],
|
||||
# Do not exclude the linux files on *BSD since most of them can be
|
||||
# shared at this point.
|
||||
# In case a file is not needed, it is going to be excluded later on.
|
||||
# TODO(evan): the above is not correct; we shouldn't build _linux
|
||||
# files on non-linux.
|
||||
['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
|
||||
'sources/': [
|
||||
['exclude', '(^|/)library_loaders/'],
|
||||
['exclude', '_linux(_unittest)?\\.(h|cc)$'],
|
||||
['exclude', '(^|/)linux_[^/]*\\.(h|cc)$'],
|
||||
['exclude', '(^|/)linux/'],
|
||||
['exclude', '_x11(_unittest)?\\.(h|cc)$'],
|
||||
['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'],
|
||||
['exclude', '(^|/)x11/'],
|
||||
],
|
||||
}],
|
||||
['OS!="android"', {
|
||||
'sources/': [
|
||||
['exclude', '_android(_unittest)?\\.cc$'],
|
||||
['exclude', '(^|/)android/'],
|
||||
],
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'sources/': [
|
||||
['exclude', '_posix(_unittest)?\\.(h|cc)$'],
|
||||
['exclude', '(^|/)posix/'],
|
||||
],
|
||||
}],
|
||||
['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
|
||||
'sources/': [
|
||||
['exclude', '_xdg(_unittest)?\\.(h|cc)$'],
|
||||
],
|
||||
}],
|
||||
['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
|
||||
'sources/': [
|
||||
['exclude', '_gtk(_browsertest|_unittest)?\\.(h|cc)$'],
|
||||
['exclude', '(^|/)gtk/'],
|
||||
['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'],
|
||||
['exclude', '(^|/)libgtkui/'],
|
||||
['exclude', '(^|/)x/'],
|
||||
],
|
||||
}],
|
||||
['OS=="mac"', {
|
||||
'sources/': [ ['exclude', '_aura(_browsertest|_unittest)?\\.(h|cc)$'],
|
||||
['exclude', '(^|/)aura/'],
|
||||
['exclude', '_views\\.(h|cc)$'],
|
||||
['exclude', '(^|/)views/'],
|
||||
],
|
||||
}],
|
||||
]
|
||||
}
|
|
@ -1,109 +0,0 @@
|
|||
{
|
||||
'variables': {
|
||||
'brightray_sources': [
|
||||
'browser/brightray_paths.h',
|
||||
'browser/browser_client.cc',
|
||||
'browser/browser_client.h',
|
||||
'browser/browser_context.cc',
|
||||
'browser/browser_context.h',
|
||||
'browser/browser_main_parts.cc',
|
||||
'browser/browser_main_parts.h',
|
||||
'browser/browser_main_parts_mac.mm',
|
||||
'browser/devtools_contents_resizing_strategy.cc',
|
||||
'browser/devtools_contents_resizing_strategy.h',
|
||||
'browser/devtools_embedder_message_dispatcher.cc',
|
||||
'browser/devtools_embedder_message_dispatcher.h',
|
||||
'browser/devtools_file_system_indexer.cc',
|
||||
'browser/devtools_file_system_indexer.h',
|
||||
'browser/devtools_manager_delegate.cc',
|
||||
'browser/devtools_manager_delegate.h',
|
||||
'browser/devtools_ui.cc',
|
||||
'browser/devtools_ui.h',
|
||||
'browser/inspectable_web_contents.cc',
|
||||
'browser/inspectable_web_contents.h',
|
||||
'browser/inspectable_web_contents_delegate.h',
|
||||
'browser/inspectable_web_contents_view_delegate.cc',
|
||||
'browser/inspectable_web_contents_view_delegate.h',
|
||||
'browser/inspectable_web_contents_impl.cc',
|
||||
'browser/inspectable_web_contents_impl.h',
|
||||
'browser/inspectable_web_contents_view.h',
|
||||
'browser/inspectable_web_contents_view_mac.h',
|
||||
'browser/inspectable_web_contents_view_mac.mm',
|
||||
'browser/io_thread.cc',
|
||||
'browser/io_thread.h',
|
||||
'browser/mac/bry_inspectable_web_contents_view.h',
|
||||
'browser/mac/bry_inspectable_web_contents_view.mm',
|
||||
'browser/mac/cocoa_notification.h',
|
||||
'browser/mac/cocoa_notification.mm',
|
||||
'browser/mac/event_dispatching_window.h',
|
||||
'browser/mac/event_dispatching_window.mm',
|
||||
'browser/mac/notification_center_delegate.h',
|
||||
'browser/mac/notification_center_delegate.mm',
|
||||
'browser/mac/notification_presenter_mac.h',
|
||||
'browser/mac/notification_presenter_mac.mm',
|
||||
'browser/media/media_capture_devices_dispatcher.cc',
|
||||
'browser/media/media_capture_devices_dispatcher.h',
|
||||
'browser/media/media_device_id_salt.cc',
|
||||
'browser/media/media_device_id_salt.h',
|
||||
'browser/media/media_stream_devices_controller.cc',
|
||||
'browser/media/media_stream_devices_controller.h',
|
||||
'browser/net/require_ct_delegate.cc',
|
||||
'browser/net/require_ct_delegate.h',
|
||||
'browser/net_log.cc',
|
||||
'browser/net_log.h',
|
||||
'browser/notification_delegate.h',
|
||||
'browser/notification_presenter.cc',
|
||||
'browser/notification_presenter.h',
|
||||
'browser/notification.cc',
|
||||
'browser/notification.h',
|
||||
'browser/platform_notification_service.cc',
|
||||
'browser/platform_notification_service.h',
|
||||
'browser/linux/libnotify_loader.h',
|
||||
'browser/linux/libnotify_loader.cc',
|
||||
'browser/linux/libnotify_notification.h',
|
||||
'browser/linux/libnotify_notification.cc',
|
||||
'browser/linux/notification_presenter_linux.h',
|
||||
'browser/linux/notification_presenter_linux.cc',
|
||||
'browser/win/notification_presenter_win.cc',
|
||||
'browser/win/notification_presenter_win.h',
|
||||
'browser/win/notification_presenter_win7.cc',
|
||||
'browser/win/notification_presenter_win7.h',
|
||||
'browser/win/scoped_hstring.cc',
|
||||
'browser/win/scoped_hstring.h',
|
||||
'browser/win/win32_desktop_notifications/common.h',
|
||||
'browser/win/win32_desktop_notifications/desktop_notification_controller.cc',
|
||||
'browser/win/win32_desktop_notifications/desktop_notification_controller.h',
|
||||
'browser/win/win32_desktop_notifications/toast.cc',
|
||||
'browser/win/win32_desktop_notifications/toast.h',
|
||||
'browser/win/win32_notification.cc',
|
||||
'browser/win/win32_notification.h',
|
||||
'browser/win/windows_toast_notification.cc',
|
||||
'browser/win/windows_toast_notification.h',
|
||||
'browser/url_request_context_getter.cc',
|
||||
'browser/url_request_context_getter.h',
|
||||
'browser/views/inspectable_web_contents_view_views.h',
|
||||
'browser/views/inspectable_web_contents_view_views.cc',
|
||||
'browser/views/views_delegate.cc',
|
||||
'browser/views/views_delegate.h',
|
||||
'browser/web_ui_controller_factory.cc',
|
||||
'browser/web_ui_controller_factory.h',
|
||||
'browser/zoom_level_delegate.cc',
|
||||
'browser/zoom_level_delegate.h',
|
||||
'common/application_info.h',
|
||||
'common/application_info.cc',
|
||||
'common/application_info_mac.mm',
|
||||
'common/application_info_win.cc',
|
||||
'common/content_client.cc',
|
||||
'common/content_client.h',
|
||||
'common/mac/main_application_bundle.h',
|
||||
'common/mac/main_application_bundle.mm',
|
||||
'common/main_delegate.cc',
|
||||
'common/main_delegate.h',
|
||||
'common/main_delegate_mac.mm',
|
||||
'common/switches.cc',
|
||||
'common/switches.h',
|
||||
'common/platform_util_linux.cc',
|
||||
'common/platform_util.h',
|
||||
],
|
||||
},
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
def main(argv):
|
||||
src = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
|
||||
ninja_path = os.path.join(src, 'third_party', 'depot_tools', 'ninja')
|
||||
os.execv(ninja_path, argv)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
338
common.gypi
338
common.gypi
|
@ -1,338 +0,0 @@
|
|||
{
|
||||
'includes': [
|
||||
'toolchain.gypi',
|
||||
'brightray/brightray.gypi',
|
||||
],
|
||||
'variables': {
|
||||
# Tell crashpad to build as external project.
|
||||
'crashpad_dependencies': 'external',
|
||||
# Required by breakpad.
|
||||
'os_bsd': 0,
|
||||
'chromeos': 0,
|
||||
# Reflects node's config.gypi.
|
||||
'component%': 'static_library',
|
||||
'debug_http2': 'false',
|
||||
'debug_nghttp2': 'false',
|
||||
# XXX(alexeykuzmin): Must match the clang version we use. See `clang -v`.
|
||||
'llvm_version': '7.0',
|
||||
'python': 'python',
|
||||
'openssl_fips': '',
|
||||
'openssl_no_asm': 1,
|
||||
'use_openssl_def': 0,
|
||||
'openssl_product': 'libopenssl.a',
|
||||
'node_debug_lib': 'false',
|
||||
'node_release_urlbase': 'https://atom.io/download/electron',
|
||||
'node_byteorder': '<!(node <(DEPTH)/tools/get-endianness.js)',
|
||||
'node_target_type': 'shared_library',
|
||||
'node_install_npm': 'false',
|
||||
'node_prefix': '',
|
||||
'node_shared': 'true',
|
||||
'node_shared_cares': 'false',
|
||||
'node_shared_http_parser': 'false',
|
||||
'node_shared_libuv': 'false',
|
||||
'node_shared_openssl': 'false',
|
||||
'node_shared_v8': 'true',
|
||||
'node_shared_zlib': 'false',
|
||||
'node_tag': '',
|
||||
'node_use_dtrace': 'false',
|
||||
'node_use_etw': 'false',
|
||||
'node_use_mdb': 'false',
|
||||
'node_use_openssl': 'true',
|
||||
'node_use_perfctr': 'false',
|
||||
'node_use_v8_platform': 'false',
|
||||
'node_use_bundled_v8': 'false',
|
||||
'node_enable_d8': 'false',
|
||||
'uv_library': 'static_library',
|
||||
'uv_parent_path': 'vendor/node/deps/uv',
|
||||
'uv_use_dtrace': 'false',
|
||||
'v8_base': '',
|
||||
'v8_postmortem_support': 'false',
|
||||
'v8_enable_i18n_support': 'false',
|
||||
'v8_enable_inspector': '1',
|
||||
},
|
||||
# Settings to compile node under Windows.
|
||||
'target_defaults': {
|
||||
'target_conditions': [
|
||||
['_target_name in ["libuv", "http_parser", "openssl", "openssl-cli", "cares", "node_lib", "zlib", "nghttp2"]', {
|
||||
'msvs_disabled_warnings': [
|
||||
4003, # not enough actual parameters for macro 'V'
|
||||
4013, # 'free' undefined; assuming extern returning int
|
||||
4018, # signed/unsigned mismatch
|
||||
4054, #
|
||||
4055, # 'type cast' : from data pointer 'void *' to function pointer
|
||||
4057, # 'function' : 'volatile LONG *' differs in indirection to slightly different base types from 'unsigned long *'
|
||||
4065, # switch statement contains 'default' but no 'case' labels
|
||||
4129, # unrecognized character escape sequence
|
||||
4189, #
|
||||
4131, # uses old-style declarator
|
||||
4133, # incompatible types
|
||||
4146, # unary minus operator applied to unsigned type, result still unsigned
|
||||
4164, # intrinsic function not declared
|
||||
4152, # function/data pointer conversion in expression
|
||||
4206, # translation unit is empty
|
||||
4204, # non-constant aggregate initializer
|
||||
4210, # nonstandard extension used : function given file scope
|
||||
4214, # bit field types other than int
|
||||
4232, # address of dllimport 'free' is not static, identity not guaranteed
|
||||
4291, # no matching operator delete found
|
||||
4295, # array is too small to include a terminating null character
|
||||
4309, # 'static_cast': truncation of constant value
|
||||
4311, # 'type cast': pointer truncation from 'void *const ' to 'unsigned long'
|
||||
4389, # '==' : signed/unsigned mismatch
|
||||
4456, # declaration of 'm' hides previous local declaration
|
||||
4457, # declaration of 'message' hides function parameter
|
||||
4459, # declaration of 'wq' hides global declaration
|
||||
4477, # format string '%.*s' requires an argument of type 'int'
|
||||
4505, # unreferenced local function has been removed
|
||||
4701, # potentially uninitialized local variable 'sizew' used
|
||||
4703, # potentially uninitialized local pointer variable 'req' used
|
||||
4706, # assignment within conditional expression
|
||||
4804, # unsafe use of type 'bool' in operation
|
||||
4996, # this function or variable may be unsafe.
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCCLCompilerTool': {
|
||||
'WarnAsError': 'false',
|
||||
},
|
||||
},
|
||||
'xcode_settings': {
|
||||
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
|
||||
'WARNING_CFLAGS': [
|
||||
'-Wno-unknown-warning-option',
|
||||
'-Wno-parentheses-equality',
|
||||
'-Wno-unused-function',
|
||||
'-Wno-sometimes-uninitialized',
|
||||
'-Wno-pointer-sign',
|
||||
'-Wno-sign-compare',
|
||||
'-Wno-string-plus-int',
|
||||
'-Wno-unused-variable',
|
||||
'-Wno-deprecated-declarations',
|
||||
'-Wno-return-type',
|
||||
'-Wno-gnu-folding-constant',
|
||||
'-Wno-shift-negative-value',
|
||||
'-Wno-varargs', # https://git.io/v6Olj
|
||||
'-Wno-unused-private-field',
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['OS=="linux"', {
|
||||
'cflags': [
|
||||
'-Wno-unused-function',
|
||||
'-Wno-unused-variable',
|
||||
'-Wno-unused-value',
|
||||
'-Wno-deprecated-declarations',
|
||||
'-Wno-return-type',
|
||||
'-Wno-format',
|
||||
'-Wno-varargs', # https://git.io/v6Olj
|
||||
# Required when building as shared library.
|
||||
'-fPIC',
|
||||
],
|
||||
}],
|
||||
['OS=="linux" and clang==1', {
|
||||
'cflags': [
|
||||
'-Wno-pointer-sign',
|
||||
'-Wno-parentheses-equality',
|
||||
'-Wno-sometimes-uninitialized',
|
||||
'-Wno-string-plus-int',
|
||||
'-Wno-shift-negative-value',
|
||||
'-Wno-reserved-user-defined-literal',
|
||||
'-Wno-implicit-function-declaration',
|
||||
'-Wno-long-long',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['_target_name=="node_lib"', {
|
||||
'include_dirs': [
|
||||
'<(libchromiumcontent_src_dir)',
|
||||
'<(libchromiumcontent_src_dir)/third_party/icu/source/common',
|
||||
'<(libchromiumcontent_src_dir)/third_party/icu/source/i18n',
|
||||
'<(libchromiumcontent_src_dir)/v8',
|
||||
'<(libchromiumcontent_src_dir)/v8/include',
|
||||
],
|
||||
'defines': [
|
||||
# Export V8 symbols from node.dll / libnode.so
|
||||
'BUILDING_V8_SHARED',
|
||||
'BUILDING_V8_PLATFORM_SHARED',
|
||||
'BUILDING_V8_BASE_SHARED',
|
||||
'NODE_WITHOUT_NODE_OPTIONS',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="mac" and libchromiumcontent_component==0', {
|
||||
# -all_load is the "whole-archive" on macOS.
|
||||
'xcode_settings': {
|
||||
'OTHER_LDFLAGS': [ '-Wl,-all_load' ],
|
||||
},
|
||||
}],
|
||||
['OS=="win"', {
|
||||
# Fix passing fd across modules, see |osfhandle.h| for more.
|
||||
'sources': [
|
||||
'<(DEPTH)/atom/node/osfhandle.cc',
|
||||
'<(DEPTH)/atom/node/osfhandle.h',
|
||||
],
|
||||
'include_dirs': [
|
||||
'<(DEPTH)/atom/node',
|
||||
],
|
||||
'libraries': [
|
||||
# Node is using networking API but linking with this itself.
|
||||
'-lwinmm.lib',
|
||||
# Needed by V8.
|
||||
'-ldbghelp.lib',
|
||||
'-lshlwapi.lib',
|
||||
],
|
||||
'msvs_settings': {
|
||||
# Change location of some hard-coded paths.
|
||||
'VCLinkerTool': {
|
||||
'AdditionalOptions!': [
|
||||
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\zlib<(STATIC_LIB_SUFFIX)',
|
||||
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\libuv<(STATIC_LIB_SUFFIX)',
|
||||
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\libopenssl<(openssl_product)',
|
||||
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\<(openssl_product)',
|
||||
],
|
||||
'AdditionalOptions': [
|
||||
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\obj\\vendor\\node\\deps\\zlib\\zlib<(STATIC_LIB_SUFFIX)',
|
||||
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\obj\\vendor\\node\\deps\\uv\\libuv<(STATIC_LIB_SUFFIX)',
|
||||
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\obj\\vendor\\node\\deps\\openssl\\openssl<(STATIC_LIB_SUFFIX)',
|
||||
],
|
||||
},
|
||||
},
|
||||
}],
|
||||
['OS=="linux" and libchromiumcontent_component==0', {
|
||||
# Prevent the linker from stripping symbols.
|
||||
'ldflags': [
|
||||
'-Wl,--whole-archive',
|
||||
'<@(libchromiumcontent_v8_libraries)',
|
||||
'-Wl,--no-whole-archive',
|
||||
],
|
||||
}, {
|
||||
'libraries': [
|
||||
'<@(libchromiumcontent_v8_libraries)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['_target_name=="openssl"', {
|
||||
'xcode_settings': {
|
||||
'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
|
||||
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
|
||||
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
|
||||
},
|
||||
'cflags': [
|
||||
'-fvisibility=hidden',
|
||||
],
|
||||
}],
|
||||
['_target_name=="openssl-cli"', {
|
||||
'ldflags!': [
|
||||
'-nostdlib++',
|
||||
]
|
||||
}],
|
||||
['_target_name=="libuv"', {
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
# Expose libuv's symbols.
|
||||
'defines': [
|
||||
'BUILDING_UV_SHARED=1',
|
||||
],
|
||||
}], # OS=="win"
|
||||
],
|
||||
}],
|
||||
['_target_name.startswith("crashpad")', {
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'xcode_settings': {
|
||||
'WARNING_CFLAGS': [
|
||||
'-Wno-unused-private-field',
|
||||
'-Wno-address-of-packed-member',
|
||||
],
|
||||
},
|
||||
}], # OS=="mac"
|
||||
],
|
||||
}],
|
||||
['_target_name.startswith("breakpad") or _target_name in ["crash_report_sender", "dump_syms"]', {
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'xcode_settings': {
|
||||
'WARNING_CFLAGS': [
|
||||
'-Wno-deprecated-declarations',
|
||||
'-Wno-deprecated-register',
|
||||
'-Wno-unused-private-field',
|
||||
'-Wno-unused-function',
|
||||
],
|
||||
},
|
||||
}], # OS=="mac"
|
||||
['OS=="linux"', {
|
||||
'cflags': [
|
||||
'-Wno-empty-body',
|
||||
],
|
||||
}], # OS=="linux"
|
||||
['OS=="win"', {
|
||||
'msvs_disabled_warnings': [
|
||||
# unreferenced local function has been removed.
|
||||
4505,
|
||||
],
|
||||
}], # OS=="win"
|
||||
],
|
||||
}],
|
||||
['OS=="linux" and _toolset=="target" and _target_name in ["dump_syms", "node_lib"]', {
|
||||
'conditions': [
|
||||
['libchromiumcontent_component==0', {
|
||||
'libraries': [
|
||||
'<(libchromiumcontent_dir)/libc++.a',
|
||||
],
|
||||
'ldflags': [
|
||||
'-lpthread',
|
||||
],
|
||||
}, {
|
||||
'libraries': [
|
||||
'<(libchromiumcontent_dir)/libc++.so',
|
||||
],
|
||||
'ldflags': [
|
||||
'-Wl,-rpath=\$$ORIGIN',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}]
|
||||
],
|
||||
'msvs_cygwin_shell': 0, # Strangely setting it to 1 would make building under cygwin fail.
|
||||
'msvs_disabled_warnings': [
|
||||
4005, # (node.h) macro redefinition
|
||||
4091, # (node_extern.h) '__declspec(dllimport)' : ignored on left of 'node::Environment' when no variable is declared
|
||||
4099, # (pdf_render_settings.h) type name first seen using 'class' now seen using 'struct'
|
||||
4189, # local variable is initialized but not referenced
|
||||
4201, # (uv.h) nameless struct/union
|
||||
4267, # conversion from 'size_t' to 'int', possible loss of data
|
||||
4302, # (atldlgs.h) 'type cast': truncation from 'LPCTSTR' to 'WORD'
|
||||
4458, # (atldlgs.h) declaration of 'dwCommonButtons' hides class member
|
||||
4503, # decorated name length exceeded, name was truncated
|
||||
4530, # C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
|
||||
4577, # 'noexcept' used with no exception handling mode specified
|
||||
4714, # (atomicstring.h) function marked as __forceinline not inlined
|
||||
4800, # (v8.h) forcing value to bool 'true' or 'false'
|
||||
4819, # The file contains a character that cannot be represented in the current code page
|
||||
4838, # (atlgdi.h) conversion from 'int' to 'UINT' requires a narrowing conversion
|
||||
4996, # (atlapp.h) 'GetVersionExW': was declared deprecated
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
# The breakdpad on Windows assumes Debug_x64 and Release_x64 configurations.
|
||||
['OS=="win"', {
|
||||
'target_defaults': {
|
||||
'configurations': {
|
||||
'Debug_x64': {
|
||||
},
|
||||
'Release_x64': {
|
||||
},
|
||||
},
|
||||
},
|
||||
}], # OS=="win"
|
||||
# The breakdpad on Mac assumes Release_Base configuration.
|
||||
['OS=="mac"', {
|
||||
'target_defaults': {
|
||||
'configurations': {
|
||||
'Release_Base': {
|
||||
},
|
||||
},
|
||||
},
|
||||
}], # OS=="mac"
|
||||
],
|
||||
}
|
|
@ -93,5 +93,5 @@ the `electron` command to use the specified build of Electron instead of
|
|||
the one downloaded by `npm install`. Usage:
|
||||
|
||||
```sh
|
||||
export ELECTRON_OVERRIDE_DIST_PATH=/Users/username/projects/electron/out/D
|
||||
export ELECTRON_OVERRIDE_DIST_PATH=/Users/username/projects/electron/out/Debug
|
||||
```
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
# Build Instructions (experimental GN build)
|
||||
# Build Instructions
|
||||
|
||||
Follow the guidelines below for building Electron with the experimental GN
|
||||
build.
|
||||
|
||||
> **NOTE**: The GN build system is in _experimental_ status.
|
||||
Follow the guidelines below for building Electron.
|
||||
|
||||
## Platform prerequisites
|
||||
|
||||
|
@ -65,6 +62,46 @@ $ gclient sync --with_branch_heads --with_tags
|
|||
# This will take a while, go get a coffee.
|
||||
```
|
||||
|
||||
### Chromium git cache
|
||||
|
||||
`depot_tools` has an option that allows the developer to set a global cache for
|
||||
all git objects of Chromium + dependencies. This option uses `git clone
|
||||
--shared` to save bandwidth/space on multiple clones of the same repositories.
|
||||
|
||||
If you intend to have several Electron build trees on the same machine (to work
|
||||
on different versions of Electron for example), it is recommended to set use
|
||||
the git cache to speed up the download of Chromium source. For example:
|
||||
|
||||
```sh
|
||||
$ mkdir ~/.chromium-git-cache
|
||||
$ gclient config \
|
||||
--name "src/electron" \
|
||||
--unmanaged \
|
||||
--cache_dir="$HOME/.chromium-git-cache" \
|
||||
https://github.com/electron/electron
|
||||
$ gclient sync --with_branch_heads --with_tags
|
||||
```
|
||||
|
||||
If the bootstrap script is interrupted while using the git cache, it will leave
|
||||
the cache locked. To remove the lock, pass the `--break_repo_locks` argument to
|
||||
`gclient sync`.
|
||||
|
||||
#### Sharing the cache between multiple machines
|
||||
|
||||
It is possible to share this directory with other machines by exporting it as
|
||||
SMB share on linux, but only one process/machine can be using the cache at a
|
||||
time. The locks created by git-cache script will try to prevent this, but it may
|
||||
not work perfectly in a network.
|
||||
|
||||
On Windows, SMBv2 has a directory cache that will cause problems with the git
|
||||
cache script, so it is necessary to disable it by setting the registry key
|
||||
|
||||
```sh
|
||||
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters\DirectoryCacheLifetime
|
||||
```
|
||||
|
||||
to 0. More information: https://stackoverflow.com/a/9935126
|
||||
|
||||
## Building
|
||||
|
||||
```sh
|
||||
|
|
|
@ -58,40 +58,6 @@ $ sudo dnf install clang dbus-devel gtk3-devel libnotify-devel \
|
|||
Other distributions may offer similar packages for installation via package
|
||||
managers such as pacman. Or one can compile from source code.
|
||||
|
||||
## Getting the Code
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/electron/electron
|
||||
```
|
||||
|
||||
## Bootstrapping
|
||||
|
||||
The bootstrap script will download all necessary build dependencies and create
|
||||
the build project files. You must have Python 2.7.x for the script to succeed.
|
||||
Downloading certain files can take a long time. Notice that we are using
|
||||
`ninja` to build Electron so there is no `Makefile` generated.
|
||||
|
||||
To bootstrap for a static, non-developer build, run:
|
||||
|
||||
```sh
|
||||
$ cd electron
|
||||
$ npm run bootstrap
|
||||
```
|
||||
|
||||
Or to bootstrap for a development session that builds faster by not statically linking:
|
||||
|
||||
```sh
|
||||
$ cd electron
|
||||
$ npm run bootstrap:dev
|
||||
```
|
||||
|
||||
If you are using editor supports [JSON compilation database](http://clang.llvm.org/docs/JSONCompilationDatabase.html) based
|
||||
language server, you can generate it:
|
||||
|
||||
```sh
|
||||
$ ./script/build.py --compdb
|
||||
```
|
||||
|
||||
### Cross compilation
|
||||
|
||||
If you want to build for an `arm` target you should also install the following
|
||||
|
@ -110,60 +76,15 @@ $ sudo apt-get install libc6-dev-arm64-cross linux-libc-dev-arm64-cross \
|
|||
```
|
||||
|
||||
And to cross-compile for `arm` or `ia32` targets, you should pass the
|
||||
`--target_arch` parameter to the `bootstrap.py` script:
|
||||
`target_cpu` parameter to `gn gen`:
|
||||
|
||||
```sh
|
||||
$ ./script/bootstrap.py -v --target_arch=arm
|
||||
$ gn gen out/Debug --args='import(...) target_cpu="arm"'
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
If you would like to build both `Release` and `Debug` targets:
|
||||
|
||||
```sh
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
This script will cause a very large Electron executable to be placed in
|
||||
the directory `out/R`. The file size is in excess of 1.3 gigabytes. This
|
||||
happens because the Release target binary contains debugging symbols.
|
||||
To reduce the file size, run the `create-dist.py` script:
|
||||
|
||||
```sh
|
||||
$ ./script/create-dist.py
|
||||
```
|
||||
|
||||
This will put a working distribution with much smaller file sizes in
|
||||
the `dist` directory. After running the `create-dist.py` script, you
|
||||
may want to remove the 1.3+ gigabyte binary which is still in `out/R`.
|
||||
|
||||
You can also build either the `Debug` or `Release` target on its own:
|
||||
|
||||
```sh
|
||||
$ npm run build:dev
|
||||
```
|
||||
|
||||
```sh
|
||||
$ npm run build:release
|
||||
```
|
||||
|
||||
After building is done, you can find the `electron` debug binary under `out/D`.
|
||||
|
||||
## Cleaning
|
||||
|
||||
To clean the build files:
|
||||
|
||||
```sh
|
||||
$ npm run clean
|
||||
```
|
||||
|
||||
To clean only `out` and `dist` directories:
|
||||
|
||||
```sh
|
||||
$ npm run clean-build
|
||||
```
|
||||
|
||||
**Note:** Both clean commands require running `bootstrap` again before building.
|
||||
See [Build Instructions: GN](build-instructions-gn.md)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
@ -176,87 +97,26 @@ architecture, symlink to appropriate `libncurses`:
|
|||
$ sudo ln -s /usr/lib/libncurses.so.5 /usr/lib/libtinfo.so.5
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
See [Build System Overview: Tests](build-system-overview.md#tests)
|
||||
|
||||
## Advanced topics
|
||||
|
||||
The default building configuration is targeted for major desktop Linux
|
||||
distributions. To build for a specific distribution or device, the following
|
||||
information may help you.
|
||||
|
||||
### Building `libchromiumcontent` locally
|
||||
|
||||
To avoid using the prebuilt binaries of `libchromiumcontent`, you can build `libchromiumcontent` locally. To do so, follow these steps:
|
||||
|
||||
1. Install [depot_tools](https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md#Install)
|
||||
2. Install [additional build dependencies](https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md#Install-additional-build-dependencies)
|
||||
3. Fetch the git submodules:
|
||||
|
||||
```sh
|
||||
$ git submodule update --init --recursive
|
||||
```
|
||||
4. Pass the `--build_release_libcc` switch to `bootstrap.py` script:
|
||||
|
||||
```sh
|
||||
$ ./script/bootstrap.py -v --build_release_libcc
|
||||
```
|
||||
|
||||
Note that by default the `shared_library` configuration is not built, so you can
|
||||
only build `Release` version of Electron if you use this mode:
|
||||
|
||||
```sh
|
||||
$ ./script/build.py -c R
|
||||
```
|
||||
|
||||
### Using system `clang` instead of downloaded `clang` binaries
|
||||
|
||||
By default Electron is built with prebuilt
|
||||
[`clang`](https://clang.llvm.org/get_started.html) binaries provided by the
|
||||
Chromium project. If for some reason you want to build with the `clang`
|
||||
installed in your system, you can call `bootstrap.py` with `--clang_dir=<path>`
|
||||
switch. By passing it the build script will assume the `clang` binaries reside
|
||||
in `<path>/bin/`.
|
||||
installed in your system, you can specify the `clang_base_path` argument in the
|
||||
GN args.
|
||||
|
||||
For example if you installed `clang` under `/user/local/bin/clang`:
|
||||
For example if you installed `clang` under `/usr/local/bin/clang`:
|
||||
|
||||
```sh
|
||||
$ ./script/bootstrap.py -v --build_release_libcc --clang_dir /usr/local
|
||||
$ ./script/build.py -c R
|
||||
$ gn gen out/Debug --args='import("//electron/build/args/debug.gn") clang_base_path = "/usr/local/bin"'
|
||||
```
|
||||
|
||||
### Using compilers other than `clang`
|
||||
|
||||
To build Electron with compilers like `g++`, you first need to disable `clang`
|
||||
with `--disable_clang` switch first, and then set `CC` and `CXX` environment
|
||||
variables to the ones you want.
|
||||
|
||||
For example building with GCC toolchain:
|
||||
|
||||
```sh
|
||||
$ env CC=gcc CXX=g++ ./script/bootstrap.py -v --build_release_libcc --disable_clang
|
||||
$ ./script/build.py -c R
|
||||
```
|
||||
|
||||
### Environment variables
|
||||
|
||||
Apart from `CC` and `CXX`, you can also set the following environment variables to
|
||||
customise the build configuration:
|
||||
|
||||
* `CPPFLAGS`
|
||||
* `CPPFLAGS_host`
|
||||
* `CFLAGS`
|
||||
* `CFLAGS_host`
|
||||
* `CXXFLAGS`
|
||||
* `CXXFLAGS_host`
|
||||
* `AR`
|
||||
* `AR_host`
|
||||
* `CC`
|
||||
* `CC_host`
|
||||
* `CXX`
|
||||
* `CXX_host`
|
||||
* `LDFLAGS`
|
||||
|
||||
The environment variables have to be set when executing the `bootstrap.py`
|
||||
script, it won't work in the `build.py` script.
|
||||
Building Electron with compilers other than `clang` is not supported.
|
||||
|
|
|
@ -57,80 +57,6 @@ You will also need to enable Xcode to build against the 10.10 SDK:
|
|||
- Set the `MinimumSDKVersion` to `10.10`
|
||||
- Save the file
|
||||
|
||||
## Getting the Code
|
||||
## Building Electron
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/electron/electron
|
||||
```
|
||||
|
||||
## Bootstrapping
|
||||
|
||||
The bootstrap script will download all necessary build dependencies and create
|
||||
the build project files. Notice that we're using [ninja](https://ninja-build.org/)
|
||||
to build Electron so there is no Xcode project generated.
|
||||
|
||||
To bootstrap for a static, non-developer build, run:
|
||||
|
||||
```sh
|
||||
$ cd electron
|
||||
$ npm run bootstrap
|
||||
```
|
||||
|
||||
Or to bootstrap for a development session that builds faster by not statically linking:
|
||||
|
||||
```sh
|
||||
$ cd electron
|
||||
$ npm run bootstrap:dev
|
||||
```
|
||||
|
||||
If you are using editor supports [JSON compilation database](http://clang.llvm.org/docs/JSONCompilationDatabase.html) based
|
||||
language server, you can generate it:
|
||||
|
||||
```sh
|
||||
$ ./script/build.py --compdb
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To build both `Release` and `Debug` targets:
|
||||
|
||||
```sh
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
You can also build either the `Debug` or `Release` target on its own:
|
||||
|
||||
```sh
|
||||
$ npm run build:dev
|
||||
```
|
||||
|
||||
```sh
|
||||
$ npm run build:release
|
||||
```
|
||||
|
||||
After building is done, you can find `Electron.app` under `out/D`.
|
||||
|
||||
## 32bit Support
|
||||
|
||||
Electron can only be built for a 64bit target on macOS and there is no plan to
|
||||
support 32bit macOS in the future.
|
||||
|
||||
## Cleaning
|
||||
|
||||
To clean the build files:
|
||||
|
||||
```sh
|
||||
$ npm run clean
|
||||
```
|
||||
|
||||
To clean only `out` and `dist` directories:
|
||||
|
||||
```sh
|
||||
$ npm run clean-build
|
||||
```
|
||||
|
||||
**Note:** Both clean commands require running `bootstrap` again before building.
|
||||
|
||||
## Tests
|
||||
|
||||
See [Build System Overview: Tests](build-system-overview.md#tests)
|
||||
See [Build Instructions: GN](build-instructions-gn.md).
|
|
@ -25,52 +25,9 @@ building with Visual Studio will come in the future.
|
|||
**Note:** Even though Visual Studio is not used for building, it's still
|
||||
**required** because we need the build toolchains it provides.
|
||||
|
||||
## Getting the Code
|
||||
|
||||
```powershell
|
||||
$ git clone https://github.com/electron/electron.git
|
||||
```
|
||||
|
||||
## Bootstrapping
|
||||
|
||||
The bootstrap script will download all necessary build dependencies and create
|
||||
the build project files. Notice that we're using `ninja` to build Electron so
|
||||
there is no Visual Studio project generated.
|
||||
|
||||
To bootstrap for a static, non-developer build, run:
|
||||
|
||||
```powershell
|
||||
$ cd electron
|
||||
$ npm run bootstrap
|
||||
```
|
||||
|
||||
Or to bootstrap for a development session that builds faster by not statically linking:
|
||||
|
||||
```powershell
|
||||
$ cd electron
|
||||
$ npm run bootstrap:dev
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
Build both `Release` and `Debug` targets:
|
||||
|
||||
```powershell
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
You can also build either the `Debug` or `Release` target on its own:
|
||||
|
||||
```powershell
|
||||
$ npm run build:dev
|
||||
```
|
||||
|
||||
```powershell
|
||||
$ npm run build:release
|
||||
```
|
||||
|
||||
After building is done, you can find `electron.exe` under `out\D` (debug
|
||||
target) or under `out\R` (release target).
|
||||
See [Build Instructions: GN](build-instructions-gn.md)
|
||||
|
||||
## 32bit Build
|
||||
|
||||
|
@ -85,32 +42,13 @@ The other building steps are exactly the same.
|
|||
|
||||
## Visual Studio project
|
||||
|
||||
To generate a Visual Studio project, you can pass the `--msvs` parameter:
|
||||
To generate a Visual Studio project, you can pass the `--ide=vs2017` parameter
|
||||
to `gn gen`:
|
||||
|
||||
```powershell
|
||||
$ python script\bootstrap.py --msvs
|
||||
$ gn gen out/Debug --ide=vs2017
|
||||
```
|
||||
|
||||
## Cleaning
|
||||
|
||||
To clean the build files:
|
||||
|
||||
```powershell
|
||||
$ npm run clean
|
||||
```
|
||||
|
||||
To clean only `out` and `dist` directories:
|
||||
|
||||
```sh
|
||||
$ npm run clean-build
|
||||
```
|
||||
|
||||
**Note:** Both clean commands require running `bootstrap` again before building.
|
||||
|
||||
## Tests
|
||||
|
||||
See [Build System Overview: Tests](build-system-overview.md#tests)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Command xxxx not found
|
||||
|
@ -122,34 +60,6 @@ the `VS2015 Command Prompt` console to execute the build scripts.
|
|||
|
||||
Make sure you have the latest Visual Studio update installed.
|
||||
|
||||
### Assertion failed: ((handle))->activecnt >= 0
|
||||
|
||||
If building under Cygwin, you may see `bootstrap.py` failed with following
|
||||
error:
|
||||
|
||||
```sh
|
||||
Assertion failed: ((handle))->activecnt >= 0, file src\win\pipe.c, line 1430
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "script/bootstrap.py", line 87, in <module>
|
||||
sys.exit(main())
|
||||
File "script/bootstrap.py", line 22, in main
|
||||
update_node_modules('.')
|
||||
File "script/bootstrap.py", line 56, in update_node_modules
|
||||
execute([NPM, 'install'])
|
||||
File "/home/zcbenz/codes/raven/script/lib/util.py", line 118, in execute
|
||||
raise e
|
||||
subprocess.CalledProcessError: Command '['npm.cmd', 'install']' returned non-zero exit status 3
|
||||
```
|
||||
|
||||
This is caused by a bug when using Cygwin Python and Win32 Node together. The
|
||||
solution is to use the Win32 Python to execute the bootstrap script (assuming
|
||||
you have installed Python under `C:\Python27`):
|
||||
|
||||
```powershell
|
||||
$ /cygdrive/c/Python27/python.exe script/bootstrap.py
|
||||
```
|
||||
|
||||
### LNK1181: cannot open input file 'kernel32.lib'
|
||||
|
||||
Try reinstalling 32bit Node.js.
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
# Build System Overview
|
||||
|
||||
Electron uses [gyp](https://gyp.gsrc.io/) for project generation and
|
||||
Electron uses [GN](https://gn.googlesource.com/gn) for project generation and
|
||||
[ninja](https://ninja-build.org/) for building. Project configurations can
|
||||
be found in the `.gyp` and `.gypi` files.
|
||||
be found in the `.gn` and `.gni` files.
|
||||
|
||||
## Gyp Files
|
||||
## GN Files
|
||||
|
||||
Following `gyp` files contain the main rules for building Electron:
|
||||
The following `gn` files contain the main rules for building Electron:
|
||||
|
||||
* `electron.gyp` defines how Electron itself is built.
|
||||
* `common.gypi` adjusts the build configurations of Node to make it build
|
||||
together with Chromium.
|
||||
* `brightray/brightray.gyp` defines how `brightray` is built and
|
||||
* `BUILD.gn` defines how Electron itself is built.
|
||||
* `brightray/BUILD.gn` defines how `brightray` is built and
|
||||
includes the default configurations for linking with Chromium.
|
||||
* `brightray/brightray.gypi` includes general build configurations about
|
||||
building.
|
||||
* `build/args/{debug,release,all}.gn` contain the default build arguments for
|
||||
building Electron.
|
||||
|
||||
## Component Build
|
||||
|
||||
|
@ -24,56 +22,17 @@ this, Chromium introduced the "component build", which builds each component as
|
|||
a separate shared library, making linking very quick but sacrificing file size
|
||||
and performance.
|
||||
|
||||
In Electron we took a very similar approach: for `Debug` builds, the binary
|
||||
will be linked to a shared library version of Chromium's components to achieve
|
||||
fast linking time; for `Release` builds, the binary will be linked to the static
|
||||
library versions, so we can have the best possible binary size and performance.
|
||||
|
||||
## Minimal Bootstrapping
|
||||
|
||||
All of Chromium's prebuilt binaries (`libchromiumcontent`) are downloaded when
|
||||
running the bootstrap script. By default both static libraries and shared
|
||||
libraries will be downloaded and the final size should be between 800MB and 2GB
|
||||
depending on the platform.
|
||||
|
||||
By default, `libchromiumcontent` is downloaded from Amazon Web Services.
|
||||
If the `LIBCHROMIUMCONTENT_MIRROR` environment variable is set, the bootstrap
|
||||
script will download from it.
|
||||
[`libchromiumcontent-qiniu-mirror`](https://github.com/hokein/libchromiumcontent-qiniu-mirror)
|
||||
is a mirror for `libchromiumcontent`. If you have trouble in accessing AWS, you
|
||||
can switch the download address to it via
|
||||
`export LIBCHROMIUMCONTENT_MIRROR=http://7xk3d2.dl1.z0.glb.clouddn.com/`
|
||||
|
||||
If you only want to build Electron quickly for testing or development, you
|
||||
can download the shared library versions by passing the `--dev` parameter:
|
||||
|
||||
```sh
|
||||
$ ./script/bootstrap.py --dev
|
||||
$ ./script/build.py -c D
|
||||
```
|
||||
|
||||
## Two-Phase Project Generation
|
||||
|
||||
Electron links with different sets of libraries in `Release` and `Debug`
|
||||
builds. `gyp`, however, doesn't support configuring different link settings for
|
||||
different configurations.
|
||||
|
||||
To work around this Electron uses a `gyp` variable
|
||||
`libchromiumcontent_component` to control which link settings to use and only
|
||||
generates one target when running `gyp`.
|
||||
|
||||
## Target Names
|
||||
|
||||
Unlike most projects that use `Release` and `Debug` as target names, Electron
|
||||
uses `R` and `D` instead. This is because `gyp` randomly crashes if there is
|
||||
only one `Release` or `Debug` build configuration defined, and Electron only has
|
||||
to generate one target at a time as stated above.
|
||||
|
||||
This only affects developers, if you are building Electron for rebranding
|
||||
you are not affected.
|
||||
Electron inherits this build option from Chromium. In `Debug` builds, the
|
||||
binary will be linked to a shared library version of Chromium's components to
|
||||
achieve fast linking time; for `Release` builds, the binary will be linked to
|
||||
the static library versions, so we can have the best possible binary size and
|
||||
performance.
|
||||
|
||||
## Tests
|
||||
|
||||
**NB** _this section is out of date and contains information that is no longer
|
||||
relevant to the GN-built electron._
|
||||
|
||||
Test your changes conform to the project coding style using:
|
||||
|
||||
```sh
|
||||
|
|
|
@ -12,76 +12,3 @@
|
|||
- [Discussion Groups](http://www.chromium.org/developers/discussion-groups)
|
||||
|
||||
See also [V8 Development](v8-development.md)
|
||||
|
||||
# Chromium development with Electron
|
||||
|
||||
It is possible to debug Chromium with Electron by passing
|
||||
`--build_debug_libcc` to the bootstrap script:
|
||||
|
||||
```sh
|
||||
$ ./script/bootstrap.py -d --build_debug_libcc
|
||||
```
|
||||
|
||||
This will download and build libchromiumcontent locally, similarly to the
|
||||
`--build_release_libcc`, but it will create a shared library build of
|
||||
libchromiumcontent and won't strip any symbols, making it ideal for debugging.
|
||||
|
||||
When built like this, you can make changes to files in
|
||||
`vendor/libchromiumcontent/src` and rebuild quickly with:
|
||||
|
||||
```sh
|
||||
$ ./script/build.py -c D --libcc
|
||||
```
|
||||
|
||||
When developing on linux with gdb, it is recommended to add a gdb index to speed
|
||||
up loading symbols. This doesn't need to be executed on every build, but it is
|
||||
recommended to do it at least once to index most shared libraries:
|
||||
|
||||
```sh
|
||||
$ ./vendor/libchromiumcontent/src/build/gdb-add-index ./out/D/electron
|
||||
```
|
||||
|
||||
Building libchromiumcontent requires a powerful machine and takes a long time
|
||||
(though incremental rebuilding the shared library component is fast). With an
|
||||
8-core/16-thread Ryzen 1700 CPU clocked at 3ghz, fast SSD and 32GB of RAM, it
|
||||
should take about 40 minutes. It is not recommended to build with less than 16GB
|
||||
of RAM.
|
||||
|
||||
## Chromium git cache
|
||||
|
||||
`depot_tools` has an undocumented option that allows the developer to set a
|
||||
global cache for all git objects of Chromium + dependencies. This option uses
|
||||
`git clone --shared` to save bandwidth/space on multiple clones of the same
|
||||
repositories.
|
||||
|
||||
On electron/libchromiumcontent, this option is exposed through the
|
||||
`LIBCHROMIUMCONTENT_GIT_CACHE` environment variable. If you intend to have
|
||||
several libchromiumcontent build trees on the same machine(to work on different
|
||||
branches for example), it is recommended to set the variable to speed up the
|
||||
download of Chromium source. For example:
|
||||
|
||||
```sh
|
||||
$ mkdir ~/.chromium-git-cache
|
||||
$ LIBCHROMIUMCONTENT_GIT_CACHE=~/.chromium-git-cache ./script/bootstrap.py -d --build_debug_libcc
|
||||
```
|
||||
|
||||
If the bootstrap script is interrupted while using the git cache, it will leave
|
||||
the cache locked. To remove the lock, delete the files ending in `.lock`:
|
||||
|
||||
```sh
|
||||
$ find ~/.chromium-git-cache/ -type f -name '*.lock' -delete
|
||||
```
|
||||
|
||||
It is possible to share this directory with other machines by exporting it as
|
||||
SMB share on linux, but only one process/machine can be using the cache at a
|
||||
time. The locks created by git-cache script will try to prevent this, but it may
|
||||
not work perfectly in a network.
|
||||
|
||||
On Windows, SMBv2 has a directory cache that will cause problems with the git
|
||||
cache script, so it is necessary to disable it by setting the registry key
|
||||
|
||||
```sh
|
||||
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters\DirectoryCacheLifetime
|
||||
```
|
||||
|
||||
to 0. More information: https://stackoverflow.com/a/9935126
|
||||
|
|
|
@ -36,7 +36,7 @@ To start a debugging session, open up PowerShell/CMD and execute your debug
|
|||
build of Electron, using the application to open as a parameter.
|
||||
|
||||
```powershell
|
||||
$ ./out/D/electron.exe ~/my-electron-app/
|
||||
$ ./out/Debug/electron.exe ~/my-electron-app/
|
||||
```
|
||||
|
||||
### Setting Breakpoints
|
||||
|
|
|
@ -1,40 +1,15 @@
|
|||
## Debugging with XCode
|
||||
|
||||
### Build Debug Electron with Release libchromiumcontent
|
||||
You can create a debug build of Electron by following [build instructions for macOS](build-instructions-osx.md).
|
||||
The bootstrap process will download Release version of libchromiumcontent by default,
|
||||
so you will not be able to step through the Chromium source.
|
||||
|
||||
### Build Debug Electron with Debug libchromiumcontent
|
||||
If you want to debug and step through libchromiumcontent, you will have to run the
|
||||
bootsrap script with the `--build_debug_libcc` argument.
|
||||
|
||||
```sh
|
||||
$ cd electron
|
||||
$ ./script/bootstrap.py -v --build_debug_libcc
|
||||
```
|
||||
This can take a significant amount of time depending on build machine as it has to
|
||||
build all of the libchromium source.
|
||||
|
||||
Once, the lib is built, create a symlink to the built directory under download
|
||||
|
||||
`ln -s vendor/libchromiumcontent/dist/main/shared_library vendor/download/libchromiumcontent/shared_library`
|
||||
|
||||
Electron debug builds will use this shared library to link against.
|
||||
|
||||
```sh
|
||||
$ ./script/build.py -c D --libcc
|
||||
```
|
||||
This will build debug Electron with debug version of libchromiumcontent.
|
||||
|
||||
### Generate xcode project for debugging sources (cannot build code from xcode)
|
||||
Run the update script with the --xcode argument.
|
||||
Run `gn gen` with the --ide=xcode argument.
|
||||
```sh
|
||||
$ ./script/update.py --xcode
|
||||
$ gn gen out/Debug --ide=xcode
|
||||
```
|
||||
This will generate the electron.ninjs.xcworkspace. You will have to open this workspace
|
||||
This will generate the electron.ninja.xcworkspace. You will have to open this workspace
|
||||
to set breakpoints and inspect.
|
||||
|
||||
See `gn help gen` for more information on generating IDE projects with GN.
|
||||
|
||||
### Debugging and breakpoints
|
||||
|
||||
Launch Electron app after build.
|
||||
|
|
|
@ -29,9 +29,9 @@ To start a debugging session, open up Terminal and start `lldb`, passing a debug
|
|||
build of Electron as a parameter.
|
||||
|
||||
```sh
|
||||
$ lldb ./out/D/Electron.app
|
||||
(lldb) target create "./out/D/Electron.app"
|
||||
Current executable set to './out/D/Electron.app' (x86_64).
|
||||
$ lldb ./out/Debug/Electron.app
|
||||
(lldb) target create "./out/Debug/Electron.app"
|
||||
Current executable set to './out/Debug/Electron.app' (x86_64).
|
||||
```
|
||||
|
||||
### Setting Breakpoints
|
||||
|
@ -63,7 +63,7 @@ The app will immediately be paused, since Electron sets the app's name on launch
|
|||
|
||||
```sh
|
||||
(lldb) run
|
||||
Process 25244 launched: '/Users/fr/Code/electron/out/D/Electron.app/Contents/MacOS/Electron' (x86_64)
|
||||
Process 25244 launched: '/Users/fr/Code/electron/out/Debug/Electron.app/Contents/MacOS/Electron' (x86_64)
|
||||
Process 25244 stopped
|
||||
* thread #1: tid = 0x839a4c, 0x0000000100162db4 Electron Framework`atom::Browser::SetName(this=0x0000000108b14f20, name="Electron") + 20 at browser.cc:118, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
|
||||
frame #0: 0x0000000100162db4 Electron Framework`atom::Browser::SetName(this=0x0000000108b14f20, name="Electron") + 20 at browser.cc:118
|
||||
|
|
|
@ -46,9 +46,7 @@ Electron
|
|||
├── native_mate/ - A fork of Chromium's gin library that makes it easier to marshal
|
||||
| types between C++ and JavaScript.
|
||||
├── spec/ - Automatic tests.
|
||||
├── electron.gyp - Building rules of Electron.
|
||||
└── common.gypi - Compiler specific settings and building rules for other
|
||||
components like `node` and `breakpad`.
|
||||
└── BUILD.gn - Building rules of Electron.
|
||||
```
|
||||
|
||||
## `/chromium_src`
|
||||
|
@ -68,7 +66,7 @@ libcc patches we maintain now.
|
|||
|
||||
* **script** - Scripts used for development purpose like building, packaging,
|
||||
testing, etc.
|
||||
* **tools** - Helper scripts used by gyp files, unlike `script`, scripts put
|
||||
* **tools** - Helper scripts used by GN files, unlike `script`, scripts put
|
||||
here should never be invoked by users directly.
|
||||
* **vendor** - Source code of third party dependencies, we didn't use
|
||||
`third_party` as name because it would confuse it with the same directory in
|
||||
|
@ -78,7 +76,7 @@ libcc patches we maintain now.
|
|||
* **dist** - Temporary directory created by `script/create-dist.py` script
|
||||
when creating a distribution.
|
||||
* **external_binaries** - Downloaded binaries of third-party frameworks which
|
||||
do not support building with `gyp`.
|
||||
do not support building with `gn`.
|
||||
|
||||
## Keeping Git Submodules Up to Date
|
||||
|
||||
|
@ -89,8 +87,8 @@ when running `git status`:
|
|||
```sh
|
||||
$ git status
|
||||
|
||||
modified: vendor/libchromiumcontent (new commits)
|
||||
modified: vendor/node (new commits)
|
||||
modified: vendor/depot_tools (new commits)
|
||||
modified: vendor/boto (new commits)
|
||||
```
|
||||
|
||||
To update these vendored dependencies, run the following command:
|
||||
|
|
|
@ -108,8 +108,9 @@ packaging tools to do the work for you:
|
|||
## Rebranding by Rebuilding Electron from Source
|
||||
|
||||
It is also possible to rebrand Electron by changing the product name and
|
||||
building it from source. To do this you need to modify the `atom.gyp` file and
|
||||
have a clean rebuild.
|
||||
building it from source. To do this you need to set the build argument
|
||||
corresponding to the product name (`electron_product_name = "YourProductName"`)
|
||||
in the `args.gn` file and rebuild.
|
||||
|
||||
### Creating a Custom Electron Fork
|
||||
|
||||
|
|
845
electron.gyp
845
electron.gyp
|
@ -2,847 +2,6 @@
|
|||
'variables': {
|
||||
'project_name%': 'electron',
|
||||
'product_name%': 'Electron',
|
||||
'company_name%': 'GitHub, Inc',
|
||||
'company_abbr%': 'github',
|
||||
'version%': '4.0.0-nightly.20180905',
|
||||
'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c',
|
||||
},
|
||||
'includes': [
|
||||
'features.gypi',
|
||||
'filenames.gypi',
|
||||
'native_mate/native_mate_files.gypi',
|
||||
],
|
||||
'target_defaults': {
|
||||
'defines': [
|
||||
'ATOM_PRODUCT_NAME="<(product_name)"',
|
||||
'ATOM_PROJECT_NAME="<(project_name)"',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'mac_framework_dirs': [
|
||||
'<(source_root)/external_binaries',
|
||||
],
|
||||
}],
|
||||
['enable_desktop_capturer==1', {
|
||||
'defines': [
|
||||
'ENABLE_DESKTOP_CAPTURER',
|
||||
],
|
||||
}], # enable_desktop_capturer==1
|
||||
['enable_osr==1', {
|
||||
'defines': [
|
||||
'ENABLE_OSR',
|
||||
],
|
||||
}], # enable_osr==1
|
||||
['enable_pdf_viewer==1', {
|
||||
'defines': [
|
||||
'ENABLE_PDF_VIEWER',
|
||||
],
|
||||
}], # enable_pdf_viewer
|
||||
['enable_run_as_node==1', {
|
||||
'defines': [
|
||||
'ENABLE_RUN_AS_NODE',
|
||||
],
|
||||
}], # enable_run_as_node
|
||||
['enable_view_api==1', {
|
||||
'defines': [
|
||||
'ENABLE_VIEW_API',
|
||||
],
|
||||
}], # enable_view_api
|
||||
['enable_pepper_flash==1', {
|
||||
'defines': [
|
||||
'ENABLE_PEPPER_FLASH',
|
||||
],
|
||||
}], # enable_pepper_flash
|
||||
],
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': '<(project_name)',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'js2asar',
|
||||
'app2asar',
|
||||
'<(project_name)_lib',
|
||||
],
|
||||
'sources': [
|
||||
'<@(app_sources)',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'product_name': '<(product_name)',
|
||||
'mac_bundle': 1,
|
||||
'dependencies!': [
|
||||
'<(project_name)_lib',
|
||||
],
|
||||
'dependencies': [
|
||||
'<(project_name)_framework',
|
||||
'<(project_name)_helper',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name)',
|
||||
'INFOPLIST_FILE': 'atom/browser/resources/mac/Info.plist',
|
||||
'LD_RUNPATH_SEARCH_PATHS': [
|
||||
'@executable_path/../Frameworks',
|
||||
],
|
||||
},
|
||||
'mac_bundle_resources': [
|
||||
'<@(bundle_sources)',
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks',
|
||||
'files': [
|
||||
'<(PRODUCT_DIR)/<(product_name) Helper.app',
|
||||
'<(PRODUCT_DIR)/<(product_name) Framework.framework',
|
||||
],
|
||||
},
|
||||
],
|
||||
'postbuilds': [
|
||||
# The application doesn't have real localizations, it just has
|
||||
# empty .lproj directories, which is enough to convince Cocoa
|
||||
# that Electron supports those languages.
|
||||
{
|
||||
'postbuild_name': 'Make Empty Localizations',
|
||||
'variables': {
|
||||
'apply_locales_cmd': ['python', 'tools/mac/apply_locales.py'],
|
||||
'locale_dirs': [
|
||||
'>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
|
||||
],
|
||||
},
|
||||
'action': [
|
||||
'tools/mac/make_locale_dirs.sh',
|
||||
'<@(locale_dirs)',
|
||||
],
|
||||
},
|
||||
],
|
||||
'conditions': [
|
||||
['mas_build==0', {
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks',
|
||||
'files': [
|
||||
'external_binaries/Squirrel.framework',
|
||||
'external_binaries/ReactiveCocoa.framework',
|
||||
'external_binaries/Mantle.framework',
|
||||
],
|
||||
},
|
||||
],
|
||||
}],
|
||||
['mas_build==1', {
|
||||
'dependencies': [
|
||||
'<(project_name)_login_helper',
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Library/LoginItems',
|
||||
'files': [
|
||||
'<(PRODUCT_DIR)/<(product_name) Login Helper.app',
|
||||
],
|
||||
},
|
||||
],
|
||||
}],
|
||||
],
|
||||
}], # OS!="mac"
|
||||
['OS=="win"', {
|
||||
'msvs_settings': {
|
||||
'VCManifestTool': {
|
||||
'EmbedManifest': 'true',
|
||||
'AdditionalManifestFiles': 'atom/browser/resources/win/atom.manifest',
|
||||
},
|
||||
'VCLinkerTool': {
|
||||
# Chrome builds with this minimum environment which makes e.g.
|
||||
# GetSystemMetrics(SM_CXSIZEFRAME) return Windows XP/2003
|
||||
# compatible metrics. See: https://crbug.com/361720
|
||||
#
|
||||
# The following two settings translate to a linker flag
|
||||
# of /SUBSYSTEM:WINDOWS,5.02
|
||||
'MinimumRequiredVersion': '5.02',
|
||||
'SubSystem': '2',
|
||||
'AdditionalDependencies': [
|
||||
'wtsapi32.lib',
|
||||
],
|
||||
},
|
||||
},
|
||||
'copies': [
|
||||
{
|
||||
'variables': {
|
||||
'conditions': [
|
||||
['libchromiumcontent_component', {
|
||||
'copied_libraries': [
|
||||
'<@(libchromiumcontent_shared_libraries)',
|
||||
'<@(libchromiumcontent_shared_v8_libraries)',
|
||||
],
|
||||
}, {
|
||||
'copied_libraries': [
|
||||
'<(libchromiumcontent_dir)/ffmpeg.dll',
|
||||
],
|
||||
}],
|
||||
['enable_pepper_flash==1', {
|
||||
'copied_libraries': [
|
||||
'<(libchromiumcontent_dir)/pepper_flash.dll',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
'destination': '<(PRODUCT_DIR)',
|
||||
'files': [
|
||||
'<@(copied_libraries)',
|
||||
'<(libchromiumcontent_dir)/locales',
|
||||
'<(libchromiumcontent_dir)/libEGL.dll',
|
||||
'<(libchromiumcontent_dir)/libGLESv2.dll',
|
||||
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||
'<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/content_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/content_shell.pak',
|
||||
'<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/views_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/natives_blob.bin',
|
||||
'<(libchromiumcontent_dir)/v8_context_snapshot.bin',
|
||||
'external_binaries/d3dcompiler_47.dll',
|
||||
],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
'dependencies': [
|
||||
'vendor/breakpad/breakpad.gyp:dump_syms#host',
|
||||
],
|
||||
}], # OS=="win"
|
||||
['OS=="linux"', {
|
||||
'copies': [
|
||||
{
|
||||
'variables': {
|
||||
'conditions': [
|
||||
['libchromiumcontent_component', {
|
||||
'copied_libraries': [
|
||||
'<(PRODUCT_DIR)/lib/libnode.so',
|
||||
'<@(libchromiumcontent_shared_libraries)',
|
||||
'<@(libchromiumcontent_shared_v8_libraries)',
|
||||
],
|
||||
}, {
|
||||
'copied_libraries': [
|
||||
'<(PRODUCT_DIR)/lib/libnode.so',
|
||||
'<(libchromiumcontent_dir)/libffmpeg.so',
|
||||
],
|
||||
}],
|
||||
['enable_pepper_flash==1', {
|
||||
'copied_libraries': [
|
||||
'<(libchromiumcontent_dir)/libpepper_flash.so',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
'destination': '<(PRODUCT_DIR)',
|
||||
'files': [
|
||||
'<@(copied_libraries)',
|
||||
'<(libchromiumcontent_dir)/locales',
|
||||
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||
'<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/content_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/content_shell.pak',
|
||||
'<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/views_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/natives_blob.bin',
|
||||
'<(libchromiumcontent_dir)/v8_context_snapshot.bin',
|
||||
],
|
||||
},
|
||||
],
|
||||
}], # OS=="linux"
|
||||
],
|
||||
}, # target <(project_name)
|
||||
{
|
||||
'target_name': '<(project_name)_lib',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'atom_js2c',
|
||||
'brightray/brightray.gyp:brightray',
|
||||
'vendor/node/node.gyp:node_lib',
|
||||
],
|
||||
'defines': [
|
||||
# We need to access internal implementations of Node.
|
||||
'NODE_WANT_INTERNALS=1',
|
||||
'NODE_SHARED_MODE',
|
||||
'HAVE_OPENSSL=1',
|
||||
'HAVE_INSPECTOR=1',
|
||||
# Disable warnings for g_settings_list_schemas.
|
||||
'GLIB_DISABLE_DEPRECATION_WARNINGS',
|
||||
# Defined in Chromium but not exposed in its gyp file.
|
||||
'V8_USE_EXTERNAL_STARTUP_DATA',
|
||||
|
||||
# Import V8 symbols from shared library (node.dll / libnode.so)
|
||||
'USING_V8_SHARED',
|
||||
'USING_V8_PLATFORM_SHARED',
|
||||
'USING_V8_BASE_SHARED',
|
||||
|
||||
# See Chromium src/third_party/protobuf/BUILD.gn
|
||||
'GOOGLE_PROTOBUF_NO_RTTI',
|
||||
'GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER',
|
||||
],
|
||||
'sources': [
|
||||
'<@(lib_sources)',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
'chromium_src',
|
||||
'native_mate',
|
||||
# Include atom_natives.h.
|
||||
'<(SHARED_INTERMEDIATE_DIR)',
|
||||
# Include directories for uv and node.
|
||||
'vendor/node/src',
|
||||
'vendor/node/deps/http_parser',
|
||||
'vendor/node/deps/uv/include',
|
||||
# The `node.h` is using `#include"v8.h"`.
|
||||
'<(libchromiumcontent_src_dir)/v8/include',
|
||||
# The `node.h` is using `#include"ares.h"`.
|
||||
'vendor/node/deps/cares/include',
|
||||
# The `third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h` is using `platform/PlatformExport.h`.
|
||||
'<(libchromiumcontent_src_dir)/third_party/WebKit/Source',
|
||||
# The 'third_party/libyuv/include/libyuv/scale_argb.h' is using 'libyuv/basic_types.h'.
|
||||
'<(libchromiumcontent_src_dir)/third_party/libyuv/include',
|
||||
# The 'third_party/webrtc/modules/desktop_capture/desktop_frame.h' is using 'webrtc/base/scoped_ptr.h'.
|
||||
'<(libchromiumcontent_src_dir)/third_party/',
|
||||
'<(libchromiumcontent_src_dir)/components/cdm',
|
||||
'<(libchromiumcontent_src_dir)/third_party/widevine',
|
||||
'<(libchromiumcontent_src_dir)/third_party/widevine/cdm/stub',
|
||||
'<(libchromiumcontent_src_dir)/third_party/protobuf/src',
|
||||
# The 'third_party/webrtc/modules/desktop_capture/desktop_capture_options.h' is using 'rtc_base/constructormagic.h'.
|
||||
'<(libchromiumcontent_src_dir)/third_party/webrtc',
|
||||
# leveldb includes are required
|
||||
'<(libchromiumcontent_src_dir)/third_party/leveldatabase/src',
|
||||
'<(libchromiumcontent_src_dir)/third_party/leveldatabase/src/include',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
},
|
||||
'export_dependent_settings': [
|
||||
'brightray/brightray.gyp:brightray',
|
||||
],
|
||||
'conditions': [
|
||||
['enable_pdf_viewer==1', {
|
||||
'dependencies': [
|
||||
'vendor/pdf_viewer/pdf_viewer.gyp:pdf_viewer',
|
||||
],
|
||||
}], # enable_pdf_viewer
|
||||
['enable_pepper_flash==1', {
|
||||
'include_dirs': [
|
||||
'<(libchromiumcontent_src_dir)/chrome/browser/renderer_host/pepper',
|
||||
'<(libchromiumcontent_src_dir)/chrome/renderer/pepper',
|
||||
],
|
||||
'link_settings': {
|
||||
'conditions': [
|
||||
['libchromiumcontent_component', {
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
'libraries': [
|
||||
'<(libchromiumcontent_dir)/pepper_flash.dll',
|
||||
]
|
||||
}],
|
||||
['OS=="mac"', {
|
||||
'libraries': [
|
||||
'<(libchromiumcontent_dir)/libpepper_flash.dylib',
|
||||
]
|
||||
}],
|
||||
['OS=="linux"', {
|
||||
'libraries': [
|
||||
'<(libchromiumcontent_dir)/libpepper_flash.so',
|
||||
]
|
||||
}],
|
||||
],
|
||||
}, {
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
'libraries': [
|
||||
'<(libchromiumcontent_dir)/pepper_flash.lib',
|
||||
]
|
||||
}, {
|
||||
'libraries': [
|
||||
'<(libchromiumcontent_dir)/libpepper_flash.a',
|
||||
]
|
||||
}],
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
}], # enable_pepper_flash
|
||||
['libchromiumcontent_component', {
|
||||
'link_settings': {
|
||||
'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
|
||||
},
|
||||
'sources': [
|
||||
'<@(lib_sources_location_provider)',
|
||||
],
|
||||
'defines': [
|
||||
# Enable fake location provider to mock geolocation
|
||||
# responses in component build. Should not be enabled
|
||||
# for release build. If you need to test with chromium's
|
||||
# location provider, remove this definition.
|
||||
'OVERRIDE_LOCATION_PROVIDER',
|
||||
],
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'sources': [
|
||||
'<@(lib_sources_win)',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-ldwmapi.lib',
|
||||
'-limm32.lib',
|
||||
'-lgdi32.lib',
|
||||
'-loleacc.lib',
|
||||
'-lcomctl32.lib',
|
||||
'-lcomdlg32.lib',
|
||||
'-lwininet.lib',
|
||||
'-lwinmm.lib',
|
||||
'-lcrypt32.lib',
|
||||
'-luiautomationcore.lib',
|
||||
'-lPropsys.lib'
|
||||
],
|
||||
},
|
||||
'dependencies': [
|
||||
# Node is built as static_library on Windows, so we also need to
|
||||
# include its dependencies here.
|
||||
'vendor/node/deps/cares/cares.gyp:cares',
|
||||
'vendor/node/deps/http_parser/http_parser.gyp:http_parser',
|
||||
'vendor/node/deps/uv/uv.gyp:libuv',
|
||||
'vendor/node/deps/zlib/zlib.gyp:zlib',
|
||||
# Build with breakpad support.
|
||||
'vendor/breakpad/breakpad.gyp:breakpad_handler',
|
||||
'vendor/breakpad/breakpad.gyp:breakpad_sender',
|
||||
],
|
||||
}], # OS=="win"
|
||||
['OS=="mac" and mas_build==0', {
|
||||
'dependencies': [
|
||||
'vendor/crashpad/client/client.gyp:crashpad_client',
|
||||
'vendor/crashpad/handler/handler.gyp:crashpad_handler',
|
||||
],
|
||||
'link_settings': {
|
||||
# Do not link with QTKit for mas build.
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
|
||||
],
|
||||
},
|
||||
'xcode_settings': {
|
||||
# ReactiveCocoa which is used by Squirrel requires using __weak.
|
||||
'CLANG_ENABLE_OBJC_WEAK': 'YES',
|
||||
'OTHER_CFLAGS': [
|
||||
'-Wunguarded-availability',
|
||||
'-Wobjc-missing-property-synthesis',
|
||||
],
|
||||
},
|
||||
}], # OS=="mac" and mas_build==0
|
||||
['OS=="mac" and mas_build==1', {
|
||||
'defines': [
|
||||
'MAS_BUILD',
|
||||
],
|
||||
'sources!': [
|
||||
'atom/browser/auto_updater_mac.mm',
|
||||
'atom/common/crash_reporter/crash_reporter_mac.h',
|
||||
'atom/common/crash_reporter/crash_reporter_mac.mm',
|
||||
],
|
||||
'dependencies': [
|
||||
# Somehow we have code from Chromium using crashpad, very likely
|
||||
# from components/crash.
|
||||
# Since we do not actually invoke code from components/crash, this
|
||||
# dependency should be eventually optimized out by linker.
|
||||
'vendor/crashpad/client/client.gyp:crashpad_client',
|
||||
],
|
||||
}], # OS=="mac" and mas_build==1
|
||||
['OS=="linux"', {
|
||||
'sources': [
|
||||
'<@(lib_sources_linux)',
|
||||
'<@(lib_sources_nss)',
|
||||
],
|
||||
'link_settings': {
|
||||
'ldflags': [
|
||||
# Make binary search for libraries under current directory, so we
|
||||
# don't have to manually set $LD_LIBRARY_PATH:
|
||||
# http://serverfault.com/questions/279068/cant-find-so-in-the-same-directory-as-the-executable
|
||||
'-Wl,-rpath=\$$ORIGIN',
|
||||
# Make native module dynamic loading work.
|
||||
'-rdynamic',
|
||||
],
|
||||
},
|
||||
# Required settings of using breakpad.
|
||||
'cflags_cc': [
|
||||
'-Wno-empty-body',
|
||||
],
|
||||
'include_dirs': [
|
||||
'vendor/breakpad/src',
|
||||
],
|
||||
'dependencies': [
|
||||
'vendor/breakpad/breakpad.gyp:breakpad_client',
|
||||
],
|
||||
}], # OS=="linux"
|
||||
['OS=="linux" and clang==1', {
|
||||
# Required settings of using breakpad.
|
||||
'cflags_cc': [
|
||||
'-Wno-reserved-user-defined-literal',
|
||||
],
|
||||
}], # OS=="linux" and clang==1
|
||||
],
|
||||
}, # target <(product_name)_lib
|
||||
{
|
||||
'target_name': 'js2asar',
|
||||
'type': 'none',
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'js2asar',
|
||||
'variables': {
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
|
||||
},{
|
||||
'resources_path': '<(PRODUCT_DIR)/resources',
|
||||
}],
|
||||
],
|
||||
},
|
||||
'inputs': [
|
||||
'<@(js_sources)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(resources_path)/electron.asar',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'tools/js2asar.py',
|
||||
'<@(_outputs)',
|
||||
'lib',
|
||||
'<@(_inputs)',
|
||||
],
|
||||
}
|
||||
],
|
||||
}, # target js2asar
|
||||
{
|
||||
'target_name': 'app2asar',
|
||||
'type': 'none',
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'app2asar',
|
||||
'variables': {
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
|
||||
},{
|
||||
'resources_path': '<(PRODUCT_DIR)/resources',
|
||||
}],
|
||||
],
|
||||
},
|
||||
'inputs': [
|
||||
'<@(default_app_sources)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(resources_path)/default_app.asar',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'tools/js2asar.py',
|
||||
'<@(_outputs)',
|
||||
'default_app',
|
||||
'<@(_inputs)',
|
||||
],
|
||||
}
|
||||
],
|
||||
}, # target app2asar
|
||||
{
|
||||
'target_name': 'atom_js2c_copy',
|
||||
'type': 'none',
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(js2c_input_dir)',
|
||||
'files': [
|
||||
'<@(js2c_sources)',
|
||||
],
|
||||
},
|
||||
],
|
||||
}, # target atom_js2c_copy
|
||||
{
|
||||
'target_name': 'atom_browserify',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
# depend on this target to ensure the '<(js2c_input_dir)' is created
|
||||
'atom_js2c_copy',
|
||||
],
|
||||
'variables': {
|
||||
'sandbox_args': [
|
||||
'./lib/sandboxed_renderer/init.js',
|
||||
'-r',
|
||||
'./lib/sandboxed_renderer/api/exports/electron.js:electron',
|
||||
'-r',
|
||||
'./lib/sandboxed_renderer/api/exports/fs.js:fs',
|
||||
'-r',
|
||||
'./lib/sandboxed_renderer/api/exports/os.js:os',
|
||||
'-r',
|
||||
'./lib/sandboxed_renderer/api/exports/path.js:path',
|
||||
'-r',
|
||||
'./lib/sandboxed_renderer/api/exports/child_process.js:child_process'
|
||||
],
|
||||
'isolated_args': [
|
||||
'lib/isolated_renderer/init.js',
|
||||
]
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'atom_browserify_sandbox',
|
||||
'inputs': [
|
||||
'<!@(python tools/list-browserify-deps.py <(sandbox_args))'
|
||||
],
|
||||
'outputs': [
|
||||
'<(js2c_input_dir)/preload_bundle.js',
|
||||
],
|
||||
'action': [
|
||||
'npm',
|
||||
'run',
|
||||
'--silent',
|
||||
'browserify',
|
||||
'--',
|
||||
'<@(sandbox_args)',
|
||||
'-o',
|
||||
'<@(_outputs)',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'atom_browserify_isolated_context',
|
||||
'inputs': [
|
||||
'<!@(python tools/list-browserify-deps.py <(isolated_args))'
|
||||
],
|
||||
'outputs': [
|
||||
'<(js2c_input_dir)/isolated_bundle.js',
|
||||
],
|
||||
'action': [
|
||||
'npm',
|
||||
'run',
|
||||
'--silent',
|
||||
'browserify',
|
||||
'--',
|
||||
'<@(isolated_args)',
|
||||
'-o',
|
||||
'<@(_outputs)',
|
||||
],
|
||||
},
|
||||
],
|
||||
}, # target atom_browserify
|
||||
{
|
||||
'target_name': 'atom_js2c',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
'atom_js2c_copy',
|
||||
'atom_browserify',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'atom_js2c',
|
||||
'inputs': [
|
||||
# List all input files that should trigger a rebuild with js2c
|
||||
'<@(js2c_sources)',
|
||||
'<(js2c_input_dir)/preload_bundle.js',
|
||||
'<(js2c_input_dir)/isolated_bundle.js',
|
||||
],
|
||||
'outputs': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/atom_natives.h',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'tools/js2c.py',
|
||||
'vendor/node',
|
||||
'<@(_outputs)',
|
||||
'<(js2c_input_dir)',
|
||||
],
|
||||
}
|
||||
],
|
||||
}, # target atom_js2c
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'targets': [
|
||||
{
|
||||
'target_name': '<(project_name)_framework',
|
||||
'product_name': '<(product_name) Framework',
|
||||
'type': 'shared_library',
|
||||
'dependencies': [
|
||||
'<(project_name)_lib',
|
||||
],
|
||||
'sources': [
|
||||
'<@(framework_sources)',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
'vendor',
|
||||
'<(libchromiumcontent_src_dir)',
|
||||
],
|
||||
'export_dependent_settings': [
|
||||
'<(project_name)_lib',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/Quartz.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/Security.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/SecurityInterface.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/ServiceManagement.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/StoreKit.framework',
|
||||
],
|
||||
},
|
||||
'mac_bundle': 1,
|
||||
'mac_bundle_resources': [
|
||||
'atom/common/resources/mac/MainMenu.xib',
|
||||
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||
'<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/content_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/content_shell.pak',
|
||||
'<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/views_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/natives_blob.bin',
|
||||
'<(libchromiumcontent_dir)/v8_context_snapshot.bin',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).framework',
|
||||
'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
|
||||
'LD_DYLIB_INSTALL_NAME': '@rpath/<(product_name) Framework.framework/<(product_name) Framework',
|
||||
'LD_RUNPATH_SEARCH_PATHS': [
|
||||
'@loader_path/Libraries',
|
||||
],
|
||||
'OTHER_LDFLAGS': [
|
||||
'-ObjC',
|
||||
],
|
||||
},
|
||||
'copies': [
|
||||
{
|
||||
'variables': {
|
||||
'conditions': [
|
||||
['libchromiumcontent_component', {
|
||||
'copied_libraries': [
|
||||
'<(PRODUCT_DIR)/libnode.dylib',
|
||||
'<@(libchromiumcontent_shared_libraries)',
|
||||
'<@(libchromiumcontent_shared_v8_libraries)',
|
||||
],
|
||||
}, {
|
||||
'copied_libraries': [
|
||||
'<(PRODUCT_DIR)/libnode.dylib',
|
||||
'<(libchromiumcontent_dir)/libffmpeg.dylib',
|
||||
],
|
||||
}],
|
||||
['enable_pepper_flash==1', {
|
||||
'copied_libraries': [
|
||||
'<(libchromiumcontent_dir)/libpepper_flash.dylib',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Libraries',
|
||||
'files': [
|
||||
'<@(copied_libraries)',
|
||||
],
|
||||
},
|
||||
],
|
||||
'postbuilds': [
|
||||
{
|
||||
'postbuild_name': 'Fix path of libnode',
|
||||
'action': [
|
||||
'install_name_tool',
|
||||
'-change',
|
||||
'/usr/local/lib/libnode.dylib',
|
||||
'@rpath/libnode.dylib',
|
||||
'${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Versions/A/<(product_name) Framework',
|
||||
],
|
||||
},
|
||||
{
|
||||
'postbuild_name': 'Add symlinks for framework subdirectories',
|
||||
'action': [
|
||||
'tools/mac/create-framework-subdir-symlinks.sh',
|
||||
'<(product_name) Framework',
|
||||
'Libraries',
|
||||
],
|
||||
},
|
||||
{
|
||||
'postbuild_name': 'Copy locales',
|
||||
'action': [
|
||||
'tools/mac/copy-locales.py',
|
||||
'-d',
|
||||
'<(libchromiumcontent_dir)/locales',
|
||||
'${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Resources',
|
||||
'<@(locales)',
|
||||
],
|
||||
},
|
||||
],
|
||||
'conditions': [
|
||||
['enable_pdf_viewer==1', {
|
||||
'mac_bundle_resources': [
|
||||
'<(PRODUCT_DIR)/pdf_viewer_resources.pak',
|
||||
],
|
||||
}], # enable_pdf_viewer
|
||||
['mas_build==0', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'external_binaries/Squirrel.framework',
|
||||
'external_binaries/ReactiveCocoa.framework',
|
||||
'external_binaries/Mantle.framework',
|
||||
],
|
||||
},
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Resources',
|
||||
'files': [
|
||||
'<(PRODUCT_DIR)/crashpad_handler',
|
||||
],
|
||||
},
|
||||
],
|
||||
}],
|
||||
],
|
||||
}, # target framework
|
||||
{
|
||||
'target_name': '<(project_name)_helper',
|
||||
'product_name': '<(product_name) Helper',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'<(project_name)_framework',
|
||||
],
|
||||
'sources': [
|
||||
'<@(app_sources)',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
'mac_bundle': 1,
|
||||
'xcode_settings': {
|
||||
'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).helper',
|
||||
'INFOPLIST_FILE': 'atom/renderer/resources/mac/Info.plist',
|
||||
'LD_RUNPATH_SEARCH_PATHS': [
|
||||
'@executable_path/../../..',
|
||||
],
|
||||
},
|
||||
}, # target helper
|
||||
{
|
||||
'target_name': '<(project_name)_login_helper',
|
||||
'product_name': '<(product_name) Login Helper',
|
||||
'type': 'executable',
|
||||
'sources': [
|
||||
'<@(login_helper_sources)',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
'vendor',
|
||||
'<(libchromiumcontent_src_dir)',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
|
||||
],
|
||||
},
|
||||
'mac_bundle': 1,
|
||||
'xcode_settings': {
|
||||
'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).loginhelper',
|
||||
'INFOPLIST_FILE': 'atom/app/resources/mac/loginhelper-Info.plist',
|
||||
'OTHER_LDFLAGS': [
|
||||
'-ObjC',
|
||||
],
|
||||
},
|
||||
}, # target login_helper
|
||||
],
|
||||
}], # OS!="mac"
|
||||
],
|
||||
'version%': '4.0.0-nightly.20180823',
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
# If it looks stupid but it works it ain't stupid.
|
||||
'variables': {
|
||||
'variables': {
|
||||
'enable_desktop_capturer%': 1,
|
||||
'enable_osr%': 1,
|
||||
'enable_pdf_viewer%': 0, # FIXME(deepak1556)
|
||||
'enable_run_as_node%': 1,
|
||||
'enable_view_api%': 0,
|
||||
'enable_pepper_flash%': 1,
|
||||
},
|
||||
'enable_desktop_capturer%': '<(enable_desktop_capturer)',
|
||||
'enable_osr%': '<(enable_osr)',
|
||||
'enable_pdf_viewer%': '<(enable_pdf_viewer)',
|
||||
'enable_run_as_node%': '<(enable_run_as_node)',
|
||||
'enable_view_api%': '<(enable_view_api)',
|
||||
'enable_pepper_flash%': '<(enable_pepper_flash)',
|
||||
},
|
||||
}
|
|
@ -0,0 +1,688 @@
|
|||
filenames = {
|
||||
js2c_sources = [
|
||||
"lib/common/asar.js",
|
||||
"lib/common/asar_init.js",
|
||||
]
|
||||
|
||||
js_sources = [
|
||||
"lib/browser/api/app.js",
|
||||
"lib/browser/api/auto-updater.js",
|
||||
"lib/browser/api/auto-updater/auto-updater-native.js",
|
||||
"lib/browser/api/auto-updater/auto-updater-win.js",
|
||||
"lib/browser/api/auto-updater/squirrel-update-win.js",
|
||||
"lib/browser/api/browser-view.js",
|
||||
"lib/browser/api/browser-window.js",
|
||||
"lib/browser/api/content-tracing.js",
|
||||
"lib/browser/api/dialog.js",
|
||||
"lib/browser/api/exports/electron.js",
|
||||
"lib/browser/api/global-shortcut.js",
|
||||
"lib/browser/api/ipc-main.js",
|
||||
"lib/browser/api/in-app-purchase.js",
|
||||
"lib/browser/api/menu-item-roles.js",
|
||||
"lib/browser/api/menu-item.js",
|
||||
"lib/browser/api/menu-utils.js",
|
||||
"lib/browser/api/menu.js",
|
||||
"lib/browser/api/module-list.js",
|
||||
"lib/browser/api/navigation-controller.js",
|
||||
"lib/browser/api/net.js",
|
||||
"lib/browser/api/net-log.js",
|
||||
"lib/browser/api/notification.js",
|
||||
"lib/browser/api/power-monitor.js",
|
||||
"lib/browser/api/power-save-blocker.js",
|
||||
"lib/browser/api/protocol.js",
|
||||
"lib/browser/api/screen.js",
|
||||
"lib/browser/api/session.js",
|
||||
"lib/browser/api/system-preferences.js",
|
||||
"lib/browser/api/top-level-window.js",
|
||||
"lib/browser/api/touch-bar.js",
|
||||
"lib/browser/api/tray.js",
|
||||
"lib/browser/api/view.js",
|
||||
"lib/browser/api/web-contents.js",
|
||||
"lib/browser/api/web-contents-view.js",
|
||||
"lib/browser/chrome-extension.js",
|
||||
"lib/browser/guest-view-manager.js",
|
||||
"lib/browser/guest-window-manager.js",
|
||||
"lib/browser/init.js",
|
||||
"lib/browser/objects-registry.js",
|
||||
"lib/browser/rpc-server.js",
|
||||
"lib/common/api/clipboard.js",
|
||||
"lib/common/api/crash-reporter.js",
|
||||
"lib/common/api/deprecate.js",
|
||||
"lib/common/api/deprecations.js",
|
||||
"lib/common/api/is-promise.js",
|
||||
"lib/common/api/exports/electron.js",
|
||||
"lib/common/api/module-list.js",
|
||||
"lib/common/api/native-image.js",
|
||||
"lib/common/api/shell.js",
|
||||
"lib/common/atom-binding-setup.js",
|
||||
"lib/common/buffer-utils.js",
|
||||
"lib/common/init.js",
|
||||
"lib/common/parse-features-string.js",
|
||||
"lib/common/reset-search-paths.js",
|
||||
"lib/renderer/callbacks-registry.js",
|
||||
"lib/renderer/chrome-api.js",
|
||||
"lib/renderer/content-scripts-injector.js",
|
||||
"lib/renderer/init.js",
|
||||
"lib/renderer/inspector.js",
|
||||
"lib/renderer/override.js",
|
||||
"lib/renderer/security-warnings.js",
|
||||
"lib/renderer/web-frame-init.js",
|
||||
"lib/renderer/window-setup.js",
|
||||
"lib/renderer/web-view/guest-view-internal.js",
|
||||
"lib/renderer/web-view/web-view.js",
|
||||
"lib/renderer/web-view/web-view-attributes.js",
|
||||
"lib/renderer/web-view/web-view-constants.js",
|
||||
"lib/renderer/api/exports/electron.js",
|
||||
"lib/renderer/api/ipc-renderer.js",
|
||||
"lib/renderer/api/module-list.js",
|
||||
"lib/renderer/api/remote.js",
|
||||
"lib/renderer/api/screen.js",
|
||||
"lib/renderer/api/web-frame.js",
|
||||
"lib/renderer/extensions/event.js",
|
||||
"lib/renderer/extensions/i18n.js",
|
||||
"lib/renderer/extensions/storage.js",
|
||||
"lib/renderer/extensions/web-navigation.js",
|
||||
"lib/worker/init.js",
|
||||
]
|
||||
|
||||
default_app_sources = [
|
||||
"default_app/default_app.js",
|
||||
"default_app/icon.png",
|
||||
"default_app/index.html",
|
||||
"default_app/main.js",
|
||||
"default_app/package.json",
|
||||
"default_app/renderer.js",
|
||||
"default_app/styles.css",
|
||||
"node_modules/octicons/build/build.css",
|
||||
"node_modules/octicons/build/svg/gist.svg",
|
||||
"node_modules/octicons/build/svg/mark-github.svg",
|
||||
"node_modules/octicons/build/svg/gear.svg",
|
||||
"node_modules/octicons/build/svg/star.svg",
|
||||
"node_modules/octicons/build/svg/gift.svg",
|
||||
]
|
||||
|
||||
lib_sources = [
|
||||
"atom/app/atom_content_client.cc",
|
||||
"atom/app/atom_content_client.h",
|
||||
"atom/app/atom_main_delegate.cc",
|
||||
"atom/app/atom_main_delegate.h",
|
||||
"atom/app/atom_main_delegate_mac.mm",
|
||||
"atom/app/command_line_args.cc",
|
||||
"atom/app/command_line_args.h",
|
||||
"atom/app/uv_task_runner.cc",
|
||||
"atom/app/uv_task_runner.h",
|
||||
"atom/browser/api/atom_api_app.cc",
|
||||
"atom/browser/api/atom_api_app.h",
|
||||
"atom/browser/api/atom_api_auto_updater.cc",
|
||||
"atom/browser/api/atom_api_auto_updater.h",
|
||||
"atom/browser/api/atom_api_browser_view.cc",
|
||||
"atom/browser/api/atom_api_browser_view.h",
|
||||
"atom/browser/api/atom_api_content_tracing.cc",
|
||||
"atom/browser/api/atom_api_cookies.cc",
|
||||
"atom/browser/api/atom_api_cookies.h",
|
||||
"atom/browser/api/atom_api_debugger.cc",
|
||||
"atom/browser/api/atom_api_debugger.h",
|
||||
"atom/browser/api/atom_api_dialog.cc",
|
||||
"atom/browser/api/atom_api_download_item.cc",
|
||||
"atom/browser/api/atom_api_download_item.h",
|
||||
"atom/browser/api/atom_api_global_shortcut.cc",
|
||||
"atom/browser/api/atom_api_global_shortcut.h",
|
||||
"atom/browser/api/atom_api_in_app_purchase.cc",
|
||||
"atom/browser/api/atom_api_in_app_purchase.h",
|
||||
"atom/browser/api/atom_api_menu.cc",
|
||||
"atom/browser/api/atom_api_menu.h",
|
||||
"atom/browser/api/atom_api_menu_mac.h",
|
||||
"atom/browser/api/atom_api_menu_mac.mm",
|
||||
"atom/browser/api/atom_api_menu_views.cc",
|
||||
"atom/browser/api/atom_api_menu_views.h",
|
||||
"atom/browser/api/atom_api_net.cc",
|
||||
"atom/browser/api/atom_api_net.h",
|
||||
"atom/browser/api/atom_api_net_log.cc",
|
||||
"atom/browser/api/atom_api_net_log.h",
|
||||
"atom/browser/api/atom_api_notification.cc",
|
||||
"atom/browser/api/atom_api_notification.h",
|
||||
"atom/browser/api/atom_api_power_monitor_mac.mm",
|
||||
"atom/browser/api/atom_api_power_monitor_win.cc",
|
||||
"atom/browser/api/atom_api_power_monitor.cc",
|
||||
"atom/browser/api/atom_api_power_monitor.h",
|
||||
"atom/browser/api/atom_api_power_save_blocker.cc",
|
||||
"atom/browser/api/atom_api_power_save_blocker.h",
|
||||
"atom/browser/api/atom_api_protocol.cc",
|
||||
"atom/browser/api/atom_api_protocol.h",
|
||||
"atom/browser/api/atom_api_render_process_preferences.cc",
|
||||
"atom/browser/api/atom_api_render_process_preferences.h",
|
||||
"atom/browser/api/atom_api_screen.cc",
|
||||
"atom/browser/api/atom_api_screen.h",
|
||||
"atom/browser/api/atom_api_session.cc",
|
||||
"atom/browser/api/atom_api_session.h",
|
||||
"atom/browser/api/atom_api_system_preferences.cc",
|
||||
"atom/browser/api/atom_api_system_preferences.h",
|
||||
"atom/browser/api/atom_api_system_preferences_mac.mm",
|
||||
"atom/browser/api/atom_api_system_preferences_win.cc",
|
||||
"atom/browser/api/atom_api_top_level_window.cc",
|
||||
"atom/browser/api/atom_api_top_level_window.h",
|
||||
"atom/browser/api/atom_api_tray.cc",
|
||||
"atom/browser/api/atom_api_tray.h",
|
||||
"atom/browser/api/atom_api_url_request.cc",
|
||||
"atom/browser/api/atom_api_url_request.h",
|
||||
"atom/browser/api/atom_api_view.cc",
|
||||
"atom/browser/api/atom_api_view.h",
|
||||
"atom/browser/api/atom_api_web_contents.cc",
|
||||
"atom/browser/api/atom_api_web_contents.h",
|
||||
"atom/browser/api/atom_api_web_contents_mac.mm",
|
||||
"atom/browser/api/atom_api_web_contents_view.cc",
|
||||
"atom/browser/api/atom_api_web_contents_view.h",
|
||||
"atom/browser/api/atom_api_web_request.cc",
|
||||
"atom/browser/api/atom_api_web_request.h",
|
||||
"atom/browser/api/atom_api_web_view_manager.cc",
|
||||
"atom/browser/api/atom_api_browser_window.cc",
|
||||
"atom/browser/api/atom_api_browser_window.h",
|
||||
"atom/browser/api/atom_api_browser_window_mac.mm",
|
||||
"atom/browser/api/atom_api_browser_window_views.cc",
|
||||
"atom/browser/api/event.cc",
|
||||
"atom/browser/api/event.h",
|
||||
"atom/browser/api/event_emitter.cc",
|
||||
"atom/browser/api/event_emitter.h",
|
||||
"atom/browser/api/event_subscriber.cc",
|
||||
"atom/browser/api/event_subscriber.h",
|
||||
"atom/browser/api/trackable_object.cc",
|
||||
"atom/browser/api/trackable_object.h",
|
||||
"atom/browser/api/frame_subscriber.cc",
|
||||
"atom/browser/api/frame_subscriber.h",
|
||||
"atom/browser/api/save_page_handler.cc",
|
||||
"atom/browser/api/save_page_handler.h",
|
||||
"atom/browser/auto_updater.cc",
|
||||
"atom/browser/auto_updater.h",
|
||||
"atom/browser/auto_updater_mac.mm",
|
||||
"atom/browser/atom_blob_reader.cc",
|
||||
"atom/browser/atom_blob_reader.h",
|
||||
"atom/browser/atom_browser_client.cc",
|
||||
"atom/browser/atom_browser_client.h",
|
||||
"atom/browser/atom_browser_context.cc",
|
||||
"atom/browser/atom_browser_context.h",
|
||||
"atom/browser/atom_download_manager_delegate.cc",
|
||||
"atom/browser/atom_download_manager_delegate.h",
|
||||
"atom/browser/atom_browser_main_parts.cc",
|
||||
"atom/browser/atom_browser_main_parts.h",
|
||||
"atom/browser/atom_browser_main_parts_mac.mm",
|
||||
"atom/browser/atom_browser_main_parts_posix.cc",
|
||||
"atom/browser/atom_javascript_dialog_manager.cc",
|
||||
"atom/browser/atom_javascript_dialog_manager.h",
|
||||
"atom/browser/atom_permission_manager.cc",
|
||||
"atom/browser/atom_permission_manager.h",
|
||||
"atom/browser/atom_quota_permission_context.cc",
|
||||
"atom/browser/atom_quota_permission_context.h",
|
||||
"atom/browser/atom_resource_dispatcher_host_delegate.cc",
|
||||
"atom/browser/atom_resource_dispatcher_host_delegate.h",
|
||||
"atom/browser/atom_speech_recognition_manager_delegate.cc",
|
||||
"atom/browser/atom_speech_recognition_manager_delegate.h",
|
||||
"atom/browser/atom_web_ui_controller_factory.cc",
|
||||
"atom/browser/atom_web_ui_controller_factory.h",
|
||||
"atom/browser/bridge_task_runner.cc",
|
||||
"atom/browser/bridge_task_runner.h",
|
||||
"atom/browser/browser.cc",
|
||||
"atom/browser/browser.h",
|
||||
"atom/browser/browser_linux.cc",
|
||||
"atom/browser/browser_mac.mm",
|
||||
"atom/browser/browser_win.cc",
|
||||
"atom/browser/browser_observer.h",
|
||||
"atom/browser/child_web_contents_tracker.cc",
|
||||
"atom/browser/child_web_contents_tracker.h",
|
||||
"atom/browser/common_web_contents_delegate_mac.mm",
|
||||
"atom/browser/common_web_contents_delegate_views.cc",
|
||||
"atom/browser/common_web_contents_delegate.cc",
|
||||
"atom/browser/common_web_contents_delegate.h",
|
||||
"atom/browser/javascript_environment.cc",
|
||||
"atom/browser/javascript_environment.h",
|
||||
"atom/browser/lib/bluetooth_chooser.cc",
|
||||
"atom/browser/lib/bluetooth_chooser.h",
|
||||
"atom/browser/lib/power_observer.h",
|
||||
"atom/browser/lib/power_observer_linux.h",
|
||||
"atom/browser/lib/power_observer_linux.cc",
|
||||
"atom/browser/loader/layered_resource_handler.cc",
|
||||
"atom/browser/loader/layered_resource_handler.h",
|
||||
"atom/browser/login_handler.cc",
|
||||
"atom/browser/login_handler.h",
|
||||
"atom/browser/mac/atom_application.h",
|
||||
"atom/browser/mac/atom_application.mm",
|
||||
"atom/browser/mac/atom_application_delegate.h",
|
||||
"atom/browser/mac/atom_application_delegate.mm",
|
||||
"atom/browser/mac/dict_util.h",
|
||||
"atom/browser/mac/dict_util.mm",
|
||||
"atom/browser/mac/in_app_purchase.h",
|
||||
"atom/browser/mac/in_app_purchase.mm",
|
||||
"atom/browser/mac/in_app_purchase_observer.h",
|
||||
"atom/browser/mac/in_app_purchase_observer.mm",
|
||||
"atom/browser/mac/in_app_purchase_product.h",
|
||||
"atom/browser/mac/in_app_purchase_product.mm",
|
||||
"atom/browser/native_browser_view.cc",
|
||||
"atom/browser/native_browser_view.h",
|
||||
"atom/browser/native_browser_view_mac.h",
|
||||
"atom/browser/native_browser_view_mac.mm",
|
||||
"atom/browser/native_browser_view_views.h",
|
||||
"atom/browser/native_browser_view_views.cc",
|
||||
"atom/browser/native_window.cc",
|
||||
"atom/browser/native_window.h",
|
||||
"atom/browser/native_window_views_win.cc",
|
||||
"atom/browser/native_window_views.cc",
|
||||
"atom/browser/native_window_views.h",
|
||||
"atom/browser/native_window_mac.h",
|
||||
"atom/browser/native_window_mac.mm",
|
||||
"atom/browser/native_window_observer.h",
|
||||
"atom/browser/net/about_protocol_handler.cc",
|
||||
"atom/browser/net/about_protocol_handler.h",
|
||||
"atom/browser/net/asar/asar_protocol_handler.cc",
|
||||
"atom/browser/net/asar/asar_protocol_handler.h",
|
||||
"atom/browser/net/asar/url_request_asar_job.cc",
|
||||
"atom/browser/net/asar/url_request_asar_job.h",
|
||||
"atom/browser/net/atom_cert_verifier.cc",
|
||||
"atom/browser/net/atom_cert_verifier.h",
|
||||
"atom/browser/net/atom_network_delegate.cc",
|
||||
"atom/browser/net/atom_network_delegate.h",
|
||||
"atom/browser/net/atom_url_request.cc",
|
||||
"atom/browser/net/atom_url_request.h",
|
||||
"atom/browser/net/atom_url_request_job_factory.cc",
|
||||
"atom/browser/net/atom_url_request_job_factory.h",
|
||||
"atom/browser/net/http_protocol_handler.cc",
|
||||
"atom/browser/net/http_protocol_handler.h",
|
||||
"atom/browser/net/js_asker.cc",
|
||||
"atom/browser/net/js_asker.h",
|
||||
"atom/browser/net/url_request_about_job.cc",
|
||||
"atom/browser/net/url_request_about_job.h",
|
||||
"atom/browser/net/url_request_async_asar_job.cc",
|
||||
"atom/browser/net/url_request_async_asar_job.h",
|
||||
"atom/browser/net/url_request_string_job.cc",
|
||||
"atom/browser/net/url_request_string_job.h",
|
||||
"atom/browser/net/url_request_buffer_job.cc",
|
||||
"atom/browser/net/url_request_buffer_job.h",
|
||||
"atom/browser/net/url_request_fetch_job.cc",
|
||||
"atom/browser/net/url_request_fetch_job.h",
|
||||
"atom/browser/net/url_request_stream_job.cc",
|
||||
"atom/browser/net/url_request_stream_job.h",
|
||||
"atom/browser/node_debugger.cc",
|
||||
"atom/browser/node_debugger.h",
|
||||
"atom/browser/relauncher_linux.cc",
|
||||
"atom/browser/relauncher_mac.cc",
|
||||
"atom/browser/relauncher_win.cc",
|
||||
"atom/browser/relauncher.cc",
|
||||
"atom/browser/relauncher.h",
|
||||
"atom/browser/render_process_preferences.cc",
|
||||
"atom/browser/render_process_preferences.h",
|
||||
"atom/browser/request_context_delegate.cc",
|
||||
"atom/browser/request_context_delegate.h",
|
||||
"atom/browser/session_preferences.cc",
|
||||
"atom/browser/session_preferences.h",
|
||||
"atom/browser/special_storage_policy.cc",
|
||||
"atom/browser/special_storage_policy.h",
|
||||
"atom/browser/ui/accelerator_util.cc",
|
||||
"atom/browser/ui/accelerator_util.h",
|
||||
"atom/browser/ui/accelerator_util_mac.mm",
|
||||
"atom/browser/ui/accelerator_util_views.cc",
|
||||
"atom/browser/ui/atom_menu_model.cc",
|
||||
"atom/browser/ui/atom_menu_model.h",
|
||||
"atom/browser/ui/autofill_popup.cc",
|
||||
"atom/browser/ui/autofill_popup.h",
|
||||
"atom/browser/ui/certificate_trust.h",
|
||||
"atom/browser/ui/certificate_trust_mac.mm",
|
||||
"atom/browser/ui/certificate_trust_win.cc",
|
||||
"atom/browser/ui/cocoa/atom_bundle_mover.h",
|
||||
"atom/browser/ui/cocoa/atom_bundle_mover.mm",
|
||||
"atom/browser/ui/cocoa/atom_menu_controller.h",
|
||||
"atom/browser/ui/cocoa/atom_menu_controller.mm",
|
||||
"atom/browser/ui/cocoa/atom_native_widget_mac.h",
|
||||
"atom/browser/ui/cocoa/atom_native_widget_mac.mm",
|
||||
"atom/browser/ui/cocoa/atom_ns_window.h",
|
||||
"atom/browser/ui/cocoa/atom_ns_window.mm",
|
||||
"atom/browser/ui/cocoa/atom_ns_window_delegate.h",
|
||||
"atom/browser/ui/cocoa/atom_ns_window_delegate.mm",
|
||||
"atom/browser/ui/cocoa/atom_preview_item.h",
|
||||
"atom/browser/ui/cocoa/atom_preview_item.mm",
|
||||
"atom/browser/ui/cocoa/atom_touch_bar.h",
|
||||
"atom/browser/ui/cocoa/atom_touch_bar.mm",
|
||||
"atom/browser/ui/cocoa/delayed_native_view_host.cc",
|
||||
"atom/browser/ui/cocoa/delayed_native_view_host.h",
|
||||
"atom/browser/ui/cocoa/views_delegate_mac.h",
|
||||
"atom/browser/ui/cocoa/views_delegate_mac.mm",
|
||||
"atom/browser/ui/cocoa/root_view_mac.mm",
|
||||
"atom/browser/ui/cocoa/root_view_mac.h",
|
||||
"atom/browser/ui/cocoa/touch_bar_forward_declarations.h",
|
||||
"atom/browser/ui/drag_util_mac.mm",
|
||||
"atom/browser/ui/drag_util_views.cc",
|
||||
"atom/browser/ui/drag_util.h",
|
||||
"atom/browser/ui/file_dialog.h",
|
||||
"atom/browser/ui/file_dialog_gtk.cc",
|
||||
"atom/browser/ui/file_dialog_mac.mm",
|
||||
"atom/browser/ui/file_dialog_win.cc",
|
||||
"atom/browser/ui/message_box.h",
|
||||
"atom/browser/ui/message_box_gtk.cc",
|
||||
"atom/browser/ui/message_box_mac.mm",
|
||||
"atom/browser/ui/message_box_win.cc",
|
||||
"atom/browser/ui/cocoa/NSColor+Hex.mm",
|
||||
"atom/browser/ui/cocoa/NSColor+Hex.h",
|
||||
"atom/browser/ui/cocoa/NSString+ANSI.mm",
|
||||
"atom/browser/ui/cocoa/NSString+ANSI.h",
|
||||
"atom/browser/ui/tray_icon.cc",
|
||||
"atom/browser/ui/tray_icon.h",
|
||||
"atom/browser/ui/tray_icon_gtk.cc",
|
||||
"atom/browser/ui/tray_icon_gtk.h",
|
||||
"atom/browser/ui/tray_icon_cocoa.h",
|
||||
"atom/browser/ui/tray_icon_cocoa.mm",
|
||||
"atom/browser/ui/tray_icon_observer.h",
|
||||
"atom/browser/ui/tray_icon_win.cc",
|
||||
"atom/browser/ui/views/autofill_popup_view.cc",
|
||||
"atom/browser/ui/views/autofill_popup_view.h",
|
||||
"atom/browser/ui/views/frameless_view.cc",
|
||||
"atom/browser/ui/views/frameless_view.h",
|
||||
"atom/browser/ui/views/global_menu_bar_x11.cc",
|
||||
"atom/browser/ui/views/global_menu_bar_x11.h",
|
||||
"atom/browser/ui/views/menu_bar.cc",
|
||||
"atom/browser/ui/views/menu_bar.h",
|
||||
"atom/browser/ui/views/menu_delegate.cc",
|
||||
"atom/browser/ui/views/menu_delegate.h",
|
||||
"atom/browser/ui/views/menu_model_adapter.cc",
|
||||
"atom/browser/ui/views/menu_model_adapter.h",
|
||||
"atom/browser/ui/views/native_frame_view.cc",
|
||||
"atom/browser/ui/views/native_frame_view.h",
|
||||
"atom/browser/ui/views/root_view.cc",
|
||||
"atom/browser/ui/views/root_view.h",
|
||||
"atom/browser/ui/views/submenu_button.cc",
|
||||
"atom/browser/ui/views/submenu_button.h",
|
||||
"atom/browser/ui/views/win_frame_view.cc",
|
||||
"atom/browser/ui/views/win_frame_view.h",
|
||||
"atom/browser/ui/win/atom_desktop_native_widget_aura.cc",
|
||||
"atom/browser/ui/win/atom_desktop_native_widget_aura.h",
|
||||
"atom/browser/ui/win/atom_desktop_window_tree_host_win.cc",
|
||||
"atom/browser/ui/win/atom_desktop_window_tree_host_win.h",
|
||||
"atom/browser/ui/win/jump_list.cc",
|
||||
"atom/browser/ui/win/jump_list.h",
|
||||
"atom/browser/ui/win/message_handler_delegate.cc",
|
||||
"atom/browser/ui/win/message_handler_delegate.h",
|
||||
"atom/browser/ui/win/notify_icon_host.cc",
|
||||
"atom/browser/ui/win/notify_icon_host.h",
|
||||
"atom/browser/ui/win/notify_icon.cc",
|
||||
"atom/browser/ui/win/notify_icon.h",
|
||||
"atom/browser/ui/win/taskbar_host.cc",
|
||||
"atom/browser/ui/win/taskbar_host.h",
|
||||
"atom/browser/ui/x/event_disabler.cc",
|
||||
"atom/browser/ui/x/event_disabler.h",
|
||||
"atom/browser/ui/x/window_state_watcher.cc",
|
||||
"atom/browser/ui/x/window_state_watcher.h",
|
||||
"atom/browser/ui/x/x_window_utils.cc",
|
||||
"atom/browser/ui/x/x_window_utils.h",
|
||||
"atom/browser/unresponsive_suppressor.cc",
|
||||
"atom/browser/unresponsive_suppressor.h",
|
||||
"atom/browser/web_contents_permission_helper.cc",
|
||||
"atom/browser/web_contents_permission_helper.h",
|
||||
"atom/browser/web_contents_preferences.cc",
|
||||
"atom/browser/web_contents_preferences.h",
|
||||
"atom/browser/web_contents_zoom_controller.cc",
|
||||
"atom/browser/web_contents_zoom_controller.h",
|
||||
"atom/browser/web_dialog_helper.cc",
|
||||
"atom/browser/web_dialog_helper.h",
|
||||
"atom/browser/web_view_guest_delegate.cc",
|
||||
"atom/browser/web_view_guest_delegate.h",
|
||||
"atom/browser/web_view_manager.cc",
|
||||
"atom/browser/web_view_manager.h",
|
||||
"atom/browser/window_list.cc",
|
||||
"atom/browser/window_list.h",
|
||||
"atom/browser/window_list_observer.h",
|
||||
"atom/common/api/api_messages.h",
|
||||
"atom/common/api/atom_api_asar.cc",
|
||||
"atom/common/api/atom_api_clipboard.cc",
|
||||
"atom/common/api/atom_api_clipboard.h",
|
||||
"atom/common/api/atom_api_clipboard_mac.mm",
|
||||
"atom/common/api/atom_api_crash_reporter.cc",
|
||||
"atom/common/api/atom_api_key_weak_map.h",
|
||||
"atom/common/api/atom_api_native_image.cc",
|
||||
"atom/common/api/atom_api_native_image.h",
|
||||
"atom/common/api/atom_api_native_image_mac.mm",
|
||||
"atom/common/api/atom_api_shell.cc",
|
||||
"atom/common/api/atom_api_v8_util.cc",
|
||||
"atom/common/api/atom_bindings.cc",
|
||||
"atom/common/api/atom_bindings.h",
|
||||
"atom/common/api/constructor.h",
|
||||
"atom/common/api/event_emitter_caller.cc",
|
||||
"atom/common/api/event_emitter_caller.h",
|
||||
"atom/common/api/features.cc",
|
||||
"atom/common/api/locker.cc",
|
||||
"atom/common/api/locker.h",
|
||||
"atom/common/api/object_life_monitor.cc",
|
||||
"atom/common/api/object_life_monitor.h",
|
||||
"atom/common/api/remote_callback_freer.cc",
|
||||
"atom/common/api/remote_callback_freer.h",
|
||||
"atom/common/api/remote_object_freer.cc",
|
||||
"atom/common/api/remote_object_freer.h",
|
||||
"atom/common/asar/archive.cc",
|
||||
"atom/common/asar/archive.h",
|
||||
"atom/common/asar/asar_util.cc",
|
||||
"atom/common/asar/asar_util.h",
|
||||
"atom/common/asar/scoped_temporary_file.cc",
|
||||
"atom/common/asar/scoped_temporary_file.h",
|
||||
"atom/common/atom_command_line.cc",
|
||||
"atom/common/atom_command_line.h",
|
||||
"atom/common/atom_constants.cc",
|
||||
"atom/common/atom_constants.h",
|
||||
"atom/common/color_util.cc",
|
||||
"atom/common/color_util.h",
|
||||
"atom/common/common_message_generator.cc",
|
||||
"atom/common/common_message_generator.h",
|
||||
"atom/common/crash_reporter/crash_reporter.cc",
|
||||
"atom/common/crash_reporter/crash_reporter.h",
|
||||
"atom/common/crash_reporter/crash_reporter_linux.cc",
|
||||
"atom/common/crash_reporter/crash_reporter_linux.h",
|
||||
"atom/common/crash_reporter/crash_reporter_mac.h",
|
||||
"atom/common/crash_reporter/crash_reporter_mac.mm",
|
||||
"atom/common/crash_reporter/crash_reporter_win.cc",
|
||||
"atom/common/crash_reporter/crash_reporter_win.h",
|
||||
"atom/common/crash_reporter/linux/crash_dump_handler.cc",
|
||||
"atom/common/crash_reporter/linux/crash_dump_handler.h",
|
||||
"atom/common/crash_reporter/win/crash_service.cc",
|
||||
"atom/common/crash_reporter/win/crash_service.h",
|
||||
"atom/common/crash_reporter/win/crash_service_main.cc",
|
||||
"atom/common/crash_reporter/win/crash_service_main.h",
|
||||
"atom/common/draggable_region.cc",
|
||||
"atom/common/draggable_region.h",
|
||||
"atom/common/google_api_key.h",
|
||||
"atom/common/key_weak_map.h",
|
||||
"atom/common/keyboard_util.cc",
|
||||
"atom/common/keyboard_util.h",
|
||||
"atom/common/mouse_util.cc",
|
||||
"atom/common/mouse_util.h",
|
||||
"atom/common/linux/application_info.cc",
|
||||
"atom/common/native_mate_converters/accelerator_converter.cc",
|
||||
"atom/common/native_mate_converters/accelerator_converter.h",
|
||||
"atom/common/native_mate_converters/blink_converter.cc",
|
||||
"atom/common/native_mate_converters/blink_converter.h",
|
||||
"atom/common/native_mate_converters/callback.cc",
|
||||
"atom/common/native_mate_converters/callback.h",
|
||||
"atom/common/native_mate_converters/content_converter.cc",
|
||||
"atom/common/native_mate_converters/content_converter.h",
|
||||
"atom/common/native_mate_converters/file_path_converter.h",
|
||||
"atom/common/native_mate_converters/gfx_converter.cc",
|
||||
"atom/common/native_mate_converters/gfx_converter.h",
|
||||
"atom/common/native_mate_converters/gurl_converter.h",
|
||||
"atom/common/native_mate_converters/image_converter.cc",
|
||||
"atom/common/native_mate_converters/image_converter.h",
|
||||
"atom/common/native_mate_converters/net_converter.cc",
|
||||
"atom/common/native_mate_converters/net_converter.h",
|
||||
"atom/common/native_mate_converters/network_converter.cc",
|
||||
"atom/common/native_mate_converters/network_converter.h",
|
||||
"atom/common/native_mate_converters/string16_converter.h",
|
||||
"atom/common/native_mate_converters/ui_base_types_converter.h",
|
||||
"atom/common/native_mate_converters/v8_value_converter.cc",
|
||||
"atom/common/native_mate_converters/v8_value_converter.h",
|
||||
"atom/common/native_mate_converters/value_converter.cc",
|
||||
"atom/common/native_mate_converters/value_converter.h",
|
||||
"atom/common/node_bindings.cc",
|
||||
"atom/common/node_bindings.h",
|
||||
"atom/common/node_bindings_linux.cc",
|
||||
"atom/common/node_bindings_linux.h",
|
||||
"atom/common/node_bindings_mac.cc",
|
||||
"atom/common/node_bindings_mac.h",
|
||||
"atom/common/node_bindings_win.cc",
|
||||
"atom/common/node_bindings_win.h",
|
||||
"atom/common/node_includes.h",
|
||||
"atom/common/options_switches.cc",
|
||||
"atom/common/options_switches.h",
|
||||
"atom/common/platform_util.h",
|
||||
"atom/common/platform_util_linux.cc",
|
||||
"atom/common/platform_util_mac.mm",
|
||||
"atom/common/platform_util_win.cc",
|
||||
"atom/common/promise_util.h",
|
||||
"atom/common/promise_util.cc",
|
||||
"atom/renderer/api/atom_api_renderer_ipc.h",
|
||||
"atom/renderer/api/atom_api_renderer_ipc.cc",
|
||||
"atom/renderer/api/atom_api_spell_check_client.cc",
|
||||
"atom/renderer/api/atom_api_spell_check_client.h",
|
||||
"atom/renderer/api/atom_api_web_frame.cc",
|
||||
"atom/renderer/api/atom_api_web_frame.h",
|
||||
"atom/renderer/atom_autofill_agent.cc",
|
||||
"atom/renderer/atom_autofill_agent.h",
|
||||
"atom/renderer/atom_render_frame_observer.cc",
|
||||
"atom/renderer/atom_render_frame_observer.h",
|
||||
"atom/renderer/atom_render_view_observer.cc",
|
||||
"atom/renderer/atom_render_view_observer.h",
|
||||
"atom/renderer/atom_renderer_client.cc",
|
||||
"atom/renderer/atom_renderer_client.h",
|
||||
"atom/renderer/content_settings_observer.cc",
|
||||
"atom/renderer/content_settings_observer.h",
|
||||
"atom/renderer/atom_sandboxed_renderer_client.cc",
|
||||
"atom/renderer/atom_sandboxed_renderer_client.h",
|
||||
"atom/renderer/guest_view_container.cc",
|
||||
"atom/renderer/guest_view_container.h",
|
||||
"atom/renderer/preferences_manager.cc",
|
||||
"atom/renderer/preferences_manager.h",
|
||||
"atom/renderer/renderer_client_base.cc",
|
||||
"atom/renderer/renderer_client_base.h",
|
||||
"atom/renderer/web_worker_observer.cc",
|
||||
"atom/renderer/web_worker_observer.h",
|
||||
"atom/utility/atom_content_utility_client.cc",
|
||||
"atom/utility/atom_content_utility_client.h",
|
||||
"chromium_src/chrome/browser/browser_process.cc",
|
||||
"chromium_src/chrome/browser/browser_process.h",
|
||||
"chromium_src/chrome/browser/chrome_process_finder_win.cc",
|
||||
"chromium_src/chrome/browser/chrome_process_finder_win.h",
|
||||
"chromium_src/chrome/browser/icon_loader_mac.mm",
|
||||
"chromium_src/chrome/browser/icon_loader_win.cc",
|
||||
"chromium_src/chrome/browser/icon_loader.cc",
|
||||
"chromium_src/chrome/browser/icon_loader.h",
|
||||
"chromium_src/chrome/browser/icon_manager.cc",
|
||||
"chromium_src/chrome/browser/icon_manager.h",
|
||||
"chromium_src/chrome/browser/chrome_notification_types.h",
|
||||
"chromium_src/chrome/browser/extensions/global_shortcut_listener.cc",
|
||||
"chromium_src/chrome/browser/extensions/global_shortcut_listener.h",
|
||||
"chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.mm",
|
||||
"chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.h",
|
||||
"chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.cc",
|
||||
"chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.h",
|
||||
"chromium_src/chrome/browser/extensions/global_shortcut_listener_win.cc",
|
||||
"chromium_src/chrome/browser/extensions/global_shortcut_listener_win.h",
|
||||
"chromium_src/chrome/browser/media/desktop_media_list.h",
|
||||
"chromium_src/chrome/browser/media/desktop_media_list_observer.h",
|
||||
"chromium_src/chrome/browser/media/native_desktop_media_list.cc",
|
||||
"chromium_src/chrome/browser/media/native_desktop_media_list.h",
|
||||
"chromium_src/chrome/browser/printing/print_job.cc",
|
||||
"chromium_src/chrome/browser/printing/print_job.h",
|
||||
"chromium_src/chrome/browser/printing/print_job_manager.cc",
|
||||
"chromium_src/chrome/browser/printing/print_job_manager.h",
|
||||
"chromium_src/chrome/browser/printing/print_job_worker.cc",
|
||||
"chromium_src/chrome/browser/printing/print_job_worker.h",
|
||||
"chromium_src/chrome/browser/printing/print_job_worker_owner.cc",
|
||||
"chromium_src/chrome/browser/printing/print_job_worker_owner.h",
|
||||
"chromium_src/chrome/browser/printing/print_view_manager_base.cc",
|
||||
"chromium_src/chrome/browser/printing/print_view_manager_base.h",
|
||||
"chromium_src/chrome/browser/printing/print_view_manager_basic.cc",
|
||||
"chromium_src/chrome/browser/printing/print_view_manager_basic.h",
|
||||
"chromium_src/chrome/browser/printing/print_view_manager_observer.h",
|
||||
"chromium_src/chrome/browser/printing/printer_query.cc",
|
||||
"chromium_src/chrome/browser/printing/printer_query.h",
|
||||
"chromium_src/chrome/browser/printing/printing_message_filter.cc",
|
||||
"chromium_src/chrome/browser/printing/printing_message_filter.h",
|
||||
"chromium_src/chrome/browser/printing/print_preview_message_handler.cc",
|
||||
"chromium_src/chrome/browser/printing/print_preview_message_handler.h",
|
||||
"chromium_src/chrome/browser/process_singleton_posix.cc",
|
||||
"chromium_src/chrome/browser/process_singleton_win.cc",
|
||||
"chromium_src/chrome/browser/process_singleton.h",
|
||||
"chromium_src/chrome/browser/speech/tts_controller.h",
|
||||
"chromium_src/chrome/browser/speech/tts_controller_impl.cc",
|
||||
"chromium_src/chrome/browser/speech/tts_controller_impl.h",
|
||||
"chromium_src/chrome/browser/speech/tts_linux.cc",
|
||||
"chromium_src/chrome/browser/speech/tts_mac.mm",
|
||||
"chromium_src/chrome/browser/speech/tts_message_filter.cc",
|
||||
"chromium_src/chrome/browser/speech/tts_message_filter.h",
|
||||
"chromium_src/chrome/browser/speech/tts_platform.cc",
|
||||
"chromium_src/chrome/browser/speech/tts_platform.h",
|
||||
"chromium_src/chrome/browser/speech/tts_win.cc",
|
||||
"chromium_src/chrome/browser/ssl/security_state_tab_helper.cc",
|
||||
"chromium_src/chrome/browser/ssl/security_state_tab_helper.h",
|
||||
"chromium_src/chrome/browser/ui/browser_dialogs.h",
|
||||
"chromium_src/chrome/browser/ui/cocoa/color_chooser_mac.mm",
|
||||
"chromium_src/chrome/browser/ui/views/color_chooser_aura.cc",
|
||||
"chromium_src/chrome/browser/ui/views/color_chooser_aura.h",
|
||||
"chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc",
|
||||
"chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h",
|
||||
"chromium_src/chrome/common/chrome_constants.cc",
|
||||
"chromium_src/chrome/common/chrome_constants.h",
|
||||
"chromium_src/chrome/common/chrome_paths.cc",
|
||||
"chromium_src/chrome/common/chrome_paths.h",
|
||||
"chromium_src/chrome/common/chrome_paths_internal.h",
|
||||
"chromium_src/chrome/common/chrome_paths_linux.cc",
|
||||
"chromium_src/chrome/common/chrome_paths_mac.mm",
|
||||
"chromium_src/chrome/common/chrome_paths_win.cc",
|
||||
"chromium_src/chrome/common/pref_names.cc",
|
||||
"chromium_src/chrome/common/pref_names.h",
|
||||
"chromium_src/chrome/common/print_messages.cc",
|
||||
"chromium_src/chrome/common/print_messages.h",
|
||||
"chromium_src/chrome/common/tts_messages.h",
|
||||
"chromium_src/chrome/common/tts_utterance_request.cc",
|
||||
"chromium_src/chrome/common/tts_utterance_request.h",
|
||||
"chromium_src/chrome/renderer/printing/print_web_view_helper.cc",
|
||||
"chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc",
|
||||
"chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm",
|
||||
"chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc",
|
||||
"chromium_src/chrome/renderer/printing/print_web_view_helper.h",
|
||||
"chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.cc",
|
||||
"chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.h",
|
||||
"chromium_src/chrome/renderer/tts_dispatcher.cc",
|
||||
"chromium_src/chrome/renderer/tts_dispatcher.h",
|
||||
"chromium_src/chrome/utility/utility_message_handler.h",
|
||||
"chromium_src/extensions/browser/app_window/size_constraints.cc",
|
||||
"chromium_src/extensions/browser/app_window/size_constraints.h",
|
||||
"chromium_src/extensions/common/url_pattern.cc",
|
||||
"chromium_src/extensions/common/url_pattern.h",
|
||||
"chromium_src/library_loaders/libspeechd_loader.cc",
|
||||
"chromium_src/library_loaders/libspeechd.h",
|
||||
]
|
||||
|
||||
lib_sources_linux = [
|
||||
"chromium_src/chrome/browser/icon_loader_auralinux.cc",
|
||||
]
|
||||
lib_sources_nss = [
|
||||
"chromium_src/chrome/browser/certificate_manager_model.cc",
|
||||
"chromium_src/chrome/browser/certificate_manager_model.h",
|
||||
]
|
||||
|
||||
lib_sources_win = [
|
||||
"chromium_src/chrome/browser/ui/views/color_chooser_dialog.cc",
|
||||
"chromium_src/chrome/browser/ui/views/color_chooser_dialog.h",
|
||||
"chromium_src/chrome/browser/ui/views/color_chooser_win.cc",
|
||||
"chromium_src/chrome/browser/printing/pdf_to_emf_converter.cc",
|
||||
"chromium_src/chrome/browser/printing/pdf_to_emf_converter.h",
|
||||
"chromium_src/chrome/utility/printing_handler_win.cc",
|
||||
"chromium_src/chrome/utility/printing_handler_win.h",
|
||||
]
|
||||
|
||||
app_sources = [
|
||||
"atom/app/atom_main.cc",
|
||||
"atom/app/atom_main.h",
|
||||
]
|
||||
|
||||
framework_sources = [
|
||||
"atom/app/atom_library_main.h",
|
||||
"atom/app/atom_library_main.mm",
|
||||
]
|
||||
|
||||
login_helper_sources = [
|
||||
"atom/app/atom_login_helper.mm",
|
||||
]
|
||||
}
|
798
filenames.gypi
798
filenames.gypi
|
@ -1,798 +0,0 @@
|
|||
{
|
||||
'variables': {
|
||||
'app_sources': [
|
||||
'atom/app/atom_main.cc',
|
||||
'atom/app/atom_main.h',
|
||||
],
|
||||
'bundle_sources': [
|
||||
'atom/browser/resources/mac/electron.icns',
|
||||
],
|
||||
'js_sources': [
|
||||
'lib/browser/api/app.js',
|
||||
'lib/browser/api/auto-updater.js',
|
||||
'lib/browser/api/auto-updater/auto-updater-native.js',
|
||||
'lib/browser/api/auto-updater/auto-updater-win.js',
|
||||
'lib/browser/api/auto-updater/squirrel-update-win.js',
|
||||
'lib/browser/api/browser-view.js',
|
||||
'lib/browser/api/browser-window.js',
|
||||
'lib/browser/api/content-tracing.js',
|
||||
'lib/browser/api/dialog.js',
|
||||
'lib/browser/api/exports/electron.js',
|
||||
'lib/browser/api/global-shortcut.js',
|
||||
'lib/browser/api/ipc-main.js',
|
||||
'lib/browser/api/in-app-purchase.js',
|
||||
'lib/browser/api/menu-item-roles.js',
|
||||
'lib/browser/api/menu-item.js',
|
||||
'lib/browser/api/menu-utils.js',
|
||||
'lib/browser/api/menu.js',
|
||||
'lib/browser/api/module-list.js',
|
||||
'lib/browser/api/navigation-controller.js',
|
||||
'lib/browser/api/net.js',
|
||||
'lib/browser/api/net-log.js',
|
||||
'lib/browser/api/notification.js',
|
||||
'lib/browser/api/power-monitor.js',
|
||||
'lib/browser/api/power-save-blocker.js',
|
||||
'lib/browser/api/protocol.js',
|
||||
'lib/browser/api/screen.js',
|
||||
'lib/browser/api/session.js',
|
||||
'lib/browser/api/system-preferences.js',
|
||||
'lib/browser/api/top-level-window.js',
|
||||
'lib/browser/api/touch-bar.js',
|
||||
'lib/browser/api/tray.js',
|
||||
'lib/browser/api/view.js',
|
||||
'lib/browser/api/web-contents.js',
|
||||
'lib/browser/api/web-contents-view.js',
|
||||
'lib/browser/chrome-extension.js',
|
||||
'lib/browser/guest-view-manager.js',
|
||||
'lib/browser/guest-window-manager.js',
|
||||
'lib/browser/init.js',
|
||||
'lib/browser/objects-registry.js',
|
||||
'lib/browser/rpc-server.js',
|
||||
'lib/common/api/clipboard.js',
|
||||
'lib/common/api/crash-reporter.js',
|
||||
'lib/common/api/deprecate.js',
|
||||
'lib/common/api/deprecations.js',
|
||||
'lib/common/api/is-promise.js',
|
||||
'lib/common/api/exports/electron.js',
|
||||
'lib/common/api/module-list.js',
|
||||
'lib/common/api/native-image.js',
|
||||
'lib/common/api/shell.js',
|
||||
'lib/common/atom-binding-setup.js',
|
||||
'lib/common/buffer-utils.js',
|
||||
'lib/common/init.js',
|
||||
'lib/common/parse-features-string.js',
|
||||
'lib/common/reset-search-paths.js',
|
||||
'lib/renderer/callbacks-registry.js',
|
||||
'lib/renderer/chrome-api.js',
|
||||
'lib/renderer/content-scripts-injector.js',
|
||||
'lib/renderer/init.js',
|
||||
'lib/renderer/inspector.js',
|
||||
'lib/renderer/override.js',
|
||||
'lib/renderer/security-warnings.js',
|
||||
'lib/renderer/web-frame-init.js',
|
||||
'lib/renderer/window-setup.js',
|
||||
'lib/renderer/web-view/guest-view-internal.js',
|
||||
'lib/renderer/web-view/web-view.js',
|
||||
'lib/renderer/web-view/web-view-attributes.js',
|
||||
'lib/renderer/web-view/web-view-constants.js',
|
||||
'lib/renderer/api/exports/electron.js',
|
||||
'lib/renderer/api/ipc-renderer.js',
|
||||
'lib/renderer/api/module-list.js',
|
||||
'lib/renderer/api/remote.js',
|
||||
'lib/renderer/api/screen.js',
|
||||
'lib/renderer/api/web-frame.js',
|
||||
'lib/renderer/extensions/event.js',
|
||||
'lib/renderer/extensions/i18n.js',
|
||||
'lib/renderer/extensions/storage.js',
|
||||
'lib/renderer/extensions/web-navigation.js',
|
||||
'lib/worker/init.js',
|
||||
],
|
||||
'js2c_sources': [
|
||||
'lib/common/asar.js',
|
||||
'lib/common/asar_init.js',
|
||||
],
|
||||
'default_app_sources': [
|
||||
'default_app/default_app.js',
|
||||
'default_app/icon.png',
|
||||
'default_app/index.html',
|
||||
'default_app/main.js',
|
||||
'default_app/package.json',
|
||||
'default_app/renderer.js',
|
||||
'default_app/styles.css',
|
||||
'node_modules/octicons/build/build.css',
|
||||
'node_modules/octicons/build/svg/gist.svg',
|
||||
'node_modules/octicons/build/svg/mark-github.svg',
|
||||
'node_modules/octicons/build/svg/gear.svg',
|
||||
'node_modules/octicons/build/svg/star.svg',
|
||||
'node_modules/octicons/build/svg/gift.svg',
|
||||
],
|
||||
'lib_sources': [
|
||||
'atom/app/atom_content_client.cc',
|
||||
'atom/app/atom_content_client.h',
|
||||
'atom/app/atom_main_delegate.cc',
|
||||
'atom/app/atom_main_delegate.h',
|
||||
'atom/app/atom_main_delegate_mac.mm',
|
||||
'atom/app/command_line_args.cc',
|
||||
'atom/app/command_line_args.h',
|
||||
'atom/app/uv_task_runner.cc',
|
||||
'atom/app/uv_task_runner.h',
|
||||
'atom/browser/api/atom_api_app.cc',
|
||||
'atom/browser/api/atom_api_app.h',
|
||||
'atom/browser/api/atom_api_auto_updater.cc',
|
||||
'atom/browser/api/atom_api_auto_updater.h',
|
||||
'atom/browser/api/atom_api_browser_view.cc',
|
||||
'atom/browser/api/atom_api_browser_view.h',
|
||||
'atom/browser/api/atom_api_content_tracing.cc',
|
||||
'atom/browser/api/atom_api_cookies.cc',
|
||||
'atom/browser/api/atom_api_cookies.h',
|
||||
'atom/browser/api/atom_api_debugger.cc',
|
||||
'atom/browser/api/atom_api_debugger.h',
|
||||
'atom/browser/api/atom_api_dialog.cc',
|
||||
'atom/browser/api/atom_api_download_item.cc',
|
||||
'atom/browser/api/atom_api_download_item.h',
|
||||
'atom/browser/api/atom_api_global_shortcut.cc',
|
||||
'atom/browser/api/atom_api_global_shortcut.h',
|
||||
'atom/browser/api/atom_api_in_app_purchase.cc',
|
||||
'atom/browser/api/atom_api_in_app_purchase.h',
|
||||
'atom/browser/api/atom_api_menu.cc',
|
||||
'atom/browser/api/atom_api_menu.h',
|
||||
'atom/browser/api/atom_api_menu_mac.h',
|
||||
'atom/browser/api/atom_api_menu_mac.mm',
|
||||
'atom/browser/api/atom_api_menu_views.cc',
|
||||
'atom/browser/api/atom_api_menu_views.h',
|
||||
'atom/browser/api/atom_api_net.cc',
|
||||
'atom/browser/api/atom_api_net.h',
|
||||
'atom/browser/api/atom_api_net_log.cc',
|
||||
'atom/browser/api/atom_api_net_log.h',
|
||||
'atom/browser/api/atom_api_notification.cc',
|
||||
'atom/browser/api/atom_api_notification.h',
|
||||
'atom/browser/api/atom_api_power_monitor_mac.mm',
|
||||
'atom/browser/api/atom_api_power_monitor_win.cc',
|
||||
'atom/browser/api/atom_api_power_monitor.cc',
|
||||
'atom/browser/api/atom_api_power_monitor.h',
|
||||
'atom/browser/api/atom_api_power_save_blocker.cc',
|
||||
'atom/browser/api/atom_api_power_save_blocker.h',
|
||||
'atom/browser/api/atom_api_protocol.cc',
|
||||
'atom/browser/api/atom_api_protocol.h',
|
||||
'atom/browser/api/atom_api_render_process_preferences.cc',
|
||||
'atom/browser/api/atom_api_render_process_preferences.h',
|
||||
'atom/browser/api/atom_api_screen.cc',
|
||||
'atom/browser/api/atom_api_screen.h',
|
||||
'atom/browser/api/atom_api_session.cc',
|
||||
'atom/browser/api/atom_api_session.h',
|
||||
'atom/browser/api/atom_api_system_preferences.cc',
|
||||
'atom/browser/api/atom_api_system_preferences.h',
|
||||
'atom/browser/api/atom_api_system_preferences_mac.mm',
|
||||
'atom/browser/api/atom_api_system_preferences_win.cc',
|
||||
'atom/browser/api/atom_api_top_level_window.cc',
|
||||
'atom/browser/api/atom_api_top_level_window.h',
|
||||
'atom/browser/api/atom_api_tray.cc',
|
||||
'atom/browser/api/atom_api_tray.h',
|
||||
'atom/browser/api/atom_api_url_request.cc',
|
||||
'atom/browser/api/atom_api_url_request.h',
|
||||
'atom/browser/api/atom_api_view.cc',
|
||||
'atom/browser/api/atom_api_view.h',
|
||||
'atom/browser/api/atom_api_web_contents.cc',
|
||||
'atom/browser/api/atom_api_web_contents.h',
|
||||
'atom/browser/api/atom_api_web_contents_mac.mm',
|
||||
'atom/browser/api/atom_api_web_contents_view.cc',
|
||||
'atom/browser/api/atom_api_web_contents_view.h',
|
||||
'atom/browser/api/atom_api_web_request.cc',
|
||||
'atom/browser/api/atom_api_web_request.h',
|
||||
'atom/browser/api/atom_api_web_view_manager.cc',
|
||||
'atom/browser/api/atom_api_browser_window.cc',
|
||||
'atom/browser/api/atom_api_browser_window.h',
|
||||
'atom/browser/api/atom_api_browser_window_mac.mm',
|
||||
'atom/browser/api/atom_api_browser_window_views.cc',
|
||||
'atom/browser/api/event.cc',
|
||||
'atom/browser/api/event.h',
|
||||
'atom/browser/api/event_emitter.cc',
|
||||
'atom/browser/api/event_emitter.h',
|
||||
'atom/browser/api/event_subscriber.cc',
|
||||
'atom/browser/api/event_subscriber.h',
|
||||
'atom/browser/api/trackable_object.cc',
|
||||
'atom/browser/api/trackable_object.h',
|
||||
'atom/browser/api/frame_subscriber.cc',
|
||||
'atom/browser/api/frame_subscriber.h',
|
||||
'atom/browser/api/save_page_handler.cc',
|
||||
'atom/browser/api/save_page_handler.h',
|
||||
'atom/browser/auto_updater.cc',
|
||||
'atom/browser/auto_updater.h',
|
||||
'atom/browser/auto_updater_mac.mm',
|
||||
'atom/browser/atom_blob_reader.cc',
|
||||
'atom/browser/atom_blob_reader.h',
|
||||
'atom/browser/atom_browser_client.cc',
|
||||
'atom/browser/atom_browser_client.h',
|
||||
'atom/browser/atom_browser_context.cc',
|
||||
'atom/browser/atom_browser_context.h',
|
||||
'atom/browser/atom_download_manager_delegate.cc',
|
||||
'atom/browser/atom_download_manager_delegate.h',
|
||||
'atom/browser/atom_browser_main_parts.cc',
|
||||
'atom/browser/atom_browser_main_parts.h',
|
||||
'atom/browser/atom_browser_main_parts_mac.mm',
|
||||
'atom/browser/atom_browser_main_parts_posix.cc',
|
||||
'atom/browser/atom_javascript_dialog_manager.cc',
|
||||
'atom/browser/atom_javascript_dialog_manager.h',
|
||||
'atom/browser/atom_permission_manager.cc',
|
||||
'atom/browser/atom_permission_manager.h',
|
||||
'atom/browser/atom_quota_permission_context.cc',
|
||||
'atom/browser/atom_quota_permission_context.h',
|
||||
'atom/browser/atom_resource_dispatcher_host_delegate.cc',
|
||||
'atom/browser/atom_resource_dispatcher_host_delegate.h',
|
||||
'atom/browser/atom_speech_recognition_manager_delegate.cc',
|
||||
'atom/browser/atom_speech_recognition_manager_delegate.h',
|
||||
'atom/browser/atom_web_ui_controller_factory.cc',
|
||||
'atom/browser/atom_web_ui_controller_factory.h',
|
||||
'atom/browser/bridge_task_runner.cc',
|
||||
'atom/browser/bridge_task_runner.h',
|
||||
'atom/browser/browser.cc',
|
||||
'atom/browser/browser.h',
|
||||
'atom/browser/browser_linux.cc',
|
||||
'atom/browser/browser_mac.mm',
|
||||
'atom/browser/browser_win.cc',
|
||||
'atom/browser/browser_observer.h',
|
||||
'atom/browser/child_web_contents_tracker.cc',
|
||||
'atom/browser/child_web_contents_tracker.h',
|
||||
'atom/browser/common_web_contents_delegate_mac.mm',
|
||||
'atom/browser/common_web_contents_delegate_views.cc',
|
||||
'atom/browser/common_web_contents_delegate.cc',
|
||||
'atom/browser/common_web_contents_delegate.h',
|
||||
'atom/browser/javascript_environment.cc',
|
||||
'atom/browser/javascript_environment.h',
|
||||
'atom/browser/lib/bluetooth_chooser.cc',
|
||||
'atom/browser/lib/bluetooth_chooser.h',
|
||||
'atom/browser/lib/power_observer.h',
|
||||
'atom/browser/lib/power_observer_linux.h',
|
||||
'atom/browser/lib/power_observer_linux.cc',
|
||||
'atom/browser/loader/layered_resource_handler.cc',
|
||||
'atom/browser/loader/layered_resource_handler.h',
|
||||
'atom/browser/login_handler.cc',
|
||||
'atom/browser/login_handler.h',
|
||||
'atom/browser/mac/atom_application.h',
|
||||
'atom/browser/mac/atom_application.mm',
|
||||
'atom/browser/mac/atom_application_delegate.h',
|
||||
'atom/browser/mac/atom_application_delegate.mm',
|
||||
'atom/browser/mac/dict_util.h',
|
||||
'atom/browser/mac/dict_util.mm',
|
||||
'atom/browser/mac/in_app_purchase.h',
|
||||
'atom/browser/mac/in_app_purchase.mm',
|
||||
'atom/browser/mac/in_app_purchase_observer.h',
|
||||
'atom/browser/mac/in_app_purchase_observer.mm',
|
||||
'atom/browser/mac/in_app_purchase_product.h',
|
||||
'atom/browser/mac/in_app_purchase_product.mm',
|
||||
'atom/browser/native_browser_view.cc',
|
||||
'atom/browser/native_browser_view.h',
|
||||
'atom/browser/native_browser_view_mac.h',
|
||||
'atom/browser/native_browser_view_mac.mm',
|
||||
'atom/browser/native_browser_view_views.h',
|
||||
'atom/browser/native_browser_view_views.cc',
|
||||
'atom/browser/native_window.cc',
|
||||
'atom/browser/native_window.h',
|
||||
'atom/browser/native_window_views_win.cc',
|
||||
'atom/browser/native_window_views.cc',
|
||||
'atom/browser/native_window_views.h',
|
||||
'atom/browser/native_window_mac.h',
|
||||
'atom/browser/native_window_mac.mm',
|
||||
'atom/browser/native_window_observer.h',
|
||||
'atom/browser/net/about_protocol_handler.cc',
|
||||
'atom/browser/net/about_protocol_handler.h',
|
||||
'atom/browser/net/asar/asar_protocol_handler.cc',
|
||||
'atom/browser/net/asar/asar_protocol_handler.h',
|
||||
'atom/browser/net/asar/url_request_asar_job.cc',
|
||||
'atom/browser/net/asar/url_request_asar_job.h',
|
||||
'atom/browser/net/atom_cert_verifier.cc',
|
||||
'atom/browser/net/atom_cert_verifier.h',
|
||||
'atom/browser/net/atom_network_delegate.cc',
|
||||
'atom/browser/net/atom_network_delegate.h',
|
||||
'atom/browser/net/atom_url_request.cc',
|
||||
'atom/browser/net/atom_url_request.h',
|
||||
'atom/browser/net/atom_url_request_job_factory.cc',
|
||||
'atom/browser/net/atom_url_request_job_factory.h',
|
||||
'atom/browser/net/http_protocol_handler.cc',
|
||||
'atom/browser/net/http_protocol_handler.h',
|
||||
'atom/browser/net/js_asker.cc',
|
||||
'atom/browser/net/js_asker.h',
|
||||
'atom/browser/net/url_request_about_job.cc',
|
||||
'atom/browser/net/url_request_about_job.h',
|
||||
'atom/browser/net/url_request_async_asar_job.cc',
|
||||
'atom/browser/net/url_request_async_asar_job.h',
|
||||
'atom/browser/net/url_request_string_job.cc',
|
||||
'atom/browser/net/url_request_string_job.h',
|
||||
'atom/browser/net/url_request_buffer_job.cc',
|
||||
'atom/browser/net/url_request_buffer_job.h',
|
||||
'atom/browser/net/url_request_fetch_job.cc',
|
||||
'atom/browser/net/url_request_fetch_job.h',
|
||||
'atom/browser/net/url_request_stream_job.cc',
|
||||
'atom/browser/net/url_request_stream_job.h',
|
||||
'atom/browser/node_debugger.cc',
|
||||
'atom/browser/node_debugger.h',
|
||||
'atom/browser/relauncher_linux.cc',
|
||||
'atom/browser/relauncher_mac.cc',
|
||||
'atom/browser/relauncher_win.cc',
|
||||
'atom/browser/relauncher.cc',
|
||||
'atom/browser/relauncher.h',
|
||||
'atom/browser/render_process_preferences.cc',
|
||||
'atom/browser/render_process_preferences.h',
|
||||
'atom/browser/request_context_delegate.cc',
|
||||
'atom/browser/request_context_delegate.h',
|
||||
'atom/browser/session_preferences.cc',
|
||||
'atom/browser/session_preferences.h',
|
||||
'atom/browser/special_storage_policy.cc',
|
||||
'atom/browser/special_storage_policy.h',
|
||||
'atom/browser/ui/accelerator_util.cc',
|
||||
'atom/browser/ui/accelerator_util.h',
|
||||
'atom/browser/ui/accelerator_util_mac.mm',
|
||||
'atom/browser/ui/accelerator_util_views.cc',
|
||||
'atom/browser/ui/atom_menu_model.cc',
|
||||
'atom/browser/ui/atom_menu_model.h',
|
||||
'atom/browser/ui/autofill_popup.cc',
|
||||
'atom/browser/ui/autofill_popup.h',
|
||||
'atom/browser/ui/certificate_trust.h',
|
||||
'atom/browser/ui/certificate_trust_mac.mm',
|
||||
'atom/browser/ui/certificate_trust_win.cc',
|
||||
'atom/browser/ui/cocoa/atom_bundle_mover.h',
|
||||
'atom/browser/ui/cocoa/atom_bundle_mover.mm',
|
||||
'atom/browser/ui/cocoa/atom_menu_controller.h',
|
||||
'atom/browser/ui/cocoa/atom_menu_controller.mm',
|
||||
'atom/browser/ui/cocoa/atom_native_widget_mac.h',
|
||||
'atom/browser/ui/cocoa/atom_native_widget_mac.mm',
|
||||
'atom/browser/ui/cocoa/atom_ns_window.h',
|
||||
'atom/browser/ui/cocoa/atom_ns_window.mm',
|
||||
'atom/browser/ui/cocoa/atom_ns_window_delegate.h',
|
||||
'atom/browser/ui/cocoa/atom_ns_window_delegate.mm',
|
||||
'atom/browser/ui/cocoa/atom_preview_item.h',
|
||||
'atom/browser/ui/cocoa/atom_preview_item.mm',
|
||||
'atom/browser/ui/cocoa/atom_touch_bar.h',
|
||||
'atom/browser/ui/cocoa/atom_touch_bar.mm',
|
||||
'atom/browser/ui/cocoa/delayed_native_view_host.cc',
|
||||
'atom/browser/ui/cocoa/delayed_native_view_host.h',
|
||||
'atom/browser/ui/cocoa/views_delegate_mac.h',
|
||||
'atom/browser/ui/cocoa/views_delegate_mac.mm',
|
||||
'atom/browser/ui/cocoa/root_view_mac.mm',
|
||||
'atom/browser/ui/cocoa/root_view_mac.h',
|
||||
'atom/browser/ui/cocoa/touch_bar_forward_declarations.h',
|
||||
'atom/browser/ui/drag_util_mac.mm',
|
||||
'atom/browser/ui/drag_util_views.cc',
|
||||
'atom/browser/ui/drag_util.h',
|
||||
'atom/browser/ui/file_dialog.h',
|
||||
'atom/browser/ui/file_dialog_gtk.cc',
|
||||
'atom/browser/ui/file_dialog_mac.mm',
|
||||
'atom/browser/ui/file_dialog_win.cc',
|
||||
'atom/browser/ui/message_box.h',
|
||||
'atom/browser/ui/message_box_gtk.cc',
|
||||
'atom/browser/ui/message_box_mac.mm',
|
||||
'atom/browser/ui/message_box_win.cc',
|
||||
'atom/browser/ui/cocoa/NSColor+Hex.mm',
|
||||
'atom/browser/ui/cocoa/NSColor+Hex.h',
|
||||
'atom/browser/ui/cocoa/NSString+ANSI.mm',
|
||||
'atom/browser/ui/cocoa/NSString+ANSI.h',
|
||||
'atom/browser/ui/tray_icon.cc',
|
||||
'atom/browser/ui/tray_icon.h',
|
||||
'atom/browser/ui/tray_icon_gtk.cc',
|
||||
'atom/browser/ui/tray_icon_gtk.h',
|
||||
'atom/browser/ui/tray_icon_cocoa.h',
|
||||
'atom/browser/ui/tray_icon_cocoa.mm',
|
||||
'atom/browser/ui/tray_icon_observer.h',
|
||||
'atom/browser/ui/tray_icon_win.cc',
|
||||
'atom/browser/ui/views/autofill_popup_view.cc',
|
||||
'atom/browser/ui/views/autofill_popup_view.h',
|
||||
'atom/browser/ui/views/frameless_view.cc',
|
||||
'atom/browser/ui/views/frameless_view.h',
|
||||
'atom/browser/ui/views/global_menu_bar_x11.cc',
|
||||
'atom/browser/ui/views/global_menu_bar_x11.h',
|
||||
'atom/browser/ui/views/menu_bar.cc',
|
||||
'atom/browser/ui/views/menu_bar.h',
|
||||
'atom/browser/ui/views/menu_delegate.cc',
|
||||
'atom/browser/ui/views/menu_delegate.h',
|
||||
'atom/browser/ui/views/menu_model_adapter.cc',
|
||||
'atom/browser/ui/views/menu_model_adapter.h',
|
||||
'atom/browser/ui/views/native_frame_view.cc',
|
||||
'atom/browser/ui/views/native_frame_view.h',
|
||||
'atom/browser/ui/views/root_view.cc',
|
||||
'atom/browser/ui/views/root_view.h',
|
||||
'atom/browser/ui/views/submenu_button.cc',
|
||||
'atom/browser/ui/views/submenu_button.h',
|
||||
'atom/browser/ui/views/win_frame_view.cc',
|
||||
'atom/browser/ui/views/win_frame_view.h',
|
||||
'atom/browser/ui/win/atom_desktop_native_widget_aura.cc',
|
||||
'atom/browser/ui/win/atom_desktop_native_widget_aura.h',
|
||||
'atom/browser/ui/win/atom_desktop_window_tree_host_win.cc',
|
||||
'atom/browser/ui/win/atom_desktop_window_tree_host_win.h',
|
||||
'atom/browser/ui/win/jump_list.cc',
|
||||
'atom/browser/ui/win/jump_list.h',
|
||||
'atom/browser/ui/win/message_handler_delegate.cc',
|
||||
'atom/browser/ui/win/message_handler_delegate.h',
|
||||
'atom/browser/ui/win/notify_icon_host.cc',
|
||||
'atom/browser/ui/win/notify_icon_host.h',
|
||||
'atom/browser/ui/win/notify_icon.cc',
|
||||
'atom/browser/ui/win/notify_icon.h',
|
||||
'atom/browser/ui/win/taskbar_host.cc',
|
||||
'atom/browser/ui/win/taskbar_host.h',
|
||||
'atom/browser/ui/x/event_disabler.cc',
|
||||
'atom/browser/ui/x/event_disabler.h',
|
||||
'atom/browser/ui/x/window_state_watcher.cc',
|
||||
'atom/browser/ui/x/window_state_watcher.h',
|
||||
'atom/browser/ui/x/x_window_utils.cc',
|
||||
'atom/browser/ui/x/x_window_utils.h',
|
||||
'atom/browser/unresponsive_suppressor.cc',
|
||||
'atom/browser/unresponsive_suppressor.h',
|
||||
'atom/browser/web_contents_permission_helper.cc',
|
||||
'atom/browser/web_contents_permission_helper.h',
|
||||
'atom/browser/web_contents_preferences.cc',
|
||||
'atom/browser/web_contents_preferences.h',
|
||||
'atom/browser/web_contents_zoom_controller.cc',
|
||||
'atom/browser/web_contents_zoom_controller.h',
|
||||
'atom/browser/web_dialog_helper.cc',
|
||||
'atom/browser/web_dialog_helper.h',
|
||||
'atom/browser/web_view_guest_delegate.cc',
|
||||
'atom/browser/web_view_guest_delegate.h',
|
||||
'atom/browser/web_view_manager.cc',
|
||||
'atom/browser/web_view_manager.h',
|
||||
'atom/browser/window_list.cc',
|
||||
'atom/browser/window_list.h',
|
||||
'atom/browser/window_list_observer.h',
|
||||
'atom/common/api/api_messages.h',
|
||||
'atom/common/api/atom_api_asar.cc',
|
||||
'atom/common/api/atom_api_clipboard.cc',
|
||||
'atom/common/api/atom_api_clipboard.h',
|
||||
'atom/common/api/atom_api_clipboard_mac.mm',
|
||||
'atom/common/api/atom_api_crash_reporter.cc',
|
||||
'atom/common/api/atom_api_key_weak_map.h',
|
||||
'atom/common/api/atom_api_native_image.cc',
|
||||
'atom/common/api/atom_api_native_image.h',
|
||||
'atom/common/api/atom_api_native_image_mac.mm',
|
||||
'atom/common/api/atom_api_shell.cc',
|
||||
'atom/common/api/atom_api_v8_util.cc',
|
||||
'atom/common/api/atom_bindings.cc',
|
||||
'atom/common/api/atom_bindings.h',
|
||||
'atom/common/api/constructor.h',
|
||||
'atom/common/api/event_emitter_caller.cc',
|
||||
'atom/common/api/event_emitter_caller.h',
|
||||
'atom/common/api/features.cc',
|
||||
'atom/common/api/locker.cc',
|
||||
'atom/common/api/locker.h',
|
||||
'atom/common/api/object_life_monitor.cc',
|
||||
'atom/common/api/object_life_monitor.h',
|
||||
'atom/common/api/remote_callback_freer.cc',
|
||||
'atom/common/api/remote_callback_freer.h',
|
||||
'atom/common/api/remote_object_freer.cc',
|
||||
'atom/common/api/remote_object_freer.h',
|
||||
'atom/common/asar/archive.cc',
|
||||
'atom/common/asar/archive.h',
|
||||
'atom/common/asar/asar_util.cc',
|
||||
'atom/common/asar/asar_util.h',
|
||||
'atom/common/asar/scoped_temporary_file.cc',
|
||||
'atom/common/asar/scoped_temporary_file.h',
|
||||
'atom/common/atom_command_line.cc',
|
||||
'atom/common/atom_command_line.h',
|
||||
'atom/common/atom_constants.cc',
|
||||
'atom/common/atom_constants.h',
|
||||
'atom/common/color_util.cc',
|
||||
'atom/common/color_util.h',
|
||||
'atom/common/common_message_generator.cc',
|
||||
'atom/common/common_message_generator.h',
|
||||
'atom/common/crash_reporter/crash_reporter.cc',
|
||||
'atom/common/crash_reporter/crash_reporter.h',
|
||||
'atom/common/crash_reporter/crash_reporter_linux.cc',
|
||||
'atom/common/crash_reporter/crash_reporter_linux.h',
|
||||
'atom/common/crash_reporter/crash_reporter_mac.h',
|
||||
'atom/common/crash_reporter/crash_reporter_mac.mm',
|
||||
'atom/common/crash_reporter/crash_reporter_win.cc',
|
||||
'atom/common/crash_reporter/crash_reporter_win.h',
|
||||
'atom/common/crash_reporter/linux/crash_dump_handler.cc',
|
||||
'atom/common/crash_reporter/linux/crash_dump_handler.h',
|
||||
'atom/common/crash_reporter/win/crash_service.cc',
|
||||
'atom/common/crash_reporter/win/crash_service.h',
|
||||
'atom/common/crash_reporter/win/crash_service_main.cc',
|
||||
'atom/common/crash_reporter/win/crash_service_main.h',
|
||||
'atom/common/draggable_region.cc',
|
||||
'atom/common/draggable_region.h',
|
||||
'atom/common/google_api_key.h',
|
||||
'atom/common/key_weak_map.h',
|
||||
'atom/common/keyboard_util.cc',
|
||||
'atom/common/keyboard_util.h',
|
||||
'atom/common/mouse_util.cc',
|
||||
'atom/common/mouse_util.h',
|
||||
'atom/common/linux/application_info.cc',
|
||||
'atom/common/native_mate_converters/accelerator_converter.cc',
|
||||
'atom/common/native_mate_converters/accelerator_converter.h',
|
||||
'atom/common/native_mate_converters/blink_converter.cc',
|
||||
'atom/common/native_mate_converters/blink_converter.h',
|
||||
'atom/common/native_mate_converters/callback.cc',
|
||||
'atom/common/native_mate_converters/callback.h',
|
||||
'atom/common/native_mate_converters/content_converter.cc',
|
||||
'atom/common/native_mate_converters/content_converter.h',
|
||||
'atom/common/native_mate_converters/file_path_converter.h',
|
||||
'atom/common/native_mate_converters/gfx_converter.cc',
|
||||
'atom/common/native_mate_converters/gfx_converter.h',
|
||||
'atom/common/native_mate_converters/gurl_converter.h',
|
||||
'atom/common/native_mate_converters/image_converter.cc',
|
||||
'atom/common/native_mate_converters/image_converter.h',
|
||||
'atom/common/native_mate_converters/net_converter.cc',
|
||||
'atom/common/native_mate_converters/net_converter.h',
|
||||
'atom/common/native_mate_converters/network_converter.cc',
|
||||
'atom/common/native_mate_converters/network_converter.h',
|
||||
'atom/common/native_mate_converters/string16_converter.h',
|
||||
'atom/common/native_mate_converters/ui_base_types_converter.h',
|
||||
'atom/common/native_mate_converters/v8_value_converter.cc',
|
||||
'atom/common/native_mate_converters/v8_value_converter.h',
|
||||
'atom/common/native_mate_converters/value_converter.cc',
|
||||
'atom/common/native_mate_converters/value_converter.h',
|
||||
'atom/common/node_bindings.cc',
|
||||
'atom/common/node_bindings.h',
|
||||
'atom/common/node_bindings_linux.cc',
|
||||
'atom/common/node_bindings_linux.h',
|
||||
'atom/common/node_bindings_mac.cc',
|
||||
'atom/common/node_bindings_mac.h',
|
||||
'atom/common/node_bindings_win.cc',
|
||||
'atom/common/node_bindings_win.h',
|
||||
'atom/common/node_includes.h',
|
||||
'atom/common/options_switches.cc',
|
||||
'atom/common/options_switches.h',
|
||||
'atom/common/platform_util.h',
|
||||
'atom/common/platform_util_linux.cc',
|
||||
'atom/common/platform_util_mac.mm',
|
||||
'atom/common/platform_util_win.cc',
|
||||
'atom/common/promise_util.h',
|
||||
'atom/common/promise_util.cc',
|
||||
'atom/renderer/api/atom_api_renderer_ipc.h',
|
||||
'atom/renderer/api/atom_api_renderer_ipc.cc',
|
||||
'atom/renderer/api/atom_api_spell_check_client.cc',
|
||||
'atom/renderer/api/atom_api_spell_check_client.h',
|
||||
'atom/renderer/api/atom_api_web_frame.cc',
|
||||
'atom/renderer/api/atom_api_web_frame.h',
|
||||
'atom/renderer/atom_autofill_agent.cc',
|
||||
'atom/renderer/atom_autofill_agent.h',
|
||||
'atom/renderer/atom_render_frame_observer.cc',
|
||||
'atom/renderer/atom_render_frame_observer.h',
|
||||
'atom/renderer/atom_render_view_observer.cc',
|
||||
'atom/renderer/atom_render_view_observer.h',
|
||||
'atom/renderer/atom_renderer_client.cc',
|
||||
'atom/renderer/atom_renderer_client.h',
|
||||
'atom/renderer/content_settings_observer.cc',
|
||||
'atom/renderer/content_settings_observer.h',
|
||||
'atom/renderer/atom_sandboxed_renderer_client.cc',
|
||||
'atom/renderer/atom_sandboxed_renderer_client.h',
|
||||
'atom/renderer/guest_view_container.cc',
|
||||
'atom/renderer/guest_view_container.h',
|
||||
'atom/renderer/preferences_manager.cc',
|
||||
'atom/renderer/preferences_manager.h',
|
||||
'atom/renderer/renderer_client_base.cc',
|
||||
'atom/renderer/renderer_client_base.h',
|
||||
'atom/renderer/web_worker_observer.cc',
|
||||
'atom/renderer/web_worker_observer.h',
|
||||
'atom/utility/atom_content_utility_client.cc',
|
||||
'atom/utility/atom_content_utility_client.h',
|
||||
'chromium_src/chrome/browser/browser_process.cc',
|
||||
'chromium_src/chrome/browser/browser_process.h',
|
||||
'chromium_src/chrome/browser/chrome_process_finder_win.cc',
|
||||
'chromium_src/chrome/browser/chrome_process_finder_win.h',
|
||||
'chromium_src/chrome/browser/icon_loader_mac.mm',
|
||||
'chromium_src/chrome/browser/icon_loader_win.cc',
|
||||
'chromium_src/chrome/browser/icon_loader.cc',
|
||||
'chromium_src/chrome/browser/icon_loader.h',
|
||||
'chromium_src/chrome/browser/icon_manager.cc',
|
||||
'chromium_src/chrome/browser/icon_manager.h',
|
||||
'chromium_src/chrome/browser/chrome_notification_types.h',
|
||||
'chromium_src/chrome/browser/extensions/global_shortcut_listener.cc',
|
||||
'chromium_src/chrome/browser/extensions/global_shortcut_listener.h',
|
||||
'chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.mm',
|
||||
'chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.h',
|
||||
'chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.cc',
|
||||
'chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.h',
|
||||
'chromium_src/chrome/browser/extensions/global_shortcut_listener_win.cc',
|
||||
'chromium_src/chrome/browser/extensions/global_shortcut_listener_win.h',
|
||||
'chromium_src/chrome/browser/media/desktop_media_list.h',
|
||||
'chromium_src/chrome/browser/media/desktop_media_list_observer.h',
|
||||
'chromium_src/chrome/browser/media/native_desktop_media_list.cc',
|
||||
'chromium_src/chrome/browser/media/native_desktop_media_list.h',
|
||||
'chromium_src/chrome/browser/printing/print_job.cc',
|
||||
'chromium_src/chrome/browser/printing/print_job.h',
|
||||
'chromium_src/chrome/browser/printing/print_job_manager.cc',
|
||||
'chromium_src/chrome/browser/printing/print_job_manager.h',
|
||||
'chromium_src/chrome/browser/printing/print_job_worker.cc',
|
||||
'chromium_src/chrome/browser/printing/print_job_worker.h',
|
||||
'chromium_src/chrome/browser/printing/print_job_worker_owner.cc',
|
||||
'chromium_src/chrome/browser/printing/print_job_worker_owner.h',
|
||||
'chromium_src/chrome/browser/printing/print_view_manager_base.cc',
|
||||
'chromium_src/chrome/browser/printing/print_view_manager_base.h',
|
||||
'chromium_src/chrome/browser/printing/print_view_manager_basic.cc',
|
||||
'chromium_src/chrome/browser/printing/print_view_manager_basic.h',
|
||||
'chromium_src/chrome/browser/printing/print_view_manager_observer.h',
|
||||
'chromium_src/chrome/browser/printing/printer_query.cc',
|
||||
'chromium_src/chrome/browser/printing/printer_query.h',
|
||||
'chromium_src/chrome/browser/printing/printing_message_filter.cc',
|
||||
'chromium_src/chrome/browser/printing/printing_message_filter.h',
|
||||
'chromium_src/chrome/browser/printing/print_preview_message_handler.cc',
|
||||
'chromium_src/chrome/browser/printing/print_preview_message_handler.h',
|
||||
'chromium_src/chrome/browser/process_singleton_posix.cc',
|
||||
'chromium_src/chrome/browser/process_singleton_win.cc',
|
||||
'chromium_src/chrome/browser/process_singleton.h',
|
||||
'chromium_src/chrome/browser/speech/tts_controller.h',
|
||||
'chromium_src/chrome/browser/speech/tts_controller_impl.cc',
|
||||
'chromium_src/chrome/browser/speech/tts_controller_impl.h',
|
||||
'chromium_src/chrome/browser/speech/tts_linux.cc',
|
||||
'chromium_src/chrome/browser/speech/tts_mac.mm',
|
||||
'chromium_src/chrome/browser/speech/tts_message_filter.cc',
|
||||
'chromium_src/chrome/browser/speech/tts_message_filter.h',
|
||||
'chromium_src/chrome/browser/speech/tts_platform.cc',
|
||||
'chromium_src/chrome/browser/speech/tts_platform.h',
|
||||
'chromium_src/chrome/browser/speech/tts_win.cc',
|
||||
'chromium_src/chrome/browser/ssl/security_state_tab_helper.cc',
|
||||
'chromium_src/chrome/browser/ssl/security_state_tab_helper.h',
|
||||
'chromium_src/chrome/browser/ui/browser_dialogs.h',
|
||||
'chromium_src/chrome/browser/ui/cocoa/color_chooser_mac.mm',
|
||||
'chromium_src/chrome/browser/ui/views/color_chooser_aura.cc',
|
||||
'chromium_src/chrome/browser/ui/views/color_chooser_aura.h',
|
||||
'chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc',
|
||||
'chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h',
|
||||
'chromium_src/chrome/common/chrome_constants.cc',
|
||||
'chromium_src/chrome/common/chrome_constants.h',
|
||||
'chromium_src/chrome/common/chrome_paths.cc',
|
||||
'chromium_src/chrome/common/chrome_paths.h',
|
||||
'chromium_src/chrome/common/chrome_paths_internal.h',
|
||||
'chromium_src/chrome/common/chrome_paths_linux.cc',
|
||||
'chromium_src/chrome/common/chrome_paths_mac.mm',
|
||||
'chromium_src/chrome/common/chrome_paths_win.cc',
|
||||
'chromium_src/chrome/common/pref_names.cc',
|
||||
'chromium_src/chrome/common/pref_names.h',
|
||||
'chromium_src/chrome/common/print_messages.cc',
|
||||
'chromium_src/chrome/common/print_messages.h',
|
||||
'chromium_src/chrome/common/tts_messages.h',
|
||||
'chromium_src/chrome/common/tts_utterance_request.cc',
|
||||
'chromium_src/chrome/common/tts_utterance_request.h',
|
||||
'chromium_src/chrome/renderer/printing/print_web_view_helper.cc',
|
||||
'chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc',
|
||||
'chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm',
|
||||
'chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc',
|
||||
'chromium_src/chrome/renderer/printing/print_web_view_helper.h',
|
||||
'chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.cc',
|
||||
'chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.h',
|
||||
'chromium_src/chrome/renderer/tts_dispatcher.cc',
|
||||
'chromium_src/chrome/renderer/tts_dispatcher.h',
|
||||
'chromium_src/chrome/utility/utility_message_handler.h',
|
||||
'chromium_src/extensions/browser/app_window/size_constraints.cc',
|
||||
'chromium_src/extensions/browser/app_window/size_constraints.h',
|
||||
'chromium_src/extensions/common/url_pattern.cc',
|
||||
'chromium_src/extensions/common/url_pattern.h',
|
||||
'chromium_src/library_loaders/libspeechd_loader.cc',
|
||||
'chromium_src/library_loaders/libspeechd.h',
|
||||
'<@(native_mate_files)',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/atom_natives.h',
|
||||
],
|
||||
'lib_sources_linux': [
|
||||
'chromium_src/chrome/browser/icon_loader_auralinux.cc',
|
||||
],
|
||||
'lib_sources_nss': [
|
||||
'chromium_src/chrome/browser/certificate_manager_model.cc',
|
||||
'chromium_src/chrome/browser/certificate_manager_model.h',
|
||||
],
|
||||
'lib_sources_win': [
|
||||
'chromium_src/chrome/browser/ui/views/color_chooser_dialog.cc',
|
||||
'chromium_src/chrome/browser/ui/views/color_chooser_dialog.h',
|
||||
'chromium_src/chrome/browser/ui/views/color_chooser_win.cc',
|
||||
'chromium_src/chrome/browser/printing/pdf_to_emf_converter.cc',
|
||||
'chromium_src/chrome/browser/printing/pdf_to_emf_converter.h',
|
||||
'chromium_src/chrome/utility/printing_handler_win.cc',
|
||||
'chromium_src/chrome/utility/printing_handler_win.h',
|
||||
],
|
||||
'lib_sources_location_provider': [
|
||||
'atom/browser/fake_location_provider.cc',
|
||||
'atom/browser/fake_location_provider.h',
|
||||
],
|
||||
'framework_sources': [
|
||||
'atom/app/atom_library_main.h',
|
||||
'atom/app/atom_library_main.mm',
|
||||
],
|
||||
'login_helper_sources': [
|
||||
'atom/app/atom_login_helper.mm',
|
||||
],
|
||||
'locales': [
|
||||
'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
|
||||
'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
|
||||
'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
|
||||
'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
|
||||
'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
|
||||
'vi', 'zh-CN', 'zh-TW',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
'app_sources': [
|
||||
'atom/browser/resources/win/resource.h',
|
||||
'atom/browser/resources/win/atom.ico',
|
||||
'atom/browser/resources/win/atom.rc',
|
||||
# Cursors.
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/aliasb.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/cell.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/col_resize.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/copy.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/hand_grab.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/hand_grabbing.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/none.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/pan_east.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/pan_middle.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/pan_north.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/pan_north_east.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/pan_north_west.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/pan_south.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/pan_south_east.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/pan_south_west.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/pan_west.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/row_resize.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/vertical_text.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/zoom_in.cur',
|
||||
'<(libchromiumcontent_src_dir)/ui/resources/cursors/zoom_out.cur',
|
||||
],
|
||||
}], # OS=="win"
|
||||
['enable_desktop_capturer==1', {
|
||||
'js_sources': [
|
||||
'lib/browser/desktop-capturer.js',
|
||||
'lib/renderer/api/desktop-capturer.js',
|
||||
],
|
||||
'lib_sources': [
|
||||
'atom/browser/api/atom_api_desktop_capturer.cc',
|
||||
'atom/browser/api/atom_api_desktop_capturer.h',
|
||||
],
|
||||
}], # enable_desktop_capturer
|
||||
['enable_osr==1', {
|
||||
'lib_sources': [
|
||||
'atom/browser/api/atom_api_web_contents_osr.cc',
|
||||
'atom/browser/osr/osr_web_contents_view_mac.mm',
|
||||
'atom/browser/osr/osr_web_contents_view.cc',
|
||||
'atom/browser/osr/osr_web_contents_view.h',
|
||||
'atom/browser/osr/osr_output_device.cc',
|
||||
'atom/browser/osr/osr_output_device.h',
|
||||
'atom/browser/osr/osr_render_widget_host_view.cc',
|
||||
'atom/browser/osr/osr_render_widget_host_view.h',
|
||||
'atom/browser/osr/osr_render_widget_host_view_mac.mm',
|
||||
'atom/browser/osr/osr_view_proxy.cc',
|
||||
'atom/browser/osr/osr_view_proxy.h',
|
||||
],
|
||||
}], # enable_osr==1
|
||||
['enable_pdf_viewer==1', {
|
||||
'lib_sources': [
|
||||
'atom/browser/ui/webui/pdf_viewer_handler.cc',
|
||||
'atom/browser/ui/webui/pdf_viewer_handler.h',
|
||||
'atom/browser/ui/webui/pdf_viewer_ui.cc',
|
||||
'atom/browser/ui/webui/pdf_viewer_ui.h',
|
||||
'chromium_src/components/pdf/renderer/pepper_pdf_host.cc',
|
||||
'chromium_src/components/pdf/renderer/pepper_pdf_host.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/grit/pdf_viewer_resources_map.cc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/grit/pdf_viewer_resources_map.h',
|
||||
],
|
||||
}], # enable_pdf_viewer
|
||||
['enable_run_as_node==1', {
|
||||
'lib_sources': [
|
||||
'atom/app/node_main.cc',
|
||||
'atom/app/node_main.h',
|
||||
],
|
||||
}], # enable_run_as_node
|
||||
['enable_view_api==1', {
|
||||
'js_sources': [
|
||||
'lib/browser/api/box-layout.js',
|
||||
'lib/browser/api/button.js',
|
||||
'lib/browser/api/label-button.js',
|
||||
'lib/browser/api/layout-manager.js',
|
||||
'lib/browser/api/text-field.js',
|
||||
],
|
||||
'lib_sources': [
|
||||
'atom/browser/api/atom_api_box_layout.cc',
|
||||
'atom/browser/api/atom_api_box_layout.h',
|
||||
'atom/browser/api/atom_api_button.cc',
|
||||
'atom/browser/api/atom_api_button.h',
|
||||
'atom/browser/api/atom_api_label_button.cc',
|
||||
'atom/browser/api/atom_api_label_button.h',
|
||||
'atom/browser/api/atom_api_layout_manager.cc',
|
||||
'atom/browser/api/atom_api_layout_manager.h',
|
||||
'atom/browser/api/atom_api_text_field.cc',
|
||||
'atom/browser/api/atom_api_text_field.h',
|
||||
],
|
||||
}], # enable_view_api
|
||||
['mas_build==1', {
|
||||
'lib_sources': [
|
||||
'atom/browser/api/atom_api_app_mas.mm',
|
||||
],
|
||||
}], # mas_build==1
|
||||
],
|
||||
},
|
||||
}
|
|
@ -46,17 +46,9 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"asar": "asar",
|
||||
"bootstrap:dev": "python ./script/bootstrap.py -d -v",
|
||||
"bootstrap": "python ./script/bootstrap.py -v",
|
||||
"browserify": "browserify",
|
||||
"bump-version": "./script/bump-version.py",
|
||||
"build": "python ./script/build.py",
|
||||
"build:dev": "python ./script/build.py -c D",
|
||||
"build:release": "python ./script/build.py -c R",
|
||||
"rebuild-test-modules": "python ./script/rebuild-test-modules.py",
|
||||
"check-tls": "python ./script/tls.py",
|
||||
"clean": "python ./script/clean.py",
|
||||
"clean-build": "python ./script/clean.py --build",
|
||||
"clang-format": "find atom/ brightray/ chromium_src/ -iname *.h -o -iname *.cc -o -iname *.mm | xargs clang-format -i",
|
||||
"coverage": "npm run instrument-code-coverage && npm test -- --use_instrumented_asar",
|
||||
"instrument-code-coverage": "electabul instrument --input-path ./lib --output-path ./out/coverage/electron.asar",
|
||||
|
@ -77,7 +69,6 @@
|
|||
"prepack": "check-for-leaks",
|
||||
"prepush": "check-for-leaks",
|
||||
"prepare-release": "node ./script/prepare-release.js",
|
||||
"prerelease": "python ./script/bootstrap.py -v --dev && npm run build",
|
||||
"release": "node ./script/release.js",
|
||||
"repl": "python ./script/start.py --interactive",
|
||||
"start": "python ./script/start.py",
|
||||
|
|
|
@ -1,300 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import errno
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from lib.config import BASE_URL, PLATFORM, MIPS64EL_SYSROOT_URL, \
|
||||
MIPS64EL_GCC, MIPS64EL_GCC_URL, enable_verbose_mode, \
|
||||
is_verbose_mode, get_target_arch
|
||||
from lib.util import execute, execute_stdout, get_electron_version, \
|
||||
scoped_cwd, download, update_node_modules
|
||||
from tls import check_tls
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
VENDOR_DIR = os.path.join(SOURCE_ROOT, 'vendor')
|
||||
DOWNLOAD_DIR = os.path.join(VENDOR_DIR, 'download')
|
||||
PYTHON_26_URL = 'https://chromium.googlesource.com/chromium/deps/python_26'
|
||||
|
||||
def main():
|
||||
os.chdir(SOURCE_ROOT)
|
||||
|
||||
args = parse_args()
|
||||
defines = args_to_defines(args)
|
||||
if not args.yes and PLATFORM != 'win32':
|
||||
check_root()
|
||||
if args.verbose:
|
||||
enable_verbose_mode()
|
||||
if sys.platform == 'cygwin':
|
||||
update_win32_python()
|
||||
|
||||
check_tls(args.verbose)
|
||||
|
||||
update_submodules()
|
||||
|
||||
libcc_source_path = args.libcc_source_path
|
||||
libcc_shared_library_path = args.libcc_shared_library_path
|
||||
libcc_static_library_path = args.libcc_static_library_path
|
||||
|
||||
if args.target_arch == 'mips64el':
|
||||
download_mips64el_toolchain()
|
||||
|
||||
if args.target_arch.startswith('arm'):
|
||||
download_native_mksnapshot(args.target_arch)
|
||||
|
||||
# Redirect to use local libchromiumcontent build.
|
||||
if args.build_release_libcc or args.build_debug_libcc:
|
||||
build_libchromiumcontent(args.verbose, args.target_arch,
|
||||
args.build_debug_libcc, args.update_libcc)
|
||||
dist_dir = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'dist', 'main')
|
||||
libcc_source_path = os.path.join(dist_dir, 'src')
|
||||
libcc_shared_library_path = os.path.join(dist_dir, 'shared_library')
|
||||
libcc_static_library_path = os.path.join(dist_dir, 'static_library')
|
||||
|
||||
if PLATFORM != 'win32':
|
||||
if not args.disable_clang and args.clang_dir == '':
|
||||
# Download prebuilt clang binaries.
|
||||
update_clang()
|
||||
|
||||
setup_python_libs()
|
||||
update_node_modules('.')
|
||||
setup_libchromiumcontent(args.dev, args.target_arch, args.url,
|
||||
libcc_source_path, libcc_shared_library_path,
|
||||
libcc_static_library_path)
|
||||
|
||||
if PLATFORM == 'linux' and args.target_arch != 'mips64el':
|
||||
download_sysroot(args.target_arch)
|
||||
|
||||
create_chrome_version_h()
|
||||
touch_config_gypi()
|
||||
run_update(defines, args.msvs)
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Bootstrap this project')
|
||||
parser.add_argument('-u', '--url',
|
||||
help='The base URL from which to download '
|
||||
'libchromiumcontent (i.e., the URL you passed to '
|
||||
'libchromiumcontent\'s script/upload script',
|
||||
default=BASE_URL,
|
||||
required=False)
|
||||
parser.add_argument('-v', '--verbose',
|
||||
action='store_true',
|
||||
help='Prints the output of the subprocesses')
|
||||
parser.add_argument('-d', '--dev', action='store_true',
|
||||
help='Do not download static_library build')
|
||||
parser.add_argument('-y', '--yes', '--assume-yes',
|
||||
action='store_true',
|
||||
help='Run non-interactively by assuming "yes" to all ' \
|
||||
'prompts.')
|
||||
parser.add_argument('--msvs', action='store_true',
|
||||
help='Generate Visual Studio project')
|
||||
parser.add_argument('--target_arch', default=get_target_arch(),
|
||||
help='Manually specify the arch to build for')
|
||||
parser.add_argument('--clang_dir', default='', help='Path to clang binaries')
|
||||
parser.add_argument('--disable_clang', action='store_true',
|
||||
help='Use compilers other than clang for building')
|
||||
build_libcc = parser.add_mutually_exclusive_group()
|
||||
build_libcc.add_argument('--build_release_libcc', action='store_true',
|
||||
help='Build release version of libchromiumcontent')
|
||||
build_libcc.add_argument('--build_debug_libcc', action='store_true',
|
||||
help='Build debug version of libchromiumcontent')
|
||||
parser.add_argument('--update_libcc', default=False,
|
||||
action='store_true', help=('force gclient invocation to '
|
||||
'update libchromiumcontent'))
|
||||
parser.add_argument('--libcc_source_path', required=False,
|
||||
help='The source path of libchromiumcontent. ' \
|
||||
'NOTE: All options of libchromiumcontent are ' \
|
||||
'required OR let electron choose it')
|
||||
parser.add_argument('--libcc_shared_library_path', required=False,
|
||||
help='The shared library path of libchromiumcontent.')
|
||||
parser.add_argument('--libcc_static_library_path', required=False,
|
||||
help='The static library path of libchromiumcontent.')
|
||||
parser.add_argument('--defines', default='',
|
||||
help='The build variables passed to gyp')
|
||||
parser.add_argument('--cc_wrapper',
|
||||
help='Sets cc_wrapper for build. E.g. $(which sccache)')
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def args_to_defines(args):
|
||||
defines = args.defines
|
||||
if args.disable_clang:
|
||||
defines += ' clang=0'
|
||||
if args.clang_dir:
|
||||
defines += ' make_clang_dir=' + args.clang_dir
|
||||
defines += ' clang_use_chrome_plugins=0'
|
||||
if args.cc_wrapper is not None:
|
||||
defines += ' cc_wrapper=' + args.cc_wrapper
|
||||
return defines
|
||||
|
||||
|
||||
def check_root():
|
||||
if os.geteuid() == 0:
|
||||
print "We suggest not running this as root, unless you're really sure."
|
||||
choice = raw_input("Do you want to continue? [y/N]: ")
|
||||
if choice not in ('y', 'Y'):
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def update_submodules():
|
||||
execute_stdout(['git', 'submodule', 'sync', '--recursive'])
|
||||
execute_stdout(['git', 'submodule', 'update', '--init', '--recursive'])
|
||||
|
||||
|
||||
def setup_python_libs():
|
||||
for lib in ('requests', 'boto'):
|
||||
with scoped_cwd(os.path.join(VENDOR_DIR, lib)):
|
||||
execute_stdout([sys.executable, 'setup.py', 'build'])
|
||||
|
||||
|
||||
def setup_libchromiumcontent(is_dev, target_arch, url,
|
||||
libcc_source_path,
|
||||
libcc_shared_library_path,
|
||||
libcc_static_library_path):
|
||||
target_dir = os.path.join(DOWNLOAD_DIR, 'libchromiumcontent')
|
||||
script = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script',
|
||||
'download')
|
||||
args = ['-f', '-c', get_libchromiumcontent_commit(), '--target_arch',
|
||||
target_arch, url, target_dir]
|
||||
if (libcc_source_path != None and
|
||||
libcc_shared_library_path != None and
|
||||
libcc_static_library_path != None):
|
||||
args += ['--libcc_source_path', libcc_source_path,
|
||||
'--libcc_shared_library_path', libcc_shared_library_path,
|
||||
'--libcc_static_library_path', libcc_static_library_path]
|
||||
mkdir_p(target_dir)
|
||||
else:
|
||||
mkdir_p(DOWNLOAD_DIR)
|
||||
if is_verbose_mode():
|
||||
args += ['-v']
|
||||
if is_dev:
|
||||
subprocess.check_call([sys.executable, script] + args)
|
||||
else:
|
||||
subprocess.check_call([sys.executable, script, '-s'] + args)
|
||||
|
||||
|
||||
def update_win32_python():
|
||||
with scoped_cwd(VENDOR_DIR):
|
||||
if not os.path.exists('python_26'):
|
||||
execute_stdout(['git', 'clone', PYTHON_26_URL])
|
||||
|
||||
|
||||
def build_libchromiumcontent(verbose, target_arch, debug,
|
||||
force_update):
|
||||
args = [sys.executable,
|
||||
os.path.join(SOURCE_ROOT, 'script', 'build-libchromiumcontent.py')]
|
||||
if debug:
|
||||
args += ['-d']
|
||||
if force_update:
|
||||
args += ['--force-update']
|
||||
if verbose:
|
||||
args += ['-v']
|
||||
execute_stdout(args + ['--target_arch', target_arch])
|
||||
|
||||
|
||||
def update_clang():
|
||||
execute_stdout([os.path.join(SOURCE_ROOT, 'script', 'update-clang.sh')])
|
||||
|
||||
|
||||
def download_sysroot(target_arch):
|
||||
if target_arch == 'ia32':
|
||||
target_arch = 'i386'
|
||||
if target_arch == 'x64':
|
||||
target_arch = 'amd64'
|
||||
execute_stdout([sys.executable,
|
||||
os.path.join(SOURCE_ROOT, 'script', 'install-sysroot.py'),
|
||||
'--arch', target_arch],
|
||||
cwd=VENDOR_DIR)
|
||||
|
||||
|
||||
def download_mips64el_toolchain():
|
||||
# Download sysroot image.
|
||||
if not os.path.exists(os.path.join(VENDOR_DIR,
|
||||
'debian_jessie_mips64-sysroot')):
|
||||
tar_name = 'debian_jessie_mips64-sysroot.tar.bz2'
|
||||
download(tar_name, MIPS64EL_SYSROOT_URL,
|
||||
os.path.join(SOURCE_ROOT, tar_name))
|
||||
subprocess.call(['tar', '-jxf', tar_name, '-C', VENDOR_DIR])
|
||||
os.remove(tar_name)
|
||||
# Download toolchain.
|
||||
if not os.path.exists(os.path.join(VENDOR_DIR, MIPS64EL_GCC)):
|
||||
tar_name = MIPS64EL_GCC + '.tar.gz'
|
||||
download(tar_name, MIPS64EL_GCC_URL, os.path.join(SOURCE_ROOT, tar_name))
|
||||
subprocess.check_call(['tar', '-xf', tar_name, '-C', VENDOR_DIR])
|
||||
os.remove(tar_name)
|
||||
|
||||
def download_native_mksnapshot(arch):
|
||||
if not os.path.exists(os.path.join(VENDOR_DIR,
|
||||
'native_mksnapshot')):
|
||||
tar_name = 'native-mksnapshot.tar.bz2'
|
||||
url = '{0}/linux/{1}/{2}/{3}'.format(BASE_URL, arch,
|
||||
get_libchromiumcontent_commit(), tar_name)
|
||||
download(tar_name, url, os.path.join(SOURCE_ROOT, tar_name))
|
||||
subprocess.call(['tar', '-jxf', tar_name, '-C', VENDOR_DIR])
|
||||
os.remove(tar_name)
|
||||
|
||||
def create_chrome_version_h():
|
||||
version_file = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'VERSION')
|
||||
target_file = os.path.join(SOURCE_ROOT, 'atom', 'common', 'chrome_version.h')
|
||||
template_file = os.path.join(SOURCE_ROOT, 'script', 'chrome_version.h.in')
|
||||
|
||||
with open(version_file, 'r') as f:
|
||||
version = f.read()
|
||||
with open(template_file, 'r') as f:
|
||||
template = f.read()
|
||||
content = template.replace('{PLACEHOLDER}', version.strip())
|
||||
|
||||
# We update the file only if the content has changed (ignoring line ending
|
||||
# differences).
|
||||
should_write = True
|
||||
if os.path.isfile(target_file):
|
||||
with open(target_file, 'r') as f:
|
||||
should_write = f.read().replace('r', '') != content.replace('r', '')
|
||||
if should_write:
|
||||
with open(target_file, 'w') as f:
|
||||
f.write(content)
|
||||
|
||||
|
||||
def touch_config_gypi():
|
||||
config_gypi = os.path.join(SOURCE_ROOT, 'vendor', 'node', 'config.gypi')
|
||||
with open(config_gypi, 'w+') as f:
|
||||
content = "\n{'variables':{}}"
|
||||
if f.read() != content:
|
||||
f.write(content)
|
||||
|
||||
|
||||
def run_update(defines, msvs):
|
||||
args = [sys.executable, os.path.join(SOURCE_ROOT, 'script', 'update.py')]
|
||||
if defines:
|
||||
args += ['--defines', defines]
|
||||
if msvs:
|
||||
args += ['--msvs']
|
||||
|
||||
execute_stdout(args)
|
||||
|
||||
|
||||
def get_libchromiumcontent_commit():
|
||||
commit = os.getenv('LIBCHROMIUMCONTENT_COMMIT')
|
||||
if commit:
|
||||
return commit
|
||||
|
||||
# Extract full SHA-1 of libcc submodule commit
|
||||
output = execute(['git', 'submodule', 'status', 'vendor/libchromiumcontent'])
|
||||
commit = re.split('^(?:\s*)([a-f0-9]{40})(?:\s+)', output)[1]
|
||||
return commit
|
||||
|
||||
|
||||
def mkdir_p(path):
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
|
@ -1,75 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
from lib.config import enable_verbose_mode, get_target_arch
|
||||
from lib.util import execute_stdout
|
||||
from bootstrap import get_libchromiumcontent_commit
|
||||
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
LIBCC_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'libchromiumcontent')
|
||||
GCLIENT_DONE_MARKER = os.path.join(SOURCE_ROOT, '.gclient_done')
|
||||
LIBCC_COMMIT = get_libchromiumcontent_commit()
|
||||
|
||||
|
||||
def update_gclient_done_marker():
|
||||
with open(GCLIENT_DONE_MARKER, 'wb') as f:
|
||||
f.write(LIBCC_COMMIT)
|
||||
|
||||
|
||||
def libchromiumcontent_outdated():
|
||||
if not os.path.exists(GCLIENT_DONE_MARKER):
|
||||
return True
|
||||
with open(GCLIENT_DONE_MARKER, 'rb') as f:
|
||||
return f.read() != LIBCC_COMMIT
|
||||
|
||||
|
||||
def main():
|
||||
os.chdir(LIBCC_DIR)
|
||||
|
||||
args = parse_args()
|
||||
if args.verbose:
|
||||
enable_verbose_mode()
|
||||
|
||||
# ./script/bootstrap
|
||||
# ./script/update -t x64
|
||||
# ./script/build --no_shared_library -t x64
|
||||
# ./script/create-dist -c static_library -t x64 --no_zip
|
||||
script_dir = os.path.join(LIBCC_DIR, 'script')
|
||||
bootstrap = os.path.join(script_dir, 'bootstrap')
|
||||
update = os.path.join(script_dir, 'update')
|
||||
build = os.path.join(script_dir, 'build')
|
||||
create_dist = os.path.join(script_dir, 'create-dist')
|
||||
if args.force_update or libchromiumcontent_outdated():
|
||||
execute_stdout([sys.executable, bootstrap])
|
||||
execute_stdout([sys.executable, update, '-t', args.target_arch])
|
||||
update_gclient_done_marker()
|
||||
if args.debug:
|
||||
execute_stdout([sys.executable, build, '-D', '-t', args.target_arch])
|
||||
execute_stdout([sys.executable, create_dist, '-c', 'shared_library',
|
||||
'--no_zip', '--keep-debug-symbols',
|
||||
'-t', args.target_arch])
|
||||
else:
|
||||
execute_stdout([sys.executable, build, '-R', '-t', args.target_arch])
|
||||
execute_stdout([sys.executable, create_dist, '-c', 'static_library',
|
||||
'--no_zip', '-t', args.target_arch])
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Build libchromiumcontent')
|
||||
parser.add_argument('--target_arch',
|
||||
help='Specify the arch to build for')
|
||||
parser.add_argument('-v', '--verbose', action='store_true',
|
||||
help='Prints the output of the subprocesses')
|
||||
parser.add_argument('-d', '--debug', action='store_true',
|
||||
help='Build libchromiumcontent for debugging')
|
||||
parser.add_argument('--force-update', default=False, action='store_true',
|
||||
help='Force gclient to update libchromiumcontent')
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
106
script/build.py
106
script/build.py
|
@ -1,106 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from lib.config import MIPS64EL_GCC, get_target_arch, build_env, \
|
||||
enable_verbose_mode, is_verbose_mode
|
||||
from lib.util import electron_gyp, import_vs_env
|
||||
|
||||
|
||||
CONFIGURATIONS = ['Release', 'Debug']
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
VENDOR_DIR = os.path.join(SOURCE_ROOT, 'vendor')
|
||||
LIBCC_SOURCE_ROOT = os.path.join(SOURCE_ROOT, 'vendor', 'libchromiumcontent')
|
||||
LIBCC_DIST_MAIN = os.path.join(LIBCC_SOURCE_ROOT, 'dist', 'main')
|
||||
GCLIENT_DONE = os.path.join(SOURCE_ROOT, '.gclient_done')
|
||||
|
||||
|
||||
def main():
|
||||
os.chdir(SOURCE_ROOT)
|
||||
|
||||
args = parse_args()
|
||||
if args.verbose:
|
||||
enable_verbose_mode()
|
||||
|
||||
# Update the VS build env.
|
||||
import_vs_env(get_target_arch())
|
||||
|
||||
# decide which ninja executable to use
|
||||
ninja_path = args.ninja_path
|
||||
if not ninja_path:
|
||||
ninja_path = os.path.join('vendor', 'depot_tools', 'ninja')
|
||||
if sys.platform == 'win32':
|
||||
ninja_path += '.exe'
|
||||
|
||||
# decide how to invoke ninja
|
||||
ninja = [ninja_path]
|
||||
if is_verbose_mode():
|
||||
ninja.append('-v')
|
||||
|
||||
if args.libcc:
|
||||
if ('D' not in args.configuration
|
||||
or not os.path.exists(GCLIENT_DONE)
|
||||
or not os.path.exists(os.path.join(LIBCC_DIST_MAIN, 'build.ninja'))):
|
||||
sys.stderr.write('--libcc should only be used when '
|
||||
'libchromiumcontent was built with bootstrap.py -d '
|
||||
'--debug_libchromiumcontent' + os.linesep)
|
||||
sys.exit(1)
|
||||
script = os.path.join(LIBCC_SOURCE_ROOT, 'script', 'build')
|
||||
subprocess.check_call([sys.executable, script, '-D', '-t',
|
||||
get_target_arch()])
|
||||
subprocess.check_call(ninja + ['-C', LIBCC_DIST_MAIN])
|
||||
|
||||
env = build_env()
|
||||
for config in args.configuration:
|
||||
build_path = os.path.join('out', config[0])
|
||||
build_args = ['-C', build_path, args.target]
|
||||
if args.compdb:
|
||||
build_args += ['-t', 'compdb', 'cxx', 'cc']
|
||||
compdb = open(r'compile_commands.json','w')
|
||||
ret = subprocess.call(ninja + build_args, env=env, stdout=compdb)
|
||||
compdb.close()
|
||||
else:
|
||||
ret = subprocess.call(ninja + build_args, env=env)
|
||||
if ret != 0:
|
||||
sys.exit(ret)
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Build project')
|
||||
parser.add_argument('-c', '--configuration',
|
||||
help='Build with Release or Debug configuration',
|
||||
nargs='+',
|
||||
default=CONFIGURATIONS,
|
||||
required=False)
|
||||
parser.add_argument('-v', '--verbose',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Verbose output')
|
||||
parser.add_argument('-t', '--target',
|
||||
help='Build specified target',
|
||||
default=electron_gyp()['project_name%'],
|
||||
required=False)
|
||||
parser.add_argument('--libcc',
|
||||
help=(
|
||||
'Build libchromiumcontent first. Should be used only '
|
||||
'when libchromiumcontent as built with boostrap.py '
|
||||
'-d --debug_libchromiumcontent.'
|
||||
),
|
||||
action='store_true', default=False)
|
||||
parser.add_argument('--ninja-path',
|
||||
help='Path of ninja command to use.',
|
||||
required=False)
|
||||
parser.add_argument('--compdb',
|
||||
help=(
|
||||
'Generate JSON compilation database. This will not '
|
||||
'trigger actual build. '
|
||||
),
|
||||
action='store_true', default=False)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
|
@ -116,6 +116,8 @@ def increase_version(versions, index):
|
|||
|
||||
|
||||
def update_electron_gyp(version, suffix):
|
||||
assert(False, "electron.gyp must not be used anymore. We build with GN now.")
|
||||
|
||||
pattern = re.compile(" *'version%' *: *'[0-9.]+(-beta[0-9.]*)?(-dev)?"
|
||||
+ "(-nightly[0-9.]*)?'")
|
||||
with open('electron.gyp', 'r') as f:
|
||||
|
|
116
script/cibuild
116
script/cibuild
|
@ -1,116 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from lib.config import PLATFORM
|
||||
from lib.util import execute, rm_rf, scoped_env
|
||||
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
|
||||
LINUX_DEPS = [
|
||||
'libdbus-1-dev',
|
||||
'libgconf2-dev',
|
||||
'libgnome-keyring-dev',
|
||||
'libgtk-3-dev',
|
||||
'libnotify-dev',
|
||||
'libnss3-dev',
|
||||
'libxtst-dev',
|
||||
]
|
||||
|
||||
LINUX_DEPS_NO_ARM = [
|
||||
'gcc-multilib',
|
||||
'g++-multilib',
|
||||
]
|
||||
|
||||
LINUX_DEPS_ARM = [
|
||||
'binutils-aarch64-linux-gnu',
|
||||
'libc6-dev-armhf-cross',
|
||||
'linux-libc-dev-armhf-cross',
|
||||
'g++-arm-linux-gnueabihf',
|
||||
'g++-4.8-multilib-arm-linux-gnueabihf',
|
||||
'gcc-4.8-multilib-arm-linux-gnueabihf',
|
||||
]
|
||||
|
||||
LINUX_DEPS_ARM64 = [
|
||||
'binutils-aarch64-linux-gnu',
|
||||
'libc6-dev-arm64-cross',
|
||||
'linux-libc-dev-arm64-cross',
|
||||
'g++-4.8-aarch64-linux-gnu',
|
||||
'gcc-4.8-aarch64-linux-gnu',
|
||||
'gcc-aarch64-linux-gnu',
|
||||
]
|
||||
|
||||
def main():
|
||||
os.environ['CI'] = '1'
|
||||
|
||||
# Ignore the CXX and CC env in CI.
|
||||
try:
|
||||
del os.environ['CC']
|
||||
del os.environ['CXX']
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
target_arch = 'x64'
|
||||
if os.environ.has_key('TARGET_ARCH'):
|
||||
target_arch = os.environ['TARGET_ARCH']
|
||||
|
||||
if PLATFORM == 'linux' and target_arch == 'x64':
|
||||
os.environ['DISPLAY'] = ':99.0'
|
||||
execute(['sh', '-e', '/etc/init.d/xvfb', 'start'])
|
||||
|
||||
# CI's npm is not reliable.
|
||||
npm = 'npm.cmd' if PLATFORM == 'win32' else 'npm'
|
||||
execute([npm, 'install', 'npm@2.12.1'])
|
||||
|
||||
log_versions()
|
||||
# Add "./node_modules/.bin" to the beginning of $PATH, which will ensure
|
||||
# future "npm" invocations use the right version.
|
||||
node_bin_dir = os.path.join(SOURCE_ROOT, 'node_modules', '.bin')
|
||||
os.environ['PATH'] = os.path.pathsep.join([node_bin_dir,
|
||||
os.environ.get('PATH', '')])
|
||||
|
||||
is_release = os.environ.get('ELECTRON_RELEASE', '') == '1'
|
||||
args = ['--target_arch=' + target_arch]
|
||||
if not is_release:
|
||||
args += ['--dev']
|
||||
run_script('bootstrap.py', args)
|
||||
|
||||
if PLATFORM != 'win32':
|
||||
sys.stderr.write('\nRunning `npm run lint`\n')
|
||||
sys.stderr.flush()
|
||||
execute([npm, 'run', 'lint'])
|
||||
|
||||
if is_release:
|
||||
run_script('build.py', ['-c', 'R'])
|
||||
run_script('create-dist.py')
|
||||
run_script('upload.py')
|
||||
else:
|
||||
run_script('build.py', ['-c', 'D'])
|
||||
if PLATFORM == 'win32' or target_arch == 'x64':
|
||||
run_script('test.py', ['--ci', '--rebuild_native_modules'])
|
||||
run_script('verify-ffmpeg.py')
|
||||
|
||||
|
||||
def run_script(script, args=[]):
|
||||
sys.stderr.write('\nRunning ' + script +'\n')
|
||||
sys.stderr.flush()
|
||||
script = os.path.join(SOURCE_ROOT, 'script', script)
|
||||
subprocess.check_call([sys.executable, script] + args)
|
||||
|
||||
|
||||
def log_versions():
|
||||
sys.stderr.write('\nnode --version\n')
|
||||
sys.stderr.flush()
|
||||
subprocess.call(['node', '--version'])
|
||||
|
||||
sys.stderr.write('\nnpm --version\n')
|
||||
sys.stderr.flush()
|
||||
npm = 'npm.cmd' if PLATFORM == 'win32' else 'npm'
|
||||
subprocess.call([npm, '--version'])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export TARGET_ARCH=arm
|
||||
|
||||
script/cibuild-linux
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export TARGET_ARCH=arm64
|
||||
|
||||
script/cibuild-linux
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export TARGET_ARCH=ia32
|
||||
|
||||
script/cibuild-linux
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export TARGET_ARCH=x64
|
||||
|
||||
script/cibuild-linux
|
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
MESSAGE="$(git log --format=%B -n 1 HEAD)"
|
||||
case ${MESSAGE} in
|
||||
Bump* ) export ELECTRON_RELEASE=1 ;;
|
||||
esac
|
||||
|
||||
if [[ -z "${ELECTRON_RELEASE}" ]]; then
|
||||
echo "Generating Linux $TARGET_ARCH debug build"
|
||||
else
|
||||
echo "Generating Linux $TARGET_ARCH release build"
|
||||
fi
|
||||
|
||||
set +x
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
git submodule sync --recursive
|
||||
git submodule update --init --recursive
|
||||
|
||||
docker build \
|
||||
--force-rm \
|
||||
--tag electron-linux \
|
||||
.
|
||||
|
||||
docker run \
|
||||
--rm \
|
||||
--env TARGET_ARCH="$TARGET_ARCH" \
|
||||
--env ELECTRON_RELEASE="$ELECTRON_RELEASE" \
|
||||
--env ELECTRON_GITHUB_TOKEN="$BUILD_ELECTRON_ELECTRON_GITHUB_TOKEN" \
|
||||
--env ELECTRON_S3_BUCKET="$BUILD_ELECTRON_ELECTRON_S3_BUCKET" \
|
||||
--env ELECTRON_S3_ACCESS_KEY="$BUILD_ELECTRON_ELECTRON_S3_ACCESS_KEY" \
|
||||
--env ELECTRON_S3_SECRET_KEY="$BUILD_ELECTRON_ELECTRON_S3_SECRET_KEY" \
|
||||
--user "$UID" \
|
||||
--volume "$PWD":/workspace/electron \
|
||||
--workdir /workspace/electron \
|
||||
electron-linux script/cibuild
|
|
@ -1,2 +0,0 @@
|
|||
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
& python "$scriptPath/cibuild"
|
|
@ -1,46 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
from lib.util import rm_rf
|
||||
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
|
||||
|
||||
def main():
|
||||
os.chdir(SOURCE_ROOT)
|
||||
|
||||
args = parse_args()
|
||||
|
||||
remove_directory('dist')
|
||||
remove_directory('out')
|
||||
|
||||
if not args.build:
|
||||
remove_directory('node_modules')
|
||||
remove_directory('spec/node_modules')
|
||||
|
||||
remove_directory('vendor/download/libchromiumcontent')
|
||||
remove_directory('vendor/libchromiumcontent/src')
|
||||
|
||||
remove_directory(os.path.expanduser('~/.node-gyp'))
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Remove generated and' \
|
||||
'downloaded build files')
|
||||
parser.add_argument('-b', '--build',
|
||||
help='Only remove out and dist directories',
|
||||
action='store_true')
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def remove_directory(directory):
|
||||
print 'Removing %s' % directory
|
||||
rm_rf(directory)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
|
@ -1,372 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import glob
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import stat
|
||||
if sys.platform == "win32":
|
||||
import _winreg
|
||||
|
||||
from lib.config import BASE_URL, PLATFORM, build_env, \
|
||||
enable_verbose_mode, get_target_arch, get_zip_name
|
||||
|
||||
from lib.util import add_exec_bit, electron_features, electron_gyp, \
|
||||
execute, get_electron_version, make_zip, \
|
||||
parse_version, rm_rf, scoped_cwd
|
||||
|
||||
from lib.env_util import get_vs_location
|
||||
|
||||
|
||||
ELECTRON_VERSION = get_electron_version()
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
|
||||
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
|
||||
CHROMIUM_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'download',
|
||||
'libchromiumcontent', 'static_library')
|
||||
NATIVE_MKSNAPSHOT_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'native_mksnapshot')
|
||||
|
||||
PROJECT_NAME = electron_gyp()['project_name%']
|
||||
PRODUCT_NAME = electron_gyp()['product_name%']
|
||||
PDF_VIEWER_ENABLED = electron_features()['enable_pdf_viewer%']
|
||||
|
||||
TARGET_BINARIES = {
|
||||
'darwin': [
|
||||
],
|
||||
'win32': [
|
||||
'{0}.exe'.format(PROJECT_NAME), # 'electron.exe'
|
||||
'content_shell.pak',
|
||||
'd3dcompiler_47.dll',
|
||||
'icudtl.dat',
|
||||
'libEGL.dll',
|
||||
'libGLESv2.dll',
|
||||
'ffmpeg.dll',
|
||||
'node.dll',
|
||||
'blink_image_resources_200_percent.pak',
|
||||
'content_resources_200_percent.pak',
|
||||
'ui_resources_200_percent.pak',
|
||||
'views_resources_200_percent.pak',
|
||||
'natives_blob.bin',
|
||||
'v8_context_snapshot.bin',
|
||||
],
|
||||
'linux': [
|
||||
PROJECT_NAME, # 'electron'
|
||||
'content_shell.pak',
|
||||
'icudtl.dat',
|
||||
'libffmpeg.so',
|
||||
'libnode.so',
|
||||
'blink_image_resources_200_percent.pak',
|
||||
'content_resources_200_percent.pak',
|
||||
'ui_resources_200_percent.pak',
|
||||
'views_resources_200_percent.pak',
|
||||
'natives_blob.bin',
|
||||
'v8_context_snapshot.bin',
|
||||
],
|
||||
}
|
||||
TARGET_BINARIES_EXT = []
|
||||
TARGET_DIRECTORIES = {
|
||||
'darwin': [
|
||||
'{0}.app'.format(PRODUCT_NAME),
|
||||
],
|
||||
'win32': [
|
||||
'resources',
|
||||
'locales',
|
||||
],
|
||||
'linux': [
|
||||
'resources',
|
||||
'locales',
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
|
||||
if args.chromium_dir:
|
||||
globals().update(CHROMIUM_DIR=args.chromium_dir)
|
||||
|
||||
if args.verbose:
|
||||
enable_verbose_mode()
|
||||
|
||||
rm_rf(DIST_DIR)
|
||||
os.makedirs(DIST_DIR)
|
||||
|
||||
force_build()
|
||||
create_symbols()
|
||||
copy_binaries()
|
||||
copy_chrome_binary('chromedriver')
|
||||
copy_chrome_binary('mksnapshot')
|
||||
copy_license()
|
||||
if PLATFORM == 'win32':
|
||||
copy_vcruntime_binaries()
|
||||
copy_ucrt_binaries()
|
||||
|
||||
if PLATFORM != 'win32' and not args.no_api_docs:
|
||||
create_api_json_schema()
|
||||
create_typescript_definitions()
|
||||
|
||||
if PLATFORM == 'linux':
|
||||
strip_binaries()
|
||||
|
||||
create_version()
|
||||
create_dist_zip()
|
||||
create_chrome_binary_zip('chromedriver', ELECTRON_VERSION)
|
||||
create_chrome_binary_zip('mksnapshot', ELECTRON_VERSION)
|
||||
create_ffmpeg_zip()
|
||||
create_symbols_zip()
|
||||
|
||||
|
||||
def force_build():
|
||||
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
|
||||
execute([sys.executable, build, '-c', 'Release'])
|
||||
|
||||
|
||||
def copy_binaries():
|
||||
for binary in TARGET_BINARIES[PLATFORM]:
|
||||
shutil.copy2(os.path.join(OUT_DIR, binary), DIST_DIR)
|
||||
|
||||
if PLATFORM != 'darwin' and PDF_VIEWER_ENABLED:
|
||||
shutil.copy2(os.path.join(OUT_DIR, 'pdf_viewer_resources.pak'),
|
||||
DIST_DIR)
|
||||
|
||||
for directory in TARGET_DIRECTORIES[PLATFORM]:
|
||||
shutil.copytree(os.path.join(OUT_DIR, directory),
|
||||
os.path.join(DIST_DIR, directory),
|
||||
symlinks=True)
|
||||
|
||||
|
||||
def copy_chrome_binary(binary):
|
||||
if PLATFORM == 'win32':
|
||||
binary += '.exe'
|
||||
src = os.path.join(CHROMIUM_DIR, binary)
|
||||
dest = os.path.join(DIST_DIR, binary)
|
||||
|
||||
# Copy file and keep the executable bit.
|
||||
shutil.copyfile(src, dest)
|
||||
add_exec_bit(dest)
|
||||
|
||||
def copy_vcruntime_binaries():
|
||||
arch = get_target_arch()
|
||||
if arch == "ia32":
|
||||
arch = "x86"
|
||||
subkey = r"SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\\"
|
||||
with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, subkey + arch, 0,
|
||||
_winreg.KEY_READ | _winreg.KEY_WOW64_32KEY) as key:
|
||||
runtime_version = _winreg.QueryValueEx(key, "Version")[0][1:]
|
||||
|
||||
version_parts = parse_version(runtime_version)
|
||||
if len(version_parts) > 3:
|
||||
runtime_version = '.'.join(version_parts[0:3])
|
||||
|
||||
vs_location = get_vs_location('[15.0,16.0)')
|
||||
|
||||
crt_dir = os.path.join(vs_location, 'VC', 'Redist', 'MSVC', runtime_version,
|
||||
arch, 'Microsoft.VC141.CRT')
|
||||
|
||||
dlls = ["msvcp140.dll", "vcruntime140.dll"]
|
||||
|
||||
# Note: copyfile is used to remove the read-only flag
|
||||
for dll in dlls:
|
||||
shutil.copyfile(os.path.join(crt_dir, dll), os.path.join(DIST_DIR, dll))
|
||||
TARGET_BINARIES_EXT.append(dll)
|
||||
|
||||
|
||||
def copy_ucrt_binaries():
|
||||
with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
|
||||
r"SOFTWARE\Microsoft\Windows Kits\Installed Roots"
|
||||
) as key:
|
||||
ucrt_dir = _winreg.QueryValueEx(key, "KitsRoot10")[0]
|
||||
|
||||
arch = get_target_arch()
|
||||
if arch == "ia32":
|
||||
arch = "x86"
|
||||
|
||||
ucrt_dir += r"Redist\ucrt\DLLs\{0}".format(arch)
|
||||
|
||||
dlls = glob.glob(os.path.join(ucrt_dir, '*.dll'))
|
||||
if len(dlls) == 0:
|
||||
raise Exception('UCRT files not found')
|
||||
|
||||
for dll in dlls:
|
||||
shutil.copy2(dll, DIST_DIR)
|
||||
TARGET_BINARIES_EXT.append(os.path.basename(dll))
|
||||
|
||||
|
||||
def copy_license():
|
||||
shutil.copy2(os.path.join(CHROMIUM_DIR, '..', 'LICENSES.chromium.html'),
|
||||
DIST_DIR)
|
||||
shutil.copy2(os.path.join(SOURCE_ROOT, 'LICENSE'), DIST_DIR)
|
||||
|
||||
def create_api_json_schema():
|
||||
node_bin_dir = os.path.join(SOURCE_ROOT, 'node_modules', '.bin')
|
||||
env = os.environ.copy()
|
||||
env['PATH'] = os.path.pathsep.join([node_bin_dir, env['PATH']])
|
||||
outfile = os.path.relpath(os.path.join(DIST_DIR, 'electron-api.json'))
|
||||
execute(['electron-docs-linter', 'docs', '--outfile={0}'.format(outfile),
|
||||
'--version={}'.format(ELECTRON_VERSION.replace('v', ''))],
|
||||
env=env)
|
||||
|
||||
def create_typescript_definitions():
|
||||
node_bin_dir = os.path.join(SOURCE_ROOT, 'node_modules', '.bin')
|
||||
env = os.environ.copy()
|
||||
env['PATH'] = os.path.pathsep.join([node_bin_dir, env['PATH']])
|
||||
infile = os.path.relpath(os.path.join(DIST_DIR, 'electron-api.json'))
|
||||
outfile = os.path.relpath(os.path.join(DIST_DIR, 'electron.d.ts'))
|
||||
execute(['electron-typescript-definitions', '--in={0}'.format(infile),
|
||||
'--out={0}'.format(outfile)], env=env)
|
||||
|
||||
def strip_binaries():
|
||||
for binary in TARGET_BINARIES[PLATFORM]:
|
||||
if binary.endswith('.so') or '.' not in binary:
|
||||
strip_binary(os.path.join(DIST_DIR, binary))
|
||||
|
||||
|
||||
def strip_binary(binary_path):
|
||||
if get_target_arch() == 'arm':
|
||||
strip = 'arm-linux-gnueabihf-strip'
|
||||
elif get_target_arch() == 'arm64':
|
||||
strip = 'aarch64-linux-gnu-strip'
|
||||
elif get_target_arch() == 'mips64el':
|
||||
strip = 'mips64el-redhat-linux-strip'
|
||||
else:
|
||||
strip = 'strip'
|
||||
execute([strip, binary_path], env=build_env())
|
||||
|
||||
|
||||
def create_version():
|
||||
version_path = os.path.join(SOURCE_ROOT, 'dist', 'version')
|
||||
with open(version_path, 'w') as version_file:
|
||||
version_file.write(ELECTRON_VERSION)
|
||||
|
||||
|
||||
def create_symbols():
|
||||
if get_target_arch() == 'mips64el':
|
||||
return
|
||||
|
||||
destination = os.path.join(DIST_DIR, '{0}.breakpad.syms'.format(PROJECT_NAME))
|
||||
dump_symbols = os.path.join(SOURCE_ROOT, 'script', 'dump-symbols.py')
|
||||
execute([sys.executable, dump_symbols, destination])
|
||||
|
||||
if PLATFORM == 'darwin':
|
||||
dsyms = glob.glob(os.path.join(OUT_DIR, '*.dSYM'))
|
||||
for dsym in dsyms:
|
||||
shutil.copytree(dsym, os.path.join(DIST_DIR, os.path.basename(dsym)))
|
||||
elif PLATFORM == 'win32':
|
||||
pdbs = glob.glob(os.path.join(OUT_DIR, '*.pdb'))
|
||||
for pdb in pdbs:
|
||||
shutil.copy2(pdb, DIST_DIR)
|
||||
|
||||
|
||||
def create_dist_zip():
|
||||
dist_name = get_zip_name(PROJECT_NAME, ELECTRON_VERSION)
|
||||
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
||||
|
||||
with scoped_cwd(DIST_DIR):
|
||||
files = TARGET_BINARIES[PLATFORM] + TARGET_BINARIES_EXT + ['LICENSE',
|
||||
'LICENSES.chromium.html', 'version']
|
||||
if PLATFORM != 'darwin' and PDF_VIEWER_ENABLED:
|
||||
files += ['pdf_viewer_resources.pak']
|
||||
dirs = TARGET_DIRECTORIES[PLATFORM]
|
||||
make_zip(zip_file, files, dirs)
|
||||
|
||||
|
||||
def create_chrome_binary_zip(binary, version):
|
||||
file_suffix = ''
|
||||
create_native_mksnapshot = False
|
||||
if binary == 'mksnapshot':
|
||||
arch = get_target_arch()
|
||||
if arch.startswith('arm'):
|
||||
# if the arch is arm/arm64 the mksnapshot executable is an x64 binary,
|
||||
# so name it as such.
|
||||
file_suffix = 'x64'
|
||||
create_native_mksnapshot = True
|
||||
dist_name = get_zip_name(binary, version, file_suffix)
|
||||
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
||||
|
||||
files = ['LICENSE', 'LICENSES.chromium.html']
|
||||
if PLATFORM == 'win32':
|
||||
files += [binary + '.exe']
|
||||
else:
|
||||
files += [binary]
|
||||
|
||||
with scoped_cwd(DIST_DIR):
|
||||
make_zip(zip_file, files, [])
|
||||
|
||||
if create_native_mksnapshot == True:
|
||||
# Create a zip with the native version of the mksnapshot binary.
|
||||
src = os.path.join(NATIVE_MKSNAPSHOT_DIR, binary)
|
||||
dest = os.path.join(DIST_DIR, binary)
|
||||
# Copy file and keep the executable bit.
|
||||
shutil.copyfile(src, dest)
|
||||
add_exec_bit(dest)
|
||||
|
||||
dist_name = get_zip_name(binary, version)
|
||||
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
||||
with scoped_cwd(DIST_DIR):
|
||||
make_zip(zip_file, files, [])
|
||||
|
||||
def create_ffmpeg_zip():
|
||||
dist_name = get_zip_name('ffmpeg', ELECTRON_VERSION)
|
||||
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
||||
|
||||
if PLATFORM == 'darwin':
|
||||
ffmpeg_name = 'libffmpeg.dylib'
|
||||
elif PLATFORM == 'linux':
|
||||
ffmpeg_name = 'libffmpeg.so'
|
||||
elif PLATFORM == 'win32':
|
||||
ffmpeg_name = 'ffmpeg.dll'
|
||||
|
||||
shutil.copy2(os.path.join(CHROMIUM_DIR, '..', 'ffmpeg', ffmpeg_name),
|
||||
DIST_DIR)
|
||||
|
||||
if PLATFORM == 'linux':
|
||||
strip_binary(os.path.join(DIST_DIR, ffmpeg_name))
|
||||
|
||||
with scoped_cwd(DIST_DIR):
|
||||
make_zip(zip_file, [ffmpeg_name, 'LICENSE', 'LICENSES.chromium.html'], [])
|
||||
|
||||
|
||||
def create_symbols_zip():
|
||||
if get_target_arch() == 'mips64el':
|
||||
return
|
||||
|
||||
dist_name = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'symbols')
|
||||
zip_file = os.path.join(DIST_DIR, dist_name)
|
||||
licenses = ['LICENSE', 'LICENSES.chromium.html', 'version']
|
||||
|
||||
with scoped_cwd(DIST_DIR):
|
||||
dirs = ['{0}.breakpad.syms'.format(PROJECT_NAME)]
|
||||
make_zip(zip_file, licenses, dirs)
|
||||
|
||||
if PLATFORM == 'darwin':
|
||||
dsym_name = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'dsym')
|
||||
with scoped_cwd(DIST_DIR):
|
||||
dsyms = glob.glob('*.dSYM')
|
||||
make_zip(os.path.join(DIST_DIR, dsym_name), licenses, dsyms)
|
||||
elif PLATFORM == 'win32':
|
||||
pdb_name = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'pdb')
|
||||
with scoped_cwd(DIST_DIR):
|
||||
pdbs = glob.glob('*.pdb')
|
||||
make_zip(os.path.join(DIST_DIR, pdb_name), pdbs + licenses, [])
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Create Electron Distribution')
|
||||
parser.add_argument('--no_api_docs',
|
||||
action='store_true',
|
||||
help='Skip generating the Electron API Documentation!')
|
||||
parser.add_argument('--chromium_dir',
|
||||
help='Specify a custom libchromiumcontent dist directory '
|
||||
+ 'if manually compiled')
|
||||
parser.add_argument('-v', '--verbose',
|
||||
action='store_true',
|
||||
help='Prints the output of the subprocesses')
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
|
@ -1,113 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import tarfile
|
||||
|
||||
from lib.util import safe_mkdir, scoped_cwd
|
||||
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
|
||||
NODE_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'node')
|
||||
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
|
||||
|
||||
HEADERS_SUFFIX = [
|
||||
'.h',
|
||||
'.gypi',
|
||||
]
|
||||
HEADERS_DIRS = [
|
||||
'src',
|
||||
'deps/http_parser',
|
||||
'deps/zlib',
|
||||
'deps/uv',
|
||||
'deps/npm',
|
||||
'deps/mdb_v8',
|
||||
'deps/v8/include'
|
||||
]
|
||||
HEADERS_FILES = [
|
||||
'common.gypi',
|
||||
'config.gypi',
|
||||
]
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
|
||||
safe_mkdir(args.directory)
|
||||
|
||||
node_headers_dir = os.path.join(args.directory,
|
||||
'node-{0}'.format(args.version))
|
||||
iojs_headers_dir = os.path.join(args.directory,
|
||||
'iojs-{0}'.format(args.version))
|
||||
iojs2_headers_dir = os.path.join(args.directory,
|
||||
'iojs-{0}-headers'.format(args.version))
|
||||
|
||||
copy_headers(node_headers_dir)
|
||||
create_header_tarball(args.directory, node_headers_dir)
|
||||
|
||||
copy_headers(iojs_headers_dir)
|
||||
create_header_tarball(args.directory, iojs_headers_dir)
|
||||
|
||||
copy_headers(iojs2_headers_dir)
|
||||
create_header_tarball(args.directory, iojs2_headers_dir)
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='create node header tarballs')
|
||||
parser.add_argument('-v', '--version', help='Specify the version',
|
||||
required=True)
|
||||
parser.add_argument('-d', '--directory', help='Specify the output directory',
|
||||
default=DIST_DIR,
|
||||
required=False)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def copy_headers(dist_headers_dir):
|
||||
safe_mkdir(dist_headers_dir)
|
||||
|
||||
# Copy standard node headers from node. repository.
|
||||
for include_path in HEADERS_DIRS:
|
||||
abs_path = os.path.join(NODE_DIR, include_path)
|
||||
for dirpath, _, filenames in os.walk(abs_path):
|
||||
for filename in filenames:
|
||||
extension = os.path.splitext(filename)[1]
|
||||
if extension not in HEADERS_SUFFIX:
|
||||
continue
|
||||
copy_source_file(os.path.join(dirpath, filename), NODE_DIR,
|
||||
dist_headers_dir)
|
||||
for other_file in HEADERS_FILES:
|
||||
copy_source_file(os.path.join(NODE_DIR, other_file), NODE_DIR,
|
||||
dist_headers_dir)
|
||||
|
||||
# Copy V8 headers from chromium's repository.
|
||||
src = os.path.join(SOURCE_ROOT, 'vendor', 'download', 'libchromiumcontent',
|
||||
'src')
|
||||
for dirpath, _, filenames in os.walk(os.path.join(src, 'v8')):
|
||||
for filename in filenames:
|
||||
extension = os.path.splitext(filename)[1]
|
||||
if extension not in HEADERS_SUFFIX:
|
||||
continue
|
||||
copy_source_file(os.path.join(dirpath, filename), src,
|
||||
os.path.join(dist_headers_dir, 'deps'))
|
||||
|
||||
|
||||
def create_header_tarball(directory, dist_headers_dir):
|
||||
target = dist_headers_dir + '.tar.gz'
|
||||
with scoped_cwd(directory):
|
||||
tarball = tarfile.open(name=target, mode='w:gz')
|
||||
tarball.add(os.path.relpath(dist_headers_dir))
|
||||
tarball.close()
|
||||
|
||||
|
||||
def copy_source_file(source, start, destination):
|
||||
relative = os.path.relpath(source, start=start)
|
||||
final_destination = os.path.join(destination, relative)
|
||||
safe_mkdir(os.path.dirname(final_destination))
|
||||
shutil.copy2(source, final_destination)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
|
@ -28,28 +28,6 @@ if sys.platform in ['win32', 'cygwin']:
|
|||
NPM += '.cmd'
|
||||
|
||||
|
||||
def get_host_arch():
|
||||
"""Returns the host architecture with a predictable string."""
|
||||
host_arch = platform.machine()
|
||||
|
||||
# Convert machine type to format recognized by gyp.
|
||||
if re.match(r'i.86', host_arch) or host_arch == 'i86pc':
|
||||
host_arch = 'ia32'
|
||||
elif host_arch in ['x86_64', 'amd64']:
|
||||
host_arch = 'x64'
|
||||
elif host_arch.startswith('arm'):
|
||||
host_arch = 'arm'
|
||||
|
||||
# platform.machine is based on running kernel. It's possible to use 64-bit
|
||||
# kernel with 32-bit userland, e.g. to give linker slightly more memory.
|
||||
# Distinguish between different userland bitness by querying
|
||||
# the python binary.
|
||||
if host_arch == 'x64' and platform.architecture()[0] == '32bit':
|
||||
host_arch = 'ia32'
|
||||
|
||||
return host_arch
|
||||
|
||||
|
||||
def tempdir(prefix=''):
|
||||
directory = tempfile.mkdtemp(prefix=prefix)
|
||||
atexit.register(shutil.rmtree, directory)
|
||||
|
@ -188,36 +166,18 @@ def execute_stdout(argv, env=os.environ, cwd=None):
|
|||
else:
|
||||
execute(argv, env, cwd)
|
||||
|
||||
|
||||
def electron_gyp():
|
||||
# FIXME(alexeykuzmin): Use data from //BUILD.gn.
|
||||
# electron.gyp is not used during the build.
|
||||
SOURCE_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
|
||||
gyp = os.path.join(SOURCE_ROOT, 'electron.gyp')
|
||||
with open(gyp) as f:
|
||||
obj = eval(f.read());
|
||||
return obj['variables']
|
||||
|
||||
def electron_features():
|
||||
SOURCE_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
|
||||
gyp = os.path.join(SOURCE_ROOT, 'features.gypi')
|
||||
with open(gyp) as f:
|
||||
obj = eval(f.read());
|
||||
return obj['variables']['variables']
|
||||
|
||||
def get_electron_version():
|
||||
return 'v' + electron_gyp()['version%']
|
||||
|
||||
|
||||
def parse_version(version):
|
||||
if version[0] == 'v':
|
||||
version = version[1:]
|
||||
|
||||
vs = version.split('.')
|
||||
if len(vs) > 4:
|
||||
return vs[0:4]
|
||||
else:
|
||||
return vs + ['0'] * (4 - len(vs))
|
||||
|
||||
|
||||
def boto_path_dirs():
|
||||
return [
|
||||
os.path.join(BOTO_DIR, 'build', 'lib'),
|
||||
|
@ -247,56 +207,6 @@ def s3put(bucket, access_key, secret_key, prefix, key_prefix, files):
|
|||
run_boto_script(access_key, secret_key, 's3put', *args)
|
||||
|
||||
|
||||
def import_vs_env(target_arch):
|
||||
if sys.platform != 'win32':
|
||||
return
|
||||
|
||||
if target_arch == 'ia32':
|
||||
vs_arch = 'amd64_x86'
|
||||
else:
|
||||
vs_arch = 'x86_amd64'
|
||||
env = get_vs_env('[15.0,16.0)', vs_arch)
|
||||
os.environ.update(env)
|
||||
|
||||
|
||||
def set_clang_env(env):
|
||||
SOURCE_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
|
||||
llvm_dir = os.path.join(SOURCE_ROOT, 'vendor', 'llvm-build',
|
||||
'Release+Asserts', 'bin')
|
||||
env['CC'] = os.path.join(llvm_dir, 'clang')
|
||||
env['CXX'] = os.path.join(llvm_dir, 'clang++')
|
||||
|
||||
|
||||
def update_electron_modules(dirname, target_arch, nodedir):
|
||||
env = os.environ.copy()
|
||||
version = get_electron_version()
|
||||
env['npm_config_arch'] = target_arch
|
||||
env['npm_config_target'] = version
|
||||
env['npm_config_nodedir'] = nodedir
|
||||
update_node_modules(dirname, env)
|
||||
execute_stdout([NPM, 'rebuild'], env, dirname)
|
||||
|
||||
|
||||
def update_node_modules(dirname, env=None):
|
||||
if env is None:
|
||||
env = os.environ.copy()
|
||||
if PLATFORM == 'linux':
|
||||
# Use prebuilt clang for building native modules.
|
||||
set_clang_env(env)
|
||||
env['npm_config_clang'] = '1'
|
||||
with scoped_cwd(dirname):
|
||||
args = [NPM, 'install']
|
||||
if is_verbose_mode():
|
||||
args += ['--verbose']
|
||||
# Ignore npm install errors when running in CI.
|
||||
if os.environ.has_key('CI'):
|
||||
try:
|
||||
execute_stdout(args, env)
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
else:
|
||||
execute_stdout(args, env)
|
||||
|
||||
def add_exec_bit(filename):
|
||||
os.chmod(filename, os.stat(filename).st_mode | stat.S_IEXEC)
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export LIMIT_OUTPUT_IGNORE_SEGFAULTS=1
|
|
@ -1,40 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from lib.util import electron_gyp
|
||||
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
|
||||
PROJECT_NAME = electron_gyp()['project_name%']
|
||||
PRODUCT_NAME = electron_gyp()['product_name%']
|
||||
|
||||
|
||||
def main():
|
||||
os.chdir(SOURCE_ROOT)
|
||||
|
||||
config = 'D'
|
||||
if '-R' in sys.argv:
|
||||
config = 'R'
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
electron = os.path.join(SOURCE_ROOT, 'out', config,
|
||||
'{0}.app'.format(PRODUCT_NAME), 'Contents',
|
||||
'MacOS', PRODUCT_NAME)
|
||||
elif sys.platform == 'win32':
|
||||
electron = os.path.join(SOURCE_ROOT, 'out', config,
|
||||
'{0}.exe'.format(PROJECT_NAME))
|
||||
else:
|
||||
electron = os.path.join(SOURCE_ROOT, 'out', config, PROJECT_NAME)
|
||||
|
||||
try:
|
||||
subprocess.check_call([electron] + sys.argv[1:])
|
||||
except KeyboardInterrupt:
|
||||
return -1
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
|
@ -1,82 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# This script will check out llvm and clang into third_party/llvm and build it.
|
||||
|
||||
# Do NOT CHANGE this if you don't know what you're doing -- see
|
||||
# https://code.google.com/p/chromium/wiki/UpdatingClang
|
||||
# Reverting problematic clang rolls is safe, though.
|
||||
CLANG_REVISION=325667
|
||||
|
||||
# This is incremented when pushing a new build of Clang at the same revision.
|
||||
CLANG_SUB_REVISION=1
|
||||
|
||||
PACKAGE_VERSION="${CLANG_REVISION}-${CLANG_SUB_REVISION}"
|
||||
|
||||
THIS_DIR="$(dirname "${0}")"
|
||||
LLVM_DIR="${THIS_DIR}/../vendor/llvm"
|
||||
LLVM_BUILD_DIR="${LLVM_DIR}/../llvm-build/Release+Asserts"
|
||||
STAMP_FILE="${LLVM_DIR}/../llvm-build/cr_build_revision"
|
||||
|
||||
# ${A:-a} returns $A if it's set, a else.
|
||||
LLVM_REPO_URL=${LLVM_URL:-https://llvm.org/svn/llvm-project}
|
||||
|
||||
CDS_URL=https://commondatastorage.googleapis.com/chromium-browser-clang
|
||||
S3_URL=https://s3.amazonaws.com/gh-contractor-zcbenz/clang
|
||||
|
||||
|
||||
# Die if any command dies, error on undefined variable expansions.
|
||||
set -eu
|
||||
|
||||
|
||||
OS="$(uname -s)"
|
||||
|
||||
# Check if there's anything to be done, exit early if not.
|
||||
if [[ -f "${STAMP_FILE}" ]]; then
|
||||
PREVIOUSLY_BUILT_REVISON=$(cat "${STAMP_FILE}")
|
||||
if [[ "${PREVIOUSLY_BUILT_REVISON}" = "${PACKAGE_VERSION}" ]]; then
|
||||
echo "Clang already at ${PACKAGE_VERSION}"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
# To always force a new build if someone interrupts their build half way.
|
||||
rm -f "${STAMP_FILE}"
|
||||
|
||||
# Check if there's a prebuilt binary and if so just fetch that. That's faster,
|
||||
# and goma relies on having matching binary hashes on client and server too.
|
||||
CDS_FILE="clang-${PACKAGE_VERSION}.tgz"
|
||||
CDS_OUT_DIR=$(mktemp -d -t clang_download.XXXXXX)
|
||||
CDS_OUTPUT="${CDS_OUT_DIR}/${CDS_FILE}"
|
||||
if [ "${OS}" = "Linux" ]; then
|
||||
ARCH="$(uname -m)"
|
||||
if [ "${ARCH}" = "aarch64" ]; then
|
||||
CDS_FULL_URL="${S3_URL}/arm64/${CDS_FILE}"
|
||||
else
|
||||
CDS_FULL_URL="${CDS_URL}/Linux_x64/${CDS_FILE}"
|
||||
fi
|
||||
elif [ "${OS}" = "Darwin" ]; then
|
||||
CDS_FULL_URL="${CDS_URL}/Mac/${CDS_FILE}"
|
||||
fi
|
||||
echo Trying to download prebuilt clang
|
||||
if which curl > /dev/null; then
|
||||
curl -L --fail "${CDS_FULL_URL}" -o "${CDS_OUTPUT}" || \
|
||||
rm -rf "${CDS_OUT_DIR}"
|
||||
elif which wget > /dev/null; then
|
||||
wget "${CDS_FULL_URL}" -O "${CDS_OUTPUT}" || rm -rf "${CDS_OUT_DIR}"
|
||||
else
|
||||
echo "Neither curl nor wget found. Please install one of these."
|
||||
exit 1
|
||||
fi
|
||||
if [ -f "${CDS_OUTPUT}" ]; then
|
||||
rm -rf "${LLVM_BUILD_DIR}"
|
||||
mkdir -p "${LLVM_BUILD_DIR}"
|
||||
tar -xzf "${CDS_OUTPUT}" -C "${LLVM_BUILD_DIR}"
|
||||
echo clang "${PACKAGE_VERSION}" unpacked
|
||||
echo "${PACKAGE_VERSION}" > "${STAMP_FILE}"
|
||||
rm -rf "${CDS_OUT_DIR}"
|
||||
exit 0
|
||||
else
|
||||
echo Did not find prebuilt clang "${PACKAGE_VERSION}", building
|
||||
fi
|
105
script/update.py
105
script/update.py
|
@ -1,105 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from lib.config import get_target_arch, PLATFORM
|
||||
from lib.util import get_host_arch, import_vs_env
|
||||
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
|
||||
|
||||
def main():
|
||||
os.chdir(SOURCE_ROOT)
|
||||
|
||||
if PLATFORM != 'win32' and platform.architecture()[0] != '64bit':
|
||||
print 'Electron is required to be built on a 64bit machine'
|
||||
return 1
|
||||
|
||||
update_external_binaries()
|
||||
return update_gyp()
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Update build configurations')
|
||||
parser.add_argument('--defines', default='',
|
||||
help='The build variables passed to gyp')
|
||||
group = parser.add_mutually_exclusive_group(required=False)
|
||||
group.add_argument('--msvs', action='store_true',
|
||||
help='Generate Visual Studio project')
|
||||
group.add_argument('--xcode', action='store_true',
|
||||
help='Generate XCode project')
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def update_external_binaries():
|
||||
uf = os.path.join('script', 'update-external-binaries.py')
|
||||
subprocess.check_call([sys.executable, uf])
|
||||
|
||||
|
||||
def update_gyp():
|
||||
# Since gyp doesn't support specify link_settings for each configuration,
|
||||
# we are not able to link to different libraries in "Debug" and "Release"
|
||||
# configurations.
|
||||
# In order to work around this, we decided to generate the configuration
|
||||
# for twice, one is to generate "Debug" config, the other one to generate
|
||||
# the "Release" config. And the settings are controlled by the variable
|
||||
# "libchromiumcontent_component" which is defined before running gyp.
|
||||
target_arch = get_target_arch()
|
||||
return (run_gyp(target_arch, 0) or run_gyp(target_arch, 1))
|
||||
|
||||
|
||||
def run_gyp(target_arch, component):
|
||||
# Update the VS build env.
|
||||
import_vs_env(target_arch)
|
||||
|
||||
env = os.environ.copy()
|
||||
if PLATFORM == 'linux' and target_arch != get_host_arch():
|
||||
env['GYP_CROSSCOMPILE'] = '1'
|
||||
elif PLATFORM == 'win32':
|
||||
env['GYP_MSVS_VERSION'] = '2017'
|
||||
python = sys.executable
|
||||
if sys.platform == 'cygwin':
|
||||
# Force using win32 python on cygwin.
|
||||
python = os.path.join('vendor', 'python_26', 'python.exe')
|
||||
gyp = os.path.join('vendor', 'gyp', 'gyp_main.py')
|
||||
gyp_pylib = os.path.join(os.path.dirname(gyp), 'pylib')
|
||||
# Avoid using the old gyp lib in system.
|
||||
env['PYTHONPATH'] = os.path.pathsep.join([gyp_pylib,
|
||||
env.get('PYTHONPATH', '')])
|
||||
# Whether to build for Mac App Store.
|
||||
if os.environ.has_key('MAS_BUILD'):
|
||||
mas_build = 1
|
||||
else:
|
||||
mas_build = 0
|
||||
|
||||
defines = [
|
||||
'-Dlibchromiumcontent_component={0}'.format(component),
|
||||
'-Dtarget_arch={0}'.format(target_arch),
|
||||
'-Dhost_arch={0}'.format(get_host_arch()),
|
||||
'-Dlibrary=static_library',
|
||||
'-Dmas_build={0}'.format(mas_build),
|
||||
]
|
||||
|
||||
# Add the defines passed from command line.
|
||||
args = parse_args()
|
||||
for define in [d.strip() for d in args.defines.split(' ')]:
|
||||
if define:
|
||||
defines += ['-D' + define]
|
||||
|
||||
generator = 'ninja'
|
||||
if args.msvs:
|
||||
generator = 'msvs-ninja'
|
||||
elif args.xcode:
|
||||
generator = 'xcode-ninja'
|
||||
|
||||
return subprocess.call([python, gyp, '-f', generator, '--depth', '.',
|
||||
'electron.gyp', '-Icommon.gypi'] + defines, env=env)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
362
toolchain.gypi
362
toolchain.gypi
|
@ -1,362 +0,0 @@
|
|||
{
|
||||
'variables': {
|
||||
# Clang stuff.
|
||||
'make_clang_dir%': 'vendor/llvm-build/Release+Asserts',
|
||||
# Set this to true when building with Clang.
|
||||
'clang%': 1,
|
||||
|
||||
# Set this to the absolute path to sccache when building with sccache
|
||||
'cc_wrapper%': '',
|
||||
|
||||
# Path to mips64el toolchain.
|
||||
'make_mips64_dir%': 'vendor/gcc-4.8.3-d197-n64-loongson/usr',
|
||||
|
||||
'variables': {
|
||||
# The minimum macOS SDK version to use.
|
||||
'mac_sdk_min%': '10.12',
|
||||
|
||||
# Set ARM architecture version.
|
||||
'arm_version%': 7,
|
||||
|
||||
# Set NEON compilation flags.
|
||||
'arm_neon%': 1,
|
||||
|
||||
# Abosulte path to source root.
|
||||
'source_root%': '<!(node <(DEPTH)/tools/atom_source_root.js)',
|
||||
},
|
||||
|
||||
# Copy conditionally-set variables out one scope.
|
||||
'mac_sdk_min%': '<(mac_sdk_min)',
|
||||
'arm_version%': '<(arm_version)',
|
||||
'arm_neon%': '<(arm_neon)',
|
||||
'source_root%': '<(source_root)',
|
||||
|
||||
# Variables to control Link-Time Optimization (LTO).
|
||||
'use_lto%': 0,
|
||||
'use_lto_o2%': 0,
|
||||
|
||||
'conditions': [
|
||||
# Do not use Clang on Windows or when building for mips64el.
|
||||
['OS=="win" or target_arch=="mips64el"', {
|
||||
'clang%': 0,
|
||||
}], # OS=="win"
|
||||
|
||||
# Search for the available version of SDK.
|
||||
['OS=="mac"', {
|
||||
'mac_sdk%': '<!(python <(DEPTH)/tools/mac/find_sdk.py <(mac_sdk_min))',
|
||||
}],
|
||||
|
||||
['OS=="linux"', {
|
||||
'variables': {
|
||||
# The system libdir used for this ABI.
|
||||
'system_libdir%': 'lib',
|
||||
|
||||
# Setting the path to sysroot.
|
||||
'conditions': [
|
||||
['target_arch=="arm"', {
|
||||
# sysroot needs to be an absolute path otherwise it generates
|
||||
# incorrect results when passed to pkg-config
|
||||
'sysroot%': '<(source_root)/vendor/debian_stretch_arm-sysroot',
|
||||
}],
|
||||
['target_arch=="arm64"', {
|
||||
'sysroot%': '<(source_root)/vendor/debian_stretch_arm64-sysroot',
|
||||
}],
|
||||
['target_arch=="ia32"', {
|
||||
'sysroot%': '<(source_root)/vendor/debian_stretch_i386-sysroot',
|
||||
}],
|
||||
['target_arch=="x64"', {
|
||||
'sysroot%': '<(source_root)/vendor/debian_stretch_amd64-sysroot',
|
||||
}],
|
||||
['target_arch=="mips64el"', {
|
||||
'sysroot%': '<(source_root)/vendor/debian_jessie_mips64-sysroot',
|
||||
}],
|
||||
],
|
||||
},
|
||||
# Copy conditionally-set variables out one scope.
|
||||
'sysroot%': '<(sysroot)',
|
||||
'system_libdir%': '<(system_libdir)',
|
||||
|
||||
# Redirect pkg-config to search from sysroot.
|
||||
'pkg-config%': '<(source_root)/tools/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)" "<(system_libdir)"',
|
||||
}],
|
||||
|
||||
# Set default compiler flags depending on ARM version.
|
||||
['arm_version==6', {
|
||||
'arm_arch%': 'armv6',
|
||||
'arm_tune%': '',
|
||||
'arm_fpu%': 'vfp',
|
||||
'arm_float_abi%': 'softfp',
|
||||
'arm_thumb%': 0,
|
||||
}], # arm_version==6
|
||||
['arm_version==7', {
|
||||
'arm_arch%': 'armv7-a',
|
||||
'arm_tune%': 'generic-armv7-a',
|
||||
'conditions': [
|
||||
['arm_neon==1', {
|
||||
'arm_fpu%': 'neon',
|
||||
}, {
|
||||
'arm_fpu%': 'vfpv3-d16',
|
||||
}],
|
||||
],
|
||||
'arm_float_abi%': 'hard',
|
||||
'arm_thumb%': 1,
|
||||
}], # arm_version==7
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
# Setup cc_wrapper
|
||||
['cc_wrapper!=""', {
|
||||
'make_global_settings': [
|
||||
['CC_wrapper', '<(cc_wrapper)'],
|
||||
['CXX_wrapper', '<(cc_wrapper)'],
|
||||
['CC.host_wrapper', '<(cc_wrapper)'],
|
||||
['CXX.host_wrapper', '<(cc_wrapper)']
|
||||
],
|
||||
}],
|
||||
# Setup building with clang.
|
||||
['clang==1', {
|
||||
'make_global_settings': [
|
||||
['CC', '<(make_clang_dir)/bin/clang'],
|
||||
['CXX', '<(make_clang_dir)/bin/clang++'],
|
||||
['CC.host', '$(CC)'],
|
||||
['CXX.host', '$(CXX)'],
|
||||
],
|
||||
'target_defaults': {
|
||||
'xcode_settings': {
|
||||
'CC': '<(make_clang_dir)/bin/clang',
|
||||
'LDPLUSPLUS': '<(make_clang_dir)/bin/clang++',
|
||||
'OTHER_CFLAGS': [
|
||||
'-fcolor-diagnostics',
|
||||
],
|
||||
|
||||
'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
|
||||
'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++
|
||||
'CLANG_CXX_LANGUAGE_STANDARD': 'c++14', # -std=c++14
|
||||
},
|
||||
'target_conditions': [
|
||||
['_target_name in ["electron", "brightray"]', {
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'xcode_settings': {
|
||||
'OTHER_CFLAGS': [
|
||||
"-Xclang",
|
||||
"-load",
|
||||
"-Xclang",
|
||||
"<(source_root)/<(make_clang_dir)/lib/libFindBadConstructs.dylib",
|
||||
"-Xclang",
|
||||
"-add-plugin",
|
||||
"-Xclang",
|
||||
"find-bad-constructs",
|
||||
],
|
||||
},
|
||||
}, { # OS=="mac"
|
||||
'cflags_cc': [
|
||||
"-Xclang",
|
||||
"-load",
|
||||
"-Xclang",
|
||||
"<(source_root)/<(make_clang_dir)/lib/libFindBadConstructs.so",
|
||||
"-Xclang",
|
||||
"-add-plugin",
|
||||
"-Xclang",
|
||||
"find-bad-constructs",
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['OS=="mac" and _type in ["executable", "shared_library"]', {
|
||||
'xcode_settings': {
|
||||
# On some machines setting CLANG_CXX_LIBRARY doesn't work for
|
||||
# linker.
|
||||
'OTHER_LDFLAGS': [ '-stdlib=libc++' ],
|
||||
},
|
||||
}],
|
||||
['OS=="linux" and _toolset=="target"', {
|
||||
'cflags_cc': [
|
||||
'-std=c++14',
|
||||
'-nostdinc++',
|
||||
'-isystem<(libchromiumcontent_src_dir)/buildtools/third_party/libc++/trunk/include',
|
||||
'-isystem<(libchromiumcontent_src_dir)/buildtools/third_party/libc++abi/trunk/include',
|
||||
],
|
||||
'ldflags': [
|
||||
'-nostdlib++',
|
||||
],
|
||||
}],
|
||||
['OS=="linux" and _toolset=="host"', {
|
||||
'cflags_cc': [
|
||||
'-std=c++14',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
}], # clang==1
|
||||
|
||||
['target_arch=="mips64el"', {
|
||||
'make_global_settings': [
|
||||
['CC', '<(make_mips64_dir)/bin/mips64el-redhat-linux-gcc'],
|
||||
['CXX', '<(make_mips64_dir)/bin/mips64el-redhat-linux-g++'],
|
||||
['CC.host', '$(CC)'],
|
||||
['CXX.host', '$(CXX)'],
|
||||
],
|
||||
'target_defaults': {
|
||||
'cflags_cc': [
|
||||
'-std=c++14',
|
||||
],
|
||||
},
|
||||
}],
|
||||
|
||||
# Specify the SDKROOT.
|
||||
['OS=="mac"', {
|
||||
'target_defaults': {
|
||||
'xcode_settings': {
|
||||
'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
|
||||
},
|
||||
},
|
||||
}],
|
||||
|
||||
# Setup sysroot environment.
|
||||
['OS=="linux" and target_arch in ["arm", "ia32", "x64", "arm64", "mips64el"]', {
|
||||
'target_defaults': {
|
||||
'target_conditions': [
|
||||
['_toolset=="target"', {
|
||||
# Do not use 'cflags' to make sure sysroot is appended at last.
|
||||
'cflags_cc': [
|
||||
'--sysroot=<(sysroot)',
|
||||
],
|
||||
'cflags_c': [
|
||||
'--sysroot=<(sysroot)',
|
||||
],
|
||||
'ldflags': [
|
||||
'--sysroot=<(sysroot)',
|
||||
'<!(<(source_root)/tools/linux/sysroot_ld_path.sh <(sysroot))',
|
||||
],
|
||||
}]
|
||||
],
|
||||
},
|
||||
}], # sysroot
|
||||
|
||||
# Setup cross-compilation on Linux.
|
||||
['OS=="linux"', {
|
||||
'target_defaults': {
|
||||
'target_conditions': [
|
||||
['target_arch=="ia32" and _toolset=="target"', {
|
||||
'asflags': [
|
||||
'-32',
|
||||
],
|
||||
'cflags': [
|
||||
'-msse2',
|
||||
'-mfpmath=sse',
|
||||
'-mmmx', # Allows mmintrin.h for MMX intrinsics.
|
||||
'-m32',
|
||||
],
|
||||
'ldflags': [
|
||||
'-m32',
|
||||
],
|
||||
}], # target_arch=="ia32" and _toolset=="target"
|
||||
['target_arch=="x64" and _toolset=="target"', {
|
||||
'cflags': [
|
||||
'-m64',
|
||||
'-march=x86-64',
|
||||
],
|
||||
'ldflags': [
|
||||
'-m64',
|
||||
],
|
||||
}], # target_arch=="x64" and _toolset=="target"
|
||||
['target_arch=="arm" and _toolset=="target"', {
|
||||
'conditions': [
|
||||
['clang==0', {
|
||||
'cflags_cc': [
|
||||
'-Wno-abi',
|
||||
],
|
||||
}],
|
||||
['clang==1 and arm_arch!=""', {
|
||||
'cflags': [
|
||||
'-target arm-linux-gnueabihf',
|
||||
],
|
||||
'ldflags': [
|
||||
'-target arm-linux-gnueabihf',
|
||||
],
|
||||
}],
|
||||
['arm_arch!=""', {
|
||||
'cflags': [
|
||||
'-march=<(arm_arch)',
|
||||
],
|
||||
'conditions': [
|
||||
['use_lto==1 or use_lto_o2==1', {
|
||||
'ldflags': [
|
||||
'-march=<(arm_arch)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['arm_tune!=""', {
|
||||
'cflags': [
|
||||
'-mtune=<(arm_tune)',
|
||||
],
|
||||
'conditions': [
|
||||
['use_lto==1 or use_lto_o2==1', {
|
||||
'ldflags': [
|
||||
'-mtune=<(arm_tune)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['arm_fpu!=""', {
|
||||
'cflags': [
|
||||
'-mfpu=<(arm_fpu)',
|
||||
],
|
||||
'conditions': [
|
||||
['use_lto==1 or use_lto_o2==1', {
|
||||
'ldflags': [
|
||||
'-mfpu=<(arm_fpu)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['arm_float_abi!=""', {
|
||||
'cflags': [
|
||||
'-mfloat-abi=<(arm_float_abi)',
|
||||
],
|
||||
'conditions': [
|
||||
['use_lto==1 or use_lto_o2==1', {
|
||||
'ldflags': [
|
||||
'-mfloat-abi=<(arm_float_abi)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['arm_thumb==1', {
|
||||
'cflags': [
|
||||
'-mthumb',
|
||||
],
|
||||
'conditions': [
|
||||
['use_lto==1 or use_lto_o2==1', {
|
||||
'ldflags': [
|
||||
'-mthumb',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
],
|
||||
}], # target_arch=="arm64" and _toolset=="target"
|
||||
['target_arch=="arm64" and _toolset=="target"', {
|
||||
'conditions': [
|
||||
['clang==0', {
|
||||
'cflags_cc': [
|
||||
'-Wno-abi',
|
||||
],
|
||||
}],
|
||||
['clang==1 and arm_arch!=""', {
|
||||
'cflags': [
|
||||
'-target aarch64-linux-gnu',
|
||||
],
|
||||
'ldflags': [
|
||||
'-target aarch64-linux-gnu',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}], # target_arch=="arm" and _toolset=="target"
|
||||
],
|
||||
},
|
||||
}], # OS=="linux"
|
||||
],
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
Subproject commit f5f20660f20c281c1cbf1097ed55204b50711846
|
|
@ -1 +0,0 @@
|
|||
Subproject commit f72fa99d3e3d65e3bb9bed9d83429459d6f80c0d
|
|
@ -1 +0,0 @@
|
|||
Subproject commit eea8c793998f7d8b3c58bd7414b3fea62343df25
|
|
@ -1 +0,0 @@
|
|||
Subproject commit f3a3f588281aba034a0f1f85ca3c65eb5a3f7b66
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 6d1bdd3ebf860ff878a1b5db4fd26fdda3932e21
|
|
@ -1 +0,0 @@
|
|||
Subproject commit a5251e497fb52e699b28f627e3cbb6d8cefb62df
|
97
vsts.yml
97
vsts.yml
|
@ -1,97 +0,0 @@
|
|||
resources:
|
||||
- repo: self
|
||||
steps:
|
||||
- bash: |
|
||||
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||
echo 'Bootstrapping Electron for release build'
|
||||
script/bootstrap.py --target_arch=$TARGET_ARCH
|
||||
else
|
||||
echo 'Bootstrapping Electron for debug build'
|
||||
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
|
||||
fi
|
||||
name: Bootstrap
|
||||
|
||||
- bash: |
|
||||
npm run lint
|
||||
name: Lint
|
||||
condition: and(succeeded(), ne(variables['ELECTRON_RELEASE'], '1'))
|
||||
|
||||
- bash: |
|
||||
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||
echo 'Building Electron for release'
|
||||
script/build.py -c R
|
||||
else
|
||||
echo 'Building Electron for debug'
|
||||
script/build.py -c D
|
||||
fi
|
||||
name: Build
|
||||
|
||||
- bash: |
|
||||
echo 'Creating Electron release distribution'
|
||||
script/create-dist.py
|
||||
name: Create_distribution
|
||||
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
||||
|
||||
- bash: |
|
||||
if [ "$UPLOAD_TO_S3" != "1" ]; then
|
||||
echo 'Uploading Electron release distribution to github releases'
|
||||
ELECTRON_S3_BUCKET="$(s3_bucket)" ELECTRON_S3_ACCESS_KEY="$(s3_access_key)" ELECTRON_S3_SECRET_KEY="$(s3_secret_key)" ELECTRON_GITHUB_TOKEN="$(github_token)" script/upload.py
|
||||
else
|
||||
echo 'Uploading Electron release distribution to s3'
|
||||
ELECTRON_S3_BUCKET="$(s3_bucket)" ELECTRON_S3_ACCESS_KEY="$(s3_access_key)" ELECTRON_S3_SECRET_KEY="$(s3_secret_key)" ELECTRON_GITHUB_TOKEN="$(github_token)" script/upload.py --upload_to_s3
|
||||
fi
|
||||
name: Upload_distribution
|
||||
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
||||
|
||||
- bash: |
|
||||
echo 'Testing Electron build'
|
||||
mkdir junit
|
||||
export MOCHA_FILE="junit/test-results.xml"
|
||||
export MOCHA_REPORTER="mocha-junit-reporter"
|
||||
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||
script/test.py --ci --rebuild_native_modules -c R
|
||||
else
|
||||
script/test.py --ci --rebuild_native_modules
|
||||
fi
|
||||
name: Test
|
||||
condition: or(ne(variables['ELECTRON_RELEASE'], '1'), eq(variables['UPLOAD_TO_S3'], '1'))
|
||||
|
||||
- bash: |
|
||||
echo 'Verifying ffmpeg on build'
|
||||
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||
script/verify-ffmpeg.py -c R
|
||||
else
|
||||
script/verify-ffmpeg.py
|
||||
fi
|
||||
name: Verify_FFmpeg
|
||||
condition: or(ne(variables['ELECTRON_RELEASE'], '1'), eq(variables['UPLOAD_TO_S3'], '1'))
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish Test Results
|
||||
inputs:
|
||||
testResultsFiles: '**/test-*.xml'
|
||||
condition: and(always(), eq(variables['MOCHA_FILE'], 'test-results.xml'))
|
||||
|
||||
- bash: |
|
||||
export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
|
||||
export MESSAGE="Build failed for *<$BUILD_URL|$BUILD_DEFINITIONNAME>* nightly build."
|
||||
curl -g -H "Content-Type: application/json" -X POST \
|
||||
-d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
|
||||
name: Post_Slack_Notification_on_Failure
|
||||
condition: failed()
|
||||
|
||||
- bash: |
|
||||
export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
|
||||
export MESSAGE="Build succeeded for *<$BUILD_URL|$BUILD_DEFINITIONNAME>* nightly build."
|
||||
curl -g -H "Content-Type: application/json" -X POST \
|
||||
-d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
|
||||
name: Post_Slack_Notification_on_Success
|
||||
condition: succeeded()
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Build Artifacts
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.SourcesDirectory)/out'
|
||||
ArtifactName: out
|
||||
|
||||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
Загрузка…
Ссылка в новой задаче