@echo off

for /F "tokens=5,* skip=2" %%G in ('REG QUERY "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1" /reg:32 /v "Inno Setup: App Path"') do set INNO_SETUP_COMPILER_FILEPATH=%%H\ISCC.exe

if not exist "%INNO_SETUP_COMPILER_FILEPATH%" (
  for /F "tokens=5,* skip=2" %%G in ('REG QUERY "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1" /reg:64 /v "Inno Setup: App Path"') do set INNO_SETUP_COMPILER_FILEPATH_64=%%H\ISCC.exe

  if exist "%INNO_SETUP_COMPILER_FILEPATH_64%" (
    set INNO_SETUP_COMPILER_FILEPATH="%INNO_SETUP_COMPILER_FILEPATH_64%"
  ) else (
    goto innoSetupNotFound
  )
)

if [%1] == [] goto usage
if [%2] == [] goto usage
if [%3] == [] goto usage
if [%4] == [] goto usage
if [%5] == [] goto usage
if [%6] == [] goto usage
if [%7] == [] goto usage

set PLUGIN_NAME=%1
set PLUGIN_VERSION=%2
set AUTHOR_NAME=%3
set INPUT_DIRPATH=%4
set OUTPUT_DIRPATH=%5
set OUTPUT_FILENAME_PREFIX=%6
set INSTALLER_SCRIPT_FILENAME=%7

"%INNO_SETUP_COMPILER_FILEPATH%" /DPLUGIN_NAME="%PLUGIN_NAME%" /DPLUGIN_VERSION="%PLUGIN_VERSION%" /DAUTHOR_NAME="%AUTHOR_NAME%" /DINPUT_DIRPATH="%INPUT_DIRPATH%" /DOUTPUT_DIRPATH="%OUTPUT_DIRPATH%" /DOUTPUT_FILENAME_PREFIX="%OUTPUT_FILENAME_PREFIX%" "%INSTALLER_SCRIPT_FILENAME%"

goto :EOF

:innoSetupNotFound
echo Inno Setup installation path not found in the registry.
goto :EOF

:usage
echo Usage: %~n0%~x0 PLUGIN_NAME PLUGIN_VERSION AUTHOR_NAME INPUT_DIRPATH OUTPUT_DIRPATH OUTPUT_FILENAME_PREFIX INSTALLER_SCRIPT_FILENAME
echo Example: %~n0%~x0 export_layers 3.2 input_files output export_layers-3.2-windows installer.iss

@echo off

for /F "tokens=5,* skip=2" %%G in ('REG QUERY "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1" /reg:32 /v "Inno Setup: App Path"') do set INNO_SETUP_COMPILER_FILEPATH=%%H\ISCC.exe

if not exist "%INNO_SETUP_COMPILER_FILEPATH%" (
  for /F "tokens=5,* skip=2" %%G in ('REG QUERY "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1" /reg:64 /v "Inno Setup: App Path"') do set INNO_SETUP_COMPILER_FILEPATH_64=%%H\ISCC.exe

  if exist "%INNO_SETUP_COMPILER_FILEPATH_64%" (
    set INNO_SETUP_COMPILER_FILEPATH="%INNO_SETUP_COMPILER_FILEPATH_64%"
  ) else (
    goto innoSetupNotFound
  )
)

if [%1] == [] goto usage
if [%2] == [] goto usage
if [%3] == [] goto usage
if [%4] == [] goto usage
if [%5] == [] goto usage
if [%6] == [] goto usage
if [%7] == [] goto usage

set PLUGIN_NAME=%1
set PLUGIN_VERSION=%2
set AUTHOR_NAME=%3
set INPUT_DIRPATH=%4
set OUTPUT_DIRPATH=%5
set OUTPUT_FILENAME_PREFIX=%6
set INSTALLER_SCRIPT_FILENAME=%7

"%INNO_SETUP_COMPILER_FILEPATH%" /DPLUGIN_NAME="%PLUGIN_NAME%" /DPLUGIN_VERSION="%PLUGIN_VERSION%" /DAUTHOR_NAME="%AUTHOR_NAME%" /DINPUT_DIRPATH="%INPUT_DIRPATH%" /DOUTPUT_DIRPATH="%OUTPUT_DIRPATH%" /DOUTPUT_FILENAME_PREFIX="%OUTPUT_FILENAME_PREFIX%" "%INSTALLER_SCRIPT_FILENAME%"

goto :EOF

:innoSetupNotFound
echo Inno Setup installation path not found in the registry. Please install Inno Setup before proceeding.
goto :EOF

:usage
echo Usage: %~n0%~x0 PLUGIN_NAME PLUGIN_VERSION AUTHOR_NAME INPUT_DIRPATH OUTPUT_DIRPATH OUTPUT_FILENAME_PREFIX INSTALLER_SCRIPT_FILENAME
echo Example: %~n0%~x0 export_layers 3.2 khalim19 input_files output export_layers-3.2-windows installer.iss

Clarify messages in compiler script

installers.windows: Clarify messages in compiler script


@echo off
pushd "%~dp0"
call :main %*
popd
goto :EOF

:main
setlocal
set NUNIT_CONSOLE_PATH=tools\NUnit.Runners\tools\nunit-console.exe
if exist %NUNIT_CONSOLE_PATH% goto :test-all
for %%i in (NuGet.exe) do set nuget=%%~dpnx$PATH:i
if "%nuget%"=="" goto :nonuget
nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory tools || exit /b 1
move tools\NUnit.Runners.2.6.4 tools\NUnit.Runners
if not %errorlevel%==0 exit /b %errorlevel%
:test-all
call build /v:m ^
  && call :test net40 Debug ^
  && call :test net40 Release
goto :EOF

:test
setlocal
echo Testing %1 (%2)...
%NUNIT_CONSOLE_PATH% MoreLinq.Test\bin\%2\%1\MoreLinq.Test.dll
goto :EOF

:nonuget
echo NuGet executable not found in PATH
echo To download a version, see https://dist.nuget.org/
exit /b 2

@echo off
pushd "%~dp0"
call :main %*
popd
goto :EOF

:main
setlocal
set NUNIT_CONSOLE_PATH=tools\NUnit.Runners\tools\nunit-console.exe
if exist %NUNIT_CONSOLE_PATH% goto :test-all
for %%i in (NuGet.exe) do set nuget=%%~dpnx$PATH:i
if "%nuget%"=="" goto :nonuget
nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory tools || exit /b 1
move tools\NUnit.Runners.2.6.4 tools\NUnit.Runners
if not %errorlevel%==0 exit /b %errorlevel%
:test-all
call build /v:m /t:Rebuild ^
  && call :test net40 Debug ^
  && call :test net40 Release
goto :EOF

:test
setlocal
echo Testing %1 (%2)...
%NUNIT_CONSOLE_PATH% MoreLinq.Test\bin\%2\%1\MoreLinq.Test.dll
goto :EOF

:nonuget
echo NuGet executable not found in PATH
echo To download a version, see https://dist.nuget.org/
exit /b 2

Rebuild when testing

Rebuild when testing

Incremental compilation seems to be misbehaving and not recompiling the test project when the base referenced project inputs change. The .NET Core SDK is considered preview after all so forcing a rebuild when running the test script.


@rem Streaming Instance Validator
@rem
@rem Validates an instance against a schema.

@echo off

setlocal
if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)

set cp=
set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
set cp=%cp%;%XMLBEANS_HOME%\build\lib\jsr173_api.jar
set cp=%cp%;%XMLBEANS_HOME%\build\lib\jsr173_ri.jar

java -classpath %cp% org.apache.xmlbeans.impl.tool.StreamInstanceValidator %*

:done

add win version of streaming validator util

git-svn-id: 297cb4147f50b389680bb5ad136787e97b9148ae@110623 13f79535-47bb-0310-9956-ffa450edef68


add 'xmlpull-1.1.3.1.jar'

add 'xmlpull-1.1.3.1.jar'


:: Copyright 2013-2014 The 'mumble-releng' Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that
:: can be found in the LICENSE file in the source tree or at
:: <http://mumble.info/mumble-releng/LICENSE>.
@echo off

SET MUMBLE_PREFIX=%~dp0
IF %MUMBLE_PREFIX:~-1%==\ SET MUMBLE_PREFIX=%MUMBLE_PREFIX:~0,-1%
SET MUMBLE_PREFIX_BUILD=%MUMBLE_PREFIX%.build

SET VSVER=12.0
SET XPCOMPAT=1
SET LIB=
SET ARCH=x86

:: Automatic detection of win32-static/win64-static.
:: If you want full control of these options, feel
:: free to delete this snippet in your own build
:: environment.
echo %MUMBLE_PREFIX% | findstr /C:"win64-static" 1>nul
if not errorlevel 1 (
	SET XPCOMPAT=0
	SET ARCH=amd64
)

set MUMBLE_OPENSSL_PREFIX=%MUMBLE_PREFIX%\OpenSSL
set MUMBLE_SNDFILE_PREFIX=%MUMBLE_PREFIX%\sndfile
set MUMBLE_PROTOBUF_PREFIX=%MUMBLE_PREFIX%\protobuf
SET MUMBLE_QT_PREFIX=%MUMBLE_PREFIX%\Qt4.8
SET MUMBLE_ICE_PREFIX=%MUMBLE_PREFIX%\ZeroC-Ice

:: We want Cygwin's /usr/bin and /usr/local/bin directories
:: to come directly after the the PATH additions we prepend
:: to the PATH in this script.
::
:: We have a very strict PATH ordering we need to follow to
:: get consistent behavior on all systems:
::
::  1. MSVS toolchain and our own tools (mainly because link.exe
::     clashes with /usr/bin/link in Cygwin).
::
::  2. When in Cygwin, we prefer /usr/bin and /usr/local/bin over
::     %WINDIR%\System32. Bash scripts will break horribly if
::     'sort' and 'find' are Windows's variants.
::
::  3. The rest of the systems original %PATH% (including System32).
::
:: To reach that goal, we insert a fake entry in the PATH that we
:: can replace with something useful once we enter a Cygwin shell,
:: which happens via the 'env' script.
::
:: We insert it at this point in the code, because the dx_setenv.cmd
:: script and MSVS's vcvarsall.bat both prepend to the current PATH.
:: Our own PATH additions further down in this file also prepend to
:: PATH. So, to ensure Cygwin's entires come *after* all of those,
:: we have to put it front here.
SET PATH=--cygwin--;%PATH%

IF DEFINED %PROGRAMFILES(X86)% (
  GOTO amd64host
) ELSE (
  GOTO x86host
)

:amd64host
SET PROGPATH=%PROGRAMFILES(X86)%
GOTO VersionPicker

:x86host
SET PROGPATH=%PROGRAMFILES%
GOTO VersionPicker

:VersionPicker
IF %VSVER%==10.0 GOTO VS2010
IF %VSVER%==12.0 GOTO VS2013

:VSUNKNOWN
ECHO.
ECHO Unknown version of Visual Studio detected. (VSVER is set to `%VSVER%`)
ECHO Unable to initialize build environment. Aborting...
ECHO.
PAUSE
EXIT

:VS2010
TITLE MumbleBuild MSVS2010 (v100)
SET MUMBLE_VSTOOLSET=v100
CALL "%DXSDK_DIR%\Utilities\bin\dx_setenv.cmd" %ARCH% >NUL
CALL "%PROGPATH%\Microsoft Visual Studio %VSVER%\VC\vcvarsall.bat" %ARCH% >NUL
GOTO FINALIZE

:VS2013
IF %XPCOMPAT%==1 GOTO VS2013XP
TITLE MumbleBuild MSVC2013 (v120)
SET MUMBLE_VSTOOLSET=v120
CALL "%DXSDK_DIR%\Utilities\bin\dx_setenv.cmd" %ARCH% >NUL
CALL "%PROGPATH%\Microsoft Visual Studio %VSVER%\VC\vcvarsall.bat" %ARCH% >NUL
GOTO FINALIZE

:VS2013XP
TITLE MumbleBuild MSVS2013 (v120_xp)
SET MUMBLE_VSTOOLSET=v120_xp
CALL "%PROGPATH%\Microsoft Visual Studio %VSVER%\VC\vcvarsall.bat" %ARCH% >NUL
:: We call dx_setenv after vcvarsall to avoid accidently using the
:: DirectX bundled with MSVC2013's Windows 8 SDK.
::
:: When building using the v120_xp toolset, the latest supported
:: Windows SDK is the Windows v7.1A SDK, which is a specially
:: re-packaged version of the Windows 7 SDK meant for use in the
:: XP compatibility toolsets for Visual Studio 2012 and 2013
:: (i.e. v120_xp).
::
:: Since the Windows 8 SDK is unsupported, the SDK-bundled DirectX is probably
:: also off-limits. To ensure we're using the non-bundled "June 2010" variant,
:: we call its dx_setenv.cmd *after* vcvarsall, to ensure the bin, lib and include
:: environment variables come before the ones from the Windows 8 SDK.
CALL "%DXSDK_DIR%\Utilities\bin\dx_setenv.cmd" %ARCH% >NUL
:: Set up the environment such that using cl.exe and friends
:: from the command line will work as if we were using the "v120_xp"
:: toolset in Visual Studio.
::
:: Technically, this uses a specially re-packaged Windows 7 SDK
:: called "v7.1A", and sets a preprocessor define, _USING_V110_SDK71_
:: (it's called V110 for both v110_xp and v120_xp).
::set INCLUDE=%PROGPATH%\Microsoft SDKs\Windows\v7.1A\Include;%INCLUDE%
::set PATH=%PROGPATH%\Microsoft SDKs\Windows\v7.1A\Bin;%PATH%
::set LIB=%PROGPATH%\Microsoft SDKs\Windows\v7.1A\Lib;%LIB%
set CL=/D_USING_V110_SDK71_ %CL%
GOTO FINALIZE

:FINALIZE
SET PATH=%MUMBLE_QT_PREFIX%\bin;%PATH%
SET PATH=%MUMBLE_OPENSSL_PREFIX%\bin;%PATH%
SET PATH=%MUMBLE_PROTOBUF_PREFIX%\vsprojects\Release;%PATH%
if "%ARCH%" == "x86" SET PATH=%MUMBLE_ICE_PREFIX%\bin;%PATH%
if "%ARCH%" == "amd64" SET PATH=%MUMBLE_ICE_PREFIX%\bin\x64;%PATH%
cmd /V:ON /K %*
exit /b

:: Copyright 2013-2014 The 'mumble-releng' Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that
:: can be found in the LICENSE file in the source tree or at
:: <http://mumble.info/mumble-releng/LICENSE>.
@echo off

SET MUMBLE_PREFIX=%~dp0
IF %MUMBLE_PREFIX:~-1%==\ SET MUMBLE_PREFIX=%MUMBLE_PREFIX:~0,-1%
SET MUMBLE_PREFIX_BUILD=%MUMBLE_PREFIX%.build

SET VSVER=12.0
SET XPCOMPAT=1
SET LIB=
SET ARCH=x86

:: Automatic detection of win32-static/win64-static.
:: If you want full control of these options, feel
:: free to delete this snippet in your own build
:: environment.
echo %MUMBLE_PREFIX% | findstr /C:"win64-static" 1>nul
if not errorlevel 1 (
	SET XPCOMPAT=0
	SET ARCH=amd64
)

set MUMBLE_OPENSSL_PREFIX=%MUMBLE_PREFIX%\OpenSSL
set MUMBLE_SNDFILE_PREFIX=%MUMBLE_PREFIX%\sndfile
set MUMBLE_PROTOBUF_PREFIX=%MUMBLE_PREFIX%\protobuf
SET MUMBLE_QT_PREFIX=%MUMBLE_PREFIX%\Qt4.8
SET MUMBLE_ICE_PREFIX=%MUMBLE_PREFIX%\ZeroC-Ice

:: We want Cygwin's /usr/bin and /usr/local/bin directories
:: to come directly after the the PATH additions we prepend
:: to the PATH in this script.
::
:: We have a very strict PATH ordering we need to follow to
:: get consistent behavior on all systems:
::
::  1. MSVS toolchain and our own tools (mainly because link.exe
::     clashes with /usr/bin/link in Cygwin).
::
::  2. When in Cygwin, we prefer /usr/bin and /usr/local/bin over
::     %WINDIR%\System32. Bash scripts will break horribly if
::     'sort' and 'find' are Windows's variants.
::
::  3. The rest of the systems original %PATH% (including System32).
::
:: To reach that goal, we insert a fake entry in the PATH that we
:: can replace with something useful once we enter a Cygwin shell,
:: which happens via the 'env' script.
::
:: We insert it at this point in the code, because the dx_setenv.cmd
:: script and MSVS's vcvarsall.bat both prepend to the current PATH.
:: Our own PATH additions further down in this file also prepend to
:: PATH. So, to ensure Cygwin's entires come *after* all of those,
:: we have to put it front here.
SET PATH=--cygwin--;%PATH%

IF DEFINED %PROGRAMFILES(X86)% (
  GOTO amd64host
) ELSE (
  GOTO x86host
)

:amd64host
SET PROGPATH=%PROGRAMFILES(X86)%
GOTO VersionPicker

:x86host
SET PROGPATH=%PROGRAMFILES%
GOTO VersionPicker

:VersionPicker
IF %VSVER%==10.0 GOTO VS2010
IF %VSVER%==12.0 GOTO VS2013

:VSUNKNOWN
ECHO.
ECHO Unknown version of Visual Studio detected. (VSVER is set to `%VSVER%`)
ECHO Unable to initialize build environment. Aborting...
ECHO.
PAUSE
EXIT

:VS2010
TITLE MumbleBuild MSVS2010 (v100)
SET MUMBLE_VSTOOLSET=v100
CALL "%DXSDK_DIR%\Utilities\bin\dx_setenv.cmd" %ARCH% >NUL
CALL "%PROGPATH%\Microsoft Visual Studio %VSVER%\VC\vcvarsall.bat" %ARCH% >NUL
GOTO FINALIZE

:VS2013
IF %XPCOMPAT%==1 GOTO VS2013XP
TITLE MumbleBuild MSVC2013 (v120)
SET MUMBLE_VSTOOLSET=v120
CALL "%DXSDK_DIR%\Utilities\bin\dx_setenv.cmd" %ARCH% >NUL
CALL "%PROGPATH%\Microsoft Visual Studio %VSVER%\VC\vcvarsall.bat" %ARCH% >NUL
GOTO FINALIZE

:VS2013XP
TITLE MumbleBuild MSVS2013 (v120_xp)
SET MUMBLE_VSTOOLSET=v120_xp
CALL "%PROGPATH%\Microsoft Visual Studio %VSVER%\VC\vcvarsall.bat" %ARCH% >NUL
:: We call dx_setenv after vcvarsall to avoid accidently using the
:: DirectX bundled with MSVC2013's Windows 8 SDK.
::
:: When building using the v120_xp toolset, the latest supported
:: Windows SDK is the Windows v7.1A SDK, which is a specially
:: re-packaged version of the Windows 7 SDK meant for use in the
:: XP compatibility toolsets for Visual Studio 2012 and 2013
:: (i.e. v120_xp).
::
:: Since the Windows 8 SDK is unsupported, the SDK-bundled DirectX is probably
:: also off-limits. To ensure we're using the non-bundled "June 2010" variant,
:: we call its dx_setenv.cmd *after* vcvarsall, to ensure the bin, lib and include
:: environment variables come before the ones from the Windows 8 SDK.
CALL "%DXSDK_DIR%\Utilities\bin\dx_setenv.cmd" %ARCH% >NUL
:: Set up the environment such that using cl.exe and friends
:: from the command line will work as if we were using the "v120_xp"
:: toolset in Visual Studio.
::
:: Technically, this uses a specially re-packaged Windows 7 SDK
:: called "v7.1A", and sets a preprocessor define, _USING_V110_SDK71_
:: (it's called V110 for both v110_xp and v120_xp).
set INCLUDE=%PROGPATH%\Microsoft SDKs\Windows\v7.1A\Include;%INCLUDE%
set PATH=%PROGPATH%\Microsoft SDKs\Windows\v7.1A\Bin;%PATH%
set LIB=%PROGPATH%\Microsoft SDKs\Windows\v7.1A\Lib;%LIB%
set CL=/D_USING_V110_SDK71_ %CL%
GOTO FINALIZE

:FINALIZE
SET PATH=%MUMBLE_QT_PREFIX%\bin;%PATH%
SET PATH=%MUMBLE_OPENSSL_PREFIX%\bin;%PATH%
SET PATH=%MUMBLE_PROTOBUF_PREFIX%\vsprojects\Release;%PATH%
if "%ARCH%" == "x86" SET PATH=%MUMBLE_ICE_PREFIX%\bin;%PATH%
if "%ARCH%" == "amd64" SET PATH=%MUMBLE_ICE_PREFIX%\bin\x64;%PATH%
cmd /V:ON /K %*
exit /b

buildenv/1.3.x/win32-static: fix v120_xp's INCLUDE, PATH and LIB env vars (XPCOMPAT=1).


 docker build -t node-consul-env .
 docker tag node-consul-env:latest node-consul-env:4.2.1-0.5.2-0.6.0

 docker build -t node-consul-env .
 docker tag node-consul-env:latest node-consul-env:4.2.6-0.6.3-0.6.0

Update tag

Update tag


@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION

REM defaults
SET "URL="
SET HOST="localhost"
SET PORT=1527
SET USER="splice"
SET QUOTE=0
SET PASS="admin"
SET SECURE=0
SET "PRINCIPAL="
SET "KEYTAB="
SET PROMPT=0
SET WIDTH=128
SET "SCRIPT="
SET "OUTPUT="
SET QUIET=0
SET "HOSTARG="
SET "PORTARG="
SET "USERARG="
SET "PASSARG="
SET SCRIPT_DIR="%~dp0"
SET SCRIPT_NAME=%~n0%~x0

REM read user arguments
:loop
IF NOT [%1] == [] (
  IF "%1" == "-U" (
    SET URL=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-h" (
    SET HOSTARG=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-p" (
    SET PORTARG=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-u" (
    SET USERARG=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-Q" (
    SET QUOTE=1
    SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-s" (
    SET PASSARG=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-P" (
    SET PROMPT=1
    SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-S" (
    SET SECURE=1
    SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-k" (
    SET PRINCIPAL=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-K" (
    SET KEYTAB=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-w" (
    SET WIDTH=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-f" (
    SET SCRIPT=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-o" (
    SET OUTPUT=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-q" (
    SET QUIET=1
    SHIFT
    GOTO :loop
  ) ELSE (
    REM error, print help and exit
    CALL :help
    EXIT /B 1
  )
)

REM validate the options
IF NOT [%URL%] == [] (
  IF NOT [%HOSTARG%] == [] (
    ECHO Error: you cannot supply both a URL and the -h host option
    EXIT /B 1
  ) ELSE IF NOT [%PORTARG%] == [] (
    ECHO Error: you cannot supply both a URL and the -p port option
    EXIT /B 1
  ) ELSE IF NOT [%USERARG%] == [] (
    ECHO Error: you cannot supply both a URL and the -u user option
    EXIT /B 1
  ) ELSE IF NOT [%PASSARG%] == [] (
    ECHO Error: you cannot supply both a URL and the -s password option
    EXIT /B 1
  ) ELSE IF %SECURE% neq 0 (
    ECHO Error: you cannot supply both a URL and the -S ssl flag
    EXIT /B 1
  ) ELSE IF NOT [%PRINCIPAL%] == [] (
    ECHO Error: you cannot supply both a URL and the -k principal option
    EXIT /B 1
  ) ELSE IF NOT [%KEYTAB%] == [] (
    ECHO Error: you cannot supply both a URL and the -K keytab option
    EXIT /B 1
  )
)

REM TODO: check password and passarg and prompt

REM check for jdk1.8 and exit if not found
SET JAVA_EXEC=java
java -version 1>nul 2>nul || (
   IF NOT DEFINED JAVA_HOME (
     ECHO no java found. %SCRIPT_NAME% requires java.
     REM error, print help and exit
     CALL :help
     EXIT /B 1
   ) ELSE (
     SET JAVA_EXEC="%JAVA_HOME%\bin\java"
   )
)
FOR /f tokens^=2-5^ delims^=.-_^" %%j IN ('java -fullversion 2^>^&1') DO @set "JVER=%%j%%k"
IF %JVER% LSS 18 (
   ECHO Error: java is older than 1.8. %SCRIPT_NAME% requires java 1.8
   REM error, print help and exit
   CALL :help
   EXIT /B 1
)

REM set splice lib dir, for Windows we assume it is always local

SET SCRIPT_DIR=%SCRIPT_DIR:"=%
SET SPLICE_LIB_DIR=%SCRIPT_DIR%lib

REM check if all the tools needed to connect are found
IF NOT EXIST "%SPLICE_LIB_DIR%" (
    ECHO Error: the dependency directory at %SPLICE_LIB_DIR% cannot be found or created.
    REM error, print help and exit
    CALL :help
    EXIT /B 1
)

IF NOT EXIST "%SPLICE_LIB_DIR%\db-client*.jar" (
    ECHO Error: the db-client tool required to connect cannot be found or created.
    REM error, print help and exit
    CALL :help
    EXIT /B 1
)
IF NOT EXIST "%SPLICE_LIB_DIR%\db-tools*.jar" (
    ECHO Error: the db-tools required to connect cannot be found or created.
    REM error, print help and exit
    CALL :help
    EXIT /B 1
)

SET CLASSPATH="%SPLICE_LIB_DIR%/*;";

IF NOT [%HOSTARG%] == [] (
   SET HOST=%HOSTARG%
)
IF NOT [%PORTARG%] == [] (
   SET PORT=%PORTARG%
)
IF NOT [%USERARG%] == [] (
   SET USER=%USERARG%
)

REM prompt securely for user password
IF %PROMPT% EQU 1 (
    REM use PowerShell to read password securely.
    REM source: https://stackoverflow.com/a/20343074/337194
    powershell -Command "$pword = read-host 'Enter password ' -AsSecureString ; $BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword) ; [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)" > .tmp.txt
    SET /p PASS=<.tmp.txt & del .tmp.txt
) ELSE IF NOT [%PASSARG%] == [] (
   SET PASS="%PASSARG%"
)

REM Setup IJ_SYS_ARGS based on input options
SET GEN_SYS_ARGS=-Djava.awt.headless^=true
SET IJ_SYS_ARGS=-Djdbc.drivers^=com.splicemachine.db.jdbc.ClientDriver

REM add width via ij.maximumDisplayWidth
IF %WIDTH% NEQ 128 (
   SET IJ_SYS_ARGS=%IJ_SYS_ARGS% -Dij.maximumDisplayWidth=%WIDTH%
)

IF NOT [%OUTPUT%] == [] (
   REM figure out if OUTPUT directory exists
   CALL :dir_from_path OUTPATH !OUTPUT!
   IF NOT EXIST "%OUTPATH%" (
     ECHO Error: you specified a non-existant directory for output %OUTPUT%
     EXIT /B 1
   )
   SET IJ_SYS_ARGS=%IJ_SYS_ARGS% -Dij.outfile^=%OUTPUT%
)

IF NOT [%URL%] == [] (
    SET IJ_SYS_ARGS=%IJ_SYS_ARGS% -Dij.connection.splice^=%URL%
) ELSE (
    REM Add optional URL parameters
    SET SSL=
    SET KERBEROS=
    IF %SECURE% EQU 1 (
        SET SSL^=;ssl=basic
    )
    IF NOT [%PRINCIPAL%] == [] (
        SET KERBEROS=;principal^=%PRINCIPAL%
        IF NOT [%KEYTAB%] == [] (
            SET KERBEROS=!KERBEROS!;keytab^=%KEYTAB%
        )
    )
    SET IJ_SYS_ARGS=%IJ_SYS_ARGS% -Dij.connection.splice^=jdbc:splice://%HOST%:%PORT%/splicedb!SSL!!KERBEROS!
    SET JAVA_TOOL_OPTIONS=-Dij.user^=%USER% -Dij.password^=%PASS%
    IF %QUOTE% EQU 1 (
        SET JAVA_TOOL_OPTIONS=-Dij.user^='"%USER%"' -Dij.password^=%PASS%
    )
)

IF NOT [%CLIENT_SSL_KEYSTORE%] == [] (
    SET SSL_ARGS=-Djavax.net.ssl.keyStore^=%CLIENT_SSL_KEYSTORE% ^
    -Djavax.net.ssl.keyStorePassword^=%CLIENT_SSL_KEYSTOREPASSWD% ^
    -Djavax.net.ssl.trustStore^=%CLIENT_SSL_TRUSTSTORE% ^
    -Djavax.net.ssl.trustStore.ssl.trustStorePassword^=%CLIENT_SSL_TRUSTSTOREPASSWD%
)

call :message Running Splice Machine SQL shell
call :message For help%: "splice> help;"
REM todo: catch stderr messages and filter out Picked up JAVA_TOOL_OPTIONS   2>nul
java -classpath %CLASSPATH% %GEN_SYS_ARGS% %SSL_ARGS% %IJ_SYS_ARGS% com.splicemachine.db.tools.ij %SCRIPT% 2>nul

CALL :eof
EXIT /B 0

REM write something considering QUIET parameter
:message
   IF %QUIET% EQU 0 (
       ECHO %*
   )
   EXIT /B

REM get directory path from file path
:dir_from_path <resultVarOUT> <pathVarIN>
(
    SET "%~1=%~dp2"
    EXIT /B
)

:help
  ECHO Splice Machine SQL client wrapper script
  ECHO Usage: %SCRIPT_NAME% [-U url] [-h host] [-p port] [-u user] [-Q] [-s pass] [-P] [-S] [-k principal] [-K keytab] [-w width] [-f script] [-o output] [-q]
  ECHO  -U url       full JDBC URL for Splice Machine database
  ECHO  -h host      IP address or hostname of Splice Machine (HBase RegionServer)
  ECHO  -p port      Port which Splice Machine is listening on, defaults to 1527
  ECHO  -u user      username for Splice Machine database
  ECHO  -Q       Quote the username, e.g. for users with . - or @ in the username. e.g. dept-first.last@@company.com
  ECHO  -s pass      password for Splice Machine database
  ECHO  -P       prompt for unseen password
  ECHO  -S       use ssl=basic on connection
  ECHO  -k principal     kerberos principal (for kerberos)
  ECHO  -K keytab    kerberos keytab - requires principal
  ECHO  -w width     output row width. defaults to 128
  ECHO  -f script    sql file to be executed
  ECHO  -o output    file for output
  EXIT /B
:endhelp

:eof
ENDLOCAL

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION

REM defaults
SET "URL="
SET HOST="localhost"
SET PORT=1527
SET USER="splice"
SET QUOTE=0
SET PASS="admin"
SET SECURE=0
SET "PRINCIPAL="
SET "KEYTAB="
SET PROMPT=0
SET WIDTH=128
SET "SCRIPT="
SET "OUTPUT="
SET QUIET=0
SET "HOSTARG="
SET "PORTARG="
SET "USERARG="
SET "PASSARG="
SET SCRIPT_DIR="%~dp0"
SET SCRIPT_NAME=%~n0%~x0

REM read user arguments
:loop
IF NOT [%1] == [] (
  IF "%1" == "-U" (
    SET URL=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-h" (
    SET HOSTARG=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-p" (
    SET PORTARG=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-u" (
    SET USERARG=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-Q" (
    SET QUOTE=1
    SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-s" (
    SET PASSARG=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-P" (
    SET PROMPT=1
    SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-S" (
    SET SECURE=1
    SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-k" (
    SET PRINCIPAL=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-K" (
    SET KEYTAB=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-w" (
    SET WIDTH=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-f" (
    SET SCRIPT=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-o" (
    SET OUTPUT=%2
    SHIFT & SHIFT
    GOTO :loop
  ) ELSE IF "%1" == "-q" (
    SET QUIET=1
    SHIFT
    GOTO :loop
  ) ELSE (
    REM error, print help and exit
    CALL :help
    EXIT /B 1
  )
)

REM validate the options
IF NOT [%URL%] == [] (
  IF NOT [%HOSTARG%] == [] (
    ECHO Error: you cannot supply both a URL and the -h host option
    EXIT /B 1
  ) ELSE IF NOT [%PORTARG%] == [] (
    ECHO Error: you cannot supply both a URL and the -p port option
    EXIT /B 1
  ) ELSE IF NOT [%USERARG%] == [] (
    ECHO Error: you cannot supply both a URL and the -u user option
    EXIT /B 1
  ) ELSE IF NOT [%PASSARG%] == [] (
    ECHO Error: you cannot supply both a URL and the -s password option
    EXIT /B 1
  ) ELSE IF %SECURE% neq 0 (
    ECHO Error: you cannot supply both a URL and the -S ssl flag
    EXIT /B 1
  ) ELSE IF NOT [%PRINCIPAL%] == [] (
    ECHO Error: you cannot supply both a URL and the -k principal option
    EXIT /B 1
  ) ELSE IF NOT [%KEYTAB%] == [] (
    ECHO Error: you cannot supply both a URL and the -K keytab option
    EXIT /B 1
  )
)

REM TODO: check password and passarg and prompt

REM check for jdk1.8 and exit if not found
SET JAVA_EXEC=java
java -version 1>nul 2>nul || (
   IF NOT DEFINED JAVA_HOME (
     ECHO no java found. %SCRIPT_NAME% requires java.
     REM error, print help and exit
     CALL :help
     EXIT /B 1
   ) ELSE (
     SET JAVA_EXEC="%JAVA_HOME%\bin\java"
   )
)
FOR /f tokens^=2-5^ delims^=.-_^" %%j IN ('java -fullversion 2^>^&1') DO @set "JVER=%%j%%k"
IF %JVER% LSS 18 (
   ECHO Error: java is older than 1.8. %SCRIPT_NAME% requires java 1.8
   REM error, print help and exit
   CALL :help
   EXIT /B 1
)

REM set splice lib dir, for Windows we assume it is always local

SET SCRIPT_DIR=%SCRIPT_DIR:"=%
SET SPLICE_LIB_DIR=%SCRIPT_DIR%lib

REM check if all the tools needed to connect are found
IF NOT EXIST "%SPLICE_LIB_DIR%" (
    ECHO Error: the dependency directory at %SPLICE_LIB_DIR% cannot be found or created.
    REM error, print help and exit
    CALL :help
    EXIT /B 1
)

IF NOT EXIST "%SPLICE_LIB_DIR%\db-client*.jar" (
    ECHO Error: the db-client tool required to connect cannot be found or created.
    REM error, print help and exit
    CALL :help
    EXIT /B 1
)
IF NOT EXIST "%SPLICE_LIB_DIR%\db-tools*.jar" (
    ECHO Error: the db-tools required to connect cannot be found or created.
    REM error, print help and exit
    CALL :help
    EXIT /B 1
)

SET CLASSPATH="%SPLICE_LIB_DIR%/*;";

IF NOT [%HOSTARG%] == [] (
   SET HOST=%HOSTARG%
)
IF NOT [%PORTARG%] == [] (
   SET PORT=%PORTARG%
)
IF NOT [%USERARG%] == [] (
   SET USER=%USERARG%
)

REM prompt securely for user password
IF %PROMPT% EQU 1 (
    REM use PowerShell to read password securely.
    REM source: https://stackoverflow.com/a/20343074/337194
    powershell -Command "$pword = read-host 'Enter password ' -AsSecureString ; $BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword) ; [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)" > .tmp.txt
    SET /p PASS=<.tmp.txt & del .tmp.txt
) ELSE IF NOT [%PASSARG%] == [] (
   SET PASS="%PASSARG%"
)

REM Setup IJ_SYS_ARGS based on input options
SET GEN_SYS_ARGS=-Djava.awt.headless^=true
SET IJ_SYS_ARGS=-Djdbc.drivers^=com.splicemachine.db.jdbc.ClientDriver

REM add width via ij.maximumDisplayWidth
IF %WIDTH% NEQ 128 (
   SET IJ_SYS_ARGS=%IJ_SYS_ARGS% -Dij.maximumDisplayWidth=%WIDTH%
)

IF NOT [%OUTPUT%] == [] (
   REM figure out if OUTPUT directory exists
   CALL :dir_from_path OUTPATH !OUTPUT!
   IF NOT EXIST "%OUTPATH%" (
     ECHO Error: you specified a non-existant directory for output %OUTPUT%
     EXIT /B 1
   )
   SET IJ_SYS_ARGS=%IJ_SYS_ARGS% -Dij.outfile^=%OUTPUT%
)

IF NOT [%URL%] == [] (
    SET IJ_SYS_ARGS=%IJ_SYS_ARGS% -Dij.connection.splice^=%URL%
) ELSE (
    REM Add optional URL parameters for SSL and Kerberos
    SET SSL=
    SET KERBEROS=
    IF %SECURE% EQU 1 (
        SET SSL^=;ssl=basic
    )
    IF NOT [%PRINCIPAL%] == [] (
        SET KERBEROS=;principal^=%PRINCIPAL%
        IF NOT [%KEYTAB%] == [] (
            SET KERBEROS=!KERBEROS!;keytab^=%KEYTAB%
        )
    )
    SET IJ_SYS_ARGS=%IJ_SYS_ARGS% -Dij.connection.splice^=jdbc:splice://%HOST%:%PORT%/splicedb!SSL!!KERBEROS!
    SET JAVA_TOOL_OPTIONS=-Dij.user^=%USER% -Dij.password^=%PASS%
    IF %QUOTE% EQU 1 (
        SET JAVA_TOOL_OPTIONS=-Dij.user^='"%USER%"' -Dij.password^=%PASS%
    )
)

IF NOT [%CLIENT_SSL_KEYSTORE%] == [] (
    SET SSL_ARGS=-Djavax.net.ssl.keyStore^=%CLIENT_SSL_KEYSTORE% ^
    -Djavax.net.ssl.keyStorePassword^=%CLIENT_SSL_KEYSTOREPASSWD% ^
    -Djavax.net.ssl.trustStore^=%CLIENT_SSL_TRUSTSTORE% ^
    -Djavax.net.ssl.trustStore.ssl.trustStorePassword^=%CLIENT_SSL_TRUSTSTOREPASSWD%
)

call :message Running Splice Machine SQL shell
call :message For help%: "splice> help;"
REM todo: catch stderr messages and filter out Picked up JAVA_TOOL_OPTIONS   2>nul
java -classpath %CLASSPATH% %GEN_SYS_ARGS% %SSL_ARGS% %IJ_SYS_ARGS% com.splicemachine.db.tools.ij %SCRIPT% 2>nul

CALL :eof
EXIT /B 0

REM write something considering QUIET parameter
:message
   IF %QUIET% EQU 0 (
       ECHO %*
   )
   EXIT /B

REM get directory path from file path
:dir_from_path <resultVarOUT> <pathVarIN>
(
    SET "%~1=%~dp2"
    EXIT /B
)

:help
  ECHO Splice Machine SQL client wrapper script
  ECHO Usage: %SCRIPT_NAME% [-U url] [-h host] [-p port] [-u user] [-Q] [-s pass] [-P] [-S] [-k principal] [-K keytab] [-w width] [-f script] [-o output] [-q]
  ECHO  -U url       full JDBC URL for Splice Machine database
  ECHO  -h host      IP address or hostname of Splice Machine (HBase RegionServer)
  ECHO  -p port      Port which Splice Machine is listening on, defaults to 1527
  ECHO  -u user      username for Splice Machine database
  ECHO  -Q       Quote the username, e.g. for users with . - or @ in the username. e.g. dept-first.last@@company.com
  ECHO  -s pass      password for Splice Machine database
  ECHO  -P       prompt for unseen password
  ECHO  -S       use ssl=basic on connection
  ECHO  -k principal     kerberos principal (for kerberos)
  ECHO  -K keytab    kerberos keytab - requires principal
  ECHO  -w width     output row width. defaults to 128
  ECHO  -f script    sql file to be executed
  ECHO  -o output    file for output
  EXIT /B
:endhelp

:eof
ENDLOCAL

Fix comment.

Fix comment.


rd /S /Q .\Publishing\lib

call build.bat
if %errorlevel% neq 0 exit /b %errorlevel%

md .\Publishing\lib
md .\Publishing\lib\net45

copy .\bin\Release\Metrics.dll .\Publishing\lib\net45\
copy .\bin\Release\Metrics.xml .\Publishing\lib\net45\
copy .\bin\Release\Metrics.pdb .\Publishing\lib\net45\

copy .\bin\MonoRelease\Nancy.metrics.dll .\Publishing\lib\net45\
copy .\bin\MonoRelease\Nancy.metrics.xml .\Publishing\lib\net45\
copy .\bin\MonoRelease\Nancy.metrics.pdb .\Publishing\lib\net45\

copy .\bin\MonoRelease\owin.metrics.dll .\Publishing\lib\net45\
copy .\bin\MonoRelease\owin.metrics.xml .\Publishing\lib\net45\
copy .\bin\MonoRelease\owin.metrics.pdb .\Publishing\lib\net45\

.\.nuget\NuGet.exe pack .\Publishing\Metrics.Net.nuspec -OutputDirectory .\Publishing
if %errorlevel% neq 0 exit /b %errorlevel%

.\.nuget\NuGet.exe pack .\Publishing\Nancy.Metrics.nuspec -OutputDirectory .\Publishing
if %errorlevel% neq 0 exit /b %errorlevel%

.\.nuget\NuGet.exe pack .\Publishing\Owin.Metrics.nuspec -OutputDirectory .\Publishing
if %errorlevel% neq 0 exit /b %errorlevel%

rd /S /Q .\Publishing\lib

call build.bat
if %errorlevel% neq 0 exit /b %errorlevel%

md .\Publishing\lib
md .\Publishing\lib\net45

copy .\bin\Release\Metrics.dll .\Publishing\lib\net45\
copy .\bin\Release\Metrics.xml .\Publishing\lib\net45\
copy .\bin\Release\Metrics.pdb .\Publishing\lib\net45\

copy .\bin\Release\Nancy.metrics.dll .\Publishing\lib\net45\
copy .\bin\Release\Nancy.metrics.xml .\Publishing\lib\net45\
copy .\bin\Release\Nancy.metrics.pdb .\Publishing\lib\net45\

copy .\bin\Release\owin.metrics.dll .\Publishing\lib\net45\
copy .\bin\Release\owin.metrics.xml .\Publishing\lib\net45\
copy .\bin\Release\owin.metrics.pdb .\Publishing\lib\net45\

.\.nuget\NuGet.exe pack .\Publishing\Metrics.Net.nuspec -OutputDirectory .\Publishing
if %errorlevel% neq 0 exit /b %errorlevel%

.\.nuget\NuGet.exe pack .\Publishing\Nancy.Metrics.nuspec -OutputDirectory .\Publishing
if %errorlevel% neq 0 exit /b %errorlevel%

.\.nuget\NuGet.exe pack .\Publishing\Owin.Metrics.nuspec -OutputDirectory .\Publishing
if %errorlevel% neq 0 exit /b %errorlevel%

fix path in create-nuget.bat for Nancy and Owin adapters


nuget pack StrangerData.nuspec
nuget pack StrangerData.SqlServer.nuspec

Create script do pack nuget within AppVeyor


Edit start command

Edit start command


@echo off
set filedate=%date:~10,4%-%date:~7,2%-%date:~4,2%
java -jar ./build/libs/slack-uploader-shadow-minified.jar \
    -a SLACK_TOKEN \
    -t "Title %filedate%" \
    -c "#channel" \
    %1

@echo off
set filedate=%date:~10,4%-%date:~7,2%-%date:~4,2%
java -jar ./build/libs/slack-uploader-shadow-minified.jar^
 -a SLACK_TOKEN^
 -t "Title %filedate%"^
 -c "#channel"^
 %1

Update batch script example

Update batch script example


@echo off

@echo ================	Build Client	=================
"%VS10PATH%\devenv.com" .\trunk\sln\zpublic.sln /rebuild "Release|Win32"
if ERRORLEVEL 1 exit /b 1
@echo ================	End~~	=================
@exit /b 0

add build.bat

add build.bat


@echo off

reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath > nul 2>&1
if ERRORLEVEL 1 goto MissingMSBuildRegistry

for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B

IF NOT EXIST %MSBUILDDIR%nul goto MissingMSBuildToolsPath
IF NOT EXIST %MSBUILDDIR%msbuild.exe goto MissingMSBuildExe

::BUILD
"tools\nuget.exe" restore EntityFramework.Testing.sln
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq.Ninject\EntityFramework.Testing.Moq.Ninject.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.Moq.Ninject.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq.Ninject\EntityFramework.Testing.Moq.Ninject.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.Moq.Ninject.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq\EntityFramework.Testing.Moq.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.Moq.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq\EntityFramework.Testing.Moq.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.Moq.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing\EntityFramework.Testing.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing\EntityFramework.Testing.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.xml

mkdir build
del "build\*.nupkg"

::PACK
"tools\nuget.exe" pack "src\EntityFramework.Testing\EntityFramework.Testing.nuspec" -OutputDirectory build
"tools\nuget.exe" pack "src\EntityFramework.Testing.Moq\EntityFramework.Testing.Moq.nuspec" -OutputDirectory build
"tools\nuget.exe" pack "src\EntityFramework.Testing.Moq.Ninject\EntityFramework.Testing.Moq.Ninject.nuspec" -OutputDirectory build

::DEPLOY
"tools\nuget.exe" push "build\*.nupkg"

goto:eof
::ERRORS
::---------------------
:MissingMSBuildRegistry
echo Cannot obtain path to MSBuild tools from registry
goto:eof
:MissingMSBuildToolsPath
echo The MSBuild tools path from the registry '%MSBUILDDIR%' does not exist
goto:eof
:MissingMSBuildExe
echo The MSBuild executable could not be found at '%MSBUILDDIR%'
goto:eof

@echo off

reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath > nul 2>&1
if ERRORLEVEL 1 goto MissingMSBuildRegistry

for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B

IF NOT EXIST %MSBUILDDIR%nul goto MissingMSBuildToolsPath
IF NOT EXIST %MSBUILDDIR%msbuild.exe goto MissingMSBuildExe

::BUILD
"tools\nuget.exe" restore EntityFramework.Testing.sln
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq.Ninject\EntityFramework.Testing.Moq.Ninject.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.Moq.Ninject.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq.Ninject\EntityFramework.Testing.Moq.Ninject.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.Moq.Ninject.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq\EntityFramework.Testing.Moq.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.Moq.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.Moq\EntityFramework.Testing.Moq.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.Moq.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.NSubstitute\EntityFramework.Testing.NSubstitute.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.NSubstitute.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing.NSubstitute\EntityFramework.Testing.NSubstitute.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.NSubstitute.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing\EntityFramework.Testing.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.0;DefineConstants="TRACE;NET40";OutPutPath=bin\Release\net40\;DocumentationFile=bin\Release\net40\EntityFramework.Testing.xml
"%MSBUILDDIR%msbuild.exe" "src\EntityFramework.Testing\EntityFramework.Testing.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\EntityFramework.Testing.xml

mkdir build
del "build\*.nupkg"

::PACK
"tools\nuget.exe" pack "src\EntityFramework.Testing\EntityFramework.Testing.nuspec" -OutputDirectory build
"tools\nuget.exe" pack "src\EntityFramework.Testing.Moq\EntityFramework.Testing.Moq.nuspec" -OutputDirectory build
"tools\nuget.exe" pack "src\EntityFramework.Testing.NSubstitute\EntityFramework.Testing.NSubstitute.nuspec" -OutputDirectory build
"tools\nuget.exe" pack "src\EntityFramework.Testing.Moq.Ninject\EntityFramework.Testing.Moq.Ninject.nuspec" -OutputDirectory build

::DEPLOY
"tools\nuget.exe" push "build\*.nupkg"

goto:eof
::ERRORS
::---------------------
:MissingMSBuildRegistry
echo Cannot obtain path to MSBuild tools from registry
goto:eof
:MissingMSBuildToolsPath
echo The MSBuild tools path from the registry '%MSBUILDDIR%' does not exist
goto:eof
:MissingMSBuildExe
echo The MSBuild executable could not be found at '%MSBUILDDIR%'
goto:eof

Update NuGet builder batch

Update NuGet builder batch


@echo off
echo %~dp0

PUSHD %~dp0

IF exist packages\FAKE ( echo skipping FAKE download ) ELSE (
echo downloading FAKE
dir
"bin\nuget.exe" "install" "FAKE" "-OutputDirectory" "Packages" "-ExcludeVersion" "-Prerelease"
"bin\nuget.exe" "install" "FSharp.Formatting.CommandTool" "-OutputDirectory" "Packages" "-ExcludeVersion" "-Prerelease"
"bin\nuget.exe" "install" "SourceLink.Fake" "-OutputDirectory" "Packages" "-ExcludeVersion"
"bin\nuget.exe" "install" "NUnit.Runners" "-OutputDirectory" "Packages" "-ExcludeVersion"
)

SET TARGET="Default"

IF NOT [%1]==[] (set TARGET="%1")

"Packages\FAKE\tools\Fake.exe" "build.fsx" "target=%TARGET%"

@echo off

PUSHD %~dp0

IF exist packages\FAKE ( echo skipping FAKE download ) ELSE (
echo downloading FAKE
dir
"bin\nuget.exe" "install" "FAKE" "-OutputDirectory" "Packages" "-ExcludeVersion" "-Prerelease"
"bin\nuget.exe" "install" "FSharp.Formatting.CommandTool" "-OutputDirectory" "Packages" "-ExcludeVersion" "-Prerelease"
"bin\nuget.exe" "install" "SourceLink.Fake" "-OutputDirectory" "Packages" "-ExcludeVersion"
"bin\nuget.exe" "install" "NUnit.Runners" "-OutputDirectory" "Packages" "-ExcludeVersion"
)

SET TARGET="Default"

IF NOT [%1]==[] (set TARGET="%1")

"Packages\FAKE\tools\Fake.exe" "build.fsx" "target=%TARGET%"

Update build.bat

Update build.bat

removed build script directory log


@echo off
set "picklesVersion=1.0.0"

cls

cd ".\src\Pickles\packages\NuGet.CommandLine.2.8.3\tools\"

".\NuGet.exe" "Install" "FAKE" "-OutputDirectory" "..\..\..\..\..\packages" "-ExcludeVersion"

cd ..\..\..\..\..

"packages\FAKE\tools\Fake.exe" build.fsx --envvar version %picklesVersion%
"packages\FAKE\tools\Fake.exe" nuget.fsx --envvar version %picklesVersion%
"packages\FAKE\tools\Fake.exe" chocolatey.fsx --envvar version %picklesVersion%

call unzip.cmd %picklesVersion%

FOR %%A IN (testRunnerCmd testRunnerMsBuild testRunnerPowerShell) DO (
call %%A.cmd %picklesVersion%
if errorlevel 1 goto handleerror1orhigher
)

@ECHO all fine
goto end

:handleerror1orhigher

@ECHO Something went wrong!
goto end

:end

@echo off
set "picklesVersion=1.0.0"

cls

cd ".\src\Pickles\packages\NuGet.CommandLine.*\tools\"

".\NuGet.exe" "Install" "FAKE" "-OutputDirectory" "..\..\..\..\..\packages" "-ExcludeVersion"

cd ..\..\..\..\..

"packages\FAKE\tools\Fake.exe" build.fsx --envvar version %picklesVersion%
"packages\FAKE\tools\Fake.exe" nuget.fsx --envvar version %picklesVersion%
"packages\FAKE\tools\Fake.exe" chocolatey.fsx --envvar version %picklesVersion%

call unzip.cmd %picklesVersion%

FOR %%A IN (testRunnerCmd testRunnerMsBuild testRunnerPowerShell) DO (
call %%A.cmd %picklesVersion%
if errorlevel 1 goto handleerror1orhigher
)

@ECHO all fine
goto end

:handleerror1orhigher

@ECHO Something went wrong!
goto end

:end

Make build script nuget-version-independent


cd ../libs/cu-events
call gulp

cd ../cu-stores
call gulp

cd ../cu-components
call gulp

cd ../../core-testbed
call gulp
copy src\fake*.js dist\js

cd ../libs/cu-events
call gulp clean
call gulp

cd ../cu-stores
call gulp clean
call gulp

cd ../cu-components
call gulp clean
call gulp

cd ../cu-fake-api
call gulp clean
call gulp

cd ../../core-testbed
call gulp clean
call gulp

build fake API

build fake API


@echo off
setlocal enabledelayedexpansion

where /q msbuild
if "%ERRORLEVEL%" == "0" (
    goto :SkipDeveloperSetup
)

set DeveloperCommandPrompt=%VS140COMNTOOLS%\VsDevCmd.bat

if not exist "%DeveloperCommandPrompt%" (
  echo In order to build this repository, you either need 'msbuild' on the path or Visual Studio 2015 installed.
  echo.
  echo Visit this page to download:
  echo.
  echo https://go.microsoft.com/fwlink/?LinkId=691978^&clcid=0x409
  exit /b 1
)

call "%DeveloperCommandPrompt%" || goto :BuildFailed

:SkipDeveloperSetup
powershell -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "& \"%~dp0build.ps1\" %*; exit $LastExitCode;"
exit /b %ERRORLEVEL%

:BuildFailed
echo Build failed with ERRORLEVEL %ERRORLEVEL%
exit /b 1

@echo off
setlocal enabledelayedexpansion

where /q msbuild
if "%ERRORLEVEL%" == "0" (
    goto :SkipDeveloperSetup
)

set DeveloperCommandPrompt=%VS150COMNTOOLS%\VsDevCmd.bat

if not exist "%DeveloperCommandPrompt%" (
  echo In order to build this repository, you either need 'msbuild' on the path or Visual Studio 2015 installed.
  echo.
  echo Visit this page to download:
  echo.
  echo https://go.microsoft.com/fwlink/?LinkId=691978^&clcid=0x409
  exit /b 1
)

call "%DeveloperCommandPrompt%" || goto :BuildFailed

:SkipDeveloperSetup
powershell -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "& \"%~dp0build.ps1\" %*; exit $LastExitCode;"
exit /b %ERRORLEVEL%

:BuildFailed
echo Build failed with ERRORLEVEL %ERRORLEVEL%
exit /b 1

Build with VS 15 dev tools

Build with VS 15 dev tools


@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
SET BUILDCMD_KOREBUILD_VERSION=""
SET BUILDCMD_DNX_VERSION=""

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
IF %BUILDCMD_KOREBUILD_VERSION%=="" (
	.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
) ELSE (
	.nuget\NuGet.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
)
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_DNX_INSTALL%"=="1" goto run
IF %BUILDCMD_DNX_VERSION%=="" (
	CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
) ELSE (
	CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -a default
)
CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86

:run
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
SET BUILDCMD_KOREBUILD_VERSION=""
SET BUILDCMD_DNX_VERSION=""

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
IF %BUILDCMD_KOREBUILD_VERSION%=="" (
	.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
) ELSE (
	.nuget\NuGet.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
)
.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages

IF "%SKIP_DNX_INSTALL%"=="1" goto run
IF %BUILDCMD_DNX_VERSION%=="" (
	CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
) ELSE (
	CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -a default
)
CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86

:run
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

Update 'build.cmd' to pull Sake from v2 NuGet feed.


@echo off

REM ****************************************************************************
REM Copyright 2004-2009 Castle Project - http://www.castleproject.org/
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM You may obtain a copy of the License at
REM
REM     http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
REM ****************************************************************************

IF "%~1"=="" goto quick

:normal
%~dp0SharedLibs\build\NAnt\bin\NAnt.exe -t:net-3.5 -D:nunit-console=%~dp0SharedLibs\build\NUnit\bin\nunit-console.exe -buildfile:default.build %*
goto end

:quick
%~dp0SharedLibs\build\NAnt\bin\NAnt.exe -t:net-3.5 -D:nunit-console=%~dp0SharedLibs\build\NUnit\bin\nunit-console.exe -buildfile:default.build quick release clean build

:end

@echo off

REM ****************************************************************************
REM Copyright 2004-2009 Castle Project - http://www.castleproject.org/
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM You may obtain a copy of the License at
REM
REM     http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
REM ****************************************************************************

IF "%~dp0"=="%CD%\" goto checkargs
goto normal

:checkargs
IF "%~1"=="" goto quick

:normal
%~dp0SharedLibs\build\NAnt\bin\NAnt.exe -t:net-3.5 -D:nunit-console=%~dp0SharedLibs\build\NUnit\bin\nunit-console.exe %*
goto end

:quick
%~dp0SharedLibs\build\NAnt\bin\NAnt.exe -t:net-3.5 -D:nunit-console=%~dp0SharedLibs\build\NUnit\bin\nunit-console.exe quick release clean build
goto end

:test
ECHO test!

:end

Allow the batch file to be used from other directories (like running ..\build from MonoRail dir)

git-svn-id: bab0c2de90ee11a20376049c2cdee62584491f34@5610 73e77b4c-caa6-f847-a29a-24ab75ae54b6


@ECHO off
SETLOCAL

SET REPO_FOLDER=%~dp0
CD "%REPO_FOLDER%"

SET BUILD_FOLDER=.build
SET KOREBUILD_FOLDER=%BUILD_FOLDER%\KoreBuild-dotnet
SET KOREBUILD_VERSION=

SET NUGET_PATH=%BUILD_FOLDER%\NuGet.exe
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe

IF NOT EXIST %BUILD_FOLDER% (
    md %BUILD_FOLDER%
)

IF NOT EXIST %NUGET_PATH% (
    IF NOT EXIST %CACHED_NUGET% (
        echo Downloading latest version of NuGet.exe...
        IF NOT EXIST %LocalAppData%\NuGet (
            md %LocalAppData%\NuGet
        )
        @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
    )

    copy %CACHED_NUGET% %NUGET_PATH% > nul
)

IF NOT EXIST %KOREBUILD_FOLDER% (
    SET KOREBUILD_DOWNLOAD_ARGS=
    IF NOT "%KOREBUILD_VERSION%"=="" (
        SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION%
    )

    %BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS%
)

"%KOREBUILD_FOLDER%\build\KoreBuild.cmd" %*

@ECHO off
SETLOCAL

SET REPO_FOLDER=%~dp0
CD "%REPO_FOLDER%"

SET BUILD_FOLDER=.build
SET KOREBUILD_FOLDER=%BUILD_FOLDER%\KoreBuild-dotnet
SET KOREBUILD_VERSION=

SET NUGET_PATH=%BUILD_FOLDER%\NuGet.exe
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe

IF NOT EXIST %BUILD_FOLDER% (
    md %BUILD_FOLDER%
)

IF NOT EXIST %NUGET_PATH% (
    IF NOT EXIST %CACHED_NUGET% (
        echo Downloading latest version of NuGet.exe...
        IF NOT EXIST %LocalAppData%\NuGet (
            md %LocalAppData%\NuGet
        )
        @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
    )

    copy %CACHED_NUGET% %NUGET_PATH% > nul
)

SET KOREBUILD_DOWNLOAD_ARGS=
IF NOT "%KOREBUILD_VERSION%"=="" (
    SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION%
)
IF NOT EXIST %KOREBUILD_FOLDER% (
    %BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS%
)

"%KOREBUILD_FOLDER%\build\KoreBuild.cmd" %*

Update `build.cmd` to match latest template - aspnet/Universe#347 - `%KOREBUILD_VERSION%` doesn't work without this fix


set SCRIPT=%0

rem determine Elasticsearch home; to do this, we strip from the path util we
rem find bin, and then strip bin (there is an assumption here that there is no
rem nested directory under bin also named bin)
for %%I in (%SCRIPT%) do set ES_HOME=%%~dpI

:es_home_loop
for %%I in ("%ES_HOME:~1,-1%") do set DIRNAME=%%~nxI
if not "%DIRNAME%" == "bin" (
  for %%I in ("%ES_HOME%..") do set ES_HOME=%%~dpfI
  goto es_home_loop
)
for %%I in ("%ES_HOME%..") do set ES_HOME=%%~dpfI

rem now set the classpath
set ES_CLASSPATH=!ES_HOME!\lib\*

rem now set the path to java
if defined JAVA_HOME (
  set JAVA="%JAVA_HOME%\bin\java.exe"
) else (
  for %%I in (java.exe) do set JAVA="%%~$PATH:I"
)

if not exist %JAVA% (
  echo could not find java; set JAVA_HOME or ensure java is in PATH 1>&2
  exit /B 1
)

rem check the Java version
%JAVA% -cp "%ES_CLASSPATH%" "org.elasticsearch.tools.JavaVersionChecker"

if errorlevel 1 (
  echo|set /p="the minimum required Java version is 8; "
  echo your Java version from %JAVA% does not meet this requirement
  exit /B 1
)

rem JAVA_OPTS is not a built-in JVM mechanism but some people think it is so we
rem warn them that we are not observing the value of %JAVA_OPTS%
if not "%JAVA_OPTS%" == "" (
  echo|set /p="warning: ignoring JAVA_OPTS=%JAVA_OPTS%; "
  echo pass JVM parameters via ES_JAVA_OPTS
)

if "%CONF_DIR%" == "" (
  set CONF_DIR=!ES_HOME!\config
)

set SCRIPT=%0

rem determine Elasticsearch home; to do this, we strip from the path until we
rem find bin, and then strip bin (there is an assumption here that there is no
rem nested directory under bin also named bin)
for %%I in (%SCRIPT%) do set ES_HOME=%%~dpI

:es_home_loop
for %%I in ("%ES_HOME:~1,-1%") do set DIRNAME=%%~nxI
if not "%DIRNAME%" == "bin" (
  for %%I in ("%ES_HOME%..") do set ES_HOME=%%~dpfI
  goto es_home_loop
)
for %%I in ("%ES_HOME%..") do set ES_HOME=%%~dpfI

rem now set the classpath
set ES_CLASSPATH=!ES_HOME!\lib\*

rem now set the path to java
if defined JAVA_HOME (
  set JAVA="%JAVA_HOME%\bin\java.exe"
) else (
  for %%I in (java.exe) do set JAVA="%%~$PATH:I"
)

if not exist %JAVA% (
  echo could not find java; set JAVA_HOME or ensure java is in PATH 1>&2
  exit /B 1
)

rem check the Java version
%JAVA% -cp "%ES_CLASSPATH%" "org.elasticsearch.tools.JavaVersionChecker"

if errorlevel 1 (
  echo|set /p="the minimum required Java version is 8; "
  echo your Java version from %JAVA% does not meet this requirement
  exit /B 1
)

rem JAVA_OPTS is not a built-in JVM mechanism but some people think it is so we
rem warn them that we are not observing the value of %JAVA_OPTS%
if not "%JAVA_OPTS%" == "" (
  echo|set /p="warning: ignoring JAVA_OPTS=%JAVA_OPTS%; "
  echo pass JVM parameters via ES_JAVA_OPTS
)

if "%CONF_DIR%" == "" (
  set CONF_DIR=!ES_HOME!\config
)

Fix typo in Windows elasticsearch-env script

This commit fixes a simple typo in the Windows version of the
elasticsearch-env script; this typo is harmless as it appears in a
comment.


cmake -G "NMake Makefiles"  -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% %SRC_DIR%
if errorlevel 1 exit 1

nmake
if errorlevel 1 exit 1

nmake install
if errorlevel 1 exit 1

Create bld.bat

Create bld.bat


#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

@echo off & setlocal enabledelayedexpansion

cd %~dp0

set CLASS_PATH="..;..\conf;..\lib\*"

set PORT=%1

set CONFIG=%2

if "%PORT%"=="" (
set MAIN_CLASS=org.apache.shardingsphere.shardingproxy.Bootstrap
) else ( if "%CONFIG%"=="" (
    set MAIN_CLASS=org.apache.shardingsphere.shardingproxy.Bootstrap %PORT%
    echo The port is configured as %PORT%
    ) else (
    set MAIN_CLASS=org.apache.shardingsphere.shardingproxy.Bootstrap %PORT% %CONFIG%
    echo The port is configured as %PORT%
    echo The configuration file is %CONFIG%
    )
)

java -server -Xmx2g -Xms2g -Xmn1g -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Dfile.encoding=UTF-8 -classpath %CLASS_PATH% %MAIN_CLASS%

pause

@rem
@rem Licensed to the Apache Software Foundation (ASF) under one or more
@rem contributor license agreements.  See the NOTICE file distributed with
@rem this work for additional information regarding copyright ownership.
@rem The ASF licenses this file to You under the Apache License, Version 2.0
@rem (the "License"); you may not use this file except in compliance with
@rem the License.  You may obtain a copy of the License at
@rem
@rem     http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@echo off & setlocal enabledelayedexpansion

cd %~dp0

set CLASS_PATH="..;..\conf;..\lib\*"

set PORT=%1

set CONFIG=%2

if "%PORT%"=="" (
set MAIN_CLASS=org.apache.shardingsphere.shardingproxy.Bootstrap
) else ( if "%CONFIG%"=="" (
    set MAIN_CLASS=org.apache.shardingsphere.shardingproxy.Bootstrap %PORT%
    echo The port is configured as %PORT%
    ) else (
    set MAIN_CLASS=org.apache.shardingsphere.shardingproxy.Bootstrap %PORT% %CONFIG%
    echo The port is configured as %PORT%
    echo The configuration file is %CONFIG%
    )
)

java -server -Xmx2g -Xms2g -Xmn1g -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Dfile.encoding=UTF-8 -classpath %CLASS_PATH% %MAIN_CLASS%

pause

modify note

modify note


@echo off
setlocal enabledelayedexpansion

:loop
set host=
set ip=
set /p host=pls specify host string, quit to exit:
if not defined host goto :loop
if "!host!" equ "quit" goto :exit
set /p ip=pls specify ip address for host !host!:
if not defined ip goto :loop
goto :loop

:exit
endlocal

add script for adding host

add script for adding host


java -jar GoogleClosureCompiler.jar --language_in=ECMASCRIPT6_STRICT --language_out=ES5_STRICT --js_output_file=%1 %2
java -jar AddUserscriptLines.jar %1 %2 %3
java -jar BeautifyScript.jar %2

java -jar GoogleClosureCompiler.jar --language_in=ECMASCRIPT6_STRICT --language_out=ES5_STRICT --compilation_level=ADVANCED_OPTIMIZATIONS --js_output_file=%1 %2
java -jar AddUserscriptLines.jar %1 %2 %3
java -jar BeautifyScript.jar %2

set compilation level to ADVANCED_OPTIMIZATIONS


@echo off
setlocal EnableExtensions

if (%FrameworkDir%)==() set FrameworkDir=%WINDIR%\Microsoft.NET\Framework64\
if (%FrameworkVersion%)==() set FrameworkVersion=v4.0.30319

rem If Framework64 doesn't exist, try to fallback to Framework
if not exist %FrameworkDir% set FrameworkDir=%WINDIR%\Microsoft.NET\Framework\

set MSBUILD=%FrameworkDir%%FrameworkVersion%\msbuild.exe

if not exist %MSBUILD% goto Error_NoMsBuild

set TARGET=%1
if (%TARGET%)==() set TARGET=Default

for /F "tokens=1* delims= " %%a in ("%*") do set BUILDARGS=%%b
if "%BUILDARGS%"=="" set BUILDARGS=/verbosity:minimal

%MSBUILD% /nologo /m /nr:false /t:%TARGET% %BUILDARGS% %~dp0build/build.proj

if errorlevel 1 goto Error_BuildFailed

echo.
echo *** BUILD SUCCESSFUL ***
echo.
goto :EOF

:Error_BuildFailed
echo.
echo *** BUILD FAILED ***
echo.
exit /b 1

:Error_NoMsBuild
echo.
echo. ERROR: Unable to locate MSBuild.exe (expected location: %MSBUILD%)
echo.
exit /b 1

@echo off
setlocal EnableExtensions

if (%FrameworkDir%)==() set FrameworkDir=%WINDIR%\Microsoft.NET\Framework64\
if (%FrameworkVersion%)==() set FrameworkVersion=v4.0.30319

rem If Framework64 doesn't exist, try to fallback to Framework
if not exist %FrameworkDir% set FrameworkDir=%WINDIR%\Microsoft.NET\Framework\

set MSBUILD=%FrameworkDir%%FrameworkVersion%\msbuild.exe

if not exist %MSBUILD% goto Error_NoMsBuild

set TARGET=%1
if (%TARGET%)==() set TARGET=Default

for /F "tokens=1* delims= " %%a in ("%*") do set BUILDARGS=%%b
if "%BUILDARGS%"=="" set BUILDARGS=/verbosity:minimal

%MSBUILD% /nologo /nr:false /t:%TARGET% %BUILDARGS% %~dp0build/build.proj

if errorlevel 1 goto Error_BuildFailed

echo.
echo *** BUILD SUCCESSFUL ***
echo.
goto :EOF

:Error_BuildFailed
echo.
echo *** BUILD FAILED ***
echo.
exit /b 1

:Error_NoMsBuild
echo.
echo. ERROR: Unable to locate MSBuild.exe (expected location: %MSBUILD%)
echo.
exit /b 1

Disable Parallel Build Tests

Disable Parallel Build Tests

Parallelism is bad for our CPU Intensive tests.
Also disabling parallelism does not appear to lengthen the build time

Signed-off-by: Dave_Goddard <a5692579077bf98cb035292473fe12572309d028@pivotal.io>


@echo Off
set config=%1
if "%config%" == "" (
   set config=Release
)

set version=1.0.0
if not "%PackageVersion%" == "" (
   set version=%PackageVersion%
)

set nuget=
if "%nuget%" == "" (
	set nuget=nuget
)

%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild src\Yotpo.Net.csproj /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false

mkdir Build
mkdir Build\lib
mkdir Build\lib\net40

%nuget% pack "src\Yotpo.Net.nuspec" -NoPackageAnalysis -verbosity detailed -o Build -Version %version% -p Configuration="%config%"

Add a build.bat for MyGet Build service

Add a build.bat for MyGet Build service


:: --- General initialization --- ::
::@echo off
Setlocal EnableDelayedExpansion

set j4n_version=8.9
set MSBuildVersion=14.0
set RootDirectory=%~dp0

rmdir artifacts /s /q
md artifacts
md artifacts\proxies\clr

:: --- Selenide --- ::
cd %RootDirectory%src\bin\
for /r %%f in (*.*) do copy %%f "%RootDirectory%artifacts"
cd %RootDirectory%

cd %RootDirectory%artifacts
set proxygenParameters=
for %%f in (*.jar) do ( if /I "%%f" neq "selenide-4.4.3.jar" ( if "%%f" neq "selenide-4.4.3.proxies.clr.jar" (set proxygenParameters=!proxygenParameters!.\artifacts\%%f;) else (echo %%f)))
set proxygenParameters=%proxygenParameters:~0,-1%
cd %RootDirectory%

:: --- jni4net --- ::
xcopy /E /Y %RootDirectory%bin-%j4n_version%\*.* artifacts

:: --- Go! --- ::
artifacts\proxygen.exe artifacts\selenide-4.4.3.jar -wd artifacts\proxies -cp "%proxygenParameters%"

cd artifacts\proxies
cmd /c build.cmd
xcopy selenide-4.4.3.j4n.dll ..
xcopy selenide-4.4.3.j4n.jar ..

:: Demo Test app ::
"C:\Program Files (x86)\MSBuild\%MSBuildVersion%\Bin\MSBuild" %RootDirectory%test\TestSelenideForNet\TestSelenideForNet.csproj /t:Rebuild /property:Configuration=Debug /property:Platform="x64"

cd ..
TestSelenideForNet

:: --- General initialization --- ::
::@echo off
Setlocal EnableDelayedExpansion

set j4n_version=8.9
set MSBuildVersion=14.0
set RootDirectory=%~dp0

rmdir artifacts /s /q
md artifacts
md artifacts\proxies\clr

:: --- Selenide --- ::
cd "%RootDirectory%src\bin\"
for /r %%f in (*.*) do copy "%%f" "%RootDirectory%artifacts"
cd "%RootDirectory%"

cd "%RootDirectory%artifacts"
set proxygenParameters=
for %%f in (*.jar) do ( if /I "%%f" neq "selenide-4.4.3.jar" ( if "%%f" neq "selenide-4.4.3.proxies.clr.jar" (set proxygenParameters=!proxygenParameters!.\artifacts\%%f;) else (echo %%f)))
set proxygenParameters=%proxygenParameters:~0,-1%
cd "%RootDirectory%"

:: --- jni4net --- ::
xcopy /E /Y "%RootDirectory%bin-%j4n_version%\*.*" artifacts

:: --- Go! --- ::
artifacts\proxygen.exe artifacts\selenide-4.4.3.jar -wd artifacts\proxies -cp "%proxygenParameters%"

cd artifacts\proxies
cmd /c build.cmd
xcopy selenide-4.4.3.j4n.dll ..
xcopy selenide-4.4.3.j4n.jar ..

:: Demo Test app ::
"C:\Program Files (x86)\MSBuild\%MSBuildVersion%\Bin\MSBuild" "%RootDirectory%test\TestSelenideForNet\TestSelenideForNet.csproj" /t:Rebuild /property:Configuration=Debug /property:Platform="x64"

cd ..
TestSelenideForNet

Add path white spaces support

Add path white spaces support


@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_KRE_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\kvm use default -runtime CLR -x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_DNX_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\kvm use default -runtime CLR -x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

Update K_BUILD_VERSION/kre/KRE/.k => DNX_BUILD_VERSION/dnx/DNX/.dnx.


rem cmd /c build_boost.bat
cmd /c build_geos.bat
cmd /c build_luabind.bat
cmd /c build_stxxl.bat
cmd /c build_curl.bat

build boost only manually

build boost only manually


@if "%AV_BUILD%"=="true" (
  call pkg_set_env_av.cmd
  set M_JOBS=%NUMBER_OF_PROCESSORS%
) else (
  call pkg_set_env.cmd
  set M_JOBS=3
)

@TITLE pkg_build_64 %R_DATE% %R_SVN% %R_VERS%

@set ORIG_PATH=%PATH%

@set SUFFIX=%R_VERS_2%_64
@set LOG_PATH_NAME=%DP0%ruby%SUFFIX%-%R_VERS%-1-x86_64
@set PKG_RUBY=%DP0%pkg/ruby%SUFFIX%/ruby%SUFFIX%

@rem --- git in path for bundled gems with gemspec using git ls-files ?
@PATH=%MSYS2_DIR%/mingw64/bin;%GIT_PATH%;%MSYS2_DIR%/usr/bin;%PATH%
@echo on

@attrib -r %DP0%src/*.* /s /d

@rem --------------------------------------------------------------------- Build
bash.exe --login -c  "cd '%DP0%'; MINGW_INSTALLS=mingw64 makepkg-mingw --nocheck --skippgpcheck -dLf -p PKGBUILD"
@if ERRORLEVEL 1 exit
@set /a ERROR_BLD=ERRORLEVEL

@@PATH=%MSYS2_DIR%/mingw64/bin;%MSYS2_DIR%/usr/bin;%GIT_PATH%;%ORIG_PATH%

@attrib +r %PKG_RUBY%/*.* /s
@rem --- Set bin & gem folders to rw
@attrib -r %PKG_RUBY%/bin/*
@attrib -r %PKG_RUBY%/bin/*.cmd
@attrib -r %PKG_RUBY%/bin/*.bat
@attrib -r %PKG_RUBY%/bin/*.ps1
@attrib -r %PKG_RUBY%/lib/ruby/gems/%R_VERS_INT%/*.* /s /d

@rem --- rename readline.rb so extension is used for tests (ren only works with backslashes)
@ren %~dp0pkg\ruby%SUFFIX%\ruby%SUFFIX%\lib\ruby\site_ruby\readline.rb readline.rb_

@rem ------------------------------------------------------------------ test-all
@set SSL_CERT_FILE=%PKG_RUBY%/ssl/cert.pem
@cd %DP0%src/build%SUFFIX%
@echo.
@echo ---------------------------------------------------------------------- Running Tests
@echo test-all
@make.exe "TESTOPTS=-v -j%M_JOBS% --job-status=normal --show-skip" test-all > %LOG_PATH_NAME%-test-all.log 2>&1
@rem make.exe "TESTOPTS=-v --show-skip" test-all > %LOG_PATH_NAME%-test-all.log 2>&1

@rem --------------------------------------------------------- btest, test-basic
@cd %DP0%src/build%SUFFIX%
@if "%R_VERS_2%" GEQ "24" (
  @echo btest
  make.exe -j 1 "TESTOPTS=-v -j%M_JOBS%" btest      > %LOG_PATH_NAME%-test-btest.log 2>&1
  @echo test-basic
  make.exe -j 1 "TESTOPTS=-v -j%M_JOBS%" test-basic > %LOG_PATH_NAME%-test-basic.log 2>&1
) else (
  @echo test
  make.exe -j 1 "TESTOPTS=-v -j%M_JOBS%" test       > %LOG_PATH_NAME%-test.log 2>&1
)

@rem ---------------------------------------------------------------------- spec
@attrib -r %DP0%src/build%SUFFIX%/*.* /s /d

@rem just in case...
@@PATH=%MSYS2_DIR%/mingw64/bin;%MSYS2_DIR%/usr/bin;%GIT_PATH%;%ORIG_PATH%

@if "%R_VERS_2%" GEQ "25" (
  @echo test-spec
  make.exe "MSPECOPT=-j" test-spec > %LOG_PATH_NAME%-test-spec.log 2>&1
) else (
  @echo test-rubyspec
  make.exe test-rubyspec > %LOG_PATH_NAME%-test-spec.log 2>&1
)

@rem --------------------------------------------------------------------- mspec
@attrib -r %DP0%src/ruby/spec/*.* /s /d
@attrib -r %DP0%src/ruby/spec/ruby/*.* /s /d

@PATH=%PKG_RUBY%/bin;%GIT_PATH%;%ORIG_PATH%

@cd %REPO_RUBY%/spec/ruby
@echo mspec
@call ..\mspec\bin\mspec -rdevkit -j > %LOG_PATH_NAME%-test-mspec.log 2>&1

@PATH=%PKG_RUBY%/bin;%GIT_PATH%;%ORIG_PATH%

@cd %~dp0

@set R_NAME=ruby%SUFFIX%

@rem Parse spec files, add total time file, and zip
@echo.
@echo ---------------------------------------------------------------------- Build ^& Test Times
@call time_log_64.cmd

@rem --- rename readline.rb_ back to readline.rb_
@attrib -r %PKG_RUBY%/lib/ruby/site_ruby/readline.rb_
@rem --- rename seems to only work with backslashes
@ren %~dp0pkg\ruby%SUFFIX%\ruby%SUFFIX%\lib\ruby\site_ruby\readline.rb_ readline.rb
@attrib +r %PKG_RUBY%/lib/ruby/site_ruby/readline.rb

@exit /b 0

@if "%AV_BUILD%"=="true" (
  call pkg_set_env_av.cmd
  set M_JOBS=%NUMBER_OF_PROCESSORS%
) else (
  call pkg_set_env.cmd
  set M_JOBS=3
)

@TITLE pkg_build_64 %R_DATE% %R_SVN% %R_VERS%

@set ORIG_PATH=%PATH%

@set SUFFIX=%R_VERS_2%_64
@set LOG_PATH_NAME=%DP0%ruby%SUFFIX%-%R_VERS%-1-x86_64
@set PKG_RUBY=%DP0%pkg/ruby%SUFFIX%/ruby%SUFFIX%

@rem --- git in path for bundled gems with gemspec using git ls-files ?
@PATH=%MSYS2_DIR%/mingw64/bin;%GIT_PATH%;%MSYS2_DIR%/usr/bin;%PATH%
@echo on

@attrib -r %DP0%src/*.* /s /d

@rem --------------------------------------------------------------------- Build
bash.exe --login -c  "cd '%DP0%'; MINGW_INSTALLS=mingw64 makepkg-mingw --nocheck --skippgpcheck -dLf -p PKGBUILD"
@if ERRORLEVEL 1 exit
@set /a ERROR_BLD=ERRORLEVEL

@@PATH=%MSYS2_DIR%/mingw64/bin;%MSYS2_DIR%/usr/bin;%GIT_PATH%;%ORIG_PATH%

@attrib +r %PKG_RUBY%/*.* /s
@rem --- Set bin & gem folders to rw
@attrib -r %PKG_RUBY%/bin/*
@attrib -r %PKG_RUBY%/bin/*.cmd
@attrib -r %PKG_RUBY%/bin/*.bat
@attrib -r %PKG_RUBY%/bin/*.ps1
@attrib -r %PKG_RUBY%/lib/ruby/gems/%R_VERS_INT%/*.* /s /d

@rem --- rename readline.rb so extension is used for tests (ren only works with backslashes)
@ren %~dp0pkg\ruby%SUFFIX%\ruby%SUFFIX%\lib\ruby\site_ruby\readline.rb readline.rb_

@rem ------------------------------------------------------------------ test-all
@set SSL_CERT_FILE=%PKG_RUBY%/ssl/cert.pem
@cd %DP0%src/build%SUFFIX%
@echo.
@echo ---------------------------------------------------------------------- Running Tests
@echo test-all
@make.exe "TESTOPTS=-v -j%M_JOBS% --job-status=normal --show-skip --retry" test-all > %LOG_PATH_NAME%-test-all.log 2>&1
@rem make.exe "TESTOPTS=-v --show-skip" test-all > %LOG_PATH_NAME%-test-all.log 2>&1

@rem --------------------------------------------------------- btest, test-basic
@cd %DP0%src/build%SUFFIX%
@if "%R_VERS_2%" GEQ "24" (
  @echo btest
  make.exe -j 1 "TESTOPTS=-v -j%M_JOBS%" btest      > %LOG_PATH_NAME%-test-btest.log 2>&1
  @echo test-basic
  make.exe -j 1 "TESTOPTS=-v -j%M_JOBS%" test-basic > %LOG_PATH_NAME%-test-basic.log 2>&1
) else (
  @echo test
  make.exe -j 1 "TESTOPTS=-v -j%M_JOBS%" test       > %LOG_PATH_NAME%-test.log 2>&1
)

@rem ---------------------------------------------------------------------- spec
@attrib -r %DP0%src/build%SUFFIX%/*.* /s /d

@rem just in case...
@@PATH=%MSYS2_DIR%/mingw64/bin;%MSYS2_DIR%/usr/bin;%GIT_PATH%;%ORIG_PATH%

@if "%R_VERS_2%" GEQ "25" (
  @echo test-spec
  make.exe "MSPECOPT=-j" test-spec > %LOG_PATH_NAME%-test-spec.log 2>&1
) else (
  @echo test-rubyspec
  make.exe test-rubyspec > %LOG_PATH_NAME%-test-spec.log 2>&1
)

@rem --------------------------------------------------------------------- mspec
@attrib -r %DP0%src/ruby/spec/*.* /s /d
@attrib -r %DP0%src/ruby/spec/ruby/*.* /s /d

@PATH=%PKG_RUBY%/bin;%GIT_PATH%;%ORIG_PATH%

@cd %REPO_RUBY%/spec/ruby
@echo mspec
@call ..\mspec\bin\mspec -rdevkit -j > %LOG_PATH_NAME%-test-mspec.log 2>&1

@PATH=%PKG_RUBY%/bin;%GIT_PATH%;%ORIG_PATH%

@cd %~dp0

@set R_NAME=ruby%SUFFIX%

@rem Parse spec files, add total time file, and zip
@echo.
@echo ---------------------------------------------------------------------- Build ^& Test Times
@call time_log_64.cmd

@rem --- rename readline.rb_ back to readline.rb_
@attrib -r %PKG_RUBY%/lib/ruby/site_ruby/readline.rb_
@rem --- rename seems to only work with backslashes
@ren %~dp0pkg\ruby%SUFFIX%\ruby%SUFFIX%\lib\ruby\site_ruby\readline.rb_ readline.rb
@attrib +r %PKG_RUBY%/lib/ruby/site_ruby/readline.rb

@exit /b 0

Add --retry to test-all [skip ci]

Add --retry to test-all [skip ci]


@ECHO OFF
SETLOCAL EnableDelayedExpansion

SET UPSTREAMURL=https://github.com/ShiftMediaProject
SET DEPENDENCIES=( ^
libgcrypt ^
)

REM Get passed in list of dependencies to skip
SET PASSDEPENDENCIES=%~1

REM Check if git is installed and available
IF "%MSVC_VER%"=="" (
    git status >NUL 2>&1
    IF %ERRORLEVEL% NEQ 0 (
      ECHO A working copy of git was not found. To use this script you must first install git for windows.
      EXIT /B 1
    )
)

REM Store current directory and ensure working directory is the location of current .bat
SET CURRDIR=%CD%
cd %~dp0

REM Initialise error check value
SET ERROR=0

cd ..\..
FOR %%I IN %DEPENDENCIES% DO (
    ECHO !PASSDEPENDENCIES! | FINDSTR /C:"%%I" >NUL 2>&1 || (
        REM Check if MSVC_VER environment variable is set
        IF "%MSVC_VER%"=="" (
            CALL :cloneOrUpdateRepo "%%I" || GOTO exit
        ) ELSE (
            CALL :downloadLibs "%%I" || GOTO exit
        )
    )
)
cd %CURRDIR% >NUL
GOTO exit

REM Function to clone or update a repo
REM  cloneOrUpdateRepo: RepoName
REM    RepoName = Name of the repository
:cloneOrUpdateRepo
SET REPONAME=%~1
REM Check if the repo folder already exists
IF EXIST "%REPONAME%" (
    ECHO %REPONAME%: Existing folder found. Checking for updates...
    cd %REPONAME%
    REM Check if any updates are available
    FOR /f %%J IN ('git rev-parse HEAD') do set CURRHEAD=%%J
    FOR /f %%J IN ('git ls-remote origin HEAD') do set ORIGHEAD=%%J
    IF "!CURRHEAD!"=="!ORIGHEAD!" (
        ECHO %REPONAME%: Repository up to date.
    ) ELSE (
        REM Stash any uncommited changes then update from origin
        ECHO %REPONAME%: Updates available. Updating repository...
        git checkout master --quiet
        git stash --quiet
        git pull origin master --quiet -ff
        git stash pop --quiet
    )
    cd ..\
) ELSE (
    ECHO %REPONAME%: Existing folder not found. Cloning repository...
    REM Clone from the origin repo
    SET REPOURL=%UPSTREAMURL%/%REPONAME%.git
    git clone !REPOURL! --quiet
    REM Initialise autocrlf options to fix cross platform interoperation
    REM  Once updated the repo needs to be reset to correct the local line endings
    cd %REPONAME%
    git config --local core.autocrlf false
    git rm --cached -r . --quiet
    git reset --hard --quiet
    cd ..\
)
REM Add current repo to list of already passed dependencies
SET PASSDEPENDENCIES=%PASSDEPENDENCIES% %REPONAME%
REM Check if the repo itself has required dependencies
IF EXIST "%REPONAME%\SMP\project_get_dependencies.bat" (
    ECHO %REPONAME%: Found additional dependencies...
    ECHO.
    cd %REPONAME%\SMP
    project_get_dependencies.bat "!PASSDEPENDENCIES!" || EXIT /B 1
    cd ..\..
)
ECHO.
EXIT /B %ERRORLEVEL%

REM Function to download existing prebuilt libraries
REM  downloadLibs: RepoName
REM    RepoName = Name of the repository
:downloadLibs
SET REPONAME=%~1
REM Get latest release
ECHO %REPONAME%: Getting latest release...
SET UPSTREAMAPIURL=%UPSTREAMURL:github.com=api.github.com/repos%
REM Check if secure OAuth is available
IF "%GITHUBTOKEN%" == "" (
    powershell -nologo -noprofile -command "try { Invoke-RestMethod -Uri %UPSTREAMAPIURL%/%REPONAME%/releases/latest > latest.json } catch {exit 1}"
) ELSE (
    powershell -nologo -noprofile -command "try { Invoke-RestMethod -Uri %UPSTREAMAPIURL%/%REPONAME%/releases/latest -Headers @{'Authorization' = 'token %GITHUBTOKEN%'} > latest.json } catch {exit 1}"
)
IF NOT %ERRORLEVEL% == 0 ( ECHO Failed getting latest %REPONAME% release & EXIT /B 1 )
REM Get tag for latest release
FOR /F "tokens=* USEBACKQ" %%F IN (`TYPE latest.json ^| FINDSTR /B "tag_name"`) DO SET TAG=%%F
FOR /F "tokens=2 delims=: " %%F in ("%TAG%") DO SET TAG=%%F
IF "%TAG%"=="" ( ECHO Failed getting latest %REPONAME% release tag information & EXIT /B 1 )
REM Get download name of latest release
FOR /F "tokens=* USEBACKQ" %%F IN (`TYPE latest.json ^| FINDSTR "name="`) DO SET LIBNAME=%%F
SET LIBNAME=%LIBNAME:*name=%
FOR /F "tokens=1 delims=_" %%F in ("%LIBNAME:~1%") DO SET LIBNAME=%%F
IF "%LIBNAME%"=="" ( ECHO Failed getting latest %REPONAME% release name information & EXIT /B 1 )
DEL /F /Q latest.json
REM Get the download location for the required tag
SET TAG2=%TAG:+=.%
SET DLURL=%UPSTREAMURL%/%REPONAME%/releases/download/%TAG%/%LIBNAME%_%TAG2%_msvc%MSVC_VER%.zip
REM Download a pre-built archive and extract
ECHO %REPONAME%: Downloading %LIBNAME%_%TAG%_msvc%MSVC_VER%.zip...
SET PREBUILTDIR=prebuilt
MKDIR %PREBUILTDIR% >NUL 2>&1
powershell -nologo -noprofile -command "try { (New-Object Net.WebClient).DownloadFile('%DLURL%', '%PREBUILTDIR%\temp.zip') } catch {exit 1}"
IF NOT %ERRORLEVEL% == 0 ( ECHO Failed downloading %DLURL% & EXIT /B 1 )
powershell -nologo -noprofile -command "Add-Type -AssemblyName System.IO.Compression.FileSystem; $zip=[System.IO.Compression.ZipFile]::OpenRead('%PREBUILTDIR%\temp.zip'); foreach ($item in $zip.Entries) { try {$file=(Join-Path -Path .\%PREBUILTDIR% -ChildPath $item.FullName); $null=[System.IO.Directory]::CreateDirectory((Split-Path -Path $file)); [System.IO.Compression.ZipFileExtensions]::ExtractToFile($item,$file,$true)} catch {exit 1} }"
IF NOT %ERRORLEVEL% == 0 ( ECHO Failed extracting downloaded archive & EXIT /B 1 )
DEL /F /Q %PREBUILTDIR%\\temp.zip
ECHO.
EXIT /B %ERRORLEVEL%

:exitOnError
cd %CURRDIR%
SET ERROR=1

:exit
REM Directly exit if an AppVeyor build
IF NOT "%APPVEYOR%"=="" (
    GOTO return
)
REM Return the passed dependency list
(
    ENDLOCAL
    SET PASSDEPENDENCIES=%PASSDEPENDENCIES%
)

REM Check if this was launched from an existing terminal or directly from .bat
REM  If launched by executing the .bat then pause on completion
ECHO %CMDCMDLINE% | FINDSTR /L %COMSPEC% >NUL 2>&1
IF %ERRORLEVEL% == 0 IF "%~1"=="" PAUSE

:return
EXIT /B %ERROR%

@ECHO OFF
SETLOCAL EnableDelayedExpansion

SET UPSTREAMURL=https://github.com/ShiftMediaProject
SET DEPENDENCIES=( ^
libgcrypt ^
)

REM Get passed in list of dependencies to skip
SET PASSDEPENDENCIES=%~1

REM Check if git is installed and available
IF "%MSVC_VER%"=="" (
    git status >NUL 2>&1
    IF %ERRORLEVEL% NEQ 0 (
        ECHO A working copy of git was not found. To use this script you must first install git for windows.
        GOTO exitOnError
    )
)

REM Store current directory and ensure working directory is the location of current .bat
SET CURRDIR=%CD%
cd %~dp0

REM Initialise error check value
SET ERROR=0

cd ..\..
FOR %%I IN %DEPENDENCIES% DO (
    ECHO !PASSDEPENDENCIES! | FINDSTR /C:"%%I" >NUL 2>&1 || (
        REM Check if MSVC_VER environment variable is set
        IF "%MSVC_VER%"=="" (
            CALL :cloneOrUpdateRepo "%%I" || GOTO exitOnError
        ) ELSE (
            CALL :downloadLibs "%%I" || GOTO exitOnError
        )
    )
)
cd %CURRDIR% >NUL
GOTO exit

REM Function to clone or update a repo
REM  cloneOrUpdateRepo: RepoName
REM    RepoName = Name of the repository
:cloneOrUpdateRepo
SET REPONAME=%~1
REM Check if the repo folder already exists
IF EXIST "%REPONAME%" (
    ECHO %REPONAME%: Existing folder found. Checking for updates...
    cd %REPONAME%
    REM Check if any updates are available
    FOR /f %%J IN ('git rev-parse HEAD') do set CURRHEAD=%%J
    FOR /f %%J IN ('git ls-remote origin HEAD') do set ORIGHEAD=%%J
    IF "!CURRHEAD!"=="!ORIGHEAD!" (
        ECHO %REPONAME%: Repository up to date.
    ) ELSE (
        REM Stash any uncommited changes then update from origin
        ECHO %REPONAME%: Updates available. Updating repository...
        git checkout master --quiet
        git stash --quiet
        git pull origin master --quiet -ff
        git stash pop --quiet
    )
    cd ..\
) ELSE (
    ECHO %REPONAME%: Existing folder not found. Cloning repository...
    REM Clone from the origin repo
    SET REPOURL=%UPSTREAMURL%/%REPONAME%.git
    git clone !REPOURL! --quiet
    IF %ERRORLEVEL% NEQ 0 (
        ECHO %REPONAME%: Git clone failed.
        GOTO exitOnError
    )
    REM Initialise autocrlf options to fix cross platform interoperation
    REM  Once updated the repo needs to be reset to correct the local line endings
    cd %REPONAME%
    git config --local core.autocrlf false
    git rm --cached -r . --quiet
    git reset --hard --quiet
    cd ..\
)
REM Add current repo to list of already passed dependencies
SET PASSDEPENDENCIES=%PASSDEPENDENCIES% %REPONAME%
REM Check if the repo itself has required dependencies
IF EXIST "%REPONAME%\SMP\project_get_dependencies.bat" (
    ECHO %REPONAME%: Found additional dependencies...
    ECHO.
    cd %REPONAME%\SMP
    project_get_dependencies.bat "!PASSDEPENDENCIES!" || EXIT /B 1
    cd ..\..
)
ECHO.
EXIT /B %ERRORLEVEL%

REM Function to download existing prebuilt libraries
REM  downloadLibs: RepoName
REM    RepoName = Name of the repository
:downloadLibs
SET REPONAME=%~1
REM Get latest release
ECHO %REPONAME%: Getting latest release...
SET UPSTREAMAPIURL=%UPSTREAMURL:github.com=api.github.com/repos%
REM Check if secure OAuth is available
IF "%GITHUBTOKEN%" == "" (
    powershell -nologo -noprofile -command "try { Invoke-RestMethod -Uri %UPSTREAMAPIURL%/%REPONAME%/releases/latest > latest.json } catch {exit 1}"
) ELSE (
    powershell -nologo -noprofile -command "try { Invoke-RestMethod -Uri %UPSTREAMAPIURL%/%REPONAME%/releases/latest -Headers @{'Authorization' = 'token %GITHUBTOKEN%'} > latest.json } catch {exit 1}"
)
IF NOT %ERRORLEVEL% == 0 ( ECHO Failed getting latest %REPONAME% release & EXIT /B 1 )
REM Get tag for latest release
FOR /F "tokens=* USEBACKQ" %%F IN (`TYPE latest.json ^| FINDSTR /B "tag_name"`) DO SET TAG=%%F
FOR /F "tokens=2 delims=: " %%F in ("%TAG%") DO SET TAG=%%F
IF "%TAG%"=="" ( ECHO Failed getting latest %REPONAME% release tag information & EXIT /B 1 )
REM Get download name of latest release
FOR /F "tokens=* USEBACKQ" %%F IN (`TYPE latest.json ^| FINDSTR "name="`) DO SET LIBNAME=%%F
SET LIBNAME=%LIBNAME:*name=%
FOR /F "tokens=1 delims=_" %%F in ("%LIBNAME:~1%") DO SET LIBNAME=%%F
IF "%LIBNAME%"=="" ( ECHO Failed getting latest %REPONAME% release name information & EXIT /B 1 )
DEL /F /Q latest.json
REM Get the download location for the required tag
SET TAG2=%TAG:+=.%
SET DLURL=%UPSTREAMURL%/%REPONAME%/releases/download/%TAG%/%LIBNAME%_%TAG2%_msvc%MSVC_VER%.zip
REM Download a pre-built archive and extract
ECHO %REPONAME%: Downloading %LIBNAME%_%TAG%_msvc%MSVC_VER%.zip...
SET PREBUILTDIR=prebuilt
MKDIR %PREBUILTDIR% >NUL 2>&1
powershell -nologo -noprofile -command "try { (New-Object Net.WebClient).DownloadFile('%DLURL%', '%PREBUILTDIR%\temp.zip') } catch {exit 1}"
IF NOT %ERRORLEVEL% == 0 ( ECHO Failed downloading %DLURL% & EXIT /B 1 )
powershell -nologo -noprofile -command "Add-Type -AssemblyName System.IO.Compression.FileSystem; $zip=[System.IO.Compression.ZipFile]::OpenRead('%PREBUILTDIR%\temp.zip'); foreach ($item in $zip.Entries) { try {$file=(Join-Path -Path .\%PREBUILTDIR% -ChildPath $item.FullName); $null=[System.IO.Directory]::CreateDirectory((Split-Path -Path $file)); [System.IO.Compression.ZipFileExtensions]::ExtractToFile($item,$file,$true)} catch {exit 1} }"
IF NOT %ERRORLEVEL% == 0 ( ECHO Failed extracting downloaded archive & EXIT /B 1 )
DEL /F /Q %PREBUILTDIR%\\temp.zip
ECHO.
EXIT /B %ERRORLEVEL%

:exitOnError
cd %CURRDIR%
SET ERROR=1

:exit
REM Directly exit if an AppVeyor build
IF NOT "%APPVEYOR%"=="" (
    GOTO return
)
REM Return the passed dependency list
(
    ENDLOCAL
    SET PASSDEPENDENCIES=%PASSDEPENDENCIES%
)

REM Check if this was launched from an existing terminal or directly from .bat
REM  If launched by executing the .bat then pause on completion
ECHO %CMDCMDLINE% | FINDSTR /L %COMSPEC% >NUL 2>&1
IF %ERRORLEVEL% == 0 IF "%~1"=="" PAUSE

:return
EXIT /B %ERROR%

Improve error detection of dependency bat file.


REM create databases
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! mysql < database\Create\create_mysql.sql

REM execute Base Scripts
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_auth < database\base\AuthenticationBase.sql
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_shard < database\base\ShardBase.sql
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_world < database\base\WorldBase.sql

REM execute Update Scripts for Authentication Database
REM "C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_auth < database\updates\auth\changeme.sql

REM execute Update Scripts for Shard Database
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_shard < database\updates\shard\08-20-2017-vw-ace-wielded-object.sql

REM Download latest ACE-World database, extract and import it
appveyor DownloadFile https://github.com/ACEmulator/ACE-World/releases/download/v0.2.3/ACE-World-db-v0.2.3.sql.zip
7z x ACE-World-db-v0.2.3.sql.zip
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_world < ACE-World-db-v0.2.3.sql

REM execute Update Scripts for World Database
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_world < database\updates\world\06-06-30-2017-generator-chains-testdata.sql

REM create databases
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! mysql < database\Create\create_mysql.sql

REM execute Base Scripts
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_auth < database\base\AuthenticationBase.sql
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_shard < database\base\ShardBase.sql
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_world < database\base\WorldBase.sql

REM execute Update Scripts for Authentication Database
REM "C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_auth < database\updates\auth\changeme.sql

REM execute Update Scripts for Shard Database
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_shard < database\updates\shard\2017-08-20-00-vw-ace-wielded-object.sql

REM Download latest ACE-World database, extract and import it
appveyor DownloadFile https://github.com/ACEmulator/ACE-World/releases/download/v0.2.5/ACE-World-db-v0.2.5.sql.zip
7z x ACE-World-db-v0.2.5.sql.zip
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_world < ACE-World-db-v0.2.5.sql

REM execute Update Scripts for World Database
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_world < database\updates\world\2017-06-30-00-generator-chains-testdata.sql

Update MySqlInstall.bat

Update MySqlInstall.bat


@echo off
if not defined APPVEYOR goto :else1
  if not exist D:\ goto :else2
    set PYTHONDONTWRITEBYTECODE=1
    set PYPY_USESSION_DIR=D:\
    set TEMP=D:\
    set TMP=D:\
    goto :endif2
  :else2
    echo "Running on appveyor, but there is no drive D."
    fsutil fsinfo drives
    echo "Maybe you want to put the tempdir where the pagefile is (assuming that is the fastest drive)"
    powershell -NonInteractive -command "& { gwmi -computer . Win32_PageFileUsage }"
  :endif2
  goto :endif1
:else1
  echo "Not running this on appveyor? You should use .build\build.py"
:endif1

if not defined buildscript (
  echo You need to set the buildscript var
  set errorlevel=1
  goto :endofscript
)

set BINURL=https://www.hpi.uni-potsdam.de/hirschfeld/artefacts/rsqueak/rsqueak-win32-%APPVEYOR_REPO_COMMIT%.exe
if %buildscript%==jittests.py (
  echo Downloding %BINURL% for jittests
  appveyor DownloadFile -Url %BINURL% -FileName $~dp0\..\rsqueak.exe
  if errorlevel 1 (
    echo Download failed, cannot run jittests
    set errorlevel=1
    goto :endofscript
  )
)

@echo on
set SDL_VIDEODRIVER=dummy
C:\Python27\python %~dp0\..\.build\%buildscript% %buildargs%

if %buildscript%==build.py (
  copy %~dp0\..\rsqueak.exe %~dp0\..\rsqueak-win32-%APPVEYOR_REPO_COMMIT%.exe
  powershell -NonInteractive -executionpolicy Unrestricted -command "& { %~dp0\rsqueak-upload.ps1 }"
)

:endofscript

@echo off
if not defined APPVEYOR goto :else1
  if not exist D:\ goto :else2
    set PYTHONDONTWRITEBYTECODE=1
    set PYPY_USESSION_DIR=D:\
    set TEMP=D:\
    set TMP=D:\
    goto :endif2
  :else2
    echo "Running on appveyor, but there is no drive D."
    fsutil fsinfo drives
    echo "Maybe you want to put the tempdir where the pagefile is (assuming that is the fastest drive)"
    powershell -NonInteractive -command "& { gwmi -computer . Win32_PageFileUsage }"
  :endif2
  goto :endif1
:else1
  echo "Not running this on appveyor? You should use .build\build.py"
:endif1

if not defined buildscript (
  echo You need to set the buildscript var
  set errorlevel=1
  goto :endofscript
)

set BINURL=https://www.hpi.uni-potsdam.de/hirschfeld/artefacts/rsqueak/rsqueak-win32-%APPVEYOR_REPO_COMMIT%.exe
if %buildscript%==jittests.py (
  echo Downloding %BINURL% for jittests
  appveyor DownloadFile -Url %BINURL% -FileName $~dp0\..\rsqueak.exe
  if errorlevel 1 (
    echo Download failed, cannot run jittests
    set errorlevel=1
    goto :endofscript
  )
)

@echo on
set SDL_VIDEODRIVER=dummy
C:\Python27\python %~dp0\..\.build\%buildscript% %buildargs%
if %ERRORLEVEL% GEQ 1 EXIT /B 1

if %buildscript%==build.py (
  copy %~dp0\..\rsqueak.exe %~dp0\..\rsqueak-win32-%APPVEYOR_REPO_COMMIT%.exe
  powershell -NonInteractive -executionpolicy Unrestricted -command "& { %~dp0\rsqueak-upload.ps1 }"
)

:endofscript

exit error on appveyor

exit error on appveyor


::https://www.syneart.com
@echo off&set mytitle=FastJavaC v1.9 (20151113) by Syneart
title %mytitle%
if (%~n1) EQU () echo nI妸, бN *.Java 즲ܥ妸ɮ׹ϥܶ}&set /p .=&goto End
title [ %~nx1 ] - %mytitle%
set nowDirectory="%cd%"&set maybeisx86on64="false"&set Wow6432Node=\
:getJDKPath
if %maybeisx86on64% EQU "true" (set Wow6432Node=\Wow6432Node\)
set packagePath=nul&set CheckpackagePath=nul&set fileTmepPath=%temp%\fastJavaTmp&set HaveParameter="false"&set CanClose="false"&set NoMainFunction=*
(for /f "tokens=2* delims=	 " %%a in ('REG QUERY "hklm\SOfTWaRE%Wow6432Node%JavaSoft\Java Development Kit" /v CurrentVersion') do set JavaVersion=%%b) >nul 2>nul
if "%JavaVersion%" EQU "" if %maybeisx86on64% EQU "false" (set maybeisx86on64="true"&goto getJDKPath)
for /f "tokens=2* delims=	 " %%a in ('REG QUERY "hklm\SOfTWaRE%Wow6432Node%JavaSoft\Java Development Kit\%JavaVersion%" /v JavaHome') do set JavaHome=%%b\bin\
for /f "tokens=1* delims=:package" %%a in ('findstr /i /n "package " %1') do set packagePath=%%b
set packagePath=%packagePath:;=%
set packagePath=%packagePath: =%
set CheckpackagePath=%packagePath://=EOF%
if "%packagePath%" EQU "nul" (set packagePath=%~n1)
if "%CheckpackagePath%" NEQ "%packagePath%" (set packagePath=%~n1)
:main
cls
for /f "tokens=1* delims=:main" %%a in ('findstr /i /n "void main" %1') do (set NoMainFunction=%~n1)
md %fileTmepPath% >nul 2>nul
del %fileTmepPath%\%~n1.class >nul 2>nul
del %fileTmepPath%\%packagePath%\%~n1.class >nul 2>nul
echo ^>^> %~n1 ɮ׽sĶ, еy ...&echo.
cd /d %~dp1%
"%JavaHome%javac" %NoMainFunction%.java -d %fileTmepPath%
if "%JavaVersion%" EQU "" if %maybeisx86on64% EQU "true" (echo.&echo ХUw Java SE Development Kit ^(JDK^)&set /p .=&goto End)
if not exist %fileTmepPath%\%~n1.class (
   if not exist %fileTmepPath%\%packagePath%\%~n1.class (echo.&echo ЭץHW~ !! ë Enter 䭫ssĶ ... &set /p .=&goto main)
   set packagePath=%packagePath%.%~n1
)
for /f "tokens=1* delims=" %%a in ('findstr /i /n "\<arg.*[0-9]\>" %1') do (set HaveParameter="true")
if %HaveParameter% EQU "true" (cls&echo zҩ즲 Java {ݭnJѼơAпJѼ :&set /p argument=)
for /f "tokens=1* delims=:.awt" %%a in ('findstr /i /n ".awt " %1') do (set CanClose="true")
for /f "tokens=1* delims=:.swing " %%a in ('findstr /i /n ".swing " %1') do (set CanClose="true")
echo ^>^>  %~n1 ...
if %CanClose% EQU "false" (cls)
cd /d %fileTmepPath%
"%JavaHome%java" %packagePath% %argument%
if %CanClose% EQU "false" (echo.&&cd %nowDirectory%&&set /p .=^>^> 槹AN䵲{ ...)
:End

Add file for Windows version

Add file for Windows version


@echo off
if "%1"=="" goto default_value_python:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value_python:
set pythonexe="c:\Python363_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python36_x64\python.exe"
:custom_python:
@echo [python] %pythonexe%
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

@echo off
if "%1"=="" goto default_value_python:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value_python:
set pythonexe="c:\Python364_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python363_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python36_x64\python.exe"
:custom_python:
@echo [python] %pythonexe%
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

update build_script

update build_script


@ECHO OFF

REM Sample usages:
REM
REM  Building and running tests
REM  - build.libgit2sharp.cmd
REM
REM  Building and identifying potential leaks while running tests
REM  - build.libgit2sharp.cmd "LEAKS_IDENTIFYING"

SETLOCAL

SET EXTRADEFINE=%~1

where dotnet 1>nul 2>nul
IF ERRORLEVEL 1 (
    ECHO Cannot find dotnet.exe. Run from a VS2017 Developer Prompt.
    EXIT /B 1
)

ECHO ON

SET Configuration=Release

:: Restore packages
dotnet restore "%~dp0\"
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%

:: Build
dotnet build "%~dp0\" /v:minimal /nologo /property:ExtraDefine="%EXTRADEFINE%"
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%

:: Run tests on Desktop and CoreCLR
"%userprofile%\.nuget\packages\xunit.runner.console\2.2.0\tools\xunit.console.exe" "%~dp0bin\LibGit2Sharp.Tests\%Configuration%\net46\LibGit2Sharp.Tests.dll" -noshadow
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
dotnet test "%~dp0LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj" --no-build -f netcoreapp1.0
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%

EXIT /B %ERRORLEVEL%

@ECHO OFF

REM Sample usages:
REM
REM  Building and running tests
REM  - buildandtest.cmd
REM
REM  Building and identifying potential leaks while running tests
REM  - buildandtest.cmd "LEAKS_IDENTIFYING"

SETLOCAL

SET EXTRADEFINE=%~1

where dotnet 1>nul 2>nul
IF ERRORLEVEL 1 (
    ECHO Cannot find dotnet.exe. Run from a VS2017 Developer Prompt.
    EXIT /B 1
)

ECHO ON

SET Configuration=Release

:: Restore packages
dotnet restore "%~dp0\"
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%

:: Build
dotnet build "%~dp0\" /v:minimal /nologo /property:ExtraDefine="%EXTRADEFINE%"
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%

:: Run tests on Desktop and CoreCLR
"%userprofile%\.nuget\packages\xunit.runner.console\2.2.0\tools\xunit.console.exe" "%~dp0bin\LibGit2Sharp.Tests\%Configuration%\net46\LibGit2Sharp.Tests.dll" -noshadow
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
dotnet test "%~dp0LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj" --no-build -f netcoreapp1.0
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%

EXIT /B %ERRORLEVEL%

Fix build script comments to match new name