Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: infra/bots/assets/win_vulkan_sdk/create.py

Issue 2188543002: Add Vulkan runtime dll (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Remove Vulkan_flavor Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/bots/assets/win_vulkan_sdk/VERSION ('k') | infra/bots/assets/win_vulkan_sdk/create_and_upload.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/assets/win_vulkan_sdk/create.py
diff --git a/infra/bots/assets/win_vulkan_sdk/create.py b/infra/bots/assets/win_vulkan_sdk/create.py
new file mode 100644
index 0000000000000000000000000000000000000000..993345555c630b3cb38e6002a57233d3effddd25
--- /dev/null
+++ b/infra/bots/assets/win_vulkan_sdk/create.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+"""Create the asset."""
+
+
+import argparse
+import shutil
+import sys
+import os
+
+
+def create_asset(target_dir, sdk_path, runtime_path):
+ """Create the asset."""
+ if not os.path.isdir(target_dir):
+ os.makedirs(target_dir)
+ shutil.copytree(sdk_path, target_dir)
+ shutil.copyfile(runtime_path, os.path.join(target_dir, "vulkan-1.dll"))
+
+def main():
+ if sys.platform != 'win32':
+ print >> sys.stderr, 'This script only runs on Windows.'
+ sys.exit(1)
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--target_dir', '-t', required=True)
+ parser.add_argument('--sdk_path', '-s', required=True)
+ parser.add_argument('--runtime_path', '-r',
+ default=os.path.join("C:","System32","vulkan-1.dll"),
+ required=True)
+ args = parser.parse_args()
+ create_asset(args.target_dir, args.sdk_path, args.runtime_path)
+
+
+if __name__ == '__main__':
+ main()
« no previous file with comments | « infra/bots/assets/win_vulkan_sdk/VERSION ('k') | infra/bots/assets/win_vulkan_sdk/create_and_upload.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698