anchor.diff:          goto end
   
   :package
  -        for /F %%I in (version.now) do zip -9 "nyagos-%%I%2.zip" nyagos.exe lua52.dll nyagos.lua nyagos_ja.md nyagos_en.md readme.md .nyagos nyagos.d\*.lua
  +        zip -9 "nyagos-%VERSION%%2.zip" nyagos.exe lua52.dll nyagos.lua nyagos_ja.md nyagos_en.md readme.md .nyagos nyagos.d\*.lua
           goto end
   
   :install
  -        @if exist installdir (
  +        @echo off
  +        if not "%2" == "" set "INSTALLDIR=%2"
  +        if "%INSTALLDIR%" == "" (
  +            @echo Please %0.cmd install PATH\TO\BIN, once
  +            goto end
  +        )
  +        if exist installdir (
               @start make.cmd install.
           ) else (
  -            @echo Please do 'mklink /J installdir PATH\TO\BIN'.
  +            @echo Please %0.cmd install EXIST\PATH\TO\BIN,  once
           )
  -        @goto end
  +        goto end
   
   :install.
           @echo Please close NYAGOS.exe and hit ENTER.
           @pause
  -        robocopy nyagos.d .\installdir\nyagos.d /mir
  -        copy nyagos.exe .\installdir\.
  -        copy nyagos.lua .\installdir\.
  -        copy lua52.dll  .\installdir\.
  +        robocopy nyagos.d "%INSTALLDIR%\nyagos.d" /mir
  +        copy nyagos.exe "%INSTALLDIR%\."
  +        copy nyagos.lua "%INSTALLDIR%\."
  +        copy lua52.dll  "%INSTALLDIR%\."
           goto end
   
   :upgrade
  
positive.code: @setlocal
  @set PROMPT=$G$S
  @if not "%1" == "" goto %1
  
  :build
          echo %DATE:/=% > version.now
          goto _build
  
  :release
          for /F %%I in (version.txt) do set "VERSION=-X main.version %%I"
          copy version.txt version.now
  
  :_build
          if not exist nyagos.syso windres --output-format=coff -o nyagos.syso nyagos.rc
          for /F %%V in ('git log -1 --pretty^=format:%%H') do go build -ldflags "-X main.stamp %DATE% -X main.commit %%V %VERSION%"
          goto end
  
  :fmt
  
negative.code: :help
          @echo off
          echo Usage for make.cmd
          echo  %0          : Equals to '%0 build'
          echo  %0 build    : Build nyagos.exe as snapshot (ignore version.txt)
          echo  %0 release  : Build nyagos.exe as release  (see version.txt)
          echo  %0 fmt      : Format all source files with 'go fmt'
          echo  %0 clean    : Delete nyagos.exe and nyagos.syso
          echo  %0 package  : Make the package zip-file
          echo  %0 get      : Do 'go get' for each github library
          echo  %0 upgrade  : Do 'git pull' for each github library
          echo  %0 help     : Print help
          echo  %0 install INSTALLDIR 
          echo     : Copy binaries to INSTALLDIR
          echo  %0 install  
          echo     : Copy binaries to last INSTALLDIR
  :end
          ( echo set "VERSION=%VERSION%"
            echo set "X_VERSION=%X_VERSION%"
            echo set "INSTALLDIR=%INSTALLDIR%"
          ) > "%~dp0version.cmd"
  