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

mkdir %copy_dir%

call conda create ^
 -p %conda_env% ^
 freecad occt=7.5 vtk=9 libredwg calculix gitpython gmsh ^
 numpy matplotlib-base scipy sympy pandas six ^
 pyyaml opencamlib ifcopenshell openglider ^
 freecad.asm3 libredwg pycollada  pythonocc-core ^
 lxml xlutils olefile requests ^
 blinker opencv qt.py nine docutils ^
 --copy ^
 -c freecad/label/dev ^
 -c conda-forge ^
 -y

REM Copy Conda's Python and (U)CRT to FreeCAD/bin
robocopy %conda_env%\DLLs %copy_dir%\bin\DLLs /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Lib %copy_dir%\bin\Lib /XD __pycache__ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Scripts %copy_dir%\bin\Scripts /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ python*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ msvc*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ ucrt*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy gmsh and calculix
robocopy %conda_env%\Library\bin %copy_dir%\bin\ assistant.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin %copy_dir%\bin\ ccx.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin %copy_dir%\bin\ gmsh.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\mingw-w64\bin * %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy Conda's QT5/plugins to FreeCAD/bin
robocopy %conda_env%\Library\plugins %copy_dir%\bin\ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin\ QtWebEngineProces* %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\resources %copy_dir%\resources /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\translations %copy_dir%\translations /MT:%NUMBER_OF_PROCESSORS% > nul
echo [Paths] > %copy_dir%\bin\qt.conf
echo Prefix =.. >> "%copy_dir%\bin\qt.conf"
REM get all the dependency .dlls
robocopy %conda_env%\Library\bin *.dll %copy_dir%\bin /XF *.pdb /XF api*.* /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy FreeCAD build
robocopy %conda_env%\Library\bin FreeCAD* %copy_dir%\bin /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\data %copy_dir%\data /XF *.txt /S /MT:%NUMBER_OF_PROCESSORS% > nul
REM robocopy %conda_env%\Library\doc\ *.html %copy_dir%\doc MT:%NUMBER_OF_PROCESSORS% > nul

if %ADD_DOCS% == 1 (
mkdir -p %copy_dir%\doc
robocopy ..\..\doc %copy_dir%\doc /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul )

robocopy %conda_env%\Library\Ext %copy_dir%\Ext /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\lib %copy_dir%\lib /XF *.lib /XF *.prl /XF *.sh /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Mod %copy_dir%\Mod /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
REM Apply Patches
rename %copy_dir%\bin\Lib\ssl.py ssl-orig.py
copy ssl-patch.py %copy_dir%\bin\Lib\ssl.py
rename %copy_dir%\bin\Lib\site-packages\mpmath\ctx_mp_python.py ctx_mp_python-orig.py
copy C:\Users\travis\build\FreeCAD\FreeCAD-AppImage\conda\modifications\ctx_mp_python.py %copy_dir%\bin\Lib\site-packages\mpmath\ctx_mp_python.py

if "%DEPLOY_RELEASE%"=="weekly-builds" (
%copy_dir%\bin\python.exe -c "import FreeCAD;print('weekly-builds-' + FreeCAD.Version()[2].split(' ')[0])" > tempver.txt
) else (
%copy_dir%\bin\python.exe -c "import FreeCAD;print((FreeCAD.Version()[0]) +'.' + (FreeCAD.Version()[1]) +'.' + (FreeCAD.Version()[2].split(' ')[0]))" > tempver.txt
)
set /p fcver=<tempver.txt

echo %fcver%
cd %copy_dir%\..
ren %copy_dir% FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64
dir

REM if errorlevel1 exit 1

"%ProgramFiles%\7-Zip\7z.exe" a -t7z -mmt=%NUMBER_OF_PROCESSORS% FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64.7z FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64\ -bb
certutil -hashfile "FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64.7z" SHA256 > "FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt
echo  %date%-%time% >>"FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt

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

mkdir %copy_dir%

call conda create ^
 -p %conda_env% ^
 freecad python=3.8 occt=7.5 vtk=9 libredwg calculix gitpython gmsh ^
 numpy matplotlib-base scipy sympy pandas six ^
 pyyaml opencamlib ifcopenshell openglider ^
 freecad.asm3 libredwg pycollada  pythonocc-core ^
 lxml xlutils olefile requests ^
 blinker opencv qt.py nine docutils ^
 --copy ^
 -c freecad/label/dev ^
 -c conda-forge ^
 -y

REM Copy Conda's Python and (U)CRT to FreeCAD/bin
robocopy %conda_env%\DLLs %copy_dir%\bin\DLLs /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Lib %copy_dir%\bin\Lib /XD __pycache__ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Scripts %copy_dir%\bin\Scripts /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ python*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ msvc*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ ucrt*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy gmsh and calculix
robocopy %conda_env%\Library\bin %copy_dir%\bin\ assistant.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin %copy_dir%\bin\ ccx.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin %copy_dir%\bin\ gmsh.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\mingw-w64\bin * %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy Conda's QT5/plugins to FreeCAD/bin
robocopy %conda_env%\Library\plugins %copy_dir%\bin\ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin\ QtWebEngineProces* %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\resources %copy_dir%\resources /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\translations %copy_dir%\translations /MT:%NUMBER_OF_PROCESSORS% > nul
echo [Paths] > %copy_dir%\bin\qt.conf
echo Prefix =.. >> "%copy_dir%\bin\qt.conf"
REM get all the dependency .dlls
robocopy %conda_env%\Library\bin *.dll %copy_dir%\bin /XF *.pdb /XF api*.* /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy FreeCAD build
robocopy %conda_env%\Library\bin FreeCAD* %copy_dir%\bin /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\data %copy_dir%\data /XF *.txt /S /MT:%NUMBER_OF_PROCESSORS% > nul
REM robocopy %conda_env%\Library\doc\ *.html %copy_dir%\doc MT:%NUMBER_OF_PROCESSORS% > nul

if %ADD_DOCS% == 1 (
mkdir -p %copy_dir%\doc
robocopy ..\..\doc %copy_dir%\doc /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul )

robocopy %conda_env%\Library\Ext %copy_dir%\Ext /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\lib %copy_dir%\lib /XF *.lib /XF *.prl /XF *.sh /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Mod %copy_dir%\Mod /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
REM Apply Patches
rename %copy_dir%\bin\Lib\ssl.py ssl-orig.py
copy ssl-patch.py %copy_dir%\bin\Lib\ssl.py
rename %copy_dir%\bin\Lib\site-packages\mpmath\ctx_mp_python.py ctx_mp_python-orig.py
copy C:\Users\travis\build\FreeCAD\FreeCAD-AppImage\conda\modifications\ctx_mp_python.py %copy_dir%\bin\Lib\site-packages\mpmath\ctx_mp_python.py

if "%DEPLOY_RELEASE%"=="weekly-builds" (
%copy_dir%\bin\python.exe -c "import FreeCAD;print('weekly-builds-' + FreeCAD.Version()[2].split(' ')[0])" > tempver.txt
) else (
%copy_dir%\bin\python.exe -c "import FreeCAD;print((FreeCAD.Version()[0]) +'.' + (FreeCAD.Version()[1]) +'.' + (FreeCAD.Version()[2].split(' ')[0]))" > tempver.txt
)
set /p fcver=<tempver.txt

echo %fcver%
cd %copy_dir%\..
ren %copy_dir% FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64
dir

REM if errorlevel1 exit 1

"%ProgramFiles%\7-Zip\7z.exe" a -t7z -mmt=%NUMBER_OF_PROCESSORS% FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64.7z FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64\ -bb
certutil -hashfile "FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64.7z" SHA256 > "FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt
echo  %date%-%time% >>"FreeCAD_%fcver%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt

use ps3.8

Win: use ps3.8


@rem ===========================================================================================================
@rem Copyright (c) Microsoft Corporation.  All Rights Reserved.  Licensed under the Apache License,
@rem               Version 2.0.  See License.txt in the project root for license information.
@rem ===========================================================================================================

@echo off
setlocal

if /i "%1" == "debug" goto :ok
if /i "%1" == "release" goto :ok
if /i "%1" == "vsdebug" goto :ok
if /i "%1" == "vsrelease" goto :ok

echo adding required strong name verification skipping, and NGening built binaries
echo Usage:
echo    update.cmd debug   [-ngen]
echo    update.cmd release [-ngen]
echo    update.cmd vsdebug [-ngen]
echo    update.cmd vsrelease [-ngen]
exit /b 1

:ok

set BINDIR=%~dp0..\%1\net40\bin

if /i "%PROCESSOR_ARCHITECTURE%"=="x86" set X86_PROGRAMFILES=%ProgramFiles%
if /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" set X86_PROGRAMFILES=%ProgramFiles(x86)%

set REGEXE32BIT=reg.exe
if not "%OSARCH%"=="x86" set REGEXE32BIT=%WINDIR%\syswow64\reg.exe

                            FOR /F "tokens=2* delims=	 " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims=	 " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims=	 " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims=	 " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims=	 " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B

set SN32="%WINSDKNETFXTOOLS%sn.exe"
set SN64="%WINSDKNETFXTOOLS%x64\sn.exe"
set NGEN32=%windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe
set NGEN64=%windir%\Microsoft.NET\Framework64\v4.0.30319\ngen.exe

rem Disable strong-name validation for F# binaries built from open source that are signed with the microsoft key
%SN32% -Vr FSharp.Core,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Build,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Compiler.Hosted,b03f5f7f11d50a3a

%SN32% -Vr FSharp.Compiler,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Editor,b03f5f7f11d50a3a
%SN32% -Vr FSharp.LanguageService,b03f5f7f11d50a3a
%SN32% -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a
%SN32% -Vr FSharp.LanguageService.Compiler,b03f5f7f11d50a3a
%SN32% -Vr FSharp.ProjectSystem.Base,b03f5f7f11d50a3a
%SN32% -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a
%SN32% -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a
%SN32% -Vr FSharp.VS.FSI,b03f5f7f11d50a3a
%SN32% -Vr Unittests,b03f5f7f11d50a3a
%SN32% -Vr Salsa,b03f5f7f11d50a3a

if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
    %SN64% -Vr FSharp.Core,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Build,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Compiler.Hosted,b03f5f7f11d50a3a

    %SN64% -Vr FSharp.Compiler,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Editor,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.LanguageService,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.LanguageService.Compiler,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.ProjectSystem.Base,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.VS.FSI,b03f5f7f11d50a3a
    %SN64% -Vr Unittests,b03f5f7f11d50a3a
    %SN64% -Vr Salsa,b03f5f7f11d50a3a
)

rem NGen fsc, fsi, fsiAnyCpu, and FSharp.Build.dll
if /i not "%2"=="-ngen" goto :donengen

"%NGEN32%" install "%BINDIR%\fsc.exe" /queue:1
"%NGEN32%" install "%BINDIR%\fsi.exe" /queue:1
"%NGEN32%" install "%BINDIR%\FSharp.Build.dll" /queue:1
"%NGEN32%" executeQueuedItems 1

if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
    "%NGEN64%" install "%BINDIR%\fsiAnyCpu.exe" /queue:1
    "%NGEN64%" install "%BINDIR%\FSharp.Build.dll" /queue:1
    "%NGEN64%" executeQueuedItems 1
)

:donengen

@rem ===========================================================================================================
@rem Copyright (c) Microsoft Corporation.  All Rights Reserved.  Licensed under the Apache License,
@rem               Version 2.0.  See License.txt in the project root for license information.
@rem ===========================================================================================================

@echo off
setlocal

if /i "%1" == "debug" goto :ok
if /i "%1" == "release" goto :ok
if /i "%1" == "vsdebug" goto :ok
if /i "%1" == "vsrelease" goto :ok

echo adding required strong name verification skipping, and NGening built binaries
echo Usage:
echo    update.cmd debug   [-ngen]
echo    update.cmd release [-ngen]
echo    update.cmd vsdebug [-ngen]
echo    update.cmd vsrelease [-ngen]
exit /b 1

:ok

set BINDIR=%~dp0..\%1\net40\bin

if /i "%PROCESSOR_ARCHITECTURE%"=="x86" set X86_PROGRAMFILES=%ProgramFiles%
if /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" set X86_PROGRAMFILES=%ProgramFiles(x86)%

set REGEXE32BIT=reg.exe
if not "%OSARCH%"=="x86" set REGEXE32BIT=%WINDIR%\syswow64\reg.exe

                            FOR /F "tokens=2* delims=	 " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims=	 " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims=	 " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims=	 " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims=	 " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B

set SN32="%WINSDKNETFXTOOLS%sn.exe"
set SN64="%WINSDKNETFXTOOLS%x64\sn.exe"
set NGEN32=%windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe
set NGEN64=%windir%\Microsoft.NET\Framework64\v4.0.30319\ngen.exe

rem Disable strong-name validation for F# binaries built from open source that are signed with the microsoft key
%SN32% -Vr FSharp.Core,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Build,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Compiler.Hosted,b03f5f7f11d50a3a

%SN32% -Vr FSharp.Compiler,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Editor,b03f5f7f11d50a3a
%SN32% -Vr FSharp.LanguageService,b03f5f7f11d50a3a
%SN32% -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a
%SN32% -Vr FSharp.LanguageService.Compiler,b03f5f7f11d50a3a
%SN32% -Vr FSharp.ProjectSystem.Base,b03f5f7f11d50a3a
%SN32% -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a
%SN32% -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a
%SN32% -Vr FSharp.VS.FSI,b03f5f7f11d50a3a
%SN32% -Vr VisualFSharp.Unittests,b03f5f7f11d50a3a
%SN32% -Vr VisualFSharp.Salsa,b03f5f7f11d50a3a

if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
    %SN64% -Vr FSharp.Core,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Build,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Compiler.Hosted,b03f5f7f11d50a3a

    %SN64% -Vr FSharp.Compiler,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Editor,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.LanguageService,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.LanguageService.Compiler,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.ProjectSystem.Base,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.VS.FSI,b03f5f7f11d50a3a
    %SN64% -Vr Unittests,b03f5f7f11d50a3a
    %SN64% -Vr Salsa,b03f5f7f11d50a3a
)

rem NGen fsc, fsi, fsiAnyCpu, and FSharp.Build.dll
if /i not "%2"=="-ngen" goto :donengen

"%NGEN32%" install "%BINDIR%\fsc.exe" /queue:1
"%NGEN32%" install "%BINDIR%\fsi.exe" /queue:1
"%NGEN32%" install "%BINDIR%\FSharp.Build.dll" /queue:1
"%NGEN32%" executeQueuedItems 1

if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
    "%NGEN64%" install "%BINDIR%\fsiAnyCpu.exe" /queue:1
    "%NGEN64%" install "%BINDIR%\FSharp.Build.dll" /queue:1
    "%NGEN64%" executeQueuedItems 1
)

:donengen

fix verification entry

fix verification entry


@echo off
IF "%1" EQU "" GOTO Help

IF "%2" NEQ ""   SET _=%2\%1
IF "%2" EQU ""   SET _=%CD%\%1

rem TODO rewrite this script to handle more intelligently, creating dirs for only the branch matching current env

MD %_%\vc14\x86\deps\bin
MD %_%\vc14\x86\deps\lib
MD %_%\vc14\x86\deps\include
MD %_%\vc14\x64\deps\bin
MD %_%\vc14\x64\deps\lib
MD %_%\vc14\x64\deps\include

GOTO EXIT

:help
echo phpsdk_buildtree ^<nameofthetree^> [PATH]
echo  Create the common directory structure used by the PHP SDK

:EXIT

@echo off
IF "%1" EQU "" GOTO Help

IF "%2" NEQ ""   SET _=%2\%1
IF "%2" EQU ""   SET _=%CD%\%1

rem if we're in the starter script shell, create the only struct that corresponds to the current env
rem otherwise - retain the old behavior, create structs for all the known build combinations and don't cd

if "%PHP_SDK_ARCH%" NEQ "" (
	if "%PHP_SDK_VC%" NEQ "" (
		MD %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%\deps\bin
		MD %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%\deps\lib
		MD %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%\deps\include
		cd %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%
		goto exit
	)
	goto create_all
) else (
:create_all
	MD %_%\vc14\x86\deps\bin
	MD %_%\vc14\x86\deps\lib
	MD %_%\vc14\x86\deps\include
	MD %_%\vc14\x64\deps\bin
	MD %_%\vc14\x64\deps\lib
	MD %_%\vc14\x64\deps\include
)

GOTO EXIT

:help
echo phpsdk_buildtree ^<nameofthetree^> [PATH]
echo  Create the common directory structure used by the PHP SDK

:EXIT

rework the buildtree script

rework the buildtree script


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

@ECHO OFF
SETLOCAL EnableDelayedExpansion

:: Where are the svn binaries you want to benchmark?
SET SVN_1_6=C:\path\to\1.6-svn\bin\svn
SET SVN_trunk=C:\path\to\trunk-svn\bin\svn

SET benchmark=%CD%\benchmark.py

SET my_datetime=%date%-%time%
SET my_datetime=%my_datetime: =_%
SET my_datetime=%my_datetime:/=_%
SET my_datetime=%my_datetime::=%
SET my_datetime=%my_datetime:.=%
SET my_datetime=%my_datetime:,=%
SET parent=%my_datetime%
SET inital_workdir=%CD%
mkdir "%parent%"
cd "%parent%"
ECHO %CD%

GOTO main

:batch
  SET levels=%1
  SET spread=%2
  SET N=%3
  SET pre=%levels%x%spread%_
  ECHO.
  ECHO.---------------------------------------------------------------------
  ECHO.
  ECHO.Results for dir levels: %levels%  spread: %spread%
  CALL "%benchmark%" --svn="%SVN_1_6%" run %pre%1.6 %levels% %spread% %N% > NUL
  CALL "%benchmark%" --svn="%SVN_trunk%" run %pre%trunk %levels% %spread% %N% > NUL
  CALL "%benchmark%" compare %pre%1.6 %pre%trunk
  GOTO :EOF

:main
SET N=6
SET al=5
SET as=5
SET bl=25
SET bs=1
SET cl=1
SET cs=100

::::DEBUG
::SET N=1
::SET al=1
::SET as=1
::SET bl=2
::SET bs=1
::SET cl=1
::SET cs=2
::::DEBUG

SET started=%date%-%time%
ECHO.Started at %started%
ECHO.

CALL :batch %al% %as% %N%
CALL :batch %bl% %bs% %N%
CALL :batch %cl% %cs% %N%

ECHO.
ECHO.=========================================================================
ECHO.
FOR %%F IN (*x*_1.6) DO SET all_1.6=!all_1.6! %%F
CALL "%benchmark%" combine total_1.6 %all_1.6% > NUL
FOR %%F IN (*x*_trunk) DO SET all_trunk=!all_trunk! %%F
CALL "%benchmark%" combine total_trunk %all_trunk% > NUL

ECHO.comparing averaged totals..."
CALL "%benchmark%" compare total_1.6 total_trunk

ECHO.
ECHO.Had started at %started%,
ECHO.       done at %date%-%time%
ECHO %CD%

cd "%inital_workdir%"
IF EXIST %parent%\total_trunk rmdir /S /Q "%parent%"

ENDLOCAL

Make it possible to run the 'benchmark suite1' on Windows, by translating
the bash script 'run' to a Windows batch script, 'run.bat'.

The Windows variant differs from the bash script on a couple of points:

- It doesn't 'tee' the output to a results.txt file, because I've found
  no portable way to do this on Windows.  Of course, the output of running
  'run.bat' can always be redirected to a file.

- The test 100x1 has been reduced to 25x1, to avoid running into the
  maximum path length limitation on Windows (max. 256 characters).  Maybe
  someone else can find a way to make this work (needs support in
  benchmark.py).

* tools/dev/benchmarks/suite1/run.bat: New file, translation of 'run' into
   a Windows batch script.


call ng build -prod --sourcemaps false --delete-output-path true
robocopy dist ../gb-grocery-iis /MIR /XD .git
ping 127.0.0.1 -n 6 > nul
pushd ..\gb-grocery-iis
git add .
git commit -m "new version"
git push azure master
popd

fix azure deploy

fix azure deploy


@echo off

                        rem    'start_gif' is how many seconds into the video to wait before starting to copy the video
                        rem    Set it to zero if you want to start at the beginning of the video
                        rem    'end_gif' is the second when the copying stops

set start_gif=0
set end_gif=10
                        rem    'fps' is frames per second and 'gif_width' is how many pixels wide the final GIF will be
set fps=15
set gif_width=480

                        rem    keeps the current directory from changing if a file is dropped in the file explorer from a different folder
cd /d "%~dp0"

                        rem    If the spot for the video file name isn't blank then it jumps to the make_gif section
if not [%1]==[] goto make_gif

                        rem    If a video file name wasn't given at the command line the message below is echoed and then the program quits
echo Please provide a video file name. Additionally you can include the time in seconds from the video that the GIF starts and ends.
goto:eof

:make_gif

  set gif_folder=GIFs
  if not exist %gif_folder% mkdir %gif_folder%

                        rem    this splits the file name from the file extension and then uses the name for the GIF
  for %%f in (%1) do ( set "gif_name=%%~nf" )
  set gif_file="%gif_folder%\%gif_name%.gif"

                        rem    Assigns default values at the start of the file if none given at command line
  if [%2]==[] (
    set start_time=%start_second%
  ) else (
    set start_time=%2
  )

  if [%3]==[] (
    set /a duration=%start_time% + %end_gif%
  ) else (
    set /a duration=%3 - %start_time%
  )

  echo Creating GIF, please wait.

                        rem    GIF making information adapted from http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html

  set palette="%gif_folder%\palette.png"
  set filters="fps=%fps%,scale=%gif_width%:-2:flags=lanczos"

                        rem    the first run generates a global palette of 256 colors that will be used for every frame

			rem    the stats_mode option can be either stats_mode=diff or stats_mode=full
                        rem    stats_mode=full chooses colors that will optimize colors for the entire frame
                        rem    while stats_mode=diff optimizes colors to make the changes look good
  start /b /wait ffmpeg.exe -v error -ss %start_time% -t %duration% -i %1 -vf "%filters%,palettegen=stats_mode=diff" -y %palette%

                        rem    the second run uses the color palette while making the GIF
  start /b /wait ffmpeg.exe -v error -ss %start_time% -t %duration% -i %1 -i %palette% -lavfi "%filters% [x]; [x][1:v] paletteuse" -y %gif_file%

  rm %palette%

@echo off

                        rem    'start_gif' is how many seconds into the video to wait before starting to copy the video
                        rem    Set it to zero if you want to start at the beginning of the video
                        rem    'end_gif' is the second when the copying stops

set start_gif=0
set end_gif=10
                        rem    'fps' is frames per second and 'gif_width' is how many pixels wide the final GIF will be
set fps=15
set gif_width=480

                        rem    keeps the current directory from changing if a file is dropped in the file explorer from a different folder
cd /d "%~dp0"

                        rem    If the spot for the video file name isn't blank then it jumps to the make_gif section
if not [%1]==[] goto make_gif

                        rem    If a video file name wasn't given at the command line the message below is echoed and then the program quits
echo Please provide a video file name. Additionally you can include the time in seconds from the video that the GIF starts and ends.
goto:eof

:make_gif

  set gif_folder=GIFs
  if not exist %gif_folder% mkdir %gif_folder%

                        rem    this splits the file name from the file extension and then uses the name for the GIF
  for %%f in (%1) do ( set "gif_name=%%~nf" )
  set gif_file="%gif_folder%\%gif_name%.gif"

                        rem    Assigns default values at the start of the file if none given at command line
  if [%2]==[] (
    set start_time=%start_second%
  ) else (
    set start_time=[%2]
  )

  if [%3]==[] (
    set /a duration=%start_time% + %end_gif%
  ) else (
    set /a duration=%3 - %start_time%
	if [%2] GEQ [%3] (
	  echo.
	  echo Error: Something has gone wrong with the numbers that were entered.
	  echo Please make sure that the first one is smaller than the second one.
	  goto:eof
	)
  )

  echo Creating GIF, please wait.

                        rem    GIF making information adapted from http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html

  set palette="%gif_folder%\palette.png"
  set filters="fps=%fps%,scale=%gif_width%:-2:flags=lanczos"

                        rem    the first run generates a global palette of 256 colors that will be used for every frame

			rem    the stats_mode option can be either stats_mode=diff or stats_mode=full
                        rem    stats_mode=full chooses colors that will optimize colors for the entire frame
                        rem    while stats_mode=diff optimizes colors to make the changes look good
  start /b /wait ffmpeg.exe -v error -ss %start_time% -t %duration% -i %1 -vf "%filters%,palettegen=stats_mode=diff" -y %palette%

                        rem    the second run uses the color palette while making the GIF
  start /b /wait ffmpeg.exe -v error -ss %start_time% -t %duration% -i %1 -i %palette% -lavfi "%filters% [x]; [x][1:v] paletteuse" -y %gif_file%

  rm %palette%

Update video_to_gif.bat

Update video_to_gif.bat

now it checks to make sure nothing is wrong with the values


@echo off
SET originalDir=%cd%
SET baseDir=%~dp0
CD %baseDir%
CD src
RD build /S /Q
call yarn
SET NODE_ENV=%1
call gulp build
CD %originalDir%

[DR-1302] Add a simple script to update and build WebApp

This script will be used in Andres' environment to automatize package generation for Production environment.

Example: `build-webapp PROD`


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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

@rem The image we're currently running has a broken version of Node.js enabled
@rem by nvm (v10.15.3), which has no npm bin. This hack uses the functional
@rem Node v8.9.1 to install npm@latest, it then uses this version of npm to
@rem install npm for v10.15.3.
call nvm use v8.9.1 || goto :error
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm-bootstrap\bin\npm-cli.js i npm -g || goto :error
call nvm use v10.15.3 || goto :error
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm\bin\npm-cli.js i npm -g || goto :error

call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

@rem npm path is not currently set in our image, we should fix this next time
@rem we upgrade Node.js in the image:
SET PATH=%PATH%;/cygdrive/c/Program Files/nodejs/npm

call nvm use v12.14.1
call which node

call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

build: update windows configuration to match new vm


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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

call npm install -g npm@5 || goto :error

call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

call npm install -g npm@latest || goto :error
call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

chore(build): use the latest npm on windows for tests (#304)


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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

call npm install -g npm@latest || goto :error
call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

@rem The image we're currently running has a broken version of Node.js enabled
@rem by nvm (v10.15.3), which has no npm bin. This hack uses the functional
@rem Node v8.9.1 to install npm@latest, it then uses this version of npm to
@rem install npm for v10.15.3.
call nvm use v8.9.1 || goto :error
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm-bootstrap\bin\npm-cli.js i npm -g || goto :error
call nvm use v10.15.3 || goto :error
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm\bin\npm-cli.js i npm -g || goto :error

call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

build: patch Windows container, fixing Node 10 (#97)


@echo off
if exist node_modules (rmdir /s /q node_modules)
if %errorlevel% neq 0 exit /b %errorlevel%
powershell -c "$source = 'https://raw.githubusercontent.com/makiolo/cmaki/master/bootstrap.cmd'; $dest = $env:TEMP + '\bootstrap.cmd'; $WebClient = New-Object System.Net.WebClient; $WebClient.DownloadFile($source,$dest); Invoke-Expression $dest"
if %errorlevel% neq 0 exit /b %errorlevel%
call node_modules\cmaki\install.cmd
if %errorlevel% neq 0 exit /b %errorlevel%
call node_modules\cmaki\tests.cmd
if %errorlevel% neq 0 exit /b %errorlevel%

Create ci.cmd

Create ci.cmd


call Scripts\activate.bat & python -c "import yaml; with open('.condarc', 'w') as output; output.write(yaml.dump({'channels': ['sci-bots', 'microdrop-plugins', 'wheeler-microfluidics', 'conda-forge', 'defaults']})"
if errorlevel 1 exit 1
call Scripts\activate.bat & python -c "import logging; logging.basicConfig(level=logging.DEBUG); import mpm.api; mpm.api.enable_plugin('droplet_planning_plugin'); mpm.api.enable_plugin('dmf_device_ui_plugin'); mpm.api.enable_plugin('dropbot_plugin');mpm.api.enable_plugin('user_prompt_plugin'); mpm.api.enable_plugin('step_label_plugin')"
if errorlevel 1 exit 1

call Scripts\activate.bat & python -c "import logging; logging.basicConfig(level=logging.DEBUG); import mpm.api; mpm.api.enable_plugin('droplet_planning_plugin'); mpm.api.enable_plugin('dmf_device_ui_plugin'); mpm.api.enable_plugin('dropbot_plugin'); mpm.api.enable_plugin('user_prompt_plugin'); mpm.api.enable_plugin('step_label_plugin')"
if errorlevel 1 exit 1
call Scripts\activate.bat & python -c "import yaml; output = open('.condarc', 'w'); output.write(yaml.dump({'channels': ['sci-bots', 'microdrop-plugins', 'wheeler-microfluidics', 'conda-forge', 'defaults']}))"
if errorlevel 1 exit 1

Fix post-install write of Conda channels


@echo off
rem ##
rem ##  slideshow -- Observe and Control Slideshow Applications
rem ##  Copyright (c) 2014 Ralf S. Engelschall <http://engelschall.com>
rem ##
rem ##  This Source Code Form is subject to the terms of the Mozilla Public
rem ##  License (MPL), version 2.0. If a copy of the MPL was not distributed
rem ##  with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
rem ##
rem ##  File:     connector-win-ppt2010.bat
rem ##  Purpose:  connector wrapper for Microsoft PowerPoint 2010 under Windows
rem ##  Language: COMMAND.COM
rem ##

cscript /E:JScript /NoLogo "%~dp0\connector-win-ppt2010.js" %*

@echo off
rem ##
rem ##  slideshow -- Observe and Control Slideshow Applications
rem ##  Copyright (c) 2014 Ralf S. Engelschall <http://engelschall.com>
rem ##
rem ##  This Source Code Form is subject to the terms of the Mozilla Public
rem ##  License (MPL), version 2.0. If a copy of the MPL was not distributed
rem ##  with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
rem ##
rem ##  File:     connector-win-ppt2010.bat
rem ##  Purpose:  connector wrapper for Microsoft PowerPoint 2010 under Windows
rem ##  Language: COMMAND.COM
rem ##

%systemroot%\system32\cscript.exe /E:JScript /NoLogo "%~dp0\connector-win-ppt2010.js" %*

use absolute path to cscript under Windows to circumvent path problems


"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tvs_4_1 /EVS /Fh Shader/efk.GraphicsDX11.PostFX_Basic_VS.h Shader/postfx_basic_VS.fx
"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tps_4_1 /EPS /Fh Shader/efk.GraphicsDX11.PostFX_Copy_PS.h Shader/postfx_copy_PS.fx
"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tps_4_1 /EPS /Fh Shader/efk.GraphicsDX11.PostFX_Extract_PS.h Shader/postfx_extract_PS.fx
"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tps_4_1 /EPS /Fh Shader/efk.GraphicsDX11.PostFX_Blend_PS.h Shader/postfx_blend_PS.fx
"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tps_4_1 /EPS /Fh Shader/efk.GraphicsDX11.PostFX_BlurH_PS.h Shader/postfx_blur_h_PS.fx
"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tps_4_1 /EPS /Fh Shader/efk.GraphicsDX11.PostFX_BlurV_PS.h Shader/postfx_blur_v_PS.fx

pause

"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tvs_4_1 /EVS /Fh Shader/efk.GraphicsDX11.PostFX_Basic_VS.h Shader/postfx_basic_VS.fx
"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tps_4_1 /EPS /Fh Shader/efk.GraphicsDX11.PostFX_Copy_PS.h Shader/postfx_copy_PS.fx
"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tps_4_1 /EPS /Fh Shader/efk.GraphicsDX11.PostFX_Extract_PS.h Shader/postfx_extract_PS.fx
"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tps_4_1 /EPS /Fh Shader/efk.GraphicsDX11.PostFX_Blend_PS.h Shader/postfx_blend_PS.fx
"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tps_4_1 /EPS /Fh Shader/efk.GraphicsDX11.PostFX_BlurH_PS.h Shader/postfx_blur_h_PS.fx
"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tps_4_1 /EPS /Fh Shader/efk.GraphicsDX11.PostFX_BlurV_PS.h Shader/postfx_blur_v_PS.fx
"%DXSDK_DIR%Utilities\\bin\x86\fxc" /Zpc /Tps_4_1 /EPS /Fh Shader/efk.GraphicsDX11.PostFX_Tonemap_PS.h Shader/postfx_tonemap_PS.fx

pause

Add tonemap build command.

Add tonemap build command.


@echo //----------------------------------------------------------------
@echo // brief:
@echo //   build and install v8
@echo // usage:
@echo //   install_v8.bat
@echo // version:
@echo //   $Id: install_v8.bat 352 2014-06-08 08:48:59Z hryky.private@gmail.com $
@echo //----------------------------------------------------------------

@setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS

@set TOOLROOT=%DEVROOT%/hryky-codebase/tool

@call %TOOLROOT%/build/define_variables.bat

@if "x64" == "%TARGET_ARCHITECTURE%" @(
	@set V8_ARCHITECTURE=x64
) else @(
	@set V8_ARCHITECTURE=ia32
)

@set MODULE=v8
@set MODULE_ROOT=%DEVROOT%\%MODULE%
@set MODULE_PROJDIR=%MODULE_ROOT%\build
@set INSTALL_ROOT=%DEVROOT%\hryky-codebase\external\v8
@set INSTALL_LIBDIR=%INSTALL_ROOT%\lib\win\%TARGET_ARCHITECTURE%\
@set INSTALL_INCDIR=%INSTALL_ROOT%\include\v8\
@set XCOPY=xcopy /F /Y
@set PYTHON=%MODULE_ROOT%\third_party\python_26

@set DEVENVSLN=%MODULE_PROJDIR%\All.sln
@set DEVENVTARGET=
@set DEVENVCONFIG=Debug
@set DEVENVPLATFORM=%TARGET_ARCHITECTURE%

@set GYP_MSVS_VERSION=2013e

@cd %MODULE_ROOT%

@echo //--------------------------------
@echo // configure V8 : %TARGET_ARCHITECTURE%
@echo //--------------------------------

call third_party\python_26\python.exe build/gyp_v8 -Dtarget_arch=%V8_ARCHITECTURE%
@if errorlevel 1 @goto :error

@echo //--------------------------------
@echo // build V8
@echo // MSVC2012 can't build the project generated by GYP.
@echo //--------------------------------

call "%TOOLROOT%/build/open_solution.bat" %DEVENVSLN%
@if errorlevel 1 @goto :error

@echo //--------------------------------
@echo // install V8 : %TARGET_ARCHITECTURE%
@echo //--------------------------------

@if not exist "%INSTALL_LIBDIR%\Debug" @mkdir "%INSTALL_LIBDIR%\Debug"
%XCOPY% "%MODULE_ROOT%"\build\Debug\lib\*.lib "%INSTALL_LIBDIR%\Debug"

@if not exist "%INSTALL_LIBDIR%\Release" @mkdir "%INSTALL_LIBDIR%\Release"
%XCOPY% "%MODULE_ROOT%"\build\Release\lib\*.lib "%INSTALL_LIBDIR%\Release"

@if not exist "%INSTALL_INCDIR%" @mkdir "%INSTALL_INCDIR%"
%XCOPY% "%MODULE_ROOT%"\include "%INSTALL_INCDIR%\"

:success
@echo //----------------------------------------------------------------
@echo // %~f0 succeeded
@echo //----------------------------------------------------------------
@set RETCODE=0
@goto end

:error
@set RETCODE=1
@call %ASSERT% "%~f0 failed"
@goto end

:end

@exit /b %RETCODE%

@endlocal

@echo //----------------------------------------------------------------
@echo // brief:
@echo //   build and install v8
@echo // usage:
@echo //   install_v8.bat [command]
@echo // version:
@echo //   $Id: install_v8.bat 352 2014-06-08 08:48:59Z hryky.private@gmail.com $
@echo //----------------------------------------------------------------

@setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS

@set COMMAND=%1
shift

@set TOOLROOT=%DEVROOT%/hryky-codebase/tool

@call %TOOLROOT%/build/define_variables.bat

@if "x64" == "%TARGET_ARCHITECTURE%" @(
	@set V8_ARCHITECTURE=x64
) else @(
	@set V8_ARCHITECTURE=ia32
)

@set MODULE=v8
@set MODULE_ROOT=%DEVROOT%\google\%MODULE%
@set MODULE_PROJDIR=%MODULE_ROOT%\build
@set INSTALL_ROOT=%DEVROOT%\hryky-codebase\external\v8
@set INSTALL_LIBDIR=%INSTALL_ROOT%\lib\win\%TARGET_ARCHITECTURE%\
@set INSTALL_INCDIR=%INSTALL_ROOT%\include\v8\
@set XCOPY=xcopy /F /Y

@set DEPOT_TOOLS_WIN_TOOLCHAIN=0
@set GYP_MSVS_VERSION=2015

@set PATH=%DEVROOT%\depot_tools;%PATH%

@if not exist "%MODULE_ROOT%" @(
	@echo "%MODULE_ROOT%" is not found.
	@goto :error
)
@pushd "%MODULE_ROOT%"

@chcp 437

@if "build" == "%COMMAND%" @(
	@goto :build
)
@if "install" == "%COMMAND%" @(
	@goto :install
)

:configure
@echo //--------------------------------
@echo // configure V8 : %TARGET_ARCHITECTURE%
@echo //--------------------------------

@call "tools\dev\v8gen.py" x64.debug ^
	-- is_component_build=true
@if errorlevel 1 @goto :error
@call "tools\dev\v8gen.py" x64.optdebug ^
	-- is_component_build=true
@if errorlevel 1 @goto :error
@call "tools\dev\v8gen.py" x64.release ^
	-- is_component_build=true
@if errorlevel 1 @goto :error

:build
@echo //--------------------------------
@echo // build V8
@echo //--------------------------------

@call ninja -v -C out.gn/x64.debug v8
@if errorlevel 1 @goto :error
@call ninja -v -C out.gn/x64.optdebug v8
@if errorlevel 1 @goto :error
@call ninja -v -C out.gn/x64.release v8
@if errorlevel 1 @goto :error

:install
@echo //--------------------------------
@echo // install V8 : %TARGET_ARCHITECTURE%
@echo //--------------------------------

@if not exist "%INSTALL_LIBDIR%\Debug" @mkdir "%INSTALL_LIBDIR%\Debug"
%XCOPY% "%MODULE_ROOT%"\out.gn\x64.debug\v8.dll "%INSTALL_LIBDIR%\Debug"
%XCOPY% "%MODULE_ROOT%"\out.gn\x64.debug\v8.dll.lib "%INSTALL_LIBDIR%\Debug"
%XCOPY% "%MODULE_ROOT%"\out.gn\x64.debug\v8.dll.exp "%INSTALL_LIBDIR%\Debug"
%XCOPY% "%MODULE_ROOT%"\out.gn\x64.debug\v8.dll.pdb "%INSTALL_LIBDIR%\Debug"

@if not exist "%INSTALL_LIBDIR%\Release" @mkdir "%INSTALL_LIBDIR%\Release"
%XCOPY% "%MODULE_ROOT%"\out.gn\x64.release\v8.dll "%INSTALL_LIBDIR%\Release"
%XCOPY% "%MODULE_ROOT%"\out.gn\x64.release\v8.dll.lib "%INSTALL_LIBDIR%\Release"
%XCOPY% "%MODULE_ROOT%"\out.gn\x64.release\v8.dll.exp "%INSTALL_LIBDIR%\Release"
%XCOPY% "%MODULE_ROOT%"\out.gn\x64.release\v8.dll.pdb "%INSTALL_LIBDIR%\Release"

@if not exist "%INSTALL_INCDIR%" @mkdir "%INSTALL_INCDIR%"
%XCOPY% "%MODULE_ROOT%"\include "%INSTALL_INCDIR%\"

:success
@echo //----------------------------------------------------------------
@echo // %~f0 succeeded
@echo //----------------------------------------------------------------
@set RETCODE=0
@goto end

:error
@set RETCODE=1
@call %ASSERT% "%~f0 failed"
@goto end

:end

@exit /b %RETCODE%

@endlocal

install Google V8

install Google V8


@ECHO OFF

SET EPHCC=..\..\
SET DISTR=..\..\DistributionSystems\SimulinkOpal\Banshee\
SET COMP=..\..\Components\SimulinkOpal\
SET DOCS=..\..\..\MGC_Challange_Docs\
SET DEST=..\..\..\MGCP2017_Team5\

ECHO ABCD %dest%

copy "%DOCS%2017 MGCP Information Packet v1_0.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_0.pdf"
copy "%DOCS%2017 MGCP Information Packet v1_1.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_1.pdf"
copy "%DOCS%2017 MGCP Information Packet v1_2.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_2.pdf"
copy "%DOCS%2017 MGCP Information Packet v1_3.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_3.pdf"
copy "%DOCS%2017 MGCP Information Packet v1_4.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_4.pdf"
copy "%DOCS%2017 MGCP Information Packet v1_5.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_5.pdf"

xcopy "%DOCS%HardwareSpecs\*.*" "%DEST%1_References\*.*" /S

xcopy %EPHCC%DistributionSystems\SimulinkOpal\Banshee\*.* %DEST%\5_Source\DistributionSystems\SimulinkOpal\Banshee\*.* /S
xcopy %EPHCC%Components\SimulinkOpal\*.* %DEST%5_Source\Components\SimulinkOpal\*.* /S

xcopy %EPHCC%SimulationTools\UDP_Tools\*.m %DEST%6_TestSequence\UDP_Tools\*.m /S
xcopy %EPHCC%SimulationTools\UDP_Tools\*.mexw32 %DEST%6_TestSequence\UDP_Tools\*.mexw32 /S
xcopy %EPHCC%SimulationTools\UDP_Tools\*.m %DEST%6_TestSequence\UDP_Tools\*.m /S
xcopy %EPHCC%SimulationTools\TestSequence\*.m %DEST%6_TestSequence\TestSequence\*.m /S
xcopy %EPHCC%SimulationTools\TestSequence\*.png %DEST%6_TestSequence\TestSequence\*.png /S
xcopy %EPHCC%SimulationTools\TestSequence\*.txt %DEST%6_TestSequence\TestSequence\*.txt /S
xcopy %EPHCC%SimulationTools\TestSequence\*.docx %DEST%6_TestSequence\TestSequence\*.docx /S

@ECHO OFF

SET EPHCC=..\..\
SET DISTR=..\..\DistributionSystems\SimulinkOpal\Banshee\
SET COMP=..\..\Components\SimulinkOpal\
SET DOCS=..\..\..\MGC_Challange_Docs\
SET DEST=..\..\..\MGCP2017_Team4\

ECHO ABCD %dest%

copy "%DOCS%2017 MGCP Information Packet v1_0.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_0.pdf"
copy "%DOCS%2017 MGCP Information Packet v1_1.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_1.pdf"
copy "%DOCS%2017 MGCP Information Packet v1_2.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_2.pdf"
copy "%DOCS%2017 MGCP Information Packet v1_3.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_3.pdf"
copy "%DOCS%2017 MGCP Information Packet v1_4.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_4.pdf"
copy "%DOCS%2017 MGCP Information Packet v1_5.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_5.pdf"
copy "%DOCS%2017 MGCP Information Packet v1_6.pdf" "%DEST%0_Instruction\2017 MGCP Information Packet v1_6.pdf"

xcopy "%DOCS%HardwareSpecs\*.*" "%DEST%1_References\*.*" /S

xcopy %EPHCC%DistributionSystems\SimulinkOpal\Banshee\*.* %DEST%\5_Source\DistributionSystems\SimulinkOpal\Banshee\*.* /S
xcopy %EPHCC%Components\SimulinkOpal\*.* %DEST%5_Source\Components\SimulinkOpal\*.* /S

xcopy %EPHCC%SimulationTools\TestSequence\*.m %DEST%6_TestSequence\TestSequence\*.m /S
xcopy %EPHCC%SimulationTools\TestSequence\*.mexw32 %DEST%6_TestSequence\TestSequence\*.mexw32 /S
xcopy %EPHCC%SimulationTools\TestSequence\*.png %DEST%6_TestSequence\TestSequence\*.png /S
xcopy %EPHCC%SimulationTools\TestSequence\*.txt %DEST%6_TestSequence\TestSequence\*.txt /S
xcopy %EPHCC%SimulationTools\TestSequence\*.docx %DEST%6_TestSequence\TestSequence\*.docx /S

Update copy to repo script

Update copy to repo script


set /p versionNumber=

REM preparing staging dirs

mkdir staging
mkdir staging\net40
mkdir staging\sl4
copy LICENSE staging
copy NOTICE staging

REM building for .NET 4.0 ...

"C:\Program Files (x86)\Microsoft F#\v4.0\fsc.exe" -o:staging\net40\Utils.dll --noframework --define:TRACE --optimize+ -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v4.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Numerics.dll" --target:library --warn:3 --warnaserror:76 --LCID:1033 --utf8output --fullpaths --flaterrors "C:\Users\Stephen\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.fs" Utils\AssemblyInfo.fs Utils\MiscUtils.fs Utils\RegexUtils.fs Utils\PrintfUtils.fs Utils\ListExtensions.fs

"C:\Program Files (x86)\Microsoft F#\v4.0\fsc.exe" -o:staging\net40\Unquote.dll --noframework --define:TRACE --doc:staging\net40\Unquote.xml --optimize+ -r:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FSharp.Compiler\v4.0_4.0.0.0__b03f5f7f11d50a3a\FSharp.Compiler.dll -r:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FSharp.Compiler.Interactive.Settings\v4.0_4.0.0.0__b03f5f7f11d50a3a\FSharp.Compiler.Interactive.Settings.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v4.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Numerics.dll" -r:"staging\net40\Utils.dll" --target:library --warn:3 --warnaserror:76 --LCID:1033 --utf8output --fullpaths --flaterrors --staticlink:Utils "C:\Users\Stephen\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.fs" Unquote\AssemblyInfo.fs Unquote\DynamicOperators.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\Assertions.fs

REM building for sl4

"C:\Program Files (x86)\Microsoft F#\v4.0\fsc.exe" -o:staging\sl4\Utils.dll --noframework --define:TRACE --define:SILVERLIGHT --optimize+ -r:"C:\Program Files (x86)\Microsoft F#\Silverlight\Libraries\Client\v4.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Net.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.Browser.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Xml.dll" --target:library --warn:3 --warnaserror:76 --LCID:1033 --utf8output --fullpaths --flaterrors "C:\Users\Stephen\AppData\Local\Temp\Silverlight,Version=v4.0.AssemblyAttributes.fs" Utils\AssemblyInfo.fs Utils\MiscUtils.fs Utils\RegexUtils.fs Utils\PrintfUtils.fs Utils\ListExtensions.fs

"C:\Program Files (x86)\Microsoft F#\v4.0\fsc.exe" -o:staging\sl4\Unquote.dll --noframework --define:TRACE --define:SILVERLIGHT --doc:staging\sl4\Unquote.xml --optimize+ -r:"C:\Program Files (x86)\Microsoft F#\Silverlight\Libraries\Client\v4.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Net.dll" -r:"C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Numerics.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.Browser.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Xml.dll" -r:"staging\sl4\Utils.dll" --target:library --warn:3 --warnaserror:76 --vserrors --LCID:1033 --utf8output --fullpaths --flaterrors --staticlink:Utils "C:\Users\Stephen\AppData\Local\Temp\Silverlight,Version=v4.0.AssemblyAttributes.fs" Unquote\AssemblyInfo.fs Unquote\DynamicOperators.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\Assertions.fs

REM zip builds for .NET 4.0...
cd staging
7z a -tzip ..\builds\Unquote-%versionNumber%.zip *
cd ..

REM preparing nuget dirs

mkdir nuget
mkdir nuget\lib
mkdir nuget\lib\net40
mkdir nuget\lib\sl4
copy Unquote.nuspec nuget

REM copy staging builds to nuget package...

copy staging\net40\Unquote.dll nuget\lib\net40\Unquote.dll
copy staging\net40\Unquote.xml nuget\lib\net40\Unquote.xml
copy staging\sl4\Unquote.dll nuget\lib\sl4\Unquote.dll
copy staging\sl4\Unquote.xml nuget\lib\sl4\Unquote.xml

REM create nuget package...

C:\NuGet\nuget.exe pack nuget\Unquote.nuspec
copy Unquote.%versionNumber%.nupkg builds
del Unquote.%versionNumber%.nupkg

REM cleanup...

pause

set /p versionNumber=

del builds\Unquote-%versionNumber%.zip
del builds\Unquote.%versionNumber%.nupkg

REM preparing staging dirs

mkdir staging
mkdir staging\net40
mkdir staging\sl4
copy LICENSE staging
copy NOTICE staging

REM building for .NET 4.0 ...

"C:\Program Files (x86)\Microsoft F#\v4.0\fsc.exe" -o:staging\net40\Utils.dll --noframework --define:TRACE --optimize+ -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v4.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Numerics.dll" --target:library --warn:3 --warnaserror:76 --LCID:1033 --utf8output --fullpaths --flaterrors "C:\Users\Stephen\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.fs" Utils\AssemblyInfo.fs Utils\MiscUtils.fs Utils\RegexUtils.fs Utils\PrintfUtils.fs Utils\ListExtensions.fs

"C:\Program Files (x86)\Microsoft F#\v4.0\fsc.exe" -o:staging\net40\Unquote.dll --noframework --define:TRACE --doc:staging\net40\Unquote.xml --optimize+ -r:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FSharp.Compiler\v4.0_4.0.0.0__b03f5f7f11d50a3a\FSharp.Compiler.dll -r:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FSharp.Compiler.Interactive.Settings\v4.0_4.0.0.0__b03f5f7f11d50a3a\FSharp.Compiler.Interactive.Settings.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v4.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Numerics.dll" -r:"staging\net40\Utils.dll" --target:library --warn:3 --warnaserror:76 --LCID:1033 --utf8output --fullpaths --flaterrors --staticlink:Utils "C:\Users\Stephen\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.fs" Unquote\AssemblyInfo.fs Unquote\DynamicOperators.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\Assertions.fs

del staging\net40\Utils.dll

REM building for sl4

"C:\Program Files (x86)\Microsoft F#\v4.0\fsc.exe" -o:staging\sl4\Utils.dll --noframework --define:TRACE --define:SILVERLIGHT --optimize+ -r:"C:\Program Files (x86)\Microsoft F#\Silverlight\Libraries\Client\v4.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Net.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.Browser.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Xml.dll" --target:library --warn:3 --warnaserror:76 --LCID:1033 --utf8output --fullpaths --flaterrors "C:\Users\Stephen\AppData\Local\Temp\Silverlight,Version=v4.0.AssemblyAttributes.fs" Utils\AssemblyInfo.fs Utils\MiscUtils.fs Utils\RegexUtils.fs Utils\PrintfUtils.fs Utils\ListExtensions.fs

"C:\Program Files (x86)\Microsoft F#\v4.0\fsc.exe" -o:staging\sl4\Unquote.dll --noframework --define:TRACE --define:SILVERLIGHT --doc:staging\sl4\Unquote.xml --optimize+ -r:"C:\Program Files (x86)\Microsoft F#\Silverlight\Libraries\Client\v4.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Net.dll" -r:"C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Numerics.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.Browser.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Xml.dll" -r:"staging\sl4\Utils.dll" --target:library --warn:3 --warnaserror:76 --vserrors --LCID:1033 --utf8output --fullpaths --flaterrors --staticlink:Utils "C:\Users\Stephen\AppData\Local\Temp\Silverlight,Version=v4.0.AssemblyAttributes.fs" Unquote\AssemblyInfo.fs Unquote\DynamicOperators.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\Assertions.fs

del staging\sl4\Utils.dll

REM zip builds for .NET 4.0...
cd staging
7z a -tzip ..\builds\Unquote-%versionNumber%.zip *
cd ..

REM preparing nuget dirs

mkdir nuget
mkdir nuget\lib
mkdir nuget\lib\net40
mkdir nuget\lib\sl4
copy Unquote.nuspec nuget

REM copy staging builds to nuget package...

copy staging\net40\Unquote.dll nuget\lib\net40\Unquote.dll
copy staging\net40\Unquote.xml nuget\lib\net40\Unquote.xml
copy staging\sl4\Unquote.dll nuget\lib\sl4\Unquote.dll
copy staging\sl4\Unquote.xml nuget\lib\sl4\Unquote.xml

REM create nuget package...

C:\NuGet\nuget.exe pack nuget\Unquote.nuspec
copy Unquote.%versionNumber%.nupkg builds
del Unquote.%versionNumber%.nupkg

REM cleanup...

del /q staging\net40\*.*
del staging\net40
del /q staging\sl4\*.*
del staging\sl4
del staging

del /q nuget\lib\net40\*.*
del nuget\lib\net40
del /q nuget\lib\sl4\*.*
del nuget\lib\sl4
del nuget\lib
del staging

pause

build fixes

build fixes


@echo off
cd %~dp0

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

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

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

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

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

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

@echo off
cd %~dp0

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

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

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

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

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

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

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


@echo off
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


::#!
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: {{{1 :::::::^::::
:: Copyright © 2013 Martin Krischik
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: $Author$
:: $Revision$
:: $Date$
:: $Id$
:: $HeadURL$
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: }}}1 :::::::::::
@ECHO OFF

SETLOCAL
    SET PATH=%PATH%;C:\opt\Git\bin
    SET PATH=%PATH%;C:\opt\Scala\2.10.0\bin

    CALL scala -language:postfixOps -save %~f0 %*
ENDLOCAL

GOTO :eof
::!#

import scala.sys.process._

val M2_Home      = System.getenv ("M2_HOME")
val Maven_Deploy = System.getenv ("MAVEN_DEPLOY")
val Project_Name = System.getenv ("PROJECT_NAME")
val Maven_Name   = Project_Name +" Maven Repository"
val mvn          = if (System.getProperty ("os.name") contains "Windows")
    {
        "cmd" :: "/C" :: M2_Home + "\\bin\\mvn" :: Nil
    }
    else
    {
        "mvn" :: Nil
    }

mvn ::: "--fail-at-end" :: "install" :: Nil !;
mvn :::
    "--fail-at-end"				::
    "--define" :: "repo.id="   + Project_Name	::
    "--define" :: "repo.name=" + Maven_Name	::
    "--define" :: "repo.url="  + Maven_Deploy	::
    "deploy"   :: Nil !;

// vim: set wrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab :
// vim: set textwidth=0 filetype=scala foldmethod=marker nospell :

deploy script.

deploy script.


@echo off
if "%1"=="" goto none
goto %1

:benchmark
ghc --make Main -odir obj\o -hidir obj\o -O -o tagsoup_o.exe
tagsoup_o.exe time
tagsoup_o.exe timefile ketil.xml
goto end

:profile
ghc --make Main -odir obj\p -hidir obj\p -O -o -prof -auto-all tagsoup_p.exe
tagsoup_p.exe time +RTS -p
ren tagsoup_p.prof tagsoup_p_time.prof
tagsoup_p.exe timefile ketil.xml +RTS -p
ren tagsoup_p.prof tagsoup_p_ketil.prof
goto end

:dump
echo dump here
goto end

:none
echo Enter command, try one of:
echo benchmark, profile, dump
goto end

:end

Add a cmds file to help executing common commands


@echo off
goto :main

======================================================================
Perform a clean build, run tests and create NuGet packages for this
solution. Note that this also modifies the following file, replacing
placeholder version numbers with actual version numbers:
    src\common\GlobalAssemblyInfo.cs

(see the SetVersionNumber task in xunit.performance.msbuild)

This file will, therefore, show up as modified after the build.
Be careful NOT to check it in that way!

If you publish these packages to Nuget, then please remember to
bump the build number on BuildSemanticVersion below.
======================================================================

:main
setlocal

set BuildAssemblyVersion=1.0.0.24
set BuildSemanticVersion=1.0.0-alpha-build0024

echo Building version %BuildSemanticVersion% NuGet packages.
echo WARNING: Some source files will be modified during this build.
echo WARNING: Please be careful not to check in those modifications.

msbuild.exe /m /nologo /t:Nightly /v:m /fl xunit.performance.msbuild

goto :eof

@echo off
goto :main

======================================================================
Perform a clean build, run tests and create NuGet packages for this
solution. Note that this also modifies the following file, replacing
placeholder version numbers with actual version numbers:
    src\common\GlobalAssemblyInfo.cs

(see the SetVersionNumber task in xunit.performance.msbuild)

This file will, therefore, show up as modified after the build.
Be careful NOT to check it in that way!

If you publish these packages to Nuget, then please remember to
bump the build number on BuildSemanticVersion below.
======================================================================

:main
setlocal

set BuildAssemblyVersion=1.0.0.25
set BuildSemanticVersion=1.0.0-alpha-build0025

echo Building version %BuildSemanticVersion% NuGet packages.
echo WARNING: Some source files will be modified during this build.
echo WARNING: Please be careful not to check in those modifications.

msbuild.exe /m /nologo /t:Nightly /v:m /fl xunit.performance.msbuild

goto :eof

Bump build number

Bump build number


@echo off
goto :main

======================================================================
Perform a clean build, run tests and create NuGet packages for this
solution. Note that this also modifies the following file, replacing
placeholder version numbers with actual version numbers:
    src\common\GlobalAssemblyInfo.cs

(see the SetVersionNumber task in xunit.performance.msbuild)

This file will, therefore, show up as modified after the build.
Be careful NOT to check it in that way!

If you publish these packages to Nuget, then please remember to
bump the build number on BuildSemanticVersion below.
======================================================================

:main
setlocal

set BuildAssemblyVersion=1.0.0.26
set BuildSemanticVersion=1.0.0-alpha-build0026

echo Building version %BuildSemanticVersion% NuGet packages.
echo WARNING: Some source files will be modified during this build.
echo WARNING: Please be careful not to check in those modifications.

msbuild.exe /m /nologo /t:Nightly /v:m /fl xunit.performance.msbuild

goto :eof

@echo off
goto :main

======================================================================
Perform a clean build, run tests and create NuGet packages for this
solution. Note that this also modifies the following file, replacing
placeholder version numbers with actual version numbers:
    src\common\GlobalAssemblyInfo.cs

(see the SetVersionNumber task in xunit.performance.msbuild)

This file will, therefore, show up as modified after the build.
Be careful NOT to check it in that way!

If you publish these packages to Nuget, then please remember to
bump the build number on BuildSemanticVersion below.
======================================================================

:main
setlocal

set BuildAssemblyVersion=1.0.0.27
set BuildSemanticVersion=1.0.0-alpha-build0027

echo Building version %BuildSemanticVersion% NuGet packages.
echo WARNING: Some source files will be modified during this build.
echo WARNING: Please be careful not to check in those modifications.

msbuild.exe /m /nologo /t:Nightly /v:m /fl xunit.performance.msbuild

goto :eof

Bump version number

Bump version number


@echo off
setlocal enabledelayedexpansion

rem ================================================================================
rem Virtio-win master build script
rem
rem Usage: build.bat <project_or_solution_file_path> <target_os_versions> [<args>]
rem
rem where args can be one or more of
rem   Debug, dbg, chk       .. to build Debug rather than the default release flavor
rem   amd64, x64, 64        .. to build only 64-bit driver
rem   x86, 32               .. to build only 32-bit driver
rem   /Option               .. build command to pass to VS, for example /Rebuild
rem   Win7, Win8, Win10..   .. target OS version
rem
rem By default the script performs an incremental build of both 32-bit and 64-bit
rem release drivers for all supported target OSes.
rem
rem To do a Static Driver Verifier build, append _SDV to the target OS version, for
rem example Win10_SDV.
rem ================================================================================

rem This is a list of supported build target specifications A_B where A is the
rem VS project configuration name and B is the corresponding platform identifier
rem used in log file names and intemediate directory names. Either of the two can
rem be used in the <target_os_version> command line argument.
set SUPPORTED_BUILD_SPECS=WinXP_wxp Win2k3_wnet Vista_wlh Win7_win7 Win8_win8 Win8.1_win81 Win10_win10

set BUILD_TARGETS=%~2
set BUILD_DIR=%~dp1
set BUILD_FILE=%~nx1

rem We do an incremental Release build for all specs and all archs by default
set BUILD_FLAVOR=Release
set BUILD_COMMAND=/Build
set BUILD_SPEC=
set BUILD_ARCH=
set BUILD_FAILED=

rem Parse arguments
:argloop
shift /2
if "%2"=="" goto argend
set ARG=%2
if "%ARG:~0,1%"=="/" set BUILD_COMMAND=%ARG%& goto :argloop

if /I "%ARG%"=="Debug" set BUILD_FLAVOR=Debug& goto :argloop
if /I "%ARG%"=="dbg" set BUILD_FLAVOR=Debug& goto :argloop
if /I "%ARG%"=="chk" set BUILD_FLAVOR=Debug& goto :argloop

if /I "%ARG%"=="amd64" set BUILD_ARCH=amd64& goto :argloop
if /I "%ARG%"=="64" set BUILD_ARCH=amd64& goto :argloop
if /I "%ARG%"=="x64" set BUILD_ARCH=amd64& goto :argloop
if /I "%ARG%"=="32" set BUILD_ARCH=x86& goto :argloop
if /I "%ARG%"=="x86" set BUILD_ARCH=x86& goto :argloop

rem Assume that this is target OS version and split off the tag
call :split_target_tag "%ARG%"

rem Verify that this target OS is supported and valid
for %%N in (%SUPPORTED_BUILD_SPECS%) do (
  set T=%%N
  set CANDIDATE_SPEC=
  set FOUND_MATCH=

  for %%A in ("!T:_=" "!") do (
    if /I %%A=="%TARGET%" set CANDIDATE_SPEC=!T!!TAG!
    for %%B in (%BUILD_TARGETS%) do (
      if /I %%B==%%~A!TAG! set FOUND_MATCH=1
    )
  )

  if not "!FOUND_MATCH!"=="" if not "!CANDIDATE_SPEC!"=="" (
    set BUILD_SPEC=!CANDIDATE_SPEC!
    goto :argloop
  )
)

rem Silently exit if the build target could not be matched
goto :eof

rem Figure out which targets we're building
:argend
if "%BUILD_SPEC%"=="" (
  for %%B in (%BUILD_TARGETS%) do (
    call :split_target_tag "%%B"
    for %%N in (%SUPPORTED_BUILD_SPECS%) do (
      set T=%%N
      set BUILD_SPEC=
      for %%A in ("!T:_=" "!") do (
        if /I %%A=="!TARGET!" set BUILD_SPEC=!T!!TAG!
      )
      if not "!BUILD_SPEC!"=="" (
        call :build_target !BUILD_SPEC!
        if not "!BUILD_FAILED!"=="" goto :eof
      )
    )
  )
) else (
  call :build_target %BUILD_SPEC%
)
goto :eof

rem Figure out which archs we're building
:build_target
if "%BUILD_ARCH%"=="" (
  call :build_arch %1 x86
  if not "!BUILD_FAILED!"=="" goto :eof
  call :build_arch %1 amd64
) else (
  call :build_arch %1 %BUILD_ARCH%
)
goto :eof

rem Invoke Visual Studio
:build_arch
setlocal
set BUILD_ARCH=%2
set TAG=
for /f "tokens=1 delims=_" %%T in ("%1") do (
  set TARGET_PROJ_CONFIG=%%T
)
for /f "tokens=2 delims=_" %%T in ("%1") do (
  set TARGET_PLATFORM=%%T
)
for /f "tokens=3 delims=_" %%T in ("%1") do (
  set TAG=%%T
)

rem There is no 64-bit XP build
if /I "%1"=="WinXP_wxp" if /I "%BUILD_ARCH%"=="amd64" goto :eof

if /I "!TAG!"=="SDV" (
  rem There is no 32-bit SDV build
  if %BUILD_ARCH%==x86 goto :eof
  rem Check the SDV build suppression variable
  if not "%_BUILD_DISABLE_SDV%"=="" (
    echo Skipping %TARGET_PROJ_CONFIG% SDV build because _BUILD_DISABLE_SDV is set
    goto :eof
  )
)

rem Compose build log file name
if %BUILD_FLAVOR%=="Debug" (
  set BUILD_LOG_FILE=buildchk
) else (
  set BUILD_LOG_FILE=buildfre
)
set BUILD_LOG_FILE=%BUILD_LOG_FILE%_%TARGET_PLATFORM%_%BUILD_ARCH%.log

if %BUILD_ARCH%==amd64 set BUILD_ARCH=x64
set TARGET_VS_CONFIG="%TARGET_PROJ_CONFIG% %BUILD_FLAVOR%|%BUILD_ARCH%"

pushd %BUILD_DIR%
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64

if /I "!TAG!"=="SDV" (
  echo Running SDV for %BUILD_FILE%, configuration %TARGET_VS_CONFIG%
  call :runsdv "%TARGET_PROJ_CONFIG% %BUILD_FLAVOR%" %BUILD_ARCH%
) else (
  echo Building %BUILD_FILE%, configuration %TARGET_VS_CONFIG%, command %BUILD_COMMAND%
  call %~dp0\callVisualStudio.bat 14 %BUILD_FILE% %BUILD_COMMAND% %TARGET_VS_CONFIG% /Out %BUILD_LOG_FILE%
)
popd
endlocal

IF ERRORLEVEL 1 (
  set BUILD_FAILED=1
)
goto :eof

:runsdv
msbuild.exe %BUILD_FILE% /t:clean /p:Configuration="%~1" /P:Platform=%2
msbuild.exe %BUILD_FILE% /t:sdv /p:inputs="/clean" /p:Configuration="%~1" /P:platform=%2
msbuild.exe %BUILD_FILE% /p:Configuration="%~1" /P:Platform=%2 /P:RunCodeAnalysisOnce=True
msbuild.exe %BUILD_FILE% /t:sdv /p:inputs="/devenv /check" /p:Configuration="%~1" /P:platform=%2
msbuild.exe %BUILD_FILE% /t:dvl /p:Configuration="%~1" /P:platform=%2
goto :eof

:split_target_tag
set TARGET=
set TAG=
for /f "tokens=1 delims=_" %%T in (%1) do (
    set TARGET=%%T
)
for /f "tokens=2 delims=_" %%T in (%1) do (
    set TAG=_%%T
)
goto :eof

Introduce Tools/build.bat

Introduce Tools/build.bat

The per-driver buildAll.bat scripts are now nothing but
boilerplate and can be replaced with one shared build script.

This commit adds Tools/build.bat which is a drop-in replacement
for all buildAll.bat's. It handles regular builds, SDV builds,
can do Debug as well as Release, and /Build (incremental) as well
/Rebuild.

Subsequent commits will replace the contents of all copies of
buildAll.bat with only one line which calls Tools/build.bat.


@echo off

REM Use old Windows SDK 6.1 so created .exe will be compatible with
REM old Windows versions.
REM Windows SDK 6.1 may be downloaded at:
REM  http://www.microsoft.com/en-us/download/details.aspx?id=11310
set PATH_OLD=%PATH%

REM The SDK creates a false install of Visual Studio at one of these locations
set PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;%PATH%
set PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;%PATH%

REM set up the environment to compile to x86
call VCVARS32
if "%ERRORLEVEL%"=="0" (
  cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /SUBSYSTEM:CONSOLE /out:setuptools/cli-32.exe
  cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /SUBSYSTEM:WINDOWS /out:setuptools/gui-32.exe
) else (
  echo Windows SDK 6.1 not found to build Windows 32-bit version
)

REM buildout (and possibly other implementations) currently depend on
REM the 32-bit launcher scripts without the -32 in the filename, so copy them
REM there for now.
copy setuptools/cli-32.exe setuptools/cli.exe
copy setuptools/gui-32.exe setuptools/gui.exe

REM now for 64-bit
REM Use the x86_amd64 profile, which is the 32-bit cross compiler for amd64
call VCVARSx86_amd64
if "%ERRORLEVEL%"=="0" (
  cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:CONSOLE /out:setuptools/cli-64.exe
  cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:WINDOWS /out:setuptools/gui-64.exe
) else (
  echo Windows SDK 6.1 not found to build Windows 64-bit version
)

set PATH=%PATH_OLD%

Change line endings for `.cmd` file to CRLF

This is more compatible with users who don't transform all newlines to
CRLF on Windows.


@echo off
setlocal

if "%1" == "auto" goto AUTO
if "%1" == "backup" goto BACKUP
if "%1" == "branch" goto BRANCH
if "%1" == "clean" goto CLEAN
if "%1" == "green" goto GREEN
if "%1" == "merge_branch" goto MERGE_BRANCH
if "%1" == "merge_trunk" goto MERGE_TRUNK
if "%1" == "repos_root" goto REPOS_ROOT
if "%1" == "tag" goto TAG
if "%1" == "admin_dump" goto ADMIN_DUMP

echo "error input"
goto END

:AUTO
call %GLADIATOR_HOME%/Scripts/svn/svn_auto.bat
@echo off
goto END

:BACKUP
call %GLADIATOR_HOME%/Scripts/svn/svn_back_modified.bat
@echo off
goto END

:BRANCH
call %GLADIATOR_HOME%/Scripts/svn/svn_branch.bat %2
@echo off
goto END

:CLEAN
call %GLADIATOR_HOME%/Scripts/svn/svn_clean_unversion.bat
@echo off
goto END

:GREEN
call %GLADIATOR_HOME%/Scripts/svn/svn_green.bat
@echo off
goto END

:MERGE_BRANCH
call %GLADIATOR_HOME%/Scripts/svn/svn_merge_branch.bat %2
@echo off
goto END

:MERGE_TRUNK
call %GLADIATOR_HOME%/Scripts/svn/svn_merge_trunk.bat
@echo off
goto END

:REPOS_ROOT
call %GLADIATOR_HOME%/Scripts/svn/svn_repos_root.bat
@echo off
goto END

:TAG
call %GLADIATOR_HOME%/Scripts/svn/svn_tag.bat %2
@echo off
goto END

:ADMIN_DUMP
call %GLADIATOR_HOME%/Scripts/svn/svn_admin_dump.bat %2
@echo off
goto END

:END
endlocal
@echo on

@echo off
setlocal

if "%1" == "auto" goto AUTO
if "%1" == "backup" goto BACKUP
if "%1" == "branch" goto BRANCH
if "%1" == "clean" goto CLEAN
if "%1" == "green" goto GREEN
if "%1" == "merge_branch" goto MERGE_BRANCH
if "%1" == "merge_trunk" goto MERGE_TRUNK
if "%1" == "repos_root" goto REPOS_ROOT
if "%1" == "tag" goto TAG
if "%1" == "admin_dump" goto ADMIN_DUMP

echo "error input"
goto END

:AUTO
call %GLADIATOR_HOME%/Scripts/svn/svn_auto.bat
@echo off
goto END

:BACKUP
call %GLADIATOR_HOME%/Scripts/svn/svn_bak_modified.bat
@echo off
goto END

:BRANCH
call %GLADIATOR_HOME%/Scripts/svn/svn_branch.bat %2
@echo off
goto END

:CLEAN
call %GLADIATOR_HOME%/Scripts/svn/svn_clean_unversion.bat
@echo off
goto END

:GREEN
call %GLADIATOR_HOME%/Scripts/svn/svn_green.bat
@echo off
goto END

:MERGE_BRANCH
call %GLADIATOR_HOME%/Scripts/svn/svn_merge_branch.bat %2
@echo off
goto END

:MERGE_TRUNK
call %GLADIATOR_HOME%/Scripts/svn/svn_merge_trunk.bat
@echo off
goto END

:REPOS_ROOT
call %GLADIATOR_HOME%/Scripts/svn/svn_repos_root.bat
@echo off
goto END

:TAG
call %GLADIATOR_HOME%/Scripts/svn/svn_tag.bat %2
@echo off
goto END

:ADMIN_DUMP
call %GLADIATOR_HOME%/Scripts/svn/svn_admin_dump.bat %2
@echo off
goto END

:END
endlocal
@echo on

call svn_bak_modified.bat

[Scripts] call svn_bak_modified.bat


rmdir classes
md classes
xcopy /E /Y src classes\
"%JDK6%\bin\java" -cp src;classes;../../../3rdpartypublic/classext/clojure.jar;../../../3rdpartypublic/classext/clojure-contrib.jar;../../../3rdpartypublic/classext/ij.jar;../../../3rdpartypublic/classext/bsh-2.0b4.jar;../../mmstudio/MMJ_.jar;../../MMCoreJ_wrap/MMCoreJ.jar;../../acqEngine/MMAcqEngine.jar -Dclojure.compile.path=classes -server clojure.lang.Compile org.micromanager.browser.plugin
"%JDK6%\bin\jar" cvf DataBrowser.jar -C classes\ .
copy /Y DataBrowser.jar "\Program Files\ImageJ\mmplugins\"
copy /Y DataBrowser.jar ..\..\Install_AllPlatforms\micro-manager\mmplugins\

rmdir classes
md classes
xcopy /E /Y src classes\
"%JDK6%\bin\java" -cp src;classes;../../../3rdpartypublic/classext/clojure.jar;../../../3rdpartypublic/classext/clojure-contrib.jar;../../../3rdpartypublic/classext/ij.jar;../../../3rdpartypublic/classext/bsh-2.0b4.jar;../../mmstudio/MMJ_.jar;../../MMCoreJ_wrap/MMCoreJ.jar;../../acqEngine/MMAcqEngine.jar -Djava.library.path=../../bin_Win32 -Dclojure.compile.path=classes -server clojure.lang.Compile org.micromanager.browser.plugin
"%JDK6%\bin\jar" cvf DataBrowser.jar -C classes\ .
copy /Y DataBrowser.jar "\Program Files\ImageJ\mmplugins\"
copy /Y DataBrowser.jar ..\..\Install_AllPlatforms\micro-manager\mmplugins\

Fix missing java.library.path

Fix missing java.library.path

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@7332 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd


@echo off

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

if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"

if "%OS%"=="Windows_NT" @setlocal
if "%OS%"=="WINNT" @setlocal

rem %~dp0 is expanded pathname of the current script under NT
set DEFAULT_ANT_HOME=%~dp0..

if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
set DEFAULT_ANT_HOME=

set _USE_CLASSPATH=yes

rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).
set ANT_CMD_LINE_ARGS=%1
if ""%1""=="""" goto doneStart
shift
:setupArgs
if ""%1""=="""" goto doneStart
if ""%1""==""-noclasspath"" goto clearclasspath
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
shift
goto setupArgs

rem here is there is a -noclasspath in the options
:clearclasspath
set _USE_CLASSPATH=no
shift
goto setupArgs

rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.

:doneStart
rem find ANT_HOME if it does not exist due to either an invalid value passed
rem by the user or the %0 problem on Windows 9x
if exist "%ANT_HOME%\lib\ant.jar" goto checkJava

rem check for ant in Program Files
if not exist "%ProgramFiles%\ant" goto checkSystemDrive
set ANT_HOME=%ProgramFiles%\ant
goto checkJava

:checkSystemDrive
rem check for ant in root directory of system drive
if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
set ANT_HOME=%SystemDrive%\ant
goto checkJava

:checkCDrive
rem check for ant in C:\ant for Win9X users
if not exist C:\ant\lib\ant.jar goto noAntHome
set ANT_HOME=C:\ant
goto checkJava

:noAntHome
echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
goto end

:checkJava
set _JAVACMD=%JAVACMD%

if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
goto checkJikes

:noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=java.exe

:checkJikes
if not "%JIKESPATH%"=="" goto runAntWithJikes

:runAnt
if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
if not "%CLASSPATH%"=="" goto runAntWithClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
goto end

:runAntNoClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
goto end

:runAntWithClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
goto end

:runAntWithJikes
if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath

:runAntWithJikesNoClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
goto end

:runAntWithJikesAndClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
goto end

:end
set _JAVACMD=
set ANT_CMD_LINE_ARGS=

if "%OS%"=="Windows_NT" @endlocal
if "%OS%"=="WINNT" @endlocal

:mainEnd
if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"

@echo off

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

if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"

if "%OS%"=="Windows_NT" @setlocal
if "%OS%"=="WINNT" @setlocal

rem %~dp0 is expanded pathname of the current script under NT
set DEFAULT_ANT_HOME=%~dp0..

if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
set DEFAULT_ANT_HOME=

set _USE_CLASSPATH=yes

rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).
set ANT_CMD_LINE_ARGS=%1
if ""%1""=="""" goto doneStart
shift
:setupArgs
if ""%1""=="""" goto doneStart
if ""%1""==""-noclasspath"" goto clearclasspath
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
shift
goto setupArgs

rem here is there is a -noclasspath in the options
:clearclasspath
set _USE_CLASSPATH=no
shift
goto setupArgs

rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.

:doneStart
rem find ANT_HOME if it does not exist due to either an invalid value passed
rem by the user or the %0 problem on Windows 9x
if exist "%ANT_HOME%\lib\ant.jar" goto checkJava

rem check for ant in Program Files
if not exist "%ProgramFiles%\ant" goto checkSystemDrive
set ANT_HOME=%ProgramFiles%\ant
goto checkJava

:checkSystemDrive
rem check for ant in root directory of system drive
if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
set ANT_HOME=%SystemDrive%\ant
goto checkJava

:checkCDrive
rem check for ant in C:\ant for Win9X users
if not exist C:\ant\lib\ant.jar goto noAntHome
set ANT_HOME=C:\ant
goto checkJava

:noAntHome
echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
goto ende

:checkJava
set _JAVACMD=%JAVACMD%

if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
goto checkJikes

:noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=java.exe

:checkJikes
if not "%JIKESPATH%"=="" goto runAntWithJikes

:runAnt
if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
if not "%CLASSPATH%"=="" goto runAntWithClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
goto ende

:runAntNoClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
goto ende

:runAntWithClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
goto ende

:runAntWithJikes
if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath

:runAntWithJikesNoClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
goto ende

:runAntWithJikesAndClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
goto ende

:ende
set _JAVACMD=
set ANT_CMD_LINE_ARGS=

if "%OS%"=="Windows_NT" @endlocal
if "%OS%"=="WINNT" @endlocal

:mainEnd
if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"

fix for GRAILS-418

fix for GRAILS-418

git-svn-id: 29aad96320b2a07b98332cd568fc1316025c072f@1780 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d


@echo off

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

REM Run with -notest to skip the unit tests

@echo on

@set jvmarg=""
@if "%~1"=="" goto execute
@if "%~1"=="-notest" goto notest
@goto usage

@:usage
@echo off
echo Usage: extractAndBuild.bat [-notest]
@echo on
@goto exit

@:notest
@set jvmarg="-Dmaven.test.skip=true"
@goto execute

@:execute
svn checkout http://svn.apache.org/repos/asf/incubator/uima/uimaj/trunk
cd trunk\uimaj
call mvn %jvmarg%  -Duima.build.date="%date% %time%" install
cd ..
cd uimaj-distr
call mvn assembly:assembly

@:exit

@echo off

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

REM Run with -notest to skip the unit tests

@echo on

@if "%~1"=="" goto usage
@if "%~1"=="trunk" goto trunk
@set level=tags/%~1
@set leveldir=%~1
@goto checktest

@:trunk
@set level=trunk
@set leveldir=trunk
@goto checktest

@:checktest
@set jvmarg=
@if "%~2"=="" goto execute
@if "%~2"=="-notest" goto notest
@goto usage

@:usage
@echo off
echo Usage: extractAndBuild.bat <level> [-notest]
@echo on
@goto exit

@:notest
@set jvmarg="-Dmaven.test.skip=true"
@goto execute

@:execute
svn checkout -r HEAD http://svn.apache.org/repos/asf/incubator/uima/uimaj/%level%
cd %leveldir%
cd uimaj
call mvn %jvmarg%  -Duima.build.date="%date% %time%" install
cd ..
cd uimaj-distr
call mvn assembly:assembly

@:exit

Update build script to allow specifying a level.  To build from trunk, specify
trunk as build level.

git-svn-id: 67f5ad311a3d1220c16f120748b212c18fe1c257@501065 13f79535-47bb-0310-9956-ffa450edef68


echo Running Windows build and testscript  %cd%/matlab/CIBuildAndTest.m
call "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -r "try, run('%cd%\matlab\CIBuildAndTest.m'), catch ex, disp(['Exception during CIBuildAndTest.m: ' ex.message]), exit(1), end, exit(0);"

if not "%ERRORLEVEL%" == "0" (
    echo Exit Code = %ERRORLEVEL%
	exit /b 1
)

echo Running Windows build and testscript  %cd%\matlab\CIBuildAndTest.m
call "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -r "try, run('%~dp0%\matlab\CIBuildAndTest.m'), catch ex, disp(['Exception during CIBuildAndTest.m: ' ex.message]), exit(1), end, exit(0);"

if not "%ERRORLEVEL%" == "0" (
    echo Exit Code = %ERRORLEVEL%
	exit /b 1
)

Update windows CI script to point to catch file calling directory


nexe src/electron.js -r public\ -r src\ -r package.json -r node_sqlite3_win64.rename  -r node_sqlite3_macos64.rename  -o app.exe
copy .\app.exe ..\nexe\app.exe /Y

pkg . --output vjs.exe
copy .\vjs.exe ..\nexe\vjs.exe /Y

Update make_windows.bat

Update make_windows.bat


mkdir build
cd build

cmake -G "NMake Makefiles" ^
      -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
      -D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
      -D CMAKE_BUILD_TYPE=Release ^
      ..

if errorlevel 1 exit 1

nmake dftatom
if errorlevel 1 exit 1

nmake install
if errorlevel 1 exit 1

mkdir build
cd build

cmake -G "NMake Makefiles" ^
      -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
      -D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
      -D CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE ^
      -D CMAKE_BUILD_TYPE=Release ^
      ..

if errorlevel 1 exit 1

nmake dftatom
if errorlevel 1 exit 1

nmake install
if errorlevel 1 exit 1

add export all symbols to cmake

add export all symbols to cmake


@echo off
REM initial cleanup
rd .\build\Release /s /q
rd .\build\Output /s /q
mkdir .\build\Release
mkdir .\build\Output

build\nuget.exe restore
REM build solution
build\msbuild.bat . /p:Configuration=Release /p:Platform=x86

REM copy web overlays
robocopy .\webOverlay .\build\Release\Files\Web /E

pause

@echo off
REM initial cleanup
rd .\build\Release /s /q
rd .\build\Output /s /q
mkdir .\build\Release
mkdir .\build\Output

build\nuget.exe restore
REM build solution
build\msbuild.bat . /p:Configuration=Release /p:Platform="Any CPU"

REM copy web overlays
robocopy .\webOverlay .\build\Release\Files\Web /E

pause

Misc: Adjust local build script to use AnyCPU builds


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

:default_value_python:
set pythonexe="c:\Python34_x64\python"
:custom_python:
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

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

:default_value_python:
set pythonexe="c:\Python35_x64\python"
:custom_python:
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

update build_script

update build_script