@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.2.2
:: ----------------------

:: Prerequisites
:: -------------

:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
  goto error
)

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)

IF NOT DEFINED NEXT_MANIFEST_PATH (
  SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest

  IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
    SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
  )
)

IF NOT DEFINED KUDU_SYNC_CMD (
  :: Install kudu sync
  echo Installing Kudu Sync
  call npm install kudusync -g --silent
  IF !ERRORLEVEL! NEQ 0 goto error

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
IF NOT DEFINED DEPLOYMENT_TEMP (
  SET DEPLOYMENT_TEMP=%temp%\___deployTemp%random%
  SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
)

IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (
  IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
  mkdir "%DEPLOYMENT_TEMP%"
)

IF NOT DEFINED MSBUILD_PATH (
  SET MSBUILD_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
)

IF NOT DEFINED POST_DEPLOYMENT_SOURCE (
  SET POST_DEPLOYMENT_SOURCE=%DEPLOYMENT_SOURCE%\Scripts\PostDeploymentActions\
)

IF NOT DEFINED POST_DEPLOYMENT_TARGET (
  SET POST_DEPLOYMENT_TARGET=%ARTIFACTS%\deployments\tools\PostDeploymentActions\
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

echo Handling .NET Web Application deployment.

:: 1. Restore NuGet packages
IF /I "Resume.sln" NEQ "" (
  call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\Resume.sln"
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 2. Install npm packages, bower, grunt, and bower packages
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
	pushd "%DEPLOYMENT_SOURCE%\Resume"

	echo Installing npm packages...
	call :ExecuteCmd npm install
	IF !ERRORLEVEL! NEQ 0 goto error

	echo Running npm dedupe...
	call :ExecuteCmd npm dedupe
	IF !ERRORLEVEL! NEQ 0 goto error

	echo Installing grunt-cli...
	call :ExecuteCmd npm install grunt-cli -g
	IF !ERRORLEVEL! NEQ 0 goto error

	echo Installing bower...
	call :ExecuteCmd npm install bower -g
	IF !ERRORLEVEL! NEQ 0 goto error

	echo Running bower-install grunt task...
	call :ExecuteCmd grunt bower-install
	IF !ERRORLEVEL! NEQ 0 goto error
	popd
)

:: 3. Build to the temporary path
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Resume\Resume.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="%DEPLOYMENT_TEMP%";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOYMENT_SOURCE%\.\\" %SCM_BUILD_ARGS%
) ELSE (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Resume\Resume.csproj" /nologo /verbosity:m /t:Build /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOYMENT_SOURCE%\.\\" %SCM_BUILD_ARGS%
)

IF !ERRORLEVEL! NEQ 0 goto error

:: 4. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_TEMP%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 5. Copy the post deployment scripts
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
	echo Copy the post deployment scripts...
	call :ExecuteCmd xcopy %POST_DEPLOYMENT_SOURCE% %POST_DEPLOYMENT_TARGET% /Y
)

goto end

:: Execute command routine that will echo out when error
:ExecuteCmd
setlocal
set _CMD_=%*
call %_CMD_%
if "%ERRORLEVEL%" NEQ "0" echo Failed exitCode=%ERRORLEVEL%, command=%_CMD_%
exit /b %ERRORLEVEL%

:error
endlocal
echo An error has occurred during web site deployment.
call :exitSetErrorLevel
call :exitFromFunction 2>nul

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.2.2
:: ----------------------

:: Prerequisites
:: -------------

:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
  goto error
)

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)

IF NOT DEFINED NEXT_MANIFEST_PATH (
  SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest

  IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
    SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
  )
)

IF NOT DEFINED KUDU_SYNC_CMD (
  :: Install kudu sync
  echo Installing Kudu Sync
  call npm install kudusync -g --silent
  IF !ERRORLEVEL! NEQ 0 goto error

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
IF NOT DEFINED DEPLOYMENT_TEMP (
  SET DEPLOYMENT_TEMP=%temp%\___deployTemp%random%
  SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
)

IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (
  IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
  mkdir "%DEPLOYMENT_TEMP%"
)

IF NOT DEFINED MSBUILD_PATH (
  SET MSBUILD_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
)

IF NOT DEFINED POST_DEPLOYMENT_SOURCE (
  SET POST_DEPLOYMENT_SOURCE=%DEPLOYMENT_SOURCE%\Scripts\PostDeploymentActions\
)

IF NOT DEFINED POST_DEPLOYMENT_TARGET (
  SET POST_DEPLOYMENT_TARGET=%DEPLOYMENT_SOURCE%..\deployments\tools\PostDeploymentActions\
  SET CLEAN_POST_DEPLOYMENT_TARGET=true
)

IF DEFINED CLEAN_POST_DEPLOYMENT_TARGET (
  IF EXIST "%POST_DEPLOYMENT_TARGET%" rd /s /q "%POST_DEPLOYMENT_TARGET%"
  mkdir "%POST_DEPLOYMENT_TARGET%"
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

echo Handling .NET Web Application deployment.

:: 1. Restore NuGet packages
IF /I "Resume.sln" NEQ "" (
  call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\Resume.sln"
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 2. Install npm packages, bower, grunt, and bower packages
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
	pushd "%DEPLOYMENT_SOURCE%\Resume"

	echo Installing npm packages...
	call :ExecuteCmd npm install
	IF !ERRORLEVEL! NEQ 0 goto error

	echo Running npm dedupe...
	call :ExecuteCmd npm dedupe
	IF !ERRORLEVEL! NEQ 0 goto error

	echo Installing grunt-cli...
	call :ExecuteCmd npm install grunt-cli -g
	IF !ERRORLEVEL! NEQ 0 goto error

	echo Installing bower...
	call :ExecuteCmd npm install bower -g
	IF !ERRORLEVEL! NEQ 0 goto error

	echo Running bower-install grunt task...
	call :ExecuteCmd grunt bower-install
	IF !ERRORLEVEL! NEQ 0 goto error
	popd
)

:: 3. Build to the temporary path
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Resume\Resume.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="%DEPLOYMENT_TEMP%";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOYMENT_SOURCE%\.\\" %SCM_BUILD_ARGS%
) ELSE (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Resume\Resume.csproj" /nologo /verbosity:m /t:Build /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOYMENT_SOURCE%\.\\" %SCM_BUILD_ARGS%
)

IF !ERRORLEVEL! NEQ 0 goto error

:: 4. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_TEMP%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 5. Copy the post deployment scripts
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
	echo Copy the post deployment scripts...
	call :ExecuteCmd xcopy %POST_DEPLOYMENT_SOURCE% %POST_DEPLOYMENT_TARGET% /Y
)

goto end

:: Execute command routine that will echo out when error
:ExecuteCmd
setlocal
set _CMD_=%*
call %_CMD_%
if "%ERRORLEVEL%" NEQ "0" echo Failed exitCode=%ERRORLEVEL%, command=%_CMD_%
exit /b %ERRORLEVEL%

:error
endlocal
echo An error has occurred during web site deployment.
call :exitSetErrorLevel
call :exitFromFunction 2>nul

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

fix the deployment script post deploy actions path


REM remove unneeded librar stubs
rd /S /Q %SRC_DIR%\include
rd /S /Q %SRC_DIR%\lib
rd /S /Q %SRC_DIR%\share\man
if errorlevel 1 exit 1

mkdir %SRC_DIR%\share\doc\graphviz
move %SRC_DIR%\share\graphviz\doc %SRC_DIR%\share\doc\graphviz
if errorlevel 1 exit 1

move %SRC_DIR%\bin %SRC_DIR%\graphviz
if errorlevel 1 exit 1

xcopy /S %SRC_DIR% %LIBRARY_PREFIX%
if errorlevel 1 exit 1

mkdir %LIBRARY_BIN%
move %LIBRARY_PREFIX%\graphviz %LIBRARY_BIN%\graphviz
if errorlevel 1 exit 1

del %LIBRARY_PREFIX%\bld.bat
if errorlevel 1 exit 1

pushd %LIBRARY_BIN%
for /r "%LIBRARY_BIN%\graphviz" %%f in (*.exe) do (
    echo @echo off > %%~nf.bat
    echo %%~dp0.\graphviz\%%~nf.exe %%* >> %%~nf.bat
    if errorlevel 1 exit 1
)

:: Remove unneeded library stubs
rd /S /Q %SRC_DIR%\include
rd /S /Q %SRC_DIR%\lib
rd /S /Q %SRC_DIR%\share\man
if errorlevel 1 exit 1

mkdir %SRC_DIR%\share\doc\graphviz
move %SRC_DIR%\share\graphviz\doc %SRC_DIR%\share\doc\graphviz
if errorlevel 1 exit 1

move %SRC_DIR%\bin %SRC_DIR%\graphviz
if errorlevel 1 exit 1

xcopy /S %SRC_DIR% %LIBRARY_PREFIX%
if errorlevel 1 exit 1

:: Create a graphviz folder in %LIBRARY_BIN% to avoid dll
:: clashes with other packages (e.g. Qt4)
mkdir %LIBRARY_BIN%
move %LIBRARY_PREFIX%\graphviz %LIBRARY_BIN%\graphviz
if errorlevel 1 exit 1

del %LIBRARY_PREFIX%\bld.bat
if errorlevel 1 exit 1

:: Create bat links for all exe files in %LIBRARY_BIN%\graphviz
pushd %LIBRARY_BIN%
for /r "%LIBRARY_BIN%\graphviz" %%f in (*.exe) do (
    echo @echo off > %%~nf.bat
    echo %%~dp0.\graphviz\%%~nf.exe %%* >> %%~nf.bat
    if errorlevel 1 exit 1
)

Add some comments to bld.bat

Add some comments to bld.bat


REM @echo off
REM ---------------------------------------------------------------------------
REM    Batch file for generating MRPT binary packages for MSVC binary releases
REM
REM  Usage:
REM    From a directory already with a CMakeCache.txt:
REM
REM  > automated_build_msvc_binary_package.bat <PATH_TO_MRPT_SRCS>
REM
REM ---------------------------------------------------------------------------

set MSVC_VERBOSITY=normal

REM Make sure params are OK:
REM ------------------------------
IF "%1" == "" GOTO SHOW_USAGE
IF NOT EXIST "%1" GOTO SHOW_USAGE2
IF NOT EXIST "%1\version_prefix.txt" GOTO SHOW_USAGE2

IF EXIST ".\version_prefix.txt" GOTO NO_GOOD

REM 1) Compile debug libs (so Cmake find them in the next run)
REM ----------------------------------------------
cmake --build . --config Debug --target all_mrpt_libs
IF %ERRORLEVEL% NEQ 0 GOTO BAD_RETCODE

REM 2) re-call CMake to detect the debug libs
REM ----------------------------------------------
cmake .
IF %ERRORLEVEL% NEQ 0 GOTO BAD_RETCODE

REM 3) Do unit tests:
REM ----------------------------------------------
cmake --build . --config Release --target test
IF %ERRORLEVEL% NEQ 0 GOTO BAD_RETCODE

REM 4) All seem OK. Build all.
REM ----------------------------------------------
cmake --build . --config Release
IF %ERRORLEVEL% NEQ 0 GOTO BAD_RETCODE

REM 5) Build package:
REM ----------------------------------------------
cmake --build . --config Release --target PACKAGE

goto END_BATCH
REM ============== END ====================

:SHOW_USAGE
ECHO  Usage:
ECHO    From a directory already with a CMakeCache.txt:
ECHO.
ECHO  automated_build_msvc_binary_package.bat (PATH_TO_MRPT_SRCS)
ECHO.
goto END_BATCH

:SHOW_USAGE2
ECHO Error: Supplied path "%1" doesn't exist or is not the MRPT source root dir.
echo.
goto SHOW_USAGE

:NO_GOOD
ECHO.
ECHO Error: It's not a good idea to build in the source tree.
echo Please try in another directory.
echo.
goto END_BATCH

:BAD_RETCODE
ECHO.
ECHO *****************************************
ECHO ** THE LAST COMMAND FAILED! Look at it **
ECHO *****************************************
ECHO.
goto END_BATCH

:END_BATCH

REM @echo off
REM ---------------------------------------------------------------------------
REM    Batch file for generating MRPT binary packages for MSVC binary releases
REM
REM  Usage:
REM    From a directory already with a CMakeCache.txt:
REM
REM  > automated_build_msvc_binary_package.bat <PATH_TO_MRPT_SRCS>
REM
REM ---------------------------------------------------------------------------

set MSVC_VERBOSITY=normal

REM Make sure params are OK:
REM ------------------------------
IF "%1" == "" GOTO SHOW_USAGE
IF NOT EXIST "%1" GOTO SHOW_USAGE2
IF NOT EXIST "%1\version_prefix.txt" GOTO SHOW_USAGE2

IF EXIST ".\version_prefix.txt" GOTO NO_GOOD

REM 1) Compile debug libs (so Cmake find them in the next run)
REM ----------------------------------------------
cmake --build . --config Debug --target all_mrpt_libs
IF %ERRORLEVEL% NEQ 0 GOTO BAD_RETCODE

REM 2) re-call CMake to detect the debug libs
REM ----------------------------------------------
cmake .
IF %ERRORLEVEL% NEQ 0 GOTO BAD_RETCODE

REM 3) Do unit tests:
REM ----------------------------------------------
cmake --build . --config Release --target test_legacy
IF %ERRORLEVEL% NEQ 0 GOTO BAD_RETCODE

REM 4) All seem OK. Build all.
REM ----------------------------------------------
cmake --build . --config Release
IF %ERRORLEVEL% NEQ 0 GOTO BAD_RETCODE

REM 5) Build package:
REM ----------------------------------------------
cmake --build . --config Release --target PACKAGE

goto END_BATCH
REM ============== END ====================

:SHOW_USAGE
ECHO  Usage:
ECHO    From a directory already with a CMakeCache.txt:
ECHO.
ECHO  automated_build_msvc_binary_package.bat (PATH_TO_MRPT_SRCS)
ECHO.
goto END_BATCH

:SHOW_USAGE2
ECHO Error: Supplied path "%1" doesn't exist or is not the MRPT source root dir.
echo.
goto SHOW_USAGE

:NO_GOOD
ECHO.
ECHO Error: It's not a good idea to build in the source tree.
echo Please try in another directory.
echo.
goto END_BATCH

:BAD_RETCODE
ECHO.
ECHO *****************************************
ECHO ** THE LAST COMMAND FAILED! Look at it **
ECHO *****************************************
ECHO.
goto END_BATCH

:END_BATCH

fix test run in automated msvc pkg build


git log -n 1 --date=short --pretty="format:MumbleBuild-%%ad-%%h" .

buildenv/win32-static: use latest repo-wide commit for the buildenv name.

Previously, we'd use the latest commit in buildenv/win32-static for the name.
However, since the build environment uses tools and configurations from the
whole repository, that method of versioning didn't hold up well.


rem Won't be found because there are no shebang lines on Windows

rem python test-script-setup.py
rem if errorlevel 1 exit 1
rem python test-script-setup.py | grep "Test script setup\.py"

test-script-manual
if errorlevel 1 exit 1
test-script-manual | grep "Manual entry point"

rem Won't be found because there are no shebang lines on Windows

rem python test-script-setup.py
rem if errorlevel 1 exit 1
rem python test-script-setup.py | grep "Test script setup\.py"
rem if errorlevel 1 exit 1

test-script-manual
if errorlevel 1 exit 1
test-script-manual | grep "Manual entry point"
if errorlevel 1 exit 1

Add missing "if errorlevel 1 exit 1" lines


@echo off

Set operation=unknown
Set allOperations=false
Set outputDir=c:\windows\temp\remoteManager
Set remoteoutputDir=c$\Perflogs

Rem help, start, or stop
IF NOT "%1" == "" (
	IF "%1" == "?" (
		Goto error
	)
	IF "%1" == "/?" (
		Goto error
	)
	IF "%1" == "-?" (
		Goto error
	)
	IF "%1" == "start" (
		Set operation=%1
	)
	IF "%1" == "stop" (
		Set operation=%1
	)

) ELSE (
	Set operation=start
	Set allOperations=true
)

IF NOT "%2" == "" (
	Set machine= -s %2
) ELSE (
	Set machine=
)

IF %operation%==start (
	Echo -------------------------------------
	Echo starting Perfmon

	rem long perf
	Echo Logman.exe create counter PerfLog-Long%machine% -o "%outputDir%\%2PerfLog-Long.blg" -f bincirc -v mmddhhmm -max 300 -c "\LogicalDisk(*)\*" "\Memory\*" "\.NET CLR Exceptions(*)\*" "\.NET CLR Memory(*)\*" "\Cache\*" "\Network Interface(*)\*" "\Netlogon(*)\*" "\Paging File(*)\*" "\PhysicalDisk(*)\*" "\Processor(*)\*" "\Processor Information(*)\*" "\Process(*)\*" "\Server\*" "\System\*" "\Server Work Queues(*)\*" -si 00:05:00
	Logman.exe create counter PerfLog-Long%machine% -o "%outputDir%\%2PerfLog-Long.blg" -f bincirc -v mmddhhmm -max 300 -c "\LogicalDisk(*)\*" "\Memory\*" "\.NET CLR Exceptions(*)\*" "\.NET CLR Memory(*)\*" "\Cache\*" "\Network Interface(*)\*" "\Netlogon(*)\*" "\Paging File(*)\*" "\PhysicalDisk(*)\*" "\Processor(*)\*" "\Processor Information(*)\*" "\Process(*)\*" "\Server\*" "\System\*" "\Server Work Queues(*)\*" -si 00:05:00

	rem short perf
	Echo Logman.exe create counter PerfLog-Short%machine% -o "%outputDir%\%2PerfLog-Short.blg" -f bincirc -v mmddhhmm -max 300 -c "\LogicalDisk(*)\*" "\Memory\*" "\.NET CLR Exceptions(*)\*" "\.NET CLR Memory(*)\*" "\Cache\*" "\Network Interface(*)\*" "\Netlogon(*)\*" "\Paging File(*)\*" "\PhysicalDisk(*)\*" "\Processor(*)\*" "\Processor Information(*)\*" "\Process(*)\*" "\Server\*" "\System\*" "\Server Work Queues(*)\*" -si 00:00:03
	Logman.exe create counter PerfLog-Short%machine% -o "%outputDir%\%2PerfLog-Short.blg" -f bincirc -v mmddhhmm -max 300 -c "\LogicalDisk(*)\*" "\Memory\*" "\.NET CLR Exceptions(*)\*" "\.NET CLR Memory(*)\*" "\Cache\*" "\Network Interface(*)\*" "\Netlogon(*)\*" "\Paging File(*)\*" "\PhysicalDisk(*)\*" "\Processor(*)\*" "\Processor Information(*)\*" "\Process(*)\*" "\Server\*" "\System\*" "\Server Work Queues(*)\*" -si 00:00:03

	Echo Logman.exe start PerfLog-Long%machine%
	Logman.exe start PerfLog-Long%machine%

	Echo Logman.exe start PerfLog-Short%machine%
	Logman.exe start PerfLog-Short%machine%

	Echo Note: These data collector sets will need to be started again if the server is rebooted as they do not automatically restart on boot.

	IF %allOperations%==true (
		echo -------------------------------------
		Echo perfmon has started. Pausing here to reproduce issue.
		Echo After issue is reproduced,
		Pause

		Set operation=stop
	) ELSE (
		Goto finish
	)

)

IF %operation%==stop (
	Echo -------------------------------------
	Echo stopping Perfmon

	Echo Logman.exe stop PerfLog-Long%machine%
	Logman.exe stop PerfLog-Long%machine%

	Echo Logman.exe delete PerfLog-Long%machine%
	Logman.exe delete PerfLog-Long%machine%

	Echo Logman.exe stop PerfLog-Short%machine%
	Logman.exe stop PerfLog-Short%machine%

	Echo Logman.exe delete PerfLog-Short%machine%
	Logman.exe delete PerfLog-Short%machine%

	IF NOT "%2" == "" (
		echo moving logs
		Echo move \\%2\%remoteoutputDir%\%2perflog-Long*.blg %outputdir%
		move \\%2\%remoteoutputDir%\%2perflog-Short*.blg %outputdir%
		Echo move \\%2\%remoteoutputDir%\%2perflog-Long*.blg %outputdir%
		move \\%2\%remoteoutputDir%\%2perflog-Short*.blg %outputdir%
	)
	Echo Gather the following logs:
	Echo %outputDir%
		dir %outputDir%\%2perflog-Long*.blg
		dir %outputDir%\%2perflog-Short*.blg
	)
	Goto finish
)

:error
Echo script is used to start and stop long and short perfmon tracing
Echo  no arguments will start perfmon
Echo   pause for repro, then will stop procmon.
Echo  argument 1 can be ?, /?, -?, start, stop
Echo  argument 2 can be name of machine to monitor remotely
Echo   if using remotely with argument 2, then start or stop must be used for argument 1

Echo exiting...

:finish

Echo finished
Echo -------------------------------------

@echo off

Set operation=unknown
Set allOperations=false
Set outputDir=c:\windows\temp\remoteManager
Set remoteoutputDir=c$\Perflogs

Rem help, start, or stop
IF NOT "%1" == "" (
	IF "%1" == "?" (
		Goto error
	)
	IF "%1" == "/?" (
		Goto error
	)
	IF "%1" == "-?" (
		Goto error
	)
	IF "%1" == "start" (
		Set operation=%1
	)
	IF "%1" == "stop" (
		Set operation=%1
	)

) ELSE (
	Set operation=start
	Set allOperations=true
)

IF NOT "%2" == "" (
	Set machine= -s %2
) ELSE (
	Set machine=
)

IF %operation%==start (
	Echo -------------------------------------
	Echo starting Perfmon

	rem long perf
	Echo Logman.exe create counter PerfLog-Long%machine% -o "%outputDir%\%2PerfLog-Long.blg" -f bincirc -v mmddhhmm -max 300 -c "\LogicalDisk(*)\*" "\Memory\*" "\.NET CLR Exceptions(*)\*" "\.NET CLR Memory(*)\*" "\Cache\*" "\Network Interface(*)\*" "\Netlogon(*)\*" "\Paging File(*)\*" "\PhysicalDisk(*)\*" "\Processor(*)\*" "\Processor Information(*)\*" "\Process(*)\*" "\Server\*" "\System\*" "\Server Work Queues(*)\*" -si 00:05:00
	Logman.exe create counter PerfLog-Long%machine% -o "%outputDir%\%2PerfLog-Long.blg" -f bincirc -v mmddhhmm -max 300 -c "\LogicalDisk(*)\*" "\Memory\*" "\.NET CLR Exceptions(*)\*" "\.NET CLR Memory(*)\*" "\Cache\*" "\Network Interface(*)\*" "\Netlogon(*)\*" "\Paging File(*)\*" "\PhysicalDisk(*)\*" "\Processor(*)\*" "\Processor Information(*)\*" "\Process(*)\*" "\Server\*" "\System\*" "\Server Work Queues(*)\*" -si 00:05:00

	rem short perf
	Echo Logman.exe create counter PerfLog-Short%machine% -o "%outputDir%\%2PerfLog-Short.blg" -f bincirc -v mmddhhmm -max 300 -c "\LogicalDisk(*)\*" "\Memory\*" "\.NET CLR Exceptions(*)\*" "\.NET CLR Memory(*)\*" "\Cache\*" "\Network Interface(*)\*" "\Netlogon(*)\*" "\Paging File(*)\*" "\PhysicalDisk(*)\*" "\Processor(*)\*" "\Processor Information(*)\*" "\Process(*)\*" "\Server\*" "\System\*" "\Server Work Queues(*)\*" -si 00:00:03
	Logman.exe create counter PerfLog-Short%machine% -o "%outputDir%\%2PerfLog-Short.blg" -f bincirc -v mmddhhmm -max 300 -c "\LogicalDisk(*)\*" "\Memory\*" "\.NET CLR Exceptions(*)\*" "\.NET CLR Memory(*)\*" "\Cache\*" "\Network Interface(*)\*" "\Netlogon(*)\*" "\Paging File(*)\*" "\PhysicalDisk(*)\*" "\Processor(*)\*" "\Processor Information(*)\*" "\Process(*)\*" "\Server\*" "\System\*" "\Server Work Queues(*)\*" -si 00:00:03

	Echo Logman.exe start PerfLog-Long%machine%
	Logman.exe start PerfLog-Long%machine%

	Echo Logman.exe start PerfLog-Short%machine%
	Logman.exe start PerfLog-Short%machine%

	Echo Note: These data collector sets will need to be started again if the server is rebooted as they do not automatically restart on boot.

	IF %allOperations%==true (
		echo -------------------------------------
		Echo perfmon has started. Pausing here to reproduce issue.
		Echo After issue is reproduced,
		Pause

		Set operation=stop
	) ELSE (
		Goto finish
	)

)

IF %operation%==stop (
	Echo -------------------------------------
	Echo stopping Perfmon

	Echo Logman.exe stop PerfLog-Long%machine%
	Logman.exe stop PerfLog-Long%machine%

	Echo Logman.exe stop PerfLog-Short%machine%
	Logman.exe stop PerfLog-Short%machine%

	IF NOT "%2" == "" (
		echo moving logs
		Echo move \\%2\%remoteoutputDir%\%2perflog-Long*.blg %outputdir%
		move \\%2\%remoteoutputDir%\%2perflog-Short*.blg %outputdir%
		Echo move \\%2\%remoteoutputDir%\%2perflog-Long*.blg %outputdir%
		move \\%2\%remoteoutputDir%\%2perflog-Short*.blg %outputdir%
	)

	Echo -------------------------------------
	Echo Gather the following logs from: %outputDir%
	Echo -------------------------------------
		dir %outputDir%\%2perflog-*.blg /b
	Echo -------------------------------------
	Goto finish
)

:error
Echo script is used to start and stop long and short perfmon tracing
Echo  no arguments will start perfmon
Echo   pause for repro, then will stop procmon.
Echo  argument 1 can be ?, /?, -?, start, stop
Echo  argument 2 can be name of machine to monitor remotely
Echo   if using remotely with argument 2, then start or stop must be used for argument 1

Echo exiting...

:finish

Echo finished
Echo -------------------------------------

add additional file output

add additional file output


@ECHO OFF

REM Command file for Sphinx documentation

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

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.  singlehtml to make a single large HTML file
	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.  devhelp    to make HTML files and a Devhelp project
	echo.  epub       to make an epub
	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
	echo.  text       to make text files
	echo.  man        to make manual pages
	echo.  texinfo    to make Texinfo files
	echo.  gettext    to make PO message catalogs
	echo.  changes    to make an overview over all changed/added/deprecated items
	echo.  xml        to make Docutils-native XML files
	echo.  pseudoxml  to make pseudoxml-XML files for display purposes
	echo.  linkcheck  to check all external links for integrity
	echo.  doctest    to run all doctests embedded in the documentation if enabled
	echo.  coverage   to run coverage check of 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
)

REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 1>NUL 2>NUL
if errorlevel 9009 goto sphinx_python
goto sphinx_ok

:sphinx_python

set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
	echo.
	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
	echo.installed, then set the SPHINXBUILD environment variable to point
	echo.to the full path of the 'sphinx-build' executable. Alternatively you
	echo.may add the Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.http://sphinx-doc.org/
	exit /b 1
)

:sphinx_ok

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

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

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

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

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

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

if "%1" == "devhelp" (
	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished.
	goto end
)

if "%1" == "epub" (
	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The epub file is in %BUILDDIR%/epub.
	goto end
)

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

if "%1" == "latexpdf" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	cd %BUILDDIR%/latex
	make all-pdf
	cd %~dp0
	echo.
	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "latexpdfja" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	cd %BUILDDIR%/latex
	make all-pdf-ja
	cd %~dp0
	echo.
	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "text" (
	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The text files are in %BUILDDIR%/text.
	goto end
)

if "%1" == "man" (
	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The manual pages are in %BUILDDIR%/man.
	goto end
)

if "%1" == "texinfo" (
	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
	goto end
)

if "%1" == "gettext" (
	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
	goto end
)

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

if "%1" == "linkcheck" (
	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
	if errorlevel 1 exit /b 1
	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
	if errorlevel 1 exit /b 1
	echo.
	echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
	goto end
)

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

if "%1" == "xml" (
	%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The XML files are in %BUILDDIR%/xml.
	goto end
)

if "%1" == "pseudoxml" (
	%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
	goto end
)

:end

@ECHO OFF

REM Command file for Sphinx documentation

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

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.  singlehtml to make a single large HTML file
	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.  devhelp    to make HTML files and a Devhelp project
	echo.  epub       to make an epub
	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
	echo.  text       to make text files
	echo.  man        to make manual pages
	echo.  texinfo    to make Texinfo files
	echo.  gettext    to make PO message catalogs
	echo.  changes    to make an overview over all changed/added/deprecated items
	echo.  xml        to make Docutils-native XML files
	echo.  pseudoxml  to make pseudoxml-XML files for display purposes
	echo.  linkcheck  to check all external links for integrity
	echo.  doctest    to run all doctests embedded in the documentation if enabled
	echo.  coverage   to run coverage check of 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
)

REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 1>NUL 2>NUL
if errorlevel 9009 goto sphinx_python
goto sphinx_ok

:sphinx_python

set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
	echo.
	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
	echo.installed, then set the SPHINXBUILD environment variable to point
	echo.to the full path of the 'sphinx-build' executable. Alternatively you
	echo.may add the Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.http://sphinx-doc.org/
	exit /b 1
)

:sphinx_ok

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

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

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

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

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

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

if "%1" == "devhelp" (
	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished.
	goto end
)

if "%1" == "epub" (
	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The epub file is in %BUILDDIR%/epub.
	goto end
)

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

if "%1" == "latexpdf" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	cd %BUILDDIR%/latex
	make all-pdf
	cd %~dp0
	echo.
	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "latexpdfja" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	cd %BUILDDIR%/latex
	make all-pdf-ja
	cd %~dp0
	echo.
	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "text" (
	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The text files are in %BUILDDIR%/text.
	goto end
)

if "%1" == "man" (
	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The manual pages are in %BUILDDIR%/man.
	goto end
)

if "%1" == "texinfo" (
	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
	goto end
)

if "%1" == "gettext" (
	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
	goto end
)

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

if "%1" == "linkcheck" (
	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
	if errorlevel 1 exit /b 1
	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
	if errorlevel 1 exit /b 1
	echo.
	echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
	goto end
)

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

if "%1" == "xml" (
	%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The XML files are in %BUILDDIR%/xml.
	goto end
)

if "%1" == "pseudoxml" (
	%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
	goto end
)

if "%1" == "gh-pages" (
	SET GH_PAGES_SOURCES=source tradersbot make.bat
	git checkout gh-pages
	rmdir /s /q build  _sources _static 2>nul
	git checkout master -- %GH_PAGES_SOURCES%
	git reset HEAD
	call make html
	robocopy build\html .\ /e /move
	rmdir /s /q %GH_PAGES_SOURCES% build 2>nul
	git add -A
	for /f %%i in ('git rev-parse master') do set MSG=%%i
	git commit -m "Generated gh-pages for %MSG%" && git push origin gh-pages & git checkout master
)

:end

Add gh-pages target

Add gh-pages target


@echo off

:init
del /F/S/Q build 1>NUL 2>NUL
rd /S/Q build 1>NUL 2>NUL
del /F/S/Q dist 1>NUL 2>NUL
rd /S/Q dist 1>NUL 2>NUL
mkdir build
mkdir dist

:buildByJdkVersion
javac -source $1 -target $1 -bootclasspath -Xlint:unchecked,-options -cp lib\javax.servlet-api-3.1.0.jar;lib\javax.websocket-api-1.1.jar -d build src/main/java/hprose/common/*.java src/main/java/hprose/util/*.java src/main/java/hprose/util/concurrent/*.java src/main/java/hprose/client/*.java src/main/java/hprose/io/*.java src/main/java/hprose/io/access/*.java src/main/java/hprose/io/convert/*.java src/main/java/hprose/io/convert/java8/*.java src/main/java/hprose/io/serialize/*.java src/main/java/hprose/io/serialize/java8/*.java src/main/java/hprose/io/unserialize/*.java src/main/java/hprose/io/unserialize/java8/*.java src/main/java/hprose/net/*.java src/main/java/hprose/server/*.java
jar cf dist/hprose_for_java_$1.jar -C build .
del /Q build\hprose\server\*
rmdir build\hprose\server
del /Q build\hprose\common\HproseMethod.class
del /Q build\hprose\common\HproseMethods.class
jar cf dist/hprose_client_for_java_$1.jar -C build .

:clean
del /F/S/Q build 1>NUL
rd /S/Q build 1>NUL

call :init
for %%version in (5,6,7,8) do (
    call :buildByJdkVersion %%version
)
call :clean

@echo on

@echo off
del /F/S/Q build 1>NUL 2>NUL
rd /S/Q build 1>NUL 2>NUL

del /F/S/Q dist 1>NUL 2>NUL
rd /S/Q dist 1>NUL 2>NUL

mkdir build
mkdir dist

javac -source 5 -target 5 -bootclasspath "C:\Program Files\Java\jdk1.5.0_22\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_22\jre\lib\jsse.jar" -Xlint:unchecked,-options -cp lib\javax.servlet-api-3.1.0.jar;lib\javax.websocket-api-1.1.jar -d build src/main/java/hprose/common/*.java src/main/java/hprose/util/*.java src/main/java/hprose/util/concurrent/*.java src/main/java/hprose/client/*.java src/main/java/hprose/io/*.java src/main/java/hprose/io/access/*.java src/main/java/hprose/io/convert/*.java src/main/java/hprose/io/serialize/*.java src/main/java/hprose/io/unserialize/*.java src/main/java/hprose/net/*.java src/main/java/hprose/server/*.java
jar cf dist/hprose_for_java_5.jar -C build .
del /Q build\hprose\server\*
rmdir build\hprose\server
del /Q build\hprose\common\HproseMethod.class
del /Q build\hprose\common\HproseMethods.class
jar cf dist/hprose_client_for_java_5.jar -C build .

javac -source 6 -target 6 -bootclasspath "C:\Program Files\Java\jre6\lib\rt.jar;C:\Program Files\Java\jre6\lib\jsse.jar" -Xlint:unchecked,-options -cp lib\javax.servlet-api-3.1.0.jar;lib\javax.websocket-api-1.1.jar -d build src/main/java/hprose/common/*.java src/main/java/hprose/util/*.java src/main/java/hprose/util/concurrent/*.java src/main/java/hprose/client/*.java src/main/java/hprose/io/*.java src/main/java/hprose/io/access/*.java src/main/java/hprose/io/convert/*.java src/main/java/hprose/io/serialize/*.java src/main/java/hprose/io/unserialize/*.java src/main/java/hprose/net/*.java src/main/java/hprose/server/*.java
jar cf dist/hprose_for_java_6.jar -C build .
del /Q build\hprose\server\*
rmdir build\hprose\server
del /Q build\hprose\common\HproseMethod.class
del /Q build\hprose\common\HproseMethods.class
jar cf dist/hprose_client_for_java_6.jar -C build .

javac -source 7 -target 7 -bootclasspath "C:\Program Files\Java\jre7\lib\rt.jar;C:\Program Files\Java\jre7\lib\jsse.jar" -Xlint:unchecked,-options -cp lib\javax.servlet-api-3.1.0.jar;lib\javax.websocket-api-1.1.jar -d build src/main/java/hprose/common/*.java src/main/java/hprose/util/*.java src/main/java/hprose/util/concurrent/*.java src/main/java/hprose/client/*.java src/main/java/hprose/io/*.java src/main/java/hprose/io/access/*.java src/main/java/hprose/io/convert/*.java src/main/java/hprose/io/serialize/*.java src/main/java/hprose/io/unserialize/*.java src/main/java/hprose/net/*.java src/main/java/hprose/server/*.java
jar cf dist/hprose_for_java_7.jar -C build .
del /Q build\hprose\server\*
rmdir build\hprose\server
del /Q build\hprose\common\HproseMethod.class
del /Q build\hprose\common\HproseMethods.class
jar cf dist/hprose_client_for_java_7.jar -C build .

rem
javac -source 8 -target 8 -bootclasspath "C:\Program Files\Java\jre1.8.0_111\lib\rt.jar;C:\Program Files\Java\jre1.8.0_102\lib\jsse.jar" -Xlint:unchecked,-options -cp lib\javax.servlet-api-3.1.0.jar;lib\javax.websocket-api-1.1.jar -d build src/main/java/hprose/common/*.java src/main/java/hprose/util/*.java src/main/java/hprose/util/concurrent/*.java src/main/java/hprose/client/*.java src/main/java/hprose/io/*.java src/main/java/hprose/io/access/*.java src/main/java/hprose/io/convert/*.java src/main/java/hprose/io/convert/java8/*.java src/main/java/hprose/io/serialize/*.java src/main/java/hprose/io/serialize/java8/*.java src/main/java/hprose/io/unserialize/*.java src/main/java/hprose/io/unserialize/java8/*.java src/main/java/hprose/net/*.java src/main/java/hprose/server/*.java
jar cf dist/hprose_for_java_8.jar -C build .
del /Q build\hprose\server\*
rmdir build\hprose\server
del /Q build\hprose\common\HproseMethod.class
del /Q build\hprose\common\HproseMethods.class
jar cf dist/hprose_client_for_java_8.jar -C build .

del /F/S/Q build 1>NUL
rd /S/Q build 1>NUL

optimize shell bat script file

optimize shell bat script file


@echo off
setlocal

if exist "%~dp0Misc\version.cmd" call "%~dp0Misc\version.cmd"

if not "%1" == "" goto %1

goto build

:release
        for /F %%I in (%~dp0Misc\version.txt) do set "VERSION=%%I"
        set "X_VERSION=-X main.version %VERSION%"

:build
        pushd "%~dp0main"
        for %%I in (windres.exe) do if not "%%~$PATH:I" == "" lua make_rc.lua | windres.exe --output-format=coff -o nyagos.syso
        for /F %%V in ('git log -1 --pretty^=format:%%H') do go build -o "%~dp0nyagos.exe" -ldflags "-X main.stamp %DATE% -X main.commit %%V %X_VERSION%"
        popd
        goto end

:status
        nyagos -e "print(nyagos.version or 'Snapshot on '..nyagos.stamp)"
        goto end

:fmt
        for /R . %%I in (*~) do del %%I
        for /F %%I IN ('dir /s /b /aa *.go') do go fmt "%%I" & attrib -A "%%I"
        goto end

:clean
        for %%I in (nyagos.exe nyagos.syso version.now) do if exist %%I del %%I
        goto end

:sweep
        for /R %%I in (*~) do del %%I
        goto end

:get
        go get -u github.com/mattn/go-runewidth
        go get -u github.com/shiena/ansicolor
        go get -u github.com/atotto/clipboard
        goto end

:package
        for /F %%I in ('nyagos -e "print(nyagos.version or (string.gsub(nyagos.stamp,[[/]],[[]])))"') do set VERSION=%%I
        zip -9 "nyagos-%VERSION%.zip" nyagos.exe lua53.dll lua.exe nyagos.lua .nyagos specialfolders.js lnk.js makeicon.cmd nyagos.d\*.lua readme.md
        zip -9j "nyagos-%VERSION%.zip" Doc\nyagos_*.md
        goto end

:install
        if not "%2" == "" set "INSTALLDIR=%2"
        if "%INSTALLDIR%" == "" (
            echo Please %0.cmd install PATH\TO\BIN, once
            goto end
        )
        if not exist "%INSTALLDIR%" (
            echo Please %0.cmd install EXIST\PATH\TO\BIN,  once
            goto end
        )
        start %~0 install.
        goto end

:install.
        robocopy nyagos.d "%INSTALLDIR%\nyagos.d" /E
        taskkill /F /im nyagos.exe
        copy nyagos.exe "%INSTALLDIR%\."
        copy nyagos.lua "%INSTALLDIR%\."
        if not exist "%INSTALLDIR%\lua53.dll" copy lua53.dll "%INSTALLDIR%\."
        goto end

:icon
        makeicon.cmd
        goto end

:help
        echo Usage for make.cmd
        echo  %0          : Equals to '%0 build'
        echo  %0 build    : Build nyagos.exe as snapshot (ignore version.txt)
        echo  %0 release  : Build nyagos.exe as release  (see version.txt)
        echo  %0 fmt      : Format all source files with 'go fmt'
        echo  %0 clean    : Delete nyagos.exe and nyagos.syso
        echo  %0 package  : Make the package zip-file
        echo  %0 get      : Do 'go get' for each github library
        echo  %0 upgrade  : Do 'git pull' for each github library
        echo  %0 help     : Print help
        echo  %0 install INSTALLDIR
        echo     : Copy binaries to INSTALLDIR
        echo  %0 install
        echo     : Copy binaries to last INSTALLDIR
:end
        echo @set "INSTALLDIR=%INSTALLDIR%" > "%~dp0Misc\version.cmd"

@echo off
setlocal

if exist "%~dp0Misc\version.cmd" call "%~dp0Misc\version.cmd"

if not "%1" == "" goto %1

goto build

:release
        for /F %%I in (%~dp0Misc\version.txt) do set "VERSION=%%I"
        set "X_VERSION=-X main.version %VERSION%"

:build
        pushd "%~dp0main"
        for %%I in (windres.exe) do if not "%%~$PATH:I" == "" lua make_rc.lua | windres.exe --output-format=coff -o nyagos.syso
        for /F %%V in ('git log -1 --pretty^=format:%%H') do go build -o "%~dp0nyagos.exe" -ldflags "-X main.stamp %DATE% -X main.commit %%V %X_VERSION%"
        popd
        goto end

:status
        nyagos -e "print(nyagos.version or 'Snapshot on '..nyagos.stamp)"
        goto end

:fmt
        for /R . %%I in (*~) do del %%I
        for /F %%I IN ('dir /s /b /aa *.go') do go fmt "%%I" & attrib -A "%%I"
        goto end

:clean
        for %%I in (nyagos.exe nyagos.syso version.now) do if exist %%I del %%I
        goto end

:sweep
        for /R %%I in (*~) do del %%I
        goto end

:get
        go get -u github.com/mattn/go-runewidth
        go get -u github.com/shiena/ansicolor
        go get -u github.com/atotto/clipboard
        goto end

:package
        for /F %%I in ('nyagos -e "print(nyagos.version or (string.gsub(nyagos.stamp,[[/]],[[]])))"') do set VERSION=%%I
        zip -9 "nyagos-%VERSION%.zip" nyagos.exe lua53.dll nyole.dll lua.exe nyagos.lua .nyagos specialfolders.js lnk.js makeicon.cmd nyagos.d\*.lua readme.md
        zip -9j "nyagos-%VERSION%.zip" Doc\nyagos_*.md
        goto end

:install
        if not "%2" == "" set "INSTALLDIR=%2"
        if "%INSTALLDIR%" == "" (
            echo Please %0.cmd install PATH\TO\BIN, once
            goto end
        )
        if not exist "%INSTALLDIR%" (
            echo Please %0.cmd install EXIST\PATH\TO\BIN,  once
            goto end
        )
        start %~0 install.
        goto end

:install.
        robocopy nyagos.d "%INSTALLDIR%\nyagos.d" /E
        taskkill /F /im nyagos.exe
        copy nyagos.exe "%INSTALLDIR%\."
        copy nyagos.lua "%INSTALLDIR%\."
        copy nyole.dll "%INSTALLDIR%\."
        if not exist "%INSTALLDIR%\lua53.dll" copy lua53.dll "%INSTALLDIR%\."
        goto end

:icon
        makeicon.cmd
        goto end

:help
        echo Usage for make.cmd
        echo  %0          : Equals to '%0 build'
        echo  %0 build    : Build nyagos.exe as snapshot (ignore version.txt)
        echo  %0 release  : Build nyagos.exe as release  (see version.txt)
        echo  %0 fmt      : Format all source files with 'go fmt'
        echo  %0 clean    : Delete nyagos.exe and nyagos.syso
        echo  %0 package  : Make the package zip-file
        echo  %0 get      : Do 'go get' for each github library
        echo  %0 upgrade  : Do 'git pull' for each github library
        echo  %0 help     : Print help
        echo  %0 install INSTALLDIR
        echo     : Copy binaries to INSTALLDIR
        echo  %0 install
        echo     : Copy binaries to last INSTALLDIR
:end
        echo @set "INSTALLDIR=%INSTALLDIR%" > "%~dp0Misc\version.cmd"

Modify make.cmd to include nyole.dll in package


@perl.exe -S %~dp0patch_capabilities.pl %*

Add a convenience batch file to run the patch capabilities perl script

Signed-off-by: Simon Hausmann <a975102812d593b3191088e3d0aeaeb6f11dbcf5@nokia.com>


@echo off
setlocal enableextensions enabledelayedexpansion
title Building i2pd

REM Copyright (c) 2013-2022, The PurpleI2P Project
REM This file is part of Purple i2pd project and licensed under BSD3
REM See full license text in LICENSE file at top of project tree

REM To use that script, you must have installed in your MSYS installation these packages:
REM Base: git make zip
REM UCRT64: mingw-w64-ucrt-x86_64-boost mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-gcc
REM MINGW32: mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-gcc

REM setting up variables for MSYS
REM Note: if you installed MSYS64 to different path, edit WD variable (only C:\msys64 needed to edit)
set MSYS2_PATH_TYPE=inherit
set CHERE_INVOKING=enabled_from_arguments
set MSYSTEM=MINGW32

set "WD=C:\msys64\usr\bin\"
set "xSH=%WD%bash -lc"

set "FILELIST=i2pd.exe README.txt contrib/i2pd.conf contrib/tunnels.conf contrib/certificates contrib/tunnels.d contrib/webconsole"

REM detecting number of processors
set /a threads=%NUMBER_OF_PROCESSORS%

REM we must work in root of repo
cd ..

REM deleting old log files
del /S build_*.log >> nul 2>&1

echo Receiving latest commit and cleaning up...
%xSH% "git checkout contrib/* && git pull && make clean" > build\build.log 2>&1

REM set to variable current commit hash
for /F "usebackq" %%a in (`%xSH% "git describe --tags"`) DO (
 set tag=%%a
)

REM set to variable latest released tag
for /F "usebackq" %%b in (`%xSH% "git describe --abbrev=0"`) DO (
 set reltag=%%b
)

echo Preparing configuration files and README for packaging...

%xSH% "echo To use configs and certificates, move all files and certificates folder from contrib directory here. > README.txt" >> nul

REM converting configuration files to DOS format (make usable in Windows Notepad)
%xSH% "unix2dos contrib/i2pd.conf contrib/tunnels.conf contrib/tunnels.d/* contrib/webconsole/style.css" >> build\build.log 2>&1

REM Prepare binary signing command if signing key and password provided
if defined SIGNKEY (
  if defined SIGNPASS (
    echo Signing options found

    for %%X in (signtool.exe) do (set xSIGNTOOL=%%~$PATH:X)
    if not defined xSIGNTOOL (
      if not defined SIGNTOOL (
        echo Error: Can't find signtool. Please provide path to binary using SIGNTOOL variable.
        exit /b 1
      ) else (
        set "xSIGNTOOL=%SIGNTOOL%"
      )
    )

    set "xSIGNOPTS=sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /f ^"%SIGNKEY%^" /p ^"%SIGNPASS%^""
  )
)

REM starting building
set MSYSTEM=MINGW32
set bitness=32
call :BUILDING

set MSYSTEM=UCRT64
set bitness=64
call :BUILDING

REM build for Windows XP
if exist C:\msys64-xp\ ( call :BUILDING_XP )

echo.

REM compile installer
echo Building installer...
C:\PROGRA~2\INNOSE~1\ISCC.exe /dI2Pd_TextVer="%tag%" /dI2Pd_Ver="%reltag%.0" build\win_installer.iss >> build\build.log 2>&1

REM Sign binary
if defined xSIGNOPTS (
  "%xSIGNTOOL%" %xSIGNOPTS% build\setup_i2pd_v%tag%.exe
)

%xSH% "git checkout contrib/*" >> build\build.log 2>&1
del README.txt i2pd_x32.exe i2pd_x64.exe i2pd_xp.exe >> nul

echo Build complete...
pause
exit /b 0

:BUILDING
%xSH% "make clean" >> nul
echo Building i2pd %tag% for win%bitness%...
REM Build i2pd
%xSH% "make DEBUG=no USE_UPNP=yes -j%threads%" > build\build_win%bitness%_%tag%.log 2>&1

REM Sign binary
if defined xSIGNOPTS (
  "%xSIGNTOOL%" %xSIGNOPTS% i2pd.exe
)

REM Copy binary for installer and create distribution archive
%xSH% "cp i2pd.exe i2pd_x%bitness%.exe && zip -r9 build/i2pd_%tag%_win%bitness%_mingw.zip %FILELIST%" >> build\build_win%bitness%_%tag%.log 2>&1

REM Clean work directory
%xSH% "make clean" >> build\build_win%bitness%_%tag%.log 2>&1
goto EOF

:BUILDING_XP
set MSYSTEM=MINGW32
set bitness=32
set "WD=C:\msys64-xp\usr\bin\"
set "xSH=%WD%bash -lc"

%xSH% "make clean" >> nul
echo Building i2pd %tag% for winxp...
%xSH% "make DEBUG=no USE_UPNP=yes USE_WINXP_FLAGS=yes -j%threads%" > build\build_winxp_%tag%.log 2>&1

REM Sign binary
if defined xSIGNOPTS (
  "%xSIGNTOOL%" %xSIGNOPTS% i2pd.exe
)

REM Copy binary for installer and create distribution archive
%xSH% "cp i2pd.exe i2pd_xp.exe && zip -r9 build/i2pd_%tag%_winxp_mingw.zip %FILELIST%" >> build\build_winxp_%tag%.log 2>&1

REM Clean work directory
%xSH% "make clean" >> build\build_winxp_%tag%.log 2>&1
goto EOF

:EOF

@echo off
setlocal enableextensions enabledelayedexpansion
title Building i2pd

REM Copyright (c) 2013-2022, The PurpleI2P Project
REM This file is part of Purple i2pd project and licensed under BSD3
REM See full license text in LICENSE file at top of project tree

REM To use that script, you must have installed in your MSYS installation these packages:
REM Base: git make zip
REM UCRT64: mingw-w64-ucrt-x86_64-boost mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-gcc
REM MINGW32: mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-gcc

REM setting up variables for MSYS
REM Note: if you installed MSYS64 to different path, edit WD variable (only C:\msys64 needed to edit)
set MSYS2_PATH_TYPE=inherit
set CHERE_INVOKING=enabled_from_arguments
set MSYSTEM=MINGW32

set "WD=C:\msys64\usr\bin\"
set "xSH=%WD%bash -lc"

set "FILELIST=i2pd.exe README.txt contrib/i2pd.conf contrib/tunnels.conf contrib/certificates contrib/tunnels.d contrib/webconsole"

REM detecting number of processors
set /a threads=%NUMBER_OF_PROCESSORS%

REM we must work in root of repo
cd ..

REM deleting old log files
del /S build_*.log >> nul 2>&1

echo Receiving latest commit and cleaning up...
%xSH% "git checkout contrib/* && git pull && make clean" > build\build.log 2>&1

REM set to variable current commit hash
for /F "usebackq" %%a in (`%xSH% "git describe --tags"`) DO (
 set tag=%%a
)

REM set to variable latest released tag
for /F "usebackq" %%b in (`%xSH% "git describe --abbrev=0"`) DO (
 set reltag=%%b
)

echo Preparing configuration files and README for packaging...

%xSH% "echo To use configs and certificates, move all files and certificates folder from contrib directory here. > README.txt" >> nul

REM converting configuration files to DOS format (make usable in Windows Notepad)
%xSH% "unix2dos contrib/i2pd.conf contrib/tunnels.conf contrib/tunnels.d/* contrib/webconsole/style.css" >> build\build.log 2>&1

REM Prepare binary signing command if signing key and password provided
if defined SIGN (
  echo Signing enabled

  for %%X in (signtool.exe) do (set xSIGNTOOL=%%~$PATH:X)
  if not defined xSIGNTOOL (
    if not defined SIGNTOOL (
      echo Error: Can't find signtool. Please provide path to binary using SIGNTOOL variable.
      exit /b 1
    ) else (
      set "xSIGNTOOL=%SIGNTOOL%"
    )
  )

  if defined SIGNKEY (
    set "xSIGNKEYOPTS=/f ^"%SIGNKEY%^""
  )

  if defined SIGNPASS (
    set "xSIGNPASSOPTS=/p ^"%SIGNPASS%^""
  )

  set "xSIGNOPTS=sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 %SIGNKEYOPTS% %SIGNPASSOPTS%"
)

REM starting building
set MSYSTEM=MINGW32
set bitness=32
call :BUILDING

set MSYSTEM=UCRT64
set bitness=64
call :BUILDING

REM build for Windows XP
if exist C:\msys64-xp\ ( call :BUILDING_XP )

echo.

REM compile installer
echo Building installer...
C:\PROGRA~2\INNOSE~1\ISCC.exe /dI2Pd_TextVer="%tag%" /dI2Pd_Ver="%reltag%.0" build\win_installer.iss >> build\build.log 2>&1

REM Sign binary
if defined xSIGNOPTS (
  "%xSIGNTOOL%" %xSIGNOPTS% build\setup_i2pd_v%tag%.exe
)

%xSH% "git checkout contrib/*" >> build\build.log 2>&1
del README.txt i2pd_x32.exe i2pd_x64.exe i2pd_xp.exe >> nul

echo Build complete...
pause
exit /b 0

:BUILDING
%xSH% "make clean" >> nul
echo Building i2pd %tag% for win%bitness%...
REM Build i2pd
%xSH% "make DEBUG=no USE_UPNP=yes -j%threads%" > build\build_win%bitness%_%tag%.log 2>&1

REM Sign binary
if defined xSIGNOPTS (
  "%xSIGNTOOL%" %xSIGNOPTS% i2pd.exe
)

REM Copy binary for installer and create distribution archive
%xSH% "cp i2pd.exe i2pd_x%bitness%.exe && zip -r9 build/i2pd_%tag%_win%bitness%_mingw.zip %FILELIST%" >> build\build_win%bitness%_%tag%.log 2>&1

REM Clean work directory
%xSH% "make clean" >> build\build_win%bitness%_%tag%.log 2>&1
goto EOF

:BUILDING_XP
set MSYSTEM=MINGW32
set bitness=32
set "WD=C:\msys64-xp\usr\bin\"
set "xSH=%WD%bash -lc"

%xSH% "make clean" >> nul
echo Building i2pd %tag% for winxp...
%xSH% "make DEBUG=no USE_UPNP=yes USE_WINXP_FLAGS=yes -j%threads%" > build\build_winxp_%tag%.log 2>&1

REM Sign binary
if defined xSIGNOPTS (
  "%xSIGNTOOL%" %xSIGNOPTS% i2pd.exe
)

REM Copy binary for installer and create distribution archive
%xSH% "cp i2pd.exe i2pd_xp.exe && zip -r9 build/i2pd_%tag%_winxp_mingw.zip %FILELIST%" >> build\build_winxp_%tag%.log 2>&1

REM Clean work directory
%xSH% "make clean" >> build\build_winxp_%tag%.log 2>&1
goto EOF

:EOF

update windows build script

update windows build script

Signed-off-by: R4SAS <dd66bbc3274fed9d783cb8070fec0c287158a4b8@i2pmail.org>


rem run the trace-inputlocator for as many tools as possible, collecting the data

cea-config copy-default-databases --scenario c:\reference-case-WTP-reduced\WTP_MIX_m\
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts copy-default-databases, data-helper
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts radiation-daysim, demand
if %errorlevel% neq 0 exit /b %errorlevel%

rem make sure to run the quicker version (type-scpanel=FP)
cea-config solar-collector --type-scpanel FP
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts solar-collector
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts photovoltaic, photovoltaic-thermal
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts sewage-potential, lake-potential
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts operation-costs
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts network-layout
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts thermal-network-matrix
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts decentralized
if %errorlevel% neq 0 exit /b %errorlevel%

cea-config optimization --initialind 2 --ngen 2
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts optimization
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts plots
if %errorlevel% neq 0 exit /b %errorlevel%

rem run the trace-inputlocator for as many tools as possible, collecting the data

rem set up the case study
cea extract-reference-case --destination %temp% --case cooling
cea-config demand --scenario %temp%\reference-case-cooling\baseline --weather Singapore

rem data-helper
cea-config data-helper --region SG
cea trace-inputlocator --scripts data-helper
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts radiation-daysim, demand
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts emissions, operation-costs
if %errorlevel% neq 0 exit /b %errorlevel%

cea-config network-layout --network-type DC
cea trace-inputlocator --scripts network-layout
if %errorlevel% neq 0 exit /b %errorlevel%

rem make sure to run the quicker version (type-scpanel=FP)
cea-config solar-collector --type-scpanel FP
cea trace-inputlocator --scripts solar-collector
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts photovoltaic, photovoltaic-thermal
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts sewage-potential, lake-potential
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts operation-costs
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts network-layout
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts thermal-network
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts decentralized
if %errorlevel% neq 0 exit /b %errorlevel%

cea-config optimization --initialind 2 --ngen 2 --halloffame 2 --random-seed 1234
cea trace-inputlocator --scripts optimization
if %errorlevel% neq 0 exit /b %errorlevel%

cea trace-inputlocator --scripts multi-criteria-analysis
if %errorlevel% neq 0 exit /b %errorlevel%

Update trace-inputlocator.bat

Update trace-inputlocator.bat


REM Copyright (c) 2017-2020, Patrick Pelissier
REM All rights reserved.
REM
REM Redistribution and use in source and binary forms, with or without
REM modification, are permitted provided that the following conditions are met:
REM + Redistributions of source code must retain the above copyright
REM   notice, this list of conditions and the following disclaimer.
REM + Redistributions in binary form must reproduce the above copyright
REM   notice, this list of conditions and the following disclaimer in the
REM   documentation and/or other materials provided with the distribution.
REM
REM THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
REM EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
REM WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
REM DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
REM DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
REM (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
REM LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
REM ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
REM (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
REM SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

REM Execute the test suite for Microsoft Visual Studio
REM
REM Load Micosoft Visual Studio environement file.
IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" (
    call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
)
IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" (
    call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
)

REM Remove previous results
DEL *.log *.dat

REM List the expected failure (compiler internal error)
set "expectedFailure1=test-msnapshot.c"
set "expectedFailure2=test-none.c"

echo "Compiler full version:"
cl /Bv

echo " "

REM Perform for each test
for %%f in (test-*.c) do (
    echo Testing %%f
    REM Copy the test file as a C++ file as CL.EXE only support C++ file
    copy %%f test.cpp
    if ERRORLEVEL 1 EXIT /B 1
    REM Compile the test suite
    REM /Zc:preprocessor is mandatory to have a compliant preprocessor
    REM /Zc:__cplusplus is needed to report the real value of __cplusplus, so that M*LIB uses the C++ atomic, and not its emulation.
    REM Enable warnings and basic optimization
    REM Inform M*LIB to use Annex K
    echo Compiling %%f
    cl.exe /I.. /O2 /W3 /std:c++14 /Zc:__cplusplus /Zc:preprocessor /D__STDC_WANT_LIB_EXT1__ test.cpp > %%f.log 2>&1
    if ERRORLEVEL 1 (
        echo *** BUILD ERROR for %%f *** >> %%f.log
        type %%f.log
        if /i "%%f" NEQ "%expectedFailure1%" if /i "%%f" NEQ "%expectedFailure2%" EXIT /B 1
        )
    REM Execute it
    echo Running %%f
    test.exe >> %%f.log 2>&1
    if ERRORLEVEL 1 (
        echo *** RUNTIME ERROR for %%f ***  >> %%f.log
        type %%f.log
        if /i "%%f" NEQ "%expectedFailure%" EXIT /B 1
    ) ELSE (
        echo Test OK for %%f  >> %%f.log
    )
    type %%f.log
)
echo "All tests passed (except %expectedFailure%)"
exit /B 0

REM Copyright (c) 2017-2020, Patrick Pelissier
REM All rights reserved.
REM
REM Redistribution and use in source and binary forms, with or without
REM modification, are permitted provided that the following conditions are met:
REM + Redistributions of source code must retain the above copyright
REM   notice, this list of conditions and the following disclaimer.
REM + Redistributions in binary form must reproduce the above copyright
REM   notice, this list of conditions and the following disclaimer in the
REM   documentation and/or other materials provided with the distribution.
REM
REM THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
REM EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
REM WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
REM DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
REM DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
REM (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
REM LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
REM ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
REM (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
REM SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

REM Execute the test suite for Microsoft Visual Studio
REM
REM Load Micosoft Visual Studio environement file.
IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" (
    call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
)
IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" (
    call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
)

REM Remove previous results
DEL *.log *.dat

REM List the expected failure (compiler internal error)
set "expectedFailure1=test-msnapshot.c"
set "expectedFailure2=test-none.c"

echo "Compiler full version:"
cl /Bv
clang-cl /Bv

echo " "

REM Perform for each test
for %%f in (test-*.c) do (
    echo =================================================
    echo Testing %%f
    REM Copy the test file as a C++ file as CL.EXE only support C++ file
    copy %%f test.cpp
    if ERRORLEVEL 1 EXIT /B 1
    REM Compile the test suite
    REM /Zc:preprocessor is mandatory to have a compliant preprocessor
    REM /Zc:__cplusplus is needed to report the real value of __cplusplus, so that M*LIB uses the C++ atomic, and not its emulation.
    REM Enable warnings and basic optimization
    REM Inform M*LIB to use Annex K
    echo Compiling %%f
    cl.exe /I.. /O2 /W3 /std:c++14 /Zc:__cplusplus /Zc:preprocessor /D__STDC_WANT_LIB_EXT1__ test.cpp > %%f.log 2>&1
    if ERRORLEVEL 1 (
        echo *** BUILD ERROR for %%f *** >> %%f.log
        type %%f.log
        if /i "%%f" NEQ "%expectedFailure1%" if /i "%%f" NEQ "%expectedFailure2%" EXIT /B 1
        )
    REM Execute it
    echo Running %%f
    test.exe >> %%f.log 2>&1
    if ERRORLEVEL 1 (
        echo *** RUNTIME ERROR for %%f ***  >> %%f.log
        type %%f.log
        if /i "%%f" NEQ "%expectedFailure%" EXIT /B 1
    ) ELSE (
        echo Test OK for %%f  >> %%f.log
    )
    type %%f.log
)
echo "All tests passed (except %expectedFailure%)"
exit /B 0

Add clang-cl version

Add clang-cl version


@echo Created by Shi.Zhan @ 2013&&
@echo setting python libpath for cloned source modules:&&
@echo Pyro4&&
@set PYTHONPATH=e:\Works\hive\Pyro4\trunk\src;%PYTHONPATH%&&
@set PATH=%~dp0;%PATH%

@echo Created by Shi.Zhan @ 2013&&
@echo setting python libpath for cloned source modules:&&
@echo Pyro4&&
@set PYTHONPATH=e:\Works\hive\Pyro4\trunk\src;e:\Works\hive\isodate\src;e:\Works\hive\rdflib;%PYTHONPATH%&&
@set PATH=%~dp0;%PATH%

update Windows environment loader script


@echo off

rem -------------------------------------------------------------
rem  Yii gearman worker script for Windows.
rem  This is the bootstrap script for running yiig on Windows.
rem -------------------------------------------------------------

@setlocal

set BIN_PATH=%~dp0

if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe

"%PHP_COMMAND%" "%BIN_PATH%yiig.php" %*

@endlocal

Create yiig.bat

Create yiig.bat


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

echo Working dir: %cd%

dotnet clean -c %config%

dotnet build -c %config% || EXIT /B 1

echo Assembly information

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\net35\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\net35\QRCoder.dll" md5

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\net40\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\net40\QRCoder.dll" md5

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\netstandard1.1\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\netstandard1.1\QRCoder.dll" md5

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\netstandard2.0\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\netstandard2.0\QRCoder.dll" md5

dotnet test QRCoderTests\QRCoderTests.csproj --framework net452 || EXIT /B 1
dotnet test QRCoderTests\QRCoderTests.csproj --framework netcoreapp1.1 || EXIT /B 1
dotnet test QRCoderTests\QRCoderTests.csproj --framework netcoreapp2.0 || EXIT /B 1
dotnet test QRCoderTests\QRCoderTests.csproj --framework netcoreapp3.1 || EXIT /B 1

dotnet pack QRCoder\QRCoder.csproj -c %config% --no-build

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

echo Working dir: %cd%

dotnet clean -c %config%

dotnet build -c %config% || EXIT /B 1

echo Assembly information

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\net35\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\net35\QRCoder.dll" md5

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\net40\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\net40\QRCoder.dll" md5

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\netstandard1.1\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\netstandard1.1\QRCoder.dll" md5

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\netstandard2.0\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\netstandard2.0\QRCoder.dll" md5

dotnet test QRCoderTests\QRCoderTests.csproj --framework net452 || EXIT /B 1
dotnet test QRCoderTests\QRCoderTests.csproj --framework netcoreapp1.1 || EXIT /B 1
dotnet test QRCoderTests\QRCoderTests.csproj --framework netcoreapp2.0 || EXIT /B 1
dotnet test QRCoderTests\QRCoderTests.csproj --framework netcoreapp2.1 || EXIT /B 1

dotnet pack QRCoder\QRCoder.csproj -c %config% --no-build

Revert "Updated build script"

Revert "Updated build script"

This reverts commit 0cc80a746acc0dcf600789f71c97bfe741e6ceb1.


echo OFF

set GITHUB_USERNAME=StatisKit
set GITHUB_REPOSITORY=Misc
set DEFAULT_ANACONDA_BUILD_RECIPES=libboost python-scons python-gitpython
set DEFAULT_ANACONDA_CHANNELS=statiskit conda-forge

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

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

if "%ANACONDA_BUILD_RECIPES%" == "" (
    set ANACONDA_BUILD_RECIPES=%DEFAULT_ANACONDA_BUILD_RECIPES%
) else (
    echo "Recipes to build: "%ANACONDA_BUILD_RECIPES%
)

echo ON

if not exist ..\..\%GITHUB_REPOSITORY% (
    if exist %GITHUB_REPOSITORY% (
        rmdir %GITHUB_REPOSITORY% /s /q
    )
    git clone https://github.com/%GITHUB_USERNAME%/%GITHUB_REPOSITORY%.git
    if %errorlevel% neq 0 (
        exit /b %errorlevel%
    )
    cd %GITHUB_REPOSITORY%/conda
)

git clone https://gist.github.com/c491cb08d570beeba2c417826a50a9c3.git toolchain
if %errorlevel% neq 0 (
    if exist %GITHUB_REPOSITORY% (
        rmdir %GITHUB_REPOSITORY% /s /q
    )
    exit /b %errorlevel%
)
cd toolchain
call config.bat
if %errorlevel% neq 0 (
    cd ..
    if exist %GITHUB_REPOSITORY% (
        rmdir %GITHUB_REPOSITORY% /s /q
    )
    rmdir toolchain /s /q
    exit /b %errorlevel%
)
cd ..
rmdir toolchain /s /q

for %%ANACONDA_BUILD_RECIPE in (%ANACONDA_BUILD_RECIPES%) do (
    conda build %%ANACONDA_BUILD_RECIPE %ANACONDA_CHANNEL_FLAGS% %ANACONDA_BUILD_FLAGS%
    if %errorlevel% neq 0 (
        if exist %GITHUB_REPOSITORY% (
            rmdir %GITHUB_REPOSITORY% /s /q
        )
        exit /b %errorlevel%
    )
)

if exist %GITHUB_REPOSITORY% (
    rmdir %GITHUB_REPOSITORY% /s /q
)

ECHO OFF

echo OFF

set GITHUB_USERNAME=StatisKit
set GITHUB_REPOSITORY=Misc
set DEFAULT_ANACONDA_BUILD_RECIPES=libboost python-scons python-gitpython
set DEFAULT_ANACONDA_CHANNELS=statiskit conda-forge

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

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

if "%ANACONDA_BUILD_RECIPES%" == "" (
    set ANACONDA_BUILD_RECIPES=%DEFAULT_ANACONDA_BUILD_RECIPES%
) else (
    echo "Recipes to build: "%ANACONDA_BUILD_RECIPES%
)

echo ON

if not exist ..\..\%GITHUB_REPOSITORY% (
    if exist %GITHUB_REPOSITORY% (
        rmdir %GITHUB_REPOSITORY% /s /q
    )
    git clone https://github.com/%GITHUB_USERNAME%/%GITHUB_REPOSITORY%.git
    if %errorlevel% neq 0 (
        exit /b %errorlevel%
    )
    cd %GITHUB_REPOSITORY%/conda
)

git clone https://gist.github.com/c491cb08d570beeba2c417826a50a9c3.git toolchain
if %errorlevel% neq 0 (
    if exist %GITHUB_REPOSITORY% (
        rmdir %GITHUB_REPOSITORY% /s /q
    )
    exit /b %errorlevel%
)
cd toolchain
call config.bat
if %errorlevel% neq 0 (
    cd ..
    if exist %GITHUB_REPOSITORY% (
        rmdir %GITHUB_REPOSITORY% /s /q
    )
    rmdir toolchain /s /q
    exit /b %errorlevel%
)
cd ..
rmdir toolchain /s /q

for %%ANACONDA_BUILD_RECIPE in (%ANACONDA_BUILD_RECIPES%) do (
    conda build %%ANACONDA_BUILD_RECIPE %ANACONDA_CHANNEL_FLAGS% %ANACONDA_BUILD_FLAGS%
    if %errorlevel% neq 0 (
        if exist %GITHUB_REPOSITORY% (
            rmdir %GITHUB_REPOSITORY% /s /q
        )
        exit /b %errorlevel%
    )
)

if exist %GITHUB_REPOSITORY% (
    rmdir %GITHUB_REPOSITORY% /s /q
)

ECHO OFF

Update bld.bat

Update bld.bat


if exist "C:\Program Files\R\R-3.0.0\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.0.0\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.0.1\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.0.1\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.0.2\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.0.2\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.0.3\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.0.3\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.1.0\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.1.0\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.1.1\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.1.1\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.1.2\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.1.2\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.2.0\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.2.0\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.2.1\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.2.1\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.2.2\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.2.2\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.2.3\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.2.3\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.2.4\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.2.4\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.2.5\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.2.5\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.3.3\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.3.3\bin\i386\R.exe"
if exist "C:\Program Files\R\R-3.4.3\bin\i386\R.exe" set R_HOME="C:\Program Files\R\R-3.4.3\bin\i386\R.exe"

Use latest version of R

Use latest version of R

CDFO IT is pushing out R version 3.4.3


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

rem ---------------------------------------------------------------------------
rem Startup script for the ciphertool
rem
rem Environment Variable Prerequisites
rem
rem   CARBON_HOME      Must point at your CARBON directory
rem
rem   JAVA_HOME       Must point at your Java Development Kit installation.
rem
rem   JAVA_OPTS       (Optional) Java runtime options
rem ---------------------------------------------------------------------------

:checkServer
setlocal enabledelayedexpansion
rem %~sdp0 is expanded pathname of the current script under NT with spaces in the path removed
if "%CARBON_HOME%"=="" set CARBON_HOME=%~sdp0..
SET curDrive=%cd:~0,1%
SET wsasDrive=%CARBON_HOME:~0,1%
if not "%curDrive%" == "%wsasDrive%" %wsasDrive%:
cd %CARBON_HOME%
call %CARBON_HOME%\wso2\tools\identity-anonymization-tool\bin\forgetme.bat %*

Update forgetme.bat file to have ability to read command line arguments


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

call "%~dp0\cipd_bin_setup.bat" > nul 2>&1
"%~dp0\.cipd_bin\vpython3.exe" %*

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

:: TODO(crbug.com/1003139): Remove.
:: Add Python 3 to PATH to work around crbug.com/1003139.
for /f %%i in (%~dp0python3_bin_reldir.txt) do set PYTHON3_BIN_RELDIR=%%i
set PATH=%~dp0%PYTHON3_BIN_RELDIR%;%PATH%

call "%~dp0\cipd_bin_setup.bat" > nul 2>&1
"%~dp0\.cipd_bin\vpython3.exe" %*

Add Python3 bin dir to PATH on Windows

vpython3: Add Python3 bin dir to PATH on Windows

As a workaround, add the Python3 bin dir to PATH so that the necessary DLLs are available.

Bug: 1003139
Change-Id: I7b3e05922be3fcb7b0ec2b06783a86f25484310b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1992270
Reviewed-by: smut <95deb7aa15d4c615299e47e7688551456568b1fb@google.com>
Commit-Queue: Edward Lesmes <d05609f027dc667cc37492b1dc1bdea5d60fa82a@chromium.org>