2013-06-24 07:24:30 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import subprocess
|
|
|
|
import sys
|
|
|
|
|
|
|
|
from lib.util import *
|
|
|
|
|
|
|
|
|
2013-07-01 07:49:52 +00:00
|
|
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
2013-06-24 07:24:30 +00:00
|
|
|
NODE_VERSION = 'v0.10.12'
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
os.chdir(SOURCE_ROOT)
|
|
|
|
|
|
|
|
update_frameworks_and_node(NODE_VERSION)
|
|
|
|
update_gyp()
|
|
|
|
|
|
|
|
|
|
|
|
def update_frameworks_and_node(version):
|
2013-06-28 08:12:40 +00:00
|
|
|
if sys.platform == 'darwin':
|
2013-07-01 07:49:52 +00:00
|
|
|
uf = os.path.join('script', 'update-frameworks.py')
|
2013-06-28 08:12:40 +00:00
|
|
|
subprocess.check_call([sys.executable, uf])
|
|
|
|
|
2013-07-01 07:49:52 +00:00
|
|
|
un = os.path.join('script', 'update-node.py')
|
2013-06-24 07:24:30 +00:00
|
|
|
subprocess.check_call([sys.executable, un, '--version', version])
|
|
|
|
|
|
|
|
|
|
|
|
def update_gyp():
|
2013-07-01 07:49:52 +00:00
|
|
|
gyp = os.path.join('vendor', 'gyp', 'gyp')
|
|
|
|
python = sys.executable
|
|
|
|
if sys.platform == 'cygwin':
|
|
|
|
python = os.path.join('vendor', 'python_26', 'python.exe')
|
2013-07-02 01:33:11 +00:00
|
|
|
subprocess.call([python, gyp,
|
|
|
|
'-f', 'ninja', '--depth', '.', 'atom.gyp',
|
|
|
|
'-Icommon.gypi', '-Ivendor/brightray/brightray.gypi',
|
|
|
|
'-Dtarget_arch=ia32', '-Dlibrary=static_library'])
|
2013-06-24 07:24:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
sys.exit(main())
|