Add script to setup crashpad repository.
Crashpad use `gclient` to maintain its third_party libraries. This patch switches `gclient` instead of `git submodule` to align crashpad way.
This commit is contained in:
parent
cd8ceec62e
commit
16fb847009
3 changed files with 16 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,6 +6,7 @@
|
||||||
/vendor/brightray/vendor/download/
|
/vendor/brightray/vendor/download/
|
||||||
/vendor/python_26/
|
/vendor/python_26/
|
||||||
/vendor/npm/
|
/vendor/npm/
|
||||||
|
/vendor/.gclient
|
||||||
node_modules/
|
node_modules/
|
||||||
*.xcodeproj
|
*.xcodeproj
|
||||||
*.swp
|
*.swp
|
||||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -13,6 +13,3 @@
|
||||||
[submodule "vendor/native_mate"]
|
[submodule "vendor/native_mate"]
|
||||||
path = vendor/native_mate
|
path = vendor/native_mate
|
||||||
url = https://github.com/zcbenz/native-mate.git
|
url = https://github.com/zcbenz/native-mate.git
|
||||||
[submodule "vendor/crashpad"]
|
|
||||||
path = vendor/crashpad
|
|
||||||
url = https://github.com/hokein/crashpad.git
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ from lib.util import execute_stdout, get_atom_shell_version, scoped_cwd
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
VENDOR_DIR = os.path.join(SOURCE_ROOT, 'vendor')
|
VENDOR_DIR = os.path.join(SOURCE_ROOT, 'vendor')
|
||||||
PYTHON_26_URL = 'https://chromium.googlesource.com/chromium/deps/python_26'
|
PYTHON_26_URL = 'https://chromium.googlesource.com/chromium/deps/python_26'
|
||||||
|
CRACKPAD_URL = 'https://github.com/hokein/crashpad.git'
|
||||||
NPM = 'npm.cmd' if sys.platform in ['win32', 'cygwin'] else 'npm'
|
NPM = 'npm.cmd' if sys.platform in ['win32', 'cygwin'] else 'npm'
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,6 +28,8 @@ def main():
|
||||||
update_win32_python()
|
update_win32_python()
|
||||||
update_submodules()
|
update_submodules()
|
||||||
update_node_modules('.')
|
update_node_modules('.')
|
||||||
|
if sys.platform == 'darwin':
|
||||||
|
update_crashpad()
|
||||||
bootstrap_brightray(args.dev, args.url, args.target_arch)
|
bootstrap_brightray(args.dev, args.url, args.target_arch)
|
||||||
|
|
||||||
create_chrome_version_h()
|
create_chrome_version_h()
|
||||||
|
@ -92,6 +95,18 @@ def update_node_modules(dirname, env=None):
|
||||||
execute_stdout([NPM, 'install'], env)
|
execute_stdout([NPM, 'install'], env)
|
||||||
|
|
||||||
|
|
||||||
|
def update_crashpad():
|
||||||
|
gclient = os.path.join(VENDOR_DIR, 'depot_tools', 'gclient.py')
|
||||||
|
args = [
|
||||||
|
'config',
|
||||||
|
'--unmanaged',
|
||||||
|
CRACKPAD_URL,
|
||||||
|
]
|
||||||
|
with scoped_cwd(VENDOR_DIR):
|
||||||
|
execute_stdout([sys.executable, gclient] + args)
|
||||||
|
execute_stdout([sys.executable, gclient] + ['sync'])
|
||||||
|
|
||||||
|
|
||||||
def update_electron_modules(dirname, target_arch):
|
def update_electron_modules(dirname, target_arch):
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env['npm_config_arch'] = target_arch
|
env['npm_config_arch'] = target_arch
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue