:: 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=300s -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\goplay
go build ..\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.

echo # ..\misc\cgo\testso
cd ..\misc\cgo\testso
set FAIL=0
call test.bat
cd ..\..\..\src
if %FAIL%==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 run "%GOROOT%\src\cmd\api\run.go"
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=300s -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 runtime/race flag
if errorlevel 1 goto fail
go test -race -run=Output runtime/race
if errorlevel 1 goto fail
go test -race -short flag
if errorlevel 1 goto fail
echo.
:norace

echo # ..\misc\goplay
go build ..\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.

echo # ..\misc\cgo\testso
cd ..\misc\cgo\testso
set FAIL=0
call test.bat
cd ..\..\..\src
if %FAIL%==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 run "%GOROOT%\src\cmd\api\run.go"
if errorlevel 1 goto fail
echo.

echo ALL TESTS PASSED
goto end

:fail
set GOBUILDFAIL=1

:end

add end-to-end test on windows

runtime/race: add end-to-end test on windows

whatever "end-to-end" means here

R=golang-dev, dvyukov
CC=golang-dev
https://codereview.appspot.com/12898044


@set PATH=%~dp0..\target\debug;%PATH%
@set OCTOBUILD_CACHE=%~dp0cache
@set RUST_BACKTRACE=1
@call "%VS120COMNTOOLS%\vsvars32.bat"
cargo build && nmake clean all && echo "OK"

@set PATH=%~dp0..\target\debug;%PATH%
@set OCTOBUILD_CACHE=%~dp0cache
@set RUST_BACKTRACE=1
@call "%VS120COMNTOOLS%\vsvars32.bat"
cargo build --bin octo_cl && nmake clean all && echo "OK"

Build only octo_cl in make.bat for avoid access deny error


rem @echo off
rem set scores=scores.xml
rem set scores=scores-waterpolo.xml
set scores=scores-16B.xml
set output=Output\16B

if EXIST Working goto Working_exists
mkdir Working
:Working_exists

del Working\Graphs\*.* /Q
del %output%\Graphs\*.* /Q

set nxslt=..\lib\nxslt\nxslt.exe
set graphviz=..\lib\GraphViz-2.38\bin
set dotml=..\lib\dotml-1.4

@echo === Apply Templates ===
%nxslt% %scores% Stylesheets\layout-scores.xslt -o Working\scores-layout.xml
rem %nxslt% Working\scores-layout.xml  Stylesheets\extract-link-data.xslt -o Working\linkdata.xml

%nxslt% Working\scores-layout.xml StyleSheets\render-scores-dotml.xslt -o Working\scores.dotml
%nxslt% Working\scores.dotml %dotml%\dotml2dot.xsl -o "Working\scores.gv"
%graphviz%\dot.exe -Tsvg "Working\scores.gv"  -o "%output%\scores.svg"
%graphviz%\dot.exe -Tpng "Working\scores.gv"  -o "%output%\scores.png"
pause

rem @echo off
set scores=scores.xml
rem set scores=scores-waterpolo.xml
rem set scores=scores-16B.xml

set output=Output
rem set output=Output\16B

if EXIST Working goto Working_exists
mkdir Working
:Working_exists

del Working\Graphs\*.* /Q
del %output%\Graphs\*.* /Q

set nxslt=..\lib\nxslt\nxslt.exe
set graphviz=..\lib\GraphViz-2.38\bin
set dotml=..\lib\dotml-1.4

@echo === Apply Templates ===
%nxslt% %scores% Stylesheets\layout-scores.xslt -o Working\scores-layout.xml
rem %nxslt% Working\scores-layout.xml  Stylesheets\extract-link-data.xslt -o Working\linkdata.xml

%nxslt% Working\scores-layout.xml StyleSheets\render-scores-dotml.xslt -o Working\scores.dotml
%nxslt% Working\scores.dotml %dotml%\dotml2dot.xsl -o "Working\scores.gv"
%graphviz%\dot.exe -Tsvg "Working\scores.gv"  -o "%output%\scores.svg"
%graphviz%\dot.exe -Tpng "Working\scores.gv"  -o "%output%\scores.png"
pause

Update build to match demo file.

Update build to match demo file.


cls
call "C:\Program Files\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
cl /c /DEBUG ring_opengl40.c -I "..\..\..\libdepwin\glew\include" -I "..\..\..\libdepwin\freeglut\include" -I"..\..\..\include"
link /DEBUG ring_opengl40.obj  ..\..\..\lib\ring.lib ..\..\..\libdepwin\glew\lib\release\win32\glew32.lib ..\..\..\libdepwin\freeglut\lib\freeglut.lib /DLL /OUT:..\..\..\bin\ring_opengl40.dll /SUBSYSTEM:CONSOLE,"5.01"
del ring_opengl40.obj

cls
call ../../../src/locatevc.bat
cl /c /DEBUG ring_opengl40.c -I "..\..\..\libdepwin\glew\include" -I "..\..\..\libdepwin\freeglut\include" -I"..\..\..\include"
link /DEBUG ring_opengl40.obj  ..\..\..\lib\ring.lib ..\..\..\libdepwin\glew\lib\release\win32\glew32.lib ..\..\..\libdepwin\freeglut\lib\freeglut.lib /DLL /OUT:..\..\..\bin\ring_opengl40.dll /SUBSYSTEM:CONSOLE,"5.01"
del ring_opengl40.obj

Update RingOpenGL 4.0 - buildvc.bat - use locatevc.bat


@echo off
set ildasmFolder=%~1
set ilasmFolder=%~2
set inputFolder=%~3
set inputFilename=%~4
set debug=%~5

mkdir tempSigning
"%ildasmFolder%\sn.exe" -k tempSigning\keyPair.snk
echo Key Written
"%ildasmFolder%\ildasm.exe" "%inputFolder%\%inputFilename%" /out:"tempSigning\%inputFilename%.il"
echo Disassembled
"%ilasmFolder%\ilasm.exe" "tempSigning\%inputFilename%.il" /dll /key=tempSigning\keyPair.snk /output="tempSigning\%inputFilename%"
echo Assembled
move /Y "tempSigning\%inputFilename%" "%inputFolder%\%inputFilename%"
echo Overwritten

IF "%debug%"=="" rmdir /s /q tempSigning

Add bat to help sign unsigned dependencies


@rem Common file shared between external.bat and external-amd64.bat.  Responsible for
@rem fetching external components into the root\.. buildbot directories.

cd ..
@rem XXX: If you need to force the buildbots to start from a fresh environment, uncomment
@rem the following, check it in, then check it out, comment it out, then check it back in.
@rem if exist bzip2-1.0.6 rd /s/q bzip2-1.0.6
@rem if exist tcltk rd /s/q tcltk
@rem if exist tcltk64 rd /s/q tcltk64
@rem if exist tcl8.4.12 rd /s/q tcl8.4.12
@rem if exist tcl8.4.16 rd /s/q tcl8.4.16
@rem if exist tcl-8.4.18.1 rd /s/q tcl-8.4.18.1
@rem if exist tk8.4.12 rd /s/q tk8.4.12
@rem if exist tk8.4.16 rd /s/q tk8.4.16
@rem if exist tk-8.4.18.1 rd /s/q tk-8.4.18.1
@rem if exist db-4.4.20 rd /s/q db-4.4.20
@rem if exist openssl-1.0.1c rd /s/q openssl-1.0.1c
@rem if exist sqlite-3.7.12 rd /s/q sqlite-3.7.12

@rem bzip
if not exist bzip2-1.0.6 (
   rd /s/q bzip2-1.0.5
  svn export http://svn.python.org/projects/external/bzip2-1.0.6
)

@rem OpenSSL
if not exist openssl-1.0.0c (
    rd /s/q openssl-1.0.0j
    svn export http://svn.python.org/projects/external/openssl-1.0.0c
)

@rem tcl/tk
if not exist tcl-8.5.11.0 (
   rd /s/q tcltk tcltk64
   svn export http://svn.python.org/projects/external/tcl-8.5.11.0
)
if not exist tk-8.5.11.0 svn export http://svn.python.org/projects/external/tk-8.5.11.0

@rem sqlite3
if not exist sqlite-3.7.12 (
  rd /s/q sqlite-source-3.7.4
  svn export http://svn.python.org/projects/external/sqlite-3.7.12
)

@rem lzma
if not exist xz-5.0.3 (
  svn export http://svn.python.org/projects/external/xz-5.0.3
)

@rem Common file shared between external.bat and external-amd64.bat.  Responsible for
@rem fetching external components into the root\.. buildbot directories.

cd ..
@rem XXX: If you need to force the buildbots to start from a fresh environment, uncomment
@rem the following, check it in, then check it out, comment it out, then check it back in.
@rem if exist bzip2-1.0.6 rd /s/q bzip2-1.0.6
@rem if exist tcltk rd /s/q tcltk
@rem if exist tcltk64 rd /s/q tcltk64
@rem if exist tcl8.4.12 rd /s/q tcl8.4.12
@rem if exist tcl8.4.16 rd /s/q tcl8.4.16
@rem if exist tcl-8.4.18.1 rd /s/q tcl-8.4.18.1
@rem if exist tk8.4.12 rd /s/q tk8.4.12
@rem if exist tk8.4.16 rd /s/q tk8.4.16
@rem if exist tk-8.4.18.1 rd /s/q tk-8.4.18.1
@rem if exist db-4.4.20 rd /s/q db-4.4.20
@rem if exist openssl-1.0.1c rd /s/q openssl-1.0.1c
@rem if exist sqlite-3.7.12 rd /s/q sqlite-3.7.12

@rem bzip
if not exist bzip2-1.0.6 (
   rd /s/q bzip2-1.0.5
  svn export http://svn.python.org/projects/external/bzip2-1.0.6
)

@rem OpenSSL
if not exist openssl-1.0.1c (
    rd /s/q openssl-1.0.0j
    svn export http://svn.python.org/projects/external/openssl-1.0.1c
)

@rem tcl/tk
if not exist tcl-8.5.11.0 (
   rd /s/q tcltk tcltk64
   svn export http://svn.python.org/projects/external/tcl-8.5.11.0
)
if not exist tk-8.5.11.0 svn export http://svn.python.org/projects/external/tk-8.5.11.0

@rem sqlite3
if not exist sqlite-3.7.12 (
  rd /s/q sqlite-source-3.7.4
  svn export http://svn.python.org/projects/external/sqlite-3.7.12
)

@rem lzma
if not exist xz-5.0.3 (
  svn export http://svn.python.org/projects/external/xz-5.0.3
)

Fix typo.

Fix typo.


rem @echo off
set VIBE_BIN=%~dps0
set LIBDIR=%VIBE_BIN%..\lib\win-i386
set BINDIR=%VIBE_BIN%..\lib\bin
set LIBS="%LIBDIR%\event2.lib" "%LIBDIR%\eay.lib" "%LIBDIR%\ssl.lib" ws2_32.lib
set EXEDIR=%TEMP%\.rdmd\source
set START_SCRIPT=%EXEDIR%\vibe.cmd

if NOT EXIST %EXEDIR% (
	mkdir %EXEDIR%
)
copy "%VIBE_BIN%*.dll" %EXEDIR% > nul 2>&1
copy "%VIBE_BIN%*.dll" . > nul 2>&1
copy "%VIBE_BIN%vpm.d" %EXEDIR% > nul 2>&1

rem Run, execute, do everything.. but when you do it, do it with the vibe!
rdmd -debug -g -w -property -of%EXEDIR%\vpm.exe -I%VIBE_BIN%..\source %LIBS% %EXEDIR%\vpm.d %VIBE_BIN% %START_SCRIPT% %1 %2 %3 %4 %5 %6 %7 %8 %9

rem Finally, start the app, if vpm succeded.
if ERRORLEVEL 0 %START_SCRIPT%

Put back the @echo off..

Put back the @echo off..


@echo off
::ϵͳ
::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
::û
::HKEY_CURRENT_USER\Environment

set regOgrepath=HKEY_CURRENT_USER\Environment

::BINĿ¼
set regBINName=NFBIN_HOME
set regBINValue=D:\NoahGameFrame\trunk\_Out\Client\Bin
reg add "%regOgrepath%" /v "%regBINName%" /d "%regBINValue%" /f

::SERVER_BINĿ¼
set regSERVERBINName=NFBIN_SERVER
set regSERVERBINValue=D:\NoahGameFrame\trunk\_Out\Server
reg add "%regOgrepath%" /v "%regSERVERBINName%" /d "%regSERVERBINValue%" /f

::COMM_BINĿ¼
set regCOMMBINName=NFBIN_COMM
set regCOMMBINValue=D:\NoahGameFrame\trunk\_Out\Comm
reg add "%regOgrepath%" /v "%regCOMMBINName%" /d "%regCOMMBINValue%" /f

::NF_HOMEĿ¼
set regNF_HOMEName=NF_HOME
set regNF_HOMEValue=D:\NoahGameFrame\trunk\\
reg add "%regOgrepath%" /v "%regNF_HOMEName%" /d "%regNF_HOMEValue%" /f

::APP_LIBĿ¼
set regAPP_LIBName=APP_DEPLIB
set regAPP_LIBVALUE=D:\NoahGameFrame\trunk\Dependencies\lib\\
reg add "%regOgrepath%" /v "%regAPP_LIBName%" /d "%regAPP_LIBVALUE%" /f

::NF_NOSQL_NETĿ¼
set regNF_HOMEName=NF_NOSQL_NET
set regNF_HOMEValue=D:\NoahGameFrame\trunk\Dependencies\redis-cplusplus-client\msvc\anet_win32\\
reg add "%regOgrepath%" /v "%regNF_HOMEName%" /d "%regNF_HOMEValue%" /f

::BOOST
set regBOOSTName=BOOST_HOME
set regBOOSTValue=D:\NoahGameFrame\trunk\Dependencies\boost_1_53_0\\
reg add "%regOgrepath%" /v "%regBOOSTName%" /d "%regBOOSTValue%" /f

::BOOSTLIB
set regBOOSTLIBName=BOOST_LIB
set regBOOSTLIBValue=D:\NoahGameFrame\trunk\Dependencies\boost_1_53_0\stage\lib\x64\vs11_0
reg add "%regOgrepath%" /v "%regBOOSTLIBName%" /d "%regBOOSTLIBValue%" /f

::Dependencies
set regDEPName=NF_DEP
set regDEPNameValue=D:\NoahGameFrame\trunk\Dependencies\\
reg add "%regOgrepath%" /v "%regDEPName%" /d "%regDEPNameValue%" /f

::GLOGĿ¼
set regGLOGName=GLOG_HOME
set regGLOGValue=D:\NoahGameFrame\trunk\Dependencies\glog-0.3.3\src\windows\\
reg add "%regOgrepath%" /v "%regGLOGName%" /d "%regGLOGValue%" /f

::TheronĿ¼
set regTHERONName=THERON_HOME
set regTHERONValue=D:\NoahGameFrame\trunk\Dependencies\Theron-6.00.01\Include\\
reg add "%regOgrepath%" /v "%regTHERONName%" /d "%regTHERONValue%" /f

echo Set Environment end

rem ====================================================================================
echo Start to extract boost_1_53_0

cd Tool
7z x "..\Dependencies\boost_1_53_0.zip" -o"..\Dependencies\" -y

echo Extract boost_1_53_0 completed!
rem ====================================================================================

pause

@echo off
::ϵͳ
::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
::û
::HKEY_CURRENT_USER\Environment

set regOgrepath=HKEY_CURRENT_USER\Environment

::BINĿ¼
set regBINName=NFBIN_HOME
set regBINValue=D:\NoahGameFrame\trunk\_Out\Client\Bin
reg add "%regOgrepath%" /v "%regBINName%" /d "%regBINValue%" /f

::SERVER_BINĿ¼
set regSERVERBINName=NFBIN_SERVER
set regSERVERBINValue=D:\NoahGameFrame\trunk\_Out\Server
reg add "%regOgrepath%" /v "%regSERVERBINName%" /d "%regSERVERBINValue%" /f

::COMM_BINĿ¼
set regCOMMBINName=NFBIN_COMM
set regCOMMBINValue=D:\NoahGameFrame\trunk\_Out\Comm
reg add "%regOgrepath%" /v "%regCOMMBINName%" /d "%regCOMMBINValue%" /f

::NF_HOMEĿ¼
set regNF_HOMEName=NF_HOME
set regNF_HOMEValue=D:\NoahGameFrame\trunk\\
reg add "%regOgrepath%" /v "%regNF_HOMEName%" /d "%regNF_HOMEValue%" /f

::APP_LIBĿ¼
set regAPP_LIBName=APP_DEPLIB
set regAPP_LIBVALUE=D:\NoahGameFrame\trunk\Dependencies\lib\\
reg add "%regOgrepath%" /v "%regAPP_LIBName%" /d "%regAPP_LIBVALUE%" /f

::NF_NOSQL_NETĿ¼
set regNF_HOMEName=NF_NOSQL_NET
set regNF_HOMEValue=D:\NoahGameFrame\trunk\Dependencies\redis-cplusplus-client\msvc\anet_win32\\
reg add "%regOgrepath%" /v "%regNF_HOMEName%" /d "%regNF_HOMEValue%" /f

::BOOST
set regBOOSTName=BOOST_HOME
set regBOOSTValue=D:\NoahGameFrame\trunk\Dependencies\boost_1_53_0\\
reg add "%regOgrepath%" /v "%regBOOSTName%" /d "%regBOOSTValue%" /f

::BOOSTLIB
set regBOOSTLIBName=BOOST_LIB
set regBOOSTLIBValue=D:\NoahGameFrame\trunk\Dependencies\boost_1_53_0\stage\lib\x64\vs11_0
reg add "%regOgrepath%" /v "%regBOOSTLIBName%" /d "%regBOOSTLIBValue%" /f

::Dependencies
set regDEPName=NF_DEP
set regDEPNameValue=D:\NoahGameFrame\trunk\Dependencies\\
reg add "%regOgrepath%" /v "%regDEPName%" /d "%regDEPNameValue%" /f

::GLOGĿ¼
set regGLOGName=GLOG_HOME
set regGLOGValue=D:\NoahGameFrame\trunk\Dependencies\glog-0.3.3\src\windows\\
reg add "%regOgrepath%" /v "%regGLOGName%" /d "%regGLOGValue%" /f

::TheronĿ¼
set regTHERONName=THERON_HOME
set regTHERONValue=D:\NoahGameFrame\trunk\Dependencies\Theron-6.00.01\Include\\
reg add "%regOgrepath%" /v "%regTHERONName%" /d "%regTHERONValue%" /f

echo Set Environment end

rem ====================================================================================
echo Start to extract boost_1_53_0

cd Tool
7z x "..\Dependencies\boost_1_53_0.zip" -o"..\Dependencies\" -y

echo Extract boost_1_53_0 completed!
rem ====================================================================================

echo Start to extract nessasery lib

7z x "..\Dependencies\lib.zip" -o"..\Dependencies\" -y

echo Extract nessasery lib completed!
rem ====================================================================================

pause

compress lib as zip pack

compress lib as zip pack


@echo off
copy *.nupkg C:\users\allan.ritchie\dropbox\nuget\ /y
rem nuget push *.nupkg
pause

@echo off
copy *.nupkg C:\users\allan.ritchie\dropbox\nuget\ /y
nuget push *.nupkg
pause

update push

update push


@ECHO off
if /I %1 == default goto :default
if /I %1 == init goto :init
if /I %1 == lint goto :lint
if /I %1 == test goto :test
if /I %1 == clean goto :clean

goto :eof ::can be ommited to run the `default` function similarly to makefiles

:default
goto :test

:init
pip install -r requirements.txt
goto :eof

:lint
python -m flake8 ./bechtel
goto :eof

:test
nosetests tests
goto :eof

:clean
del /S *.pyc
goto :eof

@ECHO off
if /I %1 == default goto :default
if /I %1 == init goto :init
if /I %1 == lint goto :lint
if /I %1 == test goto :test
if /I %1 == clean goto :clean
if /I %1 == build goto :build

goto :eof ::can be ommited to run the `default` function similarly to makefiles

:default
goto :test

:init
pip install -r requirements.txt
goto :eof

:lint
python -m flake8 ./bechtel
goto :eof

:test
nosetests tests
goto :eof

:clean
del /S *.pyc
rmdir /S /Q coverage
rmdir /S /Q dist
rmdir /S /Q build
rmdir /S /Q pybbn.egg-info
del .coverage
del .noseids
goto :eof

:build
python setup.py bdist_egg
goto :eof

add build task + clean up

add build task + clean up


REM modified version of brainman's batch file at https://groups.google.com/forum/#!topic/golang-nuts/QVPKm7pbhds

REM setting goroot to my go installation folder.
set GOROOT=C:\go

REM setting gopath to my go playground folder
set GOPATH=C:\Users\wkrause\Documents\gocode\
Set GOBIN=%GOPATH%\bin
set PATH=%PATH%;c:\go\bin;%GOBIN%

REM finally make my playground source folder as my PWD, write your hello.go here and execute "go install" and check GOBIN folder for exe.
cd %GOPATH%\src
CMD

Create go.bat

Create go.bat


@echo off

set DEBUGVARS=/Od /Zi /openmp
set RELEASEVARS=/O2 /Oi /openmp

set code=..\code\main.cpp

set includes=/I "..\deps\includes"

set libs=/link opengl32.lib^
		/LIBPATH:..\deps\libs\ SDL2.lib SDL2main.lib glew32.lib assimp.lib

set options=%DEBUGVARS% %code% %includes% %libs%

mkdir ..\bin
xcopy /D "..\deps\libs\*.dll" "..\bin\"

pushd ..\bin
cl -EHsc %options% /SUBSYSTEM:CONSOLE
popd

@echo off

set DEBUGVARS=/Od /Zi
set RELEASEVARS=/O2 /Oi

set code=..\code\main.cpp

set includes=/I "..\deps\includes"

set libs=/link opengl32.lib^
		/LIBPATH:..\deps\libs\ SDL2.lib SDL2main.lib glew32.lib assimp.lib

set options=%DEBUGVARS% %code% %includes% %libs%

mkdir ..\bin
xcopy /D "..\deps\libs\*.dll" "..\bin\"

pushd ..\bin
cl -EHsc %options% /SUBSYSTEM:CONSOLE
popd

Remove openmp

Remove openmp


@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" );

# 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}//;
    }

    # 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 $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" );

# 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}//;
    }

    # 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";

Add regress coverage for --results_share.


:: This batch file handles managing an Erlang node as a Windows service.
::
:: Commands provided:
::
:: * install - install the release as a Windows service
:: * start - start the service and Erlang node
:: * stop - stop the service and Erlang node
:: * restart - run the stop command and start command
:: * uninstall - uninstall the service and kill a running node
:: * ping - check if the node is running
:: * console - start the Erlang release in a `werl` Windows shell
:: * attach - connect to a running node and open an interactive console
:: * list - display a listing of installed Erlang services
:: * usage - display available commands

:: Set variables that describe the release
@set rel_name=emqx
@set rel_vsn={{ rel_vsn }}
@set erts_vsn={{ erts_vsn }}
@set erl_opts={{ erl_opts }}

@set script=%~n0

:: Discover the release root directory from the directory
:: of this script
@set script_dir=%~dp0
@for %%A in ("%script_dir%\..") do @(
  set rel_root_dir=%%~fA
)
@set rel_dir=%rel_root_dir%\releases\%rel_vsn%

@set etc_dir=%rel_root_dir%\etc
@set lib_dir=%rel_root_dir%\lib
@set data_dir=%rel_root_dir%\data
@set emqx_conf=%etc_dir%\emqx.conf

@call :find_erts_dir
@call :find_vm_args
@call :find_sys_config
@call :set_boot_script_var

@set service_name=%rel_name%_%rel_vsn%
@set bindir=%erts_dir%\bin
@set progname=erl.exe
@set clean_boot_script=%rel_root_dir%\bin\start_clean
@set erlsrv="%bindir%\erlsrv.exe"
@set epmd="%bindir%\epmd.exe"
@set escript="%bindir%\escript.exe"
@set werl="%bindir%\werl.exe"
@set erl_exe="%bindir%\erl.exe"
@set nodetool="%rel_root_dir%\bin\nodetool"
@set cuttlefish="%rel_root_dir%\bin\cuttlefish"
@set node_type="-name"

:: Extract node name from emqx.conf
@for /f "usebackq delims=\= tokens=2" %%I in (`findstr /b node\.name "%emqx_conf%"`) do @(
  @call :set_trim node_name %%I
)

:: Extract node cookie from emqx.conf
@for /f "usebackq delims=\= tokens=2" %%I in (`findstr /b node\.cookie "%emqx_conf%"`) do @(
  @call :set_trim node_cookie= %%I
)

:: Write the erl.ini file to set up paths relative to this script
@call :write_ini

:: If a start.boot file is not present, copy one from the named .boot file
@if not exist "%rel_dir%\start.boot" (
  copy "%rel_dir%\%rel_name%.boot" "%rel_dir%\start.boot" >nul
)

@if "%1"=="install" @goto install
@if "%1"=="uninstall" @goto uninstall
@if "%1"=="start" @goto start
@if "%1"=="stop" @goto stop
@if "%1"=="restart" @call :stop && @goto start
::@if "%1"=="upgrade" @goto relup
::@if "%1"=="downgrade" @goto relup
@if "%1"=="console" @goto console
@if "%1"=="ping" @goto ping
@if "%1"=="list" @goto list
@if "%1"=="attach" @goto attach
@if "%1"=="" @goto usage
@echo Unknown command: "%1"

@goto :eof

:: Find the ERTS dir
:find_erts_dir
@set possible_erts_dir=%rel_root_dir%\erts-%erts_vsn%
@if exist "%possible_erts_dir%" (
  call :set_erts_dir_from_default
) else (
  call :set_erts_dir_from_erl
)
@goto :eof

:: Set the ERTS dir from the passed in erts_vsn
:set_erts_dir_from_default
@set erts_dir=%possible_erts_dir%
@set rootdir=%rel_root_dir%
@goto :eof

:: Set the ERTS dir from erl
:set_erts_dir_from_erl
@for /f "delims=" %%i in ('where erl') do @(
  set erl=%%i
)
@set dir_cmd="%erl%" -noshell -eval "io:format(\"~s\", [filename:nativename(code:root_dir())])." -s init stop
@for /f %%i in ('%%dir_cmd%%') do @(
  set erl_root=%%i
)
@set erts_dir=%erl_root%\erts-%erts_vsn%
@set rootdir=%erl_root%
@goto :eof

:find_vm_args
@set possible_vm=%etc_dir%\vm.args
@if exist %possible_vm% (
  set args_file=-args_file "%possible_vm%"
)
@goto :eof

:: Find the sys.config file
:find_sys_config
@set possible_sys=%etc_dir%\sys.config
@if exist %possible_sys% (
  set sys_config=-config "%possible_sys%"
)
@goto :eof

:create_mnesia_dir
@set create_dir_cmd=%escript% %nodetool% mnesia_dir %data_dir%\mnesia %node_name%
@for /f "delims=" %%Z in ('%%create_dir_cmd%%') do @(
  set mnesia_dir=%%Z
)
@goto :eof

:generate_app_config
@set mergeconf_cmd=%escript% %nodetool% mergeconf %etc_dir%\emqx.conf %etc_dir%\plugins %data_dir%\configs
@for /f %%Z in ('%%mergeconf_cmd%%') do @(
  set merged_app_conf=%%Z
)
@set gen_config_cmd=%escript% %cuttlefish% -s %rel_dir%\schema -c %merged_app_conf% -d %data_dir%\configs generate
@for /f "delims=" %%A in ('%%gen_config_cmd%%') do @(
  set generated_config_args=%%A
)
@goto :eof

:: set boot_script variable
:set_boot_script_var
@if exist "%rel_dir%\%rel_name%.boot" (
  set boot_script=%rel_dir%\%rel_name%
) else (
  set boot_script=%rel_dir%\start
)
@goto :eof

:: Write the erl.ini file
:write_ini
@set erl_ini=%erts_dir%\bin\erl.ini
@set converted_bindir=%bindir:\=\\%
@set converted_rootdir=%rootdir:\=\\%
@echo [erlang] > "%erl_ini%"
@echo Bindir=%converted_bindir% >> "%erl_ini%"
@echo Progname=%progname% >> "%erl_ini%"
@echo Rootdir=%converted_rootdir% >> "%erl_ini%"
@goto :eof

:: Display usage information
:usage
@echo usage: %~n0 ^(install^|uninstall^|start^|stop^|restart^|console^|ping^|list^|attach^)
@goto :eof

:: Install the release as a Windows service
:: or install the specified version passed as argument
:install
@if "" == "%2" (
  call :create_mnesia_dir
  call :generate_app_config
  :: Install the service
  set args="-boot %boot_script% %sys_config% %generated_config_args% -mnesia dir '%mnesia_dir%'"
  set description=EMQ node %node_name% in %rootdir%
  %erlsrv% add %service_name% %node_type% "%node_name%" -on restart -d new -c "%description%" ^
           -w "%rootdir%" -m %erl_exe% -args %args% ^
           -stopaction "init:stop()."
) else (
  :: relup and reldown
  goto relup
)
@goto :eof

:: Uninstall the Windows service
:uninstall
@%erlsrv% remove %service_name%
@%epmd% -kill
@goto :eof

:: Start the Windows service
:start
:: window service?
:: @%erlsrv% start %service_name%
@call :create_mnesia_dir
@call :generate_app_config
@set args=-detached %sys_config% %args_file% %generated_config_args% -mnesia dir '%mnesia_dir%'
@echo off
cd /d %rel_root_dir%
@echo on
@start "%rel_name%" %werl% -boot "%boot_script%" %args%
@goto :eof

:: Stop the Windows service
:stop
:: window service?
:: @%erlsrv% stop %service_name%
@%escript% %nodetool% %node_type% %node_name% -setcookie %node_cookie% stop
@goto :eof

:: Relup and reldown
:relup
@if "" == "%2" (
  echo Missing package argument
  echo Usage: %rel_name% %1 {package base name}
  echo NOTE {package base name} MUST NOT include the .tar.gz suffix
  set ERRORLEVEL=1
  exit /b %ERRORLEVEL%
)
@%escript% "%rootdir%/bin/install_upgrade.escript" "%rel_name%" "%node_name%" "%node_cookie%" "%2"
@goto :eof

:: Start a console
:console
@call :create_mnesia_dir
@call :generate_app_config
@set args=%sys_config% %args_file% %generated_config_args% -mnesia dir '%mnesia_dir%'
@echo off
cd /d %rel_root_dir%
@echo on
@start "bin\%rel_name% console" %werl% -boot "%boot_script%" %args%
@goto :eof

:: Ping the running node
:ping
@%escript% %nodetool% ping %node_type% "%node_name%" -setcookie "%node_cookie%"
@goto :eof

:: List installed Erlang services
:list
@%erlsrv% list %service_name%
@goto :eof

:: Attach to a running node
:attach
:: @start "%node_name% attach"
@start "%node_name% attach" %werl% -boot "%clean_boot_script%" ^
  -remsh %node_name% %node_type% console_%node_name% -setcookie %node_cookie%
@goto :eof

:: Trim variable
:set_trim
@set %1=%2
@goto :eof

:: This batch file handles managing an Erlang node as a Windows service.
::
:: Commands provided:
::
:: * install - install the release as a Windows service
:: * start - start the service and Erlang node
:: * stop - stop the service and Erlang node
:: * restart - run the stop command and start command
:: * uninstall - uninstall the service and kill a running node
:: * ping - check if the node is running
:: * console - start the Erlang release in a `werl` Windows shell
:: * attach - connect to a running node and open an interactive console
:: * list - display a listing of installed Erlang services
:: * usage - display available commands

:: Set variables that describe the release
@set rel_name=emqx
@set rel_vsn={{ rel_vsn }}
@set erts_vsn={{ erts_vsn }}
@set erl_opts={{ erl_opts }}

@set script=%~n0

:: Discover the release root directory from the directory
:: of this script
@set script_dir=%~dp0
@for %%A in ("%script_dir%\..") do @(
  set rel_root_dir=%%~fA
)
@set rel_dir=%rel_root_dir%\releases\%rel_vsn%

@set etc_dir=%rel_root_dir%\etc
@set lib_dir=%rel_root_dir%\lib
@set data_dir=%rel_root_dir%\data
@set emqx_conf=%etc_dir%\emqx.conf

@call :find_erts_dir
@call :find_vm_args
@call :find_sys_config
@call :set_boot_script_var

@set service_name=%rel_name%_%rel_vsn%
@set bindir=%erts_dir%\bin
@set progname=erl.exe
@set clean_boot_script=%rel_root_dir%\bin\start_clean
@set erlsrv="%bindir%\erlsrv.exe"
@set epmd="%bindir%\epmd.exe"
@set escript="%bindir%\escript.exe"
@set werl="%bindir%\werl.exe"
@set erl_exe="%bindir%\erl.exe"
@set nodetool="%rel_root_dir%\bin\nodetool"
@set cuttlefish="%rel_root_dir%\bin\cuttlefish"
@set node_type="-name"

:: Extract node name from emqx.conf
@for /f "usebackq delims=\= tokens=2" %%I in (`findstr /b node\.name "%emqx_conf%"`) do @(
  @call :set_trim node_name %%I
)

:: Extract node cookie from emqx.conf
@for /f "usebackq delims=\= tokens=2" %%I in (`findstr /b node\.cookie "%emqx_conf%"`) do @(
  @call :set_trim node_cookie= %%I
)

:: Write the erl.ini file to set up paths relative to this script
@call :write_ini

:: If a start.boot file is not present, copy one from the named .boot file
@if not exist "%rel_dir%\start.boot" (
  copy "%rel_dir%\%rel_name%.boot" "%rel_dir%\start.boot" >nul
)

@if "%1"=="install" @goto install
@if "%1"=="uninstall" @goto uninstall
@if "%1"=="start" @goto start
@if "%1"=="stop" @goto stop
@if "%1"=="restart" @call :stop && @goto start
::@if "%1"=="upgrade" @goto relup
::@if "%1"=="downgrade" @goto relup
@if "%1"=="console" @goto console
@if "%1"=="ping" @goto ping
@if "%1"=="list" @goto list
@if "%1"=="attach" @goto attach
@if "%1"=="" @goto usage
@echo Unknown command: "%1"

@goto :eof

:: Find the ERTS dir
:find_erts_dir
@set possible_erts_dir=%rel_root_dir%\erts-%erts_vsn%
@if exist "%possible_erts_dir%" (
  call :set_erts_dir_from_default
) else (
  call :set_erts_dir_from_erl
)
@goto :eof

:: Set the ERTS dir from the passed in erts_vsn
:set_erts_dir_from_default
@set erts_dir=%possible_erts_dir%
@set rootdir=%rel_root_dir%
@goto :eof

:: Set the ERTS dir from erl
:set_erts_dir_from_erl
@for /f "delims=" %%i in ('where erl') do @(
  set erl=%%i
)
@set dir_cmd="%erl%" -noshell -eval "io:format(\"~s\", [filename:nativename(code:root_dir())])." -s init stop
@for /f %%i in ('%%dir_cmd%%') do @(
  set erl_root=%%i
)
@set erts_dir=%erl_root%\erts-%erts_vsn%
@set rootdir=%erl_root%
@goto :eof

:find_vm_args
@set possible_vm=%etc_dir%\vm.args
@if exist %possible_vm% (
  set args_file=-args_file "%possible_vm%"
)
@goto :eof

:: Find the sys.config file
:find_sys_config
@set possible_sys=%etc_dir%\sys.config
@if exist %possible_sys% (
  set sys_config=-config "%possible_sys%"
)
@goto :eof

:create_mnesia_dir
@set create_dir_cmd=%escript% %nodetool% mnesia_dir %data_dir%\mnesia %node_name%
@for /f "delims=" %%Z in ('%%create_dir_cmd%%') do @(
  set mnesia_dir=%%Z
)
@goto :eof

:generate_app_config
@set mergeconf_cmd=%escript% %nodetool% mergeconf %etc_dir%\emqx.conf %etc_dir%\plugins %data_dir%\configs
@for /f %%Z in ('%%mergeconf_cmd%%') do @(
  set merged_app_conf=%%Z
)
@set gen_config_cmd=%escript% %cuttlefish% -s %rel_dir%\schema -c %merged_app_conf% -d %data_dir%\configs generate
@for /f "delims=" %%A in ('%%gen_config_cmd%%') do @(
  set generated_config_args=%%A
)
@goto :eof

:: set boot_script variable
:set_boot_script_var
@if exist "%rel_dir%\%rel_name%.boot" (
  set boot_script=%rel_dir%\%rel_name%
) else (
  set boot_script=%rel_dir%\start
)
@goto :eof

:: Write the erl.ini file
:write_ini
@set erl_ini=%erts_dir%\bin\erl.ini
@set converted_bindir=%bindir:\=\\%
@set converted_rootdir=%rootdir:\=\\%
@echo [erlang] > "%erl_ini%"
@echo Bindir=%converted_bindir% >> "%erl_ini%"
@echo Progname=%progname% >> "%erl_ini%"
@echo Rootdir=%converted_rootdir% >> "%erl_ini%"
@goto :eof

:: Display usage information
:usage
@echo usage: %~n0 ^(install^|uninstall^|start^|stop^|restart^|console^|ping^|list^|attach^)
@goto :eof

:: Install the release as a Windows service
:: or install the specified version passed as argument
:install
@call :create_mnesia_dir
@call :generate_app_config
:: Install the service
@set args="-boot %boot_script% %sys_config% %generated_config_args% -mnesia dir '%mnesia_dir%'"
@set description=EMQ node %node_name% in %rootdir%
@if "" == "%2" (
  %erlsrv% add %service_name% %node_type% "%node_name%" -on restart -d new -c "%description%" ^
           -w "%rootdir%" -m %erl_exe% -args %args% ^
           -st "init:stop()."
) else (
  :: relup and reldown
  goto relup
)
@goto :eof

:: Uninstall the Windows service
:uninstall
@%erlsrv% remove %service_name%
@%epmd% -kill
@goto :eof

:: Start the Windows service
:start
:: window service?
:: @%erlsrv% start %service_name%
@call :create_mnesia_dir
@call :generate_app_config
@set args=-detached %sys_config% %args_file% %generated_config_args% -mnesia dir '%mnesia_dir%'
@echo off
cd /d %rel_root_dir%
@echo on
@start "%rel_name%" %werl% -boot "%boot_script%" %args%
@goto :eof

:: Stop the Windows service
:stop
:: window service?
:: @%erlsrv% stop %service_name%
@%escript% %nodetool% %node_type% %node_name% -setcookie %node_cookie% stop
@goto :eof

:: Relup and reldown
:relup
@if "" == "%2" (
  echo Missing package argument
  echo Usage: %rel_name% %1 {package base name}
  echo NOTE {package base name} MUST NOT include the .tar.gz suffix
  set ERRORLEVEL=1
  exit /b %ERRORLEVEL%
)
@%escript% "%rootdir%/bin/install_upgrade.escript" "%rel_name%" "%node_name%" "%node_cookie%" "%2"
@goto :eof

:: Start a console
:console
@call :create_mnesia_dir
@call :generate_app_config
@set args=%sys_config% %args_file% %generated_config_args% -mnesia dir '%mnesia_dir%'
@echo off
cd /d %rel_root_dir%
@echo on
@start "bin\%rel_name% console" %werl% -boot "%boot_script%" %args%
@goto :eof

:: Ping the running node
:ping
@%escript% %nodetool% ping %node_type% "%node_name%" -setcookie "%node_cookie%"
@goto :eof

:: List installed Erlang services
:list
@%erlsrv% list %service_name%
@goto :eof

:: Attach to a running node
:attach
:: @start "%node_name% attach"
@start "%node_name% attach" %werl% -boot "%clean_boot_script%" ^
  -remsh %node_name% %node_type% console_%node_name% -setcookie %node_cookie%
@goto :eof

:: Trim variable
:set_trim
@set %1=%2
@goto :eof

Fix the race condition error `erlsrv.exe: unrecognize option` (#381)

* Fix the race condition error `erlsrv.exe: unrecognize option`


@echo off

set LEIN_VERSION=1.5.0-SNAPSHOT

setLocal EnableExtensions EnableDelayedExpansion

rem LEIN_JAR and LEIN_HOME variables can be set manually.

if "x%LEIN_HOME%" == "x" set LEIN_HOME=%USERPROFILE%\.lein
if "x%LEIN_JAR%" == "x" set LEIN_JAR="!LEIN_HOME!\self-installs\leiningen-!LEIN_VERSION!-standalone.jar"

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

set ORIGINAL_PWD=%CD%
rem If ORIGINAL_PWD ends with a backslash (such as C:\),
rem we need to escape it with a second backslash.
if "%ORIGINAL_PWD:~-1%x" == "\x" set "ORIGINAL_PWD=%ORIGINAL_PWD%\"

call :FIND_DIR_CONTAINING_UPWARDS project.clj
if "%DIR_CONTAINING%" neq "" cd "%DIR_CONTAINING%"

set LEIN_PLUGINS="
for %%j in (".\lib\dev\*.jar") do (
    set LEIN_PLUGINS=!LEIN_PLUGINS!;%%~fj
)
set LEIN_PLUGINS=!LEIN_PLUGINS!"

set LEIN_USER_PLUGINS="
for %%j in ("%LEIN_HOME%\plugins\*.jar") do (
    set LEIN_USER_PLUGINS=!LEIN_USER_PLUGINS!;%%~fj
)
set LEIN_USER_PLUGINS=!LEIN_USER_PLUGINS!"

set CLASSPATH="%CLASSPATH%";%LEIN_USER_PLUGINS%;%LEIN_PLUGINS%;test;src

if exist "%~f0\..\..\src\leiningen\core.clj" (
    rem Running from source checkout.
    call :SET_LEIN_ROOT "%~f0\..\.."

    set LEIN_LIBS="
    for %%j in ("!LEIN_ROOT!\lib\*") do set LEIN_LIBS=!LEIN_LIBS!;%%~fj
    set LEIN_LIBS=!LEIN_LIBS!"

    if "x!LEIN_LIBS!" == "x" if not exist %LEIN_JAR% goto NO_DEPENDENCIES

    set CLASSPATH=%CLASSPATH%;!LEIN_LIBS!;"!LEIN_ROOT!\src";"!LEIN_ROOT!\resources";%LEIN_JAR%
) else (
    rem Not running from a checkout.
    if not exist %LEIN_JAR% goto NO_LEIN_JAR
    set CLASSPATH=%CLASSPATH%;%LEIN_JAR%
)

if not "x%DEBUG%" == "x" echo CLASSPATH=%CLASSPATH%
rem ##################################################

if not "x%INSIDE_EMACS%" == "x" goto SKIP_JLINE
if "x%1" == "xrepl"             goto SET_JLINE
if "x%1" == "xinteractive"      goto SET_JLINE
if "x%1" == "xint"              goto SET_JLINE
goto :SKIP_JLINE

:SET_JLINE
set JLINE=jline.ConsoleRunner
:SKIP_JLINE

if "x%JAVA_CMD%" == "x" set JAVA_CMD="java"
if "x%JVM_OPTS%" == "x" set JVM_OPTS=%JAVA_OPTS%
set CLOJURE_JAR=%USERPROFILE%\.m2\repository\org\clojure\clojure\1.2.0\clojure-1.2.0.jar
goto RUN

: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

:NO_DEPENDENCIES
echo.
echo Leiningen is missing its dependencies.
echo Please see "Building" in the README.
echo.
goto EOF

:SELF_INSTALL
if exist %LEIN_JAR% (
    echo %LEIN_JAR% already exists. Delete and retry.
    goto EOF
)
for %%f in (%LEIN_JAR%) do set LEIN_INSTALL_DIR="%%~dpf"
if not exist %LEIN_INSTALL_DIR% mkdir %LEIN_INSTALL_DIR%

set HTTP_CLIENT=wget --no-check-certificate -O
wget>nul 2>&1
if ERRORLEVEL 9009 (
    curl>nul 2>&1
    if ERRORLEVEL 9009 goto NO_HTTP_CLIENT
    set HTTP_CLIENT=curl --insecure -f -L -o
)
set LEIN_JAR_URL=https://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

:SET_LEIN_ROOT
set LEIN_ROOT=%~f1
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

:RUN
rem Need to disable delayed expansion because the %* variable
rem may contain bangs (as in test!).
setLocal DisableDelayedExpansion

%JAVA_CMD% -client %JVM_OPTS% -Xbootclasspath/a:"%CLOJURE_JAR%" ^
 -Dleiningen.original.pwd="%ORIGINAL_PWD%" ^
 -cp %CLASSPATH% %JLINE% clojure.main -e "(use 'leiningen.core)(-main)" NUL %*
goto EOF

:EOF

@echo off

set LEIN_VERSION=1.5.0-SNAPSHOT

setLocal EnableExtensions EnableDelayedExpansion

if "%LEIN_VERSION:~-9%" == "-SNAPSHOT" (
    set SNAPSHOT=YES
) else (
    set SNAPSHOT=NO
)

rem LEIN_JAR and LEIN_HOME variables can be set manually.

if "x%LEIN_HOME%" == "x" set LEIN_HOME=%USERPROFILE%\.lein
if "x%LEIN_JAR%" == "x" set LEIN_JAR="!LEIN_HOME!\self-installs\leiningen-!LEIN_VERSION!-standalone.jar"

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

set ORIGINAL_PWD=%CD%
rem If ORIGINAL_PWD ends with a backslash (such as C:\),
rem we need to escape it with a second backslash.
if "%ORIGINAL_PWD:~-1%x" == "\x" set "ORIGINAL_PWD=%ORIGINAL_PWD%\"

call :FIND_DIR_CONTAINING_UPWARDS project.clj
if "%DIR_CONTAINING%" neq "" cd "%DIR_CONTAINING%"

set LEIN_PLUGINS="
for %%j in (".\lib\dev\*.jar") do (
    set LEIN_PLUGINS=!LEIN_PLUGINS!;%%~fj
)
set LEIN_PLUGINS=!LEIN_PLUGINS!"

set LEIN_USER_PLUGINS="
for %%j in ("%LEIN_HOME%\plugins\*.jar") do (
    set LEIN_USER_PLUGINS=!LEIN_USER_PLUGINS!;%%~fj
)
set LEIN_USER_PLUGINS=!LEIN_USER_PLUGINS!"

set CLASSPATH="%CLASSPATH%";%LEIN_USER_PLUGINS%;%LEIN_PLUGINS%;test;src

if exist "%~f0\..\..\src\leiningen\core.clj" (
    rem Running from source checkout.
    call :SET_LEIN_ROOT "%~f0\..\.."

    set LEIN_LIBS="
    for %%j in ("!LEIN_ROOT!\lib\*") do set LEIN_LIBS=!LEIN_LIBS!;%%~fj
    set LEIN_LIBS=!LEIN_LIBS!"

    if "x!LEIN_LIBS!" == "x" if not exist %LEIN_JAR% goto NO_DEPENDENCIES

    set CLASSPATH=%CLASSPATH%;!LEIN_LIBS!;"!LEIN_ROOT!\src";"!LEIN_ROOT!\resources";%LEIN_JAR%
) else (
    rem Not running from a checkout.
    if not exist %LEIN_JAR% goto NO_LEIN_JAR
    set CLASSPATH=%CLASSPATH%;%LEIN_JAR%
)

if not "x%DEBUG%" == "x" echo CLASSPATH=%CLASSPATH%
rem ##################################################

if not "x%INSIDE_EMACS%" == "x" goto SKIP_JLINE
if "x%1" == "xrepl"             goto SET_JLINE
if "x%1" == "xinteractive"      goto SET_JLINE
if "x%1" == "xint"              goto SET_JLINE
goto :SKIP_JLINE

:SET_JLINE
set JLINE=jline.ConsoleRunner
:SKIP_JLINE

if "x%JAVA_CMD%" == "x" set JAVA_CMD="java"
if "x%JVM_OPTS%" == "x" set JVM_OPTS=%JAVA_OPTS%
set CLOJURE_JAR=%USERPROFILE%\.m2\repository\org\clojure\clojure\1.2.0\clojure-1.2.0.jar
goto RUN

: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

:NO_DEPENDENCIES
echo.
echo Leiningen is missing its dependencies.
echo Please see "Building" in the README.
echo.
goto EOF

:SELF_INSTALL
if exist %LEIN_JAR% (
    echo %LEIN_JAR% already exists. Delete and retry.
    goto EOF
)
for %%f in (%LEIN_JAR%) do set LEIN_INSTALL_DIR="%%~dpf"
if not exist %LEIN_INSTALL_DIR% mkdir %LEIN_INSTALL_DIR%

echo Downloading Leiningen now...

set HTTP_CLIENT=wget --no-check-certificate -O
wget>nul 2>&1
if ERRORLEVEL 9009 (
    curl>nul 2>&1
    if ERRORLEVEL 9009 goto NO_HTTP_CLIENT
    set HTTP_CLIENT=curl --insecure -f -L -o
)
set LEIN_JAR_URL=https://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 Failed to download %LEIN_JAR_URL%
if %SNAPSHOT% == YES echo See README.md for SNAPSHOT build instructions.
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

:SET_LEIN_ROOT
set LEIN_ROOT=%~f1
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

:RUN
rem Need to disable delayed expansion because the %* variable
rem may contain bangs (as in test!).
setLocal DisableDelayedExpansion

%JAVA_CMD% -client %JVM_OPTS% -Xbootclasspath/a:"%CLOJURE_JAR%" ^
 -Dleiningen.original.pwd="%ORIGINAL_PWD%" ^
 -cp %CLASSPATH% %JLINE% clojure.main -e "(use 'leiningen.core)(-main)" NUL %*
goto EOF

:EOF

Improve self-install error messages with lein.bat.


IF "%AGENT_TEST%" == "" (
  echo "\%AGENT_TEST\% has not been set"
  exit 1
)

SET BUILDKITE_BUILD_CHECKOUT_PATH="tests/%AGENT_TEST%"

IF "%AGENT_TEST%" == "" (
  echo "AGENT_TEST has not been set"
  exit 1
)

SET BUILDKITE_BUILD_CHECKOUT_PATH="tests/%AGENT_TEST%"

Drop the % in the post-checkout.bat error


@echo off
:: In order to enable legacy OS builds use on build machine
:: set VIRTIO_WIN_BUILD_LEGACY=win7
:: set VIRTIO_WIN_BUILD_LEGACY=Win7,wlh (currently does not work)
:: set VIRTIO_WIN_BUILD_LEGACY=Win7,wlh,wxp,wnet (currently does not work)

if "%VIRTIO_WIN_NO_ARM%"=="" call tools\build.bat virtio-win.sln Win10 ARM64
if errorlevel 1 goto :fail

for %%a in (Win7 Wxp Wnet Wlh) do (
	echo %VIRTIO_WIN_BUILD_LEGACY% | findstr /i %%a
	if not errorlevel 1 (
		call tools\build.bat virtio-win.sln "%%a" %*
		if errorlevel 1 goto :fail
	)
)

call tools\build.bat virtio-win.sln "Win8 Win8.1 Win10" %*
if errorlevel 1 goto :fail
call tools\build.bat NetKVM\NetKVM-VS2015.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat vioscsi\vioscsi.vcxproj "Win8_SDV Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat viostor\viostor.vcxproj "Win8_SDV Win10_SDV" %*
if errorlevel 1 goto :fail
if "%VIRTIO_WIN_SDV_2022%"=="" goto :nosdv2022
call tools\build.bat Balloon\sys\balloon.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat fwcfg64\fwcfg.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat ivshmem\ivshmem.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat pvpanic\pvpanic\pvpanic.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat viocrypt\sys\viocrypt.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat viorng\viorng\viorng.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat vioserial\sys\vioser.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat viosock\sys\viosock.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat viofs\pci\viofs.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail

:nosdv2022

path %path%;C:\Program Files (x86)\Windows Kits\10\bin\x86\
for %%D in (pciserial fwcfg packaging Q35) do (
  echo building also %%D
  pushd %%D
  call buildAll.bat
  if errorlevel 1 goto :fail
  popd
)

for /R %%f in (*.dvl.xml) do call :process_xml %%f

exit /B 0

:fail

exit /B 1

:process_xml
echo creating "%~dpn1-compat%~x1"
findstr /v /c:"General.Checksum" "%~1" > "%~dpn1-compat%~x1"
goto :eof

@echo off
:: In order to enable legacy OS builds use on build machine
:: set VIRTIO_WIN_BUILD_LEGACY=win7
:: set VIRTIO_WIN_BUILD_LEGACY=Win7,wlh (currently does not work)
:: set VIRTIO_WIN_BUILD_LEGACY=Win7,wlh,wxp,wnet (currently does not work)

if "%VIRTIO_WIN_NO_ARM%"=="" call tools\build.bat virtio-win.sln Win10 ARM64
if errorlevel 1 goto :fail

for %%a in (Win7 Wxp Wnet Wlh) do (
	echo %VIRTIO_WIN_BUILD_LEGACY% | findstr /i %%a
	if not errorlevel 1 (
		call tools\build.bat virtio-win.sln "%%a" %*
		if errorlevel 1 goto :fail
	)
)

call tools\build.bat virtio-win.sln "Win8 Win8.1 Win10" %*
if errorlevel 1 goto :fail
call tools\build.bat NetKVM\NetKVM-VS2015.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat vioscsi\vioscsi.vcxproj "Win8_SDV Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat viostor\viostor.vcxproj "Win8_SDV Win10_SDV" %*
if errorlevel 1 goto :fail
if "%VIRTIO_WIN_SDV_2022%"=="" goto :nosdv2022
call tools\build.bat Balloon\sys\balloon.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat fwcfg64\fwcfg.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat ivshmem\ivshmem.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat pvpanic\pvpanic\pvpanic.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat viocrypt\sys\viocrypt.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat viorng\viorng\viorng.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat vioserial\sys\vioser.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat viosock\sys\viosock.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat viofs\pci\viofs.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail
call tools\build.bat vioinput\sys\vioinput.vcxproj "Win10_SDV" %*
if errorlevel 1 goto :fail

:nosdv2022

path %path%;C:\Program Files (x86)\Windows Kits\10\bin\x86\
for %%D in (pciserial fwcfg packaging Q35) do (
  echo building also %%D
  pushd %%D
  call buildAll.bat
  if errorlevel 1 goto :fail
  popd
)

for /R %%f in (*.dvl.xml) do call :process_xml %%f

exit /B 0

:fail

exit /B 1

:process_xml
echo creating "%~dpn1-compat%~x1"
findstr /v /c:"General.Checksum" "%~1" > "%~dpn1-compat%~x1"
goto :eof

Add vioinput SDV target

buildAll: Add vioinput SDV target

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


@echo on
@echo =============================================================
@echo $                                                           $
@echo $                      Nepxion Thunder                      $
@echo $                                                           $
@echo $                                                           $
@echo $                                                           $
@echo $  Nepxion Technologies All Right Reserved                  $
@echo $  Copyright(C) 2017                                        $
@echo $                                                           $
@echo =============================================================
@echo.
@echo off

@title Nepxion Thunder
@color 0a

@echo Please ensure to config JAVA_HOME with Java 7
@set JAVA_HOME=E:\Tool\JDK-1.7.0
@echo Found JAVA_HOME=%JAVA_HOME%

@rem 删除target，有时候mvn会clean失败，需事先强制删除target
rmdir /s/q thunder-spring-boot-docker-example\target

@rem 执行相关模块的install
call mvn clean install -DskipTests -pl thunder-framework,thunder-test,thunder-spring-boot-docker-example -am

@rem 安装Docker镜像
cd thunder-spring-boot-docker-example

set DOCKER_HOST=tcp://localhost:2375
@rem set DOCKER_HOST=tcp://192.168.99.100:2376
@rem set DOCKER_CERT_PATH=C:\Users\Neptune\.docker\machine\certs

call mvn package docker:build -DskipTests && java -jar target/thunder-spring-boot-docker-example-1.0.0.jar

pause

@echo on
@echo =============================================================
@echo $                                                           $
@echo $                      Nepxion Thunder                      $
@echo $                                                           $
@echo $                                                           $
@echo $                                                           $
@echo $  Nepxion Technologies All Right Reserved                  $
@echo $  Copyright(C) 2017                                        $
@echo $                                                           $
@echo =============================================================
@echo.
@echo off

@title Nepxion Thunder
@color 0a

@echo Please ensure to config JAVA_HOME with Java 7
@set JAVA_HOME=E:\Tool\JDK-1.7.0
@echo Found JAVA_HOME=%JAVA_HOME%

@rem 删除target，有时候mvn会clean失败，需事先强制删除target
rmdir /s/q thunder-spring-boot-docker-example\target

@rem 执行相关模块的install
call mvn clean install -DskipTests -pl thunder-framework,thunder-test,thunder-spring-boot-docker-example -am

@rem 停止和删除容器
call docker stop thunder-spring-boot
@rem call docker kill thunder-spring-boot
call docker rm thunder-spring-boot

@rem 删除镜像
call docker rmi thunder-spring-boot

@rem 安装容器镜像
cd thunder-spring-boot-docker-example

set DOCKER_HOST=tcp://localhost:2375
@rem set DOCKER_HOST=tcp://192.168.99.100:2376
@rem set DOCKER_CERT_PATH=C:\Users\Neptune\.docker\machine\certs

call mvn package docker:build -DskipTests
@rem call mvn package docker:build -DskipTests && java -jar target/thunder-spring-boot-docker-example-1.0.0.jar

call docker run -i -t -p 127.0.0.1:6010:6010 --name thunder-spring-boot thunder-spring-boot:latest

pause

修改install-docker.bat

修改install-docker.bat


::Qt is in C:\Qt\5.8\msvc2015_64\

:: Build vcpkg
git submodule init
git submodule update
cd external/vcpkg
.\bootstrap-vcpkg.bat

:: Build dynamic dependencies
set VCPKG_DEFAULT_TRIPLET=x64-windows
vcpkg install freeglut glew freetype-gl curl breakpad capstone asio websocketpp cereal imgui

:: Build static dependencies
set VCPKG_DEFAULT_TRIPLET=x64-windows-static
vcpkg install capstone freeglut imgui

:: CMake
cd ../..
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE='..\external\vcpkg\scripts\buildsystems\vcpkg.cmake' -DCMAKE_GENERATOR_PLATFORM=x64 ..

:: TODO
:: investigate how to remove dependency on boost, it's ridiculously slow to build.
:: use vcpkg for Qt

::Qt is in C:\Qt\5.8\msvc2015_64\

:: Build vcpkg
git submodule init
git submodule update
cd external/vcpkg
call .\bootstrap-vcpkg.bat

:: Build dynamic dependencies
set VCPKG_DEFAULT_TRIPLET=x64-windows
vcpkg install freeglut glew freetype-gl curl breakpad capstone asio websocketpp cereal imgui

:: Build static dependencies
set VCPKG_DEFAULT_TRIPLET=x64-windows-static
vcpkg install capstone freeglut imgui

:: CMake
cd ../..
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE='..\external\vcpkg\scripts\buildsystems\vcpkg.cmake' -DCMAKE_GENERATOR_PLATFORM=x64 ..

:: TODO
:: investigate how to remove dependency on boost, it's ridiculously slow to build.
:: use vcpkg for Qt

bootstrap-orbit: use "call" so that vcpkg doesn't halt execution of script


@echo off
sqlcmd.exe -S localhost -i CreateDB.sql
pause

Change .bat extension to .cmd

Change .bat extension to .cmd

.bat extension is not recognised on some newer OS (Eg, Server 2012 R2). cmd extension should be universal.


:: To build extensions for 64 bit Python 3, we need to configure environment
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
::
:: To build extensions for 64 bit Python 2, we need to configure environment
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
::
:: 32 bit builds, and 64-bit builds for 3.5 and beyond, do not require specific
:: environment configurations.
::
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
:: cmd interpreter, at least for (SDK v7.0)
::
:: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
:: http://stackoverflow.com/a/13751649/163740
::
:: Author: Olivier Grisel
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
::
:: Notes about batch files for Python people:
::
:: Quotes in values are literally part of the values:
::      SET FOO="bar"
:: FOO is now five characters long: " b a r "
:: If you don't want quotes, don't include them on the right-hand side.
::
:: The CALL lines at the end of this file look redundant, but if you move them
:: outside of the IF clauses, they do not run properly in the SET_SDK_64==Y
:: case, I don't know why.
@ECHO OFF

SET COMMAND_TO_RUN=%*
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
SET WIN_WDK=c:\Program Files (x86)\Windows Kits\10\Include\wdf

:: Extract the major and minor versions, and allow for the minor version to be
:: more than 9.  This requires the version number to have two dots in it.
SET MAJOR_PYTHON_VERSION=%PYTHON_VERSION:~0,1%
IF "%PYTHON_VERSION:~3,1%" == "." (
    SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1%
) ELSE (
    SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,2%
)

:: Based on the Python version, determine what SDK version to use, and whether
:: to set the SDK for 64-bit.
IF %MAJOR_PYTHON_VERSION% == 2 (
    SET WINDOWS_SDK_VERSION="v7.0"
    SET SET_SDK_64=Y
) ELSE (
    IF %MAJOR_PYTHON_VERSION% == 3 (
        SET WINDOWS_SDK_VERSION="v7.1"
        IF %MINOR_PYTHON_VERSION% LEQ 4 (
            SET SET_SDK_64=Y
        ) ELSE (
            SET SET_SDK_64=N
            IF EXIST "%WIN_WDK%" (
                :: See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
                REN "%WIN_WDK%" 0wdf
            )
        )
    ) ELSE (
        ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
        EXIT 1
    )
)

IF %PYTHON_ARCH% == 64 (
    IF %SET_SDK_64% == Y (
        ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
        SET DISTUTILS_USE_SDK=1
        SET MSSdk=1
        "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
        "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
        ECHO Executing: %COMMAND_TO_RUN%
        call %COMMAND_TO_RUN% || EXIT 1
    ) ELSE (
        ECHO Using default MSVC build environment for 64 bit architecture
        ECHO Executing: %COMMAND_TO_RUN%
        call %COMMAND_TO_RUN% || EXIT 1
    )
) ELSE (
    ECHO Using default MSVC build environment for 32 bit architecture
    ECHO Executing: %COMMAND_TO_RUN%
    call %COMMAND_TO_RUN% || EXIT 1
)

Add run_with_env tool.

Add run_with_env tool.


@ECHO OFF

REM Command file for Sphinx documentation

set SPHINXBUILD=sphinx-build
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
if NOT "%PAPER%" == "" (
	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
)

if "%1" == "" goto help

if "%1" == "help" (
	:help
	echo.Please use `make ^<target^>` where ^<target^> is one of
	echo.  html      to make standalone HTML files
	echo.  dirhtml   to make HTML files named index.html in directories
	echo.  pickle    to make pickle files
	echo.  json      to make JSON files
	echo.  htmlhelp  to make HTML files and a HTML help project
	echo.  qthelp    to make HTML files and a qthelp project
	echo.  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter
	echo.  changes   to make an overview over all changed/added/deprecated items
	echo.  linkcheck to check all external links for integrity
	echo.  doctest   to run all doctests embedded in the documentation if enabled
	goto end
)

if "%1" == "clean" (
	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
	del /q /s %BUILDDIR%\*
	goto end
)

if "%1" == "html" (
	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
	echo.
	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
	goto end
)

if "%1" == "dirhtml" (
	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
	echo.
	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
	goto end
)

if "%1" == "pickle" (
	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
	echo.
	echo.Build finished; now you can process the pickle files.
	goto end
)

if "%1" == "json" (
	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
	echo.
	echo.Build finished; now you can process the JSON files.
	goto end
)

if "%1" == "htmlhelp" (
	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
	echo.
	echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
	goto end
)

if "%1" == "qthelp" (
	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
	echo.
	echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\MAppleT.qhcp
	echo.To view the help file:
	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\MAppleT.ghc
	goto end
)

if "%1" == "latex" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	echo.
	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "changes" (
	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
	echo.
	echo.The overview file is in %BUILDDIR%/changes.
	goto end
)

if "%1" == "linkcheck" (
	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
	echo.
	echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
	goto end
)

if "%1" == "doctest" (
	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
	echo.
	echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
	goto end
)

:end

@ECHO OFF

REM Command file for Sphinx documentation

set SPHINXBUILD=sphinx-build
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
if NOT "%PAPER%" == "" (
	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
)

if "%1" == "" goto help

if "%1" == "help" (
	:help
	echo.Please use `make ^<target^>` where ^<target^> is one of
	echo.  html      to make standalone HTML files
	echo.  dirhtml   to make HTML files named index.html in directories
	echo.  pickle    to make pickle files
	echo.  json      to make JSON files
	echo.  htmlhelp  to make HTML files and a HTML help project
	echo.  qthelp    to make HTML files and a qthelp project
	echo.  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter
	echo.  changes   to make an overview over all changed/added/deprecated items
	echo.  linkcheck to check all external links for integrity
	echo.  doctest   to run all doctests embedded in the documentation if enabled
	goto end
)

if "%1" == "clean" (
	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
	del /q /s %BUILDDIR%\*
	goto end
)

if "%1" == "html" (
	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
	echo.
	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
	goto end
)

if "%1" == "dirhtml" (
	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
	echo.
	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
	goto end
)

if "%1" == "pickle" (
	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
	echo.
	echo.Build finished; now you can process the pickle files.
	goto end
)

if "%1" == "json" (
	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
	echo.
	echo.Build finished; now you can process the JSON files.
	goto end
)

if "%1" == "htmlhelp" (
	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
	echo.
	echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
	goto end
)

if "%1" == "qthelp" (
	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
	echo.
	echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\MAppleT.qhcp
	echo.To view the help file:
	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\MAppleT.ghc
	goto end
)

if "%1" == "latex" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	echo.
	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "changes" (
	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
	echo.
	echo.The overview file is in %BUILDDIR%/changes.
	goto end
)

if "%1" == "linkcheck" (
	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
	echo.
	echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
	goto end
)

if "%1" == "doctest" (
	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
	echo.
	echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
	goto end
)

:end

Fix document compile error on Windows

Fix document compile error on Windows


Add .bat wrapper script for run-webkit-tests.

This makes easier for Windows developers to run this script on Windows
environment.

BUG=338338
TEST=Tools/Scripts/run-webkit-tests.bat on Windows
R=dpranke@chromium.org

Review URL: https://codereview.chromium.org/590743002

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@182432 bbb929c8-8fbe-4397-9dbb-9b2b20218538


@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

@REM set following environment in this file or in command shell
@REM set JAVA_HOME=C:\Java\jdk1.5.0_04
@REM set ANT_HOME=C:\ANT
@REM set XMLBEANS_HOME=C:\xmlbeans
@REM set CYGWIN_HOME=C:\cygwin

@REM usage: edksetup.bat [skip]
@REM if the argument, skip is present, only the paths and the
@REM test and set of environment settings are performed.

@REM ##############################################################
@REM # You should not have to modify anything below this line
@REM #

@echo off

@REM
@REM Check the required system environment variables
@REM

:check_vc
if defined VCINSTALLDIR goto check_cygwin
if defined VS71COMNTOOLS (
  call "%VS71COMNTOOLS%vsvars32.bat"
) else (
  echo.
  echo !!! WARNING !!!! Cannot find Visual Studio !!!
  echo.
)

:check_cygwin
if defined CYGWIN_HOME goto check_java
if exist c:\cygwin (
  set CYGWIN_HOME=c:\cygwin
) else (
  echo.
  echo !!! WARNING !!!! Not set CYGWIN_HOME, gcc build may not be used !!!
  echo.
)

:check_java
if "%JAVA_HOME%"=="" goto no_jdk

:check_ant
if "%ANT_HOME%"=="" goto no_ant
if not exist %ANT_HOME%\lib\ant-contrib.jar goto no_antcontrib

:check_xmlbeans
if "%XMLBEANS_HOME%"=="" goto no_xmlbeans
if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8

@REM
@REM Set the WORKSPACE to the current working directory
@REM
set WORKSPACE=%CD%

set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\bin

if defined WORKSPACE_TOOLS_PATH goto check_path
set PATH=%FRAMEWORK_TOOLS_PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin;%PATH%
set WORKSPACE_TOOLS_PATH=%FRAMEWORK_TOOLS_PATH%
echo Setting the PATH variable to include the Framework_Tools_Path for this WORKSPACE
goto path_ok

:check_path
if "%FRAMEWORK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto path_ok
set PATH=%FRAMEWORK_TOOLS_PATH%;%PATH%
set WORKSPACE_PATH=%WORKSPACE%
echo Resetting the PATH variable to include the Framework_Tools_Path for this WORKSPACE

:path_ok

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

@IF NOT EXIST "Tools\Jars\Common.jar" goto NormalBuild
@IF NOT EXIST "Tools\Jars\GenBuild.jar" goto NormalBuild
@IF NOT EXIST "Tools\Jars\SurfaceArea.jar" goto NormalBuild
@IF NOT EXIST "Tools\Jars\cpptasks.jar" goto NormalBuild
@IF NOT EXIST "Tools\Jars\frameworktasks.jar" goto NormalBuild
@IF NOT EXIST "Tools\bin\FrameworkWizard.jar" goto NormalBuild
@IF NOT EXIST "Tools\bin\CompressDll.dll" goto NormalBuild
@IF NOT EXIST "Tools\bin\CompressDll.lib" goto NormalBuild
@IF NOT EXIST "Tools\bin\CreateMtFile.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\EfiCompress.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\EfiRom.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\FlashMap.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\FwImage.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenAcpiTable.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenCRC32Section.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenCapsuleHdr.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenDepex.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenFfsFile.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenFvImage.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenSection.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenTEImage.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GuidChk.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\MakeDeps.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\ModifyInf.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\PeiRebase_Ia32.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\PeiRebase_Ipf.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\PeiRebase_X64.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\SecApResetVectorFixup.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\SecFixup.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\SetStamp.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\SplitFile.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\StrGather.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\Strip.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\VfrCompile.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\ZeroDebugData.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\antlr.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\dlg.exe" goto NormalBuild

@if "%1"=="Rebuild" goto NormalBuild
@if "%1"=="ForceRebuild" goto ForceBuild

goto skipbuild

:ForceBuild
call ant -f %WORKSPACE%\Tools\build.xml cleanall

:NormalBuild
@REM
@REM Start to build the Framework Tools
@REM

echo.
echo Building the Framework Tools
echo.

@REM
@REM We are going to create the SurfaceArea.jar file first so that the other
@REM Java Programs can use it.
@REM It needs the XMLBEANS libraries in order to compile.
@REM
set CLASSPATH=%XMLBEANS_HOME%\lib
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xmlpublic.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\resolver.jar

call ant -f %WORKSPACE%\Tools\build.xml SurfaceArea

@REM
@REM Now we can make the other Java Programs
@REM All of the remaining Java Programs require the SurfaceArea library to compile
@REM
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\SurfaceArea.jar

call ant -f %WORKSPACE%\Tools\build.xml JavaCode

@REM
@REM We have all of the Java Programs and add-in classes created, so we can start
@REM using the cpp-tasks to create our tools
@REM
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\Common.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\GenBuild.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\frameworktasks.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Bin\FrameworkWizard.jar

call ant -f %WORKSPACE%\Tools\build.xml C_Code

@REM
@REM Done!!!
@REM
goto end

:no_jdk
echo.
echo !!! Please install Java, and set JAVA_HOME !!!
echo.
goto end

:no_ant
echo.
echo !!! Please install Apache Ant, and set ANT_HOME !!!
echo.
goto end

:no_antcontrib
echo.
echo !!! Please install Ant-contrib to ANT_HOME !!!
echo.
goto end

:no_xmlbeans
echo.
echo !!! Please install XML Beans, and set XMLBEANS_HOME !!!
echo.
goto end

:no_saxon8
echo.
echo !!! Please copy saxon8.jar file to XMLBEANS_HOME\lib !!!
echo.
goto end

:skipbuild
@REM
@REM This just sets up the CLASSPATH, the rest of the environment should have been set already.
@REM
echo.
echo WORKSPACE:     %WORKSPACE%
echo JAVA_HOME:     %JAVA_HOME%
echo ANT_HOME:      %ANT_HOME%
echo XMLBEANS_HOME: %XMLBEANS_HOME%
echo CYGWIN_HOME:   %CYGWIN_HOME%
echo PATH:          %PATH%
echo.
set CLASSPATH=%XMLBEANS_HOME%\lib
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xmlpublic.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\resolver.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\SurfaceArea.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\Common.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\GenBuild.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\frameworktasks.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Bin\FrameworkWizard.jar
goto end

:Usage
echo.
echo  Usage: %0 [Rebuild] [ForceRebuild]
echo.

: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

@REM set following environment in this file or in command shell
@REM set JAVA_HOME=C:\Java\jdk1.5.0_04
@REM set ANT_HOME=C:\ANT
@REM set XMLBEANS_HOME=C:\xmlbeans
@REM set CYGWIN_HOME=C:\cygwin

@REM usage: edksetup.bat [skip]
@REM if the argument, skip is present, only the paths and the
@REM test and set of environment settings are performed.

@REM ##############################################################
@REM # You should not have to modify anything below this line
@REM #

@echo off

@REM
@REM Check the required system environment variables
@REM

:check_vc
if defined VCINSTALLDIR goto check_cygwin
if defined VS71COMNTOOLS (
  call "%VS71COMNTOOLS%\vsvars32.bat"
) else (
  echo.
  echo !!! WARNING !!!! Cannot find Visual Studio !!!
  echo.
)

:check_cygwin
if defined CYGWIN_HOME goto check_java
if exist c:\cygwin (
  set CYGWIN_HOME=c:\cygwin
) else (
  echo.
  echo !!! WARNING !!!! Not set CYGWIN_HOME, gcc build may not be used !!!
  echo.
)

:check_java
if "%JAVA_HOME%"=="" goto no_jdk

:check_ant
if "%ANT_HOME%"=="" goto no_ant
if not exist %ANT_HOME%\lib\ant-contrib.jar goto no_antcontrib

:check_xmlbeans
if "%XMLBEANS_HOME%"=="" goto no_xmlbeans
if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8

@REM
@REM Set the WORKSPACE to the current working directory
@REM
set WORKSPACE=%CD%

set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\bin

if defined WORKSPACE_TOOLS_PATH goto check_path
set PATH=%FRAMEWORK_TOOLS_PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin;%PATH%
set WORKSPACE_TOOLS_PATH=%FRAMEWORK_TOOLS_PATH%
echo Setting the PATH variable to include the Framework_Tools_Path for this WORKSPACE
goto path_ok

:check_path
if "%FRAMEWORK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto path_ok
set PATH=%FRAMEWORK_TOOLS_PATH%;%PATH%
set WORKSPACE_PATH=%WORKSPACE%
echo Resetting the PATH variable to include the Framework_Tools_Path for this WORKSPACE

:path_ok

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

@IF NOT EXIST "Tools\Jars\Common.jar" goto NormalBuild
@IF NOT EXIST "Tools\Jars\GenBuild.jar" goto NormalBuild
@IF NOT EXIST "Tools\Jars\SurfaceArea.jar" goto NormalBuild
@IF NOT EXIST "Tools\Jars\cpptasks.jar" goto NormalBuild
@IF NOT EXIST "Tools\Jars\frameworktasks.jar" goto NormalBuild
@IF NOT EXIST "Tools\bin\FrameworkWizard.jar" goto NormalBuild
@IF NOT EXIST "Tools\bin\CompressDll.dll" goto NormalBuild
@IF NOT EXIST "Tools\bin\CompressDll.lib" goto NormalBuild
@IF NOT EXIST "Tools\bin\CreateMtFile.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\EfiCompress.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\EfiRom.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\FlashMap.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\FwImage.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenAcpiTable.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenCRC32Section.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenCapsuleHdr.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenDepex.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenFfsFile.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenFvImage.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenSection.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GenTEImage.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\GuidChk.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\MakeDeps.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\ModifyInf.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\PeiRebase_Ia32.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\PeiRebase_Ipf.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\PeiRebase_X64.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\SecApResetVectorFixup.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\SecFixup.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\SetStamp.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\SplitFile.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\StrGather.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\Strip.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\VfrCompile.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\ZeroDebugData.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\antlr.exe" goto NormalBuild
@IF NOT EXIST "Tools\bin\dlg.exe" goto NormalBuild

@if "%1"=="Rebuild" goto NormalBuild
@if "%1"=="ForceRebuild" goto ForceBuild

goto skipbuild

:ForceBuild
call ant -f %WORKSPACE%\Tools\build.xml cleanall

:NormalBuild
@REM
@REM Start to build the Framework Tools
@REM

echo.
echo Building the Framework Tools
echo.

@REM
@REM We are going to create the SurfaceArea.jar file first so that the other
@REM Java Programs can use it.
@REM It needs the XMLBEANS libraries in order to compile.
@REM
set CLASSPATH=%XMLBEANS_HOME%\lib
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xmlpublic.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\resolver.jar

call ant -f %WORKSPACE%\Tools\build.xml SurfaceArea

@REM
@REM Now we can make the other Java Programs
@REM All of the remaining Java Programs require the SurfaceArea library to compile
@REM
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\SurfaceArea.jar

call ant -f %WORKSPACE%\Tools\build.xml JavaCode

@REM
@REM We have all of the Java Programs and add-in classes created, so we can start
@REM using the cpp-tasks to create our tools
@REM
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\Common.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\GenBuild.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\frameworktasks.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Bin\FrameworkWizard.jar

call ant -f %WORKSPACE%\Tools\build.xml C_Code

@REM
@REM Done!!!
@REM
goto end

:no_jdk
echo.
echo !!! Please install Java, and set JAVA_HOME !!!
echo.
goto end

:no_ant
echo.
echo !!! Please install Apache Ant, and set ANT_HOME !!!
echo.
goto end

:no_antcontrib
echo.
echo !!! Please install Ant-contrib to ANT_HOME !!!
echo.
goto end

:no_xmlbeans
echo.
echo !!! Please install XML Beans, and set XMLBEANS_HOME !!!
echo.
goto end

:no_saxon8
echo.
echo !!! Please copy saxon8.jar file to XMLBEANS_HOME\lib !!!
echo.
goto end

:skipbuild
@REM
@REM This just sets up the CLASSPATH, the rest of the environment should have been set already.
@REM
echo.
echo WORKSPACE:     %WORKSPACE%
echo JAVA_HOME:     %JAVA_HOME%
echo ANT_HOME:      %ANT_HOME%
echo XMLBEANS_HOME: %XMLBEANS_HOME%
echo CYGWIN_HOME:   %CYGWIN_HOME%
echo PATH:          %PATH%
echo.
set CLASSPATH=%XMLBEANS_HOME%\lib
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xmlpublic.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\resolver.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\SurfaceArea.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\Common.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\GenBuild.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\frameworktasks.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Bin\FrameworkWizard.jar
goto end

:Usage
echo.
echo  Usage: %0 [Rebuild] [ForceRebuild]
echo.

:end
@echo on

Add a file separate char for VS71COMNTOOLS.

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


rem per user startup.cmd
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People /v PeopleBand /t REG_DWORD /d 0 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKCU\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /d Deny /f
reg.exe delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F

Create Startup.cmd

Create Startup.cmd


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Cake is a Windows batch script for invoking CakePHP shell commands
::
:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
::
:: Licensed under The MIT License
:: Redistributions of files must retain the above copyright notice.
::
:: @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
:: @link          http://cakephp.org CakePHP(tm) Project
:: @since         2.0.0
:: @license       http://www.opensource.org/licenses/mit-license.php MIT License
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: In order for this script to work as intended, the cake\console\ folder must be in your PATH

@echo.
@echo off

SET app=%0
SET lib=%~dp0

php "%lib%cake.php" %*

echo.

exit /B %ERRORLEVEL%

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Cake is a Windows batch script for invoking CakePHP shell commands
::
:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
::
:: Licensed under The MIT License
:: Redistributions of files must retain the above copyright notice.
::
:: @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
:: @link          http://cakephp.org CakePHP(tm) Project
:: @since         2.0.0
:: @license       http://www.opensource.org/licenses/mit-license.php MIT License
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: In order for this script to work as intended, the cake\console\ folder must be in your PATH

@echo off

SET app=%0
SET lib=%~dp0

php "%lib%cake.php" %*

echo.

exit /B %ERRORLEVEL%

Remove an empty line output

Remove an empty line output

Prevent to output an empty line before the XML declaration when a command is run using `--xml` option


@echo off
REM Delete all compiled module binaries to force dynamic compilation (.csproj) to kick in
set SRC=src\Orchard.Web\Modules
for /f %%i in ('dir %SRC% /b /ad') do del /q %SRC%\%%i\bin\%%i.dll

Add utility to force dynamic compilation

--HG--
branch : dev


set PYTHON=C:\Python27\python
set EASY_INSTALL=c:\python27\scripts\easy_install.exe
set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\"
set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH%

cd %WORKSPACE%
%PYTHON% check_packages.py

cd %WORKSPACE%
python setup.py build -cmingw32

cd %WORKSPACE%
python setup.py docs

cd %WORKSPACE%
python setup.py bdist_egg --skip-build

cd %WORKSPACE%\test
%PYTHON% utest_sasview.py

cd %WORKSPACE%
mkdir sasview-install
set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH%

cd %WORKSPACE%
cd dist
%EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg

cd %WORKSPACE%\sasview
python setup_exe.py py2exe
python installer_generator.py
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss

cd Output
xcopy setupSasView.exe %WORKSPACE%\dist

cd  %WORKSPACE%

set PYTHON=C:\Python27\python
set EASY_INSTALL=c:\python27\scripts\easy_install.exe
set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\"
set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH%
set PYLINT=c:\python27\scripts\pylint

cd %WORKSPACE%
%PYTHON% check_packages.py

cd %WORKSPACE%
python setup.py build -cmingw32

cd %WORKSPACE%
python setup.py docs

cd %WORKSPACE%
python setup.py bdist_egg --skip-build

cd %WORKSPACE%\test
%PYTHON% utest_sasview.py

cd %WORKSPACE%
mkdir sasview-install
set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH%

cd %WORKSPACE%
cd dist
%EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg

cd %WORKSPACE%\sasview
python setup_exe.py py2exe
python installer_generator.py
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss

cd Output
xcopy setupSasView.exe %WORKSPACE%\dist

cd %WORKSPACE%
%PYLINT% --rcfile "%WORKSPACE%cd /build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview > test/sasview.txt

cd  %WORKSPACE%

Update new windows build script

Update new windows build script


mkdir vstudio2010
cd vstudio2010
cmake .. -G"Visual Studio 10"
cd ..
PAUSE

add generate visual studio project with cmake