Skip to content

Commit 950c09f

Browse files
committed
Use depot_tools to provide ninja binary and cpplint.
1 parent 3cd910a commit 950c09f

File tree

5 files changed

+15
-3996
lines changed

5 files changed

+15
-3996
lines changed

.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
[submodule "vendor/brightray"]
22
path = vendor/brightray
3-
url = https://github.com/aroben/brightray.git
3+
url = https://github.com/brightray/brightray.git
44
[submodule "vendor/node"]
55
path = vendor/node
66
url = https://github.com/atom/cefode-node.git
77
[submodule "vendor/gyp"]
88
path = vendor/gyp
99
url = https://github.com/svn2github/gyp.git
10+
[submodule "vendor/depot_tools"]
11+
path = vendor/depot_tools
12+
url = https://chromium.googlesource.com/chromium/tools/depot_tools.git

script/build.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,20 @@
77

88

99
CONFIGURATIONS = ['Release', 'Debug']
10+
SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))
1011

1112

1213
def main():
14+
os.chdir(SOURCE_ROOT)
15+
16+
ninja = os.path.join('vendor', 'depot_tools', 'ninja')
17+
if sys.platform == 'win32':
18+
ninja += '.exe'
19+
1320
args = parse_args()
1421
for config in args.configuration:
1522
build_path = os.path.join('out', config)
16-
subprocess.call(['ninja', '-C', build_path])
23+
subprocess.call([ninja, '-C', build_path])
1724

1825

1926
def parse_args():

script/cpplint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import sys
77

88
OBJC_HEADERS = [
9+
'app/win/resource.h',
910
'browser/atom_event_processing_window.h',
1011
'browser/atom_application_mac.h',
1112
'browser/atom_application_delegate_mac.h',
@@ -36,7 +37,7 @@ def list_files(directories, filters):
3637

3738

3839
def call_cpplint(files):
39-
cpplint = os.path.join(SOURCE_ROOT, 'vendor', 'cpplint.py')
40+
cpplint = os.path.join(SOURCE_ROOT, 'vendor', 'depot_tools', 'cpplint.py')
4041
rules = '--filter=-build/header_guard,-build/include_what_you_use'
4142
subprocess.call([sys.executable, cpplint, rules] + files)
4243

0 commit comments

Comments
 (0)