@echo off
setlocal
pushd %~dp0
cd ..
goto :start

:help
echo Usage: build [debug|release] [x64|x86] [nosync] [clean|noclean]
echo nosync - do not update the git submodules.
echo clean - only clean the build
echo noclean - do not clean the build, so do incemental build

goto :exit

:start
echo ============= Building P SDK on %COMPUTERNAME% ===============

Bld\nuget restore P.sln

set MSBuildPath=
for /F "usebackq tokens=1,2* delims= " %%i in (`reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 -v MSBuildToolsPath`) do (
   if "%%i" == "MSBuildToolsPath" set MSBuildPath=%%k
)

if not "%MSBuildPath%"=="" goto :step2

echo MSBUILD 14.0 does not appear to be installed.
echo No info found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0
goto :eof

:step2
set TAIL=%MSBuildPath:~-6%
set Build64=0
if "[%TAIL%]" == "[amd64\]" set Build64=1
set PATH=%PATH%;%MSBuildPath%
set Configuration=Debug
set Platform=x86
set NoSync=
set CleanOnly=
set NoClean=
set SubmoduleOutOfDate=false

:parseargs
if /I "%1"=="debug" set Configuration=Debug
if /I "%1"=="release" set Configuration=Release
if /I "%1"=="x86" set Platform=x86
if /I "%1"=="x64" set Platform=x64
if /I "%1"=="nosync" set NoSync=true
if /I "%1"=="clean" set CleanOnly=true
if /I "%1"=="noclean" set NoClean=true
if /I "%1"=="" goto :initsub
if /I "%1"=="/?" goto :help
if /I "%1"=="/h" goto :help
if /I "%1"=="/help" goto :help
if /I "%1"=="help" goto :help
shift
goto :parseargs

:initsub
if exist "Ext\Formula\README.md" goto :updatesub

echo ### Initializing your submodules
git submodule init
git submodule update
goto :sync

:checksubmodule
for /f "usebackq tokens=1,2*" %%i in (`git submodule summary %1`) do (
  if "%%j"=="%1" echo #### Submodule is out of date: %1 & set SubmoduleOutOfDate=true
)

goto :eof

:updatesub
if "%NoSync%"=="true" goto :nosync

echo ### Updating your submodules
call :checksubmodule Ext/Formula
call :checksubmodule Ext/Zing

if "%SubmoduleOutOfDate%"=="false" goto :nosync

:sync
echo ### Fixing your submodules so they are up to date...
git submodule sync --recursive
git submodule update --init --recursive
goto :nosync

:nosync
cd ext\zing

echo msbuild  Zing.sln /p:Platform=%Platform% /p:Configuration=Release
msbuild  Zing.sln /p:Platform=%Platform% /p:Configuration=Release
if ERRORLEVEL 1 goto :exit

set BinaryDrop=..\..\Bld\Drops\%Configuration%\%Platform%\Binaries
if NOT exist %BinaryDrop% mkdir %BinaryDrop%

for %%i in (zc\bin\%Platform%\Release\zc.exe
             ZingExplorer\bin\%Platform%\Release\ZingExplorer.dll
             Zinger\bin\%Platform%\Release\Zinger.exe
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Zing.dll
             Microsoft.Zing.Runtime\bin\%Platform%\Release\Microsoft.Zing.Runtime.dll
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Comega.dll
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Comega.Runtime.dll
             Resources\external\CCI\System.Compiler.dll
             Resources\external\CCI\System.Compiler.Framework.dll
             Resources\external\CCI\System.Compiler.Runtime.dll
             DelayingSchedulers\CustomDelayingScheduler\bin\%Platform%\Release\CustomDelayingScheduler.dll
             DelayingSchedulers\RandomDelayingScheduler\bin\%Platform%\Release\RandomDelayingScheduler.dll
             DelayingSchedulers\RoundRobinDelayingScheduler\bin\%Platform%\Release\RoundRobinDelayingScheduler.dll
             DelayingSchedulers\RunToCompletionDelayingScheduler\bin\%Platform%\Release\RunToCompletionDelayingScheduler.dll
	     DelayingSchedulers\SealingScheduler\bin\%Platform%\Release\SealingScheduler.dll) do (

    copy %%i %BinaryDrop%
)

cd ..\..
REM this code fixes a problem in MIDL compile by forcing recompile of these files for each configuration.
del Src\PrtDist\Core\NodeManager_c.c
del Src\PrtDist\Core\NodeManager_s.c

if "%NoClean%"=="true" goto :build
echo msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration%  /t:Clean
msbuild  P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /t:Clean

:build

set FormulaCodeGeneratorTaskPlatform=x86
if "%Build64%"=="1" set FormulaCodeGeneratorTaskPlatform=x64
echo msbuild FormulaCodeGeneratorTask /p:Platform=%FormulaCodeGeneratorTaskPlatform% /p:Configuration=%Configuration%
msbuild  ext\Formula\src\Extensions\FormulaCodeGeneratorTask\FormulaCodeGeneratorTask.csproj /p:Platform=%FormulaCodeGeneratorTaskPlatform% /p:Configuration=%Configuration%

if "%CleanOnly%"=="true" goto :exit
msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /p:SOLVER=NOSOLVER

:exit
popd

@echo off
setlocal
pushd %~dp0
cd ..
goto :start

:help
echo Usage: build [debug|release] [x64|x86] [nosync] [clean|noclean]
echo nosync - do not update the git submodules.
echo clean - only clean the build
echo noclean - do not clean the build, so do incemental build

goto :exit

:start
echo ============= Building P SDK on %COMPUTERNAME% ===============

Bld\nuget restore P.sln

set MSBuildPath=
for /F "usebackq tokens=1,2* delims= " %%i in (`reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 -v MSBuildToolsPath`) do (
   if "%%i" == "MSBuildToolsPath" set MSBuildPath=%%k
)

if not "%MSBuildPath%"=="" goto :step2

echo MSBUILD 14.0 does not appear to be installed.
echo No info found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0
goto :eof

:step2
set TAIL=%MSBuildPath:~-6%
set Build64=0
if "[%TAIL%]" == "[amd64\]" set Build64=1
set PATH=%MSBuildPath%;%PATH%
set Configuration=Debug
set Platform=x86
set NoSync=
set CleanOnly=
set NoClean=
set SubmoduleOutOfDate=false

:parseargs
if /I "%1"=="debug" set Configuration=Debug
if /I "%1"=="release" set Configuration=Release
if /I "%1"=="x86" set Platform=x86
if /I "%1"=="x64" set Platform=x64
if /I "%1"=="nosync" set NoSync=true
if /I "%1"=="clean" set CleanOnly=true
if /I "%1"=="noclean" set NoClean=true
if /I "%1"=="" goto :initsub
if /I "%1"=="/?" goto :help
if /I "%1"=="/h" goto :help
if /I "%1"=="/help" goto :help
if /I "%1"=="help" goto :help
shift
goto :parseargs

:initsub
if exist "Ext\Formula\README.md" goto :updatesub

echo ### Initializing your submodules
git submodule init
git submodule update
goto :sync

:checksubmodule
for /f "usebackq tokens=1,2*" %%i in (`git submodule summary %1`) do (
  if "%%j"=="%1" echo #### Submodule is out of date: %1 & set SubmoduleOutOfDate=true
)

goto :eof

:updatesub
if "%NoSync%"=="true" goto :nosync

echo ### Updating your submodules
call :checksubmodule Ext/Formula
call :checksubmodule Ext/Zing

if "%SubmoduleOutOfDate%"=="false" goto :nosync

:sync
echo ### Fixing your submodules so they are up to date...
git submodule sync --recursive
git submodule update --init --recursive
goto :nosync

:nosync
cd ext\zing

echo msbuild  Zing.sln /p:Platform=%Platform% /p:Configuration=Release
msbuild  Zing.sln /p:Platform=%Platform% /p:Configuration=Release
if ERRORLEVEL 1 goto :exit

set BinaryDrop=..\..\Bld\Drops\%Configuration%\%Platform%\Binaries
if NOT exist %BinaryDrop% mkdir %BinaryDrop%

for %%i in (zc\bin\%Platform%\Release\zc.exe
             ZingExplorer\bin\%Platform%\Release\ZingExplorer.dll
             Zinger\bin\%Platform%\Release\Zinger.exe
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Zing.dll
             Microsoft.Zing.Runtime\bin\%Platform%\Release\Microsoft.Zing.Runtime.dll
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Comega.dll
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Comega.Runtime.dll
             Resources\external\CCI\System.Compiler.dll
             Resources\external\CCI\System.Compiler.Framework.dll
             Resources\external\CCI\System.Compiler.Runtime.dll
             DelayingSchedulers\CustomDelayingScheduler\bin\%Platform%\Release\CustomDelayingScheduler.dll
             DelayingSchedulers\RandomDelayingScheduler\bin\%Platform%\Release\RandomDelayingScheduler.dll
             DelayingSchedulers\RoundRobinDelayingScheduler\bin\%Platform%\Release\RoundRobinDelayingScheduler.dll
             DelayingSchedulers\RunToCompletionDelayingScheduler\bin\%Platform%\Release\RunToCompletionDelayingScheduler.dll
	     DelayingSchedulers\SealingScheduler\bin\%Platform%\Release\SealingScheduler.dll) do (

    copy %%i %BinaryDrop%
)

cd ..\..
REM this code fixes a problem in MIDL compile by forcing recompile of these files for each configuration.
del Src\PrtDist\Core\NodeManager_c.c
del Src\PrtDist\Core\NodeManager_s.c

if "%NoClean%"=="true" goto :build
echo msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration%  /t:Clean
msbuild  P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /t:Clean

:build

set FormulaCodeGeneratorTaskPlatform=x86
if "%Build64%"=="1" set FormulaCodeGeneratorTaskPlatform=x64
echo msbuild FormulaCodeGeneratorTask /p:Platform=%FormulaCodeGeneratorTaskPlatform% /p:Configuration=%Configuration%
msbuild  ext\Formula\src\Extensions\FormulaCodeGeneratorTask\FormulaCodeGeneratorTask.csproj /p:Platform=%FormulaCodeGeneratorTaskPlatform% /p:Configuration=%Configuration%

if "%CleanOnly%"=="true" goto :exit
msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /p:SOLVER=NOSOLVER

:exit
popd

Use MSBuildPath version of MSBuild.

Use MSBuildPath version of MSBuild.


@echo off
setlocal
pushd %~dp0
cd ..
goto :start

:help
echo Usage: build [debug|release] [x64|x86] [nosync] [clean|noclean]
echo nosync - do not update the git submodules.
echo clean - only clean the build
echo noclean - do not clean the build, so do incemental build

goto :exit

:start
echo ============= Building P SDK on %COMPUTERNAME% ===============

Bld\nuget restore -configfile NuGet.config P.sln

set MSBuildPath=
for /F "usebackq tokens=1* delims=" %%i in (`where msbuild`) do (
   if "%MSBuildPath%"=="" set MSBuildPath=%%i
)
echo Found MSBuild here: %MSBuildPath%

for /F "usebackq tokens=1* delims=: " %%i in (`corflags %MSBuildPath%`) do (
   if "%%i"=="32BITREQ" set MSBuild32Bit=%%j
)

if not "%MSBuildPath%"=="" goto :step2

echo MSBUILD does not appear to be installed.
goto :eof

:step2
set MsBuild64=1
if "%MSBuild32Bit%" == "1" set MsBuild64=0
set Configuration=Debug
set Platform=x86
set NoSync=
set CleanOnly=
set NoClean=
set SubmoduleOutOfDate=false

:parseargs
if /I "%1"=="debug" set Configuration=Debug
if /I "%1"=="release" set Configuration=Release
if /I "%1"=="x86" set Platform=x86
if /I "%1"=="x64" set Platform=x64
if /I "%1"=="nosync" set NoSync=true
if /I "%1"=="clean" set CleanOnly=true
if /I "%1"=="noclean" set NoClean=true
if /I "%1"=="" goto :initsub
if /I "%1"=="/?" goto :help
if /I "%1"=="/h" goto :help
if /I "%1"=="/help" goto :help
if /I "%1"=="help" goto :help
shift
goto :parseargs

:initsub
if exist "Ext\PSharp\README.md" (
    if exist "Ext\Formula\README.md" (
        if exist "EXT\Zing\README.md" (
            goto :updatesub
        )
    )
)

echo ### Initializing your submodules
git submodule init
git submodule update
goto :sync

:checksubmodule
for /f "usebackq tokens=1,2*" %%i in (`git submodule summary %1`) do (
  if "%%j"=="%1" echo #### Submodule is out of date: %1 & set SubmoduleOutOfDate=true
)

goto :eof

:updatesub
if "%NoSync%"=="true" goto :nosync

echo ### Updating your submodules
call :checksubmodule Ext/Formula
call :checksubmodule Ext/Zing
call :checksubmodule Ext/PSharp

if "%SubmoduleOutOfDate%"=="false" goto :nosync

:sync
echo ### Fixing your submodules so they are up to date...
git submodule sync --recursive
git submodule update --init --recursive
goto :nosync

:nosync
cd ext\zing

echo msbuild  Zing.sln /p:Platform=%Platform% /p:Configuration=Release
msbuild  Zing.sln /p:Platform=%Platform% /p:Configuration=Release
if ERRORLEVEL 1 goto :exit

set BinaryDrop=..\..\Bld\Drops\%Configuration%\%Platform%\Binaries
if NOT exist %BinaryDrop% mkdir %BinaryDrop%

for %%i in (zc\bin\%Platform%\Release\zc.exe
             ZingExplorer\bin\%Platform%\Release\ZingExplorer.dll
             Zinger\bin\%Platform%\Release\Zinger.exe
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Zing.dll
             Microsoft.Zing.Runtime\bin\%Platform%\Release\Microsoft.Zing.Runtime.dll
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Comega.dll
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Comega.Runtime.dll
             Resources\external\CCI\System.Compiler.dll
             Resources\external\CCI\System.Compiler.Framework.dll
             Resources\external\CCI\System.Compiler.Runtime.dll
             DelayingSchedulers\CustomDelayingScheduler\bin\%Platform%\Release\CustomDelayingScheduler.dll
             DelayingSchedulers\RandomDelayingScheduler\bin\%Platform%\Release\RandomDelayingScheduler.dll
             DelayingSchedulers\RoundRobinDelayingScheduler\bin\%Platform%\Release\RoundRobinDelayingScheduler.dll
             DelayingSchedulers\RunToCompletionDelayingScheduler\bin\%Platform%\Release\RunToCompletionDelayingScheduler.dll
	     DelayingSchedulers\SealingScheduler\bin\%Platform%\Release\SealingScheduler.dll) do (

    copy %%i %BinaryDrop%
)

cd ..\..

REM Build PSharp
cd ext\PSharp
..\..\Bld\nuget restore -configfile NuGet.config PSharp.sln
echo msbuild PSharp.sln /p:Platform="Any CPU" /p:Configuration=%Configuration%
msbuild  PSharp.sln /p:Platform="Any CPU" /p:Configuration=%Configuration%
if ERRORLEVEL 1 goto :exit

cd ..\..

if "%NoClean%"=="true" goto :build
echo msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration%  /t:Clean
msbuild  P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /t:Clean

:build

set FormulaCodeGeneratorTaskPlatform=x86
if "%MsBuild64%"=="1" set FormulaCodeGeneratorTaskPlatform=x64
echo msbuild FormulaCodeGeneratorTask /p:Platform=%FormulaCodeGeneratorTaskPlatform% /p:Configuration=%Configuration%
msbuild  ext\Formula\src\Extensions\FormulaCodeGeneratorTask\FormulaCodeGeneratorTask.csproj /p:Platform=%FormulaCodeGeneratorTaskPlatform% /p:Configuration=%Configuration%

if "%CleanOnly%"=="true" goto :exit

call :StartTimer
msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /p:SOLVER=NOSOLVER
call :StopTimer
call :DisplayTimerResult

goto :exit

:StartTimer
:: Store start time
set StartTIME=%TIME%
for /f "usebackq tokens=1-4 delims=:., " %%f in (`echo %StartTIME: =0%`) do set /a Start100S=1%%f*360000+1%%g*6000+1%%h*100+1%%i-36610100
goto :EOF

:StopTimer
:: Get the end time
set StopTIME=%TIME%
for /f "usebackq tokens=1-4 delims=:., " %%f in (`echo %StopTIME: =0%`) do set /a Stop100S=1%%f*360000+1%%g*6000+1%%h*100+1%%i-36610100
:: Test midnight rollover. If so, add 1 day=8640000 1/100ths secs
if %Stop100S% LSS %Start100S% set /a Stop100S+=8640000
set /a TookTime=%Stop100S%-%Start100S%
set TookTimePadded=0%TookTime%
goto :EOF

:DisplayTimerResult
:: Show timer start/stop/delta
echo Started: %StartTime%
echo Stopped: %StopTime%
echo Elapsed: %TookTime:~0,-2%.%TookTimePadded:~-2% seconds
goto :EOF

:exit
popd

@echo off
setlocal
pushd %~dp0
cd ..
goto :start

:help
echo Usage: build [debug|release] [x64|x86] [nosync] [clean|noclean]
echo nosync - do not update the git submodules.
echo clean - only clean the build
echo noclean - do not clean the build, so do incemental build

goto :exit

:start
echo ============= Building P SDK on %COMPUTERNAME% ===============

set MSBuildPath=
for /F "usebackq tokens=1* delims=" %%i in (`where msbuild`) do (
   if "%MSBuildPath%"=="" set MSBuildPath=%%i
)
echo Found MSBuild here: %MSBuildPath%

for /F "usebackq tokens=1* delims=: " %%i in (`corflags %MSBuildPath%`) do (
   if "%%i"=="32BITREQ" set MSBuild32Bit=%%j
)

if not "%MSBuildPath%"=="" goto :step2

echo MSBUILD does not appear to be installed.
goto :eof

:step2
set MsBuild64=1
if "%MSBuild32Bit%" == "1" set MsBuild64=0
set PBuildConfiguration=Debug
set PBuildPlatform=x86
set NoSync=
set CleanOnly=
set NoClean=
set SubmoduleOutOfDate=false

:parseargs
if /I "%1"=="debug" set PBuildConfiguration=Debug
if /I "%1"=="release" set PBuildConfiguration=Release
if /I "%1"=="x86" set PBuildPlatform=x86
if /I "%1"=="x64" set PBuildPlatform=x64
if /I "%1"=="nosync" set NoSync=true
if /I "%1"=="clean" set CleanOnly=true
if /I "%1"=="noclean" set NoClean=true
if /I "%1"=="" goto :initsub
if /I "%1"=="/?" goto :help
if /I "%1"=="/h" goto :help
if /I "%1"=="/help" goto :help
if /I "%1"=="help" goto :help
shift
goto :parseargs

:initsub

if exist "Ext\PSharp\README.md" (
    if exist "Ext\Formula\README.md" (
        if exist "EXT\Zing\README.md" (
            goto :updatesub
        )
    )
)

echo ### Initializing your submodules
git submodule init
git submodule update
goto :sync

:checksubmodule
for /f "usebackq tokens=1,2*" %%i in (`git submodule summary %1`) do (
  if "%%j"=="%1" echo #### Submodule is out of date: %1 & set SubmoduleOutOfDate=true
)

goto :eof

:updatesub
if "%NoSync%"=="true" goto :nosync

echo ### Updating your submodules
call :checksubmodule Ext/Formula
call :checksubmodule Ext/Zing
call :checksubmodule Ext/PSharp

if "%SubmoduleOutOfDate%"=="false" goto :nosync

:sync
echo ### Fixing your submodules so they are up to date...
git submodule sync --recursive
git submodule update --init --recursive
goto :nosync

:nosync

cd ext\zing

echo msbuild  Zing.sln /p:Platform=%PBuildPlatform% /p:Configuration=Release
msbuild  Zing.sln /p:Platform=%PBuildPlatform% /p:Configuration=Release
if ERRORLEVEL 1 goto :exit

set BinaryDrop=..\..\Bld\Drops\%PBuildConfiguration%\%PBuildPlatform%\Binaries
if NOT exist %BinaryDrop% mkdir %BinaryDrop%

for %%i in (zc\bin\%PBuildPlatform%\Release\zc.exe
             ZingExplorer\bin\%PBuildPlatform%\Release\ZingExplorer.dll
             Zinger\bin\%PBuildPlatform%\Release\Zinger.exe
             Microsoft.Zing\bin\%PBuildPlatform%\Release\Microsoft.Zing.dll
             Microsoft.Zing.Runtime\bin\%PBuildPlatform%\Release\Microsoft.Zing.Runtime.dll
             Microsoft.Zing\bin\%PBuildPlatform%\Release\Microsoft.Comega.dll
             Microsoft.Zing\bin\%PBuildPlatform%\Release\Microsoft.Comega.Runtime.dll
             Resources\external\CCI\System.Compiler.dll
             Resources\external\CCI\System.Compiler.Framework.dll
             Resources\external\CCI\System.Compiler.Runtime.dll
             DelayingSchedulers\CustomDelayingScheduler\bin\%PBuildPlatform%\Release\CustomDelayingScheduler.dll
             DelayingSchedulers\RandomDelayingScheduler\bin\%PBuildPlatform%\Release\RandomDelayingScheduler.dll
             DelayingSchedulers\RoundRobinDelayingScheduler\bin\%PBuildPlatform%\Release\RoundRobinDelayingScheduler.dll
             DelayingSchedulers\RunToCompletionDelayingScheduler\bin\%PBuildPlatform%\Release\RunToCompletionDelayingScheduler.dll
	     DelayingSchedulers\SealingScheduler\bin\%PBuildPlatform%\Release\SealingScheduler.dll) do (

    copy %%i %BinaryDrop%
)

cd ..\..

if "%NoClean%"=="true" goto :build
echo msbuild P.sln /p:Platform=%PBuildPlatform% /p:Configuration=%PBuildConfiguration%  /t:Clean
msbuild  P.sln /p:Platform=%PBuildPlatform% /p:Configuration=%PBuildConfiguration% /t:Clean
msbuild  Ext\PSharp\PSharp.sln /p:Platform="Any CPU" /p:Configuration=%PBuildConfiguration% /t:Clean

if "%CleanOnly%"=="true" goto :exit

:PSharp
REM Build PSharp
cd ext\PSharp
..\..\Bld\nuget restore -configfile NuGet.config PSharp.sln
echo msbuild PSharp.sln /p:Platform="Any CPU" /p:Configuration=%PBuildConfiguration%
msbuild  PSharp.sln /p:Platform="Any CPU" /p:Configuration=%PBuildConfiguration%
if ERRORLEVEL 1 goto :exit

cd ..\..

:build

set FormulaCodeGeneratorTaskPlatform=x86
if "%MsBuild64%"=="1" set FormulaCodeGeneratorTaskPlatform=x64
echo msbuild FormulaCodeGeneratorTask /p:Platform=%FormulaCodeGeneratorTaskPlatform% /p:Configuration=%PBuildConfiguration%
msbuild  ext\Formula\src\Extensions\FormulaCodeGeneratorTask\FormulaCodeGeneratorTask.csproj /p:Platform=%FormulaCodeGeneratorTaskPlatform% /p:Configuration=%PBuildConfiguration%

call :StartTimer

Bld\nuget restore -configfile NuGet.config P.sln

msbuild P.sln /p:Platform=%PBuildPlatform% /p:Configuration=%PBuildConfiguration% /p:SOLVER=NOSOLVER
call :StopTimer
call :DisplayTimerResult

goto :exit

:StartTimer
:: Store start time
set StartTIME=%TIME%
for /f "usebackq tokens=1-4 delims=:., " %%f in (`echo %StartTIME: =0%`) do set /a Start100S=1%%f*360000+1%%g*6000+1%%h*100+1%%i-36610100
goto :EOF

:StopTimer
:: Get the end time
set StopTIME=%TIME%
for /f "usebackq tokens=1-4 delims=:., " %%f in (`echo %StopTIME: =0%`) do set /a Stop100S=1%%f*360000+1%%g*6000+1%%h*100+1%%i-36610100
:: Test midnight rollover. If so, add 1 day=8640000 1/100ths secs
if %Stop100S% LSS %Start100S% set /a Stop100S+=8640000
set /a TookTime=%Stop100S%-%Start100S%
set TookTimePadded=0%TookTime%
goto :EOF

:DisplayTimerResult
:: Show timer start/stop/delta
echo Started: %StartTime%
echo Stopped: %StopTime%
echo Elapsed: %TookTime:~0,-2%.%TookTimePadded:~-2% seconds
goto :EOF

:exit
popd

fix build.bat

fix build.bat


@ECHO OFF

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

REM This test script will return an error exit code

@echo FOO.%TEST_ENV_VAR%.%1

EXIT 1

set CRLF style for .bat file

set CRLF style for .bat file

git-svn-id: 152f48a1866dc7886cc2b83d2001e6645df26423@684755 13f79535-47bb-0310-9956-ffa450edef68


:: This script create zip packages (need 7zip installed and path added to system environment variable)

@echo off

set PATH_TO_PHYSX=C:\library\PhysX-3.2.3_PC_SDK_Core\Bin

:: dx9_x86
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip werkkzeug4_dx9_x32.exe
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip %PATH_TO_PHYSX%\win32\PhysX3CHECKED_x86.dll
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip %PATH_TO_PHYSX%\win32\PhysX3CommonCHECKED_x86.dll
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip %PATH_TO_PHYSX%\win32\PhysX3CookingCHECKED_x86.dll
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip %PATH_TO_PHYSX%\win32\PhysX3CookingCHECKED_x86.dll
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip changes.txt

:: dx9_x64
7z a -tzip -mx=9 Wz4CE_dx9_x64.zip werkkzeug4_dx9_x64.exe
7z a -tzip -mx=9 Wz4CE_dx9_x64.zip %PATH_TO_PHYSX%\win64\PhysX3CHECKED_x64.dll
7z a -tzip -mx=9 Wz4CE_dx9_x64.zip %PATH_TO_PHYSX%\win64\PhysX3CommonCHECKED_x64.dll
7z a -tzip -mx=9 Wz4CE_dx9_x64.zip %PATH_TO_PHYSX%\win64\PhysX3CookingCHECKED_x64.dll
7z a -tzip -mx=9 Wz4CE_dx9_x64.zip changes.txt

pause

Add a script to release binaries packages


cls

@REM ###############################
@REM ## AIMGAMES SCRIPTS COMPILER ##
@REM ##  MADE BY RAFA1231518 AKA  ##
@REM ##       CHRISHANSEN69       ##
@REM ###############################

@REM "C:\Program Files\Java\jdk1.8.0_65\bin\java" -version
@REM dir

@REM build java files

@cd build
@cd src\

@REM compile everything
javac br\com\chrishansen\aimgames\builder\*.java
@REM pack AddUserscriptLines
jar cvfe AddUserscriptLines.jar br.com.chrishansen.aimgames.builder.AddUserscriptLines br\com\chrishansen\aimgames\builder\AddUserscriptLines.class
@REM pack IncrementBuildNumber
jar cvfe IncrementBuildNumber.jar br.com.chrishansen.aimgames.builder.IncrementBuildNumber br\com\chrishansen\aimgames\builder\IncrementBuildNumber.class
@REM pack beautify stuff
jar cvfe BeautifyScript.jar br.com.chrishansen.aimgames.builder.BeautifyScript br\com\chrishansen\aimgames\builder\BeautifyScript.class

move AddUserscriptLines.jar ..\AddUserscriptLines.jar
move IncrementBuildNumber.jar ..\IncrementBuildNumber.jar
move BeautifyScript.jar ..\BeautifyScript.jar
mkdir ..\libraries\
move libraries\beautifier.js ..\libraries\beautifier.js

@cd ..

@REM build scripts

@REM Argument 1 is the file that will be output, argument 2 is the file that will be input, argument 3 is the number of lines to be kept from the start of the file.
@REM ..\ means "go back one folder"
call compile ..\bin\swearify.compiled.user.js "..\swearify\swearify.user.js" 15
call compile ..\bin\swearify_v2.compiled.user.js "..\swearify\swearify_v2.user.js" 17
call compile ..\bin\alive.compiled.user.js "..\alive\alive.user.js" 8
call compile ..\bin\chatboxplusplus-v2.compiled.user.js "..\alive\chatboxplusplus-v2.user.js" 9
call compile ..\bin\chameleon.compiled.user.js "..\chameleon\chameleon.user.js" 11
call compile ..\bin\chameleon_random.compiled.user.js "..\chameleon\chameleon_random.user.js" 8
call compile ..\bin\chameleon_vampire.compiled.user.js "..\chameleon\chameleon_vampire.user.js" 7
call compile ..\bin\accountassist.compiled.user.js "..\other\accountassist.user.js" 11
call compile ..\bin\ratebot.compiled.user.js "..\other\ratebot.user.js" 9
call compile ..\bin\imagereuploader.compiled.user.js "..\swearify\imagereuploader.user.js" 9
call compile ..\bin\swearify_image_utility.compiled.user.js "..\swearify\swearify_image_utility.user.js" 8
call increment

@REM return to home
@cd ..

cls

@REM ###############################
@REM ## AIMGAMES SCRIPTS COMPILER ##
@REM ##  MADE BY RAFA1231518 AKA  ##
@REM ##       CHRISHANSEN69       ##
@REM ###############################

@REM "C:\Program Files\Java\jdk1.8.0_65\bin\java" -version
@REM dir

@REM build java files

@cd build
@cd src\

@REM compile everything
javac br\com\chrishansen\aimgames\builder\*.java
@REM pack AddUserscriptLines
jar cvfe AddUserscriptLines.jar br.com.chrishansen.aimgames.builder.AddUserscriptLines br\com\chrishansen\aimgames\builder\AddUserscriptLines.class
@REM pack IncrementBuildNumber
jar cvfe IncrementBuildNumber.jar br.com.chrishansen.aimgames.builder.IncrementBuildNumber br\com\chrishansen\aimgames\builder\IncrementBuildNumber.class
@REM pack beautify stuff
jar cvfe BeautifyScript.jar br.com.chrishansen.aimgames.builder.BeautifyScript br\com\chrishansen\aimgames\builder\BeautifyScript.class

move AddUserscriptLines.jar ..\AddUserscriptLines.jar
move IncrementBuildNumber.jar ..\IncrementBuildNumber.jar
move BeautifyScript.jar ..\BeautifyScript.jar
mkdir ..\libraries\
move libraries\beautifier.js ..\libraries\beautifier.js

@cd ..

@REM build scripts

@REM Argument 1 is the file that will be output, argument 2 is the file that will be input, argument 3 is the number of lines to be kept from the start of the file.
@REM ..\ means "go back one folder"
call compile ..\bin\swearify.compiled.user.js "..\swearify\swearify.user.js" 15
call compile ..\bin\swearify_v2.compiled.user.js "..\swearify\swearify_v2.user.js" 17
call compile ..\bin\alive.compiled.user.js "..\alive\alive.user.js" 8
call compile ..\bin\chatboxplusplus-v2.compiled.user.js "..\alive\chatboxplusplus-v2.user.js" 11
call compile ..\bin\chameleon.compiled.user.js "..\chameleon\chameleon.user.js" 11
call compile ..\bin\chameleon_random.compiled.user.js "..\chameleon\chameleon_random.user.js" 8
call compile ..\bin\chameleon_vampire.compiled.user.js "..\chameleon\chameleon_vampire.user.js" 7
call compile ..\bin\accountassist.compiled.user.js "..\other\accountassist.user.js" 11
call compile ..\bin\ratebot.compiled.user.js "..\other\ratebot.user.js" 9
call compile ..\bin\imagereuploader.compiled.user.js "..\swearify\imagereuploader.user.js" 9
call compile ..\bin\swearify_image_utility.compiled.user.js "..\swearify\swearify_image_utility.user.js" 8
call increment

@REM return to home
@cd ..

fix line count in build.bat for chatbox++ v2


dotnet build NakedFramework.ProgrammingModel.sln -c Debug

dotnet pack "Programming Model\NakedFramework\NakedFramework.ProgrammingModel.Package\NakedFramework.ProgrammingModel.Package.csproj"  --include-symbols --include-source

XCOPY ".\Programming Model\NakedFramework\NakedFramework.ProgrammingModel.Package\bin\Debug\*.nupkg" "C:\NakedObjectsPackages" /y

dotnet build NakedObjects.ProgrammingModel.sln -c Debug
dotnet build NakedFunctions.ProgrammingModel.sln -c Debug

dotnet pack "Programming Model\NakedObjects\NakedObjects.ProgrammingModel.Package\NakedObjects.ProgrammingModel.Package.csproj"  --include-symbols --include-source
dotnet pack "Programming Model\NakedFunctions\NakedFunctions.ProgrammingModel.Package\NakedFunctions.ProgrammingModel.Package.csproj"  --include-symbols --include-source

XCOPY ".\Programming Model\NakedObjects\NakedObjects.ProgrammingModel.Package\bin\Debug\*.nupkg" "C:\NakedObjectsPackages" /y
XCOPY ".\Programming Model\NakedFunctions\NakedFunctions.ProgrammingModel.Package\bin\Debug\*.nupkg" "C:\NakedObjectsPackages" /y

dotnet build NakedObjects.Server.sln -c Debug -p:DefineConstants=APPVEYOR
dotnet build NakedFunctions.Server.sln -c Debug -p:DefineConstants=APPVEYOR

dotnet pack NakedObjects\NakedObjects.Server.Package\NakedObjects.Server.Package.csproj --include-symbols --include-source
dotnet pack NakedFunctions\NakedFunctions.Server.Package\NakedFunctions.Server.Package.csproj --include-symbols --include-source

XCOPY ".\NakedObjects\NakedObjects.Server.Package\bin\Debug\*.nupkg" "C:\NakedObjectsPackages" /y
XCOPY ".\NakedFunctions\NakedFunctions.Server.Package\bin\Debug\*.nupkg" "C:\NakedObjectsPackages" /y

SET nugetPackagePath=C:\NakedObjectsPackages

dotnet build NakedFramework.ProgrammingModel.sln -c Debug

dotnet pack "Programming Model\NakedFramework\NakedFramework.ProgrammingModel.Package\NakedFramework.ProgrammingModel.Package.csproj"  --include-symbols --include-source

XCOPY ".\Programming Model\NakedFramework\NakedFramework.ProgrammingModel.Package\bin\Debug\*.nupkg" %nugetPackagePath% /y

dotnet build NakedObjects.ProgrammingModel.sln -c Debug
dotnet build NakedFunctions.ProgrammingModel.sln -c Debug

dotnet pack "Programming Model\NakedObjects\NakedObjects.ProgrammingModel.Package\NakedObjects.ProgrammingModel.Package.csproj"  --include-symbols --include-source
dotnet pack "Programming Model\NakedFunctions\NakedFunctions.ProgrammingModel.Package\NakedFunctions.ProgrammingModel.Package.csproj"  --include-symbols --include-source

XCOPY ".\Programming Model\NakedObjects\NakedObjects.ProgrammingModel.Package\bin\Debug\*.nupkg"  %nugetPackagePath% /y
XCOPY ".\Programming Model\NakedFunctions\NakedFunctions.ProgrammingModel.Package\bin\Debug\*.nupkg"  %nugetPackagePath% /y

dotnet build NakedObjects.Server.sln -c Debug
dotnet build NakedFunctions.Server.sln -c Debug

dotnet pack NakedObjects\NakedObjects.Server.Package\NakedObjects.Server.Package.csproj --include-symbols --include-source
dotnet pack NakedFunctions\NakedFunctions.Server.Package\NakedFunctions.Server.Package.csproj --include-symbols --include-source

XCOPY ".\NakedObjects\NakedObjects.Server.Package\bin\Debug\*.nupkg"  %nugetPackagePath% /y
XCOPY ".\NakedFunctions\NakedFunctions.Server.Package\bin\Debug\*.nupkg"  %nugetPackagePath% /y

Update build.bat

Update build.bat


@SETLOCAL

@SET SRC=%~dp0\src
@SET ARTIFACTS=%~dp0\artifacts
@SET NUGET_COMMAND=%SRC%\.nuget\nuget.exe
@SET PACKAGE_VERSION=%appveyor_build_version%

IF "%PACKAGE_VERSION%"=="" (
	SET PACKAGE_VERSION=0.0.1
)

@SET NUGET_PACKAGE_ID=CategoryTraits.xUnit2
@SET SOLUTION=%SRC%\CategoryTraits.xUnit2.sln
@SET PROJECT_FOLDER=%SRC%\%NUGET_PACKAGE_ID%
@SET MSBUILDARGS=/target:Rebuild /fileLogger /verbosity:minimal /ToolsVersion:14.0
@SET NUGET_PACKAGE_FOLDER=%ARTIFACTS%\%NUGET_PACKAGE_ID%
@SET DOTNET_FRAMEWORK=portable-net45+win+wpa81+wp80
@SET NUGET_PORTABLE_FRAMEWORK_FOLDER=%NUGET_PACKAGE_FOLDER%\lib\%DOTNET_FRAMEWORK%

RMDIR /Q /S "%ARTIFACTS%"
%NUGET_COMMAND% restore "%SOLUTION%"  -Verbosity quiet ||  GOTO BuildFailed
MSBuild "%SOLUTION%" %MSBUILDARGS% ||  GOTO BuildFailed
MSBuild "%SOLUTION%" %MSBUILDARGS% /property:Configuration=Release ||  GOTO BuildFailed
MKDIR "%NUGET_PORTABLE_FRAMEWORK_FOLDER%" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\%NUGET_PACKAGE_ID%.??l" "%NUGET_PACKAGE_FOLDER%\lib\%DOTNET_FRAMEWORK%\" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\%NUGET_PACKAGE_ID%.nuspec" "%NUGET_PACKAGE_FOLDER%\" ||  GOTO BuildFailed
%NUGET_COMMAND% pack "%NUGET_PACKAGE_FOLDER%\%NUGET_PACKAGE_ID%.nuspec" -Version %PACKAGE_VERSION% -NonInteractive -OutputDirectory %ARTIFACTS% -Properties version=%PACKAGE_VERSION%||  GOTO BuildFailed

@ECHO.
@ECHO **** BUILD SUCCESSFUL ****
GOTO:EOF

:BuildFailed
@ECHO.
@ECHO *** BUILD FAILED ***
EXIT /B -1

@SETLOCAL

@SET SRC=%~dp0\src
@SET ARTIFACTS=%~dp0\artifacts
@SET NUGET_COMMAND=%SRC%\.nuget\nuget.exe
@SET PACKAGE_VERSION=%APPVEYOR_BUILD_VERSION%

IF "%PACKAGE_VERSION%"=="" (
	SET PACKAGE_VERSION=0.0.1
)

@SET NUGET_PACKAGE_ID=CategoryTraits.xUnit2
@SET SOLUTION=%SRC%\CategoryTraits.xUnit2.sln
@SET PROJECT_FOLDER=%SRC%\%NUGET_PACKAGE_ID%
@SET MSBUILDARGS=/target:Rebuild /fileLogger /verbosity:minimal /ToolsVersion:14.0
@SET NUGET_PACKAGE_FOLDER=%ARTIFACTS%\%NUGET_PACKAGE_ID%
@SET DOTNET_FRAMEWORK=portable-net45+win+wpa81+wp80
@SET NUGET_PORTABLE_FRAMEWORK_FOLDER=%NUGET_PACKAGE_FOLDER%\lib\%DOTNET_FRAMEWORK%

RMDIR /Q /S "%ARTIFACTS%"
%NUGET_COMMAND% restore "%SOLUTION%"  -Verbosity quiet ||  GOTO BuildFailed
MSBuild "%SOLUTION%" %MSBUILDARGS% ||  GOTO BuildFailed
MSBuild "%SOLUTION%" %MSBUILDARGS% /property:Configuration=Release ||  GOTO BuildFailed
MKDIR "%NUGET_PORTABLE_FRAMEWORK_FOLDER%" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\%NUGET_PACKAGE_ID%.??l" "%NUGET_PACKAGE_FOLDER%\lib\%DOTNET_FRAMEWORK%\" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\%NUGET_PACKAGE_ID%.nuspec" "%NUGET_PACKAGE_FOLDER%\" ||  GOTO BuildFailed
%NUGET_COMMAND% pack "%NUGET_PACKAGE_FOLDER%\%NUGET_PACKAGE_ID%.nuspec" -Version %PACKAGE_VERSION% -NonInteractive -OutputDirectory %ARTIFACTS% -Properties version=%PACKAGE_VERSION%||  GOTO BuildFailed

@ECHO.
@ECHO **** BUILD SUCCESSFUL ****
GOTO:EOF

:BuildFailed
@ECHO.
@ECHO *** BUILD FAILED ***
EXIT /B -1

Change environment variable case for clarity


dotnet tool install --global dotnet-sonarscanner
dotnet test GeneGenie.Gedcom.Tests\GeneGenie.Gedcom.Tests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput="%CD%\opencover.xml"
dotnet build-server shutdown
dotnet sonarscanner begin /k:"GeneGenie.Gedcom" /o:"thegenegenieproject" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login=%SonarQubeApiKey% /d:sonar.cs.opencover.reportsPaths="%CD%\opencover.xml"
dotnet build
dotnet sonarscanner end /d:sonar.login=%SonarQubeApiKey%

dotnet tool install --global dotnet-sonarscanner --version 4.10.0
dotnet test GeneGenie.Gedcom.Tests\GeneGenie.Gedcom.Tests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput="%CD%\opencover.xml"
dotnet build-server shutdown
dotnet sonarscanner begin /k:"GeneGenie.Gedcom" /o:"thegenegenieproject" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login=%SonarQubeApiKey% /d:sonar.cs.opencover.reportsPaths="%CD%\opencover.xml"
dotnet build
dotnet sonarscanner end /d:sonar.login=%SonarQubeApiKey%

Fix SonarQube scan on deploy.

Fix SonarQube scan on deploy.


mkdir %LIBRARY_INC%\cspice

cd %SRC_DIR%\src\cspice

call makeDynamicSpice.bat

copy "cspice.dll" %LIBRARY_LIB%

if errorlevel 1 exit 1

cd %SRC_DIR%

copy "include\\*.h" %LIBRARY_INC%\cspice

if errorlevel 1 exit 1

mkdir %LIBRARY_INC%\cspice

copy "makeDynamicSpice.bat" %SRC_DIR%\src\cspice

cd %SRC_DIR%\src\cspice

call makeDynamicSpice.bat

copy "cspice.dll" %LIBRARY_LIB%

if errorlevel 1 exit 1

cd %SRC_DIR%

copy "include\\*.h" %LIBRARY_INC%\cspice

if errorlevel 1 exit 1

Copy commands file to source directory

Copy commands file to source directory


%PYTHON% setup.py build
%PYTHON% -m pip install . --no-deps -vv

%PYTHON% setup.py build
%PYTHON% setup.py install --prefix=$PREFIX --single-version-externally-managed --

Update bld.bat

Update bld.bat


@echo off
rem build native ndll
cd native
haxelib run hxcpp Build.xml

rem build test exe
cd ..
cd steamwrap
haxe -cp .. Test.hx -main Test -cpp ..\temp\hx

cd ..
copy temp\hx\Test.exe ndll\Windows
copy native\lib\*.dll ndll\Windows

Test build script for Windows

Test build script for Windows


set EnableNuGetPackageRestore=true
set msbuild=%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild
%msbuild% /p:Configuration=Release /p:BuildPackage=True

set EnableNuGetPackageRestore=true
set msbuild="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild"
%msbuild% /p:Configuration=Release /p:BuildPackage=True

Fix build command

Fix build command


@echo off
rem Rime build script for msvc toolchain.
rem 2014-12-30  Chen Gong <chen.sst@gmail.com>

setlocal
set BACK=%CD%

if exist env.bat call env.bat

set OLD_PATH=%PATH%
if defined DEV_PATH set PATH=%OLD_PATH%;%DEV_PATH%
path
echo.

if not defined RIME_ROOT set RIME_ROOT=%CD%
echo RIME_ROOT=%RIME_ROOT%
echo.

echo BOOST_ROOT=%BOOST_ROOT%
echo.

set build=build
set build_boost=0
set build_thirdparty=0
set build_librime=0
set build_shared=ON
set build_test=OFF
set enable_logging=ON

if "%1" == "" set build_librime=1

:parse_cmdline_options
if "%1" == "" goto end_parsing_cmdline_options
if "%1" == "boost" set build_boost=1
if "%1" == "thirdparty" set build_thirdparty=1
if "%1" == "librime" set build_librime=1
if "%1" == "static" (
  set build=build-static
  set build_librime=1
  set build_shared=OFF
)
if "%1" == "shared" (
  set build=build
  set build_librime=1
  set build_shared=ON
)
if "%1" == "test" (
  set build_librime=1
  set build_test=ON
)
if "%1" == "nologging" (
  set build_librime=1
  set enable_logging=OFF
)
shift
goto parse_cmdline_options
:end_parsing_cmdline_options

rem set CURL=%RIME_ROOT%\thirdparty\bin\curl.exe
rem set DOWNLOAD="%CURL%" --remote-name-all

set LEVELDB_REPOSITORY=lotem/leveldb

if %build_boost% == 1 (
  cd %BOOST_ROOT%
  if not exist bjam.exe call bootstrap.bat
  if %ERRORLEVEL% NEQ 0 goto ERROR
  bjam toolset=msvc-12.0 variant=release link=static threading=multi runtime-link=static stage --with-date_time --with-filesystem --with-system --with-regex --with-signals --with-thread
  if %ERRORLEVEL% NEQ 0 goto ERROR
  rem bjam toolset=msvc-12.0 variant=release link=static threading=multi runtime-link=static address-model=64 --stagedir=stage_x64 stage --with-date_time --with-filesystem --with-system --with-regex --with-signals --with-thread
  rem if %ERRORLEVEL% NEQ 0 goto ERROR
)

if %build_thirdparty% == 1 (
  echo building glog.
  cd "%RIME_ROOT%"\thirdparty\src\glog
  msbuild.exe google-glog-vc12.sln /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  xcopy /S /I /Y src\windows\glog "%RIME_ROOT%"\thirdparty\include\glog\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\libglog.lib "%RIME_ROOT%"\thirdparty\lib\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\libglog.dll "%RIME_ROOT%"\thirdparty\bin\
  if %ERRORLEVEL% NEQ 0 goto ERROR

  echo building leveldb.
  cd "%RIME_ROOT%"\thirdparty\src\
  echo "checking out 'windows' branch from %LEVELDB_REPOSITORY%"
  git clone -b windows git@github.com:%LEVELDB_REPOSITORY%.git leveldb-windows
  if %ERRORLEVEL% NEQ 0 goto ERROR
  cd leveldb-windows
  echo BOOST_ROOT=%BOOST_ROOT%
  msbuild.exe leveldb.sln /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  xcopy /S /I /Y include\leveldb "%RIME_ROOT%"\thirdparty\include\leveldb\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\leveldb.lib "%RIME_ROOT%"\thirdparty\lib\
  if %ERRORLEVEL% NEQ 0 goto ERROR

  echo building yaml-cpp.
  cd "%RIME_ROOT%"\thirdparty\src\yaml-cpp
  if not exist build mkdir build
  cd build
  cmake -DMSVC_SHARED_RT=OFF ..
  if %ERRORLEVEL% NEQ 0 goto ERROR
  msbuild.exe YAML_CPP.sln /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  xcopy /S /I /Y ..\include\yaml-cpp "%RIME_ROOT%"\thirdparty\include\yaml-cpp\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\libyaml-cppmt.lib "%RIME_ROOT%"\thirdparty\lib\
  if %ERRORLEVEL% NEQ 0 goto ERROR

  echo building gtest.
  cd "%RIME_ROOT%"\thirdparty\src\gtest
  if not exist build mkdir build
  cd build
  cmake ..
  if %ERRORLEVEL% NEQ 0 goto ERROR
  msbuild.exe gtest.sln /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  xcopy /S /I /Y ..\include\gtest "%RIME_ROOT%"\thirdparty\include\gtest\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\gtest*.lib "%RIME_ROOT%"\thirdparty\lib\
  if %ERRORLEVEL% NEQ 0 goto ERROR

  echo building marisa.
  cd "%RIME_ROOT%"\thirdparty\src\marisa-trie\vs2013
  msbuild.exe vs2013.sln /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  xcopy /S /I /Y ..\lib\marisa "%RIME_ROOT%"\thirdparty\include\marisa\
  xcopy /Y ..\lib\marisa.h "%RIME_ROOT%"\thirdparty\include\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\libmarisa.lib "%RIME_ROOT%"\thirdparty\lib\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\marisa-*.exe "%RIME_ROOT%"\thirdparty\bin\
  if %ERRORLEVEL% NEQ 0 goto ERROR

  echo building opencc.
  cd "%RIME_ROOT%"\thirdparty\src\opencc
  if not exist build mkdir build
  cd build
  cmake .. -DCMAKE_INSTALL_PREFIX=""
  echo patching src\libopencc.vcxproj for static linking runtime.
  sed -i "s/MultiThreadedDLL/MultiThreaded/" src\libopencc.vcxproj
  sed -i "s/MultiThreadedDLL/MultiThreaded/" src\opencc.vcxproj
  sed -i "s/MultiThreadedDLL/MultiThreaded/" src\opencc_dict.vcxproj
  msbuild.exe opencc.sln /t:libopencc;opencc;opencc_dict /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  cd "%RIME_ROOT%"\thirdparty\include
  if not exist opencc mkdir opencc
  copy /Y "%RIME_ROOT%"\thirdparty\src\opencc\src\*.h* opencc\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  cd "%RIME_ROOT%"\thirdparty\lib
  copy /Y "%RIME_ROOT%"\thirdparty\src\opencc\build\src\Release\opencc.lib .
  if %ERRORLEVEL% NEQ 0 goto ERROR
  cd "%RIME_ROOT%"\thirdparty\bin
  copy /Y "%RIME_ROOT%"\thirdparty\src\opencc\build\src\Release\opencc.dll .
  copy /Y "%RIME_ROOT%"\thirdparty\src\opencc\build\src\Release\opencc.exe .
  copy /Y "%RIME_ROOT%"\thirdparty\src\opencc\build\src\Release\opencc_dict.exe .
  if %ERRORLEVEL% NEQ 0 goto ERROR
)

if %build_librime% == 0 goto EXIT

set CMAKE_GENERATOR="Visual Studio 12"

set BUILD_DIR=%RIME_ROOT%\%build%
if not exist %BUILD_DIR% mkdir %BUILD_DIR%

set RIME_CMAKE_FLAGS=-DBUILD_STATIC=ON -DBUILD_SHARED_LIBS=%build_shared% -DBUILD_TEST=%build_test% -DENABLE_LOGGING=%enable_logging% -DBOOST_USE_CXX11=ON

cd %BUILD_DIR%
echo cmake -G %CMAKE_GENERATOR% %RIME_CMAKE_FLAGS% %RIME_ROOT%
call cmake -G %CMAKE_GENERATOR% %RIME_CMAKE_FLAGS% %RIME_ROOT%
if %ERRORLEVEL% NEQ 0 goto ERROR

echo.
echo building librime.
if exist msbuild.log del msbuild.log
msbuild.exe rime.sln /p:Configuration=Release /fl
if %ERRORLEVEL% NEQ 0 goto ERROR

echo.
echo ready.
echo.
goto EXIT

:ERROR
echo.
echo error building la rime.
echo.

:EXIT
set PATH=%OLD_PATH%
cd %RIME_ROOT%
rem pause

@echo off
rem Rime build script for msvc toolchain.
rem 2014-12-30  Chen Gong <chen.sst@gmail.com>

setlocal
set BACK=%CD%

if exist env.bat call env.bat

set OLD_PATH=%PATH%
if defined DEV_PATH set PATH=%OLD_PATH%;%DEV_PATH%
path
echo.

if not defined RIME_ROOT set RIME_ROOT=%CD%
echo RIME_ROOT=%RIME_ROOT%
echo.

echo BOOST_ROOT=%BOOST_ROOT%
echo.

set build=build
set build_boost=0
set build_thirdparty=0
set build_librime=0
set build_shared=ON
set build_test=OFF
set enable_logging=ON

if "%1" == "" set build_librime=1

:parse_cmdline_options
if "%1" == "" goto end_parsing_cmdline_options
if "%1" == "boost" set build_boost=1
if "%1" == "thirdparty" set build_thirdparty=1
if "%1" == "librime" set build_librime=1
if "%1" == "static" (
  set build=build-static
  set build_librime=1
  set build_shared=OFF
)
if "%1" == "shared" (
  set build=build
  set build_librime=1
  set build_shared=ON
)
if "%1" == "test" (
  set build_librime=1
  set build_test=ON
)
if "%1" == "nologging" (
  set build_librime=1
  set enable_logging=OFF
)
shift
goto parse_cmdline_options
:end_parsing_cmdline_options

rem set CURL=%RIME_ROOT%\thirdparty\bin\curl.exe
rem set DOWNLOAD="%CURL%" --remote-name-all

set LEVELDB_REPOSITORY=lotem/leveldb

if %build_boost% == 1 (
  cd %BOOST_ROOT%
  if not exist bjam.exe call bootstrap.bat
  if %ERRORLEVEL% NEQ 0 goto ERROR
  bjam toolset=msvc-12.0 variant=release link=static threading=multi runtime-link=static stage --with-date_time --with-filesystem --with-system --with-regex --with-signals --with-thread
  if %ERRORLEVEL% NEQ 0 goto ERROR
  rem bjam toolset=msvc-12.0 variant=release link=static threading=multi runtime-link=static address-model=64 --stagedir=stage_x64 stage --with-date_time --with-filesystem --with-system --with-regex --with-signals --with-thread
  rem if %ERRORLEVEL% NEQ 0 goto ERROR
)

if %build_thirdparty% == 1 (
  echo building glog.
  cd "%RIME_ROOT%"\thirdparty\src\glog
  msbuild.exe google-glog-vc12.sln /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  xcopy /S /I /Y src\windows\glog "%RIME_ROOT%"\thirdparty\include\glog\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\libglog.lib "%RIME_ROOT%"\thirdparty\lib\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\libglog.dll "%RIME_ROOT%"\thirdparty\bin\
  if %ERRORLEVEL% NEQ 0 goto ERROR

  echo building leveldb.
  cd "%RIME_ROOT%"\thirdparty\src\
  echo "checking out 'windows' branch from %LEVELDB_REPOSITORY%"
  git clone -b windows git@github.com:%LEVELDB_REPOSITORY%.git leveldb-windows
  if %ERRORLEVEL% NEQ 0 goto ERROR
  cd leveldb-windows
  echo BOOST_ROOT=%BOOST_ROOT%
  msbuild.exe leveldb.sln /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  xcopy /S /I /Y include\leveldb "%RIME_ROOT%"\thirdparty\include\leveldb\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\leveldb.lib "%RIME_ROOT%"\thirdparty\lib\
  if %ERRORLEVEL% NEQ 0 goto ERROR

  echo building yaml-cpp.
  cd "%RIME_ROOT%"\thirdparty\src\yaml-cpp
  if not exist build mkdir build
  cd build
  cmake -DMSVC_SHARED_RT=OFF ..
  if %ERRORLEVEL% NEQ 0 goto ERROR
  msbuild.exe YAML_CPP.sln /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  xcopy /S /I /Y ..\include\yaml-cpp "%RIME_ROOT%"\thirdparty\include\yaml-cpp\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\libyaml-cppmt.lib "%RIME_ROOT%"\thirdparty\lib\
  if %ERRORLEVEL% NEQ 0 goto ERROR

  echo building gtest.
  cd "%RIME_ROOT%"\thirdparty\src\gtest
  if not exist build mkdir build
  cd build
  cmake ..
  if %ERRORLEVEL% NEQ 0 goto ERROR
  msbuild.exe gtest.sln /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  xcopy /S /I /Y ..\include\gtest "%RIME_ROOT%"\thirdparty\include\gtest\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\gtest*.lib "%RIME_ROOT%"\thirdparty\lib\
  if %ERRORLEVEL% NEQ 0 goto ERROR

  echo building marisa.
  cd "%RIME_ROOT%"\thirdparty\src\marisa-trie\vs2013
  msbuild.exe vs2013.sln /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  xcopy /S /I /Y ..\lib\marisa "%RIME_ROOT%"\thirdparty\include\marisa\
  xcopy /Y ..\lib\marisa.h "%RIME_ROOT%"\thirdparty\include\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\libmarisa.lib "%RIME_ROOT%"\thirdparty\lib\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y Release\marisa-*.exe "%RIME_ROOT%"\thirdparty\bin\
  if %ERRORLEVEL% NEQ 0 goto ERROR

  echo building opencc.
  cd "%RIME_ROOT%"\thirdparty\src\opencc
  if not exist build mkdir build
  cd build
  cmake .. -DCMAKE_INSTALL_PREFIX="" -DBUILD_SHARED_LIBS=OFF
  echo patching src\libopencc.vcxproj for static linking runtime.
  sed -i "s/MultiThreadedDLL/MultiThreaded/" src\libopencc.vcxproj
  sed -i "s/MultiThreadedDLL/MultiThreaded/" src\tools\opencc.vcxproj
  sed -i "s/MultiThreadedDLL/MultiThreaded/" src\tools\opencc_dict.vcxproj
  msbuild.exe opencc.sln /t:libopencc;opencc;opencc_dict /p:Configuration=Release
  if %ERRORLEVEL% NEQ 0 goto ERROR
  echo built. copying artifacts.
  cd ..
  if not exist "%RIME_ROOT%"\thirdparty\include\opencc mkdir "%RIME_ROOT%"\thirdparty\include\opencc
  copy /Y src\*.h* "%RIME_ROOT%"\thirdparty\include\opencc\
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y build\src\Release\opencc.lib "%RIME_ROOT%"\thirdparty\lib
  if %ERRORLEVEL% NEQ 0 goto ERROR
  copy /Y build\src\tools\Release\opencc.exe "%RIME_ROOT%"\thirdparty\bin
  copy /Y build\src\tools\Release\opencc_dict.exe "%RIME_ROOT%"\thirdparty\bin
  if %ERRORLEVEL% NEQ 0 goto ERROR
)

if %build_librime% == 0 goto EXIT

set CMAKE_GENERATOR="Visual Studio 12"

set BUILD_DIR=%RIME_ROOT%\%build%
if not exist %BUILD_DIR% mkdir %BUILD_DIR%

set RIME_CMAKE_FLAGS=-DBUILD_STATIC=ON -DBUILD_SHARED_LIBS=%build_shared% -DBUILD_TEST=%build_test% -DENABLE_LOGGING=%enable_logging% -DBOOST_USE_CXX11=ON

cd %BUILD_DIR%
echo cmake -G %CMAKE_GENERATOR% %RIME_CMAKE_FLAGS% %RIME_ROOT%
call cmake -G %CMAKE_GENERATOR% %RIME_CMAKE_FLAGS% %RIME_ROOT%
if %ERRORLEVEL% NEQ 0 goto ERROR

echo.
echo building librime.
if exist msbuild.log del msbuild.log
msbuild.exe rime.sln /p:Configuration=Release /fl
if %ERRORLEVEL% NEQ 0 goto ERROR

echo.
echo ready.
echo.
goto EXIT

:ERROR
echo.
echo error building la rime.
echo.

:EXIT
set PATH=%OLD_PATH%
cd %RIME_ROOT%
rem pause

Build opencc as static library.

Build opencc as static library.


@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

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://www.nuget.org/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
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_DNX_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
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 CACHED_NUGET=%LocalAppData%\NuGet\NuGet.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://www.nuget.org/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 -version 0.2 -o packages -ExcludeVersion

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 %*

Enable pinning build script

Enable pinning build script


@echo off
set zip="tools\7za.exe"
set nuget="tools\NuGet.exe"
set msbuildcmd="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsMSBuildCmd.bat"

if not exist %msbuildcmd% goto error
call %msbuildcmd%

:cleanup
if not exist build mkdir build
del /s /f /q build\*

if not exist build\bin mkdir build\bin
if not exist build\dist mkdir build\dist

:build
%nuget% restore
msbuild Kyrodan.HiDriveSdk.sln /p:Configuration=Release /t:Clean,Build /fl /flp:logfile=build\build.log
if %errorlevel% NEQ 0 goto error

:package
xcopy src\Kyrodan.HiDrive\bin\Release\*.* build\bin
rem del build\bin\*.pdb build\bin\*.xml
%zip% a -tzip build\dist\Kyrodan.HiDriveSDK.zip .\build\bin\*
%nuget% pack src\Kyrodan.HiDrive\Kyrodan.HiDrive.csproj -OutputDirectory build\dist

:final
goto end

:error
echo !
echo !
echo !
echo Fehler im Buildvorgang
echo !
echo !
echo !

:end
pause

@echo off
set zip="tools\7za.exe"
set nuget="tools\NuGet.exe"
set msbuildcmd="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsMSBuildCmd.bat"

if not exist %msbuildcmd% goto error
call %msbuildcmd%

:cleanup
if not exist build mkdir build
del /s /f /q build\*

if not exist build\bin mkdir build\bin
if not exist build\dist mkdir build\dist

:build
%nuget% restore
msbuild Kyrodan.HiDriveSdk.sln /p:Configuration=Release /t:Clean,Build /fl /flp:logfile=build\build.log
if %errorlevel% NEQ 0 goto error

:package
xcopy src\Kyrodan.HiDrive\bin\Release\*.* build\bin
rem del build\bin\*.pdb build\bin\*.xml
%zip% a -tzip build\dist\Kyrodan.HiDriveSDK.zip .\build\bin\*
%nuget% pack src\Kyrodan.HiDrive\Kyrodan.HiDrive.csproj -Properties "Configuration=Release;Platform=AnyCPU" -OutputDirectory build\dist

:final
goto end

:error
echo !
echo !
echo !
echo Fehler im Buildvorgang
echo !
echo !
echo !

:end
pause

Update build.cmd

Update build.cmd


@echo off
setlocal
title Es.Serializer Build
echo.
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+       Es.Serializer Build
echo "+
echo "+           v.la@Live.cn
echo "+
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++"
:menu
echo.
echo [1]   Build Lib
echo [2]   Build Nuget
echo [h]   psake help
echo [0]   Exit
echo.
@echo Please select?
@echo Enter the above option to enter
@echo off

set /p menu=

if %menu% == 0 goto exit
if %menu% == 1 goto 1
if %menu% == 2 goto 2
if %menu% == h goto help
goto :eof

:1
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0tools\psake\psake.ps1' build.ps1 %*; if ($psake.build_success -eq $false) { exit 1 } else { exit 0 }"
echo.
echo Build ok!
echo.
goto menu

:2
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0tools\psake\psake.ps1' build-nuget.ps1 %*; if ($psake.build_success -eq $false) { exit 1 } else { exit 0 }"

call nuget-push.cmd

echo.
echo Build ok!
echo.
goto menu

:help
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0tools\psake\psake.ps1' -help"
goto menu

:exit
goto :eof

@echo off
setlocal
title Es.Serializer Build
echo.
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+       Es.Serializer Build
echo "+
echo "+           v.la@Live.cn
echo "+
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++"
:menu
echo.
echo [1]   Build Lib
echo [2]   Build Nuget
echo [h]   psake help
echo [0]   Exit
echo.
@echo Please select?
@echo Enter the above option to enter
@echo off

set /p menu=

if %menu% == 0 goto exit
if %menu% == 1 goto 1
if %menu% == 2 goto 2
if %menu% == h goto help
goto :eof

:1
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0tools\psake\psake.ps1' build.ps1 %*; if ($psake.build_success -eq $false) { exit 1 } else { exit 0 }"
echo.
echo Build ok!
echo.
set menu=
goto menu

:2
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0tools\psake\psake.ps1' build-nuget.ps1 %*; if ($psake.build_success -eq $false) { exit 1 } else { exit 0 }"

call nuget-push.cmd

echo.
echo Build ok!
echo.
set menu=
goto menu

:help
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0tools\psake\psake.ps1' -help"
goto menu

:exit
goto :eof

fix build

fix build


set app_title=WhackEd4
set app_description=A Windows Dehacked editor.

set app_name=WhackEd4
set app_name_lower=whacked4

set app_version=0.9.0-beta
set app_version_value=0.9.0
set app_version_title=0.9.0 beta

set build_path=".\build\exe.win32-2.7"

set python_interpreter="c:\python27\python.exe"
set setup_compiler="C:\Program Files (x86)\Inno Setup 5\ISCC.exe"
set zip=7zr

rmdir .\build /S /Q
%python_interpreter% setup.py build

del %app_name_lower%-setup-*.exe
%setup_compiler% %app_name_lower%.iss

del %app_name_lower%-*.7z
%zip% a %app_name_lower%-%app_version%.7z %build_path%\*.* -r -mx=9 -ms=on

pause

set app_title=WhackEd4
set app_description=A Windows Dehacked editor.

set app_name=WhackEd4
set app_name_lower=whacked4

set app_version=0.9.0-beta
set app_version_value=0.9.0
set app_version_title=0.9.0 beta

set build_path=".\build\exe.win32-2.7"

set python_interpreter="c:\python27\python.exe"
set setup_compiler="C:\Program Files (x86)\Inno Setup 5\ISCC.exe"
set zip=7zr

rmdir .\build /S /Q
%python_interpreter% setup.py build

del %app_name_lower%-setup-*.exe
%setup_compiler% %app_name_lower%.iss

del %app_name_lower%-*.7z
%zip% a %app_name_lower%-%app_version%.7z %build_path%\* -r -mx=9 -ms=on

pause

Fix the license file not being included in the 7zip build.


rem @echo off

mkdir Tools
powershell -Command "if ((Test-Path '.\Tools\NuGet.exe') -eq $false) {(New-Object System.Net.WebClient).DownloadFile('http://nuget.org/nuget.exe', '.\Tools\NuGet.exe')}"

".\Tools\NuGet.exe" "install" "FAKE.Core" "-OutputDirectory" "Tools" "-ExcludeVersion" "-version" "3.30.3"
".\Tools\NuGet.exe" "install" "NUnit.Runners" "-OutputDirectory" "Tools" "-ExcludeVersion" "-version" "2.6.4"
".\Tools\NuGet.exe" "install" "ilmerge" "-OutputDirectory" "Tools" "-ExcludeVersion" "-version" "2.14.1208"

".\Tools\NuGet.exe" restore .\EventFlow.sln

"Tools\FAKE.Core\tools\Fake.exe" "build.fsx" "nugetApikey=%NUGET_APIKEY%" "buildVersion=%APPVEYOR_BUILD_VERSION%"

exit /b %errorlevel%

rem @echo off

mkdir Tools
powershell -Command "if ((Test-Path '.\Tools\NuGet.exe') -eq $false) {(New-Object System.Net.WebClient).DownloadFile('http://nuget.org/nuget.exe', '.\Tools\NuGet.exe')}"

".\Tools\NuGet.exe" "install" "FAKE.Core" "-OutputDirectory" "Tools" "-ExcludeVersion" "-version" "4.1.3"
".\Tools\NuGet.exe" "install" "NUnit.Runners" "-OutputDirectory" "Tools" "-ExcludeVersion" "-version" "2.6.4"
".\Tools\NuGet.exe" "install" "ilmerge" "-OutputDirectory" "Tools" "-ExcludeVersion" "-version" "2.14.1208"

".\Tools\NuGet.exe" restore .\EventFlow.sln

"Tools\FAKE.Core\tools\Fake.exe" "build.fsx" "nugetApikey=%NUGET_APIKEY%" "buildVersion=%APPVEYOR_BUILD_VERSION%"

exit /b %errorlevel%

Upgrade FAKE to v4.1.3

Upgrade FAKE to v4.1.3


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

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

if "%config%" == "Release" (
	nuget pack .\src\Stripe.csproj -Build -Symbols -Properties Configuration=Release
)

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

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

if "%config%" == "Release" (
	.nuget\nuget pack .\src\Stripe.csproj -Build -Symbols -Properties Configuration=Release
)

Change to build.cmd to use relative nuget path


rem This file is here to run python-codacy-coverage
rem whilst also catching errors, which sometimes
rem occur and should be ignored
python-codacy-coverage -r coverage.xml
exit 0

Add comment explaining the upload-codacy-coverage.bat is for


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

rem Remove build cache and executable files before starting build.
rmdir /q /s build
del dist\nvpy.exe
del dist\nvpy-debug.exe

rem When you generate windows binary, you need the certifi package.
rem See workaround code on nvpy.py for details.
pip install --upgrade certifi

rem Install dependencies.
rem When build nvpy on the clean environment, this process is required.
pip install --upgrade Markdown docutils simplenote

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 3.7
rem   PyInstaller
rem
rem Output:
rem   dist\nvpy.exe
rem   dist\nvpy-debug.exe

rem Remove build cache and executable files before starting build.
rmdir /q /s build
del dist\nvpy.exe
del dist\nvpy-debug.exe

rem When you generate windows binary, you need the certifi package.
rem See workaround code on nvpy.py for details.
pip install --upgrade certifi

rem Install dependencies.
rem When build nvpy on the clean environment, this process is required.
pip install --upgrade Markdown docutils simplenote

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 requirements for windows binary generator


@echo off
setlocal

if "%DDKINSTALLROOT%"=="" set DDKINSTALLROOT=C:\WINDDK\
if "%DDKVER%"=="" set DDKVER=7600.16385.1

if "%_BUILD_MAJOR_VERSION_%"=="" set _BUILD_MAJOR_VERSION_=101
if "%_BUILD_MINOR_VERSION_%"=="" set _BUILD_MINOR_VERSION_=58000
if "%_RHEL_RELEASE_VERSION_%"=="" set _RHEL_RELEASE_VERSION_=61

if /i "%1"=="prepare" goto %1
call :%1_%2
goto :eof

:Win7_x86
call :BuildProject "Win7 Release|x86" buildfre_win7_x86.log
goto :eof

:Win7_x64
call :BuildProject "Win7 Release|x64" buildfre_win7_amd64.log
goto :eof

:Win8_x86
call :BuildProject "Win8 Release|x86" buildfre_win8_x86.log
goto :eof

:Win8_x64
call :BuildProject "Win8 Release|x64" buildfre_win8_amd64.log
goto :eof

:Win10_x86
call :BuildProject "Win10 Release|x86" buildfre_win10_x86.log
goto :eof

:Win10_x64
call :BuildProject "Win10 Release|x64" buildfre_win10_amd64.log
goto :eof

:Wlh_x86
call :BuildProject "Vista Release|x86" buildfre_wlh_x86.log
goto :eof

:Wlh_x64
call :BuildProject "Vista Release|x64" buildfre_wlh_amd64.log
goto :eof

:Wnet_x86
call :BuildProject "Win2k3 Release|x86" buildfre_wnet_x86.log
goto :eof

:Wnet_x64
call :BuildProject "Win2k3 Release|x64" buildfre_wnet_amd64.log
goto :eof

:WXp_x86
call :BuildProject "WinXP Release|x86" buildfre_wxp_x86.log
goto :eof

:BuildProject
setlocal
if "%_NT_TARGET_VERSION%"=="" set _NT_TARGET_VERSION=0x603
if "%_BUILD_MAJOR_VERSION_%"=="" set _BUILD_MAJOR_VERSION_=105
if "%_BUILD_MINOR_VERSION_%"=="" set _BUILD_MINOR_VERSION_=109000
if "%_RHEL_RELEASE_VERSION_%"=="" set _RHEL_RELEASE_VERSION_=72

set _MAJORVERSION_=%_BUILD_MAJOR_VERSION_%
set _MINORVERSION_=%_BUILD_MINOR_VERSION_%
set /a _NT_TARGET_MAJ="(%_NT_TARGET_VERSION% >> 8) * 10 + (%_NT_TARGET_VERSION% & 255)"
set _NT_TARGET_MIN=%_RHEL_RELEASE_VERSION_%
set STAMPINF_VERSION=%_NT_TARGET_MAJ%.%_RHEL_RELEASE_VERSION_%.%_BUILD_MAJOR_VERSION_%.%_BUILD_MINOR_VERSION_%
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
call ..\..\tools\callVisualStudio.bat 14 vioser.vcxproj /Rebuild "%~1" /Out %2
endlocal
goto :eof

:prepare_version
set /a _NT_TARGET_MAJ="(%_NT_TARGET_VERSION% >> 8) * 10 + (%_NT_TARGET_VERSION% & 255)"
goto :eof

:create2012H
echo #ifndef __DATE__
echo #define __DATE__ "%DATE%"
echo #endif
echo #ifndef __TIME__
echo #define __TIME__ "%TIME%"
echo #endif
echo #define _NT_TARGET_MAJ %_NT_TARGET_MAJ%
echo #define _NT_TARGET_MIN %_RHEL_RELEASE_VERSION_%
echo #define _MAJORVERSION_ %_BUILD_MAJOR_VERSION_%
echo #define _MINORVERSION_ %_BUILD_MINOR_VERSION_%
goto :eof

:prepare
set _NT_TARGET_VERSION=0x0602
call :prepare_version
call :create2012H  > 2012-defines.h
goto :eof

@echo off
setlocal

if "%DDKINSTALLROOT%"=="" set DDKINSTALLROOT=C:\WINDDK\
if "%DDKVER%"=="" set DDKVER=7600.16385.1

if "%_BUILD_MAJOR_VERSION_%"=="" set _BUILD_MAJOR_VERSION_=101
if "%_BUILD_MINOR_VERSION_%"=="" set _BUILD_MINOR_VERSION_=58000
if "%_RHEL_RELEASE_VERSION_%"=="" set _RHEL_RELEASE_VERSION_=61

if /i "%1"=="prepare" goto %1
call :%1_%2
goto :eof

:Win7_x86
call :BuildProject "Win7 Release|x86" 0x601 buildfre_win7_x86.log
goto :eof

:Win7_x64
call :BuildProject "Win7 Release|x64" 0x601 buildfre_win7_amd64.log
goto :eof

:Win8_x86
call :BuildProject "Win8 Release|x86" 0x602 buildfre_win8_x86.log
goto :eof

:Win8_x64
call :BuildProject "Win8 Release|x64" 0x602 buildfre_win8_amd64.log
goto :eof

:Win10_x86
call :BuildProject "Win10 Release|x86" 0xA00 buildfre_win10_x86.log
goto :eof

:Win10_x64
call :BuildProject "Win10 Release|x64" 0xA00 buildfre_win10_amd64.log
goto :eof

:Wlh_x86
call :BuildProject "Vista Release|x86" 0x600 buildfre_wlh_x86.log
goto :eof

:Wlh_x64
call :BuildProject "Vista Release|x64" 0x600 buildfre_wlh_amd64.log
goto :eof

:Wnet_x86
call :BuildProject "Win2k3 Release|x86" 0x502 buildfre_wnet_x86.log
goto :eof

:Wnet_x64
call :BuildProject "Win2k3 Release|x64" 0x502 buildfre_wnet_amd64.log
goto :eof

:WXp_x86
call :BuildProject "WinXP Release|x86" 0x501 buildfre_wxp_x86.log
goto :eof

:BuildProject
setlocal
if "%_NT_TARGET_VERSION%"=="" set _NT_TARGET_VERSION=%2
if "%_BUILD_MAJOR_VERSION_%"=="" set _BUILD_MAJOR_VERSION_=105
if "%_BUILD_MINOR_VERSION_%"=="" set _BUILD_MINOR_VERSION_=109000
if "%_RHEL_RELEASE_VERSION_%"=="" set _RHEL_RELEASE_VERSION_=72

set _MAJORVERSION_=%_BUILD_MAJOR_VERSION_%
set _MINORVERSION_=%_BUILD_MINOR_VERSION_%
set /a _NT_TARGET_MAJ="(%_NT_TARGET_VERSION% >> 8) * 10 + (%_NT_TARGET_VERSION% & 255)"
set _NT_TARGET_MIN=%_RHEL_RELEASE_VERSION_%
set STAMPINF_VERSION=%_NT_TARGET_MAJ%.%_RHEL_RELEASE_VERSION_%.%_BUILD_MAJOR_VERSION_%.%_BUILD_MINOR_VERSION_%
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
call ..\..\tools\callVisualStudio.bat 14 vioser.vcxproj /Rebuild "%~1" /Out %3
endlocal
goto :eof

:prepare_version
set /a _NT_TARGET_MAJ="(%_NT_TARGET_VERSION% >> 8) * 10 + (%_NT_TARGET_VERSION% & 255)"
goto :eof

:create2012H
echo #ifndef __DATE__
echo #define __DATE__ "%DATE%"
echo #endif
echo #ifndef __TIME__
echo #define __TIME__ "%TIME%"
echo #endif
echo #define _NT_TARGET_MAJ %_NT_TARGET_MAJ%
echo #define _NT_TARGET_MIN %_RHEL_RELEASE_VERSION_%
echo #define _MAJORVERSION_ %_BUILD_MAJOR_VERSION_%
echo #define _MINORVERSION_ %_BUILD_MINOR_VERSION_%
goto :eof

:prepare
call :prepare_version
call :create2012H  > 2012-defines.h
goto :eof

Fix driver versioning

vioserial: Fix driver versioning

We used to build only the Win8 driver with Visual Studio so the
hardcoded _NT_TARGET_VERSION=0x0602 in buildOne.bat worked fine.
Now that all drivers are build with VS, the variable needs to be
set based on the particular target.


echo off
rem
rem Copyright (C) 2004,2005  Internet Systems Consortium, Inc. ("ISC")
rem Copyright (C) 2001-2002  Internet Software Consortium.
rem
rem Permission to use, copy, modify, and distribute this software for any
rem purpose with or without fee is hereby granted, provided that the above
rem copyright notice and this permission notice appear in all copies.
rem
rem THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
rem REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
rem AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
rem INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
rem LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
rem OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
rem PERFORMANCE OF THIS SOFTWARE.

rem BuildSetup.bat
rem This script sets up the files necessary ready to build BIND 9.
rem This requires perl to be installed on the system.

rem Set up the configuration file
cd ..
copy config.h.win32 config.h
cd win32utils

rem Generate the version information
perl makeversion.pl

rem Generate header files for lib/dns

call dnsheadergen.bat

echo Ensure that the OpenSSL sources are at the same level in
echo the directory tree and is named openssl-0.9.8d or libdns
echo will not build.

rem Make sure that the Build directories are there.

if NOT Exist ..\Build mkdir ..\Build
if NOT Exist ..\Build\Release mkdir ..\Build\Release
if NOT Exist ..\Build\Debug mkdir ..\Build\Debug

echo Copying the ARM and the Installation Notes.

copy ..\COPYRIGHT ..\Build\Release
copy ..\README ..\Build\Release
copy readme1st.txt ..\Build\Release
copy index.html ..\Build\Release
copy ..\doc\arm\*.html ..\Build\Release
copy ..\doc\arm\Bv9ARM.pdf ..\Build\Release
copy ..\CHANGES ..\Build\Release
copy ..\FAQ ..\Build\Release

echo Copying the OpenSSL DLL.

copy ..\..\openssl-0.9.8d\out32dll\libeay32.dll ..\Build\Release\
copy ..\..\openssl-0.9.8d\out32dll\libeay32.dll ..\Build\Debug\

rem Done

echo off
rem
rem Copyright (C) 2004,2005  Internet Systems Consortium, Inc. ("ISC")
rem Copyright (C) 2001-2002  Internet Software Consortium.
rem
rem Permission to use, copy, modify, and distribute this software for any
rem purpose with or without fee is hereby granted, provided that the above
rem copyright notice and this permission notice appear in all copies.
rem
rem THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
rem REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
rem AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
rem INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
rem LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
rem OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
rem PERFORMANCE OF THIS SOFTWARE.

rem BuildSetup.bat
rem This script sets up the files necessary ready to build BIND 9.
rem This requires perl to be installed on the system.

rem Set up the configuration file
cd ..
copy config.h.win32 config.h
cd win32utils

rem Generate the version information
perl makeversion.pl

rem Generate header files for lib/dns

call dnsheadergen.bat

echo Ensure that the OpenSSL sources are at the same level in
echo the directory tree and is named openssl-0.9.8d or libdns
echo will not build.

rem Make sure that the Build directories are there.

if NOT Exist ..\Build mkdir ..\Build
if NOT Exist ..\Build\Release mkdir ..\Build\Release
if NOT Exist ..\Build\Debug mkdir ..\Build\Debug

echo Copying the ARM and the Installation Notes.

copy ..\COPYRIGHT ..\Build\Release
copy ..\README ..\Build\Release
copy readme1st.txt ..\Build\Release
copy index.html ..\Build\Release
copy ..\doc\arm\*.html ..\Build\Release
copy ..\doc\arm\Bv9ARM.pdf ..\Build\Release
copy ..\CHANGES ..\Build\Release
copy ..\FAQ ..\Build\Release

echo Copying the OpenSSL DLL.

copy ..\..\openssl-0.9.8d\out32dll\libeay32.dll ..\Build\Release\
copy ..\..\openssl-0.9.8d\out32dll\libeay32.dll ..\Build\Debug\

if Defined FrameworkSDKDir (

rem
rem vcredist_x86.exe path relative to FrameworkSDKDir
rem

set vcredist=BootStrapper\Packages\vcredist_x86\vcredist_x86.exe

if Exist "%FrameworkSDKDir%\%vcredist%" (

echo Copying Visual C x86 Redistributable Installer

rem
rem Use /Y so we allways have the current version of the installer.
rem

copy /Y "%FrameworkSDKDir%\%vcredist%" ..\Build\Release\
copy /Y "%FrameworkSDKDir%\%vcredist%" ..\Build\Debug\

) else (
	echo "**** %FrameworkSDKDir%\%vcredist% not found ****"
)
) else (
	echo "**** Warning FrameworkSDKDir not defined ****"
	echo "****         Run vsvars32.bat            ****"
)

rem Done

copy vcredist_x86.exe to the release/debug directories


@echo off
SET GENERATOR="Visual Studio 15 2017"
SET GENERATOR64="Visual Studio 15 2017 Win64"

cd ../foreign/

cd SPIRV-Tools

mkdir build
cd build
cmake -G%GENERATOR% -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers ..
cmake --build .
cmake --build . --config Release
cd ..

mkdir build64
cd build64
cmake -G%GENERATOR64% -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers ..
cmake --build .
cmake --build . --config Release
cd ..

cd ..

cd SPIRV-Cross

mkdir build
cd build
cmake -G%GENERATOR% ..
cmake --build .
cmake --build . --config Release
cd ..

mkdir build64
cd build64
cmake -G%GENERATOR64% ..
cmake --build .
cmake --build . --config Release
cd ..

cd ..

cd ../windows

@echo off
SET GENERATOR="Visual Studio 16 2019"

cd ../foreign/

cd SPIRV-Tools

mkdir build
cd build
cmake -G%GENERATOR% -A Win32 -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers ..
cmake --build .
cmake --build . --config Release
cd ..

mkdir build64
cd build64
cmake -G%GENERATOR% -A x64 -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers ..
cmake --build .
cmake --build . --config Release
cd ..

cd ..

cd SPIRV-Cross

mkdir build
cd build
cmake -G%GENERATOR%  -A Win32 ..
cmake --build .
cmake --build . --config Release
cd ..

mkdir build64
cd build64
cmake -G%GENERATOR% -A x64 ..
cmake --build .
cmake --build . --config Release
cd ..

cd ..

cd ../windows

Update windows build bat for new CMake / Visual Studio


set local
set BUILD=%1
set "var1=%BUILD:*_=%"
echo var1 = %var1%

set BUILD=%1
if "%BUILD:~-7%" == "_vmware" (
  set template=%BUILD:~0,-7%
  set builder=vmware-iso
  set spec=vmware
)
if "%BUILD:~-7%" == "_vcloud" (
  set template=%BUILD:~0,-7%
  set builder=vmware-iso
  set spec=vcloud
)
if "%BUILD:~-11%" == "_virtualbox" (
  set template=%BUILD:~0,-11%
  set builder=virtualbox-iso
  set spec=virtualbox
)

if "%spec%x"=="x" (
  echo Wrong build parameter!
  goto :EOF
)

echo template = %template%
echo builder = %builder%
echo spec = %spec%

if exist output-%builder% (
  rmdir /S /Q output-%builder%
)
packer build --only=%builder% %template%_%spec%.json
if ERRORLEVEL 1 goto :EOF

if exist %~dp0\test-box-%spec%.bat (
  call %~dp0\test-box-%spec%.bat %template%_%spec%.box %template%
)

set local
set BUILD=%1
set "var1=%BUILD:*_=%"
echo var1 = %var1%

set BUILD=%1
if "%BUILD:~-7%" == "_vmware" (
  set template=%BUILD:~0,-7%
  set builder=vmware-iso
  set spec=vmware
)
if "%BUILD:~-7%" == "_vcloud" (
  set template=%BUILD:~0,-7%
  set builder=vmware-iso
  set spec=vcloud
)
if "%BUILD:~-11%" == "_virtualbox" (
  set template=%BUILD:~0,-11%
  set builder=virtualbox-iso
  set spec=virtualbox
)

if "%spec%x"=="x" (
  echo Wrong build parameter!
  goto :EOF
)

echo template = %template%
echo builder = %builder%
echo spec = %spec%

if exist output-%builder% (
  rmdir /S /Q output-%builder%
)
if exist "C:\Windows\system32\config\systemprofile\VirtualBox VMs\packer-%builder%" (
  rmdir /S /Q "C:\Windows\system32\config\systemprofile\VirtualBox VMs\packer-%builder%"
)
if exist "C:\Windows\system32\config\systemprofile\VirtualBox VMs\%template%" (
  rmdir /S /Q "C:\Windows\system32\config\systemprofile\VirtualBox VMs\%template%"
)

packer build --only=%builder% %template%_%spec%.json
if ERRORLEVEL 1 goto :EOF

if exist %~dp0\test-box-%spec%.bat (
  call %~dp0\test-box-%spec%.bat %template%_%spec%.box %template%
)

remove some virtual box dirs before jenkins build


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

set ZOOCFGDIR=%~dp0%..\conf
set ZOO_LOG_DIR=%~dp0%..
set ZOO_LOG4J_PROP=INFO,CONSOLE

REM for sanity sake assume Java 1.6
REM see: http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html

REM add the zoocfg dir to classpath
set CLASSPATH=%ZOOCFGDIR%

REM make it work in the release
SET CLASSPATH=%~dp0..\*;%~dp0..\lib\*;%CLASSPATH%

REM make it work for developers
SET CLASSPATH=%~dp0..\build\classes;%~dp0..\build\lib\*;%CLASSPATH%

set ZOOCFG=%ZOOCFGDIR%\zoo.cfg

@REM setup java environment variables

if not defined JAVA_HOME (
  echo Error: JAVA_HOME is not set.
  goto :eof
)

if not exist %JAVA_HOME%\bin\java.exe (
  echo Error: JAVA_HOME is incorrectly set.
  goto :eof
)

set JAVA=%JAVA_HOME%\bin\java

Set svn:eol-style property to 'native'.

zkEnv.cmd: Set svn:eol-style property to 'native'.

git-svn-id: d7c778eb01848c8314be709a01eafe85ba01f120@1586200 13f79535-47bb-0310-9956-ffa450edef68


electron-packager .\ Squiffy --platform=win32 --arch=ia32 --version=0.27.3 --app-bundle-id=uk.co.textadventures.squiffy --icon=squiffy.ico --app-version=3.9.0 --ignore=Output --version-string.ProductName=Squiffy --version-string.FileDescription=Squiffy --version-string.LegalCopyright="Copyright (c) 2015 Alex Warren" --version-string.OriginalFilename=Squiffy.exe --version-string.FileVersion=3.9.0 --version-string.ProductVersion=3.9.0 --version-string.InternalName=Squiffy --version-string.CompanyName="Alex Warren"

Set Windows resource version info

Set Windows resource version info


@echo off
dotnet restore
NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive

@echo off
NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive

build fixes

build fixes


SET SCRIPTPATH=%~dp0
CD /D %~dp0

SET PATH=%SCRIPTPATH%depot_tools;%SCRIPTPATH%depot_tools\python276_bin;%PATH%
SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
SET GYP_MSVS_VERSION=2013

echo "building x86... -------------------------------------------"

if exist "win_32" (
	RMDIR "win_32" /S /Q
)
md win_32
md win_32\debug
md win_32\release

python v8\build\gyp_v8
call .\change_projects.bat

cd "%SCRIPTPATH%v8\tools\gyp"
if defined ProgramFiles(x86) (
	call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Release"
	call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Debug"
) else (
	call "C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Release"
	call "C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Debug"
)
cd "%SCRIPTPATH%"

XCOPY /Y "v8\build\Release\lib\*" "win_32\release\"
XCOPY /Y "v8\build\Release\icudt.dll" "win_32\release\"

XCOPY /Y "v8\build\Debug\lib\*" "win_32\debug\"
XCOPY /Y "v8\build\Debug\icudt.dll" "win_32\debug\"

echo "building x64... -------------------------------------------"

if exist "win_64" (
	RMDIR "win_64" /S /Q
)
md win_64
md win_64\debug
md win_64\release

call python v8\build\gyp_v8 -Dtarget_arch=x64
call .\change_projects.bat

cd "%SCRIPTPATH%v8\tools\gyp"
if defined ProgramFiles(x86) (
	call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Release"
	call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Debug"
) else (
	call "C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Release"
	call "C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Debug"
)
cd "%SCRIPTPATH%"

XCOPY /Y "v8\build\Release\lib\*" "win_64\release\"
XCOPY /Y "v8\build\Release\icudt.dll" "win_64\release\"

XCOPY /Y "v8\build\Debug\lib\*" "win_64\debug\"
XCOPY /Y "v8\build\Debug\icudt.dll" "win_64\debug\"

SET SCRIPTPATH=%~dp0
CD /D %~dp0

SET PATH=%SCRIPTPATH%depot_tools;%SCRIPTPATH%depot_tools\python276_bin;%PATH%
SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
SET GYP_MSVS_VERSION=2013

echo "building x86... -------------------------------------------"

if exist "win_32" (
	RMDIR "win_32" /S /Q
)
md win_32
md win_32\debug
md win_32\release

call python v8\build\gyp_v8
call .\change_projects.bat

cd "%SCRIPTPATH%v8\tools\gyp"
if defined ProgramFiles(x86) (
	call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Release"
	call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Debug"
) else (
	call "C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Release"
	call "C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Debug"
)
cd "%SCRIPTPATH%"

XCOPY /Y "v8\build\Release\lib\*" "win_32\release\"
XCOPY /Y "v8\build\Release\icudt.dll" "win_32\release\"

XCOPY /Y "v8\build\Debug\lib\*" "win_32\debug\"
XCOPY /Y "v8\build\Debug\icudt.dll" "win_32\debug\"

echo "building x64... -------------------------------------------"

if exist "win_64" (
	RMDIR "win_64" /S /Q
)
md win_64
md win_64\debug
md win_64\release

call python v8\build\gyp_v8 -Dtarget_arch=x64
call .\change_projects.bat

cd "%SCRIPTPATH%v8\tools\gyp"
if defined ProgramFiles(x86) (
	call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Release"
	call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Debug"
) else (
	call "C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Release"
	call "C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" v8.sln /Rebuild "Debug"
)
cd "%SCRIPTPATH%"

XCOPY /Y "v8\build\Release\lib\*" "win_64\release\"
XCOPY /Y "v8\build\Release\icudt.dll" "win_64\release\"

XCOPY /Y "v8\build\Debug\lib\*" "win_64\debug\"
XCOPY /Y "v8\build\Debug\icudt.dll" "win_64\debug\"

Update build.bat

Update build.bat


@ECHO OFF

REM Command file for Sphinx documentation

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

if "%1" == "" goto help

if "%1" == "help" (
	:help
	echo.Please use `make ^<target^>` where ^<target^> is one of
	echo.  html       to make standalone HTML files
	echo.  dirhtml    to make HTML files named index.html in directories
	echo.  singlehtml to make a single large HTML file
	echo.  pickle     to make pickle files
	echo.  json       to make JSON files
	echo.  htmlhelp   to make HTML files and a HTML help project
	echo.  qthelp     to make HTML files and a qthelp project
	echo.  devhelp    to make HTML files and a Devhelp project
	echo.  epub       to make an epub
	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
	echo.  text       to make text files
	echo.  man        to make manual pages
	echo.  texinfo    to make Texinfo files
	echo.  gettext    to make PO message catalogs
	echo.  changes    to make an overview over all changed/added/deprecated items
	echo.  xml        to make Docutils-native XML files
	echo.  pseudoxml  to make pseudoxml-XML files for display purposes
	echo.  linkcheck  to check all external links for integrity
	echo.  doctest    to run all doctests embedded in the documentation if enabled
	echo.  coverage   to run coverage check of the documentation if enabled
	goto end
)

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

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

:sphinx_python

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

:sphinx_ok

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

:end

Create make.bat

Create make.bat


choco push bin\StructuredLogViewer\Release\net472\msbuild-structured-log-viewer.*.nupkg --source https://push.chocolatey.org

Add chocopush.cmd.

Add chocopush.cmd.


del export.ter
<<<<<<< HEAD
"c:\program files\7-zip\7z.exe" a -tzip export.ter * -x!export.bat -x!README.md
"C:\program files (x86)\Android\android-sdk\platform-tools\adb" push export.ter /sdcard/
=======
"c:\program files\7-zip\7z.exe" a -tzip export.ter * -x!export.bat -x!README.md -x!schema.json
>>>>>>> 94261f2b13bb4b98e7ab99d53368698ac8a1d06e

del export.ter
"c:\program files\7-zip\7z.exe" a -tzip export.ter * -x!export.bat -x!README.md -x!schema.json
"C:\program files (x86)\Android\android-sdk\platform-tools\adb" push export.ter /sdcard/

Update export.bat

Update export.bat


@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


mongo -u heroku_app5225264 -p fvntl669qus7nbda1c6e8s21u9 dbh16.mongolab.com:27167/heroku_app5225264

add shell call to staging db

add shell call to staging db


@echo off
if not [%1]==[] goto run
echo.
echo Usage: process ^<configuration directory^> ^[process name^]
echo.
echo      configuration directory -- directory that contains configuration files,
echo          i.e. config.properties, process-conf.xml, database-conf.xml
echo.
echo      process name -- optional name of a batch process bean in process-conf.xml,
echo          for example:
echo.
echo              process ../myconfigdir AccountInsert
echo.
echo          If process bean id is not specified, the value of the property process.name in config.properties
echo          will be used to run the process instead of process-conf.xml,
echo          for example:
echo.
echo              process ../myconfigdir
echo.

goto end

:run
set EXE_PATH=%~dp0
set DATALOADER_VERSION=@@FULL_VERSION@@

set PROCESS_BEAN_ID_OPTION=
if not [%2]==[] set PROCESS_BEAN_ID_OPTION=process.name=%2

IF NOT "%DATALOADER_JAVA_HOME%" == "" (
    set JAVA_HOME="%DATALOADER_JAVA_HOME%"
)

IF "%JAVA_HOME%" == "" (
    echo To run process.bat, set the JAVA_HOME environment variable to the directory where the Java Runtime Environment ^(JRE^) is installed.
) ELSE (
    IF NOT EXIST "%JAVA_HOME%" (
        echo We couldn't find the Java Runtime Environment ^(JRE^) in directory "%JAVA_HOME%". To run process.bat, set the JAVA_HOME environment variable to the directory where the JRE is installed.
    ) ELSE (
        "%JAVA_HOME%\bin\java" -jar "%EXE_PATH%\..\dataloader-%DATALOADER_VERSION%-uber.jar" run.mode=batch salesforce.config.dir=%1 %PROCESS_BEAN_ID_OPTION%
    )
)

:end
exit /b %errorlevel%

@echo off
if not [%1]==[] goto run
echo.
echo Usage: process ^<configuration directory^> ^[process bean id^]
echo.
echo      configuration directory -- directory that contains configuration files,
echo          i.e. config.properties, process-conf.xml, database-conf.xml
echo.
echo      process bean id -- optional bean id of a batch process bean in process-conf.xml,
echo          for example:
echo.
echo              process ../myconfigdir AccountInsert
echo.
echo          If process bean id is not specified, the value of the property process.name in config.properties
echo          will be used to run the process instead of process-conf.xml,
echo          for example:
echo.
echo              process ../myconfigdir
echo.

goto end

:run
set EXE_PATH=%~dp0
set DATALOADER_VERSION=@@FULL_VERSION@@

set PROCESS_BEAN_ID_OPTION=
if not [%2]==[] set PROCESS_BEAN_ID_OPTION=process.name=%2

IF NOT "%DATALOADER_JAVA_HOME%" == "" (
    set JAVA_HOME="%DATALOADER_JAVA_HOME%"
)

IF "%JAVA_HOME%" == "" (
    echo To run process.bat, set the JAVA_HOME environment variable to the directory where the Java Runtime Environment ^(JRE^) is installed.
) ELSE (
    IF NOT EXIST "%JAVA_HOME%" (
        echo We couldn't find the Java Runtime Environment ^(JRE^) in directory "%JAVA_HOME%". To run process.bat, set the JAVA_HOME environment variable to the directory where the JRE is installed.
    ) ELSE (
        "%JAVA_HOME%\bin\java" -jar "%EXE_PATH%\..\dataloader-%DATALOADER_VERSION%-uber.jar" run.mode=batch salesforce.config.dir=%1 %PROCESS_BEAN_ID_OPTION%
    )
)

:end
exit /b %errorlevel%

use the term "process bean id" instead of "process name"

use the term "process bean id" instead of "process name" to more accurately describe which attribute of the process bean should be specified when invoking the command.


for /d /r . %%d in (packages,bin,obj) do @if exist "%%d" rd /s /q "%%d"
del /s /q "*.xproj.user" "project.lock.json"

for /d /r . %%d in (artifacts,packages,bin,obj) do @if exist "%%d" rd /s /q "%%d"
del /s /q "*.xproj.user" "project.lock.json"

clean artifacts

clean artifacts