Ai
2 Star 0 Fork 0

chromium_develop/chromium_third_party_webxr_test_pages

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
make_ot_samples_folder.py 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
李想 提交于 2022-08-16 16:28 +08:00 . chromium origin init
#!/usr/bin/env python
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import shutil
import sys
samples_pages = [
'xr-barebones.html',
'magic-window.html',
'teleportation.html',
'gamepad.html'
]
other_pages = [
'attribution.html',
'favicon-32x32.png',
'favicon-96x96.png',
'favicon.ico',
'LICENSE.md'
]
copy_folders = [
'css',
'js'
]
def make_ot_samples_folder(source, dest):
os.mkdir(dest)
for f in samples_pages:
shutil.copy(os.path.join(source, f), dest)
for f in other_pages:
shutil.copy(os.path.join(source, f), dest)
for f in copy_folders:
shutil.copytree(os.path.join(source, f), os.path.join(dest, f))
shutil.copy(
os.path.join(source, 'index.published.html'),
os.path.join(dest, 'index.html'))
shutil.make_archive('source', 'zip', dest)
shutil.move('source.zip', dest)
# media folder won't be included in the zip file or uploaded in any way as
# part of this process
shutil.copytree(os.path.join(source, 'media'), os.path.join(dest, 'media'))
def main():
make_ot_samples_folder(sys.argv[1], sys.argv[2])
if __name__ == '__main__':
main()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chromium_develop/chromium_third_party_webxr_test_pages.git
git@gitee.com:chromium_develop/chromium_third_party_webxr_test_pages.git
chromium_develop
chromium_third_party_webxr_test_pages
chromium_third_party_webxr_test_pages
master

搜索帮助