升级脚本
UNIGINE upgrade script is a one-touch solution to upgrade data of a UNIGINE-based project to be consistent with updated engine builds. UNIGINE升级脚本是一种一键式解决方案,用于升级基于UNIGINE的项目的数据以使其与更新的引擎版本保持一致。
The script recursively scans the project folders inside the data folder to upgrade the files located there. If the script fails to upgrade some files, it will generate an error log (errors.log file).该脚本以递归方式扫描data文件夹内的项目文件夹,以升级位于该文件夹中的文件。如果脚本无法升级某些文件,则会生成错误日志(errors.log文件)。
Usage用法#
The script is located in utils/upgrade directory of UNIGINE SDK.脚本位于UNIGINE SDK的utils/upgrade目录中。
To invoke the upgrade script, run upgrade.usc at the command prompt by using USC Interpreter:要调用升级脚本,请使用upgrade.usc at the command prompt by using USC Interpreter:
usc_x* upgrade.usc DIRS OPTIONS
- If the content to be upgraded is stored only in the project's data folder, specify the path to this folder:
You can also specify only a particular folder inside the data folder, if necessary. 如果要升级的内容仅存储在项目的data文件夹中,请指定此文件夹的路径:
usc_x* upgrade.usc PATH_TO_DATA OPTIONS
如果需要,还可以仅在data文件夹内指定一个特定的文件夹。usc_x* upgrade.usc PATH_TO_DATA OPTIONS
- If the content to be upgraded is stored outside the data folder, you can specify the corresponding folders for the upgrade script:
如果要升级的内容存储在data文件夹之外,则可以为升级脚本指定相应的文件夹:
usc_x* upgrade.usc DIR_0 DIR_1 OPTIONS
usc_x* upgrade.usc DIR_0 DIR_1 OPTIONS
Command Line Options命令行选项#
The upgrade script recognizes the following command line options:升级脚本可识别以下命令行选项:
- --log - a path to the log file. If the option isn't specified, the log will be printed to the command prompt only. -log -日志文件的路径。如果未指定该选项,则日志将仅打印到命令提示符。
If no options are set, the script will start upgrading with the default values.如果未设置任何选项,则脚本将使用默认值开始升级。
Examples例子#
- To upgrade content of a UNIGINE-based project located in D:\my_project directory, type at the command prompt:
要升级位于D:\my_project目录中的基于UNIGINE的项目的内容,请在命令提示符下键入:
usc_x64 upgrade.usc D:\my_project\data
usc_x64 upgrade.usc D:\my_project\data
- To run content upgrading of a UNIGINE-based project and save the log data into a file, run the upgrade script as follows:
要运行基于UNIGINE的项目的内容升级并将日志数据保存到文件中,请按以下方式运行升级脚本:
usc_x64 upgrade.usc D:\my_project\data --log D:\my_project\log.html
usc_x64 upgrade.usc D:\my_project\data --log D:\my_project\log.html