• Editor
  • spine的使用方式

我使用bat的方式为什么每次每次执行spine都是重新验证一下,比如
Spine --export /path/to/export.json
Spine --export "/path/with spaces/to/export.json"
Spine --input /path/to/project.spine --output /path/to/output/
--export /path/to/export.json
比如下面这个命令会验证三次,我需要怎么操作才能验证一次,加快的我的命令时间,用的bat

Related Discussions
...

Using a Windows BAT file doesn't change anything compared to running the command at the command prompt without a BAT file.

What do you mean be "re-verify"?

What version of the Spine launcher are you using? The latest will works best, current 4.2.01. The version number is on the first line of the CLI output, eg Spine Launcher 4.2.01.

You can speed up your exports by combining multiple in one Spine execution. For example:

Spine --export /path/to/export.json --export "/path/with spaces/to/export.json" --input /path/to/project.spine --output /path/to/output/ --export /path/to/export.json

This is faster because Spine only has to initialize once, then do the work. The CLI parameters are input/output/etc then command and you can have as many sets of those as you like.

In a BAT file you can use ^ at the end of the line to make your script more readable:

Spine --export /path/to/export.json ^
--export "/path/with spaces/to/export.json" ^
--input /path/to/project.spine --output /path/to/output/ ^
--export /path/to/export.json

FWIW, I find it more comfortable to use Cygwin and Bash scripts. Windows batch scripting is very cryptic. Bash too, but it's easier to be productive. Another way to use Bash scripts is by using "Git Bash" which comes with "Git for Windows. We are working on a blog post that will cover how to automate exports using both BAT and Bash scripts.

    Nate
    为什么他的命令是一行一行执行的,所有导致每次都需要验证一次的我的spine

    Nate 感谢

    @eba You are calling the Spine executable three times in your batch script in the first posting

    Spine --export /path/to/export.json
    Spine --export "/path/with spaces/to/export.json"
    Spine --input /path/to/project.spine --output /path/to/output/ --export /path/to/export.json

    This starts Spine three times.

    Nate on the other hand called Spine only once, exporting multiple times via the command line arguments:

    Spine --export /path/to/export.json ^
    --export "/path/with spaces/to/export.json" ^
    --input /path/to/project.spine --output /path/to/output/ ^
    --export /path/to/export.json