Home | History | Annotate | Download | only in win_vulkan_sdk
      1 #!/usr/bin/env python
      2 #
      3 # Copyright 2016 Google Inc.
      4 #
      5 # Use of this source code is governed by a BSD-style license that can be
      6 # found in the LICENSE file.
      7 
      8 
      9 """Create the asset."""
     10 
     11 
     12 import argparse
     13 import shutil
     14 import sys
     15 import os
     16 
     17 
     18 def create_asset(target_dir, sdk_path):
     19   """Create the asset."""
     20   # The bots only need Include from the SDK.
     21   target_include_dir = os.path.join(target_dir, "Include")
     22   sdk_include_dir = os.path.join(sdk_path, "Include")
     23   if not os.path.isdir(target_dir):
     24     os.makedirs(target_dir)
     25   shutil.copytree(sdk_include_dir, target_include_dir)
     26 
     27 def main():
     28   if sys.platform != 'win32':
     29     print >> sys.stderr, 'This script only runs on Windows.'
     30     sys.exit(1)
     31   parser = argparse.ArgumentParser()
     32   parser.add_argument('--target_dir', '-t', required=True)
     33   parser.add_argument('--sdk_path', '-s', required=True)
     34   args = parser.parse_args()
     35   create_asset(args.target_dir, args.sdk_path)
     36 
     37 
     38 if __name__ == '__main__':
     39   main()
     40