anchor.diff:  rem *
   rem * See License.txt for details about distribution and modification.
   rem *
  -rem *                                     (c) XhmikosR 2013
  +rem *                                     (c) XhmikosR 2013-2014
   rem *                                     https://github.com/XhmikosR/notepad2-mod
   rem *
   rem ******************************************************************************
  
positive.code:   GOTO END
  )
  
  IF NOT DEFINED VS100COMNTOOLS (
    IF NOT DEFINED VS110COMNTOOLS (
      ECHO %~nx0: Visual Studio does not seem to be installed...
      SET SIGN_ERROR=True
      GOTO END
    )
  )
  
  IF NOT EXIST "%~dp0..\signinfo_notepad2-mod.txt" (
  
negative.code: TITLE Signing "%~1"...
  ECHO. & ECHO Signing "%~1"...
  
  signtool /? 2>NUL || CALL "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" 2>NUL
  IF %ERRORLEVEL% NEQ 0 (
    ECHO vcvarsall.bat call failed.
    GOTO End
  )
  
  REM Repeat n times when signing fails
  SET REPEAT=3
  SET TRY=0
  
  :SIGN
  signtool sign %SIGN_CMD% "%~1"
  SET /A TRY+=1
  IF %ERRORLEVEL% NEQ 0 (
    IF TRY LSS REPEAT (
      REM Wait 5 seconds before next try
      PING -n 5 127.0.0.1 >NUL
      GOTO SIGN
    )
    SET SIGN_ERROR=True
    GOTO END
  )
  