@ECHO OFF
setlocal
where bundle.bat >nul
if errorlevel 1 ECHO Cannot find bundle
call vars.cmd
where bundle.bat >nul
if errorlevel 1 GOTO :EOF
pushd ..
set compiled_path=..\legacy_staging\blog
if not exist %compiled_path% md %compiled_path%
call bundle exec ruhoh compile %compiled_path%
pushd %compiled_path%
ECHO ===============================
dir /s /b /a-d|%systemroot%\System32\find.exe /i "faq"
ECHO ===============================
call static  "" --port 4000 --host-address 192.168.2.11
popd
popd

@ECHO OFF
setlocal
where bundle.bat >nul
if errorlevel 1 ECHO Cannot find bundle
call vars.cmd
where bundle.bat >nul
if errorlevel 1 GOTO :EOF
pushd ..
set compiled_path=..\legacy_staging\blog
if not exist %compiled_path% md %compiled_path%
call bundle exec ruhoh compile %compiled_path%
pushd %compiled_path%
ECHO ===============================
dir /s /b /a-d|%systemroot%\System32\find.exe /i "faq"
ECHO ===============================
call static  "" --port 4000
popd
popd

Fix live preview

Fix live preview


rem This batch generates an executable file for Windows.
rem
rem Requirements:
rem   Windows 10
rem   python 2.7
rem   PyInstaller

del dist\nvpy.exe
del dist\nvpy-debug.exe
python setup.py clean
pyinstaller --onefile -i nvpy\icons\nvpy.ico --add-binary "nvpy\icons\nvpy.gif;icons" -n nvpy       --windowed start-nvpy.py
pyinstaller --onefile -i nvpy\icons\nvpy.ico --add-binary "nvpy\icons\nvpy.gif;icons" -n nvpy-debug --console  start-nvpy.py

rem This batch generates an executable file for Windows.
rem
rem Requirements:
rem   Windows 10
rem   python 2.7
rem   PyInstaller
rem
rem Output:
rem   dist\nvpy.exe
rem   dist\nvpy-debug.exe

del dist\nvpy.exe
del dist\nvpy-debug.exe
python setup.py clean
pyinstaller --onefile -i nvpy\icons\nvpy.ico --add-binary "nvpy\icons\nvpy.gif;icons" -n nvpy       --windowed start-nvpy.py
pyinstaller --onefile -i nvpy\icons\nvpy.ico --add-binary "nvpy\icons\nvpy.gif;icons" -n nvpy-debug --console  start-nvpy.py

update comment

update comment


:
: Set global parameters:
: Build tools (DDK) - only tested is 6000 (XP/Vista)
: Version value: each module (at least in resources) has a form OSMajor.OsMinor.DriverMajor.DriverMinor
: For example for XP - 5.1.0.2805,  defined in _VERSION_ variable
: _MAJORVERSION_ = GENERATION * 100 + YEAR - 2000;
: GENERATION = 2
: _MINORVERSION_ = MONTH * 100 + DAY
:
: Due to kernel.org restriction temporary security sertificates were removed
: from the source tree. To use the Vista (and up) 64bit driverm you will need
: to sign the drivers with your certificate. Change tools\makeinstall.bat if needed
:
:
if "%DDKVER%"=="" set DDKVER=7600.16385.0
set BUILDROOT=C:\WINDDK\%DDKVER%
set X64ENV=x64
if "%DDKVER%"=="6000" set X64ENV=amd64
set _MAJORVERSION_=209
set _MINORVERSION_=605
set _DRIVER_ISO_NAME=Install-%_MINORVERSION_%%_MAJORVERSION_%.iso

set OLD_PATH=%PATH%

if not "%1"=="" goto parameters_here
echo no parameters specified, rebuild all
call clean.bat
call "%0" Vista Vista64 XP XP64 Win2K
call :PackInstall
goto :eof
:parameters_here

if "%1"=="PackInstall" goto nextparam
if "%1"=="installer" goto nextparam
: this is for VirtIO
call :copyVirtIO

:nextparam
if "%1"=="" goto :eof
goto %1
:continue
shift
goto nextparam

: VirtIO files are copied for build, deleted on clean.
: The reason is small difference in includes and makefile defines
: (NDIS is different from general-purpose kernel)
:
:copyVirtIO
for %%f in (..\VirtIO\*.h ..\VirtIO\*.c) do copy %%f VirtIO /Y
goto :eof

:preparebuild
echo DIRS=%* > dirs
for %%f in (%*) do echo !include $(NTMAKEENV)\makefile.def > %%f\makefile
set /a _NT_TARGET_MAJ="%_NT_TARGET_VERSION% >> 8"
set /a _NT_TARGET_MIN="%_NT_TARGET_VERSION% & 255"
set _VERSION_=%_NT_TARGET_MAJ%.%_NT_TARGET_MIN%.%_MAJORVERSION_%.%_MINORVERSION_%
echo version set: %_VERSION_%
goto :eof

:Win7
set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre Win7
popd
call :preparebuild Common wlh VirtIO
build -cZg

if exist wlh\objfre_win7_x86\i386\netkvm.sys call tools\makeinstall x86 wlh\objfre_win7_x86\i386\netkvm.sys wlh\netkvm.inf %_VERSION_% Win7
if not exist wlh\objfre_win7_x86\i386\netkvm.sys goto :eof
goto continue

:Win7_64
set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre Win7
popd
call :preparebuild Common wlh VirtIO
build -cZg

if exist wlh\objfre_win7_amd64\amd64\netkvm.sys call tools\makeinstall amd64 wlh\objfre_win7_amd64\amd64\netkvm.sys wlh\netkvm.inf %_VERSION_% Win7
if not exist wlh\objfre_win7_amd64\amd64\netkvm.sys goto :eof
goto continue

:Vista
set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre Wlh
popd
call :preparebuild Common wlh VirtIO
build -cZg

if exist wlh\objfre_wlh_x86\i386\netkvm.sys call tools\makeinstall x86 wlh\objfre_wlh_x86\i386\netkvm.sys wlh\netkvm.inf %_VERSION_% Vista
if not exist wlh\objfre_wlh_x86\i386\netkvm.sys goto :eof
goto continue

:Vista64
rem echo Skipping Vista64 for now, comment to enable
rem goto :eof

set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre Wlh
popd
call :preparebuild Common wlh VirtIO
build -cZg

if exist wlh\objfre_wlh_amd64\amd64\netkvm.sys call tools\makeinstall amd64 wlh\objfre_wlh_amd64\amd64\netkvm.sys wlh\netkvm.inf %_VERSION_% Vista
if not exist wlh\objfre_wlh_amd64\amd64\netkvm.sys goto :eof
goto continue

:XP
set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre WXP
popd
call :preparebuild Common wxp VirtIO
build -cZg

if exist wxp\objfre_wxp_x86\i386\netkvm.sys call tools\makeinstall x86 wxp\objfre_wxp_x86\i386\netkvm.sys wxp\netkvm.inf %_VERSION_% XP
if not exist wxp\objfre_wxp_x86\i386\netkvm.sys goto :eof
goto continue

:XP64
set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre WNET
popd
call :preparebuild Common wxp VirtIO
build -cZg

if exist wxp\objfre_wnet_amd64\amd64\netkvm.sys call tools\makeinstall amd64 wxp\objfre_wnet_amd64\amd64\netkvm.sys wxp\netkvm.inf %_VERSION_% XP
if not exist wxp\objfre_wnet_amd64\amd64\netkvm.sys goto :eof
goto continue

:Win2K compilation is no longer supported by Windows 7 DDK
:Win2K
:set DDKBUILDENV=
:pushd %BUILDROOT%
:call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre W2K
:popd
:call :preparebuild Common wxp VirtIO
:build -cZg

:if exist wxp\objfre_w2k_x86\i386\netkvm.sys call tools\makeinstall x86 wxp\objfre_w2k_x86\i386\netkvm.sys wxp\netkvm2k.inf %_VERSION_% 2K
:if not exist wxp\objfre_w2k_x86\i386\netkvm.sys goto :eof
:goto continue

:installer
:"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv" /Rebuild "Release" Installer\Package\Package.sln /Log Installer\Package\build.log
:goto continue

:PackInstall
:echo Packing to ISO image
:call tools\makecdimage.cmd %_DRIVER_ISO_NAME% Install
goto :eof
echo "setting old path back"
set PATH=%OLD_PATH%

:
: Set global parameters:
: Build tools (DDK) - only tested is 6000 (XP/Vista)
: Version value: each module (at least in resources) has a form OSMajor.OsMinor.DriverMajor.DriverMinor
: For example for XP - 5.1.0.2805,  defined in _VERSION_ variable
: _MAJORVERSION_ = GENERATION * 100 + YEAR - 2000;
: GENERATION = 2
: _MINORVERSION_ = MONTH * 100 + DAY
:
: Due to kernel.org restriction temporary security sertificates were removed
: from the source tree. To use the Vista (and up) 64bit driverm you will need
: to sign the drivers with your certificate. Change tools\makeinstall.bat if needed
:
:
if "%DDKVER%"=="" set DDKVER=7600.16385.0
set BUILDROOT=C:\WINDDK\%DDKVER%
set X64ENV=x64
if "%DDKVER%"=="6000" set X64ENV=amd64
set _MAJORVERSION_=209
set _MINORVERSION_=605
set _DRIVER_ISO_NAME=Install-%_MINORVERSION_%%_MAJORVERSION_%.iso

set OLD_PATH=%PATH%

if not "%1"=="" goto parameters_here
echo no parameters specified, rebuild all
call clean.bat
call "%0" Vista Vista64 XP XP64 Win2K
call :PackInstall
goto :eof
:parameters_here

if "%1"=="PackInstall" goto nextparam
if "%1"=="installer" goto nextparam
: this is for VirtIO
call :copyVirtIO

:nextparam
if "%1"=="" goto :eof
goto %1
:continue
shift
goto nextparam

: VirtIO files are copied for build, deleted on clean.
: The reason is small difference in includes and makefile defines
: (NDIS is different from general-purpose kernel)
:
:copyVirtIO
for %%f in (..\VirtIO\VirtIO*.h ..\VirtIO\VirtIO*.c ..\VirtIO\PVUtils.c ..\VirtIO\PVUtils.h ..\VirtIO\PVUtils.h) do copy %%f VirtIO /Y
goto :eof

:preparebuild
echo DIRS=%* > dirs
for %%f in (%*) do echo !include $(NTMAKEENV)\makefile.def > %%f\makefile
set /a _NT_TARGET_MAJ="%_NT_TARGET_VERSION% >> 8"
set /a _NT_TARGET_MIN="%_NT_TARGET_VERSION% & 255"
set _VERSION_=%_NT_TARGET_MAJ%.%_NT_TARGET_MIN%.%_MAJORVERSION_%.%_MINORVERSION_%
echo version set: %_VERSION_%
goto :eof

:Win7
set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre Win7
popd
call :preparebuild Common wlh VirtIO
build -cZg

if exist wlh\objfre_win7_x86\i386\netkvm.sys call tools\makeinstall x86 wlh\objfre_win7_x86\i386\netkvm.sys wlh\netkvm.inf %_VERSION_% Win7
if not exist wlh\objfre_win7_x86\i386\netkvm.sys goto :eof
goto continue

:Win7_64
set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre Win7
popd
call :preparebuild Common wlh VirtIO
build -cZg

if exist wlh\objfre_win7_amd64\amd64\netkvm.sys call tools\makeinstall amd64 wlh\objfre_win7_amd64\amd64\netkvm.sys wlh\netkvm.inf %_VERSION_% Win7
if not exist wlh\objfre_win7_amd64\amd64\netkvm.sys goto :eof
goto continue

:Vista
set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre Wlh
popd
call :preparebuild Common wlh VirtIO
build -cZg

if exist wlh\objfre_wlh_x86\i386\netkvm.sys call tools\makeinstall x86 wlh\objfre_wlh_x86\i386\netkvm.sys wlh\netkvm.inf %_VERSION_% Vista
if not exist wlh\objfre_wlh_x86\i386\netkvm.sys goto :eof
goto continue

:Vista64
rem echo Skipping Vista64 for now, comment to enable
rem goto :eof

set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre Wlh
popd
call :preparebuild Common wlh VirtIO
build -cZg

if exist wlh\objfre_wlh_amd64\amd64\netkvm.sys call tools\makeinstall amd64 wlh\objfre_wlh_amd64\amd64\netkvm.sys wlh\netkvm.inf %_VERSION_% Vista
if not exist wlh\objfre_wlh_amd64\amd64\netkvm.sys goto :eof
goto continue

:XP
set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre WXP
popd
call :preparebuild Common wxp VirtIO
build -cZg

if exist wxp\objfre_wxp_x86\i386\netkvm.sys call tools\makeinstall x86 wxp\objfre_wxp_x86\i386\netkvm.sys wxp\netkvm.inf %_VERSION_% XP
if not exist wxp\objfre_wxp_x86\i386\netkvm.sys goto :eof
goto continue

:XP64
set DDKBUILDENV=
pushd %BUILDROOT%
call %BUILDROOT%\bin\setenv.bat %BUILDROOT% %X64ENV% fre WNET
popd
call :preparebuild Common wxp VirtIO
build -cZg

if exist wxp\objfre_wnet_amd64\amd64\netkvm.sys call tools\makeinstall amd64 wxp\objfre_wnet_amd64\amd64\netkvm.sys wxp\netkvm.inf %_VERSION_% XP
if not exist wxp\objfre_wnet_amd64\amd64\netkvm.sys goto :eof
goto continue

:Win2K compilation is no longer supported by Windows 7 DDK
:Win2K
:set DDKBUILDENV=
:pushd %BUILDROOT%
:call %BUILDROOT%\bin\setenv.bat %BUILDROOT% fre W2K
:popd
:call :preparebuild Common wxp VirtIO
:build -cZg

:if exist wxp\objfre_w2k_x86\i386\netkvm.sys call tools\makeinstall x86 wxp\objfre_w2k_x86\i386\netkvm.sys wxp\netkvm2k.inf %_VERSION_% 2K
:if not exist wxp\objfre_w2k_x86\i386\netkvm.sys goto :eof
:goto continue

:installer
:"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv" /Rebuild "Release" Installer\Package\Package.sln /Log Installer\Package\build.log
:goto continue

:PackInstall
:echo Packing to ISO image
:call tools\makecdimage.cmd %_DRIVER_ISO_NAME% Install
goto :eof
echo "setting old path back"
set PATH=%OLD_PATH%

Change buildall.bat - NetKVM will be compiled with its own kdebugprint.h header in order to be free from DbgPring calls.


cd test
set cd=%cd%
IF "%PF_TEST_TITLE_DATA_JSON%"=="" set PF_TEST_TITLE_DATA_JSON=./testTitleData.json
echo %cd%
call nodeunit test.js --reporter %cd%\reporter.js
pause

cd test
set cd=%cd%
IF "%PF_TEST_TITLE_DATA_JSON%"=="" set PF_TEST_TITLE_DATA_JSON=./testTitleData.json
echo %cd%
call nodeunit test.js --reporter "%cd%\reporter.js"
pause

Handle spaces in paths.

Handle spaces in paths.


@echo off
if (%1) == () (
  echo Edit this file: See 'echo OFFSET BYTE BYTE ..'
  echo Usage: this_bat exe-file [exe-file ..]
  exit /b 1
)

(
  echo SIMPLEDIFF
  echo SIZE
  echo CRC
  echo 000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
) >> "%~dp1rich.~tmp"

:LOOP
zspatch -nobackup "%~1" "%~dp1rich.~tmp"

shift
if (%1)==() goto :CLEANUP
goto :LOOP

:CLEANUP
del "%~dp1rich.~tmp"

@echo off
if (%1) == () (
  echo 1. Find RICH signature in your exe file, depend on compiler settings;
  echo 2. Edit this.cmd: See 'echo OFFSET BYTE BYTE ..'
  echo 3. Usage: this.cmd file.exe [file.exe ..]
  exit /b 1
)

(
  echo SIMPLEDIFF
  echo SIZE
  echo CRC
  echo 000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
) >> "%~dp1rich.~tmp"

:LOOP
zspatch -nobackup "%~1" "%~dp1rich.~tmp"

shift
if (%1)==() goto :CLEANUP
goto :LOOP

:CLEANUP
del "%~dp1rich.~tmp"

Add help

Add help


@ECHO OFF

IF NOT EXIST P:\haskell\ghc\package.cache (
  goto :install-fp
) ELSE (
  goto :install-fp-end
)

:install-fp
  md P:\haskell
  md P:\haskell\bin
  md P:\haskell\doc
  md P:\haskell\lib
  ghc-pkg init P:\haskell\ghc
  set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2012.2.0.0\lib\extralibs\bin;P:\haskell\bin
  cabal update
  cabal install hscolour --enable-documentation --prefix=P:\haskell\lib --docdir=P:\haskell\doc --bindir=P:\haskell\bin --doc-index-file=P:\haskell\doc\index.html
  cabal install gloss --flags="-GLUT GLFW" --enable-documentation --haddock-hyperlink-source --prefix=P:\haskell\lib --docdir=P:\haskell\doc --bindir=P:\haskell\bin --doc-index-file=P:\haskell\doc\index.html
  cabal install twentefp --enable-documentation --haddock-hyperlink-source --prefix=P:\haskell\lib --docdir=P:\haskell\doc --doc-index-file=P:\haskell\doc\index.html
  xcopy %appdata%\ghc\i386-mingw32-7.4.1\package.conf.d P:\haskell\ghc /y
  ghc-pkg recache --package-conf=P:\haskell\ghc
:install-fp-end

:get-glut
  IF NOT EXIST P:\haskell\bin\glut32.dll (
    goto :download-glut
  ) ELSE (
    goto :get-glut-end
  )
:download-glut
  bitsadmin /reset
  IF NOT EXIST P:\haskell\bin\glut-3.7.6-bin.zip (
    goto :download-glut-start
  ) ELSE (
    goto :download-glut-end
  )
:download-glut-start
  bitsadmin /create /DOWNLOAD DownLoadGLUT32DLL
  bitsadmin /setpriority DownLoadGLUT32DLL high
  bitsadmin /addfile DownLoadGLUT32DLL http://user.xmission.com/~nate/glut/glut-3.7.6-bin.zip p:\haskell\bin\glut-3.7.6-bin.zip
  bitsadmin /resume DownLoadGLUT32DLL
  ping 1.1.1.1 -n 1 -w 5000 >NUL
  bitsadmin /resume DownLoadGLUT32DLL
  ping 1.1.1.1 -n 1 -w 5000 >NUL
  bitsadmin /complete DownLoadGLUT32DLL
  goto :download-glut
:download-glut-end
  cd /d P:\haskell\bin
  "C:\Program Files (x86)\7-Zip\7z.exe" x P:\haskell\bin\glut-3.7.6-bin.zip
  xcopy P:\haskell\bin\glut-3.7.6-bin\glut32.dll P:\haskell\bin\ /y
  cd /d P:\
  del /q P:\haskell\bin\glut-3.7.6-bin.zip
  rmdir /s /q P:\haskell\bin\glut-3.7.6-bin
:get-glut-end

set ghc_package_path=P:\haskell\ghc;
setx ghc_package_path P:\haskell\ghc;
set path=%PATH%;P:\haskell\bin
setx path P:\haskell\bin
md %appdata%/ghc
echo :set -XNoImplicitPrelude >> %appdata%/ghc/ghci.conf
echo :set -NoMonomorphismRestriction >> %appdata%/ghc/ghci.conf

@ECHO OFF

IF NOT EXIST P:\haskell\ghc\package.cache (
  goto :install-fp
) ELSE (
  goto :install-fp-end
)

:install-fp
  md P:\haskell
  md P:\haskell\bin
  md P:\haskell\doc
  md P:\haskell\lib
  ghc-pkg init P:\haskell\ghc
  set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2012.2.0.0\lib\extralibs\bin;P:\haskell\bin
  cabal update
  cabal install hscolour --enable-documentation --prefix=P:\haskell\lib --docdir=P:\haskell\doc --bindir=P:\haskell\bin --doc-index-file=P:\haskell\doc\index.html
  cabal install gloss --flags="-GLUT GLFW" --enable-documentation --haddock-hyperlink-source --prefix=P:\haskell\lib --docdir=P:\haskell\doc --bindir=P:\haskell\bin --doc-index-file=P:\haskell\doc\index.html
  cabal install twentefp --enable-documentation --haddock-hyperlink-source --prefix=P:\haskell\lib --docdir=P:\haskell\doc --doc-index-file=P:\haskell\doc\index.html
  xcopy %appdata%\ghc\i386-mingw32-7.4.1\package.conf.d P:\haskell\ghc /y
  ghc-pkg recache --package-conf=P:\haskell\ghc
:install-fp-end

:get-glut
  IF NOT EXIST P:\haskell\bin\glut32.dll (
    goto :download-glut
  ) ELSE (
    goto :get-glut-end
  )
:download-glut
  bitsadmin /reset
  IF NOT EXIST P:\haskell\bin\glut-3.7.6-bin.zip (
    goto :download-glut-start
  ) ELSE (
    goto :download-glut-end
  )
:download-glut-start
  bitsadmin /create /DOWNLOAD DownLoadGLUT32DLL
  bitsadmin /setpriority DownLoadGLUT32DLL high
  bitsadmin /addfile DownLoadGLUT32DLL http://user.xmission.com/~nate/glut/glut-3.7.6-bin.zip p:\haskell\bin\glut-3.7.6-bin.zip
  bitsadmin /resume DownLoadGLUT32DLL
  ping 1.1.1.1 -n 1 -w 5000 >NUL
  bitsadmin /resume DownLoadGLUT32DLL
  ping 1.1.1.1 -n 1 -w 5000 >NUL
  bitsadmin /complete DownLoadGLUT32DLL
  goto :download-glut
:download-glut-end
  cd /d P:\haskell\bin
  "C:\Program Files (x86)\7-Zip\7z.exe" x P:\haskell\bin\glut-3.7.6-bin.zip
  xcopy P:\haskell\bin\glut-3.7.6-bin\glut32.dll P:\haskell\bin\ /y
  cd /d P:\
  del /q P:\haskell\bin\glut-3.7.6-bin.zip
  rmdir /s /q P:\haskell\bin\glut-3.7.6-bin
:get-glut-end

set ghc_package_path=P:\haskell\ghc;
setx ghc_package_path P:\haskell\ghc;
set path=%PATH%;C:\Program Files (x86)\Haskell Platform\2012.2.0.0\lib\extralibs\bin;P:\haskell\bin
setx path "C:\Program Files (x86)\Haskell Platform\2012.2.0.0\lib\extralibs\bin;P:\haskell\bin"
md %appdata%\ghc
echo :set -XNoImplicitPrelude >> %appdata%\ghc\ghci.conf
echo :set -NoMonomorphismRestriction >> %appdata%\ghc\ghci.conf

Fix paths

Fix paths


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

REM ---------------------------------- NOTE ----------------------------------
REM
REM Please keep the logic in this file consistent with the logic in the
REM `flutter` script in the same directory to ensure that Flutter continues to
REM work across all platforms!
REM
REM --------------------------------------------------------------------------

SETLOCAL ENABLEDELAYEDEXPANSION

FOR %%i IN ("%~dp0..") DO SET FLUTTER_ROOT=%%~fi

SET flutter_tools_dir=%FLUTTER_ROOT%\packages\flutter_tools
SET cache_dir=%FLUTTER_ROOT%\bin\cache
SET snapshot_path=%cache_dir%\flutter_tools.snapshot
SET stamp_path=%cache_dir%\flutter_tools.stamp
SET script_path=%flutter_tools_dir%\bin\flutter_tools.dart
SET dart_sdk_path=%cache_dir%\dart-sdk
SET dart_stamp_path=%cache_dir%\dart-sdk.stamp
SET dart_version_path=%FLUTTER_ROOT%\bin\internal\dart-sdk.version

SET dart=%dart_sdk_path%\bin\dart.exe
SET pub=%dart_sdk_path%\bin\pub.bat

REM Test if Git is available on the Host
where /q git || ECHO Error: Unable to find git in your PATH. && EXIT /B 1
REM  Test if the flutter directory is a git clone, otherwise git rev-parse HEAD would fail
IF NOT EXIST "%flutter_root%\.git" (
  ECHO Error: The Flutter directory is not a clone of the GitHub project.
  EXIT /B 1
)

REM Ensure that bin/cache exists.
IF NOT EXIST "%cache_dir%" MKDIR "%cache_dir%"

REM To debug the tool, you can uncomment the following line to enable checked mode and set an observatory port:
REM SET FLUTTER_TOOL_ARGS="--observe=65432 --checked"

:acquire_lock
2>NUL (
  REM "3" is now stderr because of "2>NUL".
  CALL :subroutine %* 2>&3 9> "%cache_dir%\flutter.bat.lock" || GOTO acquire_lock
)
GOTO :after_subroutine

:subroutine
  PUSHD "%flutter_root%"
  FOR /f %%r IN ('git rev-parse HEAD') DO SET revision=%%r
  POPD

  REM The following IF conditions are all linked with a logical OR. However,
  REM there is no OR operator in batch and a GOTO construct is used as replacement.

  IF NOT EXIST "%dart_stamp_path%" GOTO do_sdk_update_and_snapshot
  SET /P dart_required_version=<"%dart_version_path%"
  SET /P dart_installed_version=<"%dart_stamp_path%"
  IF !dart_required_version! NEQ !dart_installed_version! GOTO do_sdk_update_and_snapshot
  IF NOT EXIST "%snapshot_path%" GOTO do_snapshot
  IF NOT EXIST "%stamp_path%" GOTO do_snapshot
  SET /P stamp_value=<"%stamp_path%"
  IF !stamp_value! NEQ !revision! GOTO do_snapshot
  REM Compare "last modified" timestamps
  SET pubspec_yaml_path=%flutter_tools_dir%\pubspec.yaml
  SET pubspec_lock_path=%flutter_tools_dir%\pubspec.lock
  FOR %%i IN ("%pubspec_yaml_path%") DO SET yaml_timestamp=%%~ti
  FOR %%i IN ("%pubspec_lock_path%") DO SET lock_timestamp=%%~ti
  IF !yaml_timestamp! EQU !lock_timestamp! GOTO do_snapshot
  FOR /F %%i IN ('DIR /B /O:D "%pubspec_yaml_path%" "%pubspec_lock_path%"') DO SET newer_file=%%i
  IF "%newer_file%" EQU "pubspec.yaml" GOTO do_snapshot

  REM Everything is uptodate - exit subroutine
  EXIT /B

  :do_sdk_update_and_snapshot
    ECHO Checking Dart SDK version...
    CALL PowerShell.exe -ExecutionPolicy Bypass -Command "& '%FLUTTER_ROOT%/bin/internal/update_dart_sdk.ps1'"
    SET exit_code=%ERRORLEVEL%
    IF %exit_code% NEQ 0 (
      ECHO Error: Unable to update Dart SDK. Retrying... Press Ctrl+C to abort.
      GOTO :do_sdk_update_and_snapshot
    )

  :do_snapshot
    ECHO: > "%cache_dir%\.dartignore"
    ECHO Updating flutter tool...
    PUSHD "%flutter_tools_dir%"

    REM Makes changes to PUB_ENVIRONMENT only visible to commands within SETLOCAL/ENDLOCAL
    SETLOCAL
    IF "%TRAVIS%" == "true" GOTO on_bot
    IF "%BOT%" == "true" GOTO on_bot
    IF "%CONTINUOUS_INTEGRATION%" == "true" GOTO on_bot
    IF "%CHROME_HEADLESS%" == "1" GOTO on_bot
    IF "%APPVEYOR%" == "true" GOTO on_bot
    IF "%CI%" == "true" GOTO on_bot
    GOTO not_on_bot
    :on_bot
      SET PUB_ENVIRONMENT=%PUB_ENVIRONMENT%:flutter_bot
    :not_on_bot
    SET PUB_ENVIRONMENT=%PUB_ENVIRONMENT%:flutter_install
    CALL "%pub%" upgrade --verbosity=error --no-packages-dir
    ENDLOCAL

    POPD
    CALL "%dart%" --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" "%script_path%"
    >"%stamp_path%" ECHO %revision%

  REM Exit Subroutine
  EXIT /B

:after_subroutine

CALL "%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %*
SET exit_code=%ERRORLEVEL%

REM The VM exits with code 253 if the snapshot version is out-of-date.
IF /I "%exit_code%" EQU "253" (
  CALL "%dart%" --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" "%script_path%"
  CALL "%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %*
  SET exit_code=%ERRORLEVEL%
)

EXIT /B %exit_code%

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

REM ---------------------------------- NOTE ----------------------------------
REM
REM Please keep the logic in this file consistent with the logic in the
REM `flutter` script in the same directory to ensure that Flutter continues to
REM work across all platforms!
REM
REM --------------------------------------------------------------------------

SETLOCAL ENABLEDELAYEDEXPANSION

FOR %%i IN ("%~dp0..") DO SET FLUTTER_ROOT=%%~fi

SET flutter_tools_dir=%FLUTTER_ROOT%\packages\flutter_tools
SET cache_dir=%FLUTTER_ROOT%\bin\cache
SET snapshot_path=%cache_dir%\flutter_tools.snapshot
SET stamp_path=%cache_dir%\flutter_tools.stamp
SET script_path=%flutter_tools_dir%\bin\flutter_tools.dart
SET dart_sdk_path=%cache_dir%\dart-sdk
SET dart_stamp_path=%cache_dir%\dart-sdk.stamp
SET dart_version_path=%FLUTTER_ROOT%\bin\internal\dart-sdk.version

SET dart=%dart_sdk_path%\bin\dart.exe
SET pub=%dart_sdk_path%\bin\pub.bat

REM Test if Git is available on the Host
where /q git || ECHO Error: Unable to find git in your PATH. && EXIT /B 1
REM  Test if the flutter directory is a git clone, otherwise git rev-parse HEAD would fail
IF NOT EXIST "%flutter_root%\.git" (
  ECHO Error: The Flutter directory is not a clone of the GitHub project.
  EXIT /B 1
)

REM Ensure that bin/cache exists.
IF NOT EXIST "%cache_dir%" MKDIR "%cache_dir%"

REM To debug the tool, you can uncomment the following line to enable checked mode and set an observatory port:
REM SET FLUTTER_TOOL_ARGS="--observe=65432 --checked"

:acquire_lock
2>NUL (
  REM "3" is now stderr because of "2>NUL".
  CALL :subroutine %* 2>&3 9> "%cache_dir%\flutter.bat.lock" || GOTO acquire_lock
)
GOTO :after_subroutine

:subroutine
  PUSHD "%flutter_root%"
  FOR /f %%r IN ('git rev-parse HEAD') DO SET revision=%%r
  POPD

  REM The following IF conditions are all linked with a logical OR. However,
  REM there is no OR operator in batch and a GOTO construct is used as replacement.

  IF NOT EXIST "%dart_stamp_path%" GOTO do_sdk_update_and_snapshot
  SET /P dart_required_version=<"%dart_version_path%"
  SET /P dart_installed_version=<"%dart_stamp_path%"
  IF !dart_required_version! NEQ !dart_installed_version! GOTO do_sdk_update_and_snapshot
  IF NOT EXIST "%snapshot_path%" GOTO do_snapshot
  IF NOT EXIST "%stamp_path%" GOTO do_snapshot
  SET /P stamp_value=<"%stamp_path%"
  IF !stamp_value! NEQ !revision! GOTO do_snapshot
  REM Compare "last modified" timestamps
  SET pubspec_yaml_path=%flutter_tools_dir%\pubspec.yaml
  SET pubspec_lock_path=%flutter_tools_dir%\pubspec.lock
  FOR %%i IN ("%pubspec_yaml_path%") DO SET yaml_timestamp=%%~ti
  FOR %%i IN ("%pubspec_lock_path%") DO SET lock_timestamp=%%~ti
  IF !yaml_timestamp! EQU !lock_timestamp! GOTO do_snapshot
  FOR /F %%i IN ('DIR /B /O:D "%pubspec_yaml_path%" "%pubspec_lock_path%"') DO SET newer_file=%%i
  IF "%newer_file%" EQU "pubspec.yaml" GOTO do_snapshot

  REM Everything is uptodate - exit subroutine
  EXIT /B

  :do_sdk_update_and_snapshot
    ECHO Checking Dart SDK version...
    CALL PowerShell.exe -ExecutionPolicy Bypass -Command "& '%FLUTTER_ROOT%/bin/internal/update_dart_sdk.ps1'"
    IF "%ERRORLEVEL%" NEQ "0" (
      ECHO Error: Unable to update Dart SDK. Retrying...
      timeout /t 5 /nobreak
      GOTO :do_sdk_update_and_snapshot
    )

  :do_snapshot
    ECHO: > "%cache_dir%\.dartignore"
    ECHO Updating flutter tool...
    PUSHD "%flutter_tools_dir%"

    REM Makes changes to PUB_ENVIRONMENT only visible to commands within SETLOCAL/ENDLOCAL
    SETLOCAL
      IF "%TRAVIS%" == "true" GOTO on_bot
      IF "%BOT%" == "true" GOTO on_bot
      IF "%CONTINUOUS_INTEGRATION%" == "true" GOTO on_bot
      IF "%CHROME_HEADLESS%" == "1" GOTO on_bot
      IF "%APPVEYOR%" == "true" GOTO on_bot
      IF "%CI%" == "true" GOTO on_bot
      GOTO not_on_bot
      :on_bot
        SET PUB_ENVIRONMENT=%PUB_ENVIRONMENT%:flutter_bot
      :not_on_bot
      SET PUB_ENVIRONMENT=%PUB_ENVIRONMENT%:flutter_install
      :retry_pub_upgrade
      CALL "%pub%" upgrade --verbosity=error --no-packages-dir
      IF "%ERRORLEVEL%" NEQ "0" (
        ECHO Error: Unable to 'pub upgrade' flutter tool. Retrying...
        timeout /t 5 /nobreak
        GOTO :retry_pub_upgrade
      )
    ENDLOCAL

    POPD

    :retry_dart_snapshot
    CALL "%dart%" --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" "%script_path%"
    IF "%ERRORLEVEL%" NEQ "0" (
      ECHO Error: Unable to create dart snapshot for flutter tool. Retrying...
      timeout /t 5 /nobreak
      GOTO :retry_dart_snapshot
    )
    >"%stamp_path%" ECHO %revision%

  REM Exit Subroutine
  EXIT /B

:after_subroutine

CALL "%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %*
SET exit_code=%ERRORLEVEL%

REM The VM exits with code 253 if the snapshot version is out-of-date.
IF "%exit_code%" EQU "253" (
  CALL "%dart%" --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" "%script_path%"
  SET exit_code=%ERRORLEVEL%
  IF "%exit_code%" EQU "253" (
    ECHO Error: Unable to create dart snapshot for flutter tool.
    EXIT /B %exit_code%
  )
  CALL "%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %*
  SET exit_code=%ERRORLEVEL%
)

EXIT /B %exit_code%

Add error handling to batch script (#10007)


@echo off
if "%1"=="" goto default_value_python:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value_python:
set pythonexe="c:\Python363_x64\python"
if not exist %pythonexe% set pythonexe="c:\Python36_x64\python"
:custom_python:
@echo [python] %pythonexe%
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

@echo off
if "%1"=="" goto default_value_python:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value_python:
set pythonexe="c:\Python363_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python36_x64\python.exe"
:custom_python:
@echo [python] %pythonexe%
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

update script

update script


@echo off
@rem Invoke nodeGaudi command line.
node nodeGaudi %*

@echo off
@rem Invoke nodeGaudi command line.
@node nodeGaudi %*

Update nodeGaudi.cmd

Update nodeGaudi.cmd


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

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

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

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

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

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

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

goto fail

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

if exist "%JAVA_EXE%" goto init

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

goto fail

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

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

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

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

set CMD_LINE_ARGS=%*
goto execute

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

:execute
@rem Setup the command line

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

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

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

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

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

:omega

Convert line endings from CRLF to LF.

Convert line endings from CRLF to LF.

+ This commit introduces no code change!


:: This batch file loads the NHol interactive environment into the
:: latest version of F# Interactive (FSI) available on this machine.

@echo off

:: Variables which hold paths to various versions of F# Interactive.
set FSI_30= "C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\fsi.exe"
set FSI_20= "C:\Program Files (x86)\Microsoft F#\v4.0\fsi.exe"

:: Set variables which hold command-line arguments to be passed to F# Interactive.
set fsi_args= --lib:NHol^
  --define:FSI_VER_2^
  --define:DEBUG^
  --define:TRACE^
  --define:USE^
  --use:init.fsx^
  --use:Logging.fs^
  --use:system.fs^
  --use:lib.fs^
  --use:fusion.fs^
  --use:basics.fs^
  --use:nets.fs^
  --use:printer.fs^
  --use:preterm.fs^
  --use:parser.fs^
  --use:equal.fs^
  --use:bool.fs^
  --use:drule.fs^
  --use:tactics.fs^
  --use:itab.fs^
  --use:simp.fs^
  --use:theorems.fs^
  --use:ind_defs.fs^
  --use:class.fs^
  --use:trivia.fs^
  --use:canon.fs^
  --use:meson.fs^
  --use:quot.fs^
  --use:pair.fs^
  --use:nums.fs^
  --use:recursion.fs^
  --use:arith.fs^
  --use:wf.fs^
  --use:calc_num.fs^
  --use:normalizer.fs^
  --use:grobner.fs^
  --use:ind_types.fs^
  --use:lists.fs^
  --use:realax.fs^
  --use:calc_int.fs^
  --use:realarith.fs^
  --use:real.fs^
  --use:calc_rat.fs^
  --use:int.fs^
  --use:sets.fs^
  --use:iterate.fs^
  --use:cart.fs^
  --use:define.fs^
  --use:help.fs^
  --use:database.fs^

:: Try to find the user's installation of F# Interactive.
if exist %FSI_30% (
    :: VS 2012 / F# 3.0
    echo Using F# 3.0

    :: Set the 'FSI' variable to the path for F# 3.0 Interactive.
    set FSI= %FSI_30%

    set FSI_VER_FLAG = ""
) else (
if exist %FSI_20% (
    :: VS 2010 / F# 2.0
    echo Using F# 2.0

    :: Set the 'FSI' variable to the path for F# 2.0 Interactive.
    set FSI= %FSI_20%

    set FSI_VER_FLAG = "--define:FSI_VER_2"
) else (
    :: Unable to find the F# installation, so exit.
    echo Unable to find an installation of F# interactive at any known location.
    echo Exiting...
    exit
))

:: Load the NHol environment into the detected version of F# Interactive.
echo Loading NHol into F# Interactive.
%FSI% %fsi_args% %FSI_VER_FLAG%

:: This batch file loads the NHol interactive environment into the
:: latest version of F# Interactive (FSI) available on this machine.

@echo off

:: Get location of required dll: NHol.dll
set NHOL_RELATIVE=NHol\bin\Debug\NHol.dll
set "NHOL_ABSOLUTE=%~dp0%NHOL_RELATIVE%"

:: Variables which hold paths to various versions of F# Interactive.
set FSI_30= "C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\fsi.exe"
set FSI_20= "C:\Program Files (x86)\Microsoft F#\v4.0\fsi.exe"

:: Set variables which hold command-line arguments to be passed to F# Interactive.
set fsi_args= --lib:NHol^
  --define:FSI_VER_2^
  --define:DEBUG^
  --define:TRACE^
  --define:USE^
  --use:init.fsx^
  --use:Logging.fs^
  --use:system.fs^
  --use:lib.fs^
  --use:fusion.fs^
  --use:basics.fs^
  --use:nets.fs^
  --use:printer.fs^
  --use:preterm.fs^
  --use:parser.fs^
  --use:equal.fs^
  --use:bool.fs^
  --use:drule.fs^
  --use:tactics.fs^
  --use:itab.fs^
  --use:simp.fs^
  --use:theorems.fs^
  --use:ind_defs.fs^
  --use:class.fs^
  --use:trivia.fs^
  --use:canon.fs^
  --use:meson.fs^
  --use:quot.fs^
  --use:pair.fs^
  --use:nums.fs^
  --use:recursion.fs^
  --use:arith.fs^
  --use:wf.fs^
  --use:calc_num.fs^
  --use:normalizer.fs^
  --use:grobner.fs^
  --use:ind_types.fs^
  --use:lists.fs^
  --use:realax.fs^
  --use:calc_int.fs^
  --use:realarith.fs^
  --use:real.fs^
  --use:calc_rat.fs^
  --use:int.fs^
  --use:sets.fs^
  --use:iterate.fs^
  --use:cart.fs^
  --use:define.fs^
  --use:help.fs^
  --use:database.fs^

:: Verify NHol.dll exists before proceeding
if exist %NHOL_ABSOLUTE% (

   :: Try to find the user's installation of F# Interactive.
   if exist %FSI_30% (
      :: VS 2012 / F# 3.0
      echo Using F# 3.0

      :: Set the 'FSI' variable to the path for F# 3.0 Interactive.
      set FSI= %FSI_30%

      set FSI_VER_FLAG = ""
   ) else (
      if exist %FSI_20% (
          :: VS 2010 / F# 2.0
          echo Using F# 2.0

          :: Set the 'FSI' variable to the path for F# 2.0 Interactive.
          set FSI= %FSI_20%

          set FSI_VER_FLAG = "--define:FSI_VER_2"
      ) else (
          :: Unable to find the F# installation, so exit.
          echo Unable to find an installation of F# interactive at any known location.
          echo Exiting...
          pause
          exit
      )
   )
) else (

:: Unable to find NHol.dll so exit.
echo Unable to find NHol.dll at %NHOL_ABSOLUTE%.
echo.
echo Did you build NHol.dll by compiling the project?
echo If not it is suggested to use Visual Studio to automatically download NuGet packages.
echo Note: NHol works with Visual Studio Express which is free.
echo.
echo Exiting...
echo.
pause
exit
)

:: Load the NHol environment into the detected version of F# Interactive.
echo Loading NHol into F# Interactive.
%FSI% %fsi_args% %FSI_VER_FLAG%

Add check for NHol.dll and friendly message if not found.

Signed-off-by: Eric Taucher <30b64b56436fcf85b74ccbb05f43dcd6d341dadf@gmail.com>


@rem ..\..\tools\nuget pack
@nuget pack Unity.Wcf\Unity.Wcf.csproj -properties Configuration=Release -symbols -build -OutputDirectory bin

@rem pause

@rem ..\..\tools\nuget pack
@nuget pack Unity.Wcf\Unity.Wcf.csproj -properties Configuration=Release -symbols -build -OutputDirectory bin %*

@rem pause

Allow additional build parameter.

Allow additional build parameter.


@echo off
echo Check for Admn
net sessions
if %errorlevel%==0 (
echo Success
) else (
echo No admin
pause
exit
)
REM Turn on UAC
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
REM No Remote Desktop
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f
REM Windows auomatic updates
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f
REM Removing good ol' insecure stuff
dism /online /disable-feature /featurename:IIS-WebServerRole >NUL
dism /online /disable-feature /featurename:IIS-WebServer >NUL
dism /online /disable-feature /featurename:IIS-CommonHttpFeatures >NUL
dism /online /disable-feature /featurename:IIS-HttpErrors >NUL
dism /online /disable-feature /featurename:IIS-HttpRedirect >NUL
dism /online /disable-feature /featurename:IIS-ApplicationDevelopment >NUL
dism /online /disable-feature /featurename:IIS-NetFxExtensibility >NUL
dism /online /disable-feature /featurename:IIS-NetFxExtensibility45 >NUL
dism /online /disable-feature /featurename:IIS-HealthAndDiagnostics >NUL
dism /online /disable-feature /featurename:IIS-HttpLogging >NUL
dism /online /disable-feature /featurename:IIS-LoggingLibraries >NUL
dism /online /disable-feature /featurename:IIS-RequestMonitor >NUL
dism /online /disable-feature /featurename:IIS-HttpTracing >NUL
dism /online /disable-feature /featurename:IIS-Security >NUL
dism /online /disable-feature /featurename:IIS-URLAuthorization >NUL
dism /online /disable-feature /featurename:IIS-RequestFiltering >NUL
dism /online /disable-feature /featurename:IIS-IPSecurity >NUL
dism /online /disable-feature /featurename:IIS-Performance >NUL
dism /online /disable-feature /featurename:IIS-HttpCompressionDynamic >NUL
dism /online /disable-feature /featurename:IIS-WebServerManagementTools >NUL
dism /online /disable-feature /featurename:IIS-ManagementScriptingTools >NUL
dism /online /disable-feature /featurename:IIS-IIS6ManagementCompatibility >NUL
dism /online /disable-feature /featurename:IIS-Metabase >NUL
dism /online /disable-feature /featurename:IIS-HostableWebCore >NUL
dism /online /disable-feature /featurename:IIS-StaticContent >NUL
dism /online /disable-feature /featurename:IIS-DefaultDocument >NUL
dism /online /disable-feature /featurename:IIS-DirectoryBrowsing >NUL
dism /online /disable-feature /featurename:IIS-WebDAV >NUL
dism /online /disable-feature /featurename:IIS-WebSockets >NUL
dism /online /disable-feature /featurename:IIS-ApplicationInit >NUL
dism /online /disable-feature /featurename:IIS-ASPNET >NUL
dism /online /disable-feature /featurename:IIS-ASPNET45 >NUL
dism /online /disable-feature /featurename:IIS-ASP >NUL
dism /online /disable-feature /featurename:IIS-CGI >NUL
dism /online /disable-feature /featurename:IIS-ISAPIExtensions >NUL
dism /online /disable-feature /featurename:IIS-ISAPIFilter >NUL
dism /online /disable-feature /featurename:IIS-ServerSideIncludes >NUL
dism /online /disable-feature /featurename:IIS-CustomLogging >NUL
dism /online /disable-feature /featurename:IIS-BasicAuthentication >NUL
dism /online /disable-feature /featurename:IIS-HttpCompressionStatic >NUL
dism /online /disable-feature /featurename:IIS-ManagementConsole >NUL
dism /online /disable-feature /featurename:IIS-ManagementService >NUL
dism /online /disable-feature /featurename:IIS-WMICompatibility >NUL
dism /online /disable-feature /featurename:IIS-LegacyScripts >NUL
dism /online /disable-feature /featurename:IIS-LegacySnapIn >NUL
dism /online /disable-feature /featurename:IIS-FTPServer >NUL
dism /online /disable-feature /featurename:IIS-FTPSvc >NUL
dism /online /disable-feature /featurename:IIS-FTPExtensibility >NUL
dism /online /disable-feature /featurename:TFTP >NUL
dism /online /disable-feature /featurename:TelnetClient >NUL
dism /online /disable-feature /featurename:TelnetServer >NUL

@echo off
echo Check for Admn
net sessions
if %errorlevel%==0 (
echo Success, Obtained Admin Rights
) else (
echo Failure, No Admin Rights
pause
exit
)
REM Turn on UAC
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
REM No Remote Desktop
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f
REM Windows auomatic updates
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f
REM Removing good ol' insecure stuff
dism /online /disable-feature /featurename:IIS-WebServerRole >NUL
dism /online /disable-feature /featurename:IIS-WebServer >NUL
dism /online /disable-feature /featurename:IIS-CommonHttpFeatures >NUL
dism /online /disable-feature /featurename:IIS-HttpErrors >NUL
dism /online /disable-feature /featurename:IIS-HttpRedirect >NUL
dism /online /disable-feature /featurename:IIS-ApplicationDevelopment >NUL
dism /online /disable-feature /featurename:IIS-NetFxExtensibility >NUL
dism /online /disable-feature /featurename:IIS-NetFxExtensibility45 >NUL
dism /online /disable-feature /featurename:IIS-HealthAndDiagnostics >NUL
dism /online /disable-feature /featurename:IIS-HttpLogging >NUL
dism /online /disable-feature /featurename:IIS-LoggingLibraries >NUL
dism /online /disable-feature /featurename:IIS-RequestMonitor >NUL
dism /online /disable-feature /featurename:IIS-HttpTracing >NUL
dism /online /disable-feature /featurename:IIS-Security >NUL
dism /online /disable-feature /featurename:IIS-URLAuthorization >NUL
dism /online /disable-feature /featurename:IIS-RequestFiltering >NUL
dism /online /disable-feature /featurename:IIS-IPSecurity >NUL
dism /online /disable-feature /featurename:IIS-Performance >NUL
dism /online /disable-feature /featurename:IIS-HttpCompressionDynamic >NUL
dism /online /disable-feature /featurename:IIS-WebServerManagementTools >NUL
dism /online /disable-feature /featurename:IIS-ManagementScriptingTools >NUL
dism /online /disable-feature /featurename:IIS-IIS6ManagementCompatibility >NUL
dism /online /disable-feature /featurename:IIS-Metabase >NUL
dism /online /disable-feature /featurename:IIS-HostableWebCore >NUL
dism /online /disable-feature /featurename:IIS-StaticContent >NUL
dism /online /disable-feature /featurename:IIS-DefaultDocument >NUL
dism /online /disable-feature /featurename:IIS-DirectoryBrowsing >NUL
dism /online /disable-feature /featurename:IIS-WebDAV >NUL
dism /online /disable-feature /featurename:IIS-WebSockets >NUL
dism /online /disable-feature /featurename:IIS-ApplicationInit >NUL
dism /online /disable-feature /featurename:IIS-ASPNET >NUL
dism /online /disable-feature /featurename:IIS-ASPNET45 >NUL
dism /online /disable-feature /featurename:IIS-ASP >NUL
dism /online /disable-feature /featurename:IIS-CGI >NUL
dism /online /disable-feature /featurename:IIS-ISAPIExtensions >NUL
dism /online /disable-feature /featurename:IIS-ISAPIFilter >NUL
dism /online /disable-feature /featurename:IIS-ServerSideIncludes >NUL
dism /online /disable-feature /featurename:IIS-CustomLogging >NUL
dism /online /disable-feature /featurename:IIS-BasicAuthentication >NUL
dism /online /disable-feature /featurename:IIS-HttpCompressionStatic >NUL
dism /online /disable-feature /featurename:IIS-ManagementConsole >NUL
dism /online /disable-feature /featurename:IIS-ManagementService >NUL
dism /online /disable-feature /featurename:IIS-WMICompatibility >NUL
dism /online /disable-feature /featurename:IIS-LegacyScripts >NUL
dism /online /disable-feature /featurename:IIS-LegacySnapIn >NUL
dism /online /disable-feature /featurename:IIS-FTPServer >NUL
dism /online /disable-feature /featurename:IIS-FTPSvc >NUL
dism /online /disable-feature /featurename:IIS-FTPExtensibility >NUL
dism /online /disable-feature /featurename:TFTP >NUL
dism /online /disable-feature /featurename:TelnetClient >NUL
dism /online /disable-feature /featurename:TelnetServer >NUL

Update CleanSystem.bat

Update CleanSystem.bat


@echo off

set APP_DIR_PATH=%userprofile%\.smockin
set DB_DIR_PATH=%APP_DIR_PATH%\db
set DB_DRIVER_DIR_PATH=%DB_DIR_PATH%\driver
set DB_DATA_DIR_PATH=%DB_DIR_PATH%\data

set H2_JAR_NAME=h2-1.4.194.jar
set DB_PROPS_FILE=db.properties
set APP_PROPS_FILE=app.properties

IF EXIST %DB_DIR_PATH% (

  echo Smockin is already installed : '%APP_DIR_PATH%'

) ELSE (

  echo Installing .smockin config directory to user home...

  mkdir %DB_DRIVER_DIR_PATH%
  echo - Created directory %DB_DRIVER_DIR_PATH%
  mkdir %DB_DATA_DIR_PATH%
  echo - Created directory %DB_DATA_DIR_PATH%

  copy    install\%H2_JAR_NAME%       %DB_DRIVER_DIR_PATH%\%H2_JAR_NAME%
  echo - Added file %DB_DRIVER_DIR_PATH\%H2_JAR_NAME%
  copy    install\%DB_PROPS_FILE%     %DB_DIR_PATH%\%DB_PROPS_FILE%
  echo - Added file %DB_DIR_PATH%\%DB_PROPS_FILE%
  copy    install\%APP_PROPS_FILE%     %APP_DIR_PATH%
  echo - Added file %APP_DIR_PATH%\%APP_PROPS_FILE%

  echo The default H2 DB has been installed

  echo   Please run start.bat to launch the Smockin Application

)

@echo off

IF DEFINED %1 (
    set APP_DIR_PATH=%1\.smockin

) ELSE (
    set APP_DIR_PATH=%userprofile%\.smockin
)

setx SMOCKIN_DIR_PATH = %APP_DIR_PATH%

set DB_DIR_PATH=%APP_DIR_PATH%\db
set DB_DRIVER_DIR_PATH=%DB_DIR_PATH%\driver
set DB_DATA_DIR_PATH=%DB_DIR_PATH%\data

set H2_JAR_NAME=h2-1.4.194.jar
set DB_PROPS_FILE=db.properties
set APP_PROPS_FILE=app.properties

IF EXIST %DB_DIR_PATH% (

  echo Smockin is already installed : '%APP_DIR_PATH%'

) ELSE (

  echo Installing .smockin config directory to user home...

  mkdir %DB_DRIVER_DIR_PATH%
  echo - Created directory %DB_DRIVER_DIR_PATH%
  mkdir %DB_DATA_DIR_PATH%
  echo - Created directory %DB_DATA_DIR_PATH%

  copy    install\%H2_JAR_NAME%       %DB_DRIVER_DIR_PATH%\%H2_JAR_NAME%
  echo - Added file %DB_DRIVER_DIR_PATH\%H2_JAR_NAME%
  copy    install\%DB_PROPS_FILE%     %DB_DIR_PATH%\%DB_PROPS_FILE%
  echo - Added file %DB_DIR_PATH%\%DB_PROPS_FILE%
  copy    install\%APP_PROPS_FILE%     %APP_DIR_PATH%
  echo - Added file %APP_DIR_PATH%\%APP_PROPS_FILE%

  echo The default H2 DB has been installed

  echo   Please run start.bat to launch the Smockin Application

)

install to a different location

install to a different location

change install.bat to allow to install to a different folder path using a parameter and store that value into a permanent environmental variable


@echo off
rem based on scalac.bat from the Scala distribution
rem ##########################################################################
rem # Copyright 2002-2011, LAMP/EPFL
rem # Copyright 2011-2017, JetBrains
rem #
rem # This is free software; see the distribution for copying conditions.
rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
rem # PARTICULAR PURPOSE.
rem ##########################################################################

setlocal enabledelayedexpansion
call :set_home
call :set_path

set "TOOL_NAME=%1"
shift

if "%_TOOL_CLASS%"=="" set _TOOL_CLASS=org.jetbrains.kotlin.cli.utilities.MainKt

if not "%JAVA_HOME%"=="" (
  if exist "%JAVA_HOME%\bin\java.exe" set "_JAVACMD=%JAVA_HOME%\bin\java.exe"
)

if "%_JAVACMD%"=="" set _JAVACMD=java

set JAVA_ARGS=
set KONAN_ARGS=

:again
set "ARG=%1"
if not "!ARG!" == "" (
    if "!ARG:~0,2!" == "-D" (
        set "JAVA_ARGS=%JAVA_ARGS% %ARG%"
        goto next
    )
    if "!ARG:~0,2!" == "-J" (
        set "JAVA_ARGS=%JAVA_ARGS% !ARG:~2!"
        goto next
    )
    if "!ARG!" == "--time" (
        set "KONAN_ARGS=%KONAN_ARGS% --time"
        set "JAVA_ARGS=%JAVA_ARGS% -agentlib:hprof=cpu=samples -Dkonan.profile=true"
        goto next
    )

    set "KONAN_ARGS=%KONAN_ARGS% %ARG%"

    :next
    shift
    goto again
)

set "NATIVE_LIB=%_KONAN_HOME%\konan\nativelib"
set "KONAN_LIB=%_KONAN_HOME%\konan\lib"

set "SHARED_JAR=%KONAN_LIB%\shared.jar"
set "INTEROP_INDEXER_JAR=%KONAN_LIB%\Indexer.jar"
set "INTEROP_RUNTIME_JAR=%KONAN_LIB%\Runtime.jar"
set "KLIB_JAR=%KONAN_LIB%\klib.jar"
set "KONAN_JAR=%KONAN_LIB%\backend.native.jar"
set "KOTLIN_JAR=%KONAN_LIB%\kotlin-compiler.jar"
set "KOTLIN_STDLIB_JAR=%KONAN_LIB%\kotlin-stdlib.jar"
set "KOTLIN_REFLECT_JAR=%KONAN_LIB%\kotlin-stdlib.jar"
set "KOTLIN_SCRIPT_RUNTIME_JAR=%KONAN_LIB%\kotlin-script-runtime.jar"
set "STUB_GENERATOR_JAR=%KONAN_LIB%\StubGenerator.jar"
set "UTILITIES_JAR=%KONAN_LIB%\utilities.jar"

set "KONAN_CLASSPATH=%KOTLIN_JAR%;%KOTLIN_STDLIB_JAR%;%KOTLIN_REFLECT_JAR%;%KOTLIN_SCRIPT_RUNTIME_JAR%;%INTEROP_RUNTIME_JAR%;%KONAN_JAR%;%STUB_GENERATOR_JAR%;%INTEROP_INDEXER_JAR%;%SHARED_JAR%;%KLIB_JAR%;%UTILITIES_JAR%"

set JAVA_OPTS=-ea ^
    -Xmx3G ^
    "-Djava.library.path=%NATIVE_LIB%" ^
    "-Dkonan.home=%_KONAN_HOME%" ^
    -Dfile.encoding=UTF-8

set LIBCLANG_DISABLE_CRASH_RECOVERY=1

"%_JAVACMD%" %JAVA_OPTS% %JAVA_ARGS% -cp "%KONAN_CLASSPATH%" %_TOOL_CLASS% %TOOL_NAME% %KONAN_ARGS%

exit /b %ERRORLEVEL%
goto end

rem ##########################################################################
rem # subroutines

:set_home
  set _BIN_DIR=
  for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi
  set _KONAN_HOME=%_BIN_DIR%..
goto :eof

:set_path
  rem libclang.dll is dynamically linked and thus requires correct PATH to be loaded.
  rem TODO: remove this hack.
  set "PATH=%HOME%\.konan\dependencies\msys2-mingw-w64-x86_64-gcc-7.2.0-clang-llvm-5.0.0-windows-x86-64\bin;%PATH%"
goto :eof

:end
endlocal

@echo off
rem based on scalac.bat from the Scala distribution
rem ##########################################################################
rem # Copyright 2002-2011, LAMP/EPFL
rem # Copyright 2011-2017, JetBrains
rem #
rem # This is free software; see the distribution for copying conditions.
rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
rem # PARTICULAR PURPOSE.
rem ##########################################################################

setlocal enabledelayedexpansion
call :set_home
call :set_path

set "TOOL_NAME=%1"
shift

if "%_TOOL_CLASS%"=="" set _TOOL_CLASS=org.jetbrains.kotlin.cli.utilities.MainKt

if not "%JAVA_HOME%"=="" (
  if exist "%JAVA_HOME%\bin\java.exe" set "_JAVACMD=%JAVA_HOME%\bin\java.exe"
)

if "%_JAVACMD%"=="" set _JAVACMD=java

set JAVA_ARGS=
set KONAN_ARGS=

:again
set "ARG=%1"
if not "!ARG!" == "" (
    if "!ARG:~0,2!" == "-D" (
        set "JAVA_ARGS=%JAVA_ARGS% %ARG%"
        goto next
    )
    if "!ARG:~0,2!" == "-J" (
        set "JAVA_ARGS=%JAVA_ARGS% !ARG:~2!"
        goto next
    )
    if "!ARG!" == "--time" (
        set "KONAN_ARGS=%KONAN_ARGS% --time"
        set "JAVA_ARGS=%JAVA_ARGS% -agentlib:hprof=cpu=samples -Dkonan.profile=true"
        goto next
    )

    set "KONAN_ARGS=%KONAN_ARGS% %ARG%"

    :next
    shift
    goto again
)

set "NATIVE_LIB=%_KONAN_HOME%\konan\nativelib"
set "KONAN_LIB=%_KONAN_HOME%\konan\lib"

set "SHARED_JAR=%KONAN_LIB%\shared.jar"
set "INTEROP_INDEXER_JAR=%KONAN_LIB%\Indexer.jar"
set "INTEROP_RUNTIME_JAR=%KONAN_LIB%\Runtime.jar"
set "KLIB_JAR=%KONAN_LIB%\klib.jar"
set "KONAN_JAR=%KONAN_LIB%\backend.native.jar"
set "KOTLIN_JAR=%KONAN_LIB%\kotlin-compiler.jar"
set "KOTLIN_STDLIB_JAR=%KONAN_LIB%\kotlin-stdlib.jar"
set "KOTLIN_REFLECT_JAR=%KONAN_LIB%\kotlin-stdlib.jar"
set "KOTLIN_SCRIPT_RUNTIME_JAR=%KONAN_LIB%\kotlin-script-runtime.jar"
set "STUB_GENERATOR_JAR=%KONAN_LIB%\StubGenerator.jar"
set "UTILITIES_JAR=%KONAN_LIB%\utilities.jar"

set "KONAN_CLASSPATH=%KOTLIN_JAR%;%KOTLIN_STDLIB_JAR%;%KOTLIN_REFLECT_JAR%;%KOTLIN_SCRIPT_RUNTIME_JAR%;%INTEROP_RUNTIME_JAR%;%KONAN_JAR%;%STUB_GENERATOR_JAR%;%INTEROP_INDEXER_JAR%;%SHARED_JAR%;%KLIB_JAR%;%UTILITIES_JAR%"

set JAVA_OPTS=-ea ^
    -Xmx3G ^
    "-Djava.library.path=%NATIVE_LIB%" ^
    "-Dkonan.home=%_KONAN_HOME%" ^
    -Dfile.encoding=UTF-8

set LIBCLANG_DISABLE_CRASH_RECOVERY=1

"%_JAVACMD%" %JAVA_OPTS% %JAVA_ARGS% -cp "%KONAN_CLASSPATH%" %_TOOL_CLASS% %TOOL_NAME% %KONAN_ARGS%

exit /b %ERRORLEVEL%
goto end

rem ##########################################################################
rem # subroutines

:set_home
  set _BIN_DIR=
  for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi
  set _KONAN_HOME=%_BIN_DIR%..
goto :eof

:set_path
  rem libclang.dll is dynamically linked and thus requires correct PATH to be loaded.
  rem TODO: remove this hack.
  set "PATH=%USERPROFILE%\.konan\dependencies\msys2-mingw-w64-x86_64-gcc-7.2.0-clang-llvm-5.0.0-windows-x86-64\bin;%PATH%"
goto :eof

:end
endlocal

fix path variable calculation

[win][build][batch] fix path variable calculation


@setlocal EnableExtensions EnableDelayedExpansion
@echo off

set proton-repo=https://github.com/Azure/qpid-proton.git
set proton-branch=0.9-IoTClient
set package-id=Apache.QPID.Proton.AzureIot
set package-root=%~dp0\..\packaging\windows

rem -----------------------------------------------------------------------------
rem -- use PROTON_PATH if specified, otherwise <CurrentDrive>:\proton\qpid-proton
rem -----------------------------------------------------------------------------

set proton-root=%~d0\proton
if defined PROTON_PATH set proton-root=%PROTON_PATH%
set build-root=%proton-root%\qpid-proton
echo Proton is located at %proton-root%
echo Build root is %build-root%
echo Nuget Package files at %package-root%

rem -----------------------------------------------------------------------------
rem -- Make sure they know this is a third party component
rem -----------------------------------------------------------------------------

@Echo Azure IoT SDK has a dependency on apache qpid-proton-c
@Echo https://github.com/apache/qpid-proton/blob/master/LICENSE

choice /C yn /M "Do you want to install the component?"
if not %errorlevel%==1 goto :eof

rem -----------------------------------------------------------------------------
rem -- sync the Proton source code
rem -----------------------------------------------------------------------------

if Exist %build-root% rmdir %build-root% /s /q
git clone -b %proton-branch% %proton-repo% %build-root%

if not %errorlevel%==0 exit /b %errorlevel%

rem -----------------------------------------------------------------------------
rem -- build
rem -----------------------------------------------------------------------------

if not defined VCINSTALLDIR (
rem take a best guess
echo "taking a best guess at where Visual Studio 2015 might be installed: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
echo if visual studio tools are not to be found, then run this batch file from a visual studio command prompt.
set "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
)

rem build proton x86
CALL "%VCINSTALLDIR%\vcvarsall.bat" x86
if not exist %build-root%\build (
    md %build-root%\build
    if not %errorlevel%==0 exit /b %errorlevel%
)
pushd %build-root%\build

cmake -G "Visual Studio 14 2015" ..
if not %errorlevel%==0 exit /b %errorlevel%

msbuild /m proton.sln /property:Configuration=Debug
if not %errorlevel%==0 exit /b %errorlevel%

msbuild /m proton.sln /property:Configuration=Release
if not %errorlevel%==0 exit /b %errorlevel%

rem build proton x64
CALL "%VCINSTALLDIR%\vcvarsall.bat" x64
if not exist %build-root%\build_x64 (
    md %build-root%\build_x64
    if not %errorlevel%==0 exit /b %errorlevel%
)
pushd %build-root%\build_x64

cmake -G "Visual Studio 14 2015 Win64" ..
if not %errorlevel%==0 exit /b %errorlevel%

msbuild /m proton.sln /property:Configuration=Debug
if not %errorlevel%==0 exit /b %errorlevel%

msbuild /m proton.sln /property:Configuration=Release
if not %errorlevel%==0 exit /b %errorlevel%

rem build proton arm
rem by means of copy & paste from the previous platform, but crypt32.lib doesn't exist and proton then doesn't link.

rem -----------------------------------------------------------------------------
rem -- Create the nuget package
rem -----------------------------------------------------------------------------

copy %package-root%\%package-id%.* %proton-root%
if not %errorlevel%==0 exit /b %errorlevel%

pushd %proton-root%

if not exist %package-id%.nuspec (
    echo nuspec does not exist
    exit /b 1
)
if not exist %package-id%.targets (
    echo targets does not exist
    exit /b 1
)

rem ensure nuget.exe exists
where /q nuget.exe
if not !errorlevel! == 0 (
@Echo Azure IoT SDK needs to download nuget.exe from https://www.nuget.org/nuget.exe
@Echo https://www.nuget.org
choice /C yn /M "Do you want to download and run nuget.exe?"
if not !errorlevel!==1 goto :eof
rem if nuget.exe is not found, then ask user
Powershell.exe wget -outf nuget.exe https://nuget.org/nuget.exe
	if not exist .\nuget.exe (
		echo nuget does not exist
		exit /b 1
	)
)

nuget.exe pack %package-id%.nuspec
if not %errorlevel%==0 exit /b %errorlevel%

@setlocal EnableExtensions EnableDelayedExpansion
@echo off

set proton-repo=https://github.com/Azure/qpid-proton.git
set proton-branch=0.9-IoTClient
set package-id=Apache.QPID.Proton.AzureIot
set package-root=%~dp0\..\packaging\windows

rem -----------------------------------------------------------------------------
rem -- use PROTON_PATH if specified, otherwise <CurrentDrive>:\proton\qpid-proton
rem -----------------------------------------------------------------------------

set proton-root=%~d0\proton
if defined PROTON_PATH set proton-root=%PROTON_PATH%
set build-root=%proton-root%\qpid-proton
echo Proton is located at %proton-root%
echo Build root is %build-root%
echo Nuget Package files at %package-root%

rem -----------------------------------------------------------------------------
rem -- Make sure they know this is a third party component
rem -----------------------------------------------------------------------------

@Echo Azure IoT SDK has a dependency on apache qpid-proton-c
@Echo https://github.com/apache/qpid-proton/blob/master/LICENSE

choice /C yn /M "Do you want to install the component?"
if not %errorlevel%==1 goto :eof

rem -----------------------------------------------------------------------------
rem -- sync the Proton source code
rem -----------------------------------------------------------------------------

if Exist %build-root% rmdir %build-root% /s /q
git clone -b %proton-branch% %proton-repo% %build-root%

if not %errorlevel%==0 exit /b %errorlevel%

rem -----------------------------------------------------------------------------
rem -- build
rem -----------------------------------------------------------------------------

if not defined VCINSTALLDIR (
rem take a best guess
echo "taking a best guess at where Visual Studio 2015 might be installed: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
echo if visual studio tools are not to be found, then run this batch file from a visual studio command prompt.
set "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
)

rem build proton x86
CALL "%VCINSTALLDIR%\vcvarsall.bat" x86
if not exist %build-root%\build (
    md %build-root%\build
    if not %errorlevel%==0 exit /b %errorlevel%
)
pushd %build-root%\build

cmake -G "Visual Studio 14 2015" ..
if not %errorlevel%==0 exit /b %errorlevel%

msbuild /m proton.sln /property:Configuration=Debug
if not %errorlevel%==0 exit /b %errorlevel%

msbuild /m proton.sln /property:Configuration=Release
if not %errorlevel%==0 exit /b %errorlevel%

rem build proton x64
CALL "%VCINSTALLDIR%\vcvarsall.bat" x64
if not exist %build-root%\build_x64 (
    md %build-root%\build_x64
    if not %errorlevel%==0 exit /b %errorlevel%
)
pushd %build-root%\build_x64

cmake -G "Visual Studio 14 2015 Win64" ..
if not %errorlevel%==0 exit /b %errorlevel%

msbuild /m proton.sln /property:Configuration=Debug
if not %errorlevel%==0 exit /b %errorlevel%

msbuild /m proton.sln /property:Configuration=Release
if not %errorlevel%==0 exit /b %errorlevel%

rem build proton arm
rem by means of copy & paste from the previous platform, but crypt32.lib doesn't exist and proton then doesn't link.

rem -----------------------------------------------------------------------------
rem -- Create the nuget package
rem -----------------------------------------------------------------------------

copy %package-root%\%package-id%* %proton-root%
if not %errorlevel%==0 exit /b %errorlevel%

pushd %proton-root%

if not exist %package-id%.nuspec (
    echo nuspec does not exist
    exit /b 1
)
if not exist %package-id%.targets (
    echo targets does not exist
    exit /b 1
)

rem ensure nuget.exe exists
where /q nuget.exe
if not !errorlevel! == 0 (
@Echo Azure IoT SDK needs to download nuget.exe from https://www.nuget.org/nuget.exe
@Echo https://www.nuget.org
choice /C yn /M "Do you want to download and run nuget.exe?"
if not !errorlevel!==1 goto :eof
rem if nuget.exe is not found, then ask user
Powershell.exe wget -outf nuget.exe https://nuget.org/nuget.exe
	if not exist .\nuget.exe (
		echo nuget does not exist
		exit /b 1
	)
)

nuget.exe pack %package-id%.nuspec
if not %errorlevel%==0 exit /b %errorlevel%

fix nuget package missing file

fix nuget package missing file


@echo off

set lib_base=call "%~dp0lib_base.cmd"

if "%~1" == "/h" (
    %lib_base% help "%~0"
) else if "%1" neq "" (
    call :%*
)

exit /b

:help
:::===============================================================================
:::show_subs - shows all sub routines in a .bat/.cmd file with documentation
:::.
:::include:
:::.
:::       call "lib_base.cmd"
:::.
:::usage:
:::.
:::       %lib_base% show_subs "file"
:::.
:::options:
:::.
:::       file <in> full path to file containing lib_routines to display
:::.
:::-------------------------------------------------------------------------------
    for /f "tokens=* delims=:" %%a in ('type "%~1" ^| %WINDIR%\System32\findstr /i /r "^:::"') do (
        rem echo a="%%a"

        if "%%a"=="." (
            echo.
        ) else if /i "%%a" == "usage" (
            echo %%a:
        ) else if /i "%%a" == "options" (
            echo %%a:
        ) else if not "%%a" == "" (
            echo %%a
        )
    )

    pause
    exit /b

:cmder_shell
:::===============================================================================
:::show_subs - shows all sub routines in a .bat/.cmd file with documentation
:::.
:::include:
:::.
:::       call "lib_base.cmd"
:::.
:::usage:
:::.
:::       %lib_base% cmder_shell
:::.
:::options:
:::.
:::       file <in> full path to file containing lib_routines to display
:::.
:::-------------------------------------------------------------------------------
    call :detect_comspec %ComSpec%
    exit /b

:detect_comspec
    CMDER_SHELL=%~n1
    if not defined CMDER_CLINK (
        set CMDER_CLINK=1
        if "%CMDER_SHELL%" equ "tcc" set CMDER_CLINK=0
        if "%CMDER_SHELL%" equ "tccle" set CMDER_CLINK=0
    )
    if not defined CMDER_ALIASES (
        set CMDER_ALIASES=1
        if "%CMDER_SHELL%" equ "tcc" set CMDER_ALIASES=0
        if "%CMDER_SHELL%" equ "tccle" set CMDER_ALIASES=0
    )
    exit /b

:update_legacy_aliases
    type "%user_aliases%" | %WINDIR%\System32\findstr /i ";= Add aliases below here" >nul
    if "%errorlevel%" == "1" (
        echo Creating initial user_aliases store in "%user_aliases%"...
        if defined CMDER_USER_CONFIG (
            copy "%user_aliases%" "%user_aliases%.old_format"
            copy "%CMDER_ROOT%\vendor\user_aliases.cmd.default" "%user_aliases%"
        ) else (
            copy "%user_aliases%" "%user_aliases%.old_format"
            copy "%CMDER_ROOT%\vendor\user_aliases.cmd.default" "%user_aliases%"
        )
    )
    exit /b

@echo off

set lib_base=call "%~dp0lib_base.cmd"

if "%~1" == "/h" (
    %lib_base% help "%~0"
) else if "%1" neq "" (
    call :%*
)

exit /b

:help
:::===============================================================================
:::show_subs - shows all sub routines in a .bat/.cmd file with documentation
:::.
:::include:
:::.
:::       call "lib_base.cmd"
:::.
:::usage:
:::.
:::       %lib_base% show_subs "file"
:::.
:::options:
:::.
:::       file <in> full path to file containing lib_routines to display
:::.
:::-------------------------------------------------------------------------------
    for /f "tokens=* delims=:" %%a in ('type "%~1" ^| %WINDIR%\System32\findstr /i /r "^:::"') do (
        rem echo a="%%a"

        if "%%a"=="." (
            echo.
        ) else if /i "%%a" == "usage" (
            echo %%a:
        ) else if /i "%%a" == "options" (
            echo %%a:
        ) else if not "%%a" == "" (
            echo %%a
        )
    )

    pause
    exit /b

:cmder_shell
:::===============================================================================
:::show_subs - shows all sub routines in a .bat/.cmd file with documentation
:::.
:::include:
:::.
:::       call "lib_base.cmd"
:::.
:::usage:
:::.
:::       %lib_base% cmder_shell
:::.
:::options:
:::.
:::       file <in> full path to file containing lib_routines to display
:::.
:::-------------------------------------------------------------------------------
    call :detect_comspec %ComSpec%
    exit /b

:detect_comspec
    set CMDER_SHELL=%~n1
    if not defined CMDER_CLINK (
        set CMDER_CLINK=1
        if "%CMDER_SHELL%" equ "tcc" set CMDER_CLINK=0
        if "%CMDER_SHELL%" equ "tccle" set CMDER_CLINK=0
    )
    if not defined CMDER_ALIASES (
        set CMDER_ALIASES=1
        if "%CMDER_SHELL%" equ "tcc" set CMDER_ALIASES=0
        if "%CMDER_SHELL%" equ "tccle" set CMDER_ALIASES=0
    )
    exit /b

:update_legacy_aliases
    type "%user_aliases%" | %WINDIR%\System32\findstr /i ";= Add aliases below here" >nul
    if "%errorlevel%" == "1" (
        echo Creating initial user_aliases store in "%user_aliases%"...
        if defined CMDER_USER_CONFIG (
            copy "%user_aliases%" "%user_aliases%.old_format"
            copy "%CMDER_ROOT%\vendor\user_aliases.cmd.default" "%user_aliases%"
        ) else (
            copy "%user_aliases%" "%user_aliases%.old_format"
            copy "%CMDER_ROOT%\vendor\user_aliases.cmd.default" "%user_aliases%"
        )
    )
    exit /b

Add set to fix error

Add set to fix error


@REM
@REM To build the installer, you will need to the WiX Toolset, available at
@REM http://wixtoolset.org/
@REM

@ECHO OFF
TITLE 3RVX Installer Builder
ECHO "   _____ ______     ____  _______   "
ECHO "  |___ /|  _ \ \   / /\ \/ /___ /   "
ECHO "    |_ \| |_) \ \ / /  \  /  |_ \   "
ECHO "   ___) |  _ < \ V /   /  \ ___) |  "
ECHO "  |____/|_| \_\ \_/   /_/\_\____/   "
ECHO "                                    "

ECHO This script will generate a 3RVX installer.
set /p version= "Enter 3RVX Version (X.X): "
ECHO.

ECHO Setting Version: %version%
ECHO.

ECHO Setting PATH...
ECHO ON

set PATH=%PATH%;%WIX%\bin
heat dir ../Release -gg -srd -cg 3RVXComponents -dr INSTALLFOLDER -out 3RVXComponents.wxs
candle -pedantic -dProductVersion=%version%.0.0 ./3RVX.wxs ./3RVXComponents.wxs
light -b ../Release -ext WixUIExtension ./3RVX.wixobj ./3RVXComponents.wixobj -o 3RVX-%version%.msi
del 3RVX.wixobj 3RVX.wixpdb 3RVXComponents.wxs 3RVXComponents.wixobj

@ECHO OFF
ECHO.
ECHO.
IF EXIST "7za.exe" (
	ECHO Creating .zip distribution...
	ECHO.
	ECHO ON
	del 3RVX-%version%.zip
	copy "..\Assets\EmptySettings.xml" "..\Release\Settings.xml"
	7za a -tzip -mx9 3RVX-%version%.zip ../Release/*
)

@ECHO OFF
ECHO.

PAUSE

Add note about the WiX toolset

Add note about the WiX toolset


@echo off
rem Source this script to set up the ROOT build that this script is part of.
rem
rem Author: Axel Naumann, 10/07/2007

set OLDPATH=%CD%
set THIS=%0
set THIS=%THIS:~0,-12%.
cd /D %THIS%\..
set ROOTSYS=%CD%
cd /D %OLDPATH%
set PATH=%ROOTSYS%\bin;%PATH%
set OLDPATH=
set THIS=

@echo off
rem Source this script to set up the ROOT build that this script is part of.
rem
rem Author: Axel Naumann, 10/07/2007

set OLDPATH=%CD%
set THIS=%0
set THIS=%THIS:~0,-12%.
cd /D %THIS%\..
set ROOTSYS=%CD%
cd /D %OLDPATH%
set PATH=%ROOTSYS%\bin;%PATH%
echo %PYTHONPATH%|find /i "%ROOTSYS%\bin">nul || set PYTHONPATH=%ROOTSYS%\bin;%PYTHONPATH%
set OLDPATH=
set THIS=

Add also %ROOTSYS%\bin to PYTHONPATH if not already set


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

@echo off
setlocal
SET NMAKE_COMMAND=%1
SHIFT

:loop
if "%1"=="" goto success

ECHO Building %1
pushd %1
nmake %NMAKE_COMMAND%
if ERRORLEVEL 1 goto error
ECHO %1 built successfully (%NMAKE_COMMAND%)
ECHO.
shift
popd
goto loop

:success
goto exit

:error
popd
ENDLOCAL
ECHO Error while making %1!
VERIFY OTHER 2>NUL

:exit

@REM ## @file
@REM #
@REM # Copyright (c) 2007 - 2010, 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.

@echo off
setlocal
SET NMAKE_COMMAND=%1
SHIFT

:loop
if "%1"=="" goto success

ECHO Building %1
pushd %1
nmake %NMAKE_COMMAND%
if ERRORLEVEL 1 goto error
ECHO %1 built successfully (%NMAKE_COMMAND%)
ECHO.
shift
popd
goto loop

:success
goto exit

:error
popd
ENDLOCAL
ECHO Error while making %1!
VERIFY OTHER 2>NUL

:exit

Add @REM for windows BAT file comment

Add @REM for windows BAT file comment

git-svn-id: f3880c1fc5096ce2109c8aec392d8e07f619f417@1872 c2973edb-eda0-4c78-bc6a-9341b269661f


SET PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
cl.exe /std:c++14 /O2 /MT /EHsc .\MyBot.cpp /link /out:MyBot.exe

..\..\environment\halite.exe -d "96 96" ".\MyBot.exe" ".\MyBot.exe"

Add game runner script for Windows to C++ bot


@echo off

SETLOCAL
SET ARGC=0

FOR %%x IN (%*) DO SET /A ARGC+=1

IF %ARGC% NEQ 2 (
	echo Usage: %0 BindingIdInCamelCase BindingIdInLowerCase
	exit /B 1
)

mvn archetype:generate -DarchetypeGroupId=org.eclipse.smarthome.archetype -DarchetypeArtifactId=org.eclipse.smarthome.archetype.binding -DarchetypeVersion=0.8.0-SNAPSHOT -DgroupId=org.eclipse.smarthome.binding -DartifactId=org.eclipse.smarthome.binding.%2 -Dpackage=org.eclipse.smarthome.binding.%2 -DarchetypeCatalog='file://../archetype-catalog.xml' -Dversion=0.8.0-SNAPSHOT -DbindingId=%2 -DbindingIdCamelCase=%1

ENDLOCAL

@echo off

SETLOCAL
SET ARGC=0

FOR %%x IN (%*) DO SET /A ARGC+=1

IF %ARGC% NEQ 2 (
	echo Usage: %0 BindingIdInCamelCase BindingIdInLowerCase
	exit /B 1
)

mvn archetype:generate -N -DarchetypeGroupId=org.eclipse.smarthome.archetype -DarchetypeArtifactId=org.eclipse.smarthome.archetype.binding -DarchetypeVersion=0.8.0-SNAPSHOT -DgroupId=org.eclipse.smarthome.binding -DartifactId=org.eclipse.smarthome.binding.%2 -Dpackage=org.eclipse.smarthome.binding.%2 -DarchetypeCatalog='file://../archetype-catalog.xml' -Dversion=0.8.0-SNAPSHOT -DbindingId=%2 -DbindingIdCamelCase=%1

ENDLOCAL

Add parameter -N (Do not recurse into sub-projects) to skeleton
generation script for Windows.

Signed-off-by: Dancho Penev <37e475d111572792472c8fad744ee4c4e32f000f@hotmail.com>


@ECHO OFF
rem ******************************************************************************
rem *
rem * Notepad2-mod
rem *
rem * build.cmd
rem *   Batch file "wrapper" for makefile.mak, used to build Notepad2 with WDK
rem *
rem * See License.txt for details about distribution and modification.
rem *
rem *                                       (c) XhmikosR 2010
rem *                                       http://code.google.com/p/notepad2-mod/
rem *
rem ******************************************************************************

SETLOCAL
CD /D %~dp0

rem Set the WDK and SDK directories
SET "WDKBASEDIR=C:\WinDDK\7600.16385.1"
SET "SDKDIR=%PROGRAMFILES%\Microsoft SDKs\Windows\v7.1"

rem Check the building environment
IF NOT EXIST "%WDKBASEDIR%" CALL :SUBMSG "ERROR" "Specify your WDK directory!"
IF NOT EXIST "%SDKDIR%" CALL :SUBMSG "ERROR" "Specify your SDK directory!"

rem check for the help switches
IF /I "%1"=="help" GOTO :SHOWHELP
IF /I "%1"=="/help" GOTO :SHOWHELP
IF /I "%1"=="-help" GOTO :SHOWHELP
IF /I "%1"=="--help" GOTO :SHOWHELP
IF /I "%1"=="/?" GOTO :SHOWHELP
GOTO :CHECK

:SHOWHELP
TITLE "build.cmd %1"
ECHO.
ECHO:Usage:  build.cmd [Clean^|Build^|Rebuild] [x86^|x64^|all]
ECHO.
ECHO:You can use prefix the commands with "-", "--" or "/"
ECHO.
ECHO.
ECHO:Edit "build.cmd" and set your WDK and SDK directories.
ECHO:You shouldn't need to make any changes other than that.
ECHO.
ECHO.
ECHO:Executing "build.cmd" will use the defaults: "build.cmd build all"
ECHO:If you skip the second argument the default one will be used. Example:
ECHO:"build.cmd rebuild" is equivalent to "build.cmd rebuild all"
ECHO:NOTE: "build.cmd x86" won't work.
ECHO.
ENDLOCAL
EXIT /B

:CHECK
REM Check for the switches
IF "%1" == "" (
SET BUILDTYPE=Build
SET ARCH=all
) ELSE (
IF /I "%1" == "Build" SET BUILDTYPE=Build
IF /I "%1" == "/Build" SET BUILDTYPE=Build
IF /I "%1" == "-Build" SET BUILDTYPE=Build
IF /I "%1" == "--Build" SET BUILDTYPE=Build
IF /I "%1" == "Clean" SET BUILDTYPE=Clean
IF /I "%1" == "/Clean" SET BUILDTYPE=Clean
IF /I "%1" == "-Clean" SET BUILDTYPE=Clean
IF /I "%1" == "--Clean" SET BUILDTYPE=Clean
IF /I "%1" == "Rebuild" SET BUILDTYPE=Rebuild
IF /I "%1" == "/Rebuild" SET BUILDTYPE=Rebuild
IF /I "%1" == "-Rebuild" SET BUILDTYPE=Rebuild
IF /I "%1" == "--Rebuild" SET BUILDTYPE=Rebuild
IF /I "%2" == "x86" SET ARCH=x86
IF /I "%2" == "/x86" SET ARCH=x86
IF /I "%2" == "-x86" SET ARCH=x86
IF /I "%2" == "--x86" SET ARCH=x86
IF /I "%2" == "x64" SET ARCH=x64
IF /I "%2" == "/x64" SET ARCH=x64
IF /I "%2" == "-x64" SET ARCH=x64
IF /I "%2" == "--x64" SET ARCH=x64
IF /I "%2" == "all" SET ARCH=all
IF /I "%2" == "/all" SET ARCH=all
IF /I "%2" == "-all" SET ARCH=all
IF /I "%2" == "--all" SET ARCH=all
GOTO :START
)

:START
IF /I "%BUILDTYPE%" == "Clean" GOTO :x86
PUSHD ..
CALL "update_version.bat"
POPD

:x86
SET "INCLUDE=%WDKBASEDIR%\inc\crt;%WDKBASEDIR%\inc\api;%WDKBASEDIR%\inc\api\crt\stl60;%WDKBASEDIR%\inc\ddk"
SET "LIB=%WDKBASEDIR%\lib\crt\i386;%WDKBASEDIR%\lib\win7\i386"
SET "FPATH=%WDKBASEDIR%\bin\x86;%WDKBASEDIR%\bin\x86\x86;%SDKDIR%\Bin"
SET "PATH=%FPATH%"

IF /I "%ARCH%" == "x64" GOTO :x64

TITLE Building Notepad2 x86...
ECHO. && ECHO.

IF /I "%BUILDTYPE%" == "Build" (
CALL :SUBNMAKE
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64
)

IF /I "%BUILDTYPE%" == "Rebuild" (
CALL :SUBNMAKE clean
CALL :SUBNMAKE
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64
)

IF /I "%BUILDTYPE%" == "Clean" CALL :SUBNMAKE clean
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64

:x64
SET "LIB=%WDKBASEDIR%\lib\crt\amd64;%WDKBASEDIR%\lib\win7\amd64"
SET "FPATH=%WDKBASEDIR%\bin\x86;%WDKBASEDIR%\bin\x86\amd64;%SDKDIR%\Bin"
SET "PATH=%FPATH%"

IF /I "%ARCH%" == "x86" GOTO :END

TITLE Building Notepad2 x64...
ECHO. && ECHO.

IF /I "%BUILDTYPE%" == "Build" (
CALL :SUBNMAKE "x64=1"
GOTO :END
)

IF /I "%BUILDTYPE%" == "Rebuild" (
CALL :SUBNMAKE "x64=1" clean
CALL :SUBNMAKE "x64=1"
GOTO :END
)

IF /I "%BUILDTYPE%" == "Clean" CALL :SUBNMAKE "x64=1" clean

:END
TITLE Building Notepad2 - Finished!
ENDLOCAL
EXIT /B

:SUBNMAKE
nmake /NOLOGO /f "makefile.mak" %1 %2
IF %ERRORLEVEL% NEQ 0 CALL :SUBMSG "ERROR" "Compilation failed!"
EXIT /B

:SUBMSG
ECHO.&&ECHO:______________________________
ECHO:[%~1] %~2
ECHO:______________________________&&ECHO.
IF /I "%~1"=="ERROR" (
  PAUSE
  EXIT
) ELSE (
  EXIT /B
)

@ECHO OFF
rem ******************************************************************************
rem *
rem * Notepad2-mod
rem *
rem * build.cmd
rem *   Batch file "wrapper" for makefile.mak, used to build Notepad2 with WDK
rem *
rem * See License.txt for details about distribution and modification.
rem *
rem *                                       (c) XhmikosR 2010
rem *                                       http://code.google.com/p/notepad2-mod/
rem *
rem ******************************************************************************

SETLOCAL
CD /D %~dp0

rem Set the WDK and SDK directories
SET "WDKBASEDIR=C:\WinDDK\7600.16385.1"
SET "SDKDIR=%PROGRAMFILES%\Microsoft SDKs\Windows\v7.1"

rem Check the building environment
IF NOT EXIST "%WDKBASEDIR%" CALL :SUBMSG "ERROR" "Specify your WDK directory!"
IF NOT EXIST "%SDKDIR%" CALL :SUBMSG "ERROR" "Specify your SDK directory!"

rem check for the help switches
IF /I "%1"=="help" GOTO :SHOWHELP
IF /I "%1"=="/help" GOTO :SHOWHELP
IF /I "%1"=="-help" GOTO :SHOWHELP
IF /I "%1"=="--help" GOTO :SHOWHELP
IF /I "%1"=="/?" GOTO :SHOWHELP
GOTO :CHECKFIRSTARG

:SHOWHELP
TITLE "build.cmd %1"
ECHO.
ECHO:Usage:  build.cmd [Clean^|Build^|Rebuild] [x86^|x64^|all]
ECHO.
ECHO:You can use prefix the commands with "-", "--" or "/"
ECHO.
ECHO.
ECHO:Edit "build.cmd" and set your WDK and SDK directories.
ECHO:You shouldn't need to make any changes other than that.
ECHO.
ECHO.
ECHO:Executing "build.cmd" will use the defaults: "build.cmd build all"
ECHO:If you skip the second argument the default one will be used. Example:
ECHO:"build.cmd rebuild" is equivalent to "build.cmd rebuild all"
ECHO:NOTE: "build.cmd x86" won't work.
ECHO.
ENDLOCAL
EXIT /B

:CHECKFIRSTARG
REM Check for the first switch
IF "%1" == "" (
SET BUILDTYPE=Build
) ELSE (
IF /I "%1" == "Build" SET BUILDTYPE=Build&&GOTO :CHECKSECONDARG
IF /I "%1" == "/Build" SET BUILDTYPE=Build&&GOTO :CHECKSECONDARG
IF /I "%1" == "-Build" SET BUILDTYPE=Build&&GOTO :CHECKSECONDARG
IF /I "%1" == "--Build" SET BUILDTYPE=Build&&GOTO :CHECKSECONDARG
IF /I "%1" == "Clean" SET BUILDTYPE=Clean&&GOTO :CHECKSECONDARG
IF /I "%1" == "/Clean" SET BUILDTYPE=Clean&&GOTO :CHECKSECONDARG
IF /I "%1" == "-Clean" SET BUILDTYPE=Clean&&GOTO :CHECKSECONDARG
IF /I "%1" == "--Clean" SET BUILDTYPE=Clean&&GOTO :CHECKSECONDARG
IF /I "%1" == "Rebuild" SET BUILDTYPE=Rebuild&&GOTO :CHECKSECONDARG
IF /I "%1" == "/Rebuild" SET BUILDTYPE=Rebuild&&GOTO :CHECKSECONDARG
IF /I "%1" == "-Rebuild" SET BUILDTYPE=Rebuild&&GOTO :CHECKSECONDARG
IF /I "%1" == "--Rebuild" SET BUILDTYPE=Rebuild&&GOTO :CHECKSECONDARG
ECHO.
ECHO:Unsupported commandline switch!
ECHO:Run "build.cmd help" for details about the commandline switches.
CALL :SUBMSG "ERROR" "Compilation failed!"
)

:CHECKSECONDARG
REM Check for the second switch
IF "%2" == "" (
SET ARCH=all
) ELSE (
IF /I "%2" == "x86" SET ARCH=x86&&GOTO :START
IF /I "%2" == "/x86" SET ARCH=x86&&GOTO :START
IF /I "%2" == "-x86" SET ARCH=x86&&GOTO :START
IF /I "%2" == "--x86" SET ARCH=x86&&GOTO :START
IF /I "%2" == "x64" SET ARCH=x64&&GOTO :START
IF /I "%2" == "/x64" SET ARCH=x64&&GOTO :START
IF /I "%2" == "-x64" SET ARCH=x64&&GOTO :START
IF /I "%2" == "--x64" SET ARCH=x64&&GOTO :START
IF /I "%2" == "all" SET ARCH=all&&GOTO :START
IF /I "%2" == "/all" SET ARCH=all&&GOTO :START
IF /I "%2" == "-all" SET ARCH=all&&GOTO :START
IF /I "%2" == "--all" SET ARCH=all&&GOTO :START
ECHO.
ECHO:Unsupported commandline switch!
ECHO:Run "build.cmd help" for details about the commandline switches.
CALL :SUBMSG "ERROR" "Compilation failed!"
)

:START
IF /I "%BUILDTYPE%" == "Clean" GOTO :x86
PUSHD ..
CALL "update_version.bat"
POPD

:x86
SET "INCLUDE=%WDKBASEDIR%\inc\crt;%WDKBASEDIR%\inc\api;%WDKBASEDIR%\inc\api\crt\stl60;%WDKBASEDIR%\inc\ddk"
SET "LIB=%WDKBASEDIR%\lib\crt\i386;%WDKBASEDIR%\lib\win7\i386"
SET "FPATH=%WDKBASEDIR%\bin\x86;%WDKBASEDIR%\bin\x86\x86;%SDKDIR%\Bin"
SET "PATH=%FPATH%"

IF /I "%ARCH%" == "x64" GOTO :x64

TITLE Building Notepad2 x86...
ECHO. && ECHO.

IF /I "%BUILDTYPE%" == "Build" (
CALL :SUBNMAKE
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64
)

IF /I "%BUILDTYPE%" == "Rebuild" (
CALL :SUBNMAKE clean
CALL :SUBNMAKE
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64
)

IF /I "%BUILDTYPE%" == "Clean" CALL :SUBNMAKE clean
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64

:x64
SET "LIB=%WDKBASEDIR%\lib\crt\amd64;%WDKBASEDIR%\lib\win7\amd64"
SET "FPATH=%WDKBASEDIR%\bin\x86;%WDKBASEDIR%\bin\x86\amd64;%SDKDIR%\Bin"
SET "PATH=%FPATH%"

IF /I "%ARCH%" == "x86" GOTO :END

TITLE Building Notepad2 x64...
ECHO. && ECHO.

IF /I "%BUILDTYPE%" == "Build" (
CALL :SUBNMAKE "x64=1"
GOTO :END
)

IF /I "%BUILDTYPE%" == "Rebuild" (
CALL :SUBNMAKE "x64=1" clean
CALL :SUBNMAKE "x64=1"
GOTO :END
)

IF /I "%BUILDTYPE%" == "Clean" CALL :SUBNMAKE "x64=1" clean

:END
TITLE Building Notepad2 - Finished!
ENDLOCAL
EXIT /B

:SUBNMAKE
nmake /NOLOGO /f "makefile.mak" %1 %2
IF %ERRORLEVEL% NEQ 0 CALL :SUBMSG "ERROR" "Compilation failed!"
EXIT /B

:SUBMSG
ECHO.&&ECHO:______________________________
ECHO:[%~1] %~2
ECHO:______________________________&&ECHO.
IF /I "%~1"=="ERROR" (
  PAUSE
  EXIT
) ELSE (
  EXIT /B
)

update build.cmd

update build.cmd

git-svn-id: 756506b3b0ea8c31733a8f0a5bb416c7e269da3d@330 28bd50df-7adb-d945-0439-6e466c6a13cc


@echo off
setlocal

if '%Configuration%' == '' if not '%1' == '' set Configuration=%1
if '%Configuration%' == '' set Configuration=Debug

if exist .\build\coverage rd /s /q .\build\coverage
md .\build\coverage

.\packages\OpenCover.4.5.3723\OpenCover.Console.exe -register:user -output:.\build\coverage\results.xml -target:.\packages\xunit.runner.console.2.0.0\tools\xunit.console.exe "-targetargs:.\JeremyAnsel.ColorQuant.Tests\bin\%Configuration%\JeremyAnsel.ColorQuant.Tests.dll -noshadow" "-filter:+[JeremyAnsel.ColorQuant]* -[*.Tests]*" -hideskipped:File;Filter;Attribute

.\packages\ReportGenerator.2.1.4.0\ReportGenerator.exe -reports:.\build\coverage\results.xml -targetdir:.\build\coverage -verbosity:Info

@echo off
setlocal

if '%Configuration%' == '' if not '%1' == '' set Configuration=%1
if '%Configuration%' == '' set Configuration=Debug

if exist "%~dp0\build\coverage" rd /s /q "%~dp0\build\coverage"
md "%~dp0\build\coverage"

"%~dp0\packages\OpenCover.4.5.3723\OpenCover.Console.exe" -register:user -output:"%~dp0\build\coverage\results.xml" -target:"%~dp0\packages\xunit.runner.console.2.0.0\tools\xunit.console.exe" -targetargs:"%~dp0\JeremyAnsel.ColorQuant.Tests\bin\%Configuration%\JeremyAnsel.ColorQuant.Tests.dll -noshadow" "-filter:+[JeremyAnsel.ColorQuant]* -[*.Tests]*" -hideskipped:File;Filter;Attribute

"%~dp0\packages\ReportGenerator.2.1.4.0\ReportGenerator.exe" -reports:"%~dp0\build\coverage\results.xml" -targetdir:"%~dp0\build\coverage" -verbosity:Info

Update test_script

Update test_script


@echo off

set GAME_TITLE=%1
set LIBS=user32.lib kernel32.lib gdi32.lib Winmm.lib

if "%GAME_TITLE%"=="" (
    set GAME_TITLE=Multima
)

pushd w:\build\

del /Q w:\build\*.dll
del /Q w:\build\*.exe
del /Q w:\build\*.exp
del /Q w:\build\*.lib
del /Q w:\build\*.obj
del /Q w:\build\*.pdb

cl /DGAME_TITLE=\"%GAME_TITLE%\" /Zi ..\code\game.cpp /LDd
cl /DGAME_TITLE=\"%GAME_TITLE%\" /Zi /Fe%GAME_TITLE% ..\code\win32_platform.cpp %LIBS%
cl /DGAME_TITLE=\"%GAME_TITLE%\" /DMULTIMA_CONSOLE /Zi /Fe%GAME_TITLE%_console.exe ..\code\win32_platform.cpp %LIBS%

popd

@echo off

set GAME_TITLE=%1
set LIBS=user32.lib kernel32.lib gdi32.lib Winmm.lib

if "%GAME_TITLE%"=="" (
    set GAME_TITLE=Multima
)

pushd w:\build\

del /Q w:\build\*.dll
del /Q w:\build\*.exe
del /Q w:\build\*.exp
del /Q w:\build\*.lib
del /Q w:\build\*.obj
del /Q w:\build\*.pdb

cl /DGAME_TITLE=\"%GAME_TITLE%\" /O2 ..\code\game.cpp /LD
cl /DGAME_TITLE=\"%GAME_TITLE%\" /O2 /Fe%GAME_TITLE% ..\code\win32_platform.cpp %LIBS%

cl /DGAME_TITLE=\"%GAME_TITLE%\" /DMULTIMA_DEBUG /Zi /Fegame_debug.dll ..\code\game.cpp /LDd
cl /DGAME_TITLE=\"%GAME_TITLE%\" /DMULTIMA_DEBUG /Zi /Fe%GAME_TITLE%_debug.exe ..\code\win32_platform.cpp %LIBS%

popd

Update build script to build two separately things; optimized and debug versions of both exe and dll


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

set version=1.0.0
if not "%PackageVersion%" == "" (
   set version=%PackageVersion%
)

set nuget=
if "%nuget%" == "" (
	set nuget=nuget
)

dir

echo "========"
echo %WINDIR%

powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe','nuget.exe')"

nuget.exe restore Sigma.sln

%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild Sigma.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false

REM pack Sigma.Core

cd Sigma.Core
nuget.exe pack "Sigma.Core.csproj" -IncludeReferencedProjects -Prop Platform=x64 -Verbosity detailed -Prop Configuration=%config% -Version %version%

cd ..

REM pack Sigma.Core.Monitors.WPF

cd Sigma.Core.Monitors.WPF

REM update the targets file

cd build
powershell -Command "(gc Sigma.Core.Monitors.WPF.targets) -replace '~version~', '%version%' | Out-File Sigma.Core.Monitors.WPF.targets"

cd ..
nuget.exe pack "Sigma.Core.Monitors.WPF.csproj" -IncludeReferencedProjects -Prop Platform=x64 -Verbosity detailed -Prop Configuration=%config% -Version %version%

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

set version=1.0.0
if not "%PackageVersion%" == "" (
   set version=%PackageVersion%
)

set nuget=
if "%nuget%" == "" (
	set nuget=nuget
)

dir

echo "========"
echo %WINDIR%

powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe','nuget.exe')"

nuget.exe restore Sigma.sln

%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild Sigma.sln /p:Configuration="%config%" /p:Platform=x64 /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false

REM pack Sigma.Core

cd Sigma.Core
nuget.exe pack "Sigma.Core.csproj" -IncludeReferencedProjects -Prop Platform=x64 -Verbosity detailed -Prop Configuration=%config% -Version %version%

cd ..

REM pack Sigma.Core.Monitors.WPF

cd Sigma.Core.Monitors.WPF

REM update the targets file

cd build
powershell -Command "(gc Sigma.Core.Monitors.WPF.targets) -replace '~version~', '%version%' | Out-File Sigma.Core.Monitors.WPF.targets"

cd ..
nuget.exe pack "Sigma.Core.Monitors.WPF.csproj" -IncludeReferencedProjects -Prop Platform=x64 -Verbosity detailed -Prop Configuration=%config% -Version %version%

Fix platform (x64)

Fix platform (x64)


@echo off
set addin_path="Z:\data\arcgis\addins\btm.esriaddin"
set cert_path="Z:\data\arcgis\addins\cert_2016.cer"
where /q python
IF ERRORLEVEL 1 (
    REM Assume default 10.4 location
    set py="c:\python27\ArcGIS10.4\python"
) ELSE (
    set py="python"
)
echo Building addin...
"%py%" makeaddin.py
echo Signing addin...
"c:\Program Files (x86)\Common Files\ArcGIS\bin\ESRISignAddin.exe" "%addin_path%" /c:"%cert_path%"
set runTest=n
set /p runTest=Would you like to run the test suite? y/N:

if "%runTest%" == "y" GOTO runtests
echo Skipping tests.
GOTO install

:runtests
echo Executing tests...
"%py%" tests/testMain.py
GOTO install

:install
set install=n
set /p install=Would you like to install the add-in? y/N:
if "%install%" == "y" GOTO installAddin
echo Skipping installation.
GOTO end

:installAddin
start ../btm.esriaddin
:end

@echo off
set addin_path="Z:\data\arcgis\addins\btm.esriaddin"
set cert_path="Z:\data\arcgis\addins\cert_2016.cer"
where /q python
IF ERRORLEVEL 1 (
    REM Assume default 10.4 installation
    set py="c:\python27\ArcGIS10.4\python"
) ELSE (
    set py="python"
)
echo Building addin...
"%py%" makeaddin.py
echo Signing addin...
REM Assumes that the signing program installed -- it is installed with
REM the .NET SDK of the vesrion of ArcGIS Desktop used.
"c:\Program Files (x86)\Common Files\ArcGIS\bin\ESRISignAddin.exe" "%addin_path%" /c:"%cert_path%"
set runTest=n
set /p runTest=Would you like to run the test suite? y/N:

if "%runTest%" == "y" GOTO runtests
echo Skipping tests.
GOTO install

:runtests
echo Executing tests...
"%py%" tests/testMain.py
GOTO install

:install
set install=n
set /p install=Would you like to install the add-in? y/N:
if "%install%" == "y" GOTO installAddin
echo Skipping installation.
GOTO end

:installAddin
start ../btm.esriaddin
:end

add comments

add comments


if exist .\build rmdir /Q /S .\build

mkdir .\build

javac -d .\build  -cp "dependencies/OSBot 2.4.39.jar;" catherby_fisher\src\CatherbyFisher.java
jar cfe build\CatherbyFisher.jar CatherbyFisher -C .\build CatherbyFisher.class -C .\build CatherbyFisher$State.class -C .\build CatherbyFisher$1.class

del .\build\*.class

pause

Add build batch script

Add build batch script

Running this batch script will build all bots in the repository
The jar files needed by OSBot will appear in the builds directory


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

set version=1.0.0
if not "%PackageVersion%" == "" (
   set version=%PackageVersion%
)

set nuget=
if "%nuget%" == "" (
	set nuget=nuget
)

dir

%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild src\Sigma.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false

REM pack Sigma.Core

cd Sigma.Core
%nuget% pack "Sigma.Core.csproj" -IncludeReferencedProjects -Prop Platform=x64 -Verbosity detailed -Prop Configuration=%config% -Version %version%

cd ..

REM pack Sigma.Core.Monitors.WPF

cd Sigma.Core.Monitors.WPF

REM update the targets file

cd build
powershell -Command "(gc Sigma.Core.Monitors.WPF.targets) -replace '~version~', '%version%' | Out-File Sigma.Core.Monitors.WPF.targets"

cd ..
%nuget% pack "Sigma.Core.Monitors.WPF.csproj" -IncludeReferencedProjects -Prop Platform=x64 -Verbosity detailed -Prop Configuration=%config% -Version %version%

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

set version=1.0.0
if not "%PackageVersion%" == "" (
   set version=%PackageVersion%
)

set nuget=
if "%nuget%" == "" (
	set nuget=nuget
)

dir

echo "========"
echo %WINDIR%

%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild Sigma.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false

REM pack Sigma.Core

cd Sigma.Core
%nuget% pack "Sigma.Core.csproj" -IncludeReferencedProjects -Prop Platform=x64 -Verbosity detailed -Prop Configuration=%config% -Version %version%

cd ..

REM pack Sigma.Core.Monitors.WPF

cd Sigma.Core.Monitors.WPF

REM update the targets file

cd build
powershell -Command "(gc Sigma.Core.Monitors.WPF.targets) -replace '~version~', '%version%' | Out-File Sigma.Core.Monitors.WPF.targets"

cd ..
%nuget% pack "Sigma.Core.Monitors.WPF.csproj" -IncludeReferencedProjects -Prop Platform=x64 -Verbosity detailed -Prop Configuration=%config% -Version %version%

Fix solution path

Fix solution path


@echo off
cd %~dp0

SETLOCAL
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe
SET BUILDCMD_KOREBUILD_VERSION=""
SET BUILDCMD_DNX_VERSION=""

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
IF %BUILDCMD_KOREBUILD_VERSION%=="" (
	.nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
) ELSE (
	.nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
)
.nuget\nuget.exe install Sake -ExcludeVersion -Out packages

IF "%SKIP_DNX_INSTALL%"=="1" goto run
IF %BUILDCMD_DNX_VERSION%=="" (
	CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
) ELSE (
	CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -a default
)
CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86

:run
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

@echo off
cd %~dp0

SETLOCAL
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe
SET BUILDCMD_KOREBUILD_VERSION=""
SET BUILDCMD_DNX_VERSION=""

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
IF %BUILDCMD_KOREBUILD_VERSION%=="" (
	.nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
) ELSE (
	.nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
)
.nuget\nuget.exe install Sake -ExcludeVersion -Out packages

IF "%SKIP_DNX_INSTALL%"=="1" goto run
IF %BUILDCMD_DNX_VERSION%=="" (
	CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
) ELSE (
	CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -alias default
)
CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86

:run
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

Update 'build.cmd' alias parameter to use full name.


@echo off
setlocal

:: Note: We've disabled node reuse because it causes file locking issues.
::       The issue is that we extend the build with our own targets which
::       means that that rebuilding cannot successfully delete the task
::       assembly.

if not defined VisualStudioVersion (
    if defined VS140COMNTOOLS (
        call "%VS140COMNTOOLS%\VsDevCmd.bat"
        goto :EnvSet
    )

    if defined VS120COMNTOOLS (
        call "%VS120COMNTOOLS%\VsDevCmd.bat"
        goto :EnvSet
    )

    echo Error: build.cmd requires Visual Studio 2013 or 2015.
    echo        Please see https://github.com/dotnet/corefx/blob/master/Documentation/developer-guide.md for build instructions.
    exit /b 1
)

:EnvSet

:: Log build command line
set _buildproj=%~dp0build.proj
set _buildlog=%~dp0msbuild.log
set _buildprefix=echo
set _buildpostfix=^> "%_buildlog%"
call :build %*

:: Build
set _buildprefix=
set _buildpostfix=
call :build %*

goto :AfterBuild

:build
%_buildprefix% msbuild "%_buildproj%" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=normal;LogFile="%_buildlog%";Append %* %_buildpostfix%
set BUILDERRORLEVEL=%ERRORLEVEL%
goto :eof

:AfterBuild

echo.
:: Pull the build summary from the log file
findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%_buildlog%"
echo Build Exit Code = %BUILDERRORLEVEL%

exit /b %BUILDERRORLEVEL%

@echo off
setlocal

:: Note: We've disabled node reuse because it causes file locking issues.
::       The issue is that we extend the build with our own targets which
::       means that that rebuilding cannot successfully delete the task
::       assembly.

if not defined VisualStudioVersion (
    if defined VS140COMNTOOLS (
        call "%VS140COMNTOOLS%\VsDevCmd.bat"
        goto :EnvSet
    )

    if defined VS120COMNTOOLS (
        call "%VS120COMNTOOLS%\VsDevCmd.bat"
        goto :EnvSet
    )

    echo Error: build.cmd requires Visual Studio 2013 or 2015.
    echo        Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
    exit /b 1
)

:EnvSet

:: Log build command line
set _buildproj=%~dp0build.proj
set _buildlog=%~dp0msbuild.log
set _buildprefix=echo
set _buildpostfix=^> "%_buildlog%"
call :build %*

:: Build
set _buildprefix=
set _buildpostfix=
call :build %*

goto :AfterBuild

:build
%_buildprefix% msbuild "%_buildproj%" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=normal;LogFile="%_buildlog%";Append %* %_buildpostfix%
set BUILDERRORLEVEL=%ERRORLEVEL%
goto :eof

:AfterBuild

echo.
:: Pull the build summary from the log file
findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%_buildlog%"
echo Build Exit Code = %BUILDERRORLEVEL%

exit /b %BUILDERRORLEVEL%

Fix link to developer guide

Fix link to developer guide


fix missing _ in menpo_playground.py

fix missing _ in menpo_playground.py