From: Cheng Zhao Date: Sun, 18 May 2014 15:03:46 +0000 (+0800) Subject: Download dirextx sdk dlls. X-Git-Tag: v0.12.5~2^2~5 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=8f9e0d8d59abc85d487279058a5f3743e7fb4f33;p=electron.git Download dirextx sdk dlls. --- diff --git a/atom.gyp b/atom.gyp index 01626006..0da45657 100644 --- a/atom.gyp +++ b/atom.gyp @@ -329,6 +329,8 @@ '<(libchromiumcontent_library_dir)/icudt.dll', '<(libchromiumcontent_library_dir)/libGLESv2.dll', '<(libchromiumcontent_resources_dir)/content_shell.pak', + 'frameworks/d3dcompiler_43.dll', + 'frameworks/xinput1_3.dll', ], }, { diff --git a/script/update-frameworks.py b/script/update-frameworks.py index f87be758..89f78847 100755 --- a/script/update-frameworks.py +++ b/script/update-frameworks.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import errno import sys import os @@ -8,15 +9,25 @@ from lib.util import safe_mkdir, extract_zip, tempdir, download SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) FRAMEWORKS_URL = 'https://github.com/atom/atom-shell-frameworks/releases' \ - '/download/v0.0.2' + '/download/v0.0.3' def main(): os.chdir(SOURCE_ROOT) - safe_mkdir('frameworks') - download_and_unzip('Mantle') - download_and_unzip('ReactiveCocoa') - download_and_unzip('Squirrel') + try: + os.makedirs('frameworks') + except OSError as e: + if e.errno != errno.EEXIST: + raise + else: + return + + 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 download_and_unzip(framework): @@ -26,11 +37,7 @@ def download_and_unzip(framework): def download_framework(framework): - framework_path = os.path.join('frameworks', framework) + '.framework' - if os.path.exists(framework_path): - return - - filename = framework + '.framework.zip' + filename = framework + '.zip' url = FRAMEWORKS_URL + '/' + filename download_dir = tempdir(prefix='atom-shell-') path = os.path.join(download_dir, filename) diff --git a/script/update.py b/script/update.py index 16e850ad..241d746e 100755 --- a/script/update.py +++ b/script/update.py @@ -16,9 +16,8 @@ def main(): def update_frameworks(): - if sys.platform == 'darwin': - uf = os.path.join('script', 'update-frameworks.py') - subprocess.check_call([sys.executable, uf]) + uf = os.path.join('script', 'update-frameworks.py') + subprocess.check_call([sys.executable, uf]) def update_gyp():