Spine工程如何批量升级,批处理里面没看到可以批量升级的操作
Spine工程如何批量升级
eba You can use our export shell script to do this! See our blog post for more information:
https://esotericsoftware.com/blog/New-export-shell-scripts
eba Basically, the original script should be sufficient for version upgrades, but if you add a few lines to the script to import the detected Spine project and save it as a new Spine project, the version upgrade of the Spine project can be handled at the same time.
For example, the following commands can be added to the exportUsingJsonSettings()
and exportUsingDefaultSettings()
methods to overwrite the project with the specified version:
# Import the Spine project and save it with the specified version.
local command_args_import=("--update" "$VERSION" "--input" "$file_path" "--output" "$file_path" "-r")
"$SPINE_EXE" "${command_args_import[@]}";
Here is the modified script where I added the above lines:
Perhaps my way of writing the process is redundant. Please feel free to modify and use it as you wish.
eba In this case, you may want to pass the version number as a script argument.
For example, if you modify the script to take a second argument named version
, you can specify the version each time the script runs by replacing the VERSION
constant in the script with version
.
I have attached an example script here:
Please note this example script is written in a rather crude manner, so if the script user does not enter the appropriate value, it will not work properly.