From ca50cbb5ffe874db17604591fcc52605325ca96f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 16:59:44 +0800 Subject: [PATCH 01/21] Allow specifying the arch of libchromiumcontent to download --- .gitignore | 1 + script/bootstrap.py | 18 ++++++++++++------ vendor/brightray | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 4410f3035b..b18292e6ab 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ node_modules/ *.xcodeproj *.swp *.pyc +debug.log npm-debug.log diff --git a/script/bootstrap.py b/script/bootstrap.py index caf23ed501..ececbb6eae 100755 --- a/script/bootstrap.py +++ b/script/bootstrap.py @@ -4,7 +4,7 @@ import argparse import os import sys -from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, \ +from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, TARGET_PLATFORM, \ enable_verbose_mode, is_verbose_mode from lib.util import execute_stdout, scoped_cwd @@ -19,8 +19,7 @@ def main(): os.chdir(SOURCE_ROOT) args = parse_args() - if (args.yes is False and - sys.platform not in ('win32', 'cygwin')): + if not args.yes and TARGET_PLATFORM != 'win32': check_root() if args.verbose: enable_verbose_mode() @@ -28,7 +27,7 @@ def main(): update_win32_python() update_submodules() update_node_modules('.') - bootstrap_brightray(args.dev, args.url) + bootstrap_brightray(args.dev, args.url, args.target_arch) create_chrome_version_h() touch_config_gypi() @@ -53,8 +52,11 @@ def parse_args(): action='store_true', help='Run non-interactively by assuming "yes" to all ' \ 'prompts.') + parser.add_argument('--target_arch', default='default', + help='Manually specify the arch to build for') return parser.parse_args() + def check_root(): if os.geteuid() == 0: print "We suggest not running this as root, unless you're really sure." @@ -68,9 +70,13 @@ def update_submodules(): execute_stdout(['git', 'submodule', 'update', '--init', '--recursive']) -def bootstrap_brightray(is_dev, url): +def bootstrap_brightray(is_dev, url, target_arch): bootstrap = os.path.join(VENDOR_DIR, 'brightray', 'script', 'bootstrap') - args = ['--commit', LIBCHROMIUMCONTENT_COMMIT, url] + args = [ + '--commit', LIBCHROMIUMCONTENT_COMMIT, + '--target_arch', target_arch, + url, + ] if is_dev: args = ['--dev'] + args execute_stdout([sys.executable, bootstrap] + args) diff --git a/vendor/brightray b/vendor/brightray index f2b33daa4e..f44a383469 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit f2b33daa4ea5a1e1ba0a5b18a3f0470d99b6f962 +Subproject commit f44a3834690c010a1841cde92ca5e4798b1c9d2f From 1a6832d84996542129d0cb48370aaccd8404983f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 17:30:52 +0800 Subject: [PATCH 02/21] TARGET_PLATFORM => PLATFORM TARGET_PLATFORM is quite misleading since it is actually host platform. --- script/bootstrap.py | 4 ++-- script/create-dist.py | 26 +++++++++++++------------- script/dump-symbols.py | 8 ++++---- script/lib/config.py | 2 +- script/upload-node-headers.py | 4 ++-- script/upload.py | 14 +++++++------- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/script/bootstrap.py b/script/bootstrap.py index ececbb6eae..5dd2488902 100755 --- a/script/bootstrap.py +++ b/script/bootstrap.py @@ -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() diff --git a/script/create-dist.py b/script/create-dist.py index faa04038b1..4d1ae544c1 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -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) diff --git a/script/dump-symbols.py b/script/dump-symbols.py index 10471517b6..ccad30227b 100755 --- a/script/dump-symbols.py +++ b/script/dump-symbols.py @@ -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: diff --git a/script/lib/config.py b/script/lib/config.py index 388ca02fff..2c2a7eda41 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -17,7 +17,7 @@ DIST_ARCH = { '64bit': 'x64', }[ARCH] -TARGET_PLATFORM = { +PLATFORM = { 'cygwin': 'win32', 'darwin': 'darwin', 'linux2': 'linux', diff --git a/script/upload-node-headers.py b/script/upload-node-headers.py index 7add94b334..a971af78e5 100755 --- a/script/upload-node-headers.py +++ b/script/upload-node-headers.py @@ -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') diff --git a/script/upload.py b/script/upload.py index 677247a2e6..0c2b2ba6a3 100755 --- a/script/upload.py +++ b/script/upload.py @@ -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') From de016e72a57fb50622ace268f80310459406ae28 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 17:58:19 +0800 Subject: [PATCH 03/21] win: Build with the arch chosen by user --- script/create-dist.py | 8 ++++---- script/lib/config.py | 38 +++++++++++++++++++++++++++----------- script/update.py | 11 ++--------- script/upload.py | 8 ++++---- vendor/brightray | 2 +- 5 files changed, 38 insertions(+), 29 deletions(-) diff --git a/script/create-dist.py b/script/create-dist.py index 4d1ae544c1..a7ceb99f6e 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -8,7 +8,7 @@ import sys import stat from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \ - DIST_ARCH + get_target_arch from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \ execute, get_chromedriver_version @@ -155,7 +155,7 @@ def create_symbols(): def create_dist_zip(): dist_name = 'atom-shell-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION, - PLATFORM, DIST_ARCH) + PLATFORM, get_target_arch()) zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name) with scoped_cwd(DIST_DIR): @@ -168,7 +168,7 @@ def create_dist_zip(): def create_chromedriver_zip(): dist_name = 'chromedriver-{0}-{1}-{2}.zip'.format(get_chromedriver_version(), - PLATFORM, DIST_ARCH) + PLATFORM, get_target_arch()) zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name) with scoped_cwd(DIST_DIR): @@ -183,7 +183,7 @@ def create_chromedriver_zip(): def create_symbols_zip(): dist_name = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION, PLATFORM, - DIST_ARCH) + get_target_arch()) zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name) with scoped_cwd(DIST_DIR): diff --git a/script/lib/config.py b/script/lib/config.py index 2c2a7eda41..250c362206 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -1,22 +1,13 @@ #!/usr/bin/env python +import os import platform import sys + BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = 'f1ad1412461ba3345a27cfe935ffc872dba0ac5b' -ARCH = { - 'cygwin': '32bit', - 'darwin': '64bit', - 'linux2': platform.architecture()[0], - 'win32': '32bit', -}[sys.platform] -DIST_ARCH = { - '32bit': 'ia32', - '64bit': 'x64', -}[ARCH] - PLATFORM = { 'cygwin': 'win32', 'darwin': 'darwin', @@ -26,10 +17,35 @@ PLATFORM = { verbose_mode = False + +def get_target_arch(): + # Always build 64bit on OS X. + if PLATFORM == 'darwin': + return 'x64' + # Only build for host's arch on Linux. + elif PLATFORM == 'linux': + if platform.architecture()[0] == '32bit': + return 'ia32' + else: + return 'x64' + # On Windows it depends on user. + elif PLATFORM == 'win32': + target_arch_path = os.path.join(__file__, '..', '..', '..', 'vendor', + 'brightray', 'vendor', 'download', + 'libchromiumcontent', '.target_arch') + with open(os.path.normpath(target_arch_path)) as f: + target_arch = f.read().strip() + return target_arch + # Maybe we will support other platforms in future. + else: + return 'x64' + + def enable_verbose_mode(): print 'Running in verbose mode' global verbose_mode verbose_mode = True + def is_verbose_mode(): return verbose_mode diff --git a/script/update.py b/script/update.py index ba3380d67c..aaa07526c0 100755 --- a/script/update.py +++ b/script/update.py @@ -4,7 +4,7 @@ import os import subprocess import sys -from lib.config import DIST_ARCH +from lib.config import get_target_arch SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) @@ -23,14 +23,6 @@ def update_external_binaries(): def update_gyp(): - target_arch = DIST_ARCH - if sys.platform == 'darwin': - # Only have 64bit build on OS X. - target_arch = 'x64' - elif sys.platform in ['cygwin', 'win32']: - # Only have 32bit build on Windows. - target_arch = 'ia32' - # Since gyp doesn't support specify link_settings for each configuration, # we are not able to link to different libraries in "Debug" and "Release" # configurations. @@ -38,6 +30,7 @@ def update_gyp(): # for twice, one is to generate "Debug" config, the other one to generate # the "Release" config. And the settings are controlled by the variable # "libchromiumcontent_component" which is defined before running gyp. + target_arch = get_target_arch() return (run_gyp(target_arch, 0) or run_gyp(target_arch, 1)) diff --git a/script/upload.py b/script/upload.py index 0c2b2ba6a3..81fd28f58e 100755 --- a/script/upload.py +++ b/script/upload.py @@ -7,7 +7,7 @@ import subprocess import sys import tempfile -from lib.config import DIST_ARCH, PLATFORM +from lib.config import PLATFORM, get_target_arch from lib.util import execute, get_atom_shell_version, parse_version, \ get_chromedriver_version, scoped_cwd from lib.github import GitHub @@ -22,13 +22,13 @@ 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, PLATFORM, - DIST_ARCH) + get_target_arch()) SYMBOLS_NAME = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION, PLATFORM, - DIST_ARCH) + get_target_arch()) CHROMEDRIVER_NAME = 'chromedriver-{0}-{1}-{2}.zip'.format(CHROMEDRIVER_VERSION, PLATFORM, - DIST_ARCH) + get_target_arch()) def main(): diff --git a/vendor/brightray b/vendor/brightray index f44a383469..33367e86d3 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit f44a3834690c010a1841cde92ca5e4798b1c9d2f +Subproject commit 33367e86d33f2ba8bf3d9dc796b469e6d5855e20 From 6175380bc0f229eb55a14372391562f97db3c3e8 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 18:26:15 +0800 Subject: [PATCH 04/21] Explicit set default arch --- script/bootstrap.py | 4 ++-- script/lib/config.py | 18 ++++++++++++------ vendor/brightray | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/script/bootstrap.py b/script/bootstrap.py index 5dd2488902..4ca7526b7c 100755 --- a/script/bootstrap.py +++ b/script/bootstrap.py @@ -5,7 +5,7 @@ import os import sys from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \ - enable_verbose_mode, is_verbose_mode + enable_verbose_mode, is_verbose_mode, get_target_arch from lib.util import execute_stdout, scoped_cwd @@ -52,7 +52,7 @@ def parse_args(): action='store_true', help='Run non-interactively by assuming "yes" to all ' \ 'prompts.') - parser.add_argument('--target_arch', default='default', + parser.add_argument('--target_arch', default=get_target_arch(), help='Manually specify the arch to build for') return parser.parse_args() diff --git a/script/lib/config.py b/script/lib/config.py index 250c362206..a45822aa17 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import errno import os import platform import sys @@ -30,12 +31,17 @@ def get_target_arch(): return 'x64' # On Windows it depends on user. elif PLATFORM == 'win32': - target_arch_path = os.path.join(__file__, '..', '..', '..', 'vendor', - 'brightray', 'vendor', 'download', - 'libchromiumcontent', '.target_arch') - with open(os.path.normpath(target_arch_path)) as f: - target_arch = f.read().strip() - return target_arch + try: + target_arch_path = os.path.join(__file__, '..', '..', '..', 'vendor', + 'brightray', 'vendor', 'download', + 'libchromiumcontent', '.target_arch') + with open(os.path.normpath(target_arch_path)) as f: + return f.read().strip() + except IOError as e: + if e.errno != errno.ENOENT: + raise + # Build 32bit by default. + return 'ia32' # Maybe we will support other platforms in future. else: return 'x64' diff --git a/vendor/brightray b/vendor/brightray index 33367e86d3..d88754641e 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 33367e86d33f2ba8bf3d9dc796b469e6d5855e20 +Subproject commit d88754641e6905eeb8a62b102323369645768b53 From f32cd5a35e88302de8dda280ba88ead8ff87c45e Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 19:17:03 +0800 Subject: [PATCH 05/21] win: Suppress size loss warnings --- common.gypi | 1 + vendor/brightray | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index 912c6773a7..39d9e04b40 100644 --- a/common.gypi +++ b/common.gypi @@ -192,6 +192,7 @@ 4005, # (node.h) macro redefinition 4189, # local variable is initialized but not referenced 4201, # (uv.h) nameless struct/union + 4267, # conversion from 'size_t' to 'int', possible loss of data 4503, # decorated name length exceeded, name was truncated 4800, # (v8.h) forcing value to bool 'true' or 'false' 4819, # The file contains a character that cannot be represented in the current code page diff --git a/vendor/brightray b/vendor/brightray index d88754641e..081d3c1d3b 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit d88754641e6905eeb8a62b102323369645768b53 +Subproject commit 081d3c1d3bd2585ac2fc6ee77e6a0d547bc2f98f From aa07d5e55725018b62b716953d0c94dd4d28ccd7 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 19:51:11 +0800 Subject: [PATCH 06/21] win: Fix linking problem on x64 --- common.gypi | 63 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/common.gypi b/common.gypi index 39d9e04b40..4ae5e9e77c 100644 --- a/common.gypi +++ b/common.gypi @@ -107,27 +107,50 @@ 'OTHER_LDFLAGS': [ '-Wl,-all_load' ], }, }], - ['OS=="win" and libchromiumcontent_component==0', { + ['OS=="win"', { 'libraries': [ '-lwinmm.lib' ], - 'msvs_settings': { - 'VCLinkerTool': { - # There is nothing like "whole-archive" on Windows, so we - # have to manually force some objets files to be included - # by referencing them. - 'ForceSymbolReferences': [ - '_u_errorName_52', - '_ubidi_setPara_52', - '_ucsdet_getName_52', - '_ulocdata_close_52', - '_uregex_matches_52', - '_uscript_getCode_52', - '_usearch_setPattern_52', - '?createInstance@Transliterator@icu_52@@SAPAV12@ABVUnicodeString@2@W4UTransDirection@@AAW4UErrorCode@@@Z', - '?nameToUnicodeUTF8@IDNA@icu_52@@UBEXABVStringPiece@2@AAVByteSink@2@AAVIDNAInfo@2@AAW4UErrorCode@@@Z', - '?kLineOffsetNotFound@Function@v8@@2HB', - ], # '/INCLUDE' - }, - }, + 'conditions': [ + ['libchromiumcontent_component==0', { + 'variables': { + 'conditions': [ + ['target_arch=="ia32"', { + 'reference_symbols': [ + '_u_errorName_52', + '_ubidi_setPara_52', + '_ucsdet_getName_52', + '_ulocdata_close_52', + '_uregex_matches_52', + '_uscript_getCode_52', + '_usearch_setPattern_52', + '?createInstance@Transliterator@icu_52@@SAPAV12@ABVUnicodeString@2@W4UTransDirection@@AAW4UErrorCode@@@Z', + '?nameToUnicodeUTF8@IDNA@icu_52@@UBEXABVStringPiece@2@AAVByteSink@2@AAVIDNAInfo@2@AAW4UErrorCode@@@Z', + '?kLineOffsetNotFound@Function@v8@@2HB', + ], + }, { + 'reference_symbols': [ + 'u_errorName_52', + 'ubidi_setPara_52', + 'ucsdet_getName_52', + 'uidna_openUTS46_52', + 'ulocdata_close_52', + 'uregex_matches_52', + 'uscript_getCode_52', + 'usearch_setPattern_52', + '?createInstance@Transliterator@icu_52@@SAPEAV12@AEBVUnicodeString@2@W4UTransDirection@@AEAW4UErrorCode@@@Z' + ], + }], + ], + }, + 'msvs_settings': { + 'VCLinkerTool': { + # There is nothing like "whole-archive" on Windows, so we + # have to manually force some objets files to be included + # by referencing them. + 'ForceSymbolReferences': [ '<@(reference_symbols)' ], # '/INCLUDE' + }, + }, + }], + ], }], ['OS=="linux" and libchromiumcontent_component==0', { # Prevent the linker from stripping symbols. From 9e7c2a6fe493143ff195acfe55ec9809570052e2 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 20:15:31 +0800 Subject: [PATCH 07/21] spec: Suppress crash-reporter test on 64bit Windows --- spec/api-crash-reporter-spec.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/api-crash-reporter-spec.coffee b/spec/api-crash-reporter-spec.coffee index c9aa025ca3..3d78c3a6a3 100644 --- a/spec/api-crash-reporter-spec.coffee +++ b/spec/api-crash-reporter-spec.coffee @@ -17,6 +17,9 @@ describe 'crash-reporter module', -> beforeEach -> w = new BrowserWindow(show: false) afterEach -> w.destroy() + # It is not working on 64bit Windows. + return if process.platform is 'win32' and process.arch is 'x64 + it 'should send minidump when renderer crashes', (done) -> @timeout 60000 server = http.createServer (req, res) -> From b5450801d075cb3da87414fb651a28dea5cf9ce9 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 22:15:50 +0800 Subject: [PATCH 08/21] win: Upload node.dll.pdb --- script/upload-windows-pdb.py | 1 + 1 file changed, 1 insertion(+) diff --git a/script/upload-windows-pdb.py b/script/upload-windows-pdb.py index c9a5f279c3..b76fb7a099 100755 --- a/script/upload-windows-pdb.py +++ b/script/upload-windows-pdb.py @@ -11,6 +11,7 @@ SYMBOLS_DIR = 'dist\\symbols' DOWNLOAD_DIR = 'vendor\\brightray\\vendor\\download\\libchromiumcontent' PDB_LIST = [ 'out\\R\\atom.exe.pdb', + 'out\\R\\node.dll.pdb', ] From 03bdd8814ed7035df07596f4ce26d85e18c2f0c1 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 23:03:54 +0800 Subject: [PATCH 09/21] Fix typo --- spec/api-crash-reporter-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/api-crash-reporter-spec.coffee b/spec/api-crash-reporter-spec.coffee index 3d78c3a6a3..0e84403647 100644 --- a/spec/api-crash-reporter-spec.coffee +++ b/spec/api-crash-reporter-spec.coffee @@ -18,7 +18,7 @@ describe 'crash-reporter module', -> afterEach -> w.destroy() # It is not working on 64bit Windows. - return if process.platform is 'win32' and process.arch is 'x64 + return if process.platform is 'win32' and process.arch is 'x64' it 'should send minidump when renderer crashes', (done) -> @timeout 60000 From fabaa2af94baf7807719caff3e47b43af3c579ec Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 23:28:59 +0800 Subject: [PATCH 10/21] Upgrade breakpad and brightray --- vendor/breakpad | 2 +- vendor/brightray | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/breakpad b/vendor/breakpad index 1e937567e9..4427c11703 160000 --- a/vendor/breakpad +++ b/vendor/breakpad @@ -1 +1 @@ -Subproject commit 1e937567e92d2c3beed4556f3c68a4b0362b1e6d +Subproject commit 4427c1170387afe46eb3fad259436f1f9f5efa86 diff --git a/vendor/brightray b/vendor/brightray index 081d3c1d3b..80a002c4a2 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 081d3c1d3bd2585ac2fc6ee77e6a0d547bc2f98f +Subproject commit 80a002c4a239f347cc4e0eea7378054977520726 From c30d8068370baeb602f940d34f04ad291a938d2c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 23:40:10 +0800 Subject: [PATCH 11/21] win: Upload node.lib of x64 build --- script/upload-node-headers.py | 27 ++++++++++----------------- script/upload.py | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/script/upload-node-headers.py b/script/upload-node-headers.py index a971af78e5..ce32770073 100755 --- a/script/upload-node-headers.py +++ b/script/upload-node-headers.py @@ -7,7 +7,7 @@ import shutil import sys import tarfile -from lib.config import PLATFORM +from lib.config import PLATFORM, get_target_arch from lib.util import execute, safe_mkdir, scoped_cwd, s3_config, s3put @@ -110,19 +110,19 @@ def upload_node(bucket, access_key, secret_key, version): 'atom-shell/dist/{0}'.format(version), glob.glob('node-*.tar.gz')) if PLATFORM == 'win32': + target_arch = get_target_arch() + if 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 - node_lib = os.path.join(OUT_DIR, 'node.lib') atom_lib = os.path.join(OUT_DIR, 'node.dll.lib') shutil.copy2(atom_lib, node_lib) - # Upload the 32bit node.lib. - s3put(bucket, access_key, secret_key, OUT_DIR, - 'atom-shell/dist/{0}'.format(version), [node_lib]) - - # Upload the fake 64bit node.lib. - touch_x64_node_lib() - node_lib = os.path.join(OUT_DIR, 'x64', 'node.lib') - s3put(bucket, access_key, secret_key, OUT_DIR, + # Upload the node.lib. + s3put(bucket, access_key, secret_key, DIST_DIR, 'atom-shell/dist/{0}'.format(version), [node_lib]) # Upload the index.json @@ -136,12 +136,5 @@ def upload_node(bucket, access_key, secret_key, version): [index_json]) -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') - - if __name__ == '__main__': sys.exit(main()) diff --git a/script/upload.py b/script/upload.py index 81fd28f58e..4b9c0d4b60 100755 --- a/script/upload.py +++ b/script/upload.py @@ -57,17 +57,17 @@ def main(): upload_atom_shell(github, release_id, os.path.join(DIST_DIR, CHROMEDRIVER_NAME)) + if PLATFORM == 'win32': + # Upload PDBs to Windows symbol server. + execute([sys.executable, + os.path.join(SOURCE_ROOT, 'script', 'upload-windows-pdb.py')]) + + # Upload node headers. + execute([sys.executable, + os.path.join(SOURCE_ROOT, 'script', 'upload-node-headers.py'), + '-v', ATOM_SHELL_VERSION]) + if args.publish_release: - if PLATFORM == 'win32': - # Upload PDBs to Windows symbol server. - execute([sys.executable, - os.path.join(SOURCE_ROOT, 'script', 'upload-windows-pdb.py')]) - - # Upload node headers. - execute([sys.executable, - os.path.join(SOURCE_ROOT, 'script', 'upload-node-headers.py'), - '-v', ATOM_SHELL_VERSION]) - # Press the publish button. publish_release(github, release_id) From 8a418ba3473604ede7d903995e5b4cdfaae415ac Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 12 Apr 2015 00:01:10 +0800 Subject: [PATCH 12/21] Upload SHASUMS.txt when publishing release --- script/upload-node-headers.py | 10 ++-------- script/upload.py | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/script/upload-node-headers.py b/script/upload-node-headers.py index ce32770073..a2b9894382 100755 --- a/script/upload-node-headers.py +++ b/script/upload-node-headers.py @@ -47,11 +47,6 @@ def main(): 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 parse_args(): parser = argparse.ArgumentParser(description='upload sumsha file') @@ -110,8 +105,7 @@ def upload_node(bucket, access_key, secret_key, version): 'atom-shell/dist/{0}'.format(version), glob.glob('node-*.tar.gz')) if PLATFORM == 'win32': - target_arch = get_target_arch() - if target_arch == 'ia32': + 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') @@ -125,7 +119,7 @@ def upload_node(bucket, access_key, secret_key, version): s3put(bucket, access_key, secret_key, DIST_DIR, 'atom-shell/dist/{0}'.format(version), [node_lib]) - # Upload the index.json + # Upload the index.json. with scoped_cwd(SOURCE_ROOT): atom_shell = os.path.join(OUT_DIR, 'atom.exe') index_json = os.path.relpath(os.path.join(OUT_DIR, 'index.json')) diff --git a/script/upload.py b/script/upload.py index 4b9c0d4b60..692d506be2 100755 --- a/script/upload.py +++ b/script/upload.py @@ -46,9 +46,22 @@ def main(): sys.stderr.flush() return 1 - # Upload atom-shell with GitHub Releases API. github = GitHub(auth_token()) release_id = create_or_get_release_draft(github, args.version) + + if args.publish_release: + # Upload the SHASUMS.txt. + execute([sys.executable, + os.path.join(SOURCE_ROOT, 'script', 'upload-checksums.py'), + '-v', ATOM_SHELL_VERSION]) + + # Press the publish button. + publish_release(github, release_id) + + # Do not upload other files when passed "-p". + return + + # Upload atom-shell with GitHub Releases API. upload_atom_shell(github, release_id, os.path.join(DIST_DIR, DIST_NAME)) upload_atom_shell(github, release_id, os.path.join(DIST_DIR, SYMBOLS_NAME)) @@ -67,10 +80,6 @@ def main(): os.path.join(SOURCE_ROOT, 'script', 'upload-node-headers.py'), '-v', ATOM_SHELL_VERSION]) - if args.publish_release: - # Press the publish button. - publish_release(github, release_id) - def parse_args(): parser = argparse.ArgumentParser(description='upload distribution file') From f64a3dd349f3b0dd6fdc1057a2033bb3edde8b29 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 12 Apr 2015 00:02:45 +0800 Subject: [PATCH 13/21] Add win32-ia32 in index.json --- script/dump-version-info.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/dump-version-info.js b/script/dump-version-info.js index 165c4a8cd0..c49f7588ad 100644 --- a/script/dump-version-info.js +++ b/script/dump-version-info.js @@ -43,6 +43,8 @@ function getInfoForCurrentVersion() { 'linux-x64-symbols', 'win32-ia32', 'win32-ia32-symbols', + 'win32-x64', + 'win32-x64-symbols', ]; return json; From 6b1f2215b2117778bc10128f1a5ed30bb8235313 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 12 Apr 2015 11:23:41 +0800 Subject: [PATCH 14/21] win: Do not copy vc runtime dlls We now statically link with vc runtime. --- atom.gyp | 2 -- 1 file changed, 2 deletions(-) diff --git a/atom.gyp b/atom.gyp index ed09e23686..5f54b0f3ca 100644 --- a/atom.gyp +++ b/atom.gyp @@ -142,8 +142,6 @@ '<(libchromiumcontent_dir)/natives_blob.bin', '<(libchromiumcontent_dir)/snapshot_blob.bin', 'external_binaries/d3dcompiler_47.dll', - 'external_binaries/msvcp120.dll', - 'external_binaries/msvcr120.dll', 'external_binaries/vccorlib120.dll', 'external_binaries/xinput1_3.dll', ], From aa835ad38a03090eaa29ba701e22afcbcb8c1707 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 12 Apr 2015 11:36:55 +0800 Subject: [PATCH 15/21] Upload index.json when publishing release --- script/upload-index-json.py | 31 ++++++++++++++++++++++++++ script/upload-node-headers.py | 10 --------- script/upload.py | 4 ++++ {script => tools}/dump-version-info.js | 0 4 files changed, 35 insertions(+), 10 deletions(-) create mode 100755 script/upload-index-json.py rename {script => tools}/dump-version-info.js (100%) diff --git a/script/upload-index-json.py b/script/upload-index-json.py new file mode 100755 index 0000000000..52f441b701 --- /dev/null +++ b/script/upload-index-json.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +import os +import sys + +from lib.config import PLATFORM +from lib.util import execute, s3_config, s3put, scoped_cwd + + +SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) +OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R') + + +def main(): + # Upload the index.json. + with scoped_cwd(SOURCE_ROOT): + atom_shell = os.path.join(OUT_DIR, 'atom') + if PLATFORM == 'win32': + atom_shell += '.exe' + 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]) + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/script/upload-node-headers.py b/script/upload-node-headers.py index a2b9894382..136da07d93 100755 --- a/script/upload-node-headers.py +++ b/script/upload-node-headers.py @@ -119,16 +119,6 @@ def upload_node(bucket, access_key, secret_key, version): s3put(bucket, access_key, secret_key, DIST_DIR, 'atom-shell/dist/{0}'.format(version), [node_lib]) - # Upload the index.json. - with scoped_cwd(SOURCE_ROOT): - atom_shell = os.path.join(OUT_DIR, 'atom.exe') - index_json = os.path.relpath(os.path.join(OUT_DIR, 'index.json')) - execute([atom_shell, - os.path.join('script', 'dump-version-info.js'), - index_json]) - s3put(bucket, access_key, secret_key, OUT_DIR, 'atom-shell/dist', - [index_json]) - if __name__ == '__main__': sys.exit(main()) diff --git a/script/upload.py b/script/upload.py index 692d506be2..9cf0f04f3d 100755 --- a/script/upload.py +++ b/script/upload.py @@ -55,6 +55,10 @@ def main(): os.path.join(SOURCE_ROOT, 'script', 'upload-checksums.py'), '-v', ATOM_SHELL_VERSION]) + # Upload the index.json. + execute([sys.executable, + os.path.join(SOURCE_ROOT, 'script', 'upload-index-json.py')]) + # Press the publish button. publish_release(github, release_id) diff --git a/script/dump-version-info.js b/tools/dump-version-info.js similarity index 100% rename from script/dump-version-info.js rename to tools/dump-version-info.js From 6b1dd0d413505a9b5d03341b7215d0255898fd33 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 12 Apr 2015 12:00:02 +0800 Subject: [PATCH 16/21] s3_config should be in lib.config --- script/lib/config.py | 11 +++++++++++ script/lib/util.py | 11 ----------- script/upload-checksums.py | 3 ++- script/upload-index-json.py | 4 ++-- script/upload-node-headers.py | 4 ++-- script/upload-windows-pdb.py | 3 ++- 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/script/lib/config.py b/script/lib/config.py index a45822aa17..7fb314ac9a 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -47,6 +47,17 @@ def get_target_arch(): return 'x64' +def s3_config(): + config = (os.environ.get('ATOM_SHELL_S3_BUCKET', ''), + os.environ.get('ATOM_SHELL_S3_ACCESS_KEY', ''), + os.environ.get('ATOM_SHELL_S3_SECRET_KEY', '')) + message = ('Error: Please set the $ATOM_SHELL_S3_BUCKET, ' + '$ATOM_SHELL_S3_ACCESS_KEY, and ' + '$ATOM_SHELL_S3_SECRET_KEY environment variables') + assert all(len(c) for c in config), message + return config + + def enable_verbose_mode(): print 'Running in verbose mode' global verbose_mode diff --git a/script/lib/util.py b/script/lib/util.py index 698da95080..8864158985 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -176,17 +176,6 @@ def parse_version(version): return vs + ['0'] * (4 - len(vs)) -def s3_config(): - config = (os.environ.get('ATOM_SHELL_S3_BUCKET', ''), - os.environ.get('ATOM_SHELL_S3_ACCESS_KEY', ''), - os.environ.get('ATOM_SHELL_S3_SECRET_KEY', '')) - message = ('Error: Please set the $ATOM_SHELL_S3_BUCKET, ' - '$ATOM_SHELL_S3_ACCESS_KEY, and ' - '$ATOM_SHELL_S3_SECRET_KEY environment variables') - assert all(len(c) for c in config), message - return config - - def s3put(bucket, access_key, secret_key, prefix, key_prefix, files): args = [ 's3put', diff --git a/script/upload-checksums.py b/script/upload-checksums.py index b0378d834b..19b6643c6d 100755 --- a/script/upload-checksums.py +++ b/script/upload-checksums.py @@ -5,7 +5,8 @@ import hashlib import os import tempfile -from lib.util import download, rm_rf, s3_config, s3put +from lib.config import s3_config +from lib.util import download, rm_rf, s3put DIST_URL = 'https://atom.io/download/atom-shell/' diff --git a/script/upload-index-json.py b/script/upload-index-json.py index 52f441b701..6bec55f2a9 100755 --- a/script/upload-index-json.py +++ b/script/upload-index-json.py @@ -3,8 +3,8 @@ import os import sys -from lib.config import PLATFORM -from lib.util import execute, s3_config, s3put, scoped_cwd +from lib.config import PLATFORM, s3_config +from lib.util import execute, s3put, scoped_cwd SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) diff --git a/script/upload-node-headers.py b/script/upload-node-headers.py index 136da07d93..86335b2b63 100755 --- a/script/upload-node-headers.py +++ b/script/upload-node-headers.py @@ -7,8 +7,8 @@ import shutil import sys import tarfile -from lib.config import PLATFORM, get_target_arch -from lib.util import execute, safe_mkdir, scoped_cwd, s3_config, s3put +from lib.config import PLATFORM, get_target_arch, s3_config +from lib.util import execute, safe_mkdir, scoped_cwd, s3put SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) diff --git a/script/upload-windows-pdb.py b/script/upload-windows-pdb.py index b76fb7a099..71c0c672db 100755 --- a/script/upload-windows-pdb.py +++ b/script/upload-windows-pdb.py @@ -3,7 +3,8 @@ import os import glob -from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config +from lib.config import s3_config +from lib.util import execute, rm_rf, safe_mkdir, s3put SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) From b9b7928e7dc1c6ef6ebb5a9e9a0832555f4a8051 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 12 Apr 2015 12:45:18 +0800 Subject: [PATCH 17/21] Move version info to atom.gyp and discard apm dependency Fixes #1408. Closes #1359. --- atom.gyp | 1 + package.json | 8 -------- script/bootstrap.py | 23 +++++++++++------------ script/bump-version.py | 12 ++++++------ script/dump-symbols.py | 8 +++----- script/lib/util.py | 20 ++++++++++++++------ 6 files changed, 35 insertions(+), 37 deletions(-) diff --git a/atom.gyp b/atom.gyp index 5f54b0f3ca..a05ff617e5 100644 --- a/atom.gyp +++ b/atom.gyp @@ -2,6 +2,7 @@ 'variables': { 'project_name%': 'atom', 'product_name%': 'Atom', + 'version%': '0.22.3', 'atom_source_root': ' Date: Sun, 12 Apr 2015 12:52:07 +0800 Subject: [PATCH 18/21] Don't push when bumping version --- script/bump-version.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/script/bump-version.py b/script/bump-version.py index c256fd4228..59ff0a7330 100755 --- a/script/bump-version.py +++ b/script/bump-version.py @@ -32,7 +32,6 @@ def main(): update_version_h(versions) update_info_plist(version) tag_version(version) - git_push() def increase_version(versions, index): @@ -118,10 +117,5 @@ def tag_version(version): execute(['git', 'tag', 'v{0}'.format(version)]) -def git_push(): - execute(['git', 'push']) - execute(['git', 'push', '--tags']) - - if __name__ == '__main__': sys.exit(main()) From b53123d5e77f7e5efe006948c299696d36e88529 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 12 Apr 2015 12:55:38 +0800 Subject: [PATCH 19/21] Add clean script --- script/clean.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 script/clean.py diff --git a/script/clean.py b/script/clean.py new file mode 100755 index 0000000000..f27ee9cbea --- /dev/null +++ b/script/clean.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +import os +import sys + +from lib.util import rm_rf + + +SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + + +def main(): + os.chdir(SOURCE_ROOT) + rm_rf('node_modules') + rm_rf('out') + rm_rf('spec/node_modules') + + +if __name__ == '__main__': + sys.exit(main()) From a724d6d684c12ff01759bbb0ecce8273940a9bb6 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 12 Apr 2015 12:59:04 +0800 Subject: [PATCH 20/21] Bump v0.23.0 --- atom.gyp | 2 +- atom/browser/resources/mac/Info.plist | 2 +- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/atom.gyp b/atom.gyp index a05ff617e5..8eb93aef68 100644 --- a/atom.gyp +++ b/atom.gyp @@ -2,7 +2,7 @@ 'variables': { 'project_name%': 'atom', 'product_name%': 'Atom', - 'version%': '0.22.3', + 'version%': '0.23.0', 'atom_source_root': 'CFBundleIconFile atom.icns CFBundleVersion - 0.22.3 + 0.23.0 LSMinimumSystemVersion 10.8.0 NSMainNibFile diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index ac228c0752..adb8d85d01 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,22,3,0 - PRODUCTVERSION 0,22,3,0 + FILEVERSION 0,23,0,0 + PRODUCTVERSION 0,23,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,12 +68,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Atom-Shell" - VALUE "FileVersion", "0.22.3" + VALUE "FileVersion", "0.23.0" VALUE "InternalName", "atom.exe" VALUE "LegalCopyright", "Copyright (C) 2013 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "atom.exe" VALUE "ProductName", "Atom-Shell" - VALUE "ProductVersion", "0.22.3" + VALUE "ProductVersion", "0.23.0" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index f68794dfa8..e492e424fc 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -6,8 +6,8 @@ #define ATOM_VERSION_H #define ATOM_MAJOR_VERSION 0 -#define ATOM_MINOR_VERSION 22 -#define ATOM_PATCH_VERSION 3 +#define ATOM_MINOR_VERSION 23 +#define ATOM_PATCH_VERSION 0 #define ATOM_VERSION_IS_RELEASE 1 From d19a1063d571f3265584c6fe93c0aef20f719bba Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 12 Apr 2015 13:15:11 +0800 Subject: [PATCH 21/21] Fix pylint warnings --- script/bootstrap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/bootstrap.py b/script/bootstrap.py index 2870e75ac1..ba9c0b0b1d 100755 --- a/script/bootstrap.py +++ b/script/bootstrap.py @@ -82,7 +82,9 @@ def bootstrap_brightray(is_dev, url, target_arch): execute_stdout([sys.executable, bootstrap] + args) -def update_node_modules(dirname, env=os.environ): +def update_node_modules(dirname, env=None): + if env is None: + env = os.environ with scoped_cwd(dirname): if is_verbose_mode(): execute_stdout([NPM, 'install', '--verbose'], env)