浏览代码

Attempt switching to robocopy

/main
Alex Lian 7 年前
当前提交
139ff007
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 10
      build.py

10
build.py


sub_package_folders = {}
publish_order = []
packages = {
("com.unity.render-pipelines.core", os.path.join("ScriptableRenderPipeline", "Core")),
("com.unity.render-pipelines.high-definition", os.path.join("ScriptableRenderPipeline", "HDRenderPipeline")),
("com.unity.render-pipelines.lightweight", os.path.join("ScriptableRenderPipeline", "LightweightPipeline"))
}
def prepare(logger):
file_path = os.path.join("./ScriptableRenderPipeline", "master-package.json")
if os.path.isfile(file_path):

def copy_path_to_project(path, repo_path, project_target_path, logger):
logger.info("Copying {}".format(path))
if platform.system() == "Windows":
subprocess.call(["xcopy", os.path.join(repo_path, path), os.path.join(project_target_path, os.path.dirname(path)), "/E", "/Q", "/Y"])
subprocess.call(["robocopy", os.path.join(repo_path, path), os.path.join(project_target_path, os.path.dirname(path)), "/e"])
else:
shutil.copytree(os.path.join(repo_path, path),os.path.join(project_target_path, path))

subprocess.call(["xcopy", os.path.join(repo_path, path), os.path.join(project_target_path, os.path.dirname(path)), "/Q", "/Y"])
subprocess.call(["robocopy", os.path.join(repo_path, path), os.path.join(project_target_path, os.path.dirname(path))])
else:
shutil.copy(os.path.join(repo_path, path), os.path.join(project_target_path, path))

正在加载...
取消
保存