]> khamidou — GitHub mirrors - electron.git/commitdiff
Download dirextx sdk dlls.
authorCheng Zhao <zcbenz@gmail.com>
Sun, 18 May 2014 15:03:46 +0000 (23:03 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 18 May 2014 15:03:46 +0000 (23:03 +0800)
atom.gyp
script/update-frameworks.py
script/update.py

index 016260065ba68a005fdd59823cbd146416adf614..0da45657a6a291c36a4c84e7d584bc4073166184 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
                 '<(libchromiumcontent_library_dir)/icudt.dll',
                 '<(libchromiumcontent_library_dir)/libGLESv2.dll',
                 '<(libchromiumcontent_resources_dir)/content_shell.pak',
+                'frameworks/d3dcompiler_43.dll',
+                'frameworks/xinput1_3.dll',
               ],
             },
             {
index f87be75809dd957fff6bde1f016ea200c56d5b97..89f78847ae674878a7d04485615d19d28983290b 100755 (executable)
@@ -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)
index 16e850ad450263b989d9634832d778e047fcd736..241d746e6251e5e2320e63de09645947fa2eaf3c 100755 (executable)
@@ -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():