Spine工程如何批量升级,批处理里面没看到可以批量升级的操作

  • Misaki ответили на это сообщение.
    Related Discussions
    ...

    Misaki 这个博客里面的好像是只修改导出的spine版本,并没有修改我的spine工程的版本

    • Misaki ответили на это сообщение.

      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:

      spine-import-and-export.zip
      3kB

      Perhaps my way of writing the process is redundant. Please feel free to modify and use it as you wish.

      • eba ответили на это сообщение.
      • eba оценил это.

        Misaki 好的

        Misaki 你好如何在命令行启动指定的spine版本,假如说我上次打开的spine是3.7,但是我的给工程里面是4.1,如果命令行没有指定特定的版本号,会导致我的操作有问题,我用命令行如何指定启动版本,也是用update吗

        • Misaki ответили на это сообщение.

          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:

          spine-import-and-export-with-entering-version.zip
          4kB

          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.

          • eba оценил это.