md include
md include\google
md include\google\protobuf
md include\google\protobuf\stubs
md include\google\protobuf\io
md include\google\protobuf\compiler
md include\google\protobuf\compiler\cpp
md include\google\protobuf\compiler\java
md include\google\protobuf\compiler\python
copy ..\src\google\protobuf\stubs\common.h include\google\protobuf\stubs\common.h
copy ..\src\google\protobuf\descriptor.h include\google\protobuf\descriptor.h
copy ..\src\google\protobuf\descriptor.pb.h include\google\protobuf\descriptor.pb.h
copy ..\src\google\protobuf\descriptor_database.h include\google\protobuf\descriptor_database.h
copy ..\src\google\protobuf\dynamic_message.h include\google\protobuf\dynamic_message.h
copy ..\src\google\protobuf\extension_set.h include\google\protobuf\extension_set.h
copy ..\src\google\protobuf\generated_message_reflection.h include\google\protobuf\generated_message_reflection.h
copy ..\src\google\protobuf\message.h include\google\protobuf\message.h
copy ..\src\google\protobuf\reflection_ops.h include\google\protobuf\reflection_ops.h
copy ..\src\google\protobuf\repeated_field.h include\google\protobuf\repeated_field.h
copy ..\src\google\protobuf\service.h include\google\protobuf\service.h
copy ..\src\google\protobuf\text_format.h include\google\protobuf\text_format.h
copy ..\src\google\protobuf\unknown_field_set.h include\google\protobuf\unknown_field_set.h
copy ..\src\google\protobuf\wire_format.h include\google\protobuf\wire_format.h
copy ..\src\google\protobuf\wire_format_inl.h include\google\protobuf\wire_format_inl.h
copy ..\src\google\protobuf\io\coded_stream.h include\google\protobuf\io\coded_stream.h
copy ..\src\google\protobuf\io\printer.h include\google\protobuf\io\printer.h
copy ..\src\google\protobuf\io\tokenizer.h include\google\protobuf\io\tokenizer.h
copy ..\src\google\protobuf\io\zero_copy_stream.h include\google\protobuf\io\zero_copy_stream.h
copy ..\src\google\protobuf\io\zero_copy_stream_impl.h include\google\protobuf\io\zero_copy_stream_impl.h
copy ..\src\google\protobuf\compiler\code_generator.h include\google\protobuf\compiler\code_generator.h
copy ..\src\google\protobuf\compiler\command_line_interface.h include\google\protobuf\compiler\command_line_interface.h
copy ..\src\google\protobuf\compiler\importer.h include\google\protobuf\compiler\importer.h
copy ..\src\google\protobuf\compiler\parser.h include\google\protobuf\compiler\parser.h
copy ..\src\google\protobuf\compiler\cpp\cpp_generator.h include\google\protobuf\compiler\cpp\cpp_generator.h
copy ..\src\google\protobuf\compiler\java\java_generator.h include\google\protobuf\compiler\java\java_generator.h
copy ..\src\google\protobuf\compiler\python\python_generator.h include\google\protobuf\compiler\python\python_generator.h

md include
md include\google
md include\google\protobuf
md include\google\protobuf\stubs
md include\google\protobuf\io
md include\google\protobuf\compiler
md include\google\protobuf\compiler\cpp
md include\google\protobuf\compiler\java
md include\google\protobuf\compiler\python
copy ..\src\google\protobuf\stubs\common.h include\google\protobuf\stubs\common.h
copy ..\src\google\protobuf\stubs\once.h include\google\protobuf\stubs\once.h
copy ..\src\google\protobuf\descriptor.h include\google\protobuf\descriptor.h
copy ..\src\google\protobuf\descriptor.pb.h include\google\protobuf\descriptor.pb.h
copy ..\src\google\protobuf\descriptor_database.h include\google\protobuf\descriptor_database.h
copy ..\src\google\protobuf\dynamic_message.h include\google\protobuf\dynamic_message.h
copy ..\src\google\protobuf\extension_set.h include\google\protobuf\extension_set.h
copy ..\src\google\protobuf\generated_message_reflection.h include\google\protobuf\generated_message_reflection.h
copy ..\src\google\protobuf\message.h include\google\protobuf\message.h
copy ..\src\google\protobuf\reflection_ops.h include\google\protobuf\reflection_ops.h
copy ..\src\google\protobuf\repeated_field.h include\google\protobuf\repeated_field.h
copy ..\src\google\protobuf\service.h include\google\protobuf\service.h
copy ..\src\google\protobuf\text_format.h include\google\protobuf\text_format.h
copy ..\src\google\protobuf\unknown_field_set.h include\google\protobuf\unknown_field_set.h
copy ..\src\google\protobuf\wire_format.h include\google\protobuf\wire_format.h
copy ..\src\google\protobuf\wire_format_inl.h include\google\protobuf\wire_format_inl.h
copy ..\src\google\protobuf\io\coded_stream.h include\google\protobuf\io\coded_stream.h
copy ..\src\google\protobuf\io\gzip_stream.h include\google\protobuf\io\gzip_stream.h
copy ..\src\google\protobuf\io\printer.h include\google\protobuf\io\printer.h
copy ..\src\google\protobuf\io\tokenizer.h include\google\protobuf\io\tokenizer.h
copy ..\src\google\protobuf\io\zero_copy_stream.h include\google\protobuf\io\zero_copy_stream.h
copy ..\src\google\protobuf\io\zero_copy_stream_impl.h include\google\protobuf\io\zero_copy_stream_impl.h
copy ..\src\google\protobuf\compiler\code_generator.h include\google\protobuf\compiler\code_generator.h
copy ..\src\google\protobuf\compiler\command_line_interface.h include\google\protobuf\compiler\command_line_interface.h
copy ..\src\google\protobuf\compiler\importer.h include\google\protobuf\compiler\importer.h
copy ..\src\google\protobuf\compiler\parser.h include\google\protobuf\compiler\parser.h
copy ..\src\google\protobuf\compiler\cpp\cpp_generator.h include\google\protobuf\compiler\cpp\cpp_generator.h
copy ..\src\google\protobuf\compiler\java\java_generator.h include\google\protobuf\compiler\java\java_generator.h
copy ..\src\google\protobuf\compiler\python\python_generator.h include\google\protobuf\compiler\python\python_generator.h

Update extract_includes.bat to include new public headers in rev 120.


virtualenv .venv
.venv\Scripts\pip install -e . --upgrade --upgrade-strategy=only-if-needed
.venv\Scripts\pipenv install --dev

.venv\Scripts\pipenv run pytest -v tests -m "windows or cli" --tap-stream

virtualenv .venv
.venv\Scripts\pip install -e . --upgrade --upgrade-strategy=only-if-needed
.venv\Scripts\pipenv install --dev

SET PYPI_VENDOR_DIR '.\tests\pypi\'

.venv\Scripts\pipenv run pytest -v tests -m "windows or cli" --tap-stream

set pypi directory

set pypi directory

Signed-off-by: Kenneth Reitz <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@kennethreitz.org>


set conda_env="fc_env"
set copy_dir="FreeCAD_Conda_Build"

mkdir %copy_dir%

call conda create ^
    -p %conda_env% ^
    freecad calculix gitpython ^
    numpy matplotlib-base scipy sympy pandas six ^
    pyyaml opencamlib ifcopenshell ^
    freecad.asm3 libredwg pycollada ^
    --copy ^
    -c freecad/label/dev ^
    -c conda-forge ^
    -y

REM Copy Conda's Python and (U)CRT to FreeCAD/bin
robocopy %conda_env%\DLLs %copy_dir%\bin\DLLs /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Lib %copy_dir%\bin\Lib /XD __pycache__ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Scripts %copy_dir%\bin\Scripts /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ python*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ msvc*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ ucrt*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy Conda's QT5/plugins to FreeCAD/bin
robocopy %conda_env%\Library\plugins %copy_dir%\bin\ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin\ QtWebEngineProces* %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\resources %copy_dir%\resources /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\translations %copy_dir%\translations /MT:%NUMBER_OF_PROCESSORS% > nul
echo [Paths] > %copy_dir%\bin\qt.conf
echo Prefix =.. >> "%copy_dir%\bin\qt.conf"
REM get all the dependency .dlls
robocopy %conda_env%\Library\bin *.dll %copy_dir%\bin /XF *.pdb /XF api*.* /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy FreeCAD build
robocopy %conda_env%\Library\bin FreeCAD* %copy_dir%\bin /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\data %copy_dir%\data /XF *.txt /S /MT:%NUMBER_OF_PROCESSORS% > nul
REM robocopy %conda_env%\Library\doc\ *.html %copy_dir%\doc MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Ext %copy_dir%\Ext /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\lib %copy_dir%\lib /XF *.lib /XF *.prl /XF *.sh /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Mod %copy_dir%\Mod /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
%copy_dir%\bin\python.exe -c "import FreeCAD;print((FreeCAD.Version()[0]) +'.' + (FreeCAD.Version()[1]) +'.' + (FreeCAD.Version()[2]))" > tempver.txt
set /p fcver=<tempver.txt
echo %fcver%
cd %copy_dir%\..
ren %copy_dir% FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64
"%ProgramFiles%\7-Zip\7z.exe" a -t7z  -mx=9 -m9=LZMA2 -mmt=%NUMBER_OF_PROCESSORS% FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64\
certutil -hashfile "FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z" SHA256 > "FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt

add win_dev

add win_dev


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

Create bld.bat

Create bld.bat


:: Copyright 2012 The Go Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style
:: license that can be found in the LICENSE file.
@echo off

:: Keep environment variables within this script
:: unless invoked with --no-local.
if x%1==x--no-local goto nolocal
if x%2==x--no-local goto nolocal
setlocal
:nolocal

set GOBUILDFAIL=0

:: we disallow local import for non-local packages, if %GOROOT% happens
:: to be under %GOPATH%, then some tests below will fail
set GOPATH=

rem TODO avoid rebuild if possible

if x%1==x--no-rebuild goto norebuild
echo # Building packages and commands.
go install -a -v std
if errorlevel 1 goto fail
echo.
:norebuild

:: we must unset GOROOT_FINAL before tests, because runtime/debug requires
:: correct access to source code, so if we have GOROOT_FINAL in effect,
:: at least runtime/debug test will fail.
set GOROOT_FINAL=

:: get CGO_ENABLED
go env > env.bat
if errorlevel 1 goto fail
call env.bat
del env.bat
echo.

echo # Testing packages.
go test std -short -timeout=120s
if errorlevel 1 goto fail
echo.

echo # runtime -cpu=1,2,4
go test runtime -short -timeout=120s -cpu=1,2,4
if errorlevel 1 goto fail
echo.

echo # sync -cpu=10
go test sync -short -timeout=120s -cpu=10
if errorlevel 1 goto fail
echo.

if not "%GOHOSTOS%-%GOOS%-%GOARCH%-%CGO_ENABLED%" == "windows-windows-amd64-1" goto norace
echo # Testing race detector.
go test -race -i flag
if errorlevel 1 goto fail
go test -race -short flag
if errorlevel 1 goto fail
echo.
:norace

echo # ..\misc\dashboard\builder ..\misc\goplay
go build ..\misc\dashboard\builder ..\misc\goplay
if errorlevel 1 goto fail
echo.

echo # ..\test\bench\go1
go test ..\test\bench\go1
if errorlevel 1 goto fail
echo.

:: cgo tests
if x%CGO_ENABLED% == x0 goto nocgo
echo # ..\misc\cgo\life
go run %GOROOT%\test\run.go - ..\misc\cgo\life
if errorlevel 1 goto fail
echo.

echo # ..\misc\cgo\stdio
go run %GOROOT%\test\run.go - ..\misc\cgo\stdio
if errorlevel 1 goto fail
echo.

echo # ..\misc\cgo\test
go test ..\misc\cgo\test
if errorlevel 1 goto fail
echo.
:nocgo

echo # ..\doc\progs
go run %GOROOT%\test\run.go - ..\doc\progs
if errorlevel 1 goto fail
echo.

:: TODO: The other tests in run.bash.

set OLDGOMAXPROCS=%GOMAXPROCS%

echo # ..\test
cd ..\test
set FAIL=0
set GOMAXPROCS=
go run run.go
if errorlevel 1 set FAIL=1
cd ..\src
echo.
if %FAIL%==1 goto fail

set GOMAXPROCS=%OLDGOMAXPROCS%
set OLDGOMAXPROCS=

echo # Checking API compatibility.
go tool api -c ..\api\go1.txt -next ..\api\next.txt -except ..\api\except.txt
if errorlevel 1 goto fail
echo.

echo ALL TESTS PASSED
goto end

:fail
set GOBUILDFAIL=1

:end

:: Copyright 2012 The Go Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style
:: license that can be found in the LICENSE file.
@echo off

:: Keep environment variables within this script
:: unless invoked with --no-local.
if x%1==x--no-local goto nolocal
if x%2==x--no-local goto nolocal
setlocal
:nolocal

set GOBUILDFAIL=0

:: we disallow local import for non-local packages, if %GOROOT% happens
:: to be under %GOPATH%, then some tests below will fail
set GOPATH=

rem TODO avoid rebuild if possible

if x%1==x--no-rebuild goto norebuild
echo # Building packages and commands.
go install -a -v std
if errorlevel 1 goto fail
echo.
:norebuild

:: we must unset GOROOT_FINAL before tests, because runtime/debug requires
:: correct access to source code, so if we have GOROOT_FINAL in effect,
:: at least runtime/debug test will fail.
set GOROOT_FINAL=

:: get CGO_ENABLED
go env > env.bat
if errorlevel 1 goto fail
call env.bat
del env.bat
echo.

echo # Testing packages.
go test std -short -timeout=120s
if errorlevel 1 goto fail
echo.

echo # runtime -cpu=1,2,4
go test runtime -short -timeout=120s -cpu=1,2,4
if errorlevel 1 goto fail
echo.

echo # sync -cpu=10
go test sync -short -timeout=120s -cpu=10
if errorlevel 1 goto fail
echo.

if not "%GOHOSTOS%-%GOOS%-%GOARCH%-%CGO_ENABLED%" == "windows-windows-amd64-1" goto norace
echo # Testing race detector.
echo # skipping test due to bug (http://code.google.com/p/go/issues/detail?id=4948).
goto norace
go test -race -i flag
if errorlevel 1 goto fail
go test -race -short flag
if errorlevel 1 goto fail
echo.
:norace

echo # ..\misc\dashboard\builder ..\misc\goplay
go build ..\misc\dashboard\builder ..\misc\goplay
if errorlevel 1 goto fail
echo.

echo # ..\test\bench\go1
go test ..\test\bench\go1
if errorlevel 1 goto fail
echo.

:: cgo tests
if x%CGO_ENABLED% == x0 goto nocgo
echo # ..\misc\cgo\life
go run %GOROOT%\test\run.go - ..\misc\cgo\life
if errorlevel 1 goto fail
echo.

echo # ..\misc\cgo\stdio
go run %GOROOT%\test\run.go - ..\misc\cgo\stdio
if errorlevel 1 goto fail
echo.

echo # ..\misc\cgo\test
go test ..\misc\cgo\test
if errorlevel 1 goto fail
echo.
:nocgo

echo # ..\doc\progs
go run %GOROOT%\test\run.go - ..\doc\progs
if errorlevel 1 goto fail
echo.

:: TODO: The other tests in run.bash.

set OLDGOMAXPROCS=%GOMAXPROCS%

echo # ..\test
cd ..\test
set FAIL=0
set GOMAXPROCS=
go run run.go
if errorlevel 1 set FAIL=1
cd ..\src
echo.
if %FAIL%==1 goto fail

set GOMAXPROCS=%OLDGOMAXPROCS%
set OLDGOMAXPROCS=

echo # Checking API compatibility.
go tool api -c ..\api\go1.txt -next ..\api\next.txt -except ..\api\except.txt
if errorlevel 1 goto fail
echo.

echo ALL TESTS PASSED
goto end

:fail
set GOBUILDFAIL=1

:end

disable race detector test

run.bat: disable race detector test

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7439048


@echo off

set MIX_HOME=D:\workspace-luna\mix-web

:start
set /p cmd="please select command to execute: [1]exit [2]start provider [3]start consumer [4]start front "

if errorlevel 1 goto end

if %cmd% == 2 goto provider
if %cmd% == 3 goto consumer
if %cmd% == 4 goto front
goto end

:provider
rem start mix-service-provider
cd %MIX_HOME%\mix-service-provider
start startup.bat
goto start

:consumer
rem start mix-service-consumer
cd %MIX_HOME%\mix-service-consumer
start startup.bat
goto start

:front
rem start mix-front
cd %MIX_HOME%\mix-front
rem mvnDebug jetty:run
call mvn jetty:run
goto start

:end
rem pause>nul
exit

@echo off

set MIX_HOME=D:\workspace-luna\mix-web

:start
set /p cmd="please select command to execute: [1]exit [2]start provider [3]start consumer [4]start front "

if errorlevel 1 goto end

if %cmd% == 2 goto provider
if %cmd% == 3 goto consumer
if %cmd% == 4 goto front
goto end

:provider
rem start mix-service-provider
cd %MIX_HOME%\mix-service-provider
start startup.bat
cls
goto start

:consumer
rem start mix-service-consumer
cd %MIX_HOME%\mix-service-consumer
start startup.bat
cls
goto start

:front
rem start mix-front
cd %MIX_HOME%\mix-front
rem mvnDebug jetty:run
call mvn jetty:run
cls
goto start

:end
rem pause>nul
exit

modify bat script

modify bat script


call npx qx --version
@echo on
@echo node API tests
cd test
call node test-deps.js           || EXIT /B 1
call node test-config-schemas.js || EXIT /B 1
call node test-pkg-migrate.js    || EXIT /B 1
call node test-commands.js       || EXIT /B 1
call node test-cli.js            || EXIT /B 1
@echo setup
cd ..
rmdir  /Q /S myapp
@echo "test create app"
call npx qx create myapp --type server -I  -v || EXIT /B 1
cd myapp
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo "test add package"
call npx qx package update -v || EXIT /B 1
call npx qx package list -v || EXIT /B 1
call npx qx package install oetiker/UploadWidget -v --release v1.0.1 || EXIT /B 1
call npx qx package install cboulanger/qx-contrib-Dialog -v || EXIT /B 1
call npx qx package install johnspackman/UploadMgr -v || EXIT /B 1
call npx qx package install ergobyte/qookery/qookeryace -v || EXIT /B 1
call npx qx package install ergobyte/qookery/qookerymaps -v || EXIT /B 1
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo "test reinstall package"
call npx qx clean
call npx qx package install  -v || EXIT /B 1
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo test remove package
call npx qx package remove oetiker/UploadWidget -v || EXIT /B 1
call npx qx package remove ergobyte/qookery/qookeryace -v || EXIT /B 1
call npx qx package remove ergobyte/qookery/qookerymaps -v || EXIT /B 1
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo test install without manifest
call npx qx clean
call npx qx package install ergobyte/qookery -v || EXIT /B 1
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo test add class and add script
call npx qx add class myapp.Window --extend=qx.ui.window.Window --force || EXIT /B 1
call npx qx add script ..\test\testdata\npm\script\jszip.js --rename=zip.js || EXIT /B 1
copy ..\test\testdata\npm\application\*.js source\class\myapp /Y
call npx qx lint --fix --warnAsError || EXIT /B 1
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo cleanup
cd ..
rmdir  /Q /S myapp

@echo  check version
call npx qx --version
@echo on
@echo  node API tests
@cd test
call node test-deps.js           || EXIT /B 1
call node test-config-schemas.js || EXIT /B 1
call node test-pkg-migrate.js    || EXIT /B 1
call node test-commands.js       || EXIT /B 1
call node test-cli.js            || EXIT /B 1
@echo  setup
cd ..
rmdir  /Q /S myapp
@echo  test create app
call npx qx create myapp --type server -I  -v || EXIT /B 1
cd myapp
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo  test add package
call npx qx package update -v || EXIT /B 1
call npx qx package list -v || EXIT /B 1
call npx qx package install oetiker/UploadWidget -v --release v1.0.1 || EXIT /B 1
call npx qx package install cboulanger/qx-contrib-Dialog -v || EXIT /B 1
call npx qx package install johnspackman/UploadMgr -v || EXIT /B 1
call npx qx package install ergobyte/qookery/qookeryace -v || EXIT /B 1
call npx qx package install ergobyte/qookery/qookerymaps -v || EXIT /B 1
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo  test reinstall package
call npx qx clean
call npx qx package install  -v || EXIT /B 1
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo  test remove package
call npx qx package remove oetiker/UploadWidget -v || EXIT /B 1
call npx qx package remove ergobyte/qookery/qookeryace -v || EXIT /B 1
call npx qx package remove ergobyte/qookery/qookerymaps -v || EXIT /B 1
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo  test install without manifest
call npx qx clean
call npx qx package install ergobyte/qookery -v || EXIT /B 1
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo  test add class and add script
call npx qx add class myapp.Window --extend=qx.ui.window.Window --force || EXIT /B 1
call npx qx add script ..\test\testdata\npm\script\jszip.js --rename=zip.js || EXIT /B 1
copy ..\test\testdata\npm\application\*.js source\class\myapp /Y
call npx qx lint --fix --warnAsError || EXIT /B 1
call npx qx compile -v --clean || EXIT /B 1
call node compiled\source\myapp\myapp.js || EXIT /B 1
@echo  cleanup
cd ..
rmdir  /Q /S myapp

bring some color to output

bring some color to output


@pushd %~dp0

ECHO Remember to build the solution first!
REM pause

Cd "%~dp0\TestHarness\packages\NUnit.Runners.*\tools"
"nunit-console.exe" "%~dp0\TestHarness\nunit\bin\Debug\nunitHarness.dll" /result="%~dp0\results-example-nunit.xml" /nologo /nodots

Cd "%~dp0\TestHarness\packages\SpecRun.Runner.*\tools"
"specrun.exe" run default.srprofile "/baseFolder:%~dp0\TestHarness\SpecRun\bin\Debug" /log:specrun.log /report:"%~dp0\results-example-specrun.html"

pause

@popd

@pushd %~dp0

goto begin
ECHO Remember to build the solution first!
REM pause

Cd "%~dp0\TestHarness\packages\NUnit.Runners.*\tools"
"nunit-console.exe" "%~dp0\TestHarness\nunit\bin\Debug\nunitHarness.dll" /result="%~dp0\results-example-nunit.xml" /nologo /nodots

Cd "%~dp0\TestHarness\packages\SpecRun.Runner.*\tools"
"specrun.exe" run default.srprofile "/baseFolder:%~dp0\TestHarness\SpecRun\bin\Debug" /log:specrun.log /report:"%~dp0\results-example-specrun.html"

:begin

Cd "%~dp0\TestHarness\packagesNonNuget\xunit.runner"
"xunit.console.clr4.exe" "%~dp0\TestHarness\xunit\bin\Debug\xunitHarness.dll" /xml "%~dp0\results-example-xunit.xml"

pause

@popd

Add ability to create xunit test results


@setlocal
@echo off

if "%1" == "/?" goto Usage
if "%~1" == "" goto Usage

:: Initialize build configuration
set BUILD.ARM=N
set BUILD.x86=N
set BUILD.x64=N
set BUILD.win7=N
set BUILD.win10=N
set BUILD.win8.1=N
set BUILD.phone8.1=N

:: Export full current PATH from environment into MSYS2
set MSYS2_PATH_TYPE=inherit

:: Iterate through arguments and set the right configuration
for %%a in (%*) do (
    if /I "%%a"=="ARM" (
        set BUILD.ARM=Y
    ) else if /I "%%a"=="x86" (
        set BUILD.x86=Y
    ) else if /I "%%a"=="x64" (
        set BUILD.x64=Y
    ) else if /I "%%a"=="win7" (
        set BUILD.win7=Y
    ) else if /I "%%a"=="win10" (
        set BUILD.win10=Y
    ) else if /I "%%a"=="win8.1" (
        set BUILD.win8.1=Y
    ) else if /I "%%a"=="phone8.1" (
        set BUILD.phone8.1=Y
    ) else (
        goto Usage
    )
)

:: Set build all architecture if none are specified
if %BUILD.ARM%==N (
    if %BUILD.x86%==N (
        if %BUILD.x64%==N (
            set BUILD.ARM=Y
            set BUILD.x86=Y
            set BUILD.x64=Y
        )
    )
)

:: Set build all platform if none are specified
if %BUILD.win10%==N (
    if %BUILD.win8.1%==N (
        if %BUILD.phone8.1%==N (
            if %BUILD.win7%==N (
                goto Usage
            )
        )
    )
)

:: Verifying ffmpeg directory
echo Verifying ffmpeg directory...
pushd ffmpeg
if not exist configure (
    echo:
    echo configure is not found in ffmpeg folder. Ensure this folder is populated with ffmpeg snapshot
    goto Cleanup
)
popd

:: Check for required tools
if defined MSYS2_BIN (
    if exist %MSYS2_BIN% goto Win10
)

echo:
echo MSYS2 is needed. Set it up properly and provide the executable path in MSYS2_BIN environment variable. E.g.
echo:
echo     set MSYS2_BIN="C:\msys64\usr\bin\bash.exe"
echo:
echo See https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT#PrerequisitesandFirstTimeSetupInstructions
goto Cleanup

:: Build and deploy Windows 10 library
:Win10
if %BUILD.win10%==N goto Win8.1

:: Check for required tools
if not defined VS140COMNTOOLS (
    echo:
    echo VS140COMNTOOLS environment variable is not found. Check your Visual Studio 2015 installation
    goto Cleanup
)

:Win10x86
if %BUILD.x86%==N goto Win10x64
echo Building FFmpeg for Windows 10 apps x86...
echo:

setlocal
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 store
set LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86;;%UniversalCRTSdkDir%lib\%UCRTVersion%\um\x86;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\x86;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x86
set LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%UniversalCRTSdkDir%Include\%UCRTVersion%\ucrt;%UniversalCRTSdkDir%Include\%UCRTVersion%\um;%UniversalCRTSdkDir%Include\%UCRTVersion%\shared;%UniversalCRTSdkDir%Include\%UCRTVersion%\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win10 x86
endlocal

:Win10x64
if %BUILD.x64%==N goto Win10ARM
echo Building FFmpeg for Windows 10 apps x64...
echo:

setlocal
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x64 store
set LIB=%VSINSTALLDIR%VC\lib\store\amd64;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64;;%UniversalCRTSdkDir%lib\%UCRTVersion%\um\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\x64;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x64
set LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib\amd64;%VSINSTALLDIR%VC\lib\amd64;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%UniversalCRTSdkDir%Include\%UCRTVersion%\ucrt;%UniversalCRTSdkDir%Include\%UCRTVersion%\um;%UniversalCRTSdkDir%Include\%UCRTVersion%\shared;%UniversalCRTSdkDir%Include\%UCRTVersion%\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win10 x64
endlocal

:Win10ARM
if %BUILD.ARM%==N goto Win8.1
echo Building FFmpeg for Windows 10 apps ARM...
echo:

setlocal
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86_arm store
set LIB=%VSINSTALLDIR%VC\lib\store\ARM;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\arm;;%UniversalCRTSdkDir%lib\%UCRTVersion%\um\arm;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\arm;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\arm
set LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib\ARM;%VSINSTALLDIR%VC\lib\ARM;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%UniversalCRTSdkDir%Include\%UCRTVersion%\ucrt;%UniversalCRTSdkDir%Include\%UCRTVersion%\um;%UniversalCRTSdkDir%Include\%UCRTVersion%\shared;%UniversalCRTSdkDir%Include\%UCRTVersion%\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win10 ARM
endlocal

:: Build and deploy Windows 8.1 library
:Win8.1
if %BUILD.win8.1%==N goto Phone8.1

:: Check for required tools
if not defined VS120COMNTOOLS (
    echo:
    echo VS120COMNTOOLS environment variable is not found. Check your Visual Studio 2013 installation
    goto Cleanup
)

:Win8.1x86
if %BUILD.x86%==N goto Win8.1x64
echo Building FFmpeg for Windows 8.1 apps x86...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86
set LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%WindowsSdkDir%lib\winv6.3\um\x86;;
set LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win8.1 x86
endlocal

:Win8.1x64
if %BUILD.x64%==N goto Win8.1ARM
echo Building FFmpeg for Windows 8.1 apps x64...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x64
set LIB=%VSINSTALLDIR%VC\lib\store\amd64;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%WindowsSdkDir%lib\winv6.3\um\x64;;
set LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%VSINSTALLDIR%VC\lib\amd64;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win8.1 x64
endlocal

:Win8.1ARM
if %BUILD.ARM%==N goto Phone8.1
echo Building FFmpeg for Windows 8.1 apps ARM...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86_arm
set LIB=%VSINSTALLDIR%VC\lib\store\ARM;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%WindowsSdkDir%lib\winv6.3\um\arm;;
set LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%VSINSTALLDIR%VC\lib\ARM;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win8.1 ARM
endlocal

:: Build and deploy Windows Phone 8.1 library
:Phone8.1
if %BUILD.phone8.1%==N goto Win7

:: Check for required tools
if not defined VS120COMNTOOLS (
    echo:
    echo VS120COMNTOOLS environment variable is not found. Check your Visual Studio 2013 installation
    goto Cleanup
)

:Phone8.1ARM
if %BUILD.ARM%==N goto Phone8.1x86
echo Building FFmpeg for Windows Phone 8.1 apps ARM...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86_arm
set LIB=%VSINSTALLDIR%VC\lib\store\ARM;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\lib\arm;;
set LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib\ARM;%VSINSTALLDIR%VC\lib\ARM
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\abi;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\mincore;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\minwin;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\wrl;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Phone8.1 ARM
endlocal

:Phone8.1x86
if %BUILD.x86%==N goto Win7
echo Building FFmpeg for Windows Phone 8.1 apps x86...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86
set LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\lib\x86;;
set LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib
set INCLUDE=%VSINSTALLDIR%VC\INCLUDE;%VSINSTALLDIR%VC\ATLMFC\INCLUDE;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\abi;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\mincore;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\minwin;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\wrl;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Phone8.1 x86
endlocal

:: Build and deploy Windows 7 library
:Win7
if %BUILD.win7%==N goto Cleanup

:: Check for required tools
if not defined VS120COMNTOOLS (
    echo:
    echo VS120COMNTOOLS environment variable is not found. Check your Visual Studio 2013 installation
    goto Cleanup
)

:Win7x86
if %BUILD.x86%==N goto Win7x64
echo Building FFmpeg for Windows 7 desktop x86...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86
set LIB=%VSINSTALLDIR%VC\lib;%VSINSTALLDIR%VC\atlmfc\lib;%WindowsSdkDir%lib\winv6.3\um\x86;
set LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;%VSINSTALLDIR%VC\lib;
set INCLUDE=%VSINSTALLDIR%VC\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win7 x86
endlocal

:Win7x64
if %BUILD.x64%==N goto Cleanup
echo Building FFmpeg for Windows 7 desktop x64...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x64
set LIB=%VSINSTALLDIR%VC\lib\amd64;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%WindowsSdkDir%lib\winv6.3\um\x64;
set LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;%VSINSTALLDIR%VC\lib\amd64;
set INCLUDE=%VSINSTALLDIR%VC\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win7 x64
endlocal

goto Cleanup

:: Display help message
:Usage
echo The correct usage is:
echo:
echo     %0 [target platform] [architecture]
echo:
echo where
echo:
echo [target platform] is: win10 ^| win8.1 ^| phone8.1 ^| win7 (at least one)
echo [architecture]    is: x86 ^| x64 ^| ARM (optional)
echo:
echo For example:
echo     %0 win10                     - Build for Windows 10 ARM, x64, and x86
echo     %0 phone8.1 ARM              - Build for Windows Phone 8.1 ARM only
echo     %0 win8.1 x86 x64            - Build for Windows 8.1 x86 and x64 only
echo     %0 win7 x86 x64              - Build for Windows 7 x86 and x64 only
echo     %0 phone8.1 win10 ARM        - Build for Windows 10 and Windows Phone 8.1 ARM only
echo     %0 win8.1 phone8.1 win10     - Build all architecture for all target platform
goto :eof

:Cleanup
@endlocal

@setlocal
@echo off

if "%1" == "/?" goto Usage
if "%~1" == "" goto Usage

:: Initialize build configuration
set BUILD.ARM=N
set BUILD.x86=N
set BUILD.x64=N
set BUILD.win7=N
set BUILD.win10=N
set BUILD.win8.1=N
set BUILD.phone8.1=N

:: Export full current PATH from environment into MSYS2
set MSYS2_PATH_TYPE=inherit

:: Iterate through arguments and set the right configuration
for %%a in (%*) do (
    if /I "%%a"=="ARM" (
        set BUILD.ARM=Y
    ) else if /I "%%a"=="x86" (
        set BUILD.x86=Y
    ) else if /I "%%a"=="x64" (
        set BUILD.x64=Y
    ) else if /I "%%a"=="win7" (
        set BUILD.win7=Y
    ) else if /I "%%a"=="win10" (
        set BUILD.win10=Y
    ) else if /I "%%a"=="win8.1" (
        set BUILD.win8.1=Y
    ) else if /I "%%a"=="phone8.1" (
        set BUILD.phone8.1=Y
    ) else (
        goto Usage
    )
)

:: Set build all architecture if none are specified
if %BUILD.ARM%==N (
    if %BUILD.x86%==N (
        if %BUILD.x64%==N (
            set BUILD.ARM=Y
            set BUILD.x86=Y
            set BUILD.x64=Y
        )
    )
)

:: Set build all platform if none are specified
if %BUILD.win10%==N (
    if %BUILD.win8.1%==N (
        if %BUILD.phone8.1%==N (
            if %BUILD.win7%==N (
                goto Usage
            )
        )
    )
)

:: Verifying ffmpeg directory
echo Verifying ffmpeg directory...
pushd %~dp0\ffmpeg
if not exist configure (
    echo:
    echo configure is not found in ffmpeg folder. Ensure this folder is populated with ffmpeg snapshot
    goto Cleanup
)
popd

:: Check for required tools
if defined MSYS2_BIN (
    if exist %MSYS2_BIN% goto Win10
)

echo:
echo MSYS2 is needed. Set it up properly and provide the executable path in MSYS2_BIN environment variable. E.g.
echo:
echo     set MSYS2_BIN="C:\msys64\usr\bin\bash.exe"
echo:
echo See https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT#PrerequisitesandFirstTimeSetupInstructions
goto Cleanup

:: Build and deploy Windows 10 library
:Win10
if %BUILD.win10%==N goto Win8.1

:: Check for required tools
if not defined VS140COMNTOOLS (
    echo:
    echo VS140COMNTOOLS environment variable is not found. Check your Visual Studio 2015 installation
    goto Cleanup
)

:Win10x86
if %BUILD.x86%==N goto Win10x64
echo Building FFmpeg for Windows 10 apps x86...
echo:

setlocal
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 store
set LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86;;%UniversalCRTSdkDir%lib\%UCRTVersion%\um\x86;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\x86;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x86
set LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%UniversalCRTSdkDir%Include\%UCRTVersion%\ucrt;%UniversalCRTSdkDir%Include\%UCRTVersion%\um;%UniversalCRTSdkDir%Include\%UCRTVersion%\shared;%UniversalCRTSdkDir%Include\%UCRTVersion%\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win10 x86
endlocal

:Win10x64
if %BUILD.x64%==N goto Win10ARM
echo Building FFmpeg for Windows 10 apps x64...
echo:

setlocal
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x64 store
set LIB=%VSINSTALLDIR%VC\lib\store\amd64;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64;;%UniversalCRTSdkDir%lib\%UCRTVersion%\um\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\x64;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x64
set LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib\amd64;%VSINSTALLDIR%VC\lib\amd64;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%UniversalCRTSdkDir%Include\%UCRTVersion%\ucrt;%UniversalCRTSdkDir%Include\%UCRTVersion%\um;%UniversalCRTSdkDir%Include\%UCRTVersion%\shared;%UniversalCRTSdkDir%Include\%UCRTVersion%\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win10 x64
endlocal

:Win10ARM
if %BUILD.ARM%==N goto Win8.1
echo Building FFmpeg for Windows 10 apps ARM...
echo:

setlocal
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86_arm store
set LIB=%VSINSTALLDIR%VC\lib\store\ARM;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\arm;;%UniversalCRTSdkDir%lib\%UCRTVersion%\um\arm;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\arm;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\arm
set LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib\ARM;%VSINSTALLDIR%VC\lib\ARM;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%UniversalCRTSdkDir%Include\%UCRTVersion%\ucrt;%UniversalCRTSdkDir%Include\%UCRTVersion%\um;%UniversalCRTSdkDir%Include\%UCRTVersion%\shared;%UniversalCRTSdkDir%Include\%UCRTVersion%\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win10 ARM
endlocal

:: Build and deploy Windows 8.1 library
:Win8.1
if %BUILD.win8.1%==N goto Phone8.1

:: Check for required tools
if not defined VS120COMNTOOLS (
    echo:
    echo VS120COMNTOOLS environment variable is not found. Check your Visual Studio 2013 installation
    goto Cleanup
)

:Win8.1x86
if %BUILD.x86%==N goto Win8.1x64
echo Building FFmpeg for Windows 8.1 apps x86...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86
set LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%WindowsSdkDir%lib\winv6.3\um\x86;;
set LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win8.1 x86
endlocal

:Win8.1x64
if %BUILD.x64%==N goto Win8.1ARM
echo Building FFmpeg for Windows 8.1 apps x64...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x64
set LIB=%VSINSTALLDIR%VC\lib\store\amd64;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%WindowsSdkDir%lib\winv6.3\um\x64;;
set LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%VSINSTALLDIR%VC\lib\amd64;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win8.1 x64
endlocal

:Win8.1ARM
if %BUILD.ARM%==N goto Phone8.1
echo Building FFmpeg for Windows 8.1 apps ARM...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86_arm
set LIB=%VSINSTALLDIR%VC\lib\store\ARM;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%WindowsSdkDir%lib\winv6.3\um\arm;;
set LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%VSINSTALLDIR%VC\lib\ARM;
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win8.1 ARM
endlocal

:: Build and deploy Windows Phone 8.1 library
:Phone8.1
if %BUILD.phone8.1%==N goto Win7

:: Check for required tools
if not defined VS120COMNTOOLS (
    echo:
    echo VS120COMNTOOLS environment variable is not found. Check your Visual Studio 2013 installation
    goto Cleanup
)

:Phone8.1ARM
if %BUILD.ARM%==N goto Phone8.1x86
echo Building FFmpeg for Windows Phone 8.1 apps ARM...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86_arm
set LIB=%VSINSTALLDIR%VC\lib\store\ARM;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\lib\arm;;
set LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib\ARM;%VSINSTALLDIR%VC\lib\ARM
set INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\abi;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\mincore;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\minwin;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\wrl;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Phone8.1 ARM
endlocal

:Phone8.1x86
if %BUILD.x86%==N goto Win7
echo Building FFmpeg for Windows Phone 8.1 apps x86...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86
set LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\lib\x86;;
set LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib
set INCLUDE=%VSINSTALLDIR%VC\INCLUDE;%VSINSTALLDIR%VC\ATLMFC\INCLUDE;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\abi;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\mincore;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\minwin;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\wrl;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Phone8.1 x86
endlocal

:: Build and deploy Windows 7 library
:Win7
if %BUILD.win7%==N goto Cleanup

:: Check for required tools
if not defined VS120COMNTOOLS (
    echo:
    echo VS120COMNTOOLS environment variable is not found. Check your Visual Studio 2013 installation
    goto Cleanup
)

:Win7x86
if %BUILD.x86%==N goto Win7x64
echo Building FFmpeg for Windows 7 desktop x86...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86
set LIB=%VSINSTALLDIR%VC\lib;%VSINSTALLDIR%VC\atlmfc\lib;%WindowsSdkDir%lib\winv6.3\um\x86;
set LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;%VSINSTALLDIR%VC\lib;
set INCLUDE=%VSINSTALLDIR%VC\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win7 x86
endlocal

:Win7x64
if %BUILD.x64%==N goto Cleanup
echo Building FFmpeg for Windows 7 desktop x64...
echo:

setlocal
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x64
set LIB=%VSINSTALLDIR%VC\lib\amd64;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%WindowsSdkDir%lib\winv6.3\um\x64;
set LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;%VSINSTALLDIR%VC\lib\amd64;
set INCLUDE=%VSINSTALLDIR%VC\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;

%MSYS2_BIN% --login -x %~dp0FFmpegConfig.sh Win7 x64
endlocal

goto Cleanup

:: Display help message
:Usage
echo The correct usage is:
echo:
echo     %0 [target platform] [architecture]
echo:
echo where
echo:
echo [target platform] is: win10 ^| win8.1 ^| phone8.1 ^| win7 (at least one)
echo [architecture]    is: x86 ^| x64 ^| ARM (optional)
echo:
echo For example:
echo     %0 win10                     - Build for Windows 10 ARM, x64, and x86
echo     %0 phone8.1 ARM              - Build for Windows Phone 8.1 ARM only
echo     %0 win8.1 x86 x64            - Build for Windows 8.1 x86 and x64 only
echo     %0 win7 x86 x64              - Build for Windows 7 x86 and x64 only
echo     %0 phone8.1 win10 ARM        - Build for Windows 10 and Windows Phone 8.1 ARM only
echo     %0 win8.1 phone8.1 win10     - Build all architecture for all target platform
goto :eof

:Cleanup
@endlocal

Fix running BuildFFmpeg.bat from a different folder.

Addressing issue #188


rem cea-workflow.bat
rem run a (complete) cea workflow for a given scenario

rem configure variables used for the simulation
if not defined CEA-SCENARIO (
    echo please set CEA-SCENARIO first
    exit /b 1
)
if not defined CEA-REGION (
    echo please set CEA-REGION first
    exit /b 1
)
if not defined CEA-WEATHER (
    echo please set CEA-WEATHER first
    exit /b 1
)

if not defined CEA-NETWORK-TYPE (
    echo please set CEA-NETWORK-TYPE first
    exit /b 1
)

rem run each script, break on error

rem copy-default-databases
echo %date% %time% copy-default-databases begin >> %CEA-SCENARIO%\cea-workflow.log
cea copy-default-databases --scenario %CEA-SCENARIO% --region %CEA-REGION%
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% copy-default-databases end >> %CEA-SCENARIO%\cea-workflow.log

rem data-helper
echo %date% %time% data-helper begin >> %CEA-SCENARIO%\cea-workflow.log
cea data-helper
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% data-helper end >> %CEA-SCENARIO%\cea-workflow.log

rem radiation-daysim
echo %date% %time% radiation-daysim begin >> %CEA-SCENARIO%\cea-workflow.log
cea radiation-daysim --weather %CEA-WEATHER%
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% radiation-daysim end >> %CEA-SCENARIO%\cea-workflow.log

rem demand
echo %date% %time% demand begin >> %CEA-SCENARIO%\cea-workflow.log
cea demand --multiprocessing on
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% demand end >> %CEA-SCENARIO%\cea-workflow.log

rem emissions
echo %date% %time% emissions begin >> %CEA-SCENARIO%\cea-workflow.log
cea emissions
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% emissions end >> %CEA-SCENARIO%\cea-workflow.log

rem network-layout
echo %date% %time% network-layout begin >> %CEA-SCENARIO%\cea-workflow.log
cea network-layout --network-type %CEA-NETWORK-TYPE%
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% network-layout end >> %CEA-SCENARIO%\cea-workflow.log

rem operation-costs
echo %date% %time% operation-costs begin >> %CEA-SCENARIO%\cea-workflow.log
cea operation-costs
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% operation-costs end >> %CEA-SCENARIO%\cea-workflow.log

rem photovoltaic
echo %date% %time% photovoltaic begin >> %CEA-SCENARIO%\cea-workflow.log
cea photovoltaic
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% photovoltaic end >> %CEA-SCENARIO%\cea-workflow.log

rem solar-collector
echo %date% %time% solar-collector FP begin >> %CEA-SCENARIO%\cea-workflow.log
cea solar-collector --type-scpanel FP
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% solar-collector FP end >> %CEA-SCENARIO%\cea-workflow.log

rem solar-collector
echo %date% %time% solar-collector ET begin >> %CEA-SCENARIO%\cea-workflow.log
cea solar-collector --type-scpanel ET
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% solar-collector ET end >> %CEA-SCENARIO%\cea-workflow.log

rem photovoltaic-thermal
echo %date% %time% photovoltaic-thermal begin >> %CEA-SCENARIO%\cea-workflow.log
cea photovoltaic-thermal
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% photovoltaic-thermal end >> %CEA-SCENARIO%\cea-workflow.log

rem sewage-potential
echo %date% %time% sewage-potential begin >> %CEA-SCENARIO%\cea-workflow.log
cea sewage-potential
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% sewage-potential end >> %CEA-SCENARIO%\cea-workflow.log

rem lake-potential
echo %date% %time% lake-potential begin >> %CEA-SCENARIO%\cea-workflow.log
cea lake-potential
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% lake-potential end >> %CEA-SCENARIO%\cea-workflow.log

rem thermal-network-matrix
echo %date% %time% thermal-network-matrix begin >> %CEA-SCENARIO%\cea-workflow.log
cea thermal-network-matrix --network-type %CEA-NETWORK-TYPE%
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% thermal-network-matrix end >> %CEA-SCENARIO%\cea-workflow.log

rem decentralized
echo %date% %time% decentralized begin >> %CEA-SCENARIO%\cea-workflow.log
cea decentralized
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% decentralized end >> %CEA-SCENARIO%\cea-workflow.log

rem optimization
echo %date% %time% optimization begin >> %CEA-SCENARIO%\cea-workflow.log
cea optimization --individualind 2 ngen 2
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% optimization end >> %CEA-SCENARIO%\cea-workflow.log

rem plots
echo %date% %time% plots begin >> %CEA-SCENARIO%\cea-workflow.log
cea plots
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% plots end >> %CEA-SCENARIO%\cea-workflow.log

rem cea-workflow.bat
rem run a (complete) cea workflow for a given scenario

rem configure variables used for the simulation
if not defined CEA-SCENARIO (
    echo please set CEA-SCENARIO first
    exit /b 1
)

rem run each script, break on error

rem copy-default-databases
echo %date% %time% copy-default-databases begin >> %CEA-SCENARIO%\cea-workflow.log
cea copy-default-databases --scenario %CEA-SCENARIO%
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% copy-default-databases end >> %CEA-SCENARIO%\cea-workflow.log

rem data-helper
echo %date% %time% data-helper begin >> %CEA-SCENARIO%\cea-workflow.log
cea data-helper
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% data-helper end >> %CEA-SCENARIO%\cea-workflow.log

rem radiation-daysim
echo %date% %time% radiation-daysim begin >> %CEA-SCENARIO%\cea-workflow.log
cea radiation-daysim
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% radiation-daysim end >> %CEA-SCENARIO%\cea-workflow.log

rem demand
echo %date% %time% demand begin >> %CEA-SCENARIO%\cea-workflow.log
cea demand --multiprocessing on
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% demand end >> %CEA-SCENARIO%\cea-workflow.log

rem emissions
echo %date% %time% emissions begin >> %CEA-SCENARIO%\cea-workflow.log
cea emissions
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% emissions end >> %CEA-SCENARIO%\cea-workflow.log

rem network-layout
echo %date% %time% network-layout begin >> %CEA-SCENARIO%\cea-workflow.log
cea network-layout
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% network-layout end >> %CEA-SCENARIO%\cea-workflow.log

rem operation-costs
echo %date% %time% operation-costs begin >> %CEA-SCENARIO%\cea-workflow.log
cea operation-costs
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% operation-costs end >> %CEA-SCENARIO%\cea-workflow.log

rem photovoltaic
echo %date% %time% photovoltaic begin >> %CEA-SCENARIO%\cea-workflow.log
cea photovoltaic
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% photovoltaic end >> %CEA-SCENARIO%\cea-workflow.log

rem solar-collector
echo %date% %time% solar-collector FP begin >> %CEA-SCENARIO%\cea-workflow.log
cea solar-collector --type-scpanel FP
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% solar-collector FP end >> %CEA-SCENARIO%\cea-workflow.log

rem solar-collector
echo %date% %time% solar-collector ET begin >> %CEA-SCENARIO%\cea-workflow.log
cea solar-collector --type-scpanel ET
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% solar-collector ET end >> %CEA-SCENARIO%\cea-workflow.log

rem photovoltaic-thermal
echo %date% %time% photovoltaic-thermal begin >> %CEA-SCENARIO%\cea-workflow.log
cea photovoltaic-thermal
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% photovoltaic-thermal end >> %CEA-SCENARIO%\cea-workflow.log

rem sewage-potential
echo %date% %time% sewage-potential begin >> %CEA-SCENARIO%\cea-workflow.log
cea sewage-potential
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% sewage-potential end >> %CEA-SCENARIO%\cea-workflow.log

rem lake-potential
echo %date% %time% lake-potential begin >> %CEA-SCENARIO%\cea-workflow.log
cea lake-potential
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% lake-potential end >> %CEA-SCENARIO%\cea-workflow.log

rem thermal-network-matrix
echo %date% %time% thermal-network-matrix begin >> %CEA-SCENARIO%\cea-workflow.log
cea thermal-network-matrix
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% thermal-network-matrix end >> %CEA-SCENARIO%\cea-workflow.log

rem decentralized
echo %date% %time% decentralized begin >> %CEA-SCENARIO%\cea-workflow.log
cea decentralized
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% decentralized end >> %CEA-SCENARIO%\cea-workflow.log

rem optimization
echo %date% %time% optimization begin >> %CEA-SCENARIO%\cea-workflow.log
cea optimization --individualind 2 --ngen 2
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% optimization end >> %CEA-SCENARIO%\cea-workflow.log

rem plots
echo %date% %time% plots begin >> %CEA-SCENARIO%\cea-workflow.log
cea plots
if %errorlevel% neq 0 exit /b %errorlevel%
echo %date% %time% plots end >> %CEA-SCENARIO%\cea-workflow.log

update to cea-workflow.bat

update to cea-workflow.bat


@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  docToolchain script for Windows
@rem
@rem ##########################################################################

set CMD_LINE_ARGS=%*

IF "%1"=="" GOTO :help
IF [%1]==[/?] GOTO :help

set SCRIPTDIR=%~dp0
set BASEDIR=%SCRIPTDIR%..\
set GRADLECMD=%BASEDIR%gradlew.bat
set WORKINGDIR=%cd%\
set PATHTODOCS=%1
shift

@REM Execute docToolchain

@REM %GRADLECMD% --project-cache-dir %BASEDIR%.gradle -p %BASEDIR% -PdocDir=%WORKINGDIR%%1 %*

cd /d %BASEDIR%

IF "%PATHTODOCS:~0,1%"=="." goto :relativePath

call %GRADLECMD% --project-cache-dir %BASEDIR%/.gradle "-PdocDir=%PATHTODOCS%" %*

goto :end

:relativePath

call %GRADLECMD% --project-cache-dir %BASEDIR%/.gradle "-PdocDir=%WORKINGDIR%%PATHTODOCS%" %*

goto :end

:help

echo Usage: doctoolchain docDir [option...] [task...]
echo.
echo docDir - Absolute directory with the documentation.
echo.
echo You can use the same options and tasks as in underlying gradle.
echo Use "doctoolchain . --help" to see available options.
echo Use "doctoolchain . tasks" to see available tasks.
echo.
echo Examples:
echo.
echo   Init new project with arc42 tempalte
echo     doctoolchain . -b init.gradle initArc42EN
echo.
echo   Generate PDF:
echo     doctoolchain . generatePDF
echo.
echo   Generate HTML:
echo     doctoolchain . generateHTML
echo.
echo   Publish HTML to Confluence:
echo     doctoolchain . publishToConfluence
goto :end

:end
rem back to WORKINGDIR
cd /d %WORKINGDIR%

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  docToolchain script for Windows
@rem
@rem ##########################################################################

set CMD_LINE_ARGS=%*

IF "%1"=="" GOTO :help
IF [%1]==[/?] GOTO :help

set SCRIPTDIR=%~dp0
set BASEDIR=%SCRIPTDIR%..\
set GRADLECMD=%BASEDIR%gradlew.bat
set WORKINGDIR=%cd%\
set PATHTODOCS=%1

echo "-------------------"
@REM throw the first parameter away
set params=%*
set params=%params:* =%

@REM Execute docToolchain

@REM %GRADLECMD% --project-cache-dir %BASEDIR%.gradle -p %BASEDIR% -PdocDir=%WORKINGDIR%%1 %params%

cd /d %BASEDIR%

IF "%PATHTODOCS:~0,1%"=="." goto :relativePath

call %GRADLECMD% --project-cache-dir %BASEDIR%/.gradle "-PdocDir=%PATHTODOCS%" %params%

goto :end

:relativePath

call %GRADLECMD% --project-cache-dir %BASEDIR%/.gradle "-PdocDir=%WORKINGDIR%%PATHTODOCS%" %params%

goto :end

:help

echo Usage: doctoolchain docDir [option...] [task...]
echo.
echo docDir - Absolute directory with the documentation.
echo.
echo You can use the same options and tasks as in underlying gradle.
echo Use "doctoolchain . --help" to see available options.
echo Use "doctoolchain . tasks" to see available tasks.
echo.
echo Examples:
echo.
echo   Init new project with arc42 tempalte
echo     doctoolchain . -b init.gradle initArc42EN
echo.
echo   Generate PDF:
echo     doctoolchain . generatePDF
echo.
echo   Generate HTML:
echo     doctoolchain . generateHTML
echo.
echo   Publish HTML to Confluence:
echo     doctoolchain . publishToConfluence
goto :end

:end
rem back to WORKINGDIR
cd /d %WORKINGDIR%

fix params problem with batch file

fix params problem with batch file


setlocal EnableDelayedExpansion

echo ON

if "%CONDA_VERSION%"=="" set CONDA_VERSION=2
if "%CONDA_DIR%"=="" set CONDA_DIR=%USERPROFILE%\Miniconda!CONDA_VERSION!

if "%PLATFORM%"=="" set PLATFORM=%PROCESSOR_ARCHITECTURE%
if not "!PLATFORM!"=="x86" set PLATFORM=x86_64

where curl
if !ERRORLEVEL! neq 0 (
    echo "You must first install the cURL program"
    exit /b !ERRORLEVEL!
)

if not exist !CONDA_DIR! (
    curl https://repo.continuum.io/miniconda/Miniconda!CONDA_VERSION!-latest-Windows-!PLATFORM!.exe -o miniconda.exe
    if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
    start /wait "" miniconda.exe /InstallationType=JustMe /RegisterPython=0 /S /D=!CONDA_DIR!
    if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
    del miniconda.exe
    if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
)

attrib +h !CONDA_DIR!
if !ERRORLEVEL! neq 0 echo Failed to hide the !CONDA_DIR! directory

set PATH=!CONDA_DIR!;!CONDA_DIR!\Scripts;%PATH%

if "%CONDA_ALWAYS_YES%"=="" set CONDA_ALWAYS_YES=no
if "%CONDA_CHANGE_PS1%"=="" set CONDA_CHANGE_PS1=yes

conda config --set always_yes !CONDA_ALWAYS_YES!
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
conda config --set changeps1 !CONDA_CHANGE_PS1!
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
conda update -q conda
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!

echo OFF

setlocal EnableDelayedExpansion

echo ON

if "%CONDA_VERSION%"=="" set CONDA_VERSION=2
if "%CONDA_DIR%"=="" set CONDA_DIR=%USERPROFILE%\Miniconda!CONDA_VERSION!

if "%PLATFORM%"=="" set PLATFORM=%PROCESSOR_ARCHITECTURE%
if not "!PLATFORM!"=="x86" set PLATFORM=x86_64

where curl
if !ERRORLEVEL! neq 0 (
    echo "You must first install the cURL program"
    exit /b !ERRORLEVEL!
)

if "%BATCH_MODE%"=="" set BATCH_MODE=false

if not exist !CONDA_DIR! (
    curl https://repo.continuum.io/miniconda/Miniconda!CONDA_VERSION!-latest-Windows-!PLATFORM!.exe -o miniconda.exe
    if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
    if "%BATCH_MODE%"=="true" (
        start /wait "" miniconda.exe /InstallationType=JustMe /RegisterPython=0 /S /D=!CONDA_DIR!
    ) else (
        start /wait "" miniconda.exe /InstallationType=JustMe /RegisterPython=0 /D=!CONDA_DIR!
    )
    if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
    del miniconda.exe
    if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
)

attrib +h !CONDA_DIR!
if !ERRORLEVEL! neq 0 echo Failed to hide the !CONDA_DIR! directory

set PATH=!CONDA_DIR!;!CONDA_DIR!\Scripts;%PATH%

if "%CONDA_ALWAYS_YES%"=="" set CONDA_ALWAYS_YES=no
if "%CONDA_CHANGE_PS1%"=="" set CONDA_CHANGE_PS1=yes

conda config --set always_yes !CONDA_ALWAYS_YES!
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
conda config --set changeps1 !CONDA_CHANGE_PS1!
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
conda update -q conda
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!

echo OFF

Update user_install.bat

Update user_install.bat


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

REM Give the network time to initialize.
ping 127.0.0.1 -n 60

echo "Translate: Starting image translate..." > COM1:

REM Enable inbound communication from the metadata server.
netsh advfirewall firewall add rule name="Allow incoming from GCE metadata server" protocol=ANY remoteip=169.254.169.254 dir=in action=allow

REM Enable outbound communication to the metadata server.
netsh advfirewall firewall add rule name="Allow outgoing to GCE metadata server" protocol=ANY remoteip=169.254.169.254 dir=out action=allow

REM This is needed for 2008R2 networking to work, this will fail on post 2008R2 but that's fine.
for /f "tokens=2 delims=:" %%a in (
  'ipconfig ^| find "Gateway"'
) do (
  netsh interface ipv4 set dnsservers "Local Area Connection" static address=%%a primary
  netsh interface ipv4 set dnsservers "Local Area Connection 2" static address=%%a primary
  netsh interface ipv4 set dnsservers "Local Area Connection 3" static address=%%a primary
)

C:\ProgramData\GooGet\googet.exe -root C:\ProgramData\GooGet -noconfirm install googet > COM1:
REM Install google-compute-engine-metadata-scripts and then run the task.
REM This needs to be on one line as this file will get overwritten.
start cmd /c "C:\ProgramData\GooGet\googet.exe -root C:\ProgramData\GooGet -noconfirm install google-compute-engine-metadata-scripts > COM1: && schtasks /run /tn GCEStartup > COM1:"

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

REM Give the network time to initialize.
ping 127.0.0.1 -n 60

echo "Translate: Starting image translate..." > COM1:

REM Enable inbound communication from the metadata server.
netsh advfirewall firewall add rule name="Allow incoming from GCE metadata server" protocol=ANY remoteip=169.254.169.254 dir=in action=allow

REM Enable outbound communication to the metadata server.
netsh advfirewall firewall add rule name="Allow outgoing to GCE metadata server" protocol=ANY remoteip=169.254.169.254 dir=out action=allow

REM This is needed for 2008R2 networking to work, this will fail on post 2008R2 but that's fine.
for /f "tokens=2 delims=:" %%a in (
  'ipconfig ^| find "Gateway"'
) do (
  netsh interface ipv4 set dnsservers "Local Area Connection" static address=%%a primary
  netsh interface ipv4 set dnsservers "Local Area Connection 2" static address=%%a primary
  netsh interface ipv4 set dnsservers "Local Area Connection 3" static address=%%a primary
)

w32tm /resync

C:\ProgramData\GooGet\googet.exe -root C:\ProgramData\GooGet -noconfirm install googet > COM1:
REM Install google-compute-engine-metadata-scripts and then run the task.
REM This needs to be on one line as this file will get overwritten.
start cmd /c "C:\ProgramData\GooGet\googet.exe -root C:\ProgramData\GooGet -noconfirm install google-compute-engine-metadata-scripts > COM1: && schtasks /run /tn GCEStartup > COM1:"

Fix potential time issues with Windows import (#742)


@rem = ' vim: set filetype=perl: ';
@rem = ' --*-Perl-*-- ';
@rem = '
@echo off
setlocal
set PATH=%~dp0\perl\bin;%~dp0\bin;%PATH%
perl -w "%~f0" %*
exit /B %ERRORLEVEL%
';

# StorScore
#
# Copyright (c) Microsoft Corporation
#
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

use strict;
use warnings;

use File::Basename;
use English;

my $script_name = basename( $PROGRAM_NAME );
my $script_dir = dirname( $PROGRAM_NAME );

unless( scalar @ARGV == 1 )
{
    warn "usage: $script_name OUTFILE\n";
    exit(-1);
}

my $outfile = "$script_dir\\$ARGV[0]";

sub my_exec
{
    my $cmd = shift;

    system( "echo TEST_BEGIN >> $outfile" );
    system( "echo $cmd >> $outfile" );

    system( "$cmd >> $outfile 2>&1" );

    system( "echo TEST_END >> $outfile" );
    system( "echo. >> $outfile" );
}

sub run_one
{
    my $args = shift;

    my $common_args;
    $common_args .= "--target=1234 ";
    $common_args .= "--pretend ";
    $common_args .= "--verbose ";
    $common_args .= "--noprompt ";

    foreach my $target_type ( qw( auto ssd hdd error ) )
    {
        foreach my $recipe ( undef, 'recipes\\corners.rcp' )
        {
            my $cmd = "storscore.cmd $common_args ";

            $cmd .= "--target_type=$target_type ";
            $cmd .= "--recipe=$recipe " if defined $recipe;

            my_exec( "$cmd $args" );
        }
    }
}

unlink( $outfile );
chdir( ".." );

# Preserve existing results directory
rename( "results", "results.orig" );

run_one( "" );
run_one( "--this_flag_does_not_exist" );
run_one( "--initialize" );
run_one( "--noinitialize" );
run_one( "--precondition" );
run_one( "--noprecondition" );
run_one( "--raw_disk" );
run_one( "--active_range=0" );
run_one( "--active_range=1" );
run_one( "--active_range=50" );
run_one( "--active_range=100" );
run_one( "--active_range=110" );
run_one( "--partition_bytes=1000000000" );
run_one( "--partition_bytes=1000000000 --raw_disk" );
run_one( "--demo_mode" );
run_one( "--test_id=regr" );
run_one( "--test_id_prefix=regr" );
run_one( "--nocollect_smart" );
run_one( "--nocollect_logman" );
run_one( "--nocollect_power" );
run_one( "--start_on_step=2" );
run_one( "--stop_on_step=2" );
run_one( "--test_time_override=42" );
run_one( "--warmup_time_override=42" );
run_one( "--compressibility=0" );
run_one( "--compressibility=1" );
run_one( "--compressibility=20" );
run_one( "--compressibility=80" );
run_one( "--compressibility=99" );
run_one( "--results_share=\\\\share\\dir" );
run_one( "--io_generator=diskspd" );
run_one( "--io_generator=sqlio" );
run_one( "--io_generator=bogus" );

# Restore original results directory
system( "rmdir /S /Q results >NUL 2>&1" );
rename( "results.orig", "results" );

# Post process output file to remove noise
rename( $outfile, "$outfile.orig" );

open( my $in, "<$outfile.orig" );
open( my $out, ">$outfile" );

while( my $line = <$in> )
{
    # Remove random temp file names
    $line =~ s/AppData\\\S*//;

    # Remove ETA info
    $line =~ s/\d{2}:\d{2}:\d{2} (AM|PM)//g;

    # Remove time from autogenerated results dir
    if( $line =~ /results/ )
    {
        $line =~ s/-\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}//g;
    }

    # Remove "Done" line with overall runtime
    $line =~ s/^Done.*//;

    print $out $line;
}

close $in;
close $out;

unlink( "$outfile.orig" );

print "Done! Diff $outfile against another run.\n";

@rem = ' vim: set filetype=perl: ';
@rem = ' --*-Perl-*-- ';
@rem = '
@echo off
setlocal
set PATH=%~dp0\perl\bin;%~dp0\bin;%PATH%
perl -w "%~f0" %*
exit /B %ERRORLEVEL%
';

# StorScore
#
# Copyright (c) Microsoft Corporation
#
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

use strict;
use warnings;

use File::Basename;
use English;

my $script_name = basename( $PROGRAM_NAME );
my $script_dir = dirname( $PROGRAM_NAME );

unless( scalar @ARGV == 1 )
{
    warn "usage: $script_name OUTFILE\n";
    exit(-1);
}

my $outfile = "$script_dir\\$ARGV[0]";

sub my_exec
{
    my $cmd = shift;

    system( "echo TEST_BEGIN >> $outfile" );
    system( "echo $cmd >> $outfile" );

    system( "$cmd >> $outfile 2>&1" );

    system( "echo TEST_END >> $outfile" );
    system( "echo. >> $outfile" );
}

sub run_one
{
    my $args = shift;

    my $cmd = "storscore.cmd ";

    $cmd .= "--target=1234 " unless $args =~ /--target=/;

    $cmd .= "--pretend ";
    $cmd .= "--verbose ";
    $cmd .= "--noprompt ";

    my_exec( "$cmd $args" );
}

sub run_matrix
{
    my $args = shift;

    foreach my $target ( undef, 'P:', 'P:\\fake' )
    {
    foreach my $target_type ( qw( auto ssd hdd ) )
    {
    foreach my $recipe ( undef, 'recipes\\corners.rcp' )
    {
        $args .= " --target=$target" if defined $target;
        $args .= " --target_type=$target_type";
        $args .= " --recipe=$recipe" if defined $recipe;

        run_one( $args );
    }
    }
    }
}

unlink( $outfile );
chdir( ".." );

# Preserve existing results directory
rename( "results", "results.orig" );

# Run these error conditions just once
run_one( "--this_flag_does_not_exist" );
run_one( "--io_generator=bogus" );
run_one( "--target_type=bogus" );
run_one( "--active_range=0" );
run_one( "--active_range=110" );
run_one( "--partition_bytes=1000000000 --raw_disk" );
run_one( "--compressibility=110" );

# These are the defaults anyway, so just run them once
run_one( "--initialize" );
run_one( "--precondition" );
run_one( "--active_range=100" );
run_one( "--collect_smart" );
run_one( "--collect_logman" );
run_one( "--collect_power" );
run_one( "--io_generator=diskspd" );

# Run the full matrix on these
run_matrix( "" );
run_matrix( "--noinitialize" );
run_matrix( "--noprecondition" );
run_matrix( "--raw_disk" );
run_matrix( "--active_range=1" );
run_matrix( "--active_range=50" );
run_matrix( "--partition_bytes=1000000000" );
run_matrix( "--demo_mode" );
run_matrix( "--test_id=regr" );
run_matrix( "--test_id_prefix=regr" );
run_matrix( "--nocollect_smart" );
run_matrix( "--nocollect_logman" );
run_matrix( "--nocollect_power" );
run_matrix( "--start_on_step=2" );
run_matrix( "--stop_on_step=2" );
run_matrix( "--test_time_override=42" );
run_matrix( "--warmup_time_override=42" );
run_matrix( "--compressibility=0" );
run_matrix( "--compressibility=1" );
run_matrix( "--compressibility=20" );
run_matrix( "--results_share=\\\\share\\dir" );
run_matrix( "--io_generator=sqlio" );

# Restore original results directory
system( "rmdir /S /Q results >NUL 2>&1" );
rename( "results.orig", "results" );

# Post process output file to remove noise
rename( $outfile, "$outfile.orig" );

open( my $in, "<$outfile.orig" );
open( my $out, ">$outfile" );

while( my $line = <$in> )
{
    # Remove random temp file names
    $line =~ s/AppData\\\S*//;

    # Remove ETA info
    $line =~ s/\d{2}:\d{2}:\d{2} (AM|PM)//g;

    # Remove time from autogenerated results dir
    if( $line =~ /results/ )
    {
        $line =~ s/-\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}//g;
    }

    # Remove "Done" line with overall runtime
    $line =~ s/^Done.*//;

    print $out $line;
}

close $in;
close $out;

unlink( "$outfile.orig" );

print "Done! Diff $outfile against another run.\n";

Expand regress coverage.

Expand regress coverage.


@echo off

set python=%1
if "%1"=="" (
    set python=pypy --jit off -B
    goto START_TEST
)

REM download python from Single Binary Stackless Python
if EXIST C:\Ruby23\bin\ruby.exe (
    set RUBY_EXE=C:\Ruby23\bin\ruby.exe
) else (
    set RUBY_EXE=ruby.exe
)
if "%2"=="2" (
    %RUBY_EXE% test\download_python.rb %python% 2
) else if "%2"=="3" (
    %RUBY_EXE% test\download_python.rb %python% 3
)

:START_TEST
echo Using %python%

del test\test_result.txt teststate.bin command_after_test.txt test\test_result_info.txt test\test_result_simple.txt test\test_result_general.txt > NUL 2>&1

%python% test/test_pause_while_exception_handling.py >> test/test_result_general.txt
if NOT EXIST teststate.bin exit /b 1
%python% test/test_pause_while_exception_handling.py >> test/test_result_general.txt
if NOT EXIST teststate.bin exit /b 1
%python% test/test_pause_while_exception_handling.py >> test/test_result_general.txt
if EXIST teststate.bin exit /b 1

%python% test/check_general_result.py 2
del test\test_result_general.txt
set /P x=.<NUL

rem test.py
for /l %%i in (0, 1, 7) do (
    %python% test/test.py debug >> test/test_result.txt
    if ERRORLEVEL 1 exit /b 1
    timeout /T 1 /NOBREAK > NUL
)

for /l %%i in (0, 1, 7) do (
    %python% test/test.py >> test/test_result_info.txt
    if ERRORLEVEL 1 exit /b 1
    timeout /T 1 /NOBREAK > NUL
)

%python% test/check_result.py > NUL
if ERRORLEVEL 1 exit /b 1
set /P x=.<NUL

rem test_command_after_test.py
%python% test/test_command_after_test.py > NUL
if ERRORLEVEL 1 exit /b 1
if EXIST command_after_test.txt exit /b 1

%python% test/test_command_after_test.py > NUL
if ERRORLEVEL 1 exit /b 1
if NOT EXIST command_after_test.txt exit /b 1

set /P x=.<NUL

%python% test/test_pickle_handling.py > NUL
if ERRORLEVEL 1 exit /b 1
if EXIST teststate.bin exit /b 1

set /P x=.<NUL

%python% test/test_pauser.py > NUL
if ERRORLEVEL 1 exit /b 1
if EXIST teststate.bin exit /b 1

set /P x=.<NUL

%python% test/test_simple_runner.py >> test/test_result_simple.txt
if ERRORLEVEL 1 exit /b 1
if NOT EXIST teststate.bin exit /b 1

%python% test/test_simple_runner.py >> test/test_result_simple.txt
if ERRORLEVEL 1 exit /b 1
if EXIST teststate.bin exit /b 1

%python% test/check_simple_runner_result.py > NUL
if ERRORLEVEL 1 exit /b 1

set /P x=.<NUL

%python% test/test_failure_of_exec_for_reboot.py > NUL 2>&1
if ERRORLEVEL 1 exit /b 1
if EXIST teststate.bin exit /b 1

set /P x=.<NUL

%python% test/test_exec_callback.py > test/test_result_general.txt
if ERRORLEVEL 1 exit /b 1
if EXIST teststate.bin exit /b 1
%python% test/check_general_result.py 1
if ERRORLEVEL 1 exit /b 1

set /P x=.<NUL

echo.
echo OK
exit /b 0

@echo off

set python=%1
if "%1"=="" (
    set python=pypy --jit off -B
    goto START_TEST
)

REM download python from Single Binary Stackless Python
if EXIST C:\Ruby23\bin\ruby.exe (
    set RUBY_EXE=C:\Ruby23\bin\ruby.exe
) else (
    set RUBY_EXE=ruby.exe
)
if "%2"=="2" (
    %RUBY_EXE% test\download_python.rb %python% 2
) else if "%2"=="3" (
    %RUBY_EXE% test\download_python.rb %python% 3
)

:START_TEST
echo Using %python%

del test\test_result.txt teststate.bin command_after_test.txt test\test_result_info.txt test\test_result_simple.txt test\test_result_general.txt > NUL 2>&1

%python% test/test_pause_while_exception_handling.py >> test/test_result_general.txt
if NOT EXIST teststate.bin exit /b 1
%python% test/test_pause_while_exception_handling.py >> test/test_result_general.txt
if NOT EXIST teststate.bin exit /b 1
%python% test/test_pause_while_exception_handling.py >> test/test_result_general.txt
if EXIST teststate.bin exit /b 1

%python% test/check_general_result.py 2
if ERRORLEVEL 1 exit /b 1
del test\test_result_general.txt
set /P x=.<NUL

rem test.py
for /l %%i in (0, 1, 7) do (
    %python% test/test.py debug >> test/test_result.txt
    if ERRORLEVEL 1 exit /b 1
    timeout /T 1 /NOBREAK > NUL
)

for /l %%i in (0, 1, 7) do (
    %python% test/test.py >> test/test_result_info.txt
    if ERRORLEVEL 1 exit /b 1
    timeout /T 1 /NOBREAK > NUL
)

%python% test/check_result.py > NUL
if ERRORLEVEL 1 exit /b 1
set /P x=.<NUL

rem test_command_after_test.py
%python% test/test_command_after_test.py > NUL
if ERRORLEVEL 1 exit /b 1
if EXIST command_after_test.txt exit /b 1

%python% test/test_command_after_test.py > NUL
if ERRORLEVEL 1 exit /b 1
if NOT EXIST command_after_test.txt exit /b 1

set /P x=.<NUL

%python% test/test_pickle_handling.py > NUL
if ERRORLEVEL 1 exit /b 1
if EXIST teststate.bin exit /b 1

set /P x=.<NUL

%python% test/test_pauser.py > NUL
if ERRORLEVEL 1 exit /b 1
if EXIST teststate.bin exit /b 1

set /P x=.<NUL

%python% test/test_simple_runner.py >> test/test_result_simple.txt
if ERRORLEVEL 1 exit /b 1
if NOT EXIST teststate.bin exit /b 1

%python% test/test_simple_runner.py >> test/test_result_simple.txt
if ERRORLEVEL 1 exit /b 1
if EXIST teststate.bin exit /b 1

%python% test/check_simple_runner_result.py > NUL
if ERRORLEVEL 1 exit /b 1

set /P x=.<NUL

%python% test/test_failure_of_exec_for_reboot.py > NUL 2>&1
if ERRORLEVEL 1 exit /b 1
if EXIST teststate.bin exit /b 1

set /P x=.<NUL

%python% test/test_exec_callback.py > test/test_result_general.txt
if ERRORLEVEL 1 exit /b 1
if EXIST teststate.bin exit /b 1
%python% test/check_general_result.py 1
if ERRORLEVEL 1 exit /b 1

set /P x=.<NUL

echo.
echo OK
exit /b 0

Check return value of check_general_result.py


:: Capstone disassembler engine (www.capstone-engine.org)
:: Build Capstone libs for X86 only (capstone.dll & capstone.lib) on Windows with CMake & Nmake
:: By Nguyen Anh Quynh, 2017

:: cmake -DCMAKE_BUILD_TYPE=Release -DCAPSTONE_BUILD_DIET=ON -DCAPSTONE_ARM_SUPPORT=0 -DCAPSTONE_ARM64_SUPPORT=0 -DCAPSTONE_M68K_SUPPORT=0 -DCAPSTONE_MIPS_SUPPORT=0 -DCAPSTONE_PPC_SUPPORT=0 -DCAPSTONE_SPARC_SUPPORT=0 -DCAPSTONE_SYSZ_SUPPORT=0 -DCAPSTONE_XCORE_SUPPORT=0 -DCAPSTONE_TMS320C64X_SUPPORT=0 -DCAPSTONE_BUILD_STATIC_RUNTIME=OFF -G "NMake Makefiles" ..

cmake -DCMAKE_BUILD_TYPE=Release -DCAPSTONE_ARM_SUPPORT=0 -DCAPSTONE_ARM64_SUPPORT=0 -DCAPSTONE_M68K_SUPPORT=0 -DCAPSTONE_MIPS_SUPPORT=0 -DCAPSTONE_PPC_SUPPORT=0 -DCAPSTONE_SPARC_SUPPORT=0 -DCAPSTONE_SYSZ_SUPPORT=0 -DCAPSTONE_XCORE_SUPPORT=0 -DCAPSTONE_TMS320C64X_SUPPORT=0 -DCAPSTONE_BUILD_STATIC_RUNTIME=OFF -G "NMake Makefiles" ..

nmake

:: Capstone disassembler engine (www.capstone-engine.org)
:: Build Capstone libs for X86 only (capstone.dll & capstone.lib) on Windows with CMake & Nmake
:: By Nguyen Anh Quynh, 2017

:: Uncomment below line to compile in Diet mode
:: cmake -DCMAKE_BUILD_TYPE=Release -DCAPSTONE_BUILD_DIET=ON -DCAPSTONE_ARM_SUPPORT=0 -DCAPSTONE_ARM64_SUPPORT=0 -DCAPSTONE_M68K_SUPPORT=0 -DCAPSTONE_MIPS_SUPPORT=0 -DCAPSTONE_PPC_SUPPORT=0 -DCAPSTONE_SPARC_SUPPORT=0 -DCAPSTONE_SYSZ_SUPPORT=0 -DCAPSTONE_XCORE_SUPPORT=0 -DCAPSTONE_TMS320C64X_SUPPORT=0 -DCAPSTONE_EVM_SUPPORT=0 -DCAPSTONE_MOS65XX_SUPPORT=0 -DCAPSTONE_M680X_SUPPORT=0 -DCAPSTONE_BUILD_STATIC_RUNTIME=OFF -G "NMake Makefiles" ..

cmake -DCMAKE_BUILD_TYPE=Release -DCAPSTONE_ARM_SUPPORT=0 -DCAPSTONE_ARM64_SUPPORT=0 -DCAPSTONE_M68K_SUPPORT=0 -DCAPSTONE_MIPS_SUPPORT=0 -DCAPSTONE_PPC_SUPPORT=0 -DCAPSTONE_SPARC_SUPPORT=0 -DCAPSTONE_SYSZ_SUPPORT=0 -DCAPSTONE_XCORE_SUPPORT=0 -DCAPSTONE_TMS320C64X_SUPPORT=0 -DCAPSTONE_EVM_SUPPORT=0 -DCAPSTONE_MOS65XX_SUPPORT=0 -DCAPSTONE_M680X_SUPPORT=0 -DCAPSTONE_BUILD_STATIC_RUNTIME=OFF -G "NMake Makefiles" ..

nmake

disable EVM, MOS65XX & M680X

nmake-x86.bat: disable EVM, MOS65XX & M680X


cd /d %~dp0

mkdir OSVR-Unity-Dist
mkdir OSVR-Unity-Dist\OSVR-Unity
xcopy Managed-OSVR OSVR-Unity-Dist\ /Y /S

cd /d %~dp0

mkdir OSVR-Unity-Dist
mkdir OSVR-Unity-Dist\src
mkdir OSVR-Unity-Dist\src\OSVR-Unity
mkdir OSVR-Unity-Dist\src\Managed-OSVR
xcopy Managed-OSVR OSVR-Unity-Dist\src\Managed-OSVR /Y /S
xcopy OSVR-Unity OSVR-Unity-Dist\src\OSVR-Unity /Y /S

Adjust build to include more source

Adjust build to include more source


setlocal

set BINROOT=%TF_BUILD_BINARIESDIRECTORY%\Release\NuGet
if not exist %BINROOT% echo "Error: '%BINROOT%' does not exist."&goto :eof

set NUGET=%TF_BUILD_SOURCESDIRECTORY%\NuGet.exe
if not exist %NUGET% echo "Error: '%NUGET%' does not exist."&goto :eof

set NUGET_GALLERY=https://www.myget.org/F/applicationinsights/api/v2/package

for /r "%BINROOT%" %%P in (*.nupkg) do call :push %%P
goto :eof

:push
set PACKAGE=%1
if %PACKAGE:.symbols.=% == %PACKAGE% (
    %NUGET% push "%PACKAGE%" %1 -source %NUGET_GALLERY%
)
goto :eof

endlocal

setlocal

set BINROOT=%TF_BUILD_BINARIESDIRECTORY%\Release\NuGet
if not exist %BINROOT% echo "Error: '%BINROOT%' does not exist."&goto :eof

set NUGET=%TF_BUILD_SOURCESDIRECTORY%\NuGet.exe
if not exist %NUGET% echo "Error: '%NUGET%' does not exist."&goto :eof

set NUGET_GALLERY=https://www.myget.org/F/applicationinsights/api/v2/package

for /r "%BINROOT%" %%P in (*.nupkg) do call :push %%P
goto :eof

:push
set PACKAGE=%1
if %PACKAGE:.symbols.=% == %PACKAGE% (
    %NUGET% push "%PACKAGE%" %MYGET_KEY% -source %NUGET_GALLERY%
)
goto :eof

endlocal

change script to get myget key from environment variable


@echo off

cls
echo   ###                ###
echo  # CorpBot - CorpNewt #
echo ###                ###
echo.

set "botFile=Main.py"
set "pyPath=python"
set "autoRestart=No"
set "update=No"

set "thisDir=%~dp0"

goto start

:update
pushd "%thisDir%"
echo Updating...
echo.
git pull origin rewrite
echo.
popd
goto :EOF

:start
if /i "%update%" == "Yes" (
    call :update
)

REM Launch our script - tell it we didn't reboot, and give it python's path
"%pyPath%" "%botFile%" -reboot No -path "%pyPath%"

if /i "%autoRestart%"=="Yes" (
    timeout 10
    goto start
)
pause > nul

Remove pause message

Remove pause message


@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega

Make sure .bat file has CRLF line endings

It had LF line endings before, but Windows may have problems with that.


@echo off

set LEIN_VERSION=1.4.0-SNAPSHOT

if "x%1" == "xself-install" goto SELF_INSTALL
if "x%1" == "xupgrade"      goto NO_UPGRADE

rem it is possible to set LEIN_JAR variable manually
rem so we don't overwrite them
if "x%LEIN_JAR%" == "x" goto SET_LEIN
goto ARGS_HANDLING

:SET_LEIN
set LEIN_DIR=%~dp0
set LEIN_JAR=%LEIN_DIR%leiningen-%LEIN_VERSION%-standalone.jar

:ARGS_HANDLING
if not exist "%LEIN_JAR%" goto NO_LEIN_JAR

rem ##################################################
rem count number of command line arguments
rem
set ARGCOUNT=0
for %%a in (%*) do set /a ARGCOUNT+=1
rem ##################################################

rem ##################################################
rem add jars found under "lib" directory to CLASSPATH
rem

call :FIND_DIR_CONTAINING_UPWARDS project.clj

if "%DIR_CONTAINING%" neq "" cd "%DIR_CONTAINING%"

setLocal EnableDelayedExpansion
set CP="
for /R ./lib %%a in (*.jar) do (
   set CP=!CP!;%%a
)
set CP=!CP!"

set CLASSPATH="%LEIN_JAR%";%CP%;"%CLASSPATH%"
if "x%DEBUG%" == "x" goto RUN
echo CLASSPATH=%CLASSPATH%
rem ##################################################

:RUN
if "x%1" == "xrepl" goto RUN_REPL
if "%ARGCOUNT%" == "2" goto RUN_ARG2
if "%ARGCOUNT%" == "3" goto RUN_ARG3
java -client -cp %CLASSPATH% clojure.main -e "(use 'leiningen.core) (-main \"%1\")"
goto EOF

:RUN_ARG2
java -client -cp %CLASSPATH% clojure.main -e "(use 'leiningen.core) (-main \"%1\" \"%2\")"
goto EOF

:RUN_ARG3
java -client -cp %CLASSPATH% clojure.main -e "(use 'leiningen.core) (-main \"%1\" \"%2\" \"%3\")"
goto EOF

:RUN_REPL
%RLWRAP% java -client %JAVA_OPTS% -cp src;classes;%CLASSPATH% clojure.main %2 %3 %4
goto EOF

:NO_LEIN_JAR
echo.
echo "%LEIN_JAR%" can not be found.
echo You can try running "lein self-install"
echo or change LEIN_JAR environment variable
echo or edit lein.bat to set appropriate LEIN_JAR path.
echo.
goto EOF

:SELF_INSTALL
if exist "%LEIN_JAR%" (
    echo %LEIN_JAR% already exists. Delete and retry.
    goto EOF
)
set HTTP_CLIENT=wget -O
wget>nul 2>&1
if ERRORLEVEL 9009 (
    curl>nul 2>&1
    if ERRORLEVEL 9009 goto NO_HTTP_CLIENT
    set HTTP_CLIENT=curl -f -L -o
)
set LEIN_DIR=%~dp0
set LEIN_JAR=%LEIN_DIR%leiningen-%LEIN_VERSION%-standalone.jar
set LEIN_JAR_URL=http://github.com/downloads/technomancy/leiningen/leiningen-%LEIN_VERSION%-standalone.jar
%HTTP_CLIENT% "%LEIN_JAR%" %LEIN_JAR_URL%
if ERRORLEVEL 1 (
    del "%LEIN_JAR%">nul 2>&1
    goto DOWNLOAD_FAILED
)
goto EOF

:DOWNLOAD_FAILED
echo.
echo *** DOWNLOAD FAILED! Check URL/Version. ***
echo.
goto EOF

:NO_HTTP_CLIENT
echo.
echo ERROR: Wget/Curl not found. Make sure at least either of Wget and Curl is
echo        installed and is in PATH. You can get them from URLs below:
echo.
echo Wget: "http://users.ugent.be/~bpuype/wget/"
echo Curl: "http://curl.haxx.se/dlwiz/?type=bin&os=Win32&flav=-&ver=2000/XP"
echo.
goto EOF

:NO_UPGRADE
echo.
echo Upgrade feature is not available on Windows. Please edit the value of
echo variable LEIN_VERSION in file %~f0
echo then run "lein self-install".
echo.
goto EOF

rem Find directory containing filename supplied in first argument
rem looking in current directory, and looking up the parent
rem chain until we find it, or run out
rem returns result in %DIR_CONTAINING%
rem empty string if we don't find it
:FIND_DIR_CONTAINING_UPWARDS
set DIR_CONTAINING=%CD%
set LAST_DIR=

:LOOK_AGAIN
if "%DIR_CONTAINING%" == "%LAST_DIR%" (
    rem didn't find it
    set DIR_CONTAINING=
    goto :EOF
)

if EXIST "%DIR_CONTAINING%\%1" (
    rem found it - use result in DIR_CONTAINING
    goto :EOF
)

set LAST_DIR=%DIR_CONTAINING%
call :GET_PARENT_PATH "%DIR_CONTAINING%\.."
set DIR_CONTAINING=%PARENT_PATH%
goto :LOOK_AGAIN

:GET_PARENT_PATH
set PARENT_PATH=%~f1
goto :EOF

:EOF

@echo off

set LEIN_VERSION=1.4.0-SNAPSHOT

rem it is possible to set LEIN_JAR variable manually
rem if it's set, don't overwrite it
if "x%LEIN_JAR%" == "x" goto SET_LEIN
goto ARGS_HANDLING

:SET_LEIN
set LEIN_DIR=%~dp0
set LEIN_JAR=%LEIN_DIR%leiningen-%LEIN_VERSION%-standalone.jar

:ARGS_HANDLING
if "x%1" == "xself-install" goto SELF_INSTALL
if "x%1" == "xupgrade"      goto NO_UPGRADE

if not exist "%LEIN_JAR%" goto NO_LEIN_JAR

rem ##################################################
rem count number of command line arguments
rem
set ARGCOUNT=0
for %%a in (%*) do set /a ARGCOUNT+=1
rem ##################################################

rem ##################################################
rem add jars found under "lib" directory to CLASSPATH
rem

call :FIND_DIR_CONTAINING_UPWARDS project.clj

if "%DIR_CONTAINING%" neq "" cd "%DIR_CONTAINING%"

setLocal EnableDelayedExpansion
set CP="
for /R ./lib %%a in (*.jar) do (
   set CP=!CP!;%%a
)
set CP=!CP!"

set CLASSPATH="%LEIN_JAR%";%CP%;"%CLASSPATH%"
if "x%DEBUG%" == "x" goto RUN
echo CLASSPATH=%CLASSPATH%
rem ##################################################

:RUN
if "x%1" == "xrepl" goto RUN_REPL
if "%ARGCOUNT%" == "2" goto RUN_ARG2
if "%ARGCOUNT%" == "3" goto RUN_ARG3
java -client -cp %CLASSPATH% clojure.main -e "(use 'leiningen.core) (-main \"%1\")"
goto EOF

:RUN_ARG2
java -client -cp %CLASSPATH% clojure.main -e "(use 'leiningen.core) (-main \"%1\" \"%2\")"
goto EOF

:RUN_ARG3
java -client -cp %CLASSPATH% clojure.main -e "(use 'leiningen.core) (-main \"%1\" \"%2\" \"%3\")"
goto EOF

:RUN_REPL
%RLWRAP% java -client %JAVA_OPTS% -cp src;classes;%CLASSPATH% clojure.main %2 %3 %4
goto EOF

:NO_LEIN_JAR
echo.
echo "%LEIN_JAR%" can not be found.
echo You can try running "lein self-install"
echo or change LEIN_JAR environment variable
echo or edit lein.bat to set appropriate LEIN_JAR path.
echo.
goto EOF

:SELF_INSTALL
if exist "%LEIN_JAR%" (
    echo %LEIN_JAR% already exists. Delete and retry.
    goto EOF
)
set HTTP_CLIENT=wget -O
wget>nul 2>&1
if ERRORLEVEL 9009 (
    curl>nul 2>&1
    if ERRORLEVEL 9009 goto NO_HTTP_CLIENT
    set HTTP_CLIENT=curl -f -L -o
)
set LEIN_JAR_URL=http://github.com/downloads/technomancy/leiningen/leiningen-%LEIN_VERSION%-standalone.jar
%HTTP_CLIENT% "%LEIN_JAR%" %LEIN_JAR_URL%
if ERRORLEVEL 1 (
    del "%LEIN_JAR%">nul 2>&1
    goto DOWNLOAD_FAILED
)
goto EOF

:DOWNLOAD_FAILED
echo.
echo *** DOWNLOAD FAILED! Check URL/Version. ***
echo.
goto EOF

:NO_HTTP_CLIENT
echo.
echo ERROR: Wget/Curl not found. Make sure at least either of Wget and Curl is
echo        installed and is in PATH. You can get them from URLs below:
echo.
echo Wget: "http://users.ugent.be/~bpuype/wget/"
echo Curl: "http://curl.haxx.se/dlwiz/?type=bin&os=Win32&flav=-&ver=2000/XP"
echo.
goto EOF

:NO_UPGRADE
echo.
echo Upgrade feature is not available on Windows. Please edit the value of
echo variable LEIN_VERSION in file %~f0
echo then run "lein self-install".
echo.
goto EOF

rem Find directory containing filename supplied in first argument
rem looking in current directory, and looking up the parent
rem chain until we find it, or run out
rem returns result in %DIR_CONTAINING%
rem empty string if we don't find it
:FIND_DIR_CONTAINING_UPWARDS
set DIR_CONTAINING=%CD%
set LAST_DIR=

:LOOK_AGAIN
if "%DIR_CONTAINING%" == "%LAST_DIR%" (
    rem didn't find it
    set DIR_CONTAINING=
    goto :EOF
)

if EXIST "%DIR_CONTAINING%\%1" (
    rem found it - use result in DIR_CONTAINING
    goto :EOF
)

set LAST_DIR=%DIR_CONTAINING%
call :GET_PARENT_PATH "%DIR_CONTAINING%\.."
set DIR_CONTAINING=%PARENT_PATH%
goto :LOOK_AGAIN

:GET_PARENT_PATH
set PARENT_PATH=%~f1
goto :EOF

:EOF

Set LEIN_JAR before handling args

Set LEIN_JAR before handling args


@call ..\tools\build.bat vioinput.sln "Win7 Win8 Win10" %*

@echo off
call ..\tools\build.bat vioinput.sln "Win7 Win8 Win10" %*
if errorlevel 1 goto :eof
call ..\tools\build.bat sys\vioinput.vcxproj "Win10_SDV" %*

Add SDV target

vioinput/build: Add SDV target

Signed-off-by: Kostiantyn Kostiuk <88b496cab076c092c564e40d69a70d175fb00bcc@daynix.com>


@if "%_echo%" neq "on" echo off
setlocal

if defined VisualStudioVersion goto :Run

set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if exist %_VSWHERE% (
  for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
)
if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS%
if not exist "%_VSCOMNTOOLS%" (
    echo Error: Visual Studio 2015 or 2017 required.
    echo        Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
    exit /b 1
)

set VSCMD_START_DIR="%~dp0"
call "%_VSCOMNTOOLS%\VsDevCmd.bat"

:Run
powershell -NoProfile -ExecutionPolicy unrestricted -Command "%~dp0run.ps1 -- %*"
exit /b %ERRORLEVEL%

@if "%_echo%" neq "on" echo off
setlocal

if defined VisualStudioVersion goto :Run

set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if exist %_VSWHERE% (
  for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
)
if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS%
if not exist "%_VSCOMNTOOLS%" (
    echo Error: Visual Studio 2015 or 2017 required.
    echo        Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
    exit /b 1
)

set VSCMD_START_DIR="%~dp0"
call "%_VSCOMNTOOLS%\VsDevCmd.bat"

:Run
powershell -NoProfile -ExecutionPolicy unrestricted -Command "%~dp0run.ps1 -- %*"
exit /b %ERRORLEVEL%

Add prerelease check to vswhere to support dogfood VS builds.


@echo off
Nuget.exe restore "Source\MSBuild.Community.Tasks.sln"

NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
Nuget.exe install ILRepack.MSBuild.Task -Version 1.1.0 -Source https://www.myget.org/F/sympa-public/api/v3/index.json -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive

@echo off
Nuget.exe restore "Source\MSBuild.Community.Tasks.sln"

NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
Nuget.exe install ILRepack.MSBuild.Task -Version 1.1.1 -Source https://www.myget.org/F/sympa-public/api/v3/index.json -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive

Use ILRepack.MSBuild.Task 1.1.1 from sympa public myget feed


rem build twice - this is not a typo
rem first time is to build using old version
rem second time is to build using new version
rem both build ensure compatibility on version update

@echo off
setlocal

call :bootstrapbuild || goto :ko
call :build %1 || goto :ko
call :test || goto :ko
goto :ok

:bootstrapbuild
call build-bootstrap.cmd || goto :ko
goto :eof

:build
call build.cmd %1 || goto :ko
call publish.cmd %1 %2 || goto :ko
goto :eof

:test
call test.cmd || goto :ko
goto :eof

:ok
exit /b 0

:ko
echo BUILD FAILURE
exit /b 5

rem build twice - this is not a typo
rem first time is to build using old version
rem second time is to build using new version
rem both build ensure compatibility on version update

@echo off
setlocal

call :bootstrapbuild || goto :ko
call :build %1 %2 || goto :ko
call :test || goto :ko
goto :ok

:bootstrapbuild
call build-bootstrap.cmd || goto :ko
goto :eof

:build
call build.cmd %1 || goto :ko
call publish.cmd %1 %2 || goto :ko
goto :eof

:test
call test.cmd || goto :ko
goto :eof

:ok
exit /b 0

:ko
echo BUILD FAILURE
exit /b 5

add logs

add logs


cd ..
copy .\windowshell\liblua53.a .\src\.  /Y
copy .\windowshell\makefile_liblua .\src\. /Y
copy .\windowshell\libleveldb.a  .\src\leveldb\.  /Y
copy .\windowshell\libmemenv.a .\src\leveldb\.  /Y
copy .\windowshell\autogen-dacrs-man.sh  .  /Y
copy .\windowshell\genbuild.sh .\share\.
pause

cd ..
copy .\windowshell\liblua53.a .\src\.  /Y
copy .\windowshell\makefile_liblua .\src\. /Y
copy .\windowshell\libleveldb.a  .\src\leveldb\.  /Y
copy .\windowshell\libmemenv.a .\src\leveldb\.  /Y
copy .\windowshell\autogen-dacrs-man.sh  .  /Y
copy .\windowshell\genbuild.sh .\share\. /Y
pause

修改start.bat

修改start.bat

Signed-off-by: Walker <4f18429b4e1902c96a66dfba6810478ef7b40d3a@163.com>


@REM
@REM Copyright (c) 2006, 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

:check_java
if "%JAVA_HOME%"=="" goto no_jdk
:check_wks
if "%WORKSPACE%"=="" goto no_wks
:check_ant
if "%ANT_HOME%"=="" goto no_ant
:check_xmlbeans
if "%XMLBEANS_HOME%"=="" goto no_xmlbeans
:check_surfacearea
if not exist %WORKSPACE%\Tools\Jars\SurfaceArea.jar (
  goto no_surfacearea
)
:check_merge
if not exist %WORKSPACE%\Tools\bin\Merge.jar (
  goto no_merge
)

@REM Run Merge
call "java" -cp %CLASSPATH%;%WORKSPACE%\Tools\bin\Merge.jar org.tianocore.Merge.Merge %*

goto end

:no_jdk
@echo.
@echo !!! Please set JAVA_HOME !!!
@echo.
goto check_wks

:no_wks
@echo.
@echo !!! Please set WORKSPACE !!!
@echo.
goto check_ant

:no_ant
@echo.
@echo !!! Please set ANT_HOME !!!
@echo.
goto check_xmlbeans

:no_xmlbeans
@echo.
@echo !!! Please set XMLBEANS_HOME !!!
@echo.
goto end

:no_surfacearea
@echo.
@echo !!! Please run edksetup.bat to build SurfaceArea.jar !!!
@echo.
goto end

:no_merge
@echo.
@echo !!! Please run edksetup.bat to build Merge.jar !!!
@echo.
goto end

:end
@echo on

@REM
@REM Copyright (c) 2006, 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

:check_java
if "%JAVA_HOME%"=="" goto no_jdk
:check_wks
if "%WORKSPACE%"=="" goto no_wks
:check_ant
if "%ANT_HOME%"=="" goto no_ant
:check_xmlbeans
if "%XMLBEANS_HOME%"=="" goto no_xmlbeans
:check_surfacearea
if not exist %WORKSPACE%\Tools\Jars\SurfaceArea.jar (
  goto no_surfacearea
)
:check_merge
if not exist %WORKSPACE%\Tools\bin\Merge.jar (
  goto no_merge
)

@REM Run Merge
call "java" -cp "%CLASSPATH%;%WORKSPACE%\Tools\bin\Merge.jar" org.tianocore.Merge.Merge %*

goto end

:no_jdk
@echo.
@echo !!! Please set JAVA_HOME !!!
@echo.
goto check_wks

:no_wks
@echo.
@echo !!! Please set WORKSPACE !!!
@echo.
goto check_ant

:no_ant
@echo.
@echo !!! Please set ANT_HOME !!!
@echo.
goto check_xmlbeans

:no_xmlbeans
@echo.
@echo !!! Please set XMLBEANS_HOME !!!
@echo.
goto end

:no_surfacearea
@echo.
@echo !!! Please run edksetup.bat to build SurfaceArea.jar !!!
@echo.
goto end

:no_merge
@echo.
@echo !!! Please run edksetup.bat to build Merge.jar !!!
@echo.
goto end

:end
@echo on

Fix the CLASSPATH

Fix the CLASSPATH

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