REM Setup (1)

REM Switch to branch 1700 (i.e. chromium beta)

REM   This part should only need to be done once, but it won't hurt to repeat it.  The first
REM   time might take a while because it fetches an extra 1/2 GB or so of branch commits.
gclient sync --with_branch_heads
git fetch

set BRANCH=1700
git config --replace-all svn-remote.svn_%BRANCH%.url svn://svn.chromium.org/chrome
git config --replace-all svn-remote.svn_%BRANCH%.fetch branches/%BRANCH%/src:refs/remotes/origin/%BRANCH%

REM   This "initializes" the %BRANCH% refspec, to prevent 'git svn fetch' from scanning
REM   the whole svn repo history for the branch commits we already synced above.
REM "ref: refs/remotes/branch-heads/%BRANCH%" > .git/refs/remotes/origin/%BRANCH%

REM   This should finish quickly, just doing a bit of git-svn housekeeping.
REM   It might fetch a few recent revisions, if the git mirror is slightly out-of-date,
REM   but it shouldn't be behind by much, and most of the time it shouldn't need to
REM   fetch anything. If it's taking a long time or looks like it's fetching a bunch of
REM   stuff from svn, something is probably wrong.
git svn fetch svn_%BRANCH%

REM   Checkout the branch 'src' tree.
git checkout -b branch_%BRANCH% origin/%BRANCH%
REM   Make git-cl happy.
git config branch.branch_%BRANCH%.merge refs/heads/%BRANCH%
git config branch.branch_%BRANCH%.remote branch-heads
REM   Checkout all the submodules at their branch DEPS revisions.
gclient sync --jobs 16
gclient runhooks --force

REM Setup (2)

REM remove all .git and .gitmodules directories that came with the chromium clone
RMDIR /S /Q .\.git\*.* .\breakpad\src\.git\*.* .\chrome\test\data\extensions\api_test\permissions\nacl_enabled\bin\.git\*.* .\chrome\test\data\perf\canvas_bench\.git\*.* .\chrome\test\data\perf\frame_rate\content\.git\*.* .\chrome\test\data\perf\third_party\octane\.git\*.* .\chrome\tools\test\reference_build\chrome_win\.git\*.* .\chrome_frame\tools\test\reference_build\chrome_win\.git\*.* .\media\cdm\ppapi\api\.git\*.* .\native_client\.git\*.* .\sdch\open-vcdiff\.git\*.* .\testing\gmock\.git\*.* .\testing\gtest\.git\*.* .\third_party\angle\.git\*.* .\third_party\angle_dx11\.git\*.* .\third_party\bidichecker\.git\*.* .\third_party\bison\.git\*.* .\third_party\brotli\src\.git\*.* .\third_party\cacheinvalidation\src\.git\*.* .\third_party\cld_2\src\.git\*.* .\third_party\cygwin\.git\*.* .\third_party\ffmpeg\.git\*.* .\third_party\flac\.git\*.* .\third_party\gnu_binutils\.git\*.* .\third_party\gperf\.git\*.* .\third_party\html_office\.git\*.* .\third_party\hunspell\.git\*.* .\third_party\hunspell_dictionaries\.git\*.* .\third_party\icu\.git\*.* .\third_party\jsoncpp\source\include\.git\*.* .\third_party\jsoncpp\source\src\lib_json\.git\*.* .\third_party\leveldatabase\src\.git\*.* .\third_party\libaddressinput\src\.git\*.* .\third_party\libc++\trunk\.git\*.* .\third_party\libc++abi\trunk\.git\*.* .\third_party\libexif\sources\.git\*.* .\third_party\libjingle\source\talk\.git\*.* .\third_party\libjpeg_turbo\.git\*.* .\third_party\libphonenumber\src\phonenumbers\.git\*.* .\third_party\libphonenumber\src\resources\.git\*.* .\third_party\libphonenumber\src\test\.git\*.* .\third_party\libsrtp\.git\*.* .\third_party\libvpx\.git\*.* .\third_party\libyuv\.git\*.* .\third_party\lighttpd\.git\*.* .\third_party\mesa\src\.git\*.* .\third_party\mingw-w64\mingw\bin\.git\*.* .\third_party\nacl_sdk_binaries\.git\*.* .\third_party\nss\.git\*.* .\third_party\openmax_dl\.git\*.* .\third_party\opus\src\.git\*.* .\third_party\ots\.git\*.* .\third_party\pefile\.git\*.* .\third_party\perl\.git\*.* .\third_party\psyco_win32\.git\*.* .\third_party\pyftpdlib\src\.git\*.* .\third_party\python_26\.git\*.* .\third_party\pywebsocket\src\.git\*.* .\third_party\safe_browsing\testing\.git\*.* .\third_party\scons-2.0.1\.git\*.* .\third_party\sfntly\cpp\src\.git\*.* .\third_party\skia\gyp\.git\*.* .\third_party\skia\include\.git\*.* .\third_party\skia\src\.git\*.* .\third_party\smhasher\src\.git\*.* .\third_party\snappy\src\.git\*.* .\third_party\speex\.git\*.* .\third_party\swig\Lib\.git\*.* .\third_party\swig\win\.git\*.* .\third_party\syzygy\binaries\.git\*.* .\third_party\trace-viewer\.git\*.* .\third_party\usrsctp\usrsctplib\.git\*.* .\third_party\webdriver\pylib\.git\*.* .\third_party\webgl\src\.git\*.* .\third_party\webgl_conformance\.git\*.* .\third_party\WebKit\.git\*.* .\third_party\WebKit\LayoutTests\w3c\csswg-test\.git\*.* .\third_party\WebKit\LayoutTests\w3c\web-platform-tests\.git\*.* .\third_party\webpagereplay\.git\*.* .\third_party\webrtc\.git\*.* .\third_party\xulrunner-sdk\.git\*.* .\third_party\yasm\binaries\.git\*.* .\third_party\yasm\source\patched-yasm\.git\*.* .\tools\deps2git\.git\*.* .\tools\grit\.git\*.* .\tools\gyp\.git\*.* .\tools\page_cycler\acid3\.git\*.* .\tools\swarming_client\.git\*.* .\v8\.git\*.* .\src\.gitmodules\*.* .\src\third_party\trace-viewer\third_party\Promises\.gitmodules\*.* .\src\third_party\WebKit\LayoutTests\w3c\web-platform-tests\.gitmodules\*.*

# Step (3) init AMD repository and pull
git init
git remote rm origin 2> nul
git remote add origin https://github.com/amd/Chromium-WebCL.git
git fetch
git reset --hard origin/master

REM Setup (1)

REM Switch to branch 1700 (i.e. chromium beta)

REM   This part should only need to be done once, but it won't hurt to repeat it.  The first
REM   time might take a while because it fetches an extra 1/2 GB or so of branch commits.
gclient sync --with_branch_heads
git fetch

set BRANCH=1700
git config --replace-all svn-remote.svn_%BRANCH%.url svn://svn.chromium.org/chrome
git config --replace-all svn-remote.svn_%BRANCH%.fetch branches/%BRANCH%/src:refs/remotes/origin/%BRANCH%

REM   This "initializes" the %BRANCH% refspec, to prevent 'git svn fetch' from scanning
REM   the whole svn repo history for the branch commits we already synced above.
REM "ref: refs/remotes/branch-heads/%BRANCH%" > .git/refs/remotes/origin/%BRANCH%

REM   This should finish quickly, just doing a bit of git-svn housekeeping.
REM   It might fetch a few recent revisions, if the git mirror is slightly out-of-date,
REM   but it shouldn't be behind by much, and most of the time it shouldn't need to
REM   fetch anything. If it's taking a long time or looks like it's fetching a bunch of
REM   stuff from svn, something is probably wrong.
git svn fetch svn_%BRANCH%

REM   Checkout the branch 'src' tree.
git checkout -b branch_%BRANCH% origin/%BRANCH%
REM   Make git-cl happy.
git config branch.branch_%BRANCH%.merge refs/heads/%BRANCH%
git config branch.branch_%BRANCH%.remote branch-heads
REM   Checkout all the submodules at their branch DEPS revisions.
gclient sync --jobs 16
gclient runhooks --force

REM Setup (2)

REM remove all .git and .gitmodules directories that came with the chromium clone
RMDIR /S /Q .\.git\*.* .\breakpad\src\.git\*.* .\chrome\test\data\extensions\api_test\permissions\nacl_enabled\bin\.git\*.* .\chrome\test\data\perf\canvas_bench\.git\*.* .\chrome\test\data\perf\frame_rate\content\.git\*.* .\chrome\test\data\perf\third_party\octane\.git\*.* .\chrome\tools\test\reference_build\chrome_win\.git\*.* .\chrome_frame\tools\test\reference_build\chrome_win\.git\*.* .\media\cdm\ppapi\api\.git\*.* .\native_client\.git\*.* .\sdch\open-vcdiff\.git\*.* .\testing\gmock\.git\*.* .\testing\gtest\.git\*.* .\third_party\angle\.git\*.* .\third_party\angle_dx11\.git\*.* .\third_party\bidichecker\.git\*.* .\third_party\bison\.git\*.* .\third_party\brotli\src\.git\*.* .\third_party\cacheinvalidation\src\.git\*.* .\third_party\cld_2\src\.git\*.* .\third_party\cygwin\.git\*.* .\third_party\ffmpeg\.git\*.* .\third_party\flac\.git\*.* .\third_party\gnu_binutils\.git\*.* .\third_party\gperf\.git\*.* .\third_party\html_office\.git\*.* .\third_party\hunspell\.git\*.* .\third_party\hunspell_dictionaries\.git\*.* .\third_party\icu\.git\*.* .\third_party\jsoncpp\source\include\.git\*.* .\third_party\jsoncpp\source\src\lib_json\.git\*.* .\third_party\leveldatabase\src\.git\*.* .\third_party\libaddressinput\src\.git\*.* .\third_party\libc++\trunk\.git\*.* .\third_party\libc++abi\trunk\.git\*.* .\third_party\libexif\sources\.git\*.* .\third_party\libjingle\source\talk\.git\*.* .\third_party\libjpeg_turbo\.git\*.* .\third_party\libphonenumber\src\phonenumbers\.git\*.* .\third_party\libphonenumber\src\resources\.git\*.* .\third_party\libphonenumber\src\test\.git\*.* .\third_party\libsrtp\.git\*.* .\third_party\libvpx\.git\*.* .\third_party\libyuv\.git\*.* .\third_party\lighttpd\.git\*.* .\third_party\mesa\src\.git\*.* .\third_party\mingw-w64\mingw\bin\.git\*.* .\third_party\nacl_sdk_binaries\.git\*.* .\third_party\nss\.git\*.* .\third_party\openmax_dl\.git\*.* .\third_party\opus\src\.git\*.* .\third_party\ots\.git\*.* .\third_party\pefile\.git\*.* .\third_party\perl\.git\*.* .\third_party\psyco_win32\.git\*.* .\third_party\pyftpdlib\src\.git\*.* .\third_party\python_26\.git\*.* .\third_party\pywebsocket\src\.git\*.* .\third_party\safe_browsing\testing\.git\*.* .\third_party\scons-2.0.1\.git\*.* .\third_party\sfntly\cpp\src\.git\*.* .\third_party\skia\gyp\.git\*.* .\third_party\skia\include\.git\*.* .\third_party\skia\src\.git\*.* .\third_party\smhasher\src\.git\*.* .\third_party\snappy\src\.git\*.* .\third_party\speex\.git\*.* .\third_party\swig\Lib\.git\*.* .\third_party\swig\win\.git\*.* .\third_party\syzygy\binaries\.git\*.* .\third_party\trace-viewer\.git\*.* .\third_party\usrsctp\usrsctplib\.git\*.* .\third_party\webdriver\pylib\.git\*.* .\third_party\webgl\src\.git\*.* .\third_party\webgl_conformance\.git\*.* .\third_party\WebKit\.git\*.* .\third_party\WebKit\LayoutTests\w3c\csswg-test\.git\*.* .\third_party\WebKit\LayoutTests\w3c\web-platform-tests\.git\*.* .\third_party\webpagereplay\.git\*.* .\third_party\webrtc\.git\*.* .\third_party\xulrunner-sdk\.git\*.* .\third_party\yasm\binaries\.git\*.* .\third_party\yasm\source\patched-yasm\.git\*.* .\tools\deps2git\.git\*.* .\tools\grit\.git\*.* .\tools\gyp\.git\*.* .\tools\page_cycler\acid3\.git\*.* .\tools\swarming_client\.git\*.* .\v8\.git\*.* .\src\.gitmodules\*.* .\src\third_party\trace-viewer\third_party\Promises\.gitmodules\*.* .\src\third_party\WebKit\LayoutTests\w3c\web-platform-tests\.gitmodules\*.*

REM Step (3) init AMD repository and pull
git init
git remote rm origin 2> nul
git remote add origin https://github.com/amd/Chromium-WebCL.git
git fetch
git reset --hard origin/master

fix typo

fix typo


REM Download ahmine and CanaryMod to set up coderdojobelfast Java room environment.

@echo off
setlocal

REM get ahmine, from "Learn to Program with Minecraft Plugins", 2nd Edition, Andy Hunt, (c)2014 The Pragmatic Programmers.
bitsadmin.exe /Transfer "Download ahmine" /Download http://media.pragprog.com/titles/ahmine2/code/ahmine2-code.zip %USERPROFILE%\Downloads\ahmine2-code.zip

REM get CanaryMod
md %USERPROFILE%\Desktop\server
bitsadmin.exe /Transfer "Download CanaryMod" /Download https://canarymod.net/releases/CanaryMod-1.2.0_0.jar %USERPROFILE%\Desktop\server\CanaryMod.jar

REM unpack ahmine
cd /d %~dp0
Call :UnZipFile "%USERPROFILE%\Downloads" "%USERPROFILE%\Downloads\ahmine2-code.zip"
Move /y "%USERPROFILE%\Downloads\code" "%USERPROFILE%\Desktop"

REM copy starter to server
Copy /y "%USERPROFILE%\Desktop\code\runtime\start_minecraft.bat" "%USERPROFILE%\Desktop\server"

REM Run canarymod first time
cd "%USERPROFILE%\Desktop\server"
.\"start_minecraft.bat"

endlocal
exit /b

:UnZipFile <ExtractTo> <newzipfile>
set vbs="%temp%\_.vbs"
if exist %vbs% del /f /q %vbs%
>%vbs%  echo Set fso = CreateObject("Scripting.FileSystemObject")
>>%vbs% echo If NOT fso.FolderExists(%1) Then
>>%vbs% echo fso.CreateFolder(%1)
>>%vbs% echo End If
>>%vbs% echo set objShell = CreateObject("Shell.Application")
>>%vbs% echo set FilesInZip=objShell.NameSpace(%2).items
>>%vbs% echo objShell.NameSpace(%1).CopyHere(FilesInZip)
>>%vbs% echo Set fso = Nothing
>>%vbs% echo Set objShell = Nothing
cscript //nologo %vbs%
if exist %vbs% del /f /q %vbs%

Add setup file

Add setup file


@echo off
setlocal EnableExtensions

set BATDIR=%~dp0
if not exist "%USERPROFILE%" (
    echo [Error] Environment variable %%USERPROFILE%% is not set.
    goto :EOF
)

REM Check access priviledge
if exist "%TEMP%\makelinks.tmp" del "%TEMP%\makelinks.tmp"
(mklink /h "%TEMP%\makelinks.tmp" "%~0" 2>&1) > NUL
if not %ERRORLEVEL% == 0 (
    echo Failed to create a hard link
    goto :EOF
)
del ".\makelinks.tmp" 2> NUL

REM Git configurations
git config --global include.path "%BATDIR%git\config"
call :COPY "%BATDIR%git/ignore" "%USERPROFILE%\.gitignore"

call :MKDIR "%USERPROFILE%\_vim\autoload"
call :MKLINK "%USERPROFILE%\_vim\vimrc"                 "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\_vim\autoload\plug.vim"     "%BATDIR%vimfiles\autoload\plug.vim"
call :MKDIR "%USERPROFILE%\.vim\autoload"
call :MKLINK "%USERPROFILE%\.vim\vimrc"                 "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\.vim\autoload\plug.vim"     "%BATDIR%vimfiles\autoload\plug.vim"
call :MKDIR "%USERPROFILE%\vimfiles\autoload"
call :MKLINK "%USERPROFILE%\vimfiles\vimrc"             "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\vimfiles\autoload\plug.vim" "%BATDIR%vimfiles\autoload\plug.vim"

call :MKDIR "%USERPROFILE%\.config\nvim"
call :MKLINK "%USERPROFILE%\.config\nvim\init.vim"      "%BATDIR%nvim\init.vim"
goto :EOF

REM ---------------------------------------------------------------------------
:COPY
    set SRC=%~f1
    set DEST=%~f2
    if not exist "%DEST%" (
        echo copy "%SRC%" "%DEST%"
        copy "%SRC%" "%DEST%" > NUL
    )
    exit /b 0

:MKLINK
    set DEST=%~f1
    set SRC=%~f2
    if exist "%DEST%" del /q "%DEST%"
    echo mklink /h "%DEST%" "%SRC%"
    mklink /h "%DEST%" "%SRC%" > NUL
    exit /b 0

:MKDIR
    if not exist "%~f1" (
        echo mkdir "%~f1"
        mkdir "%~f1"
    )
    exit /b 0

@echo off
setlocal EnableExtensions

set BATDIR=%~dp0
if not exist "%USERPROFILE%" (
    echo [Error] Environment variable %%USERPROFILE%% is not set.
    goto :EOF
)

REM Check access priviledge
if exist "%TEMP%\makelinks.tmp" del "%TEMP%\makelinks.tmp"
(mklink /h "%TEMP%\makelinks.tmp" "%~0" 2>&1) > NUL
if not %ERRORLEVEL% == 0 (
    echo Failed to create a hard link
    goto :EOF
)
del ".\makelinks.tmp" 2> NUL

REM Git configurations
git config --global include.path "%BATDIR%git\config"
call :COPY "%BATDIR%git/ignore" "%USERPROFILE%\.gitignore"

REM VIM configurations
call :MKDIR "%USERPROFILE%\_vim\autoload"
call :MKLINK "%USERPROFILE%\_vim\vimrc"                 "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\_vim\autoload\plug.vim"     "%BATDIR%vimfiles\autoload\plug.vim"
call :MKDIR "%USERPROFILE%\.vim\autoload"
call :MKLINK "%USERPROFILE%\.vim\vimrc"                 "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\.vim\autoload\plug.vim"     "%BATDIR%vimfiles\autoload\plug.vim"
call :MKDIR "%USERPROFILE%\vimfiles\autoload"
call :MKLINK "%USERPROFILE%\vimfiles\vimrc"             "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\vimfiles\autoload\plug.vim" "%BATDIR%vimfiles\autoload\plug.vim"

REM Neovim configurations
call :MKDIR "%USERPROFILE%\.config\nvim"
call :MKLINK "%USERPROFILE%\.config\nvim\init.vim"      "%BATDIR%nvim\init.vim"
goto :EOF

REM ---------------------------------------------------------------------------
:COPY
    set SRC=%~f1
    set DEST=%~f2
    if not exist "%DEST%" (
        echo copy "%SRC%" "%DEST%"
        copy "%SRC%" "%DEST%" > NUL
    )
    exit /b 0

:MKLINK
    set DEST=%~f1
    set SRC=%~f2
    if exist "%DEST%" del /q "%DEST%"
    echo mklink /h "%DEST%" "%SRC%"
    mklink /h "%DEST%" "%SRC%" > NUL
    exit /b 0

:MKDIR
    if not exist "%~f1" (
        echo mkdir "%~f1"
        mkdir "%~f1"
    )
    exit /b 0

Add comments

setup: Add comments


mkdir pubdocs
cd pubdocs

git clone https://%1:%2@github.com/SkillsFundingAgency/das-paymentsacceptancetesting.git --branch gh-pages

xcopy ..\das-payments-AcceptanceTests\AcceptanceTests\docs das-paymentsacceptancetesting /E /R /Y

cd das-paymentsacceptancetesting
git add --all
git commit -m "Update docs for release %RELEASE_RELEASENAME%"
git push origin gh-pages

mkdir pubdocs
cd pubdocs

git clone https://%1:%2@github.com/SkillsFundingAgency/das-paymentsacceptancetesting.git --branch gh-pages

xcopy ..\das-payments-AcceptanceTests\AcceptanceTests\docs das-paymentsacceptancetesting /E /R /Y

git config  user.email "kalim.akbar@fasst.org.uk"
git config  user.name "das build agent"

cd das-paymentsacceptancetesting
git add --all
git commit -m "Update docs for release %RELEASE_RELEASENAME%"
git push origin gh-pages

Update publishdocs.bat

Update publishdocs.bat


#!/usr/bin/env bats
## tests with https://github.com/sstephenson/bats

@test "running with no args prints usage & exit code 2." {
  run ./dockhack
  [ "$status" -eq 2 ]
  # can't distinguish between stdout/err yet https://github.com/sstephenson/bats/pull/55
  [[ "$output" =~ "Usage" ]]
}

@test "-h/--help print usage & exit code 0." {
  run ./dockhack -h
  [ "$status" -eq 0 ]
  [[ "$output" =~ "Usage" ]]
  run ./dockhack --help
  [ "$status" -eq 0 ]
  [[ "$output" =~ "Usage" ]]
}

@test "'dockhack lib' is a no-op" {
  run ./dockhack lib
  [ "$status" -eq 0 ]
  [[ "$output" = "" ]]
}

add beginnings of a 'bats' test suite

add beginnings of a 'bats' test suite


gcloud beta emulators datastore start --project=spine --host-port=localhost:8080 --consistency 1.0

Add start-datastore.bat

Add start-datastore.bat


@echo off
CLS
goto checkPrivileges

:: Unfortunately, Windows doesn't have a decent built-in way to append a string to the $PATH.
:: setx is convenient, but it 1) truncates paths longer than 1024 characters, and
:: 2) mucks up the user path with the machine-wide path.
:: This function takes care of these problems by calling Environment.Get/SetEnvironmentVariable
:: via PowerShell, which lacks these issues.
:appendToUserPath
set "RUNPS=powershell -NoProfile -ExecutionPolicy Bypass -Command" :: Command to start PowerShell.
set "OLDPATHPS=[Environment]::GetEnvironmentVariable('PATH', 'User')" :: PowerShell command to run to get the old $PATH for the current user.

:: Capture the output of %RUNPS% "%OLDPATHPS%" and set it to OLDPATH
for /f "delims=" %%i in ('%RUNPS% "%OLDPATHPS%"') do (
    set "OLDPATH=%%i"
)

set "NEWPATH=%OLDPATH%;%1"
:: Set the new $PATH
%RUNPS% "[Environment]::SetEnvironmentVariable('PATH', '%NEWPATH%', 'User')"
goto :eof

:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )

:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)
echo.
echo **************************************
echo Installing GitHub CLI as Administrator
echo **************************************

setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
echo UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B

:gotPrivileges

setlocal & cd /d %~dp0

set HUB_BIN_PATH="%LOCALAPPDATA%\GitHubCLI\bin"
IF EXIST %HUB_BIN_PATH% GOTO DIRECTORY_EXISTS
mkdir %HUB_BIN_PATH%
set "path=%PATH%;%HUB_BIN_PATH:"=%"
call :appendToUserPath %HUB_BIN_PATH:"=%
:DIRECTORY_EXISTS

:: Delete any existing programs
2>NUL del /q %HUB_BIN_PATH%\hub*

1>NUL copy .\bin\hub.exe %HUB_BIN_PATH%\hub.exe

echo hub.exe installed successfully. Press any key to exit
pause > NUL

@echo off
CLS
goto checkPrivileges

:: Unfortunately, Windows doesn't have a decent built-in way to append a string to the $PATH.
:: setx is convenient, but it 1) truncates paths longer than 1024 characters, and
:: 2) mucks up the user path with the machine-wide path.
:: This function takes care of these problems by calling Environment.Get/SetEnvironmentVariable
:: via PowerShell, which lacks these issues.
:appendToUserPath
set "RUNPS=powershell -NoProfile -ExecutionPolicy Bypass -Command" :: Command to start PowerShell.
set "OLDPATHPS=[Environment]::GetEnvironmentVariable('PATH', 'User')" :: PowerShell command to run to get the old $PATH for the current user.

:: Capture the output of %RUNPS% "%OLDPATHPS%" and set it to OLDPATH
for /f "delims=" %%i in ('%RUNPS% "%OLDPATHPS%"') do (
    set "OLDPATH=%%i"
)

set "NEWPATH=%OLDPATH%;%1"
:: Set the new $PATH
%RUNPS% "[Environment]::SetEnvironmentVariable('PATH', '%NEWPATH%', 'User')"
goto :eof

:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )

:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)
echo.
echo **************************************
echo Installing GitHub CLI as Administrator
echo **************************************

setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
echo UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B

:gotPrivileges

setlocal & cd /d %~dp0

set HUB_BIN_PATH="%LOCALAPPDATA%\GitHubCLI\bin"
IF EXIST %HUB_BIN_PATH% GOTO DIRECTORY_EXISTS
mkdir %HUB_BIN_PATH%
set "path=%PATH%;%HUB_BIN_PATH:"=%"
call :appendToUserPath "%HUB_BIN_PATH:"=%"
:DIRECTORY_EXISTS

:: Delete any existing programs
2>NUL del /q %HUB_BIN_PATH%\hub*

1>NUL copy .\bin\hub.exe %HUB_BIN_PATH%\hub.exe

echo hub.exe installed successfully. Press any key to exit
pause > NUL

Fix Windows installer for OS usernames with spaces

The Windows installer appends the location of `hub.exe` to user's PATH,
but that would break if the OS username has spaces.


"C:\Program Files (x86)\Git\bin\sh.exe" --login -i -c "find $(pwd)/src/ $(pwd)/test/ $(pwd)/examples/ $(pwd)/libs/ -name "*.ts" | xargs tsc -w -t ES5 --sourcemap --outDir gen"

"C:\Program Files (x86)\Git\bin\sh.exe" --login -i -c "find ./src/ ./test/ ./examples/ ./libs/ -name "*.ts" | xargs tsc -w -t ES5 --sourcemap --outDir gen"

remove using full working directory in watch.bat command
due to bug with the tsc watcher.

this means the error output won't include links in the IDEA console.
Its not worth the hassle to try and improve this as both
Intellij have an upcoming feature with integration into tsc compiler
services and Microsoft have an unrelated upcoming feature or a copmilation
server.

Change-Id: Iac9bec2d7bbfc1a04d9f24e42e2d5dfef2d0389a


@ECHO OFF

IF "%1" == "" && "%2" == "" (
    ECHO "Usage: %0 path\to\input.boa output-dir [options]"
    EXIT 1
)

input="%1"
output="%2"

SHIFT
SHIFT

IF NOT EXIST "%input%" (
    ECHO "input '%input%' is not a file"
    EXIT 2
)

REM need to convert this to batch script
REM if [ -d $2 ]; then
REM     read -n 1 -p "output directory '$2' exists - delete? [Y/n] " yn
REM     echo ""
REM
REM     yn=`echo $yn | tr '[:upper:]' '[:lower:]'`
REM
REM     if [[ $yn =~ ^(y| ) ]] | [ -z $yn ]; then
REM         rm -Rf $2
REM     else
REM         echo "Please remove or provide a different output directory."
REM         exit -3
REM     fi
REM fi

"%~dp0\boa.bat" -e -d dataset/ -i %input% -o %output% %*

@ECHO OFF

IF "%1" == "" (
    IF "%2" == "" (
        ECHO "Usage: %0 path\to\input.boa output-dir [options]"
        EXIT 1
    )
)

input="%1"
output="%2"

SHIFT
SHIFT

IF NOT EXIST "%input%" (
    ECHO "input '%input%' is not a file"
    EXIT 2
)

REM need to convert this to batch script
REM if [ -d $2 ]; then
REM     read -n 1 -p "output directory '$2' exists - delete? [Y/n] " yn
REM     echo ""
REM
REM     yn=`echo $yn | tr '[:upper:]' '[:lower:]'`
REM
REM     if [[ $yn =~ ^(y| ) ]] | [ -z $yn ]; then
REM         rm -Rf $2
REM     else
REM         echo "Please remove or provide a different output directory."
REM         exit -3
REM     fi
REM fi

"%~dp0\boa.bat" -e -d dataset/ -i %input% -o %output% %*

fix error in evaluate.bat

fix error in evaluate.bat


:: Setup directory structure
mkdir build
if errorlevel 1 exit 1

:: Configure
cmake -G "Ninja" -B "build" -S . ^
         -DCMAKE_BUILD_TYPE=Release ^
         -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
         -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
         -DCMAKE_VERBOSE_MAKEFILE=ON

if errorlevel 1 exit 1

:: Build and install
ninja
if errorlevel 1 exit 1
ninja install
if errorlevel 1 exit 1

:: Setup directory structure
mkdir build
if errorlevel 1 exit 1

:: Configure
cmake -G "Ninja" -B "build" -S . ^
         -DCMAKE_BUILD_TYPE=Release ^
         -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
         -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
         -DCMAKE_VERBOSE_MAKEFILE=ON
if errorlevel 1 exit 1

:: Build and install
cd build
if errorlevel 1 exit 1
ninja
if errorlevel 1 exit 1
ninja install
if errorlevel 1 exit 1

Update bld.bat

Update bld.bat


@ECHO OFF
SETLOCAL EnableDelayedExpansion

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

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

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

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

REM Initialise error check value
SET ERROR=0

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

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

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

:exitOnError
cd %CURRDIR%
SET ERROR=1

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

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

:return
EXIT /B %ERROR%

@ECHO OFF
SETLOCAL EnableDelayedExpansion

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

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

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

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

REM Initialise error check value
SET ERROR=0

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

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

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

:exitOnError
cd %CURRDIR%
SET ERROR=1

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

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

:return
EXIT /B %ERROR%

Improve error detection of dependency bat file.


@echo off

::
:: The Batchography book by Elias Bachaalany
::

:: Auto interpret Python scripts
::

:main
    setlocal

    if "%1"=="" goto :help
    if not exist "%1" (
        echo Input file '%1' not found
        goto :eof
    )

    set FN=%1
    set last_fdate=x

    title Batchography - Python auto re-interpreting '%FN%'

    :repeat
        :: Get the file date/time (incl. seconds)
        for /f "delims=" %%i in ('"forfiles /m %FN% /c "cmd /c echo @ftime" "') do set fdate=%%i

        :: Different attributes found?
        if not "%last_fdate%"=="%fdate%" (
            cls
            :: Re-interpret
            call python "%FN%"
        )

        :: Remember the new date/time
        set last_fdate=%fdate%

        :: Wait for a second before checking for the file modification again
        CHOICE /T 1 /C "yq" /D y > nul

        :: User pressed Q? just quit
        if "%errorlevel%" neq "1" goto :eof

        :: Repeat until user quits or Ctrl-C
        goto repeat

:help
    echo Auto Python reinterpreter takes the input file name to autocompile as an argument
    goto :eof

@echo off

::
:: The Batchography book by Elias Bachaalany
::

:: Auto interpret Python scripts
::

:main
    setlocal

    if "%1"=="" goto :help
    if not exist "%~1" (
        echo Input file '%1' not found
        goto :eof
    )

    set last_fdate=x

    title Batchography - Python auto re-interpreting '%~1'
    pushd "%~dp1"

    :repeat
        :: Get the file date/time (incl. seconds)
        for /f "delims=" %%i in ('"forfiles /m "%~nx1" /c "cmd /c echo @ftime" "') do set fdate=%%i

        :: Different attributes found?
        if not "%last_fdate%"=="%fdate%" (
            cls
            rem echo ftime=%fdate%
            :: Re-interpret
            call python "%~nx1"
        )

        :: Remember the new date/time
        set last_fdate=%fdate%

        :: Wait for a second before checking for the file modification again
        CHOICE /T 1 /C "yq" /D y > nul

        :: User pressed Q? just quit
        if "%errorlevel%" neq "1" goto :eof

        :: Repeat until user quits or Ctrl-C
        goto repeat

:help
    echo Auto Python reinterpreter takes the input file name to autocompile as an argument
    goto :eof

autopy.bat: handle the case of interpreting a script not in the CWD


add ls command

add ls command


@REM
@REM Copyright (c) 2008, Intel Corporation
@REM All rights reserved. This program and the accompanying materials
@REM are licensed and made available under the terms and conditions of the BSD License
@REM which accompanies this distribution.  The full text of the license may be found at
@REM http://opensource.org/licenses/bsd-license.php
@REM
@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@REM

@echo off
@if /I "%1"=="-h" goto Usage
@if /I "%1"=="-help" goto Usage
@if /I "%1"=="--help" goto Usage
@if /I "%1"=="/h" goto Usage
@if /I "%1"=="/help" goto Usage
@if /I "%1"=="/?" goto Usage

set IMPORT_TOOL=%~dp0Trim.exe
if NOT exist %IMPORT_TOOL% (
  echo.
  echo !!! Trim.exe was not found. Please make sure that it is in the same directory as this script!
  echo.
  goto End
)

if '%*'=='' (
  set FILE_LIST=*.c
) else (
  set FILE_LIST=%*
)

for /r %%i in (%FILE_LIST%) do (
  echo Converting ... %%i
  %IMPORT_TOOL% -8 -o %%i %%i
)
goto End

:Usage
  echo.
  echo  Usage: "%0 [-h | -help | --help | /h | /help | /?] [files]"
  echo.
  echo         files          File list or file pattern with wildcard, like "*.c *.h",
  echo                        seperated by space. If not specified, defaul to *.c.
echo.

:End
set FILE_LIST=
set IMPORT_TOOL=

@echo on

@REM
@REM Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
@REM This program and the accompanying materials
@REM are licensed and made available under the terms and conditions of the BSD License
@REM which accompanies this distribution.  The full text of the license may be found at
@REM http://opensource.org/licenses/bsd-license.php
@REM
@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@REM

@echo off
@if /I "%1"=="-h" goto Usage
@if /I "%1"=="-help" goto Usage
@if /I "%1"=="--help" goto Usage
@if /I "%1"=="/h" goto Usage
@if /I "%1"=="/help" goto Usage
@if /I "%1"=="/?" goto Usage

set IMPORT_TOOL=%~dp0Trim.exe
if NOT exist %IMPORT_TOOL% (
  echo.
  echo !!! Trim.exe was not found. Please make sure that it is in the same directory as this script!
  echo.
  goto End
)

if '%*'=='' (
  set FILE_LIST=*.c
) else (
  set FILE_LIST=%*
)

for /r %%i in (%FILE_LIST%) do (
  echo Converting ... %%i
  %IMPORT_TOOL% -8 -o %%i %%i
)
goto End

:Usage
  echo.
  echo  Usage: "%0 [-h | -help | --help | /h | /help | /?] [files]"
  echo.
  echo         files          File list or file pattern with wildcard, like "*.c *.h",
  echo                        seperated by space. If not specified, defaul to *.c.
echo.

:End
set FILE_LIST=
set IMPORT_TOOL=

@echo on

update copyright format

update copyright format

git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@11314 6f19259b-4bc3-4df7-8a09-765794883524


@echo off

rmdir /s /q "%TEMP%/zpm-cache"
rmdir /s /q "%TEMP%/zpm-install"

mkdir "%TEMP%/zpm-install"
cd "%TEMP%/zpm-install"

if exist "premake5.zip" del /q "premake5.zip"

if defined GH_TOKEN (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip -Headers @{'Authorization'='token %GH_TOKEN%'}"
) else (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip"
)

echo Finished downloading premake...

powershell -command Add-Type -AssemblyName System.IO.Compression.FileSystem ^

[System.IO.Compression.ZipFile]::ExtractToDirectory('premake5.zip', '.')"

git clone https://github.com/Zefiros-Software/ZPM.git ./zpm

echo Finished cloning ZPM...

if defined GH_TOKEN (
    .\premake5.exe --github-token=%GH_TOKEN% --file=zpm/zpm.lua install-zpm;
) else (
    .\premake5.exr --file=zpm/zpm.lua install-zpm;
)

rmdir /s /q "%TEMP%/zpm-install"

echo ZPM is installed, however a restart is required!

if defined APPVEYOR (
    @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    choco install git.install
)

@echo off

rmdir /s /q "%TEMP%/zpm-cache"
rmdir /s /q "%TEMP%/zpm-install"

mkdir "%TEMP%/zpm-install"
cd "%TEMP%/zpm-install"

if exist "premake5.zip" del /q "premake5.zip"

if defined GH_TOKEN (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip -Headers @{'Authorization'='token %GH_TOKEN%'}"
) else (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip"
)
dir
echo Finished downloading premake...

powershell -command Add-Type -AssemblyName System.IO.Compression.FileSystem ^

[System.IO.Compression.ZipFile]::ExtractToDirectory('premake5.zip', '.')"

git clone https://github.com/Zefiros-Software/ZPM.git ./zpm

echo Finished cloning ZPM...

if defined GH_TOKEN (
    .\premake5.exe --github-token=%GH_TOKEN% --file=zpm/zpm.lua install-zpm;
) else (
    .\premake5.exr --file=zpm/zpm.lua install-zpm;
)

rmdir /s /q "%TEMP%/zpm-install"

echo ZPM is installed, however a restart is required!

if defined APPVEYOR (
    @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    choco install git.install
)

Check directory contents

Check directory contents


@echo off

rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
rem or more contributor license agreements. Licensed under the Elastic License;
rem you may not use this file except in compliance with the Elastic License.

REM .in.bat <java main class> [args,..]

SETLOCAL

if NOT DEFINED JAVA_HOME goto err

set JAVA_CMD=%1
if "%JAVA_CMD%" == "" goto err_java_cmd

REM fix args
for /f "usebackq tokens=1*" %%i in (`echo %*`) DO @ set params=%%j
SHIFT

set SCRIPT_DIR=%~dp0
for %%I in ("%SCRIPT_DIR%..\..") do set ES_HOME=%%~dpfI

REM ***** JAVA options *****

if "%ES_MIN_MEM%" == "" (
set ES_MIN_MEM=256m
)

if "%ES_MAX_MEM%" == "" (
set ES_MAX_MEM=1g
)

if NOT "%ES_HEAP_SIZE%" == "" (
set ES_MIN_MEM=%ES_HEAP_SIZE%
set ES_MAX_MEM=%ES_HEAP_SIZE%
)

set JAVA_OPTS=%JAVA_OPTS% -Xms%ES_MIN_MEM% -Xmx%ES_MAX_MEM%

if NOT "%ES_HEAP_NEWSIZE%" == "" (
  set JAVA_OPTS=%JAVA_OPTS% -Xmn%ES_HEAP_NEWSIZE%
)

if NOT "%ES_DIRECT_SIZE%" == "" (
  set JAVA_OPTS=%JAVA_OPTS% -XX:MaxDirectMemorySize=%ES_DIRECT_SIZE%
)

set JAVA_OPTS=%JAVA_OPTS% -Xss256k

REM Enable aggressive optimizations in the JVM
REM    - Disabled by default as it might cause the JVM to crash
REM set JAVA_OPTS=%JAVA_OPTS% -XX:+AggressiveOpts

set JAVA_OPTS=%JAVA_OPTS% -XX:+UseParNewGC
set JAVA_OPTS=%JAVA_OPTS% -XX:+UseConcMarkSweepGC

set JAVA_OPTS=%JAVA_OPTS% -XX:CMSInitiatingOccupancyFraction=75
set JAVA_OPTS=%JAVA_OPTS% -XX:+UseCMSInitiatingOccupancyOnly

REM When running under Java 7
REM JAVA_OPTS=%JAVA_OPTS% -XX:+UseCondCardMark

REM GC logging options -- uncomment to enable
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCDetails
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCTimeStamps
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintClassHistogram
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintTenuringDistribution
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCApplicationStoppedTime
REM JAVA_OPTS=%JAVA_OPTS% -Xloggc:/var/log/elasticsearch/gc.log

REM Causes the JVM to dump its heap on OutOfMemory.
set JAVA_OPTS=%JAVA_OPTS% -XX:+HeapDumpOnOutOfMemoryError
REM The path to the heap dump location, note directory must exists and have enough
REM space for a full heap dump.
REM JAVA_OPTS=%JAVA_OPTS% -XX:HeapDumpPath=$ES_HOME/logs/heapdump.hprof

REM Disables explicit GC
set JAVA_OPTS=%JAVA_OPTS% -XX:+DisableExplicitGC
REM Avoid empty elements in classpath to make JarHell happy
if "%ES_CLASSPATH%" == "" (
  set ES_CLASSPATH=%ES_HOME%/lib/*;%ES_HOME%/lib/sigar/*;%ES_HOME%/plugins/xpack/*
) else (
  set ES_CLASSPATH=%ES_CLASSPATH%;%ES_HOME%/lib/*;%ES_HOME%/lib/sigar/*;%ES_HOME%/plugins/xpack/*
)
set ES_PARAMS=-Des.path.home="%ES_HOME%"

SET HOSTNAME=%COMPUTERNAME%

"%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% -cp "%ES_CLASSPATH%" %JAVA_CMD% %PARAMS%
goto finally

:err
echo JAVA_HOME environment variable must be set!
ENDLOCAL
EXIT /B 1
:err_java_cmd
echo Can not call .in.bat without specifying a main java class
ENDLOCAL
EXIT /B 1

:finally
ENDLOCAL

@echo off

rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
rem or more contributor license agreements. Licensed under the Elastic License;
rem you may not use this file except in compliance with the Elastic License.

REM .in.bat <java main class> [args,..]

SETLOCAL

if NOT DEFINED JAVA_HOME goto err

set JAVA_CMD=%1
if "%JAVA_CMD%" == "" goto err_java_cmd

REM fix args
for /f "usebackq tokens=1*" %%i in (`echo %*`) DO @ set params=%%j
SHIFT

set SCRIPT_DIR=%~dp0
for %%I in ("%SCRIPT_DIR%..\..") do set ES_HOME=%%~dpfI

REM ***** JAVA options *****

if "%ES_MIN_MEM%" == "" (
set ES_MIN_MEM=256m
)

if "%ES_MAX_MEM%" == "" (
set ES_MAX_MEM=1g
)

if NOT "%ES_HEAP_SIZE%" == "" (
set ES_MIN_MEM=%ES_HEAP_SIZE%
set ES_MAX_MEM=%ES_HEAP_SIZE%
)

set JAVA_OPTS=%JAVA_OPTS% -Xms%ES_MIN_MEM% -Xmx%ES_MAX_MEM%

if NOT "%ES_HEAP_NEWSIZE%" == "" (
  set JAVA_OPTS=%JAVA_OPTS% -Xmn%ES_HEAP_NEWSIZE%
)

if NOT "%ES_DIRECT_SIZE%" == "" (
  set JAVA_OPTS=%JAVA_OPTS% -XX:MaxDirectMemorySize=%ES_DIRECT_SIZE%
)

set JAVA_OPTS=%JAVA_OPTS% -Xss256k

REM Enable aggressive optimizations in the JVM
REM    - Disabled by default as it might cause the JVM to crash
REM set JAVA_OPTS=%JAVA_OPTS% -XX:+AggressiveOpts

set JAVA_OPTS=%JAVA_OPTS% -XX:+UseParNewGC
set JAVA_OPTS=%JAVA_OPTS% -XX:+UseConcMarkSweepGC

set JAVA_OPTS=%JAVA_OPTS% -XX:CMSInitiatingOccupancyFraction=75
set JAVA_OPTS=%JAVA_OPTS% -XX:+UseCMSInitiatingOccupancyOnly

REM When running under Java 7
REM JAVA_OPTS=%JAVA_OPTS% -XX:+UseCondCardMark

REM GC logging options -- uncomment to enable
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCDetails
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCTimeStamps
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintClassHistogram
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintTenuringDistribution
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCApplicationStoppedTime
REM JAVA_OPTS=%JAVA_OPTS% -Xloggc:/var/log/elasticsearch/gc.log

REM Causes the JVM to dump its heap on OutOfMemory.
set JAVA_OPTS=%JAVA_OPTS% -XX:+HeapDumpOnOutOfMemoryError
REM The path to the heap dump location, note directory must exists and have enough
REM space for a full heap dump.
REM JAVA_OPTS=%JAVA_OPTS% -XX:HeapDumpPath=$ES_HOME/logs/heapdump.hprof

REM Disables explicit GC
set JAVA_OPTS=%JAVA_OPTS% -XX:+DisableExplicitGC
REM Avoid empty elements in classpath to make JarHell happy
if "%ES_CLASSPATH%" == "" (
  set ES_CLASSPATH=%ES_HOME%/lib/*;%ES_HOME%/plugins/xpack/*
) else (
  set ES_CLASSPATH=%ES_CLASSPATH%;%ES_HOME%/lib/*;%ES_HOME%/plugins/xpack/*
)
set ES_PARAMS=-Des.path.home="%ES_HOME%"

SET HOSTNAME=%COMPUTERNAME%

"%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% -cp "%ES_CLASSPATH%" %JAVA_CMD% %PARAMS%
goto finally

:err
echo JAVA_HOME environment variable must be set!
ENDLOCAL
EXIT /B 1
:err_java_cmd
echo Can not call .in.bat without specifying a main java class
ENDLOCAL
EXIT /B 1

:finally
ENDLOCAL

Remove sigar from the x-pack windows script classpath

Original commit: elastic/x-pack-elasticsearch@247e945ff5968ce9b85d30966ad3a3978a27956b


@echo off
PATH=%PATH%;%~d0%~p0tmplib
java -Dfile.encoding=UTF-8 -Dpython.path="%~d0%~p0sikuli-script.jar/" -cp "%~d0%~p0jintellitype-1.3.2.jar;%~d0%~p0junit-3.8.1.jar;%~d0%~p0sikuli-ide.jar;%~d0%~p0sikuli-script.jar;%~d0%~p0swing-layout-1.0.1.jar" edu.mit.csail.uid.SikuliIDE %*

@echo off
PATH=%PATH%;%~d0%~p0tmplib
set JAVA_EXE="java"
REM 64bit Windows users: please uncomment the following line and make sure the path is pointed to your 32bit JRE
REM set JAVA_EXE="C:\Program Files (x86)\Java\jre6\bin\java.exe"
%JAVA_EXE% -Dfile.encoding=UTF-8 -Dpython.path="%~d0%~p0sikuli-script.jar/" -cp "%~d0%~p0jintellitype-1.3.2.jar;%~d0%~p0junit-3.8.1.jar;%~d0%~p0sikuli-ide.jar;%~d0%~p0sikuli-script.jar;%~d0%~p0swing-layout-1.0.1.jar" edu.mit.csail.uid.SikuliIDE %*

add java path for 64bit windows in .bat

add java path for 64bit windows in .bat


setlocal enableextensions
FOR /F "tokens=* delims= " %%i in ( 'scripts\vswhere -format value -property installationPath' ) do ( set installdir=%%i )
pushd %installdir%
call .\VC\Auxiliary\Build\vcvars64.bat
popd

echo on

REM Build Intercom
cargo build
if %errorlevel% neq 0 exit /b %errorlevel%

REM Build testlib
pushd test\testlib

cargo build
if %errorlevel% neq 0 exit /b %errorlevel%

popd

REM Generate IDL and Manifest for the testlib.
pushd intercom-utils

cargo run -- idl ..\test\testlib > ..\test\testlib\testlib.idl
if %errorlevel% neq 0 exit /b %errorlevel%

cargo run -- manifest ..\test\testlib > ..\test\testlib\TestLib.Assembly.manifest
if %errorlevel% neq 0 exit /b %errorlevel%

popd

REM Build C++ test suite
pushd test\cpp-raw\msvc

devenv cpp.sln /Build "Release|x64"
if %errorlevel% neq 0 exit /b %errorlevel%

popd

REM Build C# test suite
pushd test\cs

tlbimp ..\testlib\target\debug\test_lib.dll /MACHINE:X64 /out:TestLib.Interop.dll

devenv cs.sln /Build "Release|x64"
if %errorlevel% neq 0 exit /b %errorlevel%

popd

setlocal enableextensions
FOR /F "tokens=* delims= " %%i in ( 'scripts\vswhere -format value -property installationPath' ) do ( set installdir=%%i )
pushd %installdir%
call .\VC\Auxiliary\Build\vcvars64.bat
popd

echo on

REM Build Intercom
cargo build
if %errorlevel% neq 0 exit /b %errorlevel%

REM Build testlib
pushd test\testlib

cargo build
if %errorlevel% neq 0 exit /b %errorlevel%

popd

REM Generate IDL and Manifest for the testlib.
pushd intercom-cli

cargo run -- idl ..\test\testlib > ..\test\testlib\testlib.idl
if %errorlevel% neq 0 exit /b %errorlevel%

cargo run -- manifest ..\test\testlib > ..\test\testlib\TestLib.Assembly.manifest
if %errorlevel% neq 0 exit /b %errorlevel%

popd

REM Build C++ test suite
pushd test\cpp-raw\msvc

devenv cpp.sln /Build "Release|x64"
if %errorlevel% neq 0 exit /b %errorlevel%

popd

REM Build C# test suite
pushd test\cs

tlbimp ..\testlib\target\debug\test_lib.dll /MACHINE:X64 /out:TestLib.Interop.dll

devenv cs.sln /Build "Release|x64"
if %errorlevel% neq 0 exit /b %errorlevel%

popd

Move AppVeyor tests to use intercom-cli

Move AppVeyor tests to use intercom-cli


@echo off
..\Main\bin\Release\YaccConstructor.exe -f FsYaccFrontend -i Parser.fsy ^
    -g "RNGLRGenerator -o Parser.fs -module Yard.Frontends.YardFrontend.GrammarParser -pos Source.Position -token Source.t" > log.txt

@echo off
..\YaccConstructor\bin\Release\YaccConstructor.exe -f FsYaccFrontend -i Parser.fsy ^
    -g "RNGLRGenerator -o Parser.fs -module Yard.Frontends.YardFrontend.GrammarParser -pos Source.Position -token Source.t" > log.txt

Fix YaccConstructor.exe location

Fix YaccConstructor.exe location


@ECHO OFF
REM Copyright (c) 2009 The Chromium Authors. All rights reserved.
REM Use of this source code is governed by a BSD-style license that can be
REM found in the LICENSE file.
REM
REM Purpose of this file: If you have IE9 on your machine, not all of
REM the Chrome Frame tests will currently pass. To run the tests on
REM a VM or separate machine, you need to copy a bunch of things over
REM (the tests run slowly or flakily over a network drive).
REM
REM To facilitate running the tests on a separate machine, Run this
REM batch file on a VM or a separate machine, that has a drive mapped
REM to your dev machine (so that it can access your dev workspace).
REM
REM Before running this file, you need to build all the chrome_frame
REM targets plus chrome.dll and chrome.exe on your dev machine. Run
REM the copy of this file that exists in the same workspace that you
REM want to test.
REM
REM NOTE: I've seen cases where a Vista VM under Virtual PC will fail
REM to copy all of the files from the dev machine, and doing e.g.
REM [ dir j:\src\chrome\src\chrome\debug ] (assuming j:\src\chrome\src
REM is your workspace on the dev machine) shows an empty filing listing
REM when run from the VM, whereas your workspace actually just built
REM a ton of stuff in that directory. Just be aware of it, and check
REM what files you actually have in the local copy on the VM after
REM running this script. If you encounter this issue, a reboot of the
REM VM seems to help.
REM
REM ALSO NOTE: At least one test
REM (ChromeFrameTestWithWebServer.FullTabModeIE_TestPostReissue) fails
REM until you choose "never show again" in the "did you notice the
REM infobar" dialog that IE shows, at least if you're running IE7.

if (%1)==() goto usage

setlocal
set CLIENT_ROOT=%~dp0%..\..
set CONFIG=%1

if (%2)==() goto setdefaultbase
if (%3)==() goto usage
set DRIVE=%2
set INSTALL_ROOT=%3
goto pastbase
:setdefault
set DRIVE=c:
set INSTALL_ROOT=\trybot
:pastbase

@ECHO ON
%DRIVE%
mkdir %INSTALL_ROOT%
cd %INSTALL_ROOT%
rmdir /s /q base
rmdir /s /q build\%CONFIG%
rmdir /s /q chrome_frame
mkdir base
mkdir build\%CONFIG%
mkdir chrome_frame\test\data
mkdir chrome_frame\test\html_util_test_data
copy %CLIENT_ROOT%\base\base_paths_win.cc base\base_paths_win.cc
xcopy %CLIENT_ROOT%\build\%CONFIG% build\%CONFIG% /E /EXCLUDE:%CLIENT_ROOT%\chrome_frame\test\poor_mans_trybot_xcopy_filter.txt
xcopy %CLIENT_ROOT%\chrome_frame\test\data chrome_frame\test\data /E
xcopy %CLIENT_ROOT%\chrome_frame\test\html_util_test_data chrome_frame\test\html_util_test_data /E
copy %CLIENT_ROOT%\chrome_frame\CFInstance.js chrome_frame\CFInstance.js
copy %CLIENT_ROOT%\chrome_frame\CFInstall.js chrome_frame\CFInstall.js
@ECHO OFF
echo ************************************
echo DO THE FOLLOWING IN AN ADMIN PROMPT:
echo ************************************
echo regsvr32 \trybot\build\%CONFIG%\servers\npchrome_frame.dll
echo *********************************
echo THEN DO THIS IN A REGULAR PROMPT:
echo *********************************
echo \trybot\build\%CONFIG%\chrome_frame_unittests.exe
echo \trybot\build\%CONFIG%\chrome_frame_tests.exe
goto end

:usage
echo "Usage: poor_mans_trybot.bat CONFIG [DRIVE INSTALL_ROOT]"

:end

@ECHO OFF
REM Copyright (c) 2009 The Chromium Authors. All rights reserved.
REM Use of this source code is governed by a BSD-style license that can be
REM found in the LICENSE file.
REM
REM Purpose of this file: If you have IE9 on your machine, not all of
REM the Chrome Frame tests will currently pass. To run the tests on
REM a VM or separate machine, you need to copy a bunch of things over
REM (the tests run slowly or flakily over a network drive).
REM
REM To facilitate running the tests on a separate machine, Run this
REM batch file on a VM or a separate machine, that has a drive mapped
REM to your dev machine (so that it can access your dev workspace).
REM
REM Before running this file, you need to build all the chrome_frame
REM targets plus chrome.dll and chrome.exe on your dev machine. Run
REM the copy of this file that exists in the same workspace that you
REM want to test.
REM
REM NOTE: I've seen cases where a Vista VM under Virtual PC will fail
REM to copy all of the files from the dev machine, and doing e.g.
REM [ dir j:\src\chrome\src\chrome\debug ] (assuming j:\src\chrome\src
REM is your workspace on the dev machine) shows an empty filing listing
REM when run from the VM, whereas your workspace actually just built
REM a ton of stuff in that directory. Just be aware of it, and check
REM what files you actually have in the local copy on the VM after
REM running this script. If you encounter this issue, a reboot of the
REM VM seems to help.
REM
REM ALSO NOTE: At least one test
REM (ChromeFrameTestWithWebServer.FullTabModeIE_TestPostReissue) fails
REM until you choose "never show again" in the "did you notice the
REM infobar" dialog that IE shows, at least if you're running IE7.

if (%1)==() goto usage

setlocal
set CLIENT_ROOT=%~dp0%..\..
set CONFIG=%1

if (%2)==() goto setdefault
if (%3)==() goto usage
set DRIVE=%2
set INSTALL_ROOT=%3
goto pastbase
:setdefault
set DRIVE=c:
set INSTALL_ROOT=\trybot
:pastbase

@ECHO ON
%DRIVE%
mkdir %INSTALL_ROOT%
cd %INSTALL_ROOT%
rmdir /s /q base
rmdir /s /q build\%CONFIG%
rmdir /s /q chrome_frame
mkdir base
mkdir build\%CONFIG%
mkdir chrome_frame\test\data
mkdir chrome_frame\test\html_util_test_data
copy %CLIENT_ROOT%\base\base_paths_win.cc base\base_paths_win.cc
xcopy %CLIENT_ROOT%\build\%CONFIG% build\%CONFIG% /E /EXCLUDE:%CLIENT_ROOT%\chrome_frame\test\poor_mans_trybot_xcopy_filter.txt
xcopy %CLIENT_ROOT%\chrome_frame\test\data chrome_frame\test\data /E
xcopy %CLIENT_ROOT%\chrome_frame\test\html_util_test_data chrome_frame\test\html_util_test_data /E
copy %CLIENT_ROOT%\chrome_frame\CFInstance.js chrome_frame\CFInstance.js
copy %CLIENT_ROOT%\chrome_frame\CFInstall.js chrome_frame\CFInstall.js
@ECHO OFF
echo ************************************
echo DO THE FOLLOWING IN AN ADMIN PROMPT:
echo ************************************
echo regsvr32 \trybot\build\%CONFIG%\servers\npchrome_frame.dll
echo *********************************
echo THEN DO THIS IN A REGULAR PROMPT:
echo *********************************
echo \trybot\build\%CONFIG%\chrome_frame_unittests.exe
echo \trybot\build\%CONFIG%\chrome_frame_tests.exe
goto end

:usage
echo "Usage: poor_mans_trybot.bat CONFIG [DRIVE INSTALL_ROOT]"

:end

Fix typo in poor man's trybot.

Fix typo in poor man's trybot.

TBR=grt@chromium.org
BUG=none

Review URL: http://codereview.chromium.org/8754002

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@112272 0039d316-1c4b-4281-b951-d872f2087c98


@REM Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
@REM watchmedo.bat
@echo off
set SCRIPT_ERRORLEVEL=
if "%OS%" == "Windows_NT" goto WinNT

@REM Windows 9x/Me you better not have more than 9 arguments.
python watchmedo %1 %2 %3 %4 %5 %6 %7 %8 %9
@REM No way to set exit status of this script for 9x/Me
goto endscript

@REM Windows NT+
:WinNT
setlocal
set path=%~dp0;%~dp0..;%path%
python watchmedo %*
endlocal & set SCRIPT_ERRORLEVEL=%ERRORLEVEL%

if not "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto returncode
if errorlevel 9009 echo You do not have python in your PATH environment variable.
goto endscript

:returncode
exit /B %SCRIPT_ERRORLEVEL%

:endscript
call :returncode %SCRIPT_ERRORLEVEL%

Add a wrapper .bat script for the watchmedo command.

Signed-off-by: Gora Khargosh <a2078c57e3ac12c6dfb97b7c2c4e6d6d7db7e92f@gmail.com>


@echo off
set config=MinSizeRel
mkdir cmake-build\msvc_win64
cd    cmake-build\msvc_win64
cmake -G "Visual Studio 16 2019" -A x64 ..\..
cmake --build . --config %config% --target covscript
cmake --build . --config %config% --target covscript_debug
cmake --build . --config %config% --target cs
cmake --build . --config %config% --target cs_dbg
cd ..\..
rd /S /Q build
mkdir build\bin
mkdir build\lib
xcopy /Y cmake-build\msvc_win64\%config%\*.exe build\bin\
xcopy /Y cmake-build\msvc_win64\%config%\*.lib build\lib\
rd /S /Q csdev
mkdir csdev\include\covscript
mkdir csdev\lib
xcopy /E /Y include\covscript csdev\include\covscript
xcopy /E /Y build\lib         csdev\lib\

@echo off
set config=MinSizeRel
mkdir cmake-build\msvc_win64
cd    cmake-build\msvc_win64
cmake -G "Visual Studio 17 2022" -A x64 ..\..
cmake --build . --config %config% --target covscript
cmake --build . --config %config% --target covscript_debug
cmake --build . --config %config% --target cs
cmake --build . --config %config% --target cs_dbg
cd ..\..
rd /S /Q build
mkdir build\bin
mkdir build\lib
xcopy /Y cmake-build\msvc_win64\%config%\*.exe build\bin\
xcopy /Y cmake-build\msvc_win64\%config%\*.lib build\lib\
rd /S /Q csdev
mkdir csdev\include\covscript
mkdir csdev\lib
xcopy /E /Y include\covscript csdev\include\covscript
xcopy /E /Y build\lib         csdev\lib\

Update make_msvc_win64.bat

Update make_msvc_win64.bat


SET bin_dir=%~dp0
SET TOP_DIR=%bin_dir%\..\..\
SET build_type=%1
SET build_dir=%~f2

IF "%build_type%" EQU "" SET build_type=Debug

IF "%build_dir%" EQU "" (
    CALL %bin_dir%\echoc.exe 4 please specify build_dir
    GOTO error
)

IF NOT EXIST %build_dir% (
    CALL %bin_dir%\echoc.exe 4 %build_dir% does not exist
    GOTO error
)

CALL %bin_dir%\echoc.exe 2 run the tests here ...

:: set the path of built binaries
SET DSN_TMP_BUILD_DIR_IN_PATH=
@FOR %%P in ("%Path:;=";"%") DO @IF /I %%P=="%build_dir%\bin\%build_type%" SET DSN_TMP_BUILD_DIR_IN_PATH=true
:: SET DSN_TMP_OLD_PATH=%Path%
IF NOT DEFINED DSN_TMP_BUILD_DIR_IN_PATH SET Path=%build_dir%\bin\%build_type%;%build_dir%\lib;%Path%
SET DSN_TMP_BUILD_DIR_IN_PATH=

:: run dll-embedded unit tests
SET DSN_TEST_HOST=%DSN_ROOT:/=\%\bin\dsn.svchost.exe
IF EXIST "%build_dir%\bin\dsn.svchost\%build_type%\dsn.svchost.exe"  SET DSN_TEST_HOST=%build_dir%\bin\dsn.svchost\%build_type%\dsn.svchost.exe

FOR /D %%A IN (%build_dir%\test\*) DO (
    IF EXIST %%A\gtests (
        pushd %%A
        FOR /F %%I IN (%%A\gtests) DO (
            IF EXIST %%A (
                ECHO =========== %DSN_TEST_HOST% %%I ======================
                CALL %DSN_TEST_HOST% %%I
                IF ERRORLEVEL 1 popd && echo test %%I failed && goto error
            )
        )
        popd
    )
)

:: run e-e tests
FOR /D %%A IN (%build_dir%\bin\*) DO (
    IF EXIST %%A\test.cmd (
        pushd %%A
        ECHO ================= %%A\test.cmd ================================
        CALL test.cmd %TOP_DIR% %build_type% %build_dir%
        IF ERRORLEVEL 1 popd && echo test %%A failed && goto error
        popd
    )
)

goto exit

:error
    CALL %bin_dir%\echoc.exe 4  "Usage: run.cmd test build_type(Debug|Release|RelWithDebInfo|MinSizeRel) build_dir"
    exit -1

:exit
    exit /b 0

SET bin_dir=%~dp0
SET TOP_DIR=%bin_dir%\..\..\
SET build_type=%1
SET build_dir=%~f2

IF "%build_type%" EQU "" SET build_type=Debug

IF "%build_dir%" EQU "" (
    CALL %bin_dir%\echoc.exe 4 please specify build_dir
    GOTO error
)

IF NOT EXIST %build_dir% (
    CALL %bin_dir%\echoc.exe 4 %build_dir% does not exist
    GOTO error
)

CALL %bin_dir%\echoc.exe 2 run the tests here ...

:: set the path of built binaries
SET DSN_TMP_BUILD_DIR_IN_PATH=
@FOR %%P in ("%Path:;=";"%") DO @IF /I %%P=="%build_dir%\bin\%build_type%" SET DSN_TMP_BUILD_DIR_IN_PATH=true
:: SET DSN_TMP_OLD_PATH=%Path%
IF NOT DEFINED DSN_TMP_BUILD_DIR_IN_PATH SET Path=%build_dir%\bin\%build_type%;%build_dir%\lib;%Path%
SET DSN_TMP_BUILD_DIR_IN_PATH=

:: run dll-embedded unit tests
SET DSN_TEST_HOST=%DSN_ROOT:/=\%\bin\dsn.svchost.exe
IF EXIST "%build_dir%\bin\dsn.svchost\%build_type%\dsn.svchost.exe"  SET DSN_TEST_HOST=%build_dir%\bin\dsn.svchost\%build_type%\dsn.svchost.exe

FOR /D %%A IN (%build_dir%\test\*) DO (
    IF EXIST %%A\gtests (
        pushd %%A
        FOR /F %%I IN (%%A\gtests) DO (
            IF EXIST %%A (
                ECHO =========== %DSN_TEST_HOST% %%I ======================
                CALL %DSN_TEST_HOST% %%I
                IF ERRORLEVEL 1 popd && echo test %%I failed && goto error
            )
        )
        popd
    )
)

:: run e-e tests
FOR /D %%A IN (%build_dir%\bin\*) DO (
    IF EXIST %%A\test.cmd (
        pushd %%A
        ECHO ================= %%A\test.cmd ================================
        CALL test.cmd %TOP_DIR% %build_type% %build_dir%
        IF ERRORLEVEL 1 popd && echo test %%A failed && goto error
        popd
    )
)

goto exit

:error
    CALL %bin_dir%\echoc.exe 4  "Usage: run.cmd test build_type(Debug|Release|RelWithDebInfo|MinSizeRel) build_dir"
    exit /B -1

:exit
    exit /B 0

Add '/B' to exit to avoid exiting the CMD.exe


::##############################################################################
::
:: Copyright 2014, ACSE & CADIEEL
::    ACSE   : http://www.sase.com.ar/asociacion-civil-sistemas-embebidos/ciaa/
::    CADIEEL: http://www.cadieel.org.ar
::
:: This file is part of CIAA Firmware.
::
:: Redistribution and use in source and binary forms, with or without
:: modification, are permitted provided that the following conditions are met:
::
:: 1. Redistributions of source code must retain the above copyright notice,
::    this list of conditions and the following disclaimer.
::
:: 2. Redistributions in binary form must reproduce the above copyright notice,
::    this list of conditions and the following disclaimer in the documentation
::    and/or other materials provided with the distribution.
::
:: 3. Neither the name of the copyright holder nor the names of its
::    contributors may be used to endorse or promote products derived from this
::    software without specific prior written permission.
::
:: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
:: AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
:: IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
:: ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
:: LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
:: CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
:: SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
:: INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
:: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
:: ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
:: POSSIBILITY OF SUCH DAMAGE.
::
::##############################################################################
@echo off
CD %~dp0
set PATH=%CD%;%PATH%
set LOCALFILE=eclipse-cdt.zip
set LOCALDIR=eclipse-cdt
set LOCALJRE=jre.tar.gz
set ECLIPSE_INSTDIR=%CD%\cygwin\usr\local\
set ECLIPSEPKGS=ilg.gnuarmeclipse.debug.gdbjtag.openocd,ilg.gnuarmeclipse.managedbuild.cross
set ECLIPSEREPOS= http://download.eclipse.org/releases/kepler,http://gnuarmeclipse.sourceforge.net/updates
set ECLPISEURL=http://mirrors.ibiblio.org/pub/mirrors/eclipse/technology/epp/downloads/release/luna/R/eclipse-cpp-luna-R-win32.zip
set JREURL=http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jre-8u20-windows-i586.tar.gz
call get-tools.bat
if not exist %LOCALFILE% (
	echo Download eclipse
	wget %ECLPISEURL% -O %LOCALFILE%
)
if not exist %ECLIPSE_INSTDIR%\eclipse (
	echo Uncompress eclipse
	unzip %LOCALFILE% -d %ECLIPSE_INSTDIR%
)
if  not exist %LOCALJRE% (
	echo Download jre
	wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" %JREURL% -O %LOCALJRE%
)
if  not exist %ECLIPSE_INSTDIR%\eclipse\jre (
	echo Uncompress jre
	gunzip -c %LOCALJRE% > tmp.tar
	tar -x -f tmp.tar
	move jre1.8.0_20 %ECLIPSE_INSTDIR%\eclipse\jre
	del/Q tmp.tar
)
if not exist %ECLIPSE_INSTDIR%\eclipse\plugins\ilg.gnuarmeclipse.managedbuild.cross* (
	echo Install eclipse plugins
	%ECLIPSE_INSTDIR%\eclipse\eclipse -clean -purgeHistory -nosplash -consolelog -application org.eclipse.equinox.p2.director -repository %ECLIPSEREPOS% -installIU %ECLIPSEPKGS%
)
if exist %ECLIPSE_INSTDIR%\eclipse\plugins\org.eclipse.platform_* (
	for /f "delims=" %%a in ('dir %ECLIPSE_INSTDIR%\eclipse\plugins\org.eclipse.platform_"*" /on /ad /b') do @set ECLIPSE_SPLASH_FOLDER=%%a
	echo Replacing Eclipse splash.bmp
	copy /y "%CD%\Images\splash.bmp" "%ECLIPSE_INSTDIR%\eclipse\plugins\%ECLIPSE_SPLASH_FOLDER%\splash.bmp"
)

Update eclipse-dl.bat,

Update eclipse-dl.bat,

Copy Splash.bmp on plugins folder only if exist.


@ECHO OFF
SETLOCAL
	:: SETLOCAL is on, so changes to the path not persist to the actual user's path

SET toolsFolder=%CD%\tools\
ECHO Current folder: %CD%

SET nodeVersion=6.11.2

SET nodeFileName=node-v%nodeVersion%-win-x86.7z
SET nodeExtractFolder=%toolsFolder%node.js.%nodeVersion%

SET nuGetExecutable=%CD%\tools\nuget.exe
IF NOT EXIST "%nuGetExecutable%" (
	ECHO Downloading https://dist.nuget.org/win-x86-commandline/latest/nuget.exe to %nuGetExecutable%
	powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '%nuGetExecutable%')"
)

:: We need 7za.exe for BuildBelle.bat
IF NOT EXIST "%toolsFolder%7za.exe" (
	ECHO 7zip not found - fetching now
	"%nuGetExecutable%" install 7-Zip.CommandLine -OutputDirectory tools -Verbosity quiet
)

:: Put 7za.exe and vswhere.exe in a predictable path (not version specific)
FOR /f "delims=" %%A in ('dir "%toolsFolder%7-Zip.CommandLine.*" /b') DO SET "sevenZipExePath=%toolsFolder%%%A\"
MOVE "%sevenZipExePath%tools\7za.exe" "%toolsFolder%7za.exe"

IF NOT EXIST "%nodeExtractFolder%" (
	ECHO Downloading http://nodejs.org/dist/v%nodeVersion%/%nodeFileName% to %toolsFolder%%nodeFileName%
	powershell -Command "(New-Object Net.WebClient).DownloadFile('http://nodejs.org/dist/v%nodeVersion%/%nodeFileName%', '%toolsFolder%%nodeFileName%')"
	ECHO Extracting %nodeFileName% to %nodeExtractFolder%
	"%toolsFolder%\7za.exe" x "%toolsFolder%\%nodeFileName%" -o"%nodeExtractFolder%" -aos > nul
)
FOR /f "delims=" %%A in ('dir "%nodeExtractFolder%\node*" /b') DO SET "nodePath=%nodeExtractFolder%\%%A"

:build
    ECHO Adding Node to path
    REM SETLOCAL is on, so changes to the path not persist to the actual user's path
    PATH="%nodePath%";%PATH%

    ECHO Node version is:
    call node -v

    ECHO npm version is:
    call npm -v

    SET buildFolder=%CD%

    ECHO Change directory to %CD%\..\src\Umbraco.Web.UI.Client\
    CD %CD%\..\src\Umbraco.Web.UI.Client\

    ECHO Do npm install and the gulp build of Belle

    ECHO Clean npm cache
    call npm cache clean --quiet

	ECHO Installing gulp
	call npm install -g gulp --quiet
	ECHO Installing gulp cli
    call npm install -g gulp-cli --quiet
    ECHO Installing bower
    call npm install -g bower --quiet
    ECHO Doing npm install
    call npm install --quiet
    ECHO Executing gulp build
    call gulp build --buildversion=%release%

    ECHO Move back to the build folder
    CD "%buildFolder%"

@ECHO OFF
SETLOCAL
	:: SETLOCAL is on, so changes to the path not persist to the actual user's path

SET toolsFolder=%CD%\tools\
ECHO Current folder: %CD%

SET nodeVersion=6.11.2

SET nodeFileName=node-v%nodeVersion%-win-x86.7z
SET nodeExtractFolder=%toolsFolder%node.js.%nodeVersion%

SET nuGetExecutable=%CD%\tools\nuget.exe
IF NOT EXIST "%nuGetExecutable%" (
	ECHO Downloading https://dist.nuget.org/win-x86-commandline/latest/nuget.exe to %nuGetExecutable%
	powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '%nuGetExecutable%')"
)

:: We need 7za.exe for BuildBelle.bat
IF NOT EXIST "%toolsFolder%7za.exe" (
	ECHO 7zip not found - fetching now
	"%nuGetExecutable%" install 7-Zip.CommandLine -OutputDirectory tools -Verbosity quiet
)

:: Put 7za.exe and vswhere.exe in a predictable path (not version specific)
FOR /f "delims=" %%A in ('dir "%toolsFolder%7-Zip.CommandLine.*" /b') DO SET "sevenZipExePath=%toolsFolder%%%A\"
MOVE "%sevenZipExePath%tools\7za.exe" "%toolsFolder%7za.exe"

IF NOT EXIST "%nodeExtractFolder%" (
	ECHO Downloading http://nodejs.org/dist/v%nodeVersion%/%nodeFileName% to %toolsFolder%%nodeFileName%
	powershell -Command "(New-Object Net.WebClient).DownloadFile('http://nodejs.org/dist/v%nodeVersion%/%nodeFileName%', '%toolsFolder%%nodeFileName%')"
	ECHO Extracting %nodeFileName% to %nodeExtractFolder%
	"%toolsFolder%\7za.exe" x "%toolsFolder%\%nodeFileName%" -o"%nodeExtractFolder%" -aos > nul
)
FOR /f "delims=" %%A in ('dir "%nodeExtractFolder%\node*" /b') DO SET "nodePath=%nodeExtractFolder%\%%A"

:build
    ECHO Adding Node to path
    REM SETLOCAL is on, so changes to the path not persist to the actual user's path
    PATH="%nodePath%";%PATH%

    ECHO Node version is:
    call node -v

    ECHO npm version is:
    call npm -v

    SET buildFolder=%CD%

    ECHO Change directory to %CD%\..\src\Umbraco.Web.UI.Client\
    CD %CD%\..\src\Umbraco.Web.UI.Client\

    ECHO Clean npm cache
    call npm cache clean

    ECHO Installing bower
    call npm install -g bower

    ECHO Installing gulp & gulp cli
    call npm install -g gulp
    call npm install -g gulp-cli

    ECHO Executing npm install
    call npm install

    ECHO Do gulp build of Belle
    call gulp build --buildversion=%release%

    ECHO Move back to the build folder
    CD "%buildFolder%"

Fix up BuildBelle.bat

Fix up BuildBelle.bat


@echo off
echo Batch File encodes a sequence of png files into mpeg-4 video using FFmpeg
:
REM File name: png2mpg4.bat
REM Ron Fredericks, LectureMaker LLC, http://www.LectureMaker.com
:
REM Files of the form: bst_graph00001.png, counting up.
REM Frame rate set to 1 seconds per frame on input and 12 fps on output.
REM Output video will reside in the same directory as the PNG sequence images.
REM Note the use of a double %% to encode sequence numbers in this batch file,
REM      use only one % outside of the batch file.
:
REM ffmpg parameters used:
REM	-f image2 forces input to image file demuxer, creating video from many images, following a pattern
REM	-r 1 indicates reading input at 1 second for each png file
REM	-start_number 00001 is the start number for the png file sequence
REM	-i bst_graph%%05d.png is the input pattern for the png file image sequence (numbers are 5 digits long)
REM	-b:v 5000k is a high quality bitrate for video on output
REM	-vcodec mpeg4 is the video codec
REM	-r 30 is the frame rate for the video on output
REM	-vf scale=720:480 is the video filter to scale output to a normal size of 720x480
REM	-y overides output file without asking
REM	movie.mp4 is the output file name
:
@echo on
cd .\vidImages
ffmpeg -f image2 -r 1 -start_number 00001 -i bst_graph%%05d.png  -b:v 5000k -vcodec mpeg4 -r 30 -vf scale=720:480 -y movie.mp4
@echo off
:

Create png2mpg4.bat

Create png2mpg4.bat

Batch file to automate FFmpeg utility to create mpg4 video from png image sequences.


@if not defined _echo @echo off
setlocal
:: To run tests outside of MSBuild.exe
:: %1 is the path to the bin\<OSConfig> folder
:: %2 is the path to the tools\testdotnetcli folder

set LOCATION=%1
set RUNTIME_PATH=%2

if "%LOCATION%" == "" set LOCATION=%~dp0\bin\Windows_NT.AnyCPU.Debug
if "%RUNTIME_PATH%" == "" set RUNTIME_PATH=%~dp0\Tools\testdotnetcli

pushd %LOCATION%

FOR /D %%F IN (*.Tests) DO (
	IF EXIST %%F\netcoreapp (
		pushd %%F\netcoreapp
                @echo Looking in %cd%...
		IF EXIST RunTests.cmd (
                        @echo ... found tests
			CALL RunTests.cmd %RUNTIME_PATH%
		)
		popd
	)
)

popd

@if not defined _echo @echo off
setlocal
:: To run tests outside of MSBuild.exe
:: %1 is the path to the bin\<OSConfig> folder
:: %2 is the path to the tools\testdotnetcli folder

set LOCATION=%1
set RUNTIME_PATH=%2

if "%LOCATION%" == "" set LOCATION=%~dp0\bin\Windows_NT.AnyCPU.Debug
if "%RUNTIME_PATH%" == "" set RUNTIME_PATH=%~dp0\bin\runtime\netcoreapp-Windows_NT-Debug-x64

pushd %LOCATION%

FOR /D %%F IN (*.Tests) DO (
	IF EXIST %%F\netcoreapp (
		pushd %%F\netcoreapp
                @echo Looking in %cd%...
		IF EXIST RunTests.cmd (
                        @echo ... found tests
			CALL RunTests.cmd %RUNTIME_PATH%
		)
		popd
	)
)

popd

Fix path referenced in run-test.cmd

Fix path referenced in run-test.cmd


SETLOCAL

rem # copy off the timestamp for fingerprinting before we blow it away later
move %BUILD_NUMBER%\build_timestamp %WORKSPACE%\

rem # run the tests
cd %BUILD_NUMBER%

rem # remove the chef package / clobber the files
rem # then install the new package
rmdir /S /Q C:\opscode
FOR %%i IN (pkg\chef*.msi) DO SET omnibus_package=%%i
call msiexec INSTALLLOCATION=C:\opscode /qb /i %omnibus_package% || GOTO :error

rem # extract the chef source code
mkdir src\chef
FOR %%i IN (src\chef*.tar.gz) DO SET omnibus_source_tarball=%%i
call C:\opscode\chef\bin\tar.exe xvzf %omnibus_source_tarball% -C src\chef || GOTO :error

rem # COMPAT HACK - Chef 11 finally has the core Chef code in the root of the
rem # project repo. Since the Chef Client pipeline needs to build/test Chef 10.x
rem # and 11 releases our test script need to handle both cases gracefully.
IF EXIST .\src\chef\chef (
  cd .\src\chef\chef
) ELSE (
  cd .\src\chef
)

rem # install all of the development gems
mkdir .\bundle
set PATH=C:\opscode\chef\bin;C:\opscode\chef\embedded\bin;%PATH%
call bundle install --without server --path bundle || GOTO :error

rem # run the tests
call bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o %WORKSPACE%\test.xml -f documentation spec || GOTO :error

rem # uninstall chef
call msiexec /qb /x %omnibus_package% || GOTO :error

rem # clean up the workspace to save disk space
cd %WORKSPACE%
rmdir /S /Q %BUILD_NUMBER%

GOTO :EOF

:error
ECHO Failed with error level %errorlevel%

rem # uninstall chef
call msiexec /qb /x %omnibus_package% || GOTO :error

ENDLOCAL

SETLOCAL

rem # copy off the timestamp for fingerprinting before we blow it away later
move %BUILD_NUMBER%\build_timestamp %WORKSPACE%\

rem # run the tests
cd %BUILD_NUMBER%

rem # remove the chef package / clobber the files
rem # then install the new package
rmdir /S /Q C:\opscode
FOR %%i IN (pkg\chef*.msi) DO SET omnibus_package=%%i
call msiexec INSTALLLOCATION=C:\opscode /qb /i %omnibus_package% || GOTO :error

rem # extract the chef source code
mkdir src\chef
FOR %%i IN (src\chef*.tar.gz) DO SET omnibus_source_tarball=%%i
call C:\opscode\chef\bin\tar.exe xvzf %omnibus_source_tarball% -C src\chef || GOTO :error

rem # COMPAT HACK - Chef 11 finally has the core Chef code in the root of the
rem # project repo. Since the Chef Client pipeline needs to build/test Chef 10.x
rem # and 11 releases our test script need to handle both cases gracefully.
IF EXIST .\src\chef\chef (
  cd .\src\chef\chef
) ELSE (
  cd .\src\chef
)

rem # install all of the development gems
mkdir .\bundle
set PATH=C:\opscode\chef\bin;C:\opscode\chef\embedded\bin;%PATH%
call bundle install --without server --path bundle || GOTO :error

rem # run the tests
call bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o %WORKSPACE%\test.xml -f documentation spec || GOTO :error

rem # uninstall chef
call msiexec /qb /x %omnibus_package% || GOTO :error

rem # clean up the workspace to save disk space
cd %WORKSPACE%
rmdir /S /Q %BUILD_NUMBER%

GOTO :EOF

:error
ECHO Failed with error level %errorlevel%

rem # uninstall chef
call msiexec /qb /x %omnibus_package%

ENDLOCAL

Fix the inf loop while trying to uninstall in the error case.


@ECHO off
rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem
rem
rem Purpose: This starts jenkinsbild through cygwin on windows.
rem
rem $Id$
rem
rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem

ECHO jenkinsbild.bat: ========= EXECUTING jenkinsbild.bat ========
ECHO jenkinsbild.bat: ========= EXECUTING jenkinsbild.bat ======== > jenkinsbild.log
ECHO jenkinsbild.bat: starting up in %CD% with arguments, %*.
ECHO jenkinsbild.bat: starting up in %CD% with arguments, %*. >> jenkinsbild.log
ECHO jenkinsbild.bat: ++++++JENKINS VARIABLES++++++
ECHO jenkinsbild.bat: ++++++JENKINS VARIABLES++++++ >> jenkinsbild.log
ECHO jenkinsbild.bat: JENKINS_HOME=%JENKINS_HOME%
ECHO jenkinsbild.bat: JENKINS_HOME=%JENKINS_HOME% >> jenkinsbild.log
ECHO jenkinsbild.bat: JOB_NAME=%JOB_NAME%
ECHO jenkinsbild.bat: JOB_NAME=%JOB_NAME% >> jenkinsbild.log
ECHO jenkinsbild.bat: BUILD_ID=%BUILD_ID%
ECHO jenkinsbild.bat: BUILD_ID=%BUILD_ID% >> jenkinsbild.log
ECHO jenkinsbild.bat: BUILD_TAG=%BUILD_TAG%
ECHO jenkinsbild.bat: BUILD_TAG=%BUILD_TAG% >> jenkinsbild.log
ECHO jenkinsbild.bat: JAVA_HOME=%JAVA_HOME%
ECHO jenkinsbild.bat: JAVA_HOME=%JAVA_HOME% >> jenkinsbild.log
ECHO jenkinsbild.bat: WORKSPACE=%WORKSPACE%
ECHO jenkinsbild.bat: WORKSPACE=%WORKSPACE% >> jenkinsbild.log
ECHO jenkinsbild.bat: +++++++++++++++++++++++++++++
ECHO jenkinsbild.bat: +++++++++++++++++++++++++++++ >> jenkinsbild.log

REM JOB_NAME contains <JOB>\<NODES>=<NODE>
for /f "tokens=1 delims=/" %%A in ("%JOB_NAME%") do set JOB_LINK=%%A
echo jenkinsbild.bat: JOB Part of JOB_NAME=%JOB_LINK%
echo jenkinsbild.bat: JOB Part of JOB_NAME=%JOB_LINK% >> jenkinsbild.log

for %%A in ("%CD%") do set drive=%%~dA
set JOB_LINK=%drive%\%JOB_LINK%
echo jenkinsbild.bat: Adding drive letter... JOB_LINK=%JOB_LINK%
echo jenkinsbild.bat: Adding drive letter... JOB_LINK=%JOB_LINK% >> jenkinsbild.log
REM Jenkins workspace variable has forward slashes, but
REM we need a windows path, so we convert
set JENKINS_WSPATH=%WORKSPACE%
set JENKINS_WSPATH=%JENKINS_WSPATH:/=\%

REM If workspace path doesn't contain drive letter
REM then we add the current drive letter to the path.
set foundcolon=false
set teststr=%JENKINS_WSPATH%
if not x%teststr::=%==x%teststr% set foundcolon=true
if "%foundcolon%"=="false" (
  echo jenkinsbild.bat: Adding drive, %drive%, to WS path.
  echo jenkinsbild.bat: Adding drive, %drive%, to WS path. >> jenkinsbild.log
  set JENKINS_WSPATH=%drive%%JENKINS_WSPATH%
)
echo jenkinsbild.bat: JENKINS_WSPATH=%JENKINS_WSPATH%
echo jenkinsbild.bat: JENKINS_WSPATH=%JENKINS_WSPATH% >> jenkinsbild.log

if exist %JOB_LINK% goto linkexistscontinue
  echo jenkinsbild.bat: %JOB_LINK% does not exist.  Executing mklink /D %JOB_LINK% %JENKINS_WSPATH%
  echo jenkinsbild.bat: %JOB_LINK% does not exist.  Executing mklink /D %JOB_LINK% %JENKINS_WSPATH% >> jenkinsbild.log
  echo on
  mklink /D %JOB_LINK% %JENKINS_WSPATH%
  echo off
:linkexistscontinue
if exist %JOB_LINK% goto havelinkcontinue
  echo jenkinsbild.bat: %JOB_LINK% still does not exist.
  echo jenkinsbild.bat: %JOB_LINK% still does not exist. >> jenkinsbild.log
:havelinkcontinue
if not exist %JOB_LINK% goto nothavelinkcontinue
  echo jenkinsbild.bat: %JOB_LINK% exists.
  echo jenkinsbild.bat: %JOB_LINK% exists. >> jenkinsbild.log
:nothavelinkcontinue
set JENKINS_JOB_DIR=%JOB_LINK%
cd %JOB_LINK%

ECHO jenkinsbild.bat: Working in %CD%.
ECHO jenkinsbild.bat: Working in %CD%. >> jenkinsbild.log

C:\CYGWIN\bin\cygpath %CD% >temp.txt
REM C:\CYGWIN\bin\cygpath %JOB_LINK% >temp.txt
set /p CYGWINDIR= < temp.txt
echo jenkinsbild.bat: CYGWINDIR = %CYGWINDIR%.
echo jenkinsbild.bat: CYGWINDIR = %CYGWINDIR%.  >> jenkinsbild.log
del temp.txt
set JBILDERR=0
@ECHO on
C:\CYGWIN\bin\bash --login %CYGWINDIR%/bilder/jenkins/jenkinsbild %*
@ECHO off
if ERRORLEVEL 1 set JBILDERR=1

ECHO jenkinsbild.bat: completed with error = %JBILDERR%.
ECHO jenkinsbild.bat: completed with error = %JBILDERR%. >> jenkinsbild.log

EXIT /B %JBILDERR%

@ECHO off
rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem
rem
rem Purpose: This starts jenkinsbild through cygwin on windows.
rem
rem $Id$
rem
rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem rem

ECHO jenkinsbild.bat: ========= EXECUTING jenkinsbild.bat ========
ECHO jenkinsbild.bat: ========= EXECUTING jenkinsbild.bat ======== > jenkinsbild.log
ECHO jenkinsbild.bat: starting up in %CD% with arguments, %*.
ECHO jenkinsbild.bat: starting up in %CD% with arguments, %*. >> jenkinsbild.log
ECHO jenkinsbild.bat: ++++++JENKINS VARIABLES++++++
ECHO jenkinsbild.bat: ++++++JENKINS VARIABLES++++++ >> jenkinsbild.log
ECHO jenkinsbild.bat: JENKINS_HOME=%JENKINS_HOME%
ECHO jenkinsbild.bat: JENKINS_HOME=%JENKINS_HOME% >> jenkinsbild.log
ECHO jenkinsbild.bat: JOB_NAME=%JOB_NAME%
ECHO jenkinsbild.bat: JOB_NAME=%JOB_NAME% >> jenkinsbild.log
ECHO jenkinsbild.bat: BUILD_ID=%BUILD_ID%
ECHO jenkinsbild.bat: BUILD_ID=%BUILD_ID% >> jenkinsbild.log
ECHO jenkinsbild.bat: BUILD_TAG=%BUILD_TAG%
ECHO jenkinsbild.bat: BUILD_TAG=%BUILD_TAG% >> jenkinsbild.log
ECHO jenkinsbild.bat: JAVA_HOME=%JAVA_HOME%
ECHO jenkinsbild.bat: JAVA_HOME=%JAVA_HOME% >> jenkinsbild.log
ECHO jenkinsbild.bat: WORKSPACE=%WORKSPACE%
ECHO jenkinsbild.bat: WORKSPACE=%WORKSPACE% >> jenkinsbild.log
ECHO jenkinsbild.bat: +++++++++++++++++++++++++++++
ECHO jenkinsbild.bat: +++++++++++++++++++++++++++++ >> jenkinsbild.log

REM JOB_NAME contains <JOB>\<NODES>=<NODE>
for /f "tokens=1 delims=/" %%A in ("%JOB_NAME%") do set JOB_LINK=%%A
echo jenkinsbild.bat: JOB Part of JOB_NAME=%JOB_LINK%
echo jenkinsbild.bat: JOB Part of JOB_NAME=%JOB_LINK% >> jenkinsbild.log

for %%A in ("%CD%") do set drive=%%~dA
set JOB_LINK=%drive%\%JOB_LINK%
echo jenkinsbild.bat: Adding drive letter... JOB_LINK=%JOB_LINK%
echo jenkinsbild.bat: Adding drive letter... JOB_LINK=%JOB_LINK% >> jenkinsbild.log
REM Jenkins workspace variable has forward slashes, but
REM we need a windows path, so we convert
set JENKINS_WSPATH=%WORKSPACE%
set JENKINS_WSPATH=%JENKINS_WSPATH:/=\%

REM Jenkins xshell converts forward slashes in arguments to back slashes,
REM but we need forward slashes so undo
set BILDER_ARGS=%*:\=/%

REM If workspace path doesn't contain drive letter
REM then we add the current drive letter to the path.
set foundcolon=false
set teststr=%JENKINS_WSPATH%
if not x%teststr::=%==x%teststr% set foundcolon=true
if "%foundcolon%"=="false" (
  echo jenkinsbild.bat: Adding drive, %drive%, to WS path.
  echo jenkinsbild.bat: Adding drive, %drive%, to WS path. >> jenkinsbild.log
  set JENKINS_WSPATH=%drive%%JENKINS_WSPATH%
)
echo jenkinsbild.bat: JENKINS_WSPATH=%JENKINS_WSPATH%
echo jenkinsbild.bat: JENKINS_WSPATH=%JENKINS_WSPATH% >> jenkinsbild.log

if exist %JOB_LINK% goto linkexistscontinue
  echo jenkinsbild.bat: %JOB_LINK% does not exist.  Executing mklink /D %JOB_LINK% %JENKINS_WSPATH%
  echo jenkinsbild.bat: %JOB_LINK% does not exist.  Executing mklink /D %JOB_LINK% %JENKINS_WSPATH% >> jenkinsbild.log
  echo on
  mklink /D %JOB_LINK% %JENKINS_WSPATH%
  echo off
:linkexistscontinue
if exist %JOB_LINK% goto havelinkcontinue
  echo jenkinsbild.bat: %JOB_LINK% still does not exist.
  echo jenkinsbild.bat: %JOB_LINK% still does not exist. >> jenkinsbild.log
:havelinkcontinue
if not exist %JOB_LINK% goto nothavelinkcontinue
  echo jenkinsbild.bat: %JOB_LINK% exists.
  echo jenkinsbild.bat: %JOB_LINK% exists. >> jenkinsbild.log
:nothavelinkcontinue
set JENKINS_JOB_DIR=%JOB_LINK%
cd %JOB_LINK%

ECHO jenkinsbild.bat: Working in %CD%.
ECHO jenkinsbild.bat: Working in %CD%. >> jenkinsbild.log

C:\CYGWIN\bin\cygpath %CD% >temp.txt
REM C:\CYGWIN\bin\cygpath %JOB_LINK% >temp.txt
set /p CYGWINDIR= < temp.txt
echo jenkinsbild.bat: CYGWINDIR = %CYGWINDIR%.
echo jenkinsbild.bat: CYGWINDIR = %CYGWINDIR%.  >> jenkinsbild.log
del temp.txt
set JBILDERR=0
@ECHO on
C:\CYGWIN\bin\bash --login %CYGWINDIR%/bilder/jenkins/jenkinsbild %BILDER_ARGS
@ECHO off
if ERRORLEVEL 1 set JBILDERR=1

ECHO jenkinsbild.bat: completed with error = %JBILDERR%.
ECHO jenkinsbild.bat: completed with error = %JBILDERR%. >> jenkinsbild.log

EXIT /B %JBILDERR%

Undo xshell conversion of slashes.

Undo xshell conversion of slashes.

git-svn-id: 06aac1f7aa6783202dd435920b98a457d633d0b0@817 a9e16012-fd73-49ee-95cb-036de7809213


mkdir pubdocs
cd pubdocs

git clone https://%1:%2@github.com/SkillsFundingAgency/das-paymentsacceptancetesting.git --branch gh-pages

xcopy ..\das-payments-AcceptanceTests\AcceptanceTests\docs das-paymentsacceptancetesting /E /R /Y

cd das-paymentsacceptancetesting
git add --all
git commit -m "Update docs for release %RELEASE_RELEASENAME%"
git config  user.email "kalim.akbar@fasst.org.uk"
git config  user.name "das build agent"
git push origin gh-pages

mkdir pubdocs
cd pubdocs

git clone https://%1:%2@github.com/SkillsFundingAgency/das-paymentsacceptancetesting.git --branch gh-pages

xcopy ..\das-payments-AcceptanceTests\AcceptanceTests\docs das-paymentsacceptancetesting /E /R /Y

cd das-paymentsacceptancetesting
git add --all
git commit -m "Update docs for release %RELEASE_RELEASENAME%"
git config  --global user.email "kalim.akbar@fasst.org.uk"
git config  --global user.name "build agent"
git push origin gh-pages

Update publishdocs.bat

Update publishdocs.bat


%PYTHON% setup.py install
if errorlevel 1 exit 1

add error handling to bld.bat

add error handling to bld.bat


if "%COMPILER%"=="" SET COMPILER=MSVC2013
if "%PREFIX%"=="" SET PREFIX=d:\libs18d
if "%BOOST_ROOT%"=="" SET BOOST_ROOT=d:\boost
if "%VARIANT%"=="" SET Variant=Debug

set "ER=if ERRORLEVEL 1 exit /b 1"
if "%COMPILER%"=="MINGW" (
  SET "PATH=%PATH%;c:\mingw64\bin"
  SET "MSYSDIR=c:\msys64\usr\bin"
  SET CMAKE_TARGET="MinGW Makefiles"
  SET "CFLAGS=-I%PREFIX:\=/%/include"
  SET "CPPFLAGS=-I%PREFIX:\=/%/include"
  SET "LDFLAGS=-L%PREFIX:\=/%/lib"
  SET "CONFARGS=--prefix=%PREFIX:\=/% --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32"
  set "CMAKE=cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=%VARIANT% -DCMAKE_INSTALL_PREFIX=%PREFIX%"
  SET "MAKEC=mingw32-make"
  SET "SEDC=sed"
  SET GENERATOR="MinGW Makefiles"
  SET PREFIX1=%PREFIX:\=/%
  SET "MSBUILDINSTALL=mingw32-make install"
) else (
  if "%COMPILER%"=="MSVC2008-32"  (
      set MSC_VER=9
      call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
  )
  if "%COMPILER%"=="MSVC2010-32"  (
      set MSC_VER=10
      call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
  )
  if "%COMPILER%"=="MSVC2012"  (
     set MSC_VER=11
     call "%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
  )
  if "%COMPILER%"=="MSVC2013"  (
     set MSC_VER=12
     set "GENERATOR=Visual Studio 12 2013 Win64"
     call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
  )
  if "%COMPILER%"=="MSVC2015"  (
     set MSC_VER=14
     set "GENERATOR= -G"Visual Studio 14 2015 Win64""
     call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
  )
  set "CMAKE=cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%VARIANT% -DCMAKE_INSTALL_PREFIX=%PREFIX%"
  SET "MAKEC=nmake
  SET PREFIX1=%PREFIX:\=/%
  SET "MSBUILDINSTALL=msbuild /p:Configuration=%Variant% /p:BuildInParallel=true /clp:Verbosity=normal /nologo  /flp1:logfile=build_errors.txt;errorsonly /flp2:logfile=build_warnings.txt;warningsonly INSTALL.vcxproj"
  SET "SEDC=C:\Program Files (x86)\Git\bin\sed"
)

if NOT EXIST %PREFIX% mkdir %PREFIX%
if NOT EXIST %PREFIX%\include mkdir %PREFIX%\include
if NOT EXIST %PREFIX%\lib mkdir %PREFIX%\lib
if NOT EXIST %PREFIX%\bin mkdir %PREFIX%\bin

echo ============= %COMPILER% -- %VARIANT% --- %PREFIX% --- %CMAKE_TARGET% ==============

if "%COMPILER%"=="" SET COMPILER=MSVC2013
if "%PREFIX%"=="" SET PREFIX=d:\libs18d
if "%BOOST_ROOT%"=="" SET BOOST_ROOT=d:\boost
if "%VARIANT%"=="" SET Variant=Debug

set "ER=if ERRORLEVEL 1 exit /b 1"
if "%COMPILER%"=="MINGW" (
  SET "PATH=%PATH%;c:\mingw64\bin"
  SET "MSYSDIR=c:\msys64\usr\bin"
  SET CMAKE_TARGET="MinGW Makefiles"
  SET "CFLAGS=-I%PREFIX:\=/%/include"
  SET "CPPFLAGS=-I%PREFIX:\=/%/include"
  SET "LDFLAGS=-L%PREFIX:\=/%/lib"
  SET "CONFARGS=--prefix=%PREFIX:\=/% --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32"
  set "CMAKE=cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=%VARIANT% -DCMAKE_INSTALL_PREFIX=%PREFIX%"
  SET "MAKEC=mingw32-make"
  SET "SEDC=sed"
  SET GENERATOR="MinGW Makefiles"
  SET PREFIX1=%PREFIX:\=/%
  SET "MSBUILDINSTALL=mingw32-make install"
) else (
  if "%COMPILER%"=="MSVC2008-32"  (
      set MSC_VER=9
     set "GENERATOR= -G"Visual Studio 12 2008""
      call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
  )
  if "%COMPILER%"=="MSVC2010-32"  (
      set MSC_VER=10
     set "GENERATOR= -G"Visual Studio 12 2010""
      call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
  )
  if "%COMPILER%"=="MSVC2012"  (
     set MSC_VER=11
     set "GENERATOR= -G"Visual Studio 12 2012 Win64""
     call "%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
  )
  if "%COMPILER%"=="MSVC2013"  (
     set MSC_VER=12
     set "GENERATOR= -G"Visual Studio 12 2013 Win64""
     call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
  )
  if "%COMPILER%"=="MSVC2013-CTP"  (
     set MSC_VER=12
     set "GENERATOR= -G"Visual Studio 12 2013 Win64" -T CTP_Nov2013"
     call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
  )
  if "%COMPILER%"=="MSVC2015"  (
     set MSC_VER=14
     set "GENERATOR= -G"Visual Studio 14 2015 Win64""
     call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
  )
  set "CMAKE=cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%VARIANT% -DCMAKE_INSTALL_PREFIX=%PREFIX%"
  SET "MAKEC=nmake
  SET PREFIX1=%PREFIX:\=/%
  SET "MSBUILDINSTALL=msbuild /p:Configuration=%Variant% /p:BuildInParallel=true /clp:Verbosity=normal /nologo  /flp1:logfile=build_errors.txt;errorsonly /flp2:logfile=build_warnings.txt;warningsonly INSTALL.vcxproj"
  SET "SEDC=C:\Program Files (x86)\Git\bin\sed"
)

if NOT EXIST %PREFIX% mkdir %PREFIX%
if NOT EXIST %PREFIX%\include mkdir %PREFIX%\include
if NOT EXIST %PREFIX%\lib mkdir %PREFIX%\lib
if NOT EXIST %PREFIX%\bin mkdir %PREFIX%\bin

echo ============= %COMPILER% -- %VARIANT% --- %PREFIX% --- %CMAKE_TARGET% ==============

fix cmake generators, add Vs2013 November CTP build option