From 66983c7f6759b7073a6146de0c347b931622aab1 Mon Sep 17 00:00:00 2001 From: Robo Date: Wed, 2 Jul 2014 00:09:54 +0530 Subject: [PATCH 01/14] inital config setup for x86 --- appveyor.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..59ae3d9eea --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,29 @@ +# appveyor file +# http://www.appveyor.com/docs/appveyor-yml +project_id: "fgmr18mx183acim0" + +version: "{build}" + +init: + - git config --global core.autocrlf input + +environment: + matrix: + - nodejs_version: 0.10 + +platform: + - x86 + +install: + - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) + - cmd: SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH% + - cmd: SET PATH=C:\python27;%PATH% + - cmd: python script/bootstrap.py + - python script/build.py + +test_script: + - node --version + - npm --version + - cmd: python script/test.py + +build: off From 58c56ce7aea12980f4be7e62840f461bb6f0cbc4 Mon Sep 17 00:00:00 2001 From: Robo Date: Wed, 2 Jul 2014 02:02:23 +0530 Subject: [PATCH 02/14] specify mode for windows --- script/lib/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/lib/util.py b/script/lib/util.py index c66dca810e..f5238660dc 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -30,7 +30,7 @@ def scoped_cwd(path): def download(text, url, path): - with open(path, 'w') as local_file: + with open(path, 'wb') as local_file: web_file = urllib2.urlopen(url) file_size = int(web_file.info().getheaders("Content-Length")[0]) downloaded_size = 0 From 279eb23b38cbc7ce1ce2523b8ac3400c11c2f60c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 7 Aug 2014 22:34:50 +0800 Subject: [PATCH 03/14] No need of project_id in appveyor.yml. --- appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 59ae3d9eea..0777b2dd56 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,5 @@ # appveyor file # http://www.appveyor.com/docs/appveyor-yml -project_id: "fgmr18mx183acim0" - version: "{build}" init: From c9702b56e2a01a04d347e5a9731cd61a5504b5b4 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 08:18:16 +0800 Subject: [PATCH 04/14] Build only Debug version. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 0777b2dd56..ad31a2c26f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,7 +17,7 @@ install: - cmd: SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH% - cmd: SET PATH=C:\python27;%PATH% - cmd: python script/bootstrap.py - - python script/build.py + - python script/build.py -c Debug test_script: - node --version From 0a0a408bf805a47e9c6c38433cbc46836d97080e Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 09:52:57 +0800 Subject: [PATCH 05/14] Upgrade to apm@0.89.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5af78a940b..083bf535eb 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ ], "devDependencies": { - "atom-package-manager": "0.84.x", + "atom-package-manager": "0.89.0", "coffee-script": "~1.7.1", "coffeelint": "~1.3.0" }, From e06c558a86298a470b2ad2844c8d2bce4fc8a2ab Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 10:58:26 +0800 Subject: [PATCH 06/14] Add lint scripts. --- appveyor.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ad31a2c26f..21164c739c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,11 +17,14 @@ install: - cmd: SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH% - cmd: SET PATH=C:\python27;%PATH% - cmd: python script/bootstrap.py - - python script/build.py -c Debug + - cmd: python script/build.py -c Debug test_script: - node --version - npm --version - - cmd: python script/test.py + - cmd: python script/cpplint.py + - cmd: python script/pylint.py + - cmd: python script/coffeelint.py + - cmd: python script/test.py --ci build: off From 3a65942b97881b1263fd1571aa78d503a427acb7 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 11:35:08 +0800 Subject: [PATCH 07/14] Make node version switching faster. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 21164c739c..f3e6f1e349 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,7 @@ platform: - x86 install: - - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) + - ps: Install-Product node $env:nodejs_version - cmd: SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH% - cmd: SET PATH=C:\python27;%PATH% - cmd: python script/bootstrap.py From 1cadc9221a90e8b0f195912e87c8278c76e31994 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 14:18:09 +0800 Subject: [PATCH 08/14] win: Download ATL binaries. --- script/update-external-binaries.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/update-external-binaries.py b/script/update-external-binaries.py index c2f9073064..5bb980118d 100755 --- a/script/update-external-binaries.py +++ b/script/update-external-binaries.py @@ -7,7 +7,7 @@ import os from lib.util import safe_mkdir, rm_rf, extract_zip, tempdir, download -VERSION = 'v0.1.0' +VERSION = 'v0.2.0' SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) FRAMEWORKS_URL = 'https://github.com/atom/atom-shell-frameworks/releases' \ '/download/' + VERSION @@ -28,6 +28,7 @@ def main(): download_and_unzip('ReactiveCocoa') download_and_unzip('Squirrel') elif sys.platform in ['cygwin', 'win32']: + download_and_unzip('atl') download_and_unzip('directxsdk') download_and_unzip('vs2012_crt') From 0f5d929c09a2a6fbd61889cb334091a8a41f3c2c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 14:18:32 +0800 Subject: [PATCH 09/14] win: Build with downloaded ATL instead of the ATL shipped by WDK. --- common.gypi | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/common.gypi b/common.gypi index 740da0baf5..4ef0f25d36 100644 --- a/common.gypi +++ b/common.gypi @@ -7,7 +7,6 @@ }], ['OS=="win" and (MSVS_VERSION=="2013e" or MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e")', { 'msvs_express': 1, - 'windows_driver_kit_path%': 'C:/WinDDK/7600.16385.1', },{ 'msvs_express': 0, }], @@ -135,6 +134,7 @@ 'msvs_cygwin_shell': 0, # Strangely setting it to 1 would make building under cygwin fail. 'msvs_disabled_warnings': [ 4005, # (node.h) macro redefinition + 4099, # PDB 'atls.pdb' was not found with 'atls.lib' 4189, # local variable is initialized but not referenced 4201, # (uv.h) nameless struct/union 4800, # (v8.h) forcing value to bool 'true' or 'false' @@ -211,21 +211,20 @@ 'msvs_settings': { 'VCLibrarianTool': { 'AdditionalLibraryDirectories': [ - '<(windows_driver_kit_path)/lib/ATL/i386', + 'external_binaries/atl/lib', ], }, 'VCLinkerTool': { 'AdditionalLibraryDirectories': [ - '<(windows_driver_kit_path)/lib/ATL/i386', + 'external_binaries/atl/lib', ], 'AdditionalDependencies': [ - 'atlthunk.lib', + 'atls.lib', ], }, }, 'msvs_system_include_dirs': [ - '<(windows_driver_kit_path)/inc/atl71', - '<(windows_driver_kit_path)/inc/mfc42', + 'external_binaries/atl/include', ], }, }], # msvs_express==1 From 336908eba091f9077afbf2ee30252aacf0f9633c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 15:45:24 +0800 Subject: [PATCH 10/14] win: Use absolute path for ATL. --- atom.gyp | 26 ++++++++++++++++++++++++++ common.gypi | 27 --------------------------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/atom.gyp b/atom.gyp index 4fbfcf95bd..3de8c7b1a9 100644 --- a/atom.gyp +++ b/atom.gyp @@ -800,5 +800,31 @@ }, # target generate_node_lib ], }], # OS==win + # Using Visual Studio Express. + ['msvs_express==1', { + 'target_defaults': { + 'defines!': [ + '_SECURE_ATL', + ], + 'msvs_settings': { + 'VCLibrarianTool': { + 'AdditionalLibraryDirectories': [ + '<(atom_source_root)/external_binaries/atl/lib', + ], + }, + 'VCLinkerTool': { + 'AdditionalLibraryDirectories': [ + '<(atom_source_root)/external_binaries/atl/lib', + ], + 'AdditionalDependencies': [ + 'atls.lib', + ], + }, + }, + 'msvs_system_include_dirs': [ + '<(atom_source_root)/external_binaries/atl/include', + ], + }, + }], # msvs_express==1 ], } diff --git a/common.gypi b/common.gypi index 4ef0f25d36..04b0977701 100644 --- a/common.gypi +++ b/common.gypi @@ -134,7 +134,6 @@ 'msvs_cygwin_shell': 0, # Strangely setting it to 1 would make building under cygwin fail. 'msvs_disabled_warnings': [ 4005, # (node.h) macro redefinition - 4099, # PDB 'atls.pdb' was not found with 'atls.lib' 4189, # local variable is initialized but not referenced 4201, # (uv.h) nameless struct/union 4800, # (v8.h) forcing value to bool 'true' or 'false' @@ -202,32 +201,6 @@ }, }, }], # clang==1 - # Using Visual Studio Express. - ['msvs_express==1', { - 'target_defaults': { - 'defines!': [ - '_SECURE_ATL', - ], - 'msvs_settings': { - 'VCLibrarianTool': { - 'AdditionalLibraryDirectories': [ - 'external_binaries/atl/lib', - ], - }, - 'VCLinkerTool': { - 'AdditionalLibraryDirectories': [ - 'external_binaries/atl/lib', - ], - 'AdditionalDependencies': [ - 'atls.lib', - ], - }, - }, - 'msvs_system_include_dirs': [ - 'external_binaries/atl/include', - ], - }, - }], # msvs_express==1 # The breakdpad on Windows assumes Debug_x64 and Release_x64 configurations. ['OS=="win"', { 'target_defaults': { From 724b29d6d489db02bc2049b0638319243674fe05 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 16:41:10 +0800 Subject: [PATCH 11/14] win: Fix calling lint scripts with win32 python. --- script/coffeelint.py | 20 +++++++------------- script/cpplint.py | 2 +- script/pylint.py | 2 +- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/script/coffeelint.py b/script/coffeelint.py index 76a53b4232..a62955fa81 100755 --- a/script/coffeelint.py +++ b/script/coffeelint.py @@ -3,33 +3,27 @@ import errno import glob import os -import subprocess import sys +from lib.util import execute -SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__)) + +SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def main(): os.chdir(SOURCE_ROOT) - coffeelint = os.path.join(SOURCE_ROOT, 'node_modules', 'coffeelint', 'bin', - 'coffeelint') + coffeelint = os.path.join(SOURCE_ROOT, 'node_modules', '.bin', 'coffeelint') + if sys.platform in ['win32', 'cygwin']: + coffeelint += '.cmd' settings = ['--quiet', '-f', os.path.join('script', 'coffeelint.json')] files = glob.glob('atom/browser/api/lib/*.coffee') + \ glob.glob('atom/renderer/api/lib/*.coffee') + \ glob.glob('atom/common/api/lib/*.coffee') + \ glob.glob('atom/browser/atom/*.coffee') - try: - subprocess.check_call(['node', coffeelint] + settings + files) - except OSError as e: - if e.errno == errno.ENOENT and sys.platform in ['win32', 'cygwin']: - subprocess.check_call(['node', coffeelint] + settings + files, - executable='C:/Program Files/nodejs/node.exe') - else: - raise - + execute([coffeelint] + settings + files) if __name__ == '__main__': sys.exit(main()) diff --git a/script/cpplint.py b/script/cpplint.py index 70b27b9201..e5db44d1db 100755 --- a/script/cpplint.py +++ b/script/cpplint.py @@ -23,7 +23,7 @@ IGNORE_FILES = [ os.path.join('atom', 'common', 'swap_or_assign.h'), ] -SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__)) +SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def main(): diff --git a/script/pylint.py b/script/pylint.py index b805abb72b..4aba3917b8 100755 --- a/script/pylint.py +++ b/script/pylint.py @@ -5,7 +5,7 @@ import os import subprocess import sys -SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__)) +SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def main(): From d175a998113fd2af8d22f41013a9a8afc647b4c5 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 17:32:00 +0800 Subject: [PATCH 12/14] Fix pylint warning. --- script/coffeelint.py | 1 - 1 file changed, 1 deletion(-) diff --git a/script/coffeelint.py b/script/coffeelint.py index a62955fa81..29f60f93d6 100755 --- a/script/coffeelint.py +++ b/script/coffeelint.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -import errno import glob import os import sys From 8d7a59161af3ceac8fae381747d09b70106fe7a5 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 17:37:59 +0800 Subject: [PATCH 13/14] win: Don't call pylint in CI. --- appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index f3e6f1e349..8980305193 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,7 +23,6 @@ test_script: - node --version - npm --version - cmd: python script/cpplint.py - - cmd: python script/pylint.py - cmd: python script/coffeelint.py - cmd: python script/test.py --ci From a378a719e9343a3d180f01ea8ea65684d849c860 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 21:31:51 +0800 Subject: [PATCH 14/14] Don't run tests. --- appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 8980305193..93fa245f5f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,6 +24,5 @@ test_script: - npm --version - cmd: python script/cpplint.py - cmd: python script/coffeelint.py - - cmd: python script/test.py --ci build: off