def run_gyp(target_arch, component): env = os.environ.copy() if PLATFORM == 'linux' and target_arch != get_host_arch(): env['GYP_CROSSCOMPILE'] = '1' elif PLATFORM == 'win32': env['GYP_MSVS_VERSION'] = '2013' 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', 'brightray', '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), ] return subprocess.call([python, gyp, '-f', 'ninja', '--depth', '.', 'atom.gyp', '-Icommon.gypi'] + defines, env=env)
def run_gyp(target_arch, component): env = os.environ.copy() if PLATFORM == "linux" and target_arch != get_host_arch(): env["GYP_CROSSCOMPILE"] = "1" elif PLATFORM == "win32": env["GYP_MSVS_VERSION"] = "2013" 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", "brightray", "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), ] return subprocess.call( [python, gyp, "-f", "ninja", "--depth", ".", "electron.gyp", "-Icommon.gypi"] + defines, env=env )
def run_gyp(target_arch, component): env = os.environ.copy() python = sys.executable gyp = os.path.join('vendor', 'brightray', '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), ] generator = 'ninja' return subprocess.call([python, gyp, '-f', generator, '--depth', '.', 'meson.gyp', '-Icommon.gypi'] + defines, env=env)
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'] = '2015' 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', 'brightray', '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' return subprocess.call([ python, gyp, '-f', generator, '--depth', '.', 'electron.gyp', '-Icommon.gypi' ] + defines, env=env)
def run_gyp(target_arch, component): env = os.environ.copy() if PLATFORM == 'linux' and target_arch != get_host_arch(): env['GYP_CROSSCOMPILE'] = '1' 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', 'brightray', 'vendor', 'gyp', 'gyp_main.py') defines = [ '-Dlibchromiumcontent_component={0}'.format(component), '-Dtarget_arch={0}'.format(target_arch), '-Dhost_arch={0}'.format(get_host_arch()), '-Dlibrary=static_library', ] return subprocess.call([python, gyp, '-f', 'ninja', '--depth', '.', 'atom.gyp', '-Icommon.gypi'] + defines, env=env)
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'] = '2015' 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)
def DetectArch(gyp_defines): # Check for optional target_arch and only install for that architecture. # If target_arch is not specified, then only install for the host # architecture. if 'target_arch=x64' in gyp_defines: return 'amd64' elif 'target_arch=ia32' in gyp_defines: return 'i386' elif 'target_arch=arm' in gyp_defines: return 'arm' detected_host_arch = get_host_arch() if detected_host_arch == 'x64': return 'amd64' elif detected_host_arch == 'ia32': return 'i386' elif detected_host_arch == 'arm': return 'arm' else: print "Unknown host arch: %s" % detected_host_arch return None