electron/brightray/script/build

37 lines
721 B
Text
Raw Normal View History

#!/usr/bin/env python
2013-03-13 19:12:05 +00:00
import os
import subprocess
import sys
2013-03-13 19:12:05 +00:00
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
GYP = {
'darwin': 'gyp',
'win32': 'gyp.bat',
}[sys.platform]
2013-05-14 17:29:35 +00:00
def main():
os.chdir(SOURCE_ROOT)
2013-05-14 17:29:35 +00:00
run_gyp()
build()
def run_gyp():
subprocess.check_call([GYP, '--depth', '.', 'brightray.gyp'])
2013-05-14 17:29:35 +00:00
def build():
if sys.platform == 'darwin':
subprocess.check_call(['xcodebuild'])
return
assert sys.platform == 'win32', sys.platform
msbuild = os.path.join(os.environ['windir'], 'Microsoft.NET', 'Framework', 'v4.0.30319', 'MSBuild.exe')
subprocess.check_call([msbuild, 'brightray.sln'])
if __name__ == '__main__':
sys.exit(main())