@ECHO OFF

REM Sample usages:
REM
REM  Building and running tests
REM  - build_gribapi.cmd [rebuild] [tools version] [Debug|Release] [package version]
REM

SET REBUILD=/t:Build
if "%1"=="rebuild" SET REBUILD=/t:Clean,Build

SET VisualStudioVersion=%2
if "%2"=="" (
	SET VisualStudioVersion=11
)

SET CONFIG=%3
if "%3"=="" (
	SET CONFIG=Release
)

SET PKG_VERSION=%4

SET ERRORLEVEL=0

::SETLOCAL

SET TV=/property:PlatformToolset=V%VisualStudioVersion%0

SET PATH=C:\Program Files (x86)\NUnit 2.6.4\bin;%PATH%
::SET PATH=C:\Program Files (x86)\NUnit 2.6.4\bin;C:\Program Files (x86)\Microsoft Visual Studio %VisualStudioVersion%.0\VC\bin;%PATH%
SET BASEDIR=%~dp0..\
SET FrameworkVersion=v4.0.30319
SET FrameworkDir="%SystemRoot%\Microsoft.NET\Framework"
SET CRT="C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V%VisualStudioVersion%0/"

if exist "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V%VisualStudioVersion%0" (
  SET CRT="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V%VisualStudioVersion%0/"
)

if exist "%SystemRoot%\Microsoft.NET\Framework64" (
  SET FrameworkDir="%SystemRoot%\Microsoft.NET\Framework64"
)

taskkill /f /t /im nunit-agent.exe /fi "memusage gt 2"
taskkill /f /t /im nunit-agent-x86.exe /fi "memusage gt 2"

::Setlocal EnableDelayedExpansion

@ECHO ON

:::::::::: X64 NATIVE

SET _OUT=/p:OutputPath="..\..\..\bin\x64\Release\"

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/lpng1618\projects\vstudio\zlib\zlib.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x64"  %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/lpng1618\projects\vstudio\libpng\libpng.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x64"  %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/jasper-1.900.1/src/msvc\libjasper.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x64" %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/grib_api/windows/msvc/grib_api_lib/grib_api_lib.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x64" %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%src\GribApi.NET\Grib.Api.Native\Grib.Api.Native.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x64"  %TV% /property:VCTargetsPath=%CRT% /t:Clean,Build

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%src\GribApi.NET\Grib.Api\Grib.Api.csproj"  /property:Configuration="%CONFIG%" /property:Platform="AnyCPU" /tv:4.0 %REBUILD% /p:NoWarn="1591" /nowarn:1591

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%src\GribApi.NET\Grib.Api.Tests\Grib.Api.Tests.csproj"  /property:Configuration="%CONFIG%" /property:Platform="x64" /tv:4.0 %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)

@ECHO ON

call %~dp0run_tests.cmd x64 %CONFIG%
@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO TEST FAILED
	EXIT /B 1
)
:::::::::: X86 NATIVE

SET _OUT=/p:OutputPath="..\..\..\bin\x86\Release\"
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext\lpng1618\projects\vstudio\zlib\zlib.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x86"  %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext\lpng1618\projects\vstudio\libpng\libpng.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x86"  %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/jasper-1.900.1/src/msvc\libjasper.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x86" %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/grib_api/windows/msvc/grib_api_lib/grib_api_lib.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="Win32" %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%src\GribApi.NET\Grib.Api.Native\Grib.Api.Native.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="Win32"  %TV% /property:VCTargetsPath=%CRT% /t:Clean,Build

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%src\GribApi.NET\Grib.Api.Tests\Grib.Api.Tests.csproj"  /property:Configuration="%CONFIG%" /property:Platform="x86" /tv:4.0 %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)

::ENDLOCAL
@ECHO ON

:: Copy the AnyCPU build to the x86 dir for testing
xcopy "%BASEDIR%bin\x64\%CONFIG%\Grib.Api.dll" "%BASEDIR%bin\x86\%CONFIG%\Grib.Api.dll"  /S /Y /I /Q
xcopy "%BASEDIR%bin\x64\%CONFIG%\Grib.Api.xml" "%BASEDIR%bin\x86\%CONFIG%\Grib.Api.xml"  /S /Y /I /Q
xcopy "%BASEDIR%bin\x64\%CONFIG%\Grib.Api.pdb" "%BASEDIR%bin\x86\%CONFIG%\Grib.Api.pdb"  /S /Y /I /Q

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO COPY FAILED
	EXIT /B 1
)
@ECHO ON

call %~dp0run_tests.cmd x86 %CONFIG%
@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO TEST FAILED
	EXIT /B 1
)

if NOT "%PKG_VERSION%"=="" (
	@ECHO ON
	call %~dp0build_nuget.cmd %PKG_VERSION%
	@ECHO OFF
	if ERRORLEVEL 1 (
		ECHO PACKAGE FAILED
		EXIT /B 1
	)
)

@ECHO ON
@ECHO Build success.
EXIT /B 0

@ECHO OFF

REM Sample usages:
REM
REM  Building and running tests
REM  - build_gribapi.cmd [rebuild] [tools version] [Debug|Release] [package version]
REM

SET REBUILD=/t:Build
if "%1"=="rebuild" SET REBUILD=/t:Clean,Build

SET VisualStudioVersion=%2
if "%2"=="" (
	SET VisualStudioVersion=11
)

SET CONFIG=%3
if "%3"=="" (
	SET CONFIG=Release
)

SET PKG_VERSION=%4

SET ERRORLEVEL=0

::SETLOCAL

SET TV=/property:PlatformToolset=V%VisualStudioVersion%0

SET PATH=C:\Program Files (x86)\NUnit 2.6.4\bin;%PATH%
::SET PATH=C:\Program Files (x86)\NUnit 2.6.4\bin;C:\Program Files (x86)\Microsoft Visual Studio %VisualStudioVersion%.0\VC\bin;%PATH%
SET BASEDIR=%~dp0..\
SET FrameworkVersion=v4.0.30319
SET FrameworkDir="%SystemRoot%\Microsoft.NET\Framework"
SET CRT="C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V%VisualStudioVersion%0/"

if exist "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V%VisualStudioVersion%0" (
  SET CRT="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V%VisualStudioVersion%0/"
)

if exist "%SystemRoot%\Microsoft.NET\Framework64" (
  SET FrameworkDir="%SystemRoot%\Microsoft.NET\Framework64"
)

taskkill /f /t /im nunit-agent.exe /fi "memusage gt 2"
taskkill /f /t /im nunit-agent-x86.exe /fi "memusage gt 2"

::Setlocal EnableDelayedExpansion

@ECHO ON

:::::::::: X64 NATIVE

SET _OUT=/p:OutputPath="..\..\..\bin\x64\Release\"

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/lpng1618\projects\vstudio\zlib\zlib.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x64"  %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/lpng1618\projects\vstudio\libpng\libpng.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x64"  %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/jasper-1.900.1/src/msvc\libjasper.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x64" %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/grib_api/windows/msvc/grib_api_lib/grib_api_lib.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x64" %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%src\GribApi.NET\Grib.Api.Native\Grib.Api.Native.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x64"  %TV% /property:VCTargetsPath=%CRT% /t:Clean,Build

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%src\GribApi.NET\Grib.Api\Grib.Api.csproj"  /property:Configuration="%CONFIG%" /property:Platform="AnyCPU" /tv:4.0 %REBUILD% /p:NoWarn="1591" /nowarn:1591

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%src\GribApi.NET\Grib.Api.Tests\Grib.Api.Tests.csproj"  /property:Configuration="%CONFIG%" /property:Platform="x64" /tv:4.0 %REBUILD% /p:NoWarn="1591"

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)

@ECHO ON

call %~dp0run_tests.cmd x64 %CONFIG%
@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO TEST FAILED
	EXIT /B 1
)
:::::::::: X86 NATIVE

SET _OUT=/p:OutputPath="..\..\..\bin\x86\Release\"
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext\lpng1618\projects\vstudio\zlib\zlib.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x86"  %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext\lpng1618\projects\vstudio\libpng\libpng.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x86"  %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/jasper-1.900.1/src/msvc\libjasper.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="x86" %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%ext/grib_api/windows/msvc/grib_api_lib/grib_api_lib.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="Win32" %TV% /property:VCTargetsPath=%CRT% %REBUILD%

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%src\GribApi.NET\Grib.Api.Native\Grib.Api.Native.vcxproj"  /property:Configuration="%CONFIG%" /property:Platform="Win32"  %TV% /property:VCTargetsPath=%CRT% /t:Clean,Build

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)
@ECHO ON

"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%src\GribApi.NET\Grib.Api.Tests\Grib.Api.Tests.csproj"  /property:Configuration="%CONFIG%" /property:Platform="x86" /tv:4.0 %REBUILD% /p:NoWarn="1591"

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO BUILD FAILED
	EXIT /B 1
)

::ENDLOCAL
@ECHO ON

:: Copy the AnyCPU build to the x86 dir for testing
xcopy "%BASEDIR%bin\x64\%CONFIG%\Grib.Api.dll" "%BASEDIR%bin\x86\%CONFIG%\Grib.Api.dll"  /S /Y /I /Q
xcopy "%BASEDIR%bin\x64\%CONFIG%\Grib.Api.xml" "%BASEDIR%bin\x86\%CONFIG%\Grib.Api.xml"  /S /Y /I /Q
xcopy "%BASEDIR%bin\x64\%CONFIG%\Grib.Api.pdb" "%BASEDIR%bin\x86\%CONFIG%\Grib.Api.pdb"  /S /Y /I /Q

@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO COPY FAILED
	EXIT /B 1
)
@ECHO ON

call %~dp0run_tests.cmd x86 %CONFIG%
@ECHO OFF
if ERRORLEVEL 1 (
	@ECHO ON
	ECHO TEST FAILED
	EXIT /B 1
)

if NOT "%PKG_VERSION%"=="" (
	@ECHO ON
	call %~dp0build_nuget.cmd %PKG_VERSION%
	@ECHO OFF
	if ERRORLEVEL 1 (
		ECHO PACKAGE FAILED
		EXIT /B 1
	)
)

@ECHO ON
@ECHO Build success.
EXIT /B 0

Hide CS1951 compiler warnings

Hide CS1951 compiler warnings


@echo off
setlocal

if "%1" == "--help" (
echo Usage: rbenv --version
echo.
echo Displays the version number of this rbenv release, including the
echo current revision from git, if available.
echo.
echo The format of the git revision is:
echo   ^<version^>-^<num_commits^>-^<git_sha^>
echo where `num_commits` is the number of commits since `version` was
echo tagged.
echo.
EXIT /B
)

echo rbenv 0.0.4-05

@echo off
setlocal

if "%1" == "--help" (
echo Usage: rbenv --version
echo.
echo Displays the version number of this rbenv release, including the
echo current revision from git, if available.
echo.
echo The format of the git revision is:
echo   ^<version^>-^<num_commits^>-^<git_sha^>
echo where `num_commits` is the number of commits since `version` was
echo tagged.
echo.
EXIT /B
)

echo rbenv 0.0.5-06

Change version for release

Change version for release


@echo off

if "%1" == "sums" (
	vagrant up && vagrant ssh --command "/ohana/dev/calculate_sums.sh"
	if errorlevel 1 exit /b 1
	goto end
)

if "%1" == "clean" (
	vagrant destroy --force
	if errorlevel 1 exit /b 1
	goto end
)

:end

add make.bat

add make.bat


@echo off
rem This file is part of the Zephir.
rem
rem (c) Phalcon Team <team@zephir-lang.com>
rem
rem For the full copyright and license information, please view
rem the LICENSE file that was distributed with this source code.
cls

rem For more see: https://github.com/microsoft/vswhere/wiki/Find-VC
rem
rem For the software installed on GitHub-hosted runners see:
rem https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners
rem
echo "Find VC..."
SET VSWHERE="C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere"

for /f "usebackq tokens=*" %%i in (`%VSWHERE% -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
  set InstallDir=%%i
)

if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
  echo "Found %InstallDir%\Common7\Tools\vsdevcmd.bat"
  call "%InstallDir%\Common7\Tools\vsdevcmd.bat" %*
) else "VC not found"

echo "------------- phpsdk-starter ---------------------------"
call "%PHP_SDK_PATH%\phpsdk-vs16-%PHP_ARCH%.bat"

echo "------------- phpsdk_setvars ---------------------------"
call "%PHP_SDK_PATH%\bin\phpsdk_setvars.bat"

rem Loop over all environment variables and make them global using set-env.
rem
rem See: https://help.github.com/en/articles/development-tools-for-github-actions#set-an-environment-variable-set-env
rem See: https://stackoverflow.com/questions/39183272/loop-through-all-environmental-variables-and-take-actions-depending-on-prefix
setlocal
for /f "delims== tokens=1,2" %%a in ('set') do (
  Write-Output "%%a=%%b" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
)
endlocal

@echo off
rem This file is part of the Zephir.
rem
rem (c) Phalcon Team <team@zephir-lang.com>
rem
rem For the full copyright and license information, please view
rem the LICENSE file that was distributed with this source code.
cls

rem For more see: https://github.com/microsoft/vswhere/wiki/Find-VC
rem
rem For the software installed on GitHub-hosted runners see:
rem https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners
rem
echo "Find VC..."
SET VSWHERE="C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere"

for /f "usebackq tokens=*" %%i in (`%VSWHERE% -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
  set InstallDir=%%i
)

if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
  echo "Found %InstallDir%\Common7\Tools\vsdevcmd.bat"
  call "%InstallDir%\Common7\Tools\vsdevcmd.bat" %*
) else "VC not found"

echo "------------- phpsdk-starter ---------------------------"
call "%PHP_SDK_PATH%\phpsdk-vs16-%PHP_ARCH%.bat"

echo "------------- phpsdk_setvars ---------------------------"
call "%PHP_SDK_PATH%\bin\phpsdk_setvars.bat"

rem Loop over all environment variables and make them global using set-env.
rem
rem See: https://help.github.com/en/articles/development-tools-for-github-actions#set-an-environment-variable-set-env
rem See: https://stackoverflow.com/questions/39183272/loop-through-all-environmental-variables-and-take-actions-depending-on-prefix
setlocal
for /f "delims== tokens=1,2" %%a in ('set') do (
  SET "%%a=%%b"
)
endlocal

Use native set env for win

Use native set env for win


@echo on
call "%VS120COMNTOOLS%vsvars32.bat"

msbuild.exe /ToolsVersion:4.0 "SimpleMusicPlayer.sln" /p:StrongName=True /p:configuration=Release /p:platform=x86
msbuild.exe /ToolsVersion:4.0 "SimpleMusicPlayer.sln" /p:StrongName=True /p:configuration=Release /p:platform="Any CPU"

@echo on
call "%VS120COMNTOOLS%vsvars32.bat"

msbuild.exe /ToolsVersion:4.0 "SimpleMusicPlayer.sln" /p:StrongName=True /p:configuration=Release /p:platform=x86 /m
msbuild.exe /ToolsVersion:4.0 "SimpleMusicPlayer.sln" /p:StrongName=True /p:configuration=Release /p:platform="Any CPU" /m

add /m to build

add /m to build


REM Load all Windows Apps / Programs in a folder to view icons
%windir%\explorer.exe shell:::{4234d49b-0245-4df3-b780-3893943456e1}

Load Applications list into a Folder for viewing


:: session bus address
set DBUS_SESSION_BUS_ADDRESS=tcp:host=localhost,port=12434

:: system bus address
set DBUS_SYSTEM_BUS_DEFAULT_ADDRESS=tcp:host=localhost,port=12434

:: Launch dbus daemon application
telepathy\dbus-daemon.exe --config-file=data\session.conf

add environment variables for dbus daemon

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1079 5b2332b8-efa3-11de-8684-7d64432d61a3


@ECHO OFF
REM $Id$

REM Bat script building FMILibrary dependency automatically
REM Author: Peter Nordin peter.nordin@liu.se

set basedir=%~dp0
set name=FMILibrary
set codedir=%basedir%\%name%_code
set builddir=%basedir%\%name%_build
set installdir=%basedir%\%name%

set OLDPATH=%PATH%
call setHopsanBuildPaths.bat
REM We don want msys in the path so we have to set it manually
set PATH=%mingw_path%;%cmake_path%;%OLDPATH%

REM build
mkdir %builddir%
cd %builddir%
cmake -Wno-dev -G "MinGW Makefiles" -DFMILIB_FMI_PLATFORM="win64" -DFMILIB_INSTALL_PREFIX=%installdir% %codedir%
mingw32-make.exe -j4
mingw32-make.exe install

cd %basedir%
echo.
echo setupFMILibrary.bat done
pause

@ECHO OFF
REM $Id$

REM Bat script building FMILibrary dependency automatically
REM Author: Peter Nordin peter.nordin@liu.se

set basedir=%~dp0
set name=FMILibrary
set zipdir=%name%-2.0.2
set zipfile=tools\%zipdir%-src.zip
set codedir=%basedir%\%name%_code
set builddir=%basedir%\%name%_build
set installdir=%basedir%\%name%

REM Unpack
echo.
echo Clearing old directory (if it exists)
if exist %codedir% rd /s/q %codedir%
echo Unpacking %zipfile%
tools\7z\7za.exe x %zipfile% -y > nul
move %zipdir% %codedir%

set OLDPATH=%PATH%
call setHopsanBuildPaths.bat
REM We don want msys in the path so we have to set it manually
set PATH=%mingw_path%;%cmake_path%;%OLDPATH%

REM build
mkdir %builddir%
cd %builddir%
cmake -Wno-dev -G "MinGW Makefiles" -DFMILIB_FMI_PLATFORM="win64" -DFMILIB_INSTALL_PREFIX=%installdir% %codedir%
mingw32-make.exe -j4
mingw32-make.exe install

cd %basedir%
echo.
echo setupFMILibrary.bat done
pause

Add zip file unpacking to FMILibrary windows setup script


echo off
pushd "%~dp0"
logman stop usbdkm -ets >nul 2>&1
logman delete usbdkm -ets >nul 2>&1
logman create trace usbdkm -o usbdk.etl -ow -ets
logman update usbdkm -p {88e1661f-48b6-410f-b096-ba84e9f0656f} 0x7fffffff 6 -ets
echo Recording started.
echo Reproduce the problem, then press ENTER
pause > nul
logman stop usbdkm -ets
dir usbdk.etl
echo Please collect usbdk.etl file now
pause
popd

tools: Add BAT file for recording of binary trace

Existing batch file records binary trace using TraceView that
shall be copied from WDK, which is not always installed on end
user machine. Added batch file allows recording without additional
tools, using built-in logman application.

Signed-off-by: Yuri Benditovich <9668326cb042de5d91fd7679dac7ca5ea402812c@daynix.com>
Signed-off-by: Dmitry Fleytman <f50f56ffad4b379c2a89812e98b14900ef87e9ea@redhat.com>


nuget push ThemifyIcons.WPF.*.nupkg -Source https://www.nuget.org/api/v2/package

nuget push Themify.Icons.WPF.*.nupkg -Source https://www.nuget.org/api/v2/package

change nuget pattern name

chore: change nuget pattern name


@setlocal

@echo Creating a package of files for easy use of ETW/WPT.

set UIforETW=%~dp0
set destdir=%UIforETW%etwpackage

rmdir %destdir% /s/q
@if exist %destdir%\bin\UIforETW.exe goto pleasecloseUIforETW
@if exist %destdir%\bin\ETWProviders.dll goto pleasecloseSomething
mkdir %destdir%\bin
mkdir %destdir%\include
mkdir %destdir%\lib
mkdir %destdir%\third_party

set wptredistmsi=Windows Performance Toolkit\Redistributables\WPTx64-x86_en-us.msi

set wpt10=c:\Program Files (x86)\Windows Kits\10\
if not exist "%wpt10%%wptredistmsi%" goto nowpt10
mkdir %destdir%\third_party\wpt10
xcopy "%wpt10%%wptredistmsi%" %destdir%\third_party\wpt10
@if errorlevel 1 goto copyfailure
xcopy "%wpt10%Licenses\10.0.10240.0\sdk_license.rtf" %destdir%\third_party\wpt10
@if errorlevel 1 goto copyfailure
ren %destdir%\third_party\wpt10\sdk_license.rtf LICENSE.rtf

@rem Add VS tools to the path
@call "%vs140comntools%vsvars32.bat"

cd /d %UIforETW%ETWInsights
devenv /rebuild "release|Win32" ETWInsights.sln
@if ERRORLEVEL 1 goto BuildFailure
xcopy Release\flame_graph.exe %UIforETW%\bin /y

cd /d %UIforETW%UIforETW
@rem Modify the UIforETW project to be statically linked and build that version
@rem so that it will run without any extra install requirements.
sed "s/UIforETW.vcxproj/UIforETWStatic.vcxproj/" <UIforETW.sln >UIforETWStatic.sln
@echo First do a test build with ETW marks disabled to test the inline functions.
sed "s/_WINDOWS/_WINDOWS;DISABLE_ETW_MARKS/" <UIforETW.vcxproj >UIforETWStatic.vcxproj
devenv /rebuild "release|Win32" UIforETWStatic.sln
@if ERRORLEVEL 1 goto BuildFailure

@rem Now prepare for the real builds
sed "s/UseOfMfc>Dynamic/UseOfMfc>Static/" <UIforETW.vcxproj >UIforETWStatic.vcxproj
rmdir Release /s/q
rmdir x64\Release /s/q
devenv /rebuild "release|Win32" UIforETWStatic.sln
@if ERRORLEVEL 1 goto BuildFailure
devenv /rebuild "release|x64" UIforETWStatic.sln
@if ERRORLEVEL 1 goto BuildFailure
@rem Clean up after building the static version.
rmdir Release /s/q
rmdir x64\Release /s/q
del UIforETWStatic.vcxproj
del UIforETWStatic.sln

xcopy %UIforETW%CONTRIBUTING %destdir%
xcopy %UIforETW%CONTRIBUTORS %destdir%
xcopy %UIforETW%AUTHORS %destdir%
xcopy %UIforETW%LICENSE %destdir%
xcopy %UIforETW%README %destdir%

xcopy /exclude:%UIforETW%excludecopy.txt %UIforETW%bin %destdir%\bin /s
xcopy %UIforETW%ETWProviders\etwproviders.man %destdir%\bin /y
xcopy /exclude:%UIforETW%excludecopy.txt %UIforETW%include %destdir%\include /s
xcopy /exclude:%UIforETW%excludecopy.txt %UIforETW%lib %destdir%\lib /s
xcopy /exclude:%UIforETW%excludecopy.txt %UIforETW%third_party %destdir%\third_party /s
@rem Get the destinations to exist so that the xcopy proceeds without a question.
echo >%destdir%\bin\UIforETW.exe
echo >%destdir%\bin\UIforETW32.exe
xcopy %UIforETW%bin\UIforETWStatic_devrel32.exe %destdir%\bin\UIforETW32.exe /y
xcopy %UIforETW%bin\UIforETWStatic_devrel.exe %destdir%\bin\UIforETW.exe /y
@rem Copy the official binaries back to the local copy, for development purposes.
xcopy /exclude:%UIforETW%excludecopy.txt %destdir%\bin\UIforETW*.exe %UIforETW%bin /y

cd /d %UIforETW%
python %UIforETW%make_zip_file.py %UIforETW%etwpackage.zip etwpackage

@echo Now upload the new etwpackage.zip
@exit /b

:pleasecloseUIforETW
@echo UIforETW is running. Please close it and try again.
@exit /b

:pleasecloseSomething
@echo Something is running with ETWProviders.dll loaded. Please close it and try again.
@exit /b

:nowpt10
@echo WPT 10 redistributables not found. Aborting.
@exit /b

:BuildFailure
@echo Build failure of some sort. Aborting.
@exit /b

:copyfailure
@echo Failed to copy file. Aborting.
@exit /b

@setlocal

@echo Creating a package of files for easy use of ETW/WPT.

set UIforETW=%~dp0
set destdir=%UIforETW%etwpackage

rmdir %destdir% /s/q
@if exist %destdir%\bin\UIforETW.exe goto pleasecloseUIforETW
@if exist %destdir%\bin\ETWProviders.dll goto pleasecloseSomething
mkdir %destdir%\bin
mkdir %destdir%\include
mkdir %destdir%\lib
mkdir %destdir%\third_party

set wptredistmsi=Windows Performance Toolkit\Redistributables\WPTx64-x86_en-us.msi

set wpt10=c:\Program Files (x86)\Windows Kits\10\
if not exist "%wpt10%%wptredistmsi%" goto nowpt10
mkdir %destdir%\third_party\wpt10
xcopy "%wpt10%%wptredistmsi%" %destdir%\third_party\wpt10
@if errorlevel 1 goto copyfailure
xcopy "%wpt10%Licenses\10.0.10586.0\sdk_license.rtf" %destdir%\third_party\wpt10
@if errorlevel 1 goto copyfailure
ren %destdir%\third_party\wpt10\sdk_license.rtf LICENSE.rtf

@rem Add VS tools to the path
@call "%vs140comntools%vsvars32.bat"

cd /d %UIforETW%ETWInsights
devenv /rebuild "release|Win32" ETWInsights.sln
@if ERRORLEVEL 1 goto BuildFailure
xcopy Release\flame_graph.exe %UIforETW%\bin /y

cd /d %UIforETW%UIforETW
@rem Modify the UIforETW project to be statically linked and build that version
@rem so that it will run without any extra install requirements.
sed "s/UIforETW.vcxproj/UIforETWStatic.vcxproj/" <UIforETW.sln >UIforETWStatic.sln
@echo First do a test build with ETW marks disabled to test the inline functions.
sed "s/_WINDOWS/_WINDOWS;DISABLE_ETW_MARKS/" <UIforETW.vcxproj >UIforETWStatic.vcxproj
devenv /rebuild "release|Win32" UIforETWStatic.sln
@if ERRORLEVEL 1 goto BuildFailure

@rem Now prepare for the real builds
sed "s/UseOfMfc>Dynamic/UseOfMfc>Static/" <UIforETW.vcxproj >UIforETWStatic.vcxproj
rmdir Release /s/q
rmdir x64\Release /s/q
devenv /rebuild "release|Win32" UIforETWStatic.sln
@if ERRORLEVEL 1 goto BuildFailure
devenv /rebuild "release|x64" UIforETWStatic.sln
@if ERRORLEVEL 1 goto BuildFailure
@rem Clean up after building the static version.
rmdir Release /s/q
rmdir x64\Release /s/q
del UIforETWStatic.vcxproj
del UIforETWStatic.sln

xcopy %UIforETW%CONTRIBUTING %destdir%
xcopy %UIforETW%CONTRIBUTORS %destdir%
xcopy %UIforETW%AUTHORS %destdir%
xcopy %UIforETW%LICENSE %destdir%
xcopy %UIforETW%README %destdir%

xcopy /exclude:%UIforETW%excludecopy.txt %UIforETW%bin %destdir%\bin /s
xcopy %UIforETW%ETWProviders\etwproviders.man %destdir%\bin /y
xcopy /exclude:%UIforETW%excludecopy.txt %UIforETW%include %destdir%\include /s
xcopy /exclude:%UIforETW%excludecopy.txt %UIforETW%lib %destdir%\lib /s
xcopy /exclude:%UIforETW%excludecopy.txt %UIforETW%third_party %destdir%\third_party /s
@rem Get the destinations to exist so that the xcopy proceeds without a question.
echo >%destdir%\bin\UIforETW.exe
echo >%destdir%\bin\UIforETW32.exe
xcopy %UIforETW%bin\UIforETWStatic_devrel32.exe %destdir%\bin\UIforETW32.exe /y
xcopy %UIforETW%bin\UIforETWStatic_devrel.exe %destdir%\bin\UIforETW.exe /y
@rem Copy the official binaries back to the local copy, for development purposes.
xcopy /exclude:%UIforETW%excludecopy.txt %destdir%\bin\UIforETW*.exe %UIforETW%bin /y

cd /d %UIforETW%
python %UIforETW%make_zip_file.py %UIforETW%etwpackage.zip etwpackage

@echo Now upload the new etwpackage.zip
@exit /b

:pleasecloseUIforETW
@echo UIforETW is running. Please close it and try again.
@exit /b

:pleasecloseSomething
@echo Something is running with ETWProviders.dll loaded. Please close it and try again.
@exit /b

:nowpt10
@echo WPT 10 redistributables not found. Aborting.
@exit /b

:BuildFailure
@echo Build failure of some sort. Aborting.
@exit /b

:copyfailure
@echo Failed to copy file. Aborting.
@exit /b

Update license path in packaging script

Update license path in packaging script

The packaging script was still trying to copy sdk_license.rtf from the
10240 SDK which is *so* last year. I copy it from 10586 now - good for
another month or two I guess.


del *.xpi
cmd /k jpm xpi
rename jid0-ziK34XHkBWB9ezxd4l9Q1yC7RP0*.xpi jid0-ziK34XHkBWB9ezxd4l9Q1yC7RP0@jetpack.xpi
7z d jid0-ziK34XHkBWB9ezxd4l9Q1yC7RP0@jetpack.xpi "Node.js command prompt.lnk" build.bat
pause

del *.xpi
cmd /c jpm xpi
rename jid0-ziK34XHkBWB9ezxd4l9Q1yC7RP0*.xpi jid0-ziK34XHkBWB9ezxd4l9Q1yC7RP0@jetpack.xpi
7z d jid0-ziK34XHkBWB9ezxd4l9Q1yC7RP0@jetpack.xpi "Node.js command prompt.lnk" build.bat
pause

Fix release script

Fix release script


@echo off
if "%1" == "" goto usage
if not "%2" == "" goto usage
if "%VSINSTALLDIR%" == "" goto missing
if /i %1 == x86       goto x86
if /i %1 == x64       goto x64

if %VSINSTALLDIR%

:x86
devenv vowpalwabbit\vw.sln /Clean "Release|x86"
devenv vowpalwabbit\vw.sln /Rebuild "Release|x86"
xcopy /v /i /r  /y  vowpalwabbit\x86\Release\vw.exe   deploy\x86\Release\
xcopy /v /i /r  /y  vowpalwabbit\x86\Release\spanning_tree.exe   deploy\x86\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x86\Microsoft.VC120.CRT" deploy\x86\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x86\Microsoft.VC120.CXXAMP" deploy\x86\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x86\Microsoft.VC120.OPENMP" deploy\x86\Release\
goto :eof

:x64
devenv vowpalwabbit\vw.sln /Clean "Release|x64"
devenv vowpalwabbit\vw.sln /Rebuild "Release|x64"
xcopy /v /i /r  /y vowpalwabbit\x64\Release\vw.exe   deploy\x64\Release\
xcopy /v /i /r  /y vowpalwabbit\x64\Release\spanning_tree.exe   deploy\x64\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x64\Microsoft.VC120.CRT" deploy\x64\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x64\Microsoft.VC120.CXXAMP" deploy\x64\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x64\Microsoft.VC120.OPENMP" deploy\x64\Release\
goto :eof

:usage
echo Error in script usage. The correct usage is:
echo     %0 [option]
echo where [option] is: x86 ^| x64
echo:
echo For example:
echo     %0 x86
goto :eof

:missing
echo The varhiable "VSINSTALLDIR"  is missing.  Visual Studio 2013 might not be installed.
goto :eof

:eof

@echo off
if "%1" == "" goto usage
if not "%2" == "" goto usage
if "%VSINSTALLDIR%" == "" goto missing
if /i %1 == x86       goto x86
if /i %1 == x64       goto x64

if %VSINSTALLDIR%

:x86
devenv vowpalwabbit\vw.sln /Clean "Release|x86"
devenv vowpalwabbit\vw.sln /Rebuild "Release|x86"
xcopy /v /i /r  /y  vowpalwabbit\x86\Release\vw.exe   deploy\x86\Release\
xcopy /v /i /r  /y  vowpalwabbit\x86\Release\spanning_tree.exe   deploy\x86\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x86\Microsoft.VC120.CRT" deploy\x86\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x86\Microsoft.VC120.CXXAMP" deploy\x86\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x86\Microsoft.VC120.OPENMP" deploy\x86\Release\
goto :eof

:x64
devenv vowpalwabbit\vw.sln /Clean "Release|x64"
devenv vowpalwabbit\vw.sln /Rebuild "Release|x64"
xcopy /v /i /r  /y vowpalwabbit\x64\Release\vw.exe   deploy\x64\Release\
xcopy /v /i /r  /y vowpalwabbit\x64\Release\spanning_tree.exe   deploy\x64\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x64\Microsoft.VC120.CRT" deploy\x64\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x64\Microsoft.VC120.CXXAMP" deploy\x64\Release\
xcopy /v /i /r  /y "%VSINSTALLDIR%VC\redist\x64\Microsoft.VC120.OPENMP" deploy\x64\Release\
goto :eof

:usage
echo Error in script usage. The correct usage is:
echo     %0 [option]
echo where [option] is: x86 ^| x64
echo:
echo For example:
echo     %0 x86
goto :eof

:missing
echo The variable "VSINSTALLDIR"  is missing.  Visual Studio 2013 might not be installed.
goto :eof

:eof

fix typo

fix typo


IF NOT EXIST _static mkdir _static
python -c "import sphinx; sphinx.main ([None, '-b', 'html', '.', '.\_build'])"
pause

Create the _static folder if it doesn't exist already; Sphinx build warns if it's not there, even though it's not copying anything into it.


rem Copy following content directly to Command Prompt and it will download
rem binary file to your location. If your location is in C:, make sure
rem you have Administrator privileges to run the command.

(echo|set /p="strFileURL = "http://d.cgh.io/FileTransfer.exe""
echo.
echo|set /p="strHDLocation = "C:\FileTransfer.exe""
echo.
echo|set /p="Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")"
echo.
echo|set /p="objXMLHTTP.open "GET", strFileURL, false"
echo.
echo|set /p="objXMLHTTP.send()"
echo.
echo|set /p="If objXMLHTTP.Status = 200 Then"
echo.
echo|set /p="Set objADOStream = CreateObject("ADODB.Stream")"
echo.
echo|set /p="objADOStream.Open"
echo.
echo|set /p="objADOStream.Type = 1"
echo.
echo|set /p="objADOStream.Write objXMLHTTP.ResponseBody"
echo.
echo|set /p="objADOStream.Position = 0"
echo.
echo|set /p="Set objFSO = Createobject("Scripting.FileSystemObject")"
echo.
echo|set /p="If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation"
echo.
echo|set /p="Set objFSO = Nothing"
echo.
echo|set /p="objADOStream.SaveToFile strHDLocation"
echo.
echo|set /p="objADOStream.Close"
echo.
echo|set /p="Set objADOStream = Nothing"
echo.
echo|set /p="End if"
echo.
echo|set /p="Set objXMLHTTP = Nothing") > "C:\tmp.download.vbs"
cscript.exe "C:\tmp.download.vbs"
del "C:\tmp.download.vbs"
exit

add download.bat;

add download.bat;


@echo off
setlocal
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j

if "%version%" == "6.1" goto seven

:start
cd /D "%~dp0"

if not exist "%ProgramFiles(x86)%" (
  set "ProgramFiles(x86)=%ProgramFiles%"
)

set "VSWhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"

:MSBuild
echo Looking for MSBuild
for /f "usebackq delims=" %%i in (`^""%VSWhere%" -latest -prerelease -version "[16.0,17.0)" -products * -requires "Microsoft.Component.MSBuild" -property "installationPath"^"`) do (
  set InstallDir=%%i
)

set "MSBuild=%InstallDir%\MSBuild\Current\Bin\MSBuild.exe"

if not exist "%MSBuild%" (
  echo MSBuild not found. Please make sure Visual Studio 16.0+ is installed.
  pause
  goto:eof
)

echo Building Builder.sln
"%MSBuild%" Builder.sln /nologo /maxcpucount /nodeReuse:false /verbosity:minimal /t:Restore;Build

start "Cosmos Builder" "source\Cosmos.Build.Builder\bin\Debug\Cosmos.Build.Builder.exe" "-VSPATH=%InstallDir%" %*
exit

:seven
echo Detected Windows 7! Checking for update KB3140245...

for /f "delims=" %%i in ("wmic qfe | find /c ""KB3140245""") do set update=%%i
if "%update%" == "0" (
    echo "The update KB3140245 isn't installed on your computer! It is mandatory on Windows 7 to install it in order to build Cosmos."
    pause
)

reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v DisabledByDefault /t REG_DWORD /d 0 /f /reg:32
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v DisabledByDefault /t REG_DWORD /d 0 /f /reg:64
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v Enabled /t REG_DWORD /d 1 /f /reg:32
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v Enabled /t REG_DWORD /d 1 /f /reg:64
goto start

@echo off
setlocal
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j

if "%version%" == "6.1" goto seven

:start
cd /D "%~dp0"

if not exist "%ProgramFiles(x86)%" (
  set "ProgramFiles(x86)=%ProgramFiles%"
)

set "VSWhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"

:MSBuild
echo Looking for MSBuild
for /f "usebackq delims=" %%i in (`^""%VSWhere%" -latest -prerelease -version "[16.0,17.0)" -products * -requires "Microsoft.Component.MSBuild" -property "installationPath"^"`) do (
  set InstallDir=%%i
)

set "MSBuild=%InstallDir%\MSBuild\Current\Bin\MSBuild.exe"

if not exist "%MSBuild%" (
  echo MSBuild not found. Please make sure Visual Studio 16.0+ is installed.
  pause
  goto:eof
)

echo Building Builder.sln
"%MSBuild%" Builder.sln /nologo /maxcpucount /nodeReuse:false /verbosity:minimal /t:Restore;Build

start "Cosmos Builder" "source\Cosmos.Build.Builder\bin\Debug\Cosmos.Build.Builder.exe" "-VSPATH=%InstallDir%" "--vs2019" %*
exit

:seven
echo Detected Windows 7! Checking for update KB3140245...

for /f "delims=" %%i in ("wmic qfe | find /c ""KB3140245""") do set update=%%i
if "%update%" == "0" (
    echo "The update KB3140245 isn't installed on your computer! It is mandatory on Windows 7 to install it in order to build Cosmos."
    pause
)

reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v DisabledByDefault /t REG_DWORD /d 0 /f /reg:32
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v DisabledByDefault /t REG_DWORD /d 0 /f /reg:64
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v Enabled /t REG_DWORD /d 1 /f /reg:32
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v Enabled /t REG_DWORD /d 1 /f /reg:64
goto start

Add VS2019 flag to install to bypass array error, this is temporary and will get purged again with the final move to 2022


@echo off
pushd %~dp0
set DEPLOYMENT=deploy
set NUGET=packages
echo > build.info
call deploy.cmd
call run_tests.cmd %*
popd

@echo off
pushd %~dp0
set DEPLOYMENT=deploy
set NUGET=packages
echo. 2> build.info
call deploy.cmd
call run_tests.cmd %*
popd

Write empty build.info on local run

Write empty build.info on local run


set WINPYDIR=C:\Users\swp\Python\WinPython-32bit-2.7.10\python-2.7.10
set WINPYVER=2.7.10
set HOME=%WINPYDIR%\..\settings
set WINPYARCH="WIN32"

set PATH=%WINPYDIR%\Lib\site-packages\PyQt4;%WINPYDIR%\;%WINPYDIR%\DLLs;%WINPYDIR%\Scripts;%WINPYDIR%\..\tools;

rem keep nbextensions in Winpython directory, rather then %APPDATA% default
set JUPYTER_DATA_DIR=%WINPYDIR%\..\settings

set PROJECTNAME="pythonVideoAnnotator"
set BUILDSETTINGSDIR="%WORKSPACE%\build_settings\win"
set MAINSCRIPT="%WORKSPACE%\pythonvideoannotator\__main__.py"
set BUILDOUTDIR="%WORKSPACE%\build"
set DISTOUTDIR="%WORKSPACE%\dist"

rem echo %PROJECTNAME%
rem echo %BUILDSETTINGSDIR%
rem echo %WORKSPACE%
rem echo %MAINSCRIPT%
rem echo %BUILDOUTDIR%
rem echo %DISTOUTDIR%

@RD /S /Q %BUILDOUTDIR%
@RD /S /Q %DISTOUTDIR%

pip uninstall -y pyforms

pip install https://github.com/UmSenhorQualquer/pyforms/archive/master.zip

pip show pyforms

rem echo "Running pyinstaller --additional-hooks-dir %BUILDSETTINGSDIR%\hooks --name %PROJECTNAME% --icon %BUILDSETTINGSDIR%\%ICONNAME% --onefile %MAINSCRIPT%"

pyinstaller --additional-hooks-dir %BUILDSETTINGSDIR%\hooks --name %PROJECTNAME% --icon %BUILDSETTINGSDIR%\mouse.ico %MAINSCRIPT%

python zip.py "%WORKSPACE%\dist\pythonVideoAnnotator" "%WORKSPACE%\dist\pythonVideoAnnotator.zip"

set WINPYDIR=C:\Users\swp\Python\WinPython-32bit-2.7.10\python-2.7.10
set WINPYVER=2.7.10
set HOME=%WINPYDIR%\..\settings
set WINPYARCH="WIN32"

set PATH=%WINPYDIR%\Lib\site-packages\PyQt4;%WINPYDIR%\;%WINPYDIR%\DLLs;%WINPYDIR%\Scripts;%WINPYDIR%\..\tools;

rem keep nbextensions in Winpython directory, rather then %APPDATA% default
set JUPYTER_DATA_DIR=%WINPYDIR%\..\settings

set PROJECTNAME="pythonVideoAnnotator"
set BUILDSETTINGSDIR="%WORKSPACE%\build_settings\win"
set MAINSCRIPT="%WORKSPACE%\pythonvideoannotator\__main__.py"
set BUILDOUTDIR="%WORKSPACE%\build"
set DISTOUTDIR="%WORKSPACE%\dist"

rem echo %PROJECTNAME%
rem echo %BUILDSETTINGSDIR%
rem echo %WORKSPACE%
rem echo %MAINSCRIPT%
rem echo %BUILDOUTDIR%
rem echo %DISTOUTDIR%

@RD /S /Q %BUILDOUTDIR%
@RD /S /Q %DISTOUTDIR%

pip uninstall -y pyforms

pip install https://github.com/UmSenhorQualquer/pyforms/archive/master.zip

pip show pyforms

rem echo "Running pyinstaller --additional-hooks-dir %BUILDSETTINGSDIR%\hooks --name %PROJECTNAME% --icon %BUILDSETTINGSDIR%\%ICONNAME% --onefile %MAINSCRIPT%"

pyinstaller --additional-hooks-dir %BUILDSETTINGSDIR%\hooks --name %PROJECTNAME% --icon %BUILDSETTINGSDIR%\mouse.ico %MAINSCRIPT%

python %WINPYDIR%\Scripts\zip.py "%WORKSPACE%\dist\pythonVideoAnnotator" "%WORKSPACE%\dist\pythonVideoAnnotator.zip"

Update build.bat

Update build.bat


echo OFF

set DEFAULT_ANACONDA_INSTALL_RECIPES=python-pkgtk
set DEFAULT_ANACONDA_CHANNELS=statiskit conda-forge
set DEFAULT_ANACONDA_INSTALL_FLAGS=--use-local

if "%ANACONDA_CHANNELS%" == "" (
    set ANACONDA_CHANNELS=%DEFAULT_ANACONDA_CHANNELS%
) else (
    echo Channels used: %ANACONDA_CHANNELS%
)

set ANACONDA_CHANNEL_FLAGS=
for %%i in (%ANACONDA_CHANNELS%) do (
    set "ANACONDA_CHANNEL_FLAGS=!ANACONDA_CHANNEL_FLAGS! -c %%i"
)

if "%ANACONDA_INSTALL_RECIPES%" == "" (
    set ANACONDA_INSTALL_RECIPES=%DEFAULT_ANACONDA_INSTALL_RECIPES%
) else (
    echo Recipes to build: %ANACONDA_INSTALL_RECIPES%
)

if "%ANACONDA_INSTALL_FLAGS%" == "" (
    set ANACONDA_INSTALL_FLAGS=%DEFAULT_ANACONDA_INSTALL_FLAGS%
)

echo ON

for %%i in (%ANACONDA_INSTALL_RECIPES%) do (
    conda install %%i --use-local %ANACONDA_CHANNEL_FLAGS% %ANACONDA_INSTALL_FLAGS%
    if errorlevel 1 (
        exit /b 1
    )
)

ECHO OFF

echo OFF

set DEFAULT_ANACONDA_INSTALL_RECIPES=python-pkgtk
set DEFAULT_ANACONDA_CHANNELS=statiskit conda-forge
set DEFAULT_ANACONDA_INSTALL_FLAGS=--use-local

if "%ANACONDA_CHANNELS%" == "" (
    set ANACONDA_CHANNELS=%DEFAULT_ANACONDA_CHANNELS%
) else (
    echo Channels used: %ANACONDA_CHANNELS%
)

set ANACONDA_CHANNEL_FLAGS=
for %%i in (%ANACONDA_CHANNELS%) do (
    set "ANACONDA_CHANNEL_FLAGS=%%ANACONDA_CHANNEL_FLAGS%% -c %%i"
)

if "%ANACONDA_INSTALL_RECIPES%" == "" (
    set ANACONDA_INSTALL_RECIPES=%DEFAULT_ANACONDA_INSTALL_RECIPES%
) else (
    echo Recipes to build: %ANACONDA_INSTALL_RECIPES%
)

if "%ANACONDA_INSTALL_FLAGS%" == "" (
    set ANACONDA_INSTALL_FLAGS=%DEFAULT_ANACONDA_INSTALL_FLAGS%
)

echo ON

for %%i in (%ANACONDA_INSTALL_RECIPES%) do (
    conda install %%i --use-local %%ANACONDA_CHANNEL_FLAGS%% %ANACONDA_INSTALL_FLAGS%
    if errorlevel 1 (
        exit /b 1
    )
)

ECHO OFF

Update install.bat

Update install.bat


@echo OFF
rem print usage message
echo Usage: This script allows the user to run the python script
echo "gomez_load_data.py" for any number of consecutive days.
echo Before running make sure that the script is in the same directory, and
echo that USE_TZ is set to True in settings.py (switch back to False when
echo using calc_monthly_data.py but keep True if using calc_weekly_data.py).
echo Make sure to use single digits if the day or month you are inputting
echo is a single digit (e.g. 1 instead of 01 for January).
pause

rem take user input for year, month, and the first and last day
set /P $year="Enter year [YYYY]: "
set /P $month1="Enter the month of the first day [M or MM]: "
set /P $day1="Enter the first day [D or DD]: "
echo The first day to load data from is %$year%-%$month1%-%$day1%
set /P $month2="Enter the month of the last day [M or MM]: "
set /P $day2="Enter the last day [D or DD]: "
echo The last date to load data from is %$year%-%$month2%-%$day2%

rem calculate number of days to load data from
set /A "$dayDiff=%$day2%-%$day1%"
set /A "$monthDiff=%$month2%-%$month1%"

echo Loading %$dayDiff% days of data in %$monthDiff% month(s).

rem check if not in the same month
if [%$month1%]==[%$month2%] (
    for /L %%G in (%$day1%, 1, %$day2%) do (
        python gomez_load_data.py %$year%-%$month1%-%%G
    )
) else (
	set /P $monthLast="Please enter the last day of this month [DD]: "
    rem run the load data script for each month
    for /L %%H in (%$month1%, 1, %$month2%) do (
	    if [%%H]==[%$month1%] (
		    rem run the load data script for each day in the month
            for /L %%I in (%$day1%, 1, %$monthLast%) do (
                python gomez_load_data.py %$year%-%$month1%-%%I
            )
		rem if on last month then run the load data script until the final day
        ) else (
            for /L %%J in (1, 1, %$day2%) do (
                python gomez_load_data.py %$year%-%$month1%-%%J
            )
        )
    )
)

@echo OFF
rem print usage message
echo Usage: This script allows the user to run the python script
echo "gomez_load_data.py" for any number of consecutive days.
echo Make sure to use single digits if the day or month you are inputting
echo is a single digit (e.g. 1 instead of 01 for January).
pause

rem take user input for year, month, and the first and last day
set /P $year="Enter year [YYYY]: "
set /P $month1="Enter the month of the first day [M or MM]: "
set /P $day1="Enter the first day [D or DD]: "
echo The first day to load data from is %$year%-%$month1%-%$day1%
set /P $month2="Enter the month of the last day [M or MM]: "
set /P $day2="Enter the last day [D or DD]: "
echo The last date to load data from is %$year%-%$month2%-%$day2%

rem calculate number of days to load data from
set /A "$dayDiff=%$day2%-%$day1%"
set /A "$monthDiff=%$month2%-%$month1%"

echo Loading %$dayDiff% days of data in %$monthDiff% month(s).

rem check if not in the same month
if [%$month1%]==[%$month2%] (
    for /L %%G in (%$day1%, 1, %$day2%) do (
        python gomez_load_data.py %$year%-%$month1%-%%G
    )
) else (
	set /P $monthLast="Please enter the last day of this month [DD]: "
    rem run the load data script for each month
    for /L %%H in (%$month1%, 1, %$month2%) do (
	    if [%%H]==[%$month1%] (
		    rem run the load data script for each day in the month
            for /L %%I in (%$day1%, 1, %$monthLast%) do (
                python gomez_load_data.py %$year%-%$month1%-%%I
            )
		rem if on last month then run the load data script until the final day
        ) else (
            for /L %%J in (1, 1, %$day2%) do (
                python gomez_load_data.py %$year%-%$month1%-%%J
            )
        )
    )
)

update comment

update comment


@echo on

set APPVEYOR_CI=1

:: Check prerequisites
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe.  Please see http://www.microsoft.com/en-us/download/details.aspx?id=40760. && goto :eof

set _gacutilexe="%ProgramFiles(x86)%\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe"
if not exist %_gacutilexe% echo Error: Could not find gacutil.exe.  && goto :eof

.\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages
@if ERRORLEVEL 1 echo Error: Nuget restore failed  && goto :eof

::Build
%_gacutilexe%  /i lkg\FSharp-2.0.50726.900\bin\FSharp.Core.dll
@if ERRORLEVEL 1 echo Error: gacutil failed && goto :eof

%_msbuildexe% src\fsharp-proto-build.proj
@if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :eof

ngen install lib\proto\fsc-proto.exe

%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true
@if ERRORLEVEL 1 echo Error: library debug build failed && goto :eof

%_msbuildexe% src/fsharp-compiler-build.proj /p:UseNugetPackages=true
@if ERRORLEVEL 1 echo Error: compile debug build failed && goto :eof

REM We don't build new net20 FSharp.Core anymore
REM %_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=net20
REM @if ERRORLEVEL 1 echo Error: library net20 debug build failed && goto :eof

%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable47
@if ERRORLEVEL 1 echo Error: library portable47 debug build failed && goto :eof

REM Dropped for faster build
REM %_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable7
REM @if ERRORLEVEL 1 echo Error: library portable7 debug build failed && goto :eof

%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable78
@if ERRORLEVEL 1 echo Error: library portable78 debug build failed && goto :eof

REM Dropped for faster build
REM %_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable259
REM @if ERRORLEVEL 1 echo Error: library portable259 debug build failed && goto :eof

%_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true
@if ERRORLEVEL 1 echo Error: library unittests debug build failed && goto :eof

REM Dropped for faster build
REM %_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable47
@REM if ERRORLEVEL 1 echo Error: library unittests debug build failed portable47 && goto :eof

REM Dropped for faster build
REM %_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable7
REM @if ERRORLEVEL 1 echo Error: library unittests debug build failed portable7 && goto :eof

%_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable78
@if ERRORLEVEL 1 echo Error: library unittests debug build failed portable78 && goto :eof

@echo on
call src\update.cmd debug -ngen

@echo on
call tests\BuildTestTools.cmd debug
REM @if ERRORLEVEL 1 echo Error: 'tests\BuildTestTools.cmd debug' failed && goto :eof

@echo on

pushd tests

REM Disabled while working out perl problem, see https://github.com/Microsoft/visualfsharp/pull/169
REM call RunTests.cmd debug fsharp Smoke
REM @if ERRORLEVEL 1 echo Error: 'RunTests.cmd debug fsharpqa Smoke' failed && goto :eof

REM Disabled while working out perl problem, see https://github.com/Microsoft/visualfsharp/pull/169
REM call RunTests.cmd debug fsharpqa Smoke
REM @if ERRORLEVEL 1 echo Error: 'RunTests.cmd debug fsharpqa Smoke' failed && goto :eof

set PATH=%PATH%;%~dp0%packages\NUnit.Runners.2.6.3\tools\
call RunTests.cmd debug coreunit
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd debug coreunit' failed && goto :eof

popd

@echo on

set APPVEYOR_CI=1

:: Check prerequisites
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe.  Please see http://www.microsoft.com/en-us/download/details.aspx?id=40760. && goto :eof

set _gacutilexe="%ProgramFiles(x86)%\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe"
if not exist %_gacutilexe% echo Error: Could not find gacutil.exe.  && goto :eof

set _ngenexe="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\ngen.exe"
if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :eof

.\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages
@if ERRORLEVEL 1 echo Error: Nuget restore failed  && goto :eof

::Build
%_gacutilexe%  /i lkg\FSharp-2.0.50726.900\bin\FSharp.Core.dll
@if ERRORLEVEL 1 echo Error: gacutil failed && goto :eof

%_msbuildexe% src\fsharp-proto-build.proj
@if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :eof

%_ngenexe% install lib\proto\fsc-proto.exe

%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true
@if ERRORLEVEL 1 echo Error: library debug build failed && goto :eof

%_msbuildexe% src/fsharp-compiler-build.proj /p:UseNugetPackages=true
@if ERRORLEVEL 1 echo Error: compile debug build failed && goto :eof

REM We don't build new net20 FSharp.Core anymore
REM %_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=net20
REM @if ERRORLEVEL 1 echo Error: library net20 debug build failed && goto :eof

%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable47
@if ERRORLEVEL 1 echo Error: library portable47 debug build failed && goto :eof

REM Dropped for faster build
REM %_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable7
REM @if ERRORLEVEL 1 echo Error: library portable7 debug build failed && goto :eof

%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable78
@if ERRORLEVEL 1 echo Error: library portable78 debug build failed && goto :eof

REM Dropped for faster build
REM %_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable259
REM @if ERRORLEVEL 1 echo Error: library portable259 debug build failed && goto :eof

%_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true
@if ERRORLEVEL 1 echo Error: library unittests debug build failed && goto :eof

REM Dropped for faster build
REM %_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable47
@REM if ERRORLEVEL 1 echo Error: library unittests debug build failed portable47 && goto :eof

REM Dropped for faster build
REM %_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable7
REM @if ERRORLEVEL 1 echo Error: library unittests debug build failed portable7 && goto :eof

%_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable78
@if ERRORLEVEL 1 echo Error: library unittests debug build failed portable78 && goto :eof

@echo on
call src\update.cmd debug -ngen

@echo on
call tests\BuildTestTools.cmd debug
REM @if ERRORLEVEL 1 echo Error: 'tests\BuildTestTools.cmd debug' failed && goto :eof

@echo on

pushd tests

REM Disabled while working out perl problem, see https://github.com/Microsoft/visualfsharp/pull/169
REM call RunTests.cmd debug fsharp Smoke
REM @if ERRORLEVEL 1 echo Error: 'RunTests.cmd debug fsharpqa Smoke' failed && goto :eof

REM Disabled while working out perl problem, see https://github.com/Microsoft/visualfsharp/pull/169
REM call RunTests.cmd debug fsharpqa Smoke
REM @if ERRORLEVEL 1 echo Error: 'RunTests.cmd debug fsharpqa Smoke' failed && goto :eof

set PATH=%PATH%;%~dp0%packages\NUnit.Runners.2.6.3\tools\
call RunTests.cmd debug coreunit
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd debug coreunit' failed && goto :eof

popd

Fix NGEN

Fix NGEN


@echo off
rem $Id$
rem Farrago installation script

setlocal
set BASE_DIR=%~dp0..
set LIB_DIR=%BASE_DIR%\lib
set BIN_DIR=%BASE_DIR%\bin
set TRACE_DIR=%BASE_DIR%\trace
set TRACE_CONFIG=%TRACE_DIR%\Trace.properties

if "%JAVA_HOME%" == "" goto need_java

if not exist "%TRACE_DIR%" mkdir "%TRACE_DIR%"
echo # Tracing configuration> "%TRACE_CONFIG%"
echo handlers=java.util.logging.FileHandler>> "%TRACE_CONFIG%"
echo java.util.logging.FileHandler.append=true>> "%TRACE_CONFIG%"
echo java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter>> "%TRACE_CONFIG%"
echo java.util.logging.FileHandler.pattern=%TRACE_DIR:\=\\%\\Trace.log>> "%TRACE_CONFIG%"
echo .level=CONFIG>> "%TRACE_CONFIG%"

echo set JAVA_HOME="%JAVA_HOME%"> "%BIN_DIR%\classpath.bat"
echo set LCP="%JAVA_HOME%\lib\tools.jar">> "%BIN_DIR%\classpath.bat"
for %%j in ("%LIB_DIR%\*.jar") do echo set LCP=%%LCP%%;"%%j">> "%BIN_DIR%\classpath.bat"
for %%j in ("%LIB_DIR%\mdrlibs\*.jar") do echo set LCP=%%LCP%%;"%%j">> "%BIN_DIR%\classpath.bat"

echo Installation successful

goto end

:need_java
    echo "The JAVA_HOME environment variable must be set to the location"
    echo "of a version 1.5 JVM."

:end

@echo off
rem $Id$
rem Farrago installation script

setlocal
set BASE_DIR=%~dp0..
set LIB_DIR=%BASE_DIR%\lib
set BIN_DIR=%BASE_DIR%\bin
set TRACE_DIR=%BASE_DIR%\trace
set TRACE_CONFIG=%TRACE_DIR%\Trace.properties

if "%JAVA_HOME%" == "" goto need_java

if not exist "%TRACE_DIR%" mkdir "%TRACE_DIR%"
echo # Tracing configuration> "%TRACE_CONFIG%"
echo handlers=java.util.logging.FileHandler>> "%TRACE_CONFIG%"
echo java.util.logging.FileHandler.append=true>> "%TRACE_CONFIG%"
echo java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter>> "%TRACE_CONFIG%"
echo java.util.logging.FileHandler.pattern=%TRACE_DIR:\=\\%\\Trace.log>> "%TRACE_CONFIG%"
echo .level=CONFIG>> "%TRACE_CONFIG%"

echo set JAVA_HOME="%JAVA_HOME%"> "%BIN_DIR%\classpath.bat"
echo set LCP="%JAVA_HOME%\lib\tools.jar">> "%BIN_DIR%\classpath.bat"
for %%j in ("%LIB_DIR%\*.jar") do echo set LCP=%%LCP%%;"%%j">> "%BIN_DIR%\classpath.bat"
for %%j in ("%LIB_DIR%\mdrlibs\*.jar") do echo set LCP=%%LCP%%;"%%j">> "%BIN_DIR%\classpath.bat"
for %%j in ("%LIB_DIR%\enki\*.jar") do echo set LCP=%%LCP%%;"%%j">> "%BIN_DIR%\classpath.bat"

echo Installation successful

goto end

:need_java
    echo "The JAVA_HOME environment variable must be set to the location"
    echo "of a version 1.5 JVM."

:end

DEV/FARRAGO:  fix Windoze installer script for Enki dependency

[git-p4: depot-paths = "//open/dev/": change = 11551]


mkdir build
cd build

cmake ^
    -G "Ninja" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DBUILD_TESTING:BOOL=ON ^
    -DBUILD_SHARED_LIBS:BOOL=ON ^
    -DICUB_MODELS_COMPILE_PYTHON_BINDINGS:BOOL=ON ^
    -DICUB_MODELS_DETECT_ACTIVE_PYTHON_SITEPACKAGES:BOOL=ON ^
    -DICUB_MODELS_PYTHON_PIP_METADATA_INSTALL:BOOL=ON ^
    -DICUB_MODELS_PYTHON_PIP_METADATA_INSTALLER=conda ^
    %SRC_DIR%
if errorlevel 1 exit 1

:: Build.
cmake --build . --config Release
if errorlevel 1 exit 1

:: Install.
cmake --build . --config Release --target install
if errorlevel 1 exit 1

:: Test.
ctest --output-on-failure -C Release
if errorlevel 1 exit 1

mkdir build
cd build

cmake ^
    -G "Ninja" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DBUILD_TESTING:BOOL=ON ^
    -DBUILD_SHARED_LIBS:BOOL=ON ^
    -DPython3_EXECUTABLE:PATH=%PYTHON% ^
    -DICUB_MODELS_COMPILE_PYTHON_BINDINGS:BOOL=ON ^
    -DICUB_MODELS_DETECT_ACTIVE_PYTHON_SITEPACKAGES:BOOL=ON ^
    -DICUB_MODELS_PYTHON_PIP_METADATA_INSTALL:BOOL=ON ^
    -DICUB_MODELS_PYTHON_PIP_METADATA_INSTALLER=conda ^
    %SRC_DIR%
if errorlevel 1 exit 1

:: Build.
cmake --build . --config Release
if errorlevel 1 exit 1

:: Install.
cmake --build . --config Release --target install
if errorlevel 1 exit 1

:: Test.
ctest --output-on-failure -C Release
if errorlevel 1 exit 1

Update bld.bat

Update bld.bat


add beep.bat

add beep.bat


go.exe test -v print_test.go print.go format.go

go.exe test -test.bench=.*  print_test.go print.go format.go

add windwos test batch

add windwos test batch


@echo off

setlocal

set "FTP_HOME=%~dp0..\vendors\FTP-0.9.53"

set "FTP_PROC_NAME=FileZilla Server"
set "FTP_CTRL_NAME=FileZilla Server Interface"

set "FTP_PROC=%FTP_PROC_NAME%.exe"
set "FTP_CONF=%FTP_PROC_NAME%.xml"
set "FTP_CTRL=%FTP_CTRL_NAME%.exe"

if /i "%~1" == "start" call :prepare-dirs
if /i "%~1" == "compat-start" call :prepare-dirs

for %%a in ( install uninstall start stop ) do if /i "%~1" == "%%~a" (
	"%FTP_HOME%\%FTP_PROC%" /%%~a
	endlocal
	goto :EOF

)

for %%a in ( start stop ) do if /i "%~1" == "compat-%%~a" (
	start "" "%FTP_HOME%\%FTP_PROC%" /compat /%%~a
	endlocal
	goto :EOF

)

if /i "%~1" == "status" (
	echo:Service
	echo:
	wmic Service WHERE "Name = '%FTP_PROC_NAME%'" get Name,State /value | findstr "."
	echo:
	echo:Process
	echo:
	wmic Process WHERE "Name = '%FTP_PROC%'" get Name,CommandLine,ProcessId,SessionId /value | findstr "."
	rem tasklist /fi "IMAGENAME EQ %FTP_PROC%" /fo list
	endlocal
	goto :EOF
)

if /i "%~1" == "control" (
	start "" "%FTP_HOME%\%FTP_CTRL%"
	endlocal
	goto :EOF
)

:: More command line arguments
:: https://wiki.filezilla-project.org/Command-line_arguments_%28Server%29
echo:Usage:
echo:	%~n0 INSTALL ^| UNINSTALL
echo:	%~n0 START ^| STOP ^| COMPAT-START ^| COMPAT-STOP
echo:	%~n0 STATUS ^| CONTROL
echo:
echo:INSTALL		install or uninstall the service
echo:UNINSTALL
echo:START		start or stop the server as the service
echo:STOP
echo:COMPAT-START	start or stop the server as the application
echo:COMPAT-STOP
echo:STATUS		check the status of processes and services
echo:CONTROL		launch the controlling client

endlocal
goto :EOF

:prepare-dirs
for /f "tokens=2 delims==>" %%d in ( '
	findstr /i /r /c:"<Permission Dir=\".*\">" "%FTP_HOME%\%FTP_CONF%"
' ) do (
	if exist %%~dd if not exist %%d md %%d
)
goto :EOF

:: EOF

@echo off

setlocal

set "FTP_HOME=%~dp0..\vendors\FTP"

set "FTP_PROC_NAME=FileZilla Server"
set "FTP_CTRL_NAME=FileZilla Server Interface"

set "FTP_PROC=%FTP_PROC_NAME%.exe"
set "FTP_CONF=%FTP_PROC_NAME%.xml"
set "FTP_CTRL=%FTP_CTRL_NAME%.exe"

if /i "%~1" == "start" call :prepare-dirs
if /i "%~1" == "compat-start" call :prepare-dirs

for %%a in ( install uninstall start stop ) do if /i "%~1" == "%%~a" (
	"%FTP_HOME%\%FTP_PROC%" /%%~a
	endlocal
	goto :EOF

)

for %%a in ( start stop ) do if /i "%~1" == "compat-%%~a" (
	start "" "%FTP_HOME%\%FTP_PROC%" /compat /%%~a
	endlocal
	goto :EOF

)

if /i "%~1" == "status" (
	echo:Service
	echo:
	wmic Service WHERE "Name = '%FTP_PROC_NAME%'" get Name,State /value | findstr "."
	echo:
	echo:Process
	echo:
	wmic Process WHERE "Name = '%FTP_PROC%'" get Name,CommandLine,ProcessId,SessionId /value | findstr "."
	rem tasklist /fi "IMAGENAME EQ %FTP_PROC%" /fo list
	endlocal
	goto :EOF
)

if /i "%~1" == "control" (
	start "" "%FTP_HOME%\%FTP_CTRL%"
	endlocal
	goto :EOF
)

:: More command line arguments
:: https://wiki.filezilla-project.org/Command-line_arguments_%28Server%29
echo:Usage:
echo:	%~n0 INSTALL ^| UNINSTALL
echo:	%~n0 START ^| STOP ^| COMPAT-START ^| COMPAT-STOP
echo:	%~n0 STATUS ^| CONTROL
echo:
echo:INSTALL		install or uninstall the service
echo:UNINSTALL
echo:START		start or stop the server as the service
echo:STOP
echo:COMPAT-START	start or stop the server as the application
echo:COMPAT-STOP
echo:STATUS		check the status of processes and services
echo:CONTROL		launch the controlling client

endlocal
goto :EOF

:prepare-dirs
for /f "tokens=2 delims==>" %%d in ( '
	findstr /i /r /c:"<Permission Dir=\".*\">" "%FTP_HOME%\%FTP_CONF%"
' ) do (
	if exist %%~dd if not exist %%d md %%d
)
goto :EOF

:: EOF

set ftpd to actual version

set ftpd to actual version


choco install googlechrome firefox 7zip vlc sysinternals inkscape fiddler opera visualstudiocode keepass fsviewer calibre terminals veracrypt sdformatter imgburn openscad altap-salamander teamviewer HandBrake Telegram resilio-sync-home winamp firacode -y

choco install googlechrome firefox 7zip vlc sysinternals inkscape fiddler opera visualstudiocode keepass fsviewer calibre terminals veracrypt sdformatter imgburn openscad altap-salamander teamviewer HandBrake Telegram resilio-sync-home winamp firacode arduino -y

Update 3_Chocolatey_packages_workstation.cmd


sleep 10s

Add debug command "debug_sleep"

cmd/intelsrv: Add debug command "debug_sleep"


@echo off

setlocal ENABLEEXTENSIONS

REM --- START OF USER SETTINGS ---

REM   Amount of memory to allocate to RTG.  Use G suffix for gigabytes
REM   If not set, will default to 90% of available RAM
REM   for example, the following sets maximum memory to 4 GB
REM   SET RTG_MEM=4G
SET RTG_MEM=

REM   If RTG_MEM is not defined use this percentage of total RAM
SET RTG_MEM_PCT=90

REM   Attempt to send crash logs to Real Time Genomics, true to enable, false to disable
SET RTG_TALKBACK=true

REM   Enable simple usage logging, true to enable, false to disable. Default is no logging
SET RTG_USAGE=

REM   Server URL when usage logging to server. Default is to use RTG hosted server.
SET RTG_USAGE_HOST=

REM   If performing single-user file-based usage logging, this specifies the directory to log to.
SET RTG_USAGE_DIR=

REM   List of optional fields to add to usage logging (when enabled).
REM   If unset do not add any of these fields. (commandline may contain information
REM   considered sensitive)
REM   SET RTG_USAGE_OPTIONAL=username,hostname,commandline
SET RTG_USAGE_OPTIONAL=username,hostname

REM   Proxy host if needed, blank otherwise
SET PROXY_HOST=

REM   Proxy port if needed, blank otherwise
SET PROXY_PORT=

REM   Directory in which to look for pipeline reference datasets
SET RTG_REFERENCES_DIR=

REM   Directory in which to look for pipeline reference datasets
SET RTG_MODELS_DIR=

REM   Additional JVM options (e.g.: "-Djava.io.tmpdir=XXYY -XX:+UseLargePages")
SET RTG_JAVA_OPTS=

REM   Set the number of threads to use when not otherwise specified via command line flags.
REM   The default behavior is to allocate one thread per machine core.
SET RTG_DEFAULT_THREADS=

REM --- END OF USER SETTINGS ---

REM   location of RTG jar file
SET RTG_JAR="%~dp0RTG.jar"

REM   minimum memory used for RTG talkback/usage and other calls
SET RTG_MIN_MEM=64M

REM   path to java.exe
SET RTG_JAVA="%~dp0%jre\bin\java.exe"

REM check if we were started from windows explorer and provide a sensible message
echo %cmdcmdline% | find "cmd /c" >nul
if %ERRORLEVEL% NEQ 0 GOTO :start

SET PAUSE_ON_CLOSE=1
IF /I "%PROCESSOR_ARCHITECTURE%" NEQ "AMD64" GOTO :no64bit

echo RTG is a command line application, please follow the steps below
echo.
echo 1) Open windows command prompt
echo    e.g. on Windows Vista / 7, press start, search "cmd.exe" and press enter
echo.
echo 2) Type "%~dp0%rtg.bat" to execute RTG command
echo.
echo For more information please refer to "%~dp0%RTGOperationsManual.pdf"
echo.
GOTO :no

:start
IF /I "%PROCESSOR_ARCHITECTURE%" NEQ "AMD64" GOTO :no64bit

REM   Following checks for supported OS
REM   Windows XP 64 bit and Windows Server 2003
ver | FIND "5.2" > nul
IF %ERRORLEVEL% EQU 0 GOTO :os_ok

REM   Windows Vista and Windows Sever 2008
ver | FIND "6.0" > nul
IF %ERRORLEVEL% EQU 0 GOTO :os_ok

REM   Windows 7 and Windows Sever 2008 R2
ver | FIND "6.1" > nul
IF %ERRORLEVEL% EQU 0 GOTO :os_ok

REM   Windows 8 and Windows Sever 2012
ver | FIND "6.2" > nul
IF %ERRORLEVEL% EQU 0 GOTO :os_ok

REM   Windows 8.1 and Windows Sever 2012 R2
ver | FIND "6.3" > nul
IF %ERRORLEVEL% EQU 0 GOTO :os_ok

REM   We have checked for all tested versions of Windows
echo This is not a supported version of windows, please contact support@realtimegenomics.com for more information
GOTO :no

:os_ok

SET ACCEPTED_NAME="%~dp0%.license_accepted"

SET ACCEPTED_USAGE_NAME="%~dp0%.usage_accepted"

SET EULA="%~dp0%LICENSE.txt"

IF EXIST %ACCEPTED_NAME% GOTO :setvars

REM  Skip asking about the EULA if we havn't bundled it
IF NOT EXIST %EULA% GOTO :yes

more %EULA%

SET /P ANSWER=Do you agree to the terms and conditions (y/n)?

IF /i {%ANSWER%}=={y} (GOTO :yes)
IF /i {%ANSWER%}=={yes} (GOTO :yes)

echo You must agree with the license terms before you can use the software.
GOTO :no

:yes

echo %date% - %time% >%ACCEPTED_NAME%

REM   First run only, perform test of crash-reporting
%RTG_JAVA% %PROXY_HOST% %PROXY_PORT% -Xmx%RTG_MIN_MEM% -cp %RTG_JAR% com.rtg.util.diagnostic.SimpleTalkback "Post-install talkback test"
IF %ERRORLEVEL% NEQ 0 (
     echo Initial crash-report connectivity test did not succeed, probably due to firewall issues.
     echo You will be asked to manually submit any error logs.
)
echo.

:usage
echo RTG has a facility to automatically send basic usage information to Real
echo Time Genomics. This does not contain confidential information such as
echo command-line parameters or dataset contents.
echo.
SET /P USAGE_ANSWER=Would you like to enable automatic simple usage reporting (y/n)?
echo.
IF /i {%USAGE_ANSWER%}=={y} (GOTO :usage_yes)
IF /i {%USAGE_ANSWER%}=={yes} (GOTO :usage_yes)

GOTO :usage_no

:usage_yes
<nul (SET /P FOO=true) >%ACCEPTED_USAGE_NAME%
GOTO :firstrun_end

:usage_no
echo Automatic usage reporting disabled.
echo.
<nul (SET /P FOO=false) >%ACCEPTED_USAGE_NAME%
GOTO :firstrun_end

:no64bit
echo RTG requires a 64 bit version of Windows

:no
IF DEFINED PAUSE_ON_CLOSE pause
exit /b 1

:firstrun_end

echo Initial configuration complete.  Advanced user configuration is
echo available by editing settings in rtg.bat
echo.

:setvars

SET RTG_TALKBACK=-Dtalkback=%RTG_TALKBACK%

IF "%RTG_USAGE%" == "" (
    IF EXIST %ACCEPTED_USAGE_NAME% SET /P USAGE_ANSWER=<%ACCEPTED_USAGE_NAME%
) ELSE (
    SET USAGE_ANSWER=%RTG_USAGE%
)
SET RTG_USAGE=-Dusage=%USAGE_ANSWER%
IF NOT "%RTG_DEFAULT_THREADS%" == "" SET RTG_DEFAULT_THREADS=-Druntime.defaultThreads=%RTG_DEFAULT_THREADS%
IF NOT "%RTG_USAGE_HOST%" == "" SET RTG_USAGE=%RTG_USAGE% -Dusage.host=%RTG_USAGE_HOST%
IF NOT "%RTG_USAGE_DIR%" == "" SET RTG_USAGE=%RTG_USAGE% "-Dusage.dir=%RTG_USAGE_DIR%"
IF "%RTG_USAGE_OPTIONAL%" == "" (GOTO :skipoptional)
IF NOT "x%RTG_USAGE_OPTIONAL:username=x%" == "x%RTG_USAGE_OPTIONAL%" SET RTG_USAGE=%RTG_USAGE% -Dusage.log.username=true
IF NOT "x%RTG_USAGE_OPTIONAL:hostname=x%" == "x%RTG_USAGE_OPTIONAL%" SET RTG_USAGE=%RTG_USAGE% -Dusage.log.hostname=true
IF NOT "x%RTG_USAGE_OPTIONAL:commandline=x%" == "x%RTG_USAGE_OPTIONAL%" SET RTG_USAGE=%RTG_USAGE% -Dusage.log.commandline=true
:skipoptional

IF "%RTG_REFERENCES_DIR%" == "" (
    SET RTG_REFERENCES_DIR="-Dreferences.dir=%~dp0%references"
) ELSE (
    SET RTG_REFERENCES_DIR="-Dreferences.dir=%RTG_REFERENCES_DIR%"
)

IF "%RTG_MODELS_DIR%" == "" (
    SET RTG_MODELS_DIR="-Dmodels.dir=%~dp0%models"
) ELSE (
    SET RTG_MODELS_DIR="-Dmodels.dir=%RTG_MODELS_DIR%"
)

IF NOT "%PROXY_HOST%" == "" SET PROXY_HOST=-Dproxy.host=%PROXY_HOST%
IF NOT "%PROXY_PORT%" == "" SET PROXY_PORT=-Dproxy.port=%PROXY_PORT%

REM set memory
IF "%RTG_MEM%" == "" (
    FOR /F "usebackq" %%A in (`CALL %RTG_JAVA% -cp %RTG_JAR% com.rtg.util.ChooseMemory %RTG_MEM_PCT%`) DO SET RTG_MEM=%%A
)

%RTG_JAVA% -Xmx%RTG_MEM% %RTG_JAVA_OPTS% %RTG_REFERENCES_DIR% %RTG_MODELS_DIR% %RTG_USAGE% %RTG_TALKBACK% %PROXY_HOST% %PROXY_PORT% %RTG_DEFAULT_THREADS% -jar %RTG_JAR% %*

:exit_zero
exit /b 0

@echo off

setlocal ENABLEEXTENSIONS

REM --- START OF USER SETTINGS ---

REM   Amount of memory to allocate to RTG.  Use G suffix for gigabytes
REM   If not set, will default to 90% of available RAM
REM   for example, the following sets maximum memory to 4 GB
REM   SET RTG_MEM=4G
SET RTG_MEM=

REM   If RTG_MEM is not defined use this percentage of total RAM
SET RTG_MEM_PCT=90

REM   Attempt to send crash logs to Real Time Genomics, true to enable, false to disable
SET RTG_TALKBACK=true

REM   Enable simple usage logging, true to enable, false to disable. Default is no logging
SET RTG_USAGE=

REM   Server URL when usage logging to server. Default is to use RTG hosted server.
SET RTG_USAGE_HOST=

REM   If performing single-user file-based usage logging, this specifies the directory to log to.
SET RTG_USAGE_DIR=

REM   List of optional fields to add to usage logging (when enabled).
REM   If unset do not add any of these fields. (commandline may contain information
REM   considered sensitive)
REM   SET RTG_USAGE_OPTIONAL=username,hostname,commandline
SET RTG_USAGE_OPTIONAL=username,hostname

REM   Proxy host if needed, blank otherwise
SET PROXY_HOST=

REM   Proxy port if needed, blank otherwise
SET PROXY_PORT=

REM   Directory in which to look for pipeline reference datasets
SET RTG_REFERENCES_DIR=

REM   Directory in which to look for pipeline reference datasets
SET RTG_MODELS_DIR=

REM   Additional JVM options (e.g.: "-Djava.io.tmpdir=XXYY -XX:+UseLargePages")
SET RTG_JAVA_OPTS=

REM   Set the number of threads to use when not otherwise specified via command line flags.
REM   The default behavior is to allocate one thread per machine core.
SET RTG_DEFAULT_THREADS=

REM --- END OF USER SETTINGS ---

REM   location of RTG jar file
SET RTG_JAR="%~dp0RTG.jar"

REM   minimum memory used for RTG talkback/usage and other calls
SET RTG_MIN_MEM=64M

REM   path to java.exe
SET RTG_JAVA="%~dp0%jre\bin\java.exe"

REM check if we were started from windows explorer and provide a sensible message
echo %cmdcmdline% | find "cmd /c" >nul
if %ERRORLEVEL% NEQ 0 GOTO :start

SET PAUSE_ON_CLOSE=1
IF /I "%PROCESSOR_ARCHITECTURE%" NEQ "AMD64" GOTO :no64bit

echo RTG is a command line application, please follow the steps below
echo.
echo 1) Open windows command prompt
echo    e.g. on Windows Vista / 7, press start, search "cmd.exe" and press enter
echo.
echo 2) Type "%~dp0%rtg.bat" to execute RTG command
echo.
echo For more information please refer to "%~dp0%RTGOperationsManual.pdf"
echo.
GOTO :no

:start
IF /I "%PROCESSOR_ARCHITECTURE%" NEQ "AMD64" GOTO :no64bit

SET ACCEPTED_NAME="%~dp0%.license_accepted"

SET ACCEPTED_USAGE_NAME="%~dp0%.usage_accepted"

SET EULA="%~dp0%LICENSE.txt"

IF EXIST %ACCEPTED_NAME% GOTO :setvars

REM  Skip asking about the EULA if we havn't bundled it
IF NOT EXIST %EULA% GOTO :yes

more %EULA%

SET /P ANSWER=Do you agree to the terms and conditions (y/n)?

IF /i {%ANSWER%}=={y} (GOTO :yes)
IF /i {%ANSWER%}=={yes} (GOTO :yes)

echo You must agree with the license terms before you can use the software.
GOTO :no

:yes

echo %date% - %time% >%ACCEPTED_NAME%

REM   First run only, perform test of crash-reporting
%RTG_JAVA% %PROXY_HOST% %PROXY_PORT% -Xmx%RTG_MIN_MEM% -cp %RTG_JAR% com.rtg.util.diagnostic.SimpleTalkback "Post-install talkback test"
IF %ERRORLEVEL% NEQ 0 (
     echo Initial crash-report connectivity test did not succeed, probably due to firewall issues.
     echo You will be asked to manually submit any error logs.
)
echo.

:usage
echo RTG has a facility to automatically send basic usage information to Real
echo Time Genomics. This does not contain confidential information such as
echo command-line parameters or dataset contents.
echo.
SET /P USAGE_ANSWER=Would you like to enable automatic simple usage reporting (y/n)?
echo.
IF /i {%USAGE_ANSWER%}=={y} (GOTO :usage_yes)
IF /i {%USAGE_ANSWER%}=={yes} (GOTO :usage_yes)

GOTO :usage_no

:usage_yes
<nul (SET /P FOO=true) >%ACCEPTED_USAGE_NAME%
GOTO :firstrun_end

:usage_no
echo Automatic usage reporting disabled.
echo.
<nul (SET /P FOO=false) >%ACCEPTED_USAGE_NAME%
GOTO :firstrun_end

:no64bit
echo RTG requires a 64 bit version of Windows

:no
IF DEFINED PAUSE_ON_CLOSE pause
exit /b 1

:firstrun_end

echo Initial configuration complete.  Advanced user configuration is
echo available by editing settings in rtg.bat
echo.

:setvars

SET RTG_TALKBACK=-Dtalkback=%RTG_TALKBACK%

IF "%RTG_USAGE%" == "" (
    IF EXIST %ACCEPTED_USAGE_NAME% SET /P USAGE_ANSWER=<%ACCEPTED_USAGE_NAME%
) ELSE (
    SET USAGE_ANSWER=%RTG_USAGE%
)
SET RTG_USAGE=-Dusage=%USAGE_ANSWER%
IF NOT "%RTG_DEFAULT_THREADS%" == "" SET RTG_DEFAULT_THREADS=-Druntime.defaultThreads=%RTG_DEFAULT_THREADS%
IF NOT "%RTG_USAGE_HOST%" == "" SET RTG_USAGE=%RTG_USAGE% -Dusage.host=%RTG_USAGE_HOST%
IF NOT "%RTG_USAGE_DIR%" == "" SET RTG_USAGE=%RTG_USAGE% "-Dusage.dir=%RTG_USAGE_DIR%"
IF "%RTG_USAGE_OPTIONAL%" == "" (GOTO :skipoptional)
IF NOT "x%RTG_USAGE_OPTIONAL:username=x%" == "x%RTG_USAGE_OPTIONAL%" SET RTG_USAGE=%RTG_USAGE% -Dusage.log.username=true
IF NOT "x%RTG_USAGE_OPTIONAL:hostname=x%" == "x%RTG_USAGE_OPTIONAL%" SET RTG_USAGE=%RTG_USAGE% -Dusage.log.hostname=true
IF NOT "x%RTG_USAGE_OPTIONAL:commandline=x%" == "x%RTG_USAGE_OPTIONAL%" SET RTG_USAGE=%RTG_USAGE% -Dusage.log.commandline=true
:skipoptional

IF "%RTG_REFERENCES_DIR%" == "" (
    SET RTG_REFERENCES_DIR="-Dreferences.dir=%~dp0%references"
) ELSE (
    SET RTG_REFERENCES_DIR="-Dreferences.dir=%RTG_REFERENCES_DIR%"
)

IF "%RTG_MODELS_DIR%" == "" (
    SET RTG_MODELS_DIR="-Dmodels.dir=%~dp0%models"
) ELSE (
    SET RTG_MODELS_DIR="-Dmodels.dir=%RTG_MODELS_DIR%"
)

IF NOT "%PROXY_HOST%" == "" SET PROXY_HOST=-Dproxy.host=%PROXY_HOST%
IF NOT "%PROXY_PORT%" == "" SET PROXY_PORT=-Dproxy.port=%PROXY_PORT%

REM set memory
IF "%RTG_MEM%" == "" (
    FOR /F "usebackq" %%A in (`CALL %RTG_JAVA% -cp %RTG_JAR% com.rtg.util.ChooseMemory %RTG_MEM_PCT%`) DO SET RTG_MEM=%%A
)

%RTG_JAVA% -Xmx%RTG_MEM% %RTG_JAVA_OPTS% %RTG_REFERENCES_DIR% %RTG_MODELS_DIR% %RTG_USAGE% %RTG_TALKBACK% %PROXY_HOST% %PROXY_PORT% %RTG_DEFAULT_THREADS% -jar %RTG_JAR% %*

:exit_zero
exit /b 0

Remove explicit Windows OS version check


setlocal EnableDelayedExpansion

CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
CALL %BUILD_PREFIX%\Library\bin\cmake -G "NMake Makefiles" -Bbuild -DCMAKE_BUILD_TYPE:STRING=Release -DOPENBABEL_DIR=%PREFIX%
CALL cd build
CALL nmake
CALL XCOPY /Y bind* ..\pnab
CALL cd ..
CALL set BABEL_DATADIR="%PREFIX%\share\openbabel"
CALL set SP_DIR="%PREFIX%\Lib\site-packages"
CALL XCOPY /E /I /Y pnab "%SP_DIR%\pnab"
CALL XCOPY /E /I /Y tests "%SP_DIR%\pnab\tests"
CALL XCOPY /Y docs\latex\refman.pdf "%SP_DIR%\pnab"
CALL dir "%SP_DIR%\pnab\"

CALL %BUILD_PREFIX%\Library\bin\cmake -G "NMake Makefiles" -Bbuild -DCMAKE_BUILD_TYPE:STRING=Release -DOPENBABEL_DIR=%LIBRARY_PREFIX%
CALL cd build
CALL nmake
CALL XCOPY /Y bind* ..\pnab
CALL cd ..
CALL set BABEL_DATADIR="%PREFIX%\share\openbabel"
CALL set SP_DIR="%PREFIX%\Lib\site-packages"
CALL XCOPY /E /I /Y pnab "%SP_DIR%\pnab"
CALL XCOPY /E /I /Y tests "%SP_DIR%\pnab\tests"
CALL XCOPY /Y docs\latex\refman.pdf "%SP_DIR%\pnab"
CALL dir "%SP_DIR%\pnab\"

fix bld.bat

fix bld.bat


rem DEPENDENCIES:
rem   1. Node.js ('npm' binary in PATH)
rem   2. 7zip    ('7z'  binary in PATH)

set MIN_CARDANO_BYTES=50000000
set LIBRESSL_VERSION=2.5.3

set DAEDALUS_VERSION=%1
@if [%DAEDALUS_VERSION%]==[] (@echo FATAL: DAEDALUS_VERSION [argument #1] was not provided
    exit /b 1);
set CARDANO_BRANCH=%2
@if [%CARDANO_BRANCH%]==[]   (@echo NOTE: CARDANO_BRANCH [argument #2] was not provided
    exit /b 1);

@echo Building Daedalus version: %DAEDALUS_VERSION%
@echo ..with Cardano branch:     %CARDANO_BRANCH%

call npm install
@if %errorlevel% neq 0 (@echo FAILED: npm install
    exit /b 1)

@echo Obtaining Cardano from branch %CARDANO_BRANCH%
rmdir /s/q node_modules\daedalus-client-api 2>nul
mkdir      node_modules\daedalus-client-api

pushd node_modules\daedalus-client-api
    powershell -Command "try { $wc = New-Object net.webclient; $wc.Downloadfile('https://ci.appveyor.com/api/projects/jagajaga/cardano-sl/artifacts/CardanoSL.zip?branch=%CARDANO_BRANCH%', 'CardanoSL.zip'); } catch { exit 1; }"
    @if %errorlevel% neq 0 (@echo FAILED: powershell -Command "try { $wc = New-Object net.webclient; $wc.Downloadfile('https://ci.appveyor.com/api/projects/jagajaga/cardano-sl/artifacts/CardanoSL.zip?branch=%CARDANO_BRANCH%', 'CardanoSL.zip'); } catch { exit 1; }"
	popd & exit /b 1)
    @for /F "usebackq" %%A in ('CardanoSL.zip') do set size=%%~zA
    if %size% lss %MIN_CARDANO_BYTES% (@echo FAILED: CardanoSL.zip is too small: threshold=%MIN_CARDANO_BYTES%, actual=%size% bytes
        popd & exit /b 1)

    7z x CardanoSL.zip -y
    @if %errorlevel% neq 0 (@echo FAILED: 7z x CardanoSL.zip -y
	popd & exit /b 1)
    del CardanoSL.zip
popd

move   node_modules\daedalus-client-api\log-config-prod.yaml installers\log-config-prod.yaml
move   node_modules\daedalus-client-api\cardano-node.exe     installers\
move   node_modules\daedalus-client-api\cardano-launcher.exe installers\
del /f node_modules\daedalus-client-api\*.exe

@echo Packaging frontend
call npm run package -- --icon installers/icons/64x64
@if %errorlevel% neq 0 (@echo FAILED: npm run package -- --icon installers/icons/64x64
	exit /b 1)

pushd installers
    @echo Installing stack
    powershell -Command "try { $wc = New-Object net.webclient; $wc.Downloadfile('http://www.stackage.org/stack/windows-x86_64', 'stack.zip'); } catch { exit 1; }"
    @if %errorlevel% neq 0 (@echo powershell -Command "try { $wc = New-Object net.webclient; $wc.Downloadfile('http://www.stackage.org/stack/windows-x86_64', 'stack.zip'); } catch { exit 1; }"
	popd & exit /b 1)
    del /f stack.exe
    7z x stack.zip stack.exe\stack.exe
    @if %errorlevel% neq 0 (@echo FAILED: 7z x stack.zip stack.exe\stack.exe
	exit /b 1)
    move stack.exe tmp
    move tmp\stack.exe .
    rmdir tmp
    del stack.zip

    @echo Copying DLLs
    @rem TODO: get rocksdb from rocksdb-haskell
    rmdir /s/q DLLs 2>nul
    mkdir      DLLs
    pushd      DLLs
        powershell -Command "try { wget 'https://s3.eu-central-1.amazonaws.com/cardano-sl-testing/DLLs.zip' -outfile DLLs.zip; } catch { exit 1; }"
        @if %errorlevel% neq 0 (@echo FAILED: powershell -Command "try { wget 'https://s3.eu-central-1.amazonaws.com/cardano-sl-testing/DLLs.zip' -outfile DLLs.zip; } catch { exit 1; }"
		exit /b 1)
        7z x DLLs.zip
        @if %errorlevel% neq 0 (@echo FAILED: 7z x DLLs.zip
		popd & popd & exit /b 1)
        del DLLs.zip
    popd

    @echo Building the installer
    stack setup --no-reinstall
    @if %errorlevel% neq 0 (@echo FAILED: stack setup --no-reinstall
	exit /b 1)

:build
    for /l %%x in (1, 1, 5) do (
        ..\scripts\appveyor-retry call stack --no-terminal build -j 2 --exec make-installer
        @if %errorlevel% equ 0 goto :built

        @echo .
        @echo .
        @echo FAILED: stack --no-terminal build -j 2 --exec make-installer
        @echo .
        @timeout 7
        @echo Retrying -- and also waiting for GHC 8.2.1 [see https://github.com/commercialhaskell/stack/issues/2617]
        @echo .
        @echo .
    )
    @echo FATAL: persistent failure while building installer with:  stack --no-terminal build -j 2 --exec make-installer
    exit /b 1
:built
popd

@dir /b/s installers\daedalus*

rem DEPENDENCIES:
rem   1. Node.js ('npm' binary in PATH)
rem   2. 7zip    ('7z'  binary in PATH)

set MIN_CARDANO_BYTES=50000000
set LIBRESSL_VERSION=2.5.3

set DAEDALUS_VERSION=%1
@if [%DAEDALUS_VERSION%]==[] (@echo FATAL: DAEDALUS_VERSION [argument #1] was not provided
    exit /b 1);
set CARDANO_BRANCH=%2
@if [%CARDANO_BRANCH%]==[]   (@echo NOTE: CARDANO_BRANCH [argument #2] was not provided
    exit /b 1);

@echo Building Daedalus version: %DAEDALUS_VERSION%
@echo ..with Cardano branch:     %CARDANO_BRANCH%

call npm install
@if %errorlevel% neq 0 (@echo FAILED: npm install
    exit /b 1)

@echo Obtaining Cardano from branch %CARDANO_BRANCH%
rmdir /s/q node_modules\daedalus-client-api 2>nul
mkdir      node_modules\daedalus-client-api

pushd node_modules\daedalus-client-api
    powershell -Command "try { $wc = New-Object net.webclient; $wc.Downloadfile('https://ci.appveyor.com/api/projects/jagajaga/cardano-sl/artifacts/CardanoSL.zip?branch=%CARDANO_BRANCH%', 'CardanoSL.zip'); } catch { exit 1; }"
    @if %errorlevel% neq 0 (@echo FAILED: powershell -Command "try { $wc = New-Object net.webclient; $wc.Downloadfile('https://ci.appveyor.com/api/projects/jagajaga/cardano-sl/artifacts/CardanoSL.zip?branch=%CARDANO_BRANCH%', 'CardanoSL.zip'); } catch { exit 1; }"
	popd & exit /b 1)
    @for /F "usebackq" %%A in ('CardanoSL.zip') do set size=%%~zA
    if %size% lss %MIN_CARDANO_BYTES% (@echo FAILED: CardanoSL.zip is too small: threshold=%MIN_CARDANO_BYTES%, actual=%size% bytes
        popd & exit /b 1)

    7z x CardanoSL.zip -y
    @if %errorlevel% neq 0 (@echo FAILED: 7z x CardanoSL.zip -y
	popd & exit /b 1)
    del CardanoSL.zip
popd

move   node_modules\daedalus-client-api\log-config-prod.yaml installers\log-config-prod.yaml
move   node_modules\daedalus-client-api\cardano-node.exe     installers\
move   node_modules\daedalus-client-api\cardano-launcher.exe installers\
del /f node_modules\daedalus-client-api\*.exe

@echo Packaging frontend
call npm run package -- --icon installers/icons/64x64
@if %errorlevel% neq 0 (@echo FAILED: npm run package -- --icon installers/icons/64x64
	exit /b 1)

pushd installers
    @echo Installing stack
    powershell -Command "try { $wc = New-Object net.webclient; $wc.Downloadfile('http://www.stackage.org/stack/windows-x86_64', 'stack.zip'); } catch { exit 1; }"
    @if %errorlevel% neq 0 (@echo powershell -Command "try { $wc = New-Object net.webclient; $wc.Downloadfile('http://www.stackage.org/stack/windows-x86_64', 'stack.zip'); } catch { exit 1; }"
	popd & exit /b 1)
    del /f stack.exe
    7z x stack.zip stack.exe
    @if %errorlevel% neq 0 (@echo FAILED: 7z x stack.zip stack.exe
	exit /b 1)
    del stack.zip

    @echo Copying DLLs
    @rem TODO: get rocksdb from rocksdb-haskell
    rmdir /s/q DLLs 2>nul
    mkdir      DLLs
    pushd      DLLs
        powershell -Command "try { wget 'https://s3.eu-central-1.amazonaws.com/cardano-sl-testing/DLLs.zip' -outfile DLLs.zip; } catch { exit 1; }"
        @if %errorlevel% neq 0 (@echo FAILED: powershell -Command "try { wget 'https://s3.eu-central-1.amazonaws.com/cardano-sl-testing/DLLs.zip' -outfile DLLs.zip; } catch { exit 1; }"
		exit /b 1)
        7z x DLLs.zip
        @if %errorlevel% neq 0 (@echo FAILED: 7z x DLLs.zip
		popd & popd & exit /b 1)
        del DLLs.zip
    popd

    @echo Building the installer
    stack setup --no-reinstall
    @if %errorlevel% neq 0 (@echo FAILED: stack setup --no-reinstall
	exit /b 1)

:build
    for /l %%x in (1, 1, 5) do (
        ..\scripts\appveyor-retry call stack --no-terminal build -j 2 --exec make-installer
        @if %errorlevel% equ 0 goto :built

        @echo .
        @echo .
        @echo FAILED: stack --no-terminal build -j 2 --exec make-installer
        @echo .
        @timeout 7
        @echo Retrying -- and also waiting for GHC 8.2.1 [see https://github.com/commercialhaskell/stack/issues/2617]
        @echo .
        @echo .
    )
    @echo FATAL: persistent failure while building installer with:  stack --no-terminal build -j 2 --exec make-installer
    exit /b 1
:built
popd

@dir /b/s installers\daedalus*

revert stack.exe fix

[DEVOPS-223] AppVeyor: revert stack.exe fix

When stack-1.5.0 was initially released the zip file for the Windows
build put stack.exe in a different place. They've since reverted that
change, so this reverts the now outdated fix as well.


@echo off
echo @echo off >ant.bat
echo %~dp0ant.bat -Dtopbuild.dir=%CD% %%* >>ant.bat

@echo off
echo @echo off >ant.bat
echo %~dp0ant.bat -Dbuild.dir=%CD%\build %%* >>ant.bat

Change setup.bat to define build.dir.

Change setup.bat to define build.dir.

git-svn-id: ca8e9bb6f3f9b50a093b443c23951d3c25ca0913@2097 369101cc-9a96-11dd-8e58-870c635edf7a


0</*! ::
@echo off

if "%~1" == "" (
	>&2 echo:Shell name required
	goto :shell.failed
)

setlocal

:: Proceed to the specified folder
if not "%~2" == "" pushd "%~2" || goto :EOF

:: Set the home dir
set "HOME=%~dp0home"

:: Set the shell specific parameters if it is necessary
set "SHELL_RUNNER="

if exist "%~dp0etc\%~n0\%~1.bat" call "%~dp0etc\%~n0\%~1.bat"

:: Check if specific runner exists
if defined SHELL_RUNNER if exist "%~dp0vendors\%~1\%SHELL_RUNNER%" (
	start "%~1 starting" "%~dp0vendors\%~1\%SHELL_RUNNER%"
	goto :EOF
)

:: Check if ConsoleZ is available
if exist "%~dp0vendors\ConsoleZ.bat" call "%~dp0vendors\ConsoleZ.bat"
if defined CONSOLEZ_NAME if exist "%~dp0vendors\%CONSOLEZ_NAME%\Console.exe" if exist "%~dp0etc\ConsoleZ\%~1.xml" (
	start "%~1 starting" "%~dp0vendors\%CONSOLEZ_NAME%\Console.exe" -c "%~dp0etc\ConsoleZ\%~1.xml" -t "%~1"
	goto :EOF
)

:: Check if ConEmu is available
if exist "%~dp0vendors\ConEmu\ConEmu.exe" (
	call :conemu FILE "%~1" && goto :EOF
	call :conemu CONF "%~1" && goto :EOF
	call :conemu TASK "%~1" && goto :EOF
)

:: Check if mintty is available
for %%s in ( "bin" "usr\bin" "usr\local\bin" ) do (
	call :mintty "%~1" "%%~s" && goto :EOF
)

:: Try naked bash, ksh or sh
for %%s in ( bash ksh sh ) do if exist "%~dp0vendors\%~1\bin\%%~s.exe" (
	start "%~1 starting" "%~dp0vendors\%~1\bin\%%~s.exe" -l -i
	goto :EOF
)

>&2 echo:Cannot find the specified shell "%~1".

:shell.failed
>&2 pause
exit /b 1

:mintty
setlocal

set "mintty_bin=%~dp0vendors\%~1\%~2\mintty.exe"

if not exist "%mintty_bin%" (
	endlocal
	exit /b 1
)

if not exist "%HOME%\.minttyrc" if exist "%~dp0etc\mintty\default.settings" (
	copy /b "%~dp0etc\mintty\default.settings" "%HOME%\.minttyrc"
)

set "mintty_args=-c "%HOME%\.minttyrc""

if exist "%~dp0etc\images\%~1.ico" (
	set "mintty_args=%mintty_args% -i "%~dp0etc\images\%~1.ico""
)

endlocal && start "%~1 starting" "%mintty_bin%" %mintty_args% /%~2/bash --login -i
goto :EOF

:conemu
setlocal

if "%~1" == "FILE" (
	set "conemu_cfgfile=%~dp0etc\ConEmu\%~2.xml"
) else (
	set "conemu_cfgfile=%~dp0etc\ConEmu\ConEmu.xml"
)

if not exist "%conemu_cfgfile%" (
	endlocal
	exit /b 1
)

cscript //nologo //e:javascript "%~f0" "%conemu_cfgfile%" %* || (
	endlocal
	exit /b 1
)

set "ConEmuArgs=/LoadCfgFile "%conemu_cfgfile%""
if exist "%~dp0etc\images\%~2.ico" (
	set "ConEmuArgs=%ConEmuArgs% /Icon "%~dp0etc\images\%~2.ico""
) else if exist "%~dp0etc\images\ConEmu.ico" (
	set "ConEmuArgs=%ConEmuArgs% /Icon "%~dp0etc\images\ConEmu.ico""
)

if "%~1" == "CONF" (
	set "ConEmuArgs=%ConEmuArgs% /Config "%~2""
) else if "%~1" == "TASK" (
	set "ConEmuArgs=%ConEmuArgs% /Cmd "{%~2}""
)

endlocal && start "%~2 starting" "%~dp0vendors\ConEmu\ConEmu.exe" %ConEmuArgs%
goto :EOF

*/0;

var alert = alert || function(msg)
{
	WScript.Echo(msg);
};

var exit = exit || function(exitCode)
{
	WScript.Quit(exitCode);
};

if ( WScript.Arguments.length != 3 ) {
	alert('Usage: ' + WScript.ScriptName + ' filename options');
	exit(1);
}

var filename = WScript.Arguments.item(0);

var ctrl = WScript.Arguments.item(1);
var name = WScript.Arguments.item(2);

var xpathstr = '/key[@name="Software"]/key[@name="ConEmu"]'
	+ '/key[lower-case(@name)=lower-case("' + ( ctrl == 'CONF' ? name : '.Vanilla' ) + '")]'
	+ '/key[@name="Tasks"]/key';

if ( ctrl == 'TASK' ) {
	xpathstr += '/value[@name="Name"][lower-case(@data)=lower-case("{' + name + '}")]';
}

// Comparison in XPath is case sensitive. Using of "lower-case" XPath
// function could be good solution to escape differencies between "abc",
// "ABC" and so on. Unfortunately, "lower-case" is a part of XPath 2.0 and
// is not supportable by MS JScript. To resolve this issue we introduce
// the partial workaround replacement with the function "translate",
// available in XPath 1.0.
// See for details: http://stackoverflow.com/a/1625859/3627676
xpathstr = xpathstr.replace(
	/lower-case\(([^()]+)\)/g,
	'translate($1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")'
);

var e;
try {
	var xmldoc = new ActiveXObject('Microsoft.XMLDOM');
	xmldoc.setProperty('SelectionLanguage', 'XPath');
	xmldoc.load(filename);

	var xml = xmldoc.selectNodes(xpathstr);
} catch(e) {
	// If a file or XML are bad, exit with error immediately
	exit(1);
}

exit( xml.length != 0 ? 0 : 1 );

0</*! ::
@echo off

if "%~1" == "" (
	>&2 echo:Shell name required
	goto :shell.failed
)

setlocal

:: Proceed to the specified folder
if not "%~2" == "" pushd "%~2" || goto :EOF

:: Set the home dir
set "HOME=%~dp0home"

:: Set the shell specific parameters if it is necessary
set "SHELL_RUNNER="

if exist "%~dp0etc\%~n0\%~1.bat" call "%~dp0etc\%~n0\%~1.bat"

:: Check if specific runner exists
if defined SHELL_RUNNER if exist "%~dp0vendors\%~1\%SHELL_RUNNER%" (
	start "%~1 starting" "%~dp0vendors\%~1\%SHELL_RUNNER%"
	goto :EOF
)
:: Check if ConEmu is available
if exist "%~dp0vendors\ConEmu\ConEmu.exe" (
	call :conemu FILE "%~1" && goto :EOF
	call :conemu CONF "%~1" && goto :EOF
	call :conemu TASK "%~1" && goto :EOF
)

:: Check if ConsoleZ is available
if exist "%~dp0vendors\ConsoleZ.bat" call "%~dp0vendors\ConsoleZ.bat"
if defined CONSOLEZ_NAME if exist "%~dp0vendors\%CONSOLEZ_NAME%\Console.exe" if exist "%~dp0etc\ConsoleZ\%~1.xml" (
	start "%~1 starting" "%~dp0vendors\%CONSOLEZ_NAME%\Console.exe" -c "%~dp0etc\ConsoleZ\%~1.xml" -t "%~1"
	goto :EOF
)

:: Check if mintty is available
for %%s in ( "bin" "usr\bin" "usr\local\bin" ) do (
	call :mintty "%~1" "%%~s" && goto :EOF
)

:: Try naked bash, ksh or sh
for %%s in ( bash ksh sh ) do if exist "%~dp0vendors\%~1\bin\%%~s.exe" (
	start "%~1 starting" "%~dp0vendors\%~1\bin\%%~s.exe" -l -i
	goto :EOF
)

>&2 echo:Cannot find the specified shell "%~1".

:shell.failed
>&2 pause
exit /b 1

:mintty
setlocal

set "mintty_bin=%~dp0vendors\%~1\%~2\mintty.exe"

if not exist "%mintty_bin%" (
	endlocal
	exit /b 1
)

if not exist "%HOME%\.minttyrc" if exist "%~dp0etc\mintty\default.settings" (
	copy /b "%~dp0etc\mintty\default.settings" "%HOME%\.minttyrc"
)

set "mintty_args=-c "%HOME%\.minttyrc""

if exist "%~dp0etc\images\%~1.ico" (
	set "mintty_args=%mintty_args% -i "%~dp0etc\images\%~1.ico""
)

endlocal && start "%~1 starting" "%mintty_bin%" %mintty_args% /%~2/bash --login -i
goto :EOF

:conemu
setlocal

if "%~1" == "FILE" (
	set "conemu_cfgfile=%~dp0etc\ConEmu\%~2.xml"
) else (
	set "conemu_cfgfile=%~dp0etc\ConEmu\ConEmu.xml"
)

if not exist "%conemu_cfgfile%" (
	endlocal
	exit /b 1
)

cscript //nologo //e:javascript "%~f0" "%conemu_cfgfile%" %* || (
	endlocal
	exit /b 1
)

set "ConEmuArgs=/LoadCfgFile "%conemu_cfgfile%""
if exist "%~dp0etc\images\%~2.ico" (
	set "ConEmuArgs=%ConEmuArgs% /Icon "%~dp0etc\images\%~2.ico""
) else if exist "%~dp0etc\images\ConEmu.ico" (
	set "ConEmuArgs=%ConEmuArgs% /Icon "%~dp0etc\images\ConEmu.ico""
)

if "%~1" == "CONF" (
	set "ConEmuArgs=%ConEmuArgs% /Config "%~2""
) else if "%~1" == "TASK" (
	set "ConEmuArgs=%ConEmuArgs% /Cmd "{%~2}""
)

endlocal && start "%~2 starting" "%~dp0vendors\ConEmu\ConEmu.exe" %ConEmuArgs%
goto :EOF

*/0;

var alert = alert || function(msg)
{
	WScript.Echo(msg);
};

var exit = exit || function(exitCode)
{
	WScript.Quit(exitCode);
};

if ( WScript.Arguments.length != 3 ) {
	alert('Usage: ' + WScript.ScriptName + ' filename options');
	exit(1);
}

var filename = WScript.Arguments.item(0);

var ctrl = WScript.Arguments.item(1);
var name = WScript.Arguments.item(2);

var xpathstr = '/key[@name="Software"]/key[@name="ConEmu"]'
	+ '/key[lower-case(@name)=lower-case("' + ( ctrl == 'CONF' ? name : '.Vanilla' ) + '")]'
	+ '/key[@name="Tasks"]/key';

if ( ctrl == 'TASK' ) {
	xpathstr += '/value[@name="Name"][lower-case(@data)=lower-case("{' + name + '}")]';
}

// Comparison in XPath is case sensitive. Using of "lower-case" XPath
// function could be good solution to escape differencies between "abc",
// "ABC" and so on. Unfortunately, "lower-case" is a part of XPath 2.0 and
// is not supportable by MS JScript. To resolve this issue we introduce
// the partial workaround replacement with the function "translate",
// available in XPath 1.0.
// See for details: http://stackoverflow.com/a/1625859/3627676
xpathstr = xpathstr.replace(
	/lower-case\(([^()]+)\)/g,
	'translate($1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")'
);

var e;
try {
	var xmldoc = new ActiveXObject('Microsoft.XMLDOM');
	xmldoc.setProperty('SelectionLanguage', 'XPath');
	xmldoc.load(filename);

	var xml = xmldoc.selectNodes(xpathstr);
} catch(e) {
	// If a file or XML are bad, exit with error immediately
	exit(1);
}

exit( xml.length != 0 ? 0 : 1 );

change order for ConEmu and ConsoleZ

change order for ConEmu and ConsoleZ


if "%PY3K%" == "1" (
  2to3 --output-dir=src/py3 -W -n src/py
  2to3 rmdir src/py /s /q
  move src/py3 src/py
  2to3 --output-dir=test3 -W -n test
  2to3 rmdir test /s /q
  move test3 test
)
python setup.py install

if "%PY3K%" == "1" (
  2to3 --output-dir=src/py3 -W -n src/py
  rmdir src/py /s /q
  move src/py3 src/py
  2to3 --output-dir=test3 -W -n test
  rmdir test /s /q
  move test3 test
)
python setup.py install

Update bld.bat

Update bld.bat