TARGET_PLATFORM => PLATFORM
TARGET_PLATFORM is quite misleading since it is actually host platform.
This commit is contained in:
Родитель
ca50cbb5ff
Коммит
1a6832d849
|
@ -4,7 +4,7 @@ import argparse
|
|||
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
|
||||
|
||||
|
@ -19,7 +19,7 @@ def main():
|
|||
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()
|
||||
|
|
|
@ -7,7 +7,7 @@ import subprocess
|
|||
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
|
||||
|
@ -79,7 +79,7 @@ def main():
|
|||
copy_chromedriver()
|
||||
copy_license()
|
||||
|
||||
if TARGET_PLATFORM == 'linux':
|
||||
if PLATFORM == 'linux':
|
||||
strip_binaries()
|
||||
copy_system_libraries()
|
||||
|
||||
|
@ -95,17 +95,17 @@ def force_build():
|
|||
|
||||
|
||||
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'
|
||||
|
@ -122,7 +122,7 @@ def copy_license():
|
|||
|
||||
|
||||
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)])
|
||||
|
||||
|
@ -155,25 +155,25 @@ def create_symbols():
|
|||
|
||||
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']
|
||||
|
@ -182,7 +182,7 @@ def create_chromedriver_zip():
|
|||
|
||||
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)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
from lib.config import TARGET_PLATFORM
|
||||
from lib.config import PLATFORM
|
||||
from lib.util import execute, rm_rf
|
||||
|
||||
|
||||
|
@ -15,20 +15,20 @@ CHROMIUM_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor',
|
|||
|
||||
|
||||
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:
|
||||
|
|
|
@ -17,7 +17,7 @@ DIST_ARCH = {
|
|||
'64bit': 'x64',
|
||||
}[ARCH]
|
||||
|
||||
TARGET_PLATFORM = {
|
||||
PLATFORM = {
|
||||
'cygwin': 'win32',
|
||||
'darwin': 'darwin',
|
||||
'linux2': 'linux',
|
||||
|
|
|
@ -7,7 +7,7 @@ import shutil
|
|||
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
|
||||
|
||||
|
||||
|
@ -109,7 +109,7 @@ def upload_node(bucket, access_key, secret_key, version):
|
|||
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')
|
||||
|
|
|
@ -7,7 +7,7 @@ import subprocess
|
|||
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
|
||||
|
@ -21,13 +21,13 @@ 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 = '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)
|
||||
|
||||
|
||||
|
@ -58,7 +58,7 @@ def main():
|
|||
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')])
|
||||
|
@ -83,10 +83,10 @@ def parse_args():
|
|||
|
||||
|
||||
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')
|
||||
|
|
Загрузка…
Ссылка в новой задаче