Example #1
0
def upload_node(bucket, access_key, secret_key, version):
  with scoped_cwd(DIST_DIR):
    s3put(bucket, access_key, secret_key, DIST_DIR,
          'atom-shell/dist/{0}'.format(version), glob.glob('node-*.tar.gz'))
    s3put(bucket, access_key, secret_key, DIST_DIR,
          'atom-shell/dist/{0}'.format(version), glob.glob('iojs-*.tar.gz'))

  if PLATFORM == 'win32':
    if get_target_arch() == 'ia32':
      node_lib = os.path.join(DIST_DIR, 'node.lib')
      iojs_lib = os.path.join(DIST_DIR, 'win-x86', 'iojs.lib')
    else:
      node_lib = os.path.join(DIST_DIR, 'x64', 'node.lib')
      iojs_lib = os.path.join(DIST_DIR, 'win-x64', 'iojs.lib')
    safe_mkdir(os.path.dirname(node_lib))
    safe_mkdir(os.path.dirname(iojs_lib))

    # Copy atom.lib to node.lib and iojs.lib.
    atom_lib = os.path.join(OUT_DIR, 'node.dll.lib')
    shutil.copy2(atom_lib, node_lib)
    shutil.copy2(atom_lib, iojs_lib)

    # Upload the node.lib.
    s3put(bucket, access_key, secret_key, DIST_DIR,
          'atom-shell/dist/{0}'.format(version), [node_lib])

    # Upload the iojs.lib.
    s3put(bucket, access_key, secret_key, DIST_DIR,
          'atom-shell/dist/{0}'.format(version), [iojs_lib])
def main():
  os.chdir(SOURCE_ROOT)

  args = parse_args()
  config = args.configuration

  if args.verbose:
    enable_verbose_mode()

  spec_modules = os.path.join(SOURCE_ROOT, 'spec', 'node_modules')
  out_dir = os.path.join(SOURCE_ROOT, 'out', config)
  version = get_electron_version()
  node_dir = os.path.join(out_dir, 'node-{0}'.format(version))

  # Create node headers
  script_path = os.path.join(SOURCE_ROOT, 'script', 'create-node-headers.py')
  execute_stdout([sys.executable, script_path, '--version', version,
                  '--directory', out_dir])

  if PLATFORM == 'win32':
    lib_dir = os.path.join(node_dir, 'Release')
    safe_mkdir(lib_dir)
    iojs_lib = os.path.join(lib_dir, 'iojs.lib')
    atom_lib = os.path.join(out_dir, 'node.dll.lib')
    shutil.copy2(atom_lib, iojs_lib)
    node_lib = os.path.join(lib_dir, 'node.lib')
    shutil.copy2(atom_lib, node_lib)

  # Native modules can only be compiled against release builds on Windows
  if config[0] == 'R' or PLATFORM != 'win32':
    update_electron_modules(os.path.dirname(spec_modules), get_target_arch(),
                            node_dir)
  else:
    update_node_modules(os.path.dirname(spec_modules))
Example #3
0
def main():
  args = parse_args()
  config = parse_config()

  base_url = args.base_url if args.base_url is not None else config['baseUrl']
  
  output_dir = os.path.join(SOURCE_ROOT, 'external_binaries')
  config_hash_path = os.path.join(output_dir, '.hash')

  if (not is_updated(config_hash_path) and not args.force):
    return

  rm_rf(output_dir)
  safe_mkdir(output_dir)

  for binary in config['files']:
    if not binary_should_be_downloaded(binary):
      continue

    temp_path = download_binary(base_url, binary['sha'], binary['name'])

    if temp_path.endswith('.zip'):
      extract_zip(temp_path, output_dir)
    else:
      tar = tarfile.open(temp_path, "r:gz")
      tar.extractall(output_dir)
      tar.close()

    # Hack alert. Set exec bit for sccache binaries.
    # https://bugs.python.org/issue15795
    if 'sccache' in binary['name']:
      add_exec_bit_to_sccache_binary(output_dir)

  with open(config_hash_path, 'w') as f:
    f.write(sha256(CONFIG_PATH))
Example #4
0
def main():
    args = parse_args()
    url_prefix = "{root_url}/{version}".format(**vars(args))

    os.chdir(SOURCE_ROOT)
    version_file = os.path.join(SOURCE_ROOT, 'external_binaries', '.version')

    if (is_updated(version_file, args.version)):
        return

    rm_rf('external_binaries')
    safe_mkdir('external_binaries')

    if sys.platform == 'darwin':
        download_and_unzip(url_prefix, 'Mantle')
        download_and_unzip(url_prefix, 'ReactiveCocoa')
        download_and_unzip(url_prefix, 'Squirrel')
    elif sys.platform in ['cygwin', 'win32']:
        download_and_unzip(url_prefix, 'directxsdk-' + get_target_arch())

    # get sccache & set exec bit. https://bugs.python.org/issue15795
    download_and_unzip(url_prefix, 'sccache-{0}-x64'.format(PLATFORM))
    appname = 'sccache'
    if sys.platform == 'win32':
        appname += '.exe'
    add_exec_bit(os.path.join('external_binaries', appname))

    with open(version_file, 'w') as f:
        f.write(args.version)
Example #5
0
def copy_headers(dist_headers_dir):
  safe_mkdir(dist_headers_dir)

  # Copy standard node headers from node. repository.
  for include_path in HEADERS_DIRS:
    abs_path = os.path.join(NODE_DIR, include_path)
    for dirpath, _, filenames in os.walk(abs_path):
      for filename in filenames:
        extension = os.path.splitext(filename)[1]
        if extension not in HEADERS_SUFFIX:
          continue
        copy_source_file(os.path.join(dirpath, filename), NODE_DIR,
                         dist_headers_dir)
  for other_file in HEADERS_FILES:
    copy_source_file(os.path.join(NODE_DIR, other_file), NODE_DIR,
                     dist_headers_dir)

  # Copy V8 headers from chromium's repository.
  src = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor', 'download',
                    'libchromiumcontent', 'src')
  for dirpath, _, filenames in os.walk(os.path.join(src, 'v8')):
    for filename in filenames:
      extension = os.path.splitext(filename)[1]
      if extension not in HEADERS_SUFFIX:
        continue
      copy_source_file(os.path.join(dirpath, filename), src,
                       os.path.join(dist_headers_dir, 'deps'))
def main():
    os.chdir(SOURCE_ROOT)

    args = parse_args()
    config = args.configuration

    if args.verbose:
        enable_verbose_mode()

    spec_modules = os.path.join(SOURCE_ROOT, 'spec', 'node_modules')
    out_dir = os.path.join(SOURCE_ROOT, 'out', config)
    version = get_electron_version()
    node_dir = os.path.join(out_dir, 'node-{0}'.format(version))

    # Create node headers
    script_path = os.path.join(SOURCE_ROOT, 'script', 'create-node-headers.py')
    execute_stdout([
        sys.executable, script_path, '--version', version, '--directory',
        out_dir
    ])

    if PLATFORM == 'win32':
        lib_dir = os.path.join(node_dir, 'Release')
        safe_mkdir(lib_dir)
        iojs_lib = os.path.join(lib_dir, 'iojs.lib')
        atom_lib = os.path.join(out_dir, 'node.dll.lib')
        shutil.copy2(atom_lib, iojs_lib)

    # Native modules can only be compiled against release builds on Windows
    if config == 'R' or PLATFORM != 'win32':
        update_electron_modules(os.path.dirname(spec_modules),
                                get_target_arch(), node_dir)
    else:
        update_node_modules(os.path.dirname(spec_modules))
Example #7
0
def main():
    args = parse_args()
    config = parse_config()

    base_url = args.base_url if args.base_url is not None else config['baseUrl']
    version = config['version']
    output_dir = os.path.join(SOURCE_ROOT, 'external_binaries')
    version_file = os.path.join(output_dir, '.version')

    if (is_updated(version_file, version) and not args.force):
        return

    rm_rf(output_dir)
    safe_mkdir(output_dir)

    for binary in config['binaries']:
        if not binary_should_be_downloaded(binary):
            continue

        temp_path = download_binary(base_url, version, binary['url'],
                                    binary['sha'])

        # We assume that all binaries are in zip archives.
        extract_zip(temp_path, output_dir)

        # Hack alert. Set exec bit for sccache binaries.
        # https://bugs.python.org/issue15795
        if 'sccache' in binary['url']:
            add_exec_bit_to_sccache_binary(output_dir)

    with open(version_file, 'w') as f:
        f.write(version)
def main():
  args = parse_args()
  url_prefix = "{root_url}/{version}".format(**vars(args))

  os.chdir(SOURCE_ROOT)
  version_file = os.path.join(SOURCE_ROOT, 'external_binaries', '.version')

  if (is_updated(version_file, args.version)):
    return

  rm_rf('external_binaries')
  safe_mkdir('external_binaries')

  if sys.platform == 'darwin':
    download_and_unzip(url_prefix, 'Mantle')
    download_and_unzip(url_prefix, 'ReactiveCocoa')
    download_and_unzip(url_prefix, 'Squirrel')
  elif sys.platform in ['cygwin', 'win32']:
    download_and_unzip(url_prefix, 'directxsdk-' + get_target_arch())

  # get sccache & set exec bit. https://bugs.python.org/issue15795
  download_and_unzip(url_prefix, 'sccache-{0}-x64'.format(PLATFORM))
  appname = 'sccache'
  if sys.platform == 'win32':
    appname += '.exe'
  add_exec_bit(os.path.join('external_binaries', appname))

  with open(version_file, 'w') as f:
    f.write(args.version)
Example #9
0
def upload_node(bucket, access_key, secret_key, version):
    with scoped_cwd(dist_dir()):
        s3put(bucket, access_key, secret_key,
              dist_dir(), 'atom-shell/dist/{0}'.format(version),
              glob.glob('node-*.tar.gz'))
        s3put(bucket, access_key, secret_key,
              dist_dir(), 'atom-shell/dist/{0}'.format(version),
              glob.glob('iojs-*.tar.gz'))

    if PLATFORM == 'win32':
        if get_target_arch() != 'x64':
            node_lib = os.path.join(dist_dir(), 'node.lib')
            iojs_lib = os.path.join(dist_dir(), 'win-x86', 'iojs.lib')
        else:
            node_lib = os.path.join(dist_dir(), 'x64', 'node.lib')
            iojs_lib = os.path.join(dist_dir(), 'win-x64', 'iojs.lib')
        safe_mkdir(os.path.dirname(node_lib))
        safe_mkdir(os.path.dirname(iojs_lib))

        # Copy atom.lib to node.lib and iojs.lib.
        atom_lib = os.path.join(output_dir(), 'node_import.lib')
        shutil.copy2(atom_lib, node_lib)
        shutil.copy2(atom_lib, iojs_lib)

        # Upload the node.lib.
        s3put(bucket, access_key, secret_key, dist_dir(),
              'atom-shell/dist/{0}'.format(version), [node_lib])

        # Upload the iojs.lib.
        s3put(bucket, access_key, secret_key, dist_dir(),
              'atom-shell/dist/{0}'.format(version), [iojs_lib])
Example #10
0
def copy_headers(dist_headers_dir):
    safe_mkdir(dist_headers_dir)

    # Copy standard node headers from node. repository.
    for include_path in HEADERS_DIRS:
        abs_path = os.path.join(NODE_DIR, include_path)
        for dirpath, _, filenames in os.walk(abs_path):
            for filename in filenames:
                extension = os.path.splitext(filename)[1]
                if extension not in HEADERS_SUFFIX:
                    continue
                copy_source_file(os.path.join(dirpath, filename), NODE_DIR,
                                 dist_headers_dir)
    for other_file in HEADERS_FILES:
        copy_source_file(os.path.join(NODE_DIR, other_file), NODE_DIR,
                         dist_headers_dir)

    # Copy V8 headers from chromium's repository.
    src = CHROMIUM_ROOT
    for dirpath, _, filenames in os.walk(os.path.join(src, 'v8')):
        for filename in filenames:
            extension = os.path.splitext(filename)[1]
            if extension not in HEADERS_SUFFIX:
                continue
            copy_source_file(os.path.join(dirpath, filename), src,
                             os.path.join(dist_headers_dir, 'deps'))
def main():
  args = parse_args()
  config = parse_config()

  base_url = args.base_url if args.base_url is not None else config['baseUrl']
  version = config['version']
  output_dir = os.path.join(SOURCE_ROOT, 'external_binaries')
  version_file = os.path.join(output_dir, '.version')

  if (is_updated(version_file, version)):
    return

  rm_rf(output_dir)
  safe_mkdir(output_dir)

  for binary in config['binaries']:
    if not binary_should_be_downloaded(binary):
      continue

    temp_path = download_binary(base_url, version, binary['url'])

    # We assume that all binaries are in zip archives.
    extract_zip(temp_path, output_dir)

    # Hack alert. Set exec bit for sccache binaries.
    # https://bugs.python.org/issue15795
    if 'sccache' in binary['url']:
      add_exec_bit_to_sccache_binary(output_dir)

  with open(version_file, 'w') as f:
    f.write(version)
Example #12
0
def main():
    safe_mkdir(dist_dir())

    args = parse_args()
    node_headers_dir = os.path.join(dist_dir(),
                                    'node-{0}'.format(args.version))
    node2_headers_dir = os.path.join(dist_dir(),
                                     'node-{0}-headers'.format(args.version))
    iojs_headers_dir = os.path.join(dist_dir(),
                                    'iojs-{0}'.format(args.version))
    iojs2_headers_dir = os.path.join(dist_dir(),
                                     'iojs-{0}-headers'.format(args.version))

    copy_headers(node_headers_dir)
    create_header_tarball(node_headers_dir)
    copy_headers(node2_headers_dir)
    create_header_tarball(node2_headers_dir)
    copy_headers(iojs_headers_dir)
    create_header_tarball(iojs_headers_dir)
    copy_headers(iojs2_headers_dir)
    create_header_tarball(iojs2_headers_dir)

    # Upload node's headers to S3.
    bucket, access_key, secret_key = s3_config()
    upload_node(bucket, access_key, secret_key, args.version)
Example #13
0
def main():
    args = parse_args()
    safe_mkdir(args.out_dir)
    if args.file:
        copy_debug_from_binary(args.file, args.out_dir, args.target_cpu,
                               args.compress)
    else:
        copy_debug_from_binaries(args.directory, args.out_dir, args.target_cpu,
                                 args.compress)
Example #14
0
def main():
  os.chdir(SOURCE_ROOT)

  rm_rf(SYMBOLS_DIR)
  safe_mkdir(SYMBOLS_DIR)
  for pdb in PDB_LIST:
    run_symstore(pdb, SYMBOLS_DIR, 'AtomShell')

  bucket, access_key, secret_key = s3_config()
  files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb')
  files = [f.lower() for f in files]
  upload_symbols(bucket, access_key, secret_key, files)
Example #15
0
def main():
  safe_mkdir(DIST_DIR)

  args = parse_args()
  dist_headers_dir = os.path.join(DIST_DIR, 'node-{0}'.format(args.version))

  copy_headers(dist_headers_dir)
  create_header_tarball(dist_headers_dir)

  # Upload node's headers to S3.
  bucket, access_key, secret_key = s3_config()
  upload_node(bucket, access_key, secret_key, args.version)
Example #16
0
def main():
    os.chdir(SOURCE_ROOT)

    rm_rf(SYMBOLS_DIR)
    safe_mkdir(SYMBOLS_DIR)
    for pdb in PDB_LIST:
        run_symstore(pdb, SYMBOLS_DIR, PRODUCT_NAME)

    bucket, access_key, secret_key = s3_config()
    files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb')
    files = [f.lower() for f in files]
    upload_symbols(bucket, access_key, secret_key, files)
Example #17
0
def main():
    if not authToken or authToken == "":
        raise Exception("Please set META_DUMPER_AUTH_HEADER")
    # Upload the index.json.
    with scoped_cwd(ELECTRON_DIR):
        safe_mkdir(OUT_DIR)
        index_json = os.path.relpath(os.path.join(OUT_DIR, 'index.json'))

        new_content = get_content()

        with open(index_json, "w") as f:
            f.write(new_content)

        store_artifact(OUT_DIR, 'atom-shell/dist', [index_json])
Example #18
0
def main():
  safe_mkdir(DIST_DIR)

  args = parse_args()
  node_headers_dir = os.path.join(DIST_DIR, 'node-{0}'.format(args.version))
  iojs_headers_dir = os.path.join(DIST_DIR, 'iojs-{0}'.format(args.version))
  iojs2_headers_dir = os.path.join(DIST_DIR,
                                   'iojs-{0}-headers'.format(args.version))

  copy_headers(node_headers_dir)
  create_header_tarball(node_headers_dir)
  copy_headers(iojs_headers_dir)
  create_header_tarball(iojs_headers_dir)
  copy_headers(iojs2_headers_dir)
  create_header_tarball(iojs2_headers_dir)
def main():
    safe_mkdir(DIST_DIR)

    args = parse_args()
    node_headers_dir = os.path.join(DIST_DIR, 'node-{0}'.format(args.version))
    iojs_headers_dir = os.path.join(DIST_DIR, 'iojs-{0}'.format(args.version))
    iojs2_headers_dir = os.path.join(DIST_DIR,
                                     'iojs-{0}-headers'.format(args.version))

    copy_headers(node_headers_dir)
    create_header_tarball(node_headers_dir)
    copy_headers(iojs_headers_dir)
    create_header_tarball(iojs_headers_dir)
    copy_headers(iojs2_headers_dir)
    create_header_tarball(iojs2_headers_dir)
Example #20
0
def upload_node(bucket, access_key, secret_key, version):
    with scoped_cwd(GEN_DIR):
        generated_tar = os.path.join(GEN_DIR, 'node_headers.tar.gz')
        for header_tar in HEADER_TAR_NAMES:
            versioned_header_tar = header_tar.format(version)
            shutil.copy2(generated_tar,
                         os.path.join(GEN_DIR, versioned_header_tar))

        s3put(bucket, access_key, secret_key,
              GEN_DIR, 'atom-shell/dist/{0}'.format(version),
              glob.glob('node-*.tar.gz'))
        s3put(bucket, access_key, secret_key,
              GEN_DIR, 'atom-shell/dist/{0}'.format(version),
              glob.glob('iojs-*.tar.gz'))

    if PLATFORM == 'win32':
        if get_target_arch() == 'ia32':
            node_lib = os.path.join(DIST_DIR, 'node.lib')
            iojs_lib = os.path.join(DIST_DIR, 'win-x86', 'iojs.lib')
            v4_node_lib = os.path.join(DIST_DIR, 'win-x86', 'node.lib')
        elif get_target_arch() == 'arm64':
            node_lib = os.path.join(DIST_DIR, 'arm64', 'node.lib')
            iojs_lib = os.path.join(DIST_DIR, 'win-arm64', 'iojs.lib')
            v4_node_lib = os.path.join(DIST_DIR, 'win-arm64', 'node.lib')
        else:
            node_lib = os.path.join(DIST_DIR, 'x64', 'node.lib')
            iojs_lib = os.path.join(DIST_DIR, 'win-x64', 'iojs.lib')
            v4_node_lib = os.path.join(DIST_DIR, 'win-x64', 'node.lib')
        safe_mkdir(os.path.dirname(node_lib))
        safe_mkdir(os.path.dirname(iojs_lib))

        # Copy electron.lib to node.lib and iojs.lib.
        electron_lib = os.path.join(OUT_DIR, 'electron.lib')
        shutil.copy2(electron_lib, node_lib)
        shutil.copy2(electron_lib, iojs_lib)
        shutil.copy2(electron_lib, v4_node_lib)

        # Upload the node.lib.
        s3put(bucket, access_key, secret_key, DIST_DIR,
              'atom-shell/dist/{0}'.format(version), [node_lib])

        # Upload the iojs.lib.
        s3put(bucket, access_key, secret_key, DIST_DIR,
              'atom-shell/dist/{0}'.format(version), [iojs_lib])

        # Upload the v4 node.lib.
        s3put(bucket, access_key, secret_key, DIST_DIR,
              'atom-shell/dist/{0}'.format(version), [v4_node_lib])
def main():
    if not authToken or authToken == "":
        raise Exception("Please set META_DUMPER_AUTH_HEADER")
    # Upload the index.json.
    with scoped_cwd(SOURCE_ROOT):
        safe_mkdir(OUT_DIR)
        index_json = os.path.relpath(os.path.join(OUT_DIR, 'index.json'))

        new_content = get_content()

        with open(index_json, "w") as f:
            f.write(new_content)

        bucket, access_key, secret_key = s3_config()
        s3put(bucket, access_key, secret_key, OUT_DIR, 'atom-shell/dist',
              [index_json])
Example #22
0
def main():
  if not authToken or authToken == "":
    raise Exception("Please set META_DUMPER_AUTH_HEADER")
  # Upload the index.json.
  with scoped_cwd(SOURCE_ROOT):
    safe_mkdir(OUT_DIR)
    index_json = os.path.relpath(os.path.join(OUT_DIR, 'index.json'))

    new_content = get_content()

    with open(index_json, "w") as f:
      f.write(new_content)

    bucket, access_key, secret_key = s3_config()
    s3put(bucket, access_key, secret_key, OUT_DIR, 'atom-shell/dist',
          [index_json])
Example #23
0
def main():
  safe_mkdir(DIST_DIR)

  args = parse_args()
  dist_headers_dir = os.path.join(DIST_DIR, 'node-{0}'.format(args.version))

  copy_headers(dist_headers_dir)
  create_header_tarball(dist_headers_dir)

  # Upload node's headers to S3.
  bucket, access_key, secret_key = s3_config()
  upload_node(bucket, access_key, secret_key, args.version)

  # Upload the SHASUMS.txt.
  execute([sys.executable,
           os.path.join(SOURCE_ROOT, 'script', 'upload-checksums.py'),
           '-v', args.version])
def main():
  os.chdir(SOURCE_ROOT)
  version_file = os.path.join(SOURCE_ROOT, 'external_binaries', '.version')

  safe_mkdir('external_binaries')
  if (is_updated(version_file, VERSION)):
    return

  with open(version_file, 'w') as f:
    f.write(VERSION)

  if sys.platform == 'darwin':
    download_and_unzip('Mantle')
    download_and_unzip('ReactiveCocoa')
    download_and_unzip('Squirrel')
  elif sys.platform in ['cygwin', 'win32']:
    download_and_unzip('directxsdk')
def main():
    os.chdir(SOURCE_ROOT)
    version_file = os.path.join(SOURCE_ROOT, "external_binaries", ".version")

    safe_mkdir("external_binaries")
    if is_updated(version_file, VERSION):
        return

    with open(version_file, "w") as f:
        f.write(VERSION)

    if sys.platform == "darwin":
        download_and_unzip("Mantle")
        download_and_unzip("ReactiveCocoa")
        download_and_unzip("Squirrel")
    elif sys.platform in ["cygwin", "win32"]:
        download_and_unzip("directxsdk")
Example #26
0
def upload_node(bucket, access_key, secret_key, version):
  with scoped_cwd(DIST_DIR):
    s3put(bucket, access_key, secret_key, DIST_DIR,
          'atom-shell/dist/{0}'.format(version), glob.glob('node-*.tar.gz'))

  if PLATFORM == 'win32':
    if get_target_arch() == 'ia32':
      node_lib = os.path.join(DIST_DIR, 'node.lib')
    else:
      node_lib = os.path.join(DIST_DIR, 'x64', 'node.lib')
      safe_mkdir(os.path.dirname(node_lib))

    # Copy atom.lib to node.lib
    atom_lib = os.path.join(OUT_DIR, 'node.dll.lib')
    shutil.copy2(atom_lib, node_lib)

    # Upload the node.lib.
    s3put(bucket, access_key, secret_key, DIST_DIR,
          'atom-shell/dist/{0}'.format(version), [node_lib])
Example #27
0
def main():
    if not authToken or authToken == "":
        raise Exception("Please set META_DUMPER_AUTH_HEADER")
    # Upload the index.json.
    with scoped_cwd(SOURCE_ROOT):
        safe_mkdir(OUT_DIR)
        index_json = os.path.relpath(os.path.join(OUT_DIR, 'index.json'))

        request = urllib2.Request(BASE_URL + version,
                                  headers={"Authorization": authToken})

        new_content = urllib2.urlopen(request).read()

        with open(index_json, "w") as f:
            f.write(new_content)

        bucket, access_key, secret_key = s3_config()
        s3put(bucket, access_key, secret_key, OUT_DIR, 'atom-shell/dist',
              [index_json])
def main():
  os.chdir(SOURCE_ROOT)
  version_file = os.path.join(SOURCE_ROOT, 'external_binaries', '.version')

  if (is_updated(version_file, VERSION)):
    return

  rm_rf('external_binaries')
  safe_mkdir('external_binaries')

  if sys.platform == 'darwin':
    download_and_unzip('Mantle')
    download_and_unzip('ReactiveCocoa')
    download_and_unzip('Squirrel')
  elif sys.platform in ['cygwin', 'win32']:
    download_and_unzip('directxsdk-' + get_target_arch())

  with open(version_file, 'w') as f:
    f.write(VERSION)
def main():
  args = parse_args()

  safe_mkdir(args.directory)

  node_headers_dir = os.path.join(args.directory,
                                  'node-{0}'.format(args.version))
  iojs_headers_dir = os.path.join(args.directory,
                                  'iojs-{0}'.format(args.version))
  iojs2_headers_dir = os.path.join(args.directory,
                                   'iojs-{0}-headers'.format(args.version))

  copy_headers(node_headers_dir)
  create_header_tarball(args.directory, node_headers_dir)

  copy_headers(iojs_headers_dir)
  create_header_tarball(args.directory, iojs_headers_dir)

  copy_headers(iojs2_headers_dir)
  create_header_tarball(args.directory, iojs2_headers_dir)
def main():
    args = parse_args()

    safe_mkdir(args.directory)

    node_headers_dir = os.path.join(args.directory,
                                    'node-{0}'.format(args.version))
    iojs_headers_dir = os.path.join(args.directory,
                                    'iojs-{0}'.format(args.version))
    iojs2_headers_dir = os.path.join(args.directory,
                                     'iojs-{0}-headers'.format(args.version))

    copy_headers(node_headers_dir)
    create_header_tarball(args.directory, node_headers_dir)

    copy_headers(iojs_headers_dir)
    create_header_tarball(args.directory, iojs_headers_dir)

    copy_headers(iojs2_headers_dir)
    create_header_tarball(args.directory, iojs2_headers_dir)
Example #31
0
def upload_node(bucket, access_key, secret_key, version):
  with scoped_cwd(GEN_DIR):
    generated_tar = os.path.join(GEN_DIR, 'node_headers.tar.gz')
    for header_tar in HEADER_TAR_NAMES:
      versioned_header_tar = header_tar.format(version)
      shutil.copy2(generated_tar, os.path.join(GEN_DIR, versioned_header_tar))

    s3put(bucket, access_key, secret_key, GEN_DIR,
          'atom-shell/dist/{0}'.format(version), glob.glob('node-*.tar.gz'))
    s3put(bucket, access_key, secret_key, GEN_DIR,
          'atom-shell/dist/{0}'.format(version), glob.glob('iojs-*.tar.gz'))

  if PLATFORM == 'win32':
    if get_target_arch() == 'ia32':
      node_lib = os.path.join(DIST_DIR, 'node.lib')
      iojs_lib = os.path.join(DIST_DIR, 'win-x86', 'iojs.lib')
      v4_node_lib = os.path.join(DIST_DIR, 'win-x86', 'node.lib')
    else:
      node_lib = os.path.join(DIST_DIR, 'x64', 'node.lib')
      iojs_lib = os.path.join(DIST_DIR, 'win-x64', 'iojs.lib')
      v4_node_lib = os.path.join(DIST_DIR, 'win-x64', 'node.lib')
    safe_mkdir(os.path.dirname(node_lib))
    safe_mkdir(os.path.dirname(iojs_lib))

    # Copy electron.lib to node.lib and iojs.lib.
    electron_lib = os.path.join(OUT_DIR, 'electron.lib')
    shutil.copy2(electron_lib, node_lib)
    shutil.copy2(electron_lib, iojs_lib)
    shutil.copy2(electron_lib, v4_node_lib)

    # Upload the node.lib.
    s3put(bucket, access_key, secret_key, DIST_DIR,
          'atom-shell/dist/{0}'.format(version), [node_lib])

    # Upload the iojs.lib.
    s3put(bucket, access_key, secret_key, DIST_DIR,
          'atom-shell/dist/{0}'.format(version), [iojs_lib])

    # Upload the v4 node.lib.
    s3put(bucket, access_key, secret_key, DIST_DIR,
          'atom-shell/dist/{0}'.format(version), [v4_node_lib])
Example #32
0
def copy_source_file(source, start=NODE_DIR, destination=DIST_HEADERS_DIR):
    relative = os.path.relpath(source, start=start)
    final_destination = os.path.join(destination, relative)
    safe_mkdir(os.path.dirname(final_destination))
    shutil.copy2(source, final_destination)
Example #33
0
def touch_x64_node_lib():
  x64_dir = os.path.join(OUT_DIR, 'x64')
  safe_mkdir(x64_dir)
  with open(os.path.join(x64_dir, 'node.lib'), 'w+') as node_lib:
    node_lib.write('Invalid library')
Example #34
0
def touch_x64_node_lib():
  x64_dir = os.path.join(OUT_DIR, 'x64')
  safe_mkdir(x64_dir)
  with open(os.path.join(x64_dir, 'node.lib'), 'w+') as node_lib:
    node_lib.write('Invalid library')
Example #35
0
def copy_files(source_files, output_dir):
    for source_file in source_files:
        output_path = os.path.join(output_dir, os.path.basename(source_file))
        safe_mkdir(os.path.dirname(output_path))
        shutil.copy2(source_file, output_path)
def main():
  os.chdir(SOURCE_ROOT)
  safe_mkdir('frameworks')
  download_and_unzip('Mantle')
  download_and_unzip('ReactiveCocoa')
  download_and_unzip('Squirrel')
Example #37
0
def touch_x64_node_lib():
    x64_dir = os.path.join(OUT_DIR, "x64")
    safe_mkdir(x64_dir)
    with open(os.path.join(x64_dir, "node.lib"), "w+") as node_lib:
        node_lib.write("Invalid library")
Example #38
0
def copy_files(source_files, output_dir):
  for source_file in source_files:
    output_path = os.path.join(output_dir, os.path.basename(source_file))
    safe_mkdir(os.path.dirname(output_path))
    shutil.copy2(source_file, output_path)
Example #39
0
def copy_source_file(source, start, destination):
    relative = os.path.relpath(source, start=start)
    final_destination = os.path.join(destination, relative)
    safe_mkdir(os.path.dirname(final_destination))
    shutil.copy2(source, final_destination)