TARGET_PLATFORM is quite misleading since it is actually host platform.
import os
import sys
-from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, TARGET_PLATFORM, \
+from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \
enable_verbose_mode, is_verbose_mode
from lib.util import execute_stdout, scoped_cwd
os.chdir(SOURCE_ROOT)
args = parse_args()
- if not args.yes and TARGET_PLATFORM != 'win32':
+ if not args.yes and PLATFORM != 'win32':
check_root()
if args.verbose:
enable_verbose_mode()
import sys
import stat
-from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, TARGET_PLATFORM, \
+from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \
DIST_ARCH
from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \
execute, get_chromedriver_version
copy_chromedriver()
copy_license()
- if TARGET_PLATFORM == 'linux':
+ if PLATFORM == 'linux':
strip_binaries()
copy_system_libraries()
def copy_binaries():
- for binary in TARGET_BINARIES[TARGET_PLATFORM]:
+ for binary in TARGET_BINARIES[PLATFORM]:
shutil.copy2(os.path.join(OUT_DIR, binary), DIST_DIR)
- for directory in TARGET_DIRECTORIES[TARGET_PLATFORM]:
+ for directory in TARGET_DIRECTORIES[PLATFORM]:
shutil.copytree(os.path.join(OUT_DIR, directory),
os.path.join(DIST_DIR, directory),
symlinks=True)
def copy_chromedriver():
- if TARGET_PLATFORM == 'win32':
+ if PLATFORM == 'win32':
chromedriver = 'chromedriver.exe'
else:
chromedriver = 'chromedriver'
def strip_binaries():
- for binary in TARGET_BINARIES[TARGET_PLATFORM]:
+ for binary in TARGET_BINARIES[PLATFORM]:
if binary.endswith('.so') or '.' not in binary:
execute(['strip', os.path.join(DIST_DIR, binary)])
def create_dist_zip():
dist_name = 'atom-shell-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
- TARGET_PLATFORM, DIST_ARCH)
+ PLATFORM, DIST_ARCH)
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
with scoped_cwd(DIST_DIR):
- files = TARGET_BINARIES[TARGET_PLATFORM] + ['LICENSE', 'version']
- if TARGET_PLATFORM == 'linux':
+ files = TARGET_BINARIES[PLATFORM] + ['LICENSE', 'version']
+ if PLATFORM == 'linux':
files += [lib for lib in SYSTEM_LIBRARIES if os.path.exists(lib)]
- dirs = TARGET_DIRECTORIES[TARGET_PLATFORM]
+ dirs = TARGET_DIRECTORIES[PLATFORM]
make_zip(zip_file, files, dirs)
def create_chromedriver_zip():
dist_name = 'chromedriver-{0}-{1}-{2}.zip'.format(get_chromedriver_version(),
- TARGET_PLATFORM, DIST_ARCH)
+ PLATFORM, DIST_ARCH)
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
with scoped_cwd(DIST_DIR):
files = ['LICENSE']
- if TARGET_PLATFORM == 'win32':
+ if PLATFORM == 'win32':
files += ['chromedriver.exe']
else:
files += ['chromedriver']
def create_symbols_zip():
dist_name = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION,
- TARGET_PLATFORM,
+ PLATFORM,
DIST_ARCH)
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
import os
import sys
-from lib.config import TARGET_PLATFORM
+from lib.config import PLATFORM
from lib.util import execute, rm_rf
def main(destination):
- if TARGET_PLATFORM == 'win32':
+ if PLATFORM == 'win32':
register_required_dll()
rm_rf(destination)
(project_name, product_name) = get_names_from_gyp()
- if TARGET_PLATFORM in ['darwin', 'linux']:
+ if PLATFORM in ['darwin', 'linux']:
# Generate the dump_syms tool.
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
execute([sys.executable, build, '-c', 'R', '-t', 'dump_syms'])
generate_breakpad_symbols = os.path.join(SOURCE_ROOT, 'tools', 'posix',
'generate_breakpad_symbols.py')
- if TARGET_PLATFORM == 'darwin':
+ if PLATFORM == 'darwin':
start = os.path.join(OUT_DIR, '{0}.app'.format(product_name), 'Contents',
'MacOS', product_name)
else:
'64bit': 'x64',
}[ARCH]
-TARGET_PLATFORM = {
+PLATFORM = {
'cygwin': 'win32',
'darwin': 'darwin',
'linux2': 'linux',
import sys
import tarfile
-from lib.config import TARGET_PLATFORM
+from lib.config import PLATFORM
from lib.util import execute, safe_mkdir, scoped_cwd, s3_config, s3put
s3put(bucket, access_key, secret_key, DIST_DIR,
'atom-shell/dist/{0}'.format(version), glob.glob('node-*.tar.gz'))
- if TARGET_PLATFORM == 'win32':
+ if PLATFORM == 'win32':
# Copy atom.lib to node.lib
node_lib = os.path.join(OUT_DIR, 'node.lib')
atom_lib = os.path.join(OUT_DIR, 'node.dll.lib')
import sys
import tempfile
-from lib.config import DIST_ARCH, TARGET_PLATFORM
+from lib.config import DIST_ARCH, PLATFORM
from lib.util import execute, get_atom_shell_version, parse_version, \
get_chromedriver_version, scoped_cwd
from lib.github import GitHub
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
DIST_NAME = 'atom-shell-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
- TARGET_PLATFORM,
+ PLATFORM,
DIST_ARCH)
SYMBOLS_NAME = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION,
- TARGET_PLATFORM,
+ PLATFORM,
DIST_ARCH)
CHROMEDRIVER_NAME = 'chromedriver-{0}-{1}-{2}.zip'.format(CHROMEDRIVER_VERSION,
- TARGET_PLATFORM,
+ PLATFORM,
DIST_ARCH)
os.path.join(DIST_DIR, CHROMEDRIVER_NAME))
if args.publish_release:
- if TARGET_PLATFORM == 'win32':
+ if PLATFORM == 'win32':
# Upload PDBs to Windows symbol server.
execute([sys.executable,
os.path.join(SOURCE_ROOT, 'script', 'upload-windows-pdb.py')])
def get_atom_shell_build_version():
- if TARGET_PLATFORM == 'darwin':
+ if PLATFORM == 'darwin':
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'R', 'Atom.app',
'Contents', 'MacOS', 'Atom')
- elif TARGET_PLATFORM == 'win32':
+ elif PLATFORM == 'win32':
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'R', 'atom.exe')
else:
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'R', 'atom')