def parse_args(): parser = argparse.ArgumentParser(description='Build project') parser.add_argument('-c', '--configuration', help='Build with Release or Debug configuration', nargs='+', default=CONFIGURATIONS, required=False) parser.add_argument('-t', '--target', help='Build specified target', default=atom_gyp()['project_name%'], required=False) return parser.parse_args()
import os import subprocess import sys import tempfile from lib.config import PLATFORM, get_target_arch from lib.util import atom_gyp, execute, get_atom_shell_version, parse_version, \ get_chromedriver_version, scoped_cwd from lib.github import GitHub ATOM_SHELL_REPO = 'atom/electron' ATOM_SHELL_VERSION = get_atom_shell_version() CHROMEDRIVER_VERSION = get_chromedriver_version() PROJECT_NAME = atom_gyp()['project_name%'] PRODUCT_NAME = atom_gyp()['product_name%'] SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R') DIST_DIR = os.path.join(SOURCE_ROOT, 'dist') DIST_NAME = '{0}-{1}-{2}-{3}.zip'.format(PROJECT_NAME, ATOM_SHELL_VERSION, PLATFORM, get_target_arch()) SYMBOLS_NAME = '{0}-{1}-{2}-{3}-symbols.zip'.format(PROJECT_NAME, ATOM_SHELL_VERSION, PLATFORM, get_target_arch()) CHROMEDRIVER_NAME = 'chromedriver-{0}-{1}-{2}.zip'.format(CHROMEDRIVER_VERSION, PLATFORM,
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \ get_target_arch, get_chromedriver_version, \ get_platform_key from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \ execute, atom_gyp ATOM_SHELL_VERSION = get_atom_shell_version() SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) DIST_DIR = os.path.join(SOURCE_ROOT, 'dist') OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R') CHROMIUM_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor', 'download', 'libchromiumcontent', 'static_library') PROJECT_NAME = atom_gyp()['project_name%'] PRODUCT_NAME = atom_gyp()['product_name%'] TARGET_BINARIES = { 'darwin': [], 'win32': [ '{0}.exe'.format(PROJECT_NAME), # 'electron.exe' 'content_shell.pak', 'd3dcompiler_47.dll', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'msvcp120.dll', 'msvcr120.dll', 'ffmpeg.dll', 'node.dll',
def get_names_from_gyp(): variables = atom_gyp() return (variables['project_name%'], variables['product_name%'])
#!/usr/bin/env python import os import sys from lib.config import PLATFORM, s3_config from lib.util import atom_gyp, execute, s3put, scoped_cwd SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) OUT_DIR = os.path.join(SOURCE_ROOT, "out", "R") PROJECT_NAME = atom_gyp()["project_name%"] PRODUCT_NAME = atom_gyp()["product_name%"] def main(): # Upload the index.json. with scoped_cwd(SOURCE_ROOT): if sys.platform == "darwin": atom_shell = os.path.join(OUT_DIR, "{0}.app".format(PRODUCT_NAME), "Contents", "MacOS", PRODUCT_NAME) elif sys.platform == "win32": atom_shell = os.path.join(OUT_DIR, "{0}.exe".format(PROJECT_NAME)) else: atom_shell = os.path.join(OUT_DIR, PROJECT_NAME) index_json = os.path.relpath(os.path.join(OUT_DIR, "index.json")) execute([atom_shell, os.path.join("tools", "dump-version-info.js"), index_json]) bucket, access_key, secret_key = s3_config() s3put(bucket, access_key, secret_key, OUT_DIR, "atom-shell/dist", [index_json])