@echo Off

echo "argument 1 = [%1]"

set config=%1
if "%config%" == "" (
   set config=Release
)

echo "config = [%config%]"

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

echo "version = [%version%]"

REM variables
set msbuild=%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe

rem EDIT: set your msbuild for local debug
rem set msbuild=%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Community\MSBuild\15.0\Bin\MSBuild.exe

echo "msbuild = [%msbuild%]"

if "%nuget%" == "" (
  set nuget="c:\nuget\nuget.exe"
)

REM Build
echo
echo "====================> Build"

call "%msbuild%" SearchAThing.Sci.sln /t:Restore,Rebuild /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
if not "%errorlevel%"=="0" goto failure

REM Package
echo
echo "====================> Package"

mkdir Build
call %nuget% pack "src\SearchAThing.Sci.csproj" -symbols -o Build -p Configuration=%config% -Version %version%
if not "%errorlevel%"=="0" goto failure

REM Code Coverage
echo
echo "====================> Coverage"

call %nuget% install xunit.runner.console -Version 2.2.0 -OutputDirectory packages
if not "%errorlevel%"=="0" goto failure

call %nuget% install OpenCover -Version 4.6.519 -OutputDirectory packages
if not "%errorlevel%"=="0" goto failure

packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user -target:"packages\xunit.runner.console.2.2.0\tools\xunit.console.exe" -targetargs:".\tests\bin\Release\SearchAThing.Sci.Tests.dll -noshadow" -output:".\coverage.xml" "-filter:+[*]* -[*]Microsoft.Xna.*"
if not "%errorlevel%"=="0" goto failure

echo "---> ensuring codecov"
call npm install codecov -g > nul
if not "%errorlevel%"=="0" goto failure

echo "---> running codecov -f coverage.xml"
codecov -f coverage.xml
if not "%errorlevel%"=="0" goto failure

REM EDIT: uncommen follows exit for local debug
rem goto debugend

:success
exit 0

:failure
exit -1

:debugend

@echo Off

echo "argument 1 = [%1]"

set config=%1
if "%config%" == "" (
   set config=Release
)

echo "config = [%config%]"

set version=
if not "%PackageVersion%" == "" (
   set version=-Version %PackageVersion%
)

echo "version = [%version%]"

REM variables
set msbuild=%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe

rem EDIT: set your msbuild for local debug
rem set msbuild=%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Community\MSBuild\15.0\Bin\MSBuild.exe

echo "msbuild = [%msbuild%]"

if "%nuget%" == "" (
  set nuget="c:\nuget\nuget.exe"
)

REM Build
echo
echo "====================> Build"

call "%msbuild%" SearchAThing.Sci.sln /t:Restore,Rebuild /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
if not "%errorlevel%"=="0" goto failure

REM Package
echo
echo "====================> Package"

mkdir Build
call %nuget% pack "src\SearchAThing.Sci.csproj" -symbols -o Build -p Configuration=%config% %version%
if not "%errorlevel%"=="0" goto failure

REM Code Coverage
echo
echo "====================> Coverage"

call %nuget% install xunit.runner.console -Version 2.2.0 -OutputDirectory packages
if not "%errorlevel%"=="0" goto failure

call %nuget% install OpenCover -Version 4.6.519 -OutputDirectory packages
if not "%errorlevel%"=="0" goto failure

packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user -target:"packages\xunit.runner.console.2.2.0\tools\xunit.console.exe" -targetargs:".\tests\bin\Release\SearchAThing.Sci.Tests.dll -noshadow" -output:".\coverage.xml"
if not "%errorlevel%"=="0" goto failure

echo "---> ensuring codecov"
rem call %nuget% install Codecov -Version 1.0.1 -OutputDirectory packages
rem if not "%errorlevel%"=="0" goto failure
call npm install codecov -g > nul
if not "%errorlevel%"=="0" goto failure

rem packages\Codecov.1.0.1\tools\codecov.exe -f coverage.xml -t %CODECOV_TOKEN%
echo "---> running codecov -f coverage.xml"
codecov -f coverage.xml
if not "%errorlevel%"=="0" goto failure

REM EDIT: uncommen follows exit for local debug
rem goto debugend

:success
exit 0

:failure
exit -1

:debugend

build reverted

build reverted


@echo off

rem check that makepbo exists before continuing
where /q makepbo
if ERRORLEVEL 1 (
    echo makepbo is missing. Ensure it is installed. It can be downloaded from:
    echo https://armaservices.maverick-applications.com/Products/MikerosDosTools/FileBrowserFree
    timeout 30
    exit /b
)

rem Remove and recreate build folder
if exist build rd /s /q build >NUL
if not exist build mkdir build >NUL

rem Create each mission with the framework files
for /D %%s in (Missionbasefiles\*) do (
	@echo %%~nxs
	xcopy %%s build\%%~nxs /s /e /i /q >NUL
	xcopy Missionframework\* build\%%~nxs /s /e /q >NUL
	makepbo -np build\%%~nxs build\%%~nxs.pbo >NUL
	rd /s /q build\%%~nxs >NUL
)

@echo off

rem Check that https://nodejs.org/en/download/ exists before continuing
where /q node
if ERRORLEVEL 1 (
    echo node is missing. Ensure it is installed. It can be downloaded from:
    echo https://nodejs.org/en/download/
    timeout 30
    exit /b
)

rem CD into build tool directory
cd %~dp0_tools

rem Install dependencies and build missions
call npm install --loglevel=error
call npx gulp

echo.

pause
exit /b

Update build.bat

Update build.bat


md %~dp0artifacts

"C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" /m /p:Configuration=Release "src\RabbitLink.sln"

@if %errorlevel% equ 0 (%~dp0util\nuget.exe pack %~dp0src\RabbitLink\RabbitLink.csproj -OutputDirectory %~dp0artifacts -Properties Configuration=Release)

pause

md %~dp0artifacts

%~dp0util\nuget.exe restore %~dp0src\RabbitLink.sln

@if %errorlevel% neq 0 ( pause & exit /b %errorlevel%)

"C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" /m /p:Configuration=Release "src\RabbitLink.sln"

@if %errorlevel% neq 0 ( pause & exit /b %errorlevel%)

%~dp0util\nuget.exe pack %~dp0src\RabbitLink\RabbitLink.csproj -OutputDirectory %~dp0artifacts -Properties Configuration=Release

pause

Build script update

Build script update


@echo off
cd %~dp0

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

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

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

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

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

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

@echo off
cd %~dp0

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

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

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

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

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

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

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


@echo off
setlocal
pushd "%~dp0"
call :main %*
popd
goto :EOF

:main
set MSBUILDEXE=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
if not exist "%MSBUILDEXE%" (
    echo The .NET Framework 4.0 does not appear to be installed on this
    echo machine, which is required to build the solution.
    exit /b 1
)
set EnableNuGetPackageRestore=true
for %%s in (src\*.sln) do for %%c in (debug release) do "%MSBUILDEXE%" %%s /p:Configuration=%%c /v:m %*

@echo off
setlocal
pushd "%~dp0"
call :main %*
popd
goto :EOF

:main
set MSBUILDEXE=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
if not exist "%MSBUILDEXE%" (
    echo The .NET Framework 4.0 does not appear to be installed on this
    echo machine, which is required to build the solution.
    exit /b 1
)
set EnableNuGetPackageRestore=true
call :build Debug && call :build Release
goto :EOF

:build
"%MSBUILDEXE%" src\NCrontab.sln /p:Configuration=%1 /v:m %2 %3 %4 %5 %6 %7 %8 %9
goto :EOF

Build script error propagation fix

Build script error propagation fix


rmdir /q /s gam
rmdir /q /s gam-64
rmdir /q /s build
rmdir /q /s dist
del /q /f gam-%1-windows.zip
del /q /f gam-%1-windows-x64.zip
del /q /f gam-%1-windows-x64.msi
del /q /f *.wixobj
del /q /f *.wixpdb

c:\python27-32\scripts\pyinstaller --clean -F --distpath=gam windows-gam.spec
xcopy LICENSE gam\
xcopy whatsnew.txt gam\
xcopy gam-setup.bat gam\
xcopy GamCommands.txt gam\
del gam\w9xpopen.exe
"%ProgramFiles%\7-Zip\7z.exe" a -tzip gam-%1-windows.zip gam\ -xr!.svn

c:\python27-64\scripts\pyinstaller --clean -F --distpath=gam-64 windows-gam.spec
xcopy LICENSE gam-64\
xcopy whatsnew.txt gam-64\
xcopy gam-setup.bat gam-64\
xcopy GamCommands.txt gam-64\
"%ProgramFiles%\7-Zip\7z.exe" a -tzip gam-%1-windows-x64.zip gam-64\ -xr!.svn

set GAMVERSION=%1
"%ProgramFiles(x86)%\WiX Toolset v3.10\bin\candle.exe" -arch x64 gam.wxs
"%ProgramFiles(x86)%\WiX Toolset v3.10\bin\light.exe" -ext "%ProgramFiles(x86)%\WiX Toolset v3.10\bin\WixUIExtension.dll" gam.wixobj -o gam-%1-windows-x64.msi
del /q /f gam-%1-windows-x64.wixpdb

rmdir /q /s gam
rmdir /q /s gam-64
rmdir /q /s build
rmdir /q /s dist
del /q /f gam-%1-windows.zip
del /q /f gam-%1-windows-x64.zip
del /q /f gam-%1-windows-x64.msi
del /q /f *.wixobj
del /q /f *.wixpdb

set WIXVERSION="3.11"

c:\python27-32\scripts\pyinstaller --clean -F --distpath=gam windows-gam.spec
xcopy LICENSE gam\
xcopy whatsnew.txt gam\
xcopy gam-setup.bat gam\
xcopy GamCommands.txt gam\
del gam\w9xpopen.exe
"%ProgramFiles%\7-Zip\7z.exe" a -tzip gam-%1-windows.zip gam\ -xr!.svn

c:\python27-64\scripts\pyinstaller --clean -F --distpath=gam-64 windows-gam.spec
xcopy LICENSE gam-64\
xcopy whatsnew.txt gam-64\
xcopy gam-setup.bat gam-64\
xcopy GamCommands.txt gam-64\
"%ProgramFiles%\7-Zip\7z.exe" a -tzip gam-%1-windows-x64.zip gam-64\ -xr!.svn

set GAMVERSION=%1
"%ProgramFiles(x86)%\WiX Toolset v%WIXVERSION%\bin\candle.exe" -arch x64 gam.wxs
"%ProgramFiles(x86)%\WiX Toolset v%WIXVERSION%\bin\light.exe" -ext "%ProgramFiles(x86)%\WiX Toolset v%WIXVERSION%\bin\WixUIExtension.dll" gam.wixobj -o gam-%1-windows-x64.msi
del /q /f gam-%1-windows-x64.wixpdb

Use WIX 3.11.1

Use WIX 3.11.1


git submodule update --init --recursive
 mkdir build_oce
cd build_oce
cmake -D OCE_INSTALL_PREFIX:STRING='C:/OCE-17' -D OCE_DRAW:BOOLEAN=FALSE -D OCE_OCAF:BOOLEAN=FALSE -D  OCE_VISUALISATION:BOOLEAN=FALSE -D OCE_DISABLE_X11:BOOLEAN=TRUE -D OCE_USE_PCH:BOOLEAN=TRUE  ../oce
REM msbuild /m oce.sln
msbuild /m oce.sln /p:Configuration=Release
set VisualStudioVersion=12.0
msbuild INSTALL.vcxproj /p:Configuration=Release

cd ..
SET CL=/Ic:\OCE-0.17\include\oce
SET LINK=/LIBPATH:c:\OCE-0.17\Win32\lib
PATH c:\OCE-0.17\Win32\bin;%PATH%
npm install

CALL git submodule update --init --recursive
mkdir build_oce
cd build_oce
SET PREFIX=C:/OCE-17

set GENERATOR=Visual Studio 11 2012
set VisualStudioVersion=11.0
CALL cmake -D OCE_INSTALL_PREFIX:STRING="%PREFIX%" -D OCE_DRAW:BOOLEAN=FALSE -D OCE_OCAF:BOOLEAN=FALSE -D  OCE_VISUALISATION:BOOLEAN=FALSE -D OCE_DISABLE_X11:BOOLEAN=TRUE -D OCE_DISABLE_TKSERVICE_FONT:BOOLEAN=TRUE -D OCE_USE_PCH:BOOLEAN=TRUE  -G "%GENERATOR%" ../oce
REM msbuild /m oce.sln
CALL msbuild /m oce.sln /p:Configuration=Release

CALL msbuild INSTALL.vcxproj /p:Configuration=Release

cd ..
SET CL=/I%PREFIX%/include/oce
SET LINK=/LIBPATH:%PREFIX%/Win32/lib
PATH %PREFIX%/Win32/bin;%PATH%
CALL npm install

add ability to load a study from server

add ability to load a study from server


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

set version=
if not "%PackageVersion%" == "" (
   set version=-Version %PackageVersion%
)

REM Build
"%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" "src\ITC.UnifaunOnline.sln" /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
if not "%errorlevel%"=="0" goto failure

REM Package
mkdir Build
call %nuget% pack "src\ITC.UnifaunOnline\ITC.UnifaunOnline.csproj" -symbols -o Build -p Configuration=%config% %version%
if not "%errorlevel%"=="0" goto failure

:success
exit 0

:failure
exit -1

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

set version=
if not "%PackageVersion%" == "" (
   set version=-Version %PackageVersion%
)

REM Package restore
call %NuGet% restore "src\ITC.UnifaunOnline.Tests\packages.config" -OutputDirectory %cd%\packages -NonInteractive

REM Build
"%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" "src\ITC.UnifaunOnline.sln" /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
if not "%errorlevel%"=="0" goto failure

REM Package
mkdir Build
call %nuget% pack "src\ITC.UnifaunOnline\ITC.UnifaunOnline.csproj" -symbols -o Build -p Configuration=%config% %version%
if not "%errorlevel%"=="0" goto failure

:success
exit 0

:failure
exit -1

build script package restore

build script package restore


@echo off

if not exist mercury-x64 mkdir mercury-x64

pushd mercury-x64
set CommonCompilerFlags=-Od -I.. -I..\glfw-3.1.1\include -MTd -fp:fast -fp:except- -Gm- -GR- -EHa- -Oi -W4
set CommonLinkerFlags= -incremental:no -opt:ref user32.lib gdi32.lib winmm.lib glfw3dll.lib opengl32.lib -libpath:..\glfw-x64\src\Release

cl %CommonCompilerFlags% ..\mercury.cpp /link %CommonLinkerFlags%
popd

@echo off

if not exist mercury-x64 mkdir mercury-x64

pushd mercury-x64
set CommonCompilerFlags=-nologo -Od -I.. -I..\glfw-3.1.1\include -MTd -fp:fast -fp:except- -Gm- -GR- -EHa- -Oi -W4 -WX -wd4201 -wd4100 -wd4189 -wd4505 -wd4127
set CommonLinkerFlags= -incremental:no -opt:ref user32.lib gdi32.lib winmm.lib glfw3dll.lib opengl32.lib -libpath:..\glfw-x64\src\Release

cl %CommonCompilerFlags% ..\mercury.cpp /link %CommonLinkerFlags%
popd

Add trivial warnings to ignore list

Add trivial warnings to ignore list


pip3 install pyinstaller

if exist .\dist rmdir .\dist /q /s

pyinstaller --onefile main.py

copy .\th06r.ico .\dist\

xcopy /E /I .\Bin .\dist\Bin

mkdir .\dist\in
mkdir .\dist\out

Add build script

Add build script


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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.15
:: ----------------------

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

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

:: Verify yarn installed
where yarn 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo "Missing yarn, installing via npm"
  call npm install yarn -g --silent
  IF !ERRORLEVEL! NEQ 0 goto error
  echo "Finished installing Yarn."
)

echo "Yarn installed, continuing to deployment"

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------
echo Handling function App deployment with custom build.cmd script.
echo "build.cmd running in directory %cd%"

:: Bootstrap packet
.paket\paket.bootstrapper.exe
IF !ERRORLEVEL! NEQ 0 goto error

:: Restore dotnet packages and publish dotnet projects
call dotnet restore
call dotnet publish -c Release
IF !ERRORLEVEL! NEQ 0 goto error

:: Restore node packages and build node projects
call yarn install
call yarn build
IF !ERRORLEVEL! NEQ 0 goto error

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

REM @echo off
REM cls

REM echo "build.cmd running in directory %cd%"

REM dotnet restore std-artist-tally-tool
REM dotnet build -c Release std-artist-tally-tool

REM REM .paket\paket.bootstrapper.exe
REM REM if errorlevel 1 (
REM REM   exit /b %errorlevel%
REM REM )

REM REM .paket\paket.exe restore --force
REM REM if errorlevel 1 (
REM REM   exit /b %errorlevel%
REM REM )

REM call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_TEMP%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
REM IF !ERRORLEVEL! NEQ 0 goto error

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.15
:: ----------------------

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

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

:: Verify yarn installed
where yarn 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo "Missing yarn, installing via npm"
  call npm install yarn -g --silent
  echo "Checking yarn install error level"
  IF !ERRORLEVEL! NEQ 0 goto error
  echo "Finished installing Yarn."
)

echo "Yarn installed, continuing to deployment"

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------
echo Handling function App deployment with custom build.cmd script.
echo "build.cmd running in directory %cd%"

:: Bootstrap packet
.paket\paket.bootstrapper.exe
IF !ERRORLEVEL! NEQ 0 goto error

:: Restore dotnet packages and publish dotnet projects
call dotnet restore
call dotnet publish -c Release
IF !ERRORLEVEL! NEQ 0 goto error

:: Restore node packages and build node projects
call yarn install
call yarn build
IF !ERRORLEVEL! NEQ 0 goto error

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

REM @echo off
REM cls

REM echo "build.cmd running in directory %cd%"

REM dotnet restore std-artist-tally-tool
REM dotnet build -c Release std-artist-tally-tool

REM REM .paket\paket.bootstrapper.exe
REM REM if errorlevel 1 (
REM REM   exit /b %errorlevel%
REM REM )

REM REM .paket\paket.exe restore --force
REM REM if errorlevel 1 (
REM REM   exit /b %errorlevel%
REM REM )

REM call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_TEMP%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
REM IF !ERRORLEVEL! NEQ 0 goto error

Add debug echoes

Add debug echoes


@ECHO OFF
PUSHD %~dp0

SETLOCAL
SETLOCAL ENABLEDELAYEDEXPANSION

IF NOT DEFINED VisualStudioVersion (
    IF DEFINED VS140COMNTOOLS (
        CALL "%VS140COMNTOOLS%\VsDevCmd.bat"
        GOTO :EnvSet
    )

    ECHO Error: build.cmd requires Visual Studio 2015.
    SET ERRORLEVEL=1
    GOTO :Exit
)

:EnvSet
SET BuildProj=%~dp0All.sln
SET Configuration=%1
IF '%Configuration%'=='' (
    SET Configuration=Release
)
SET CachedNuget=%LocalAppData%\NuGet\NuGet.exe

:: node.js nuget wrapper requires nuget.exe path in %PATH%
SET PATH=%PATH%;%LocalAppData%\NuGet

:: Check if DNU exists globally
:: DNU is OPTIONAL
SET BuildDnxProjects=1
WHERE dnvm
IF NOT '%ERRORLEVEL%'=='0' (
    ECHO WARNING: DNU is not installed globally, DNX related projects will not be built!
    SET BuildDnxProjects=0
    SET BuildProj=%~dp0NonDnx.sln
) ELSE (
  WHERE dnu
  IF NOT '!ERRORLEVEL!'=='0' (
    ECHO WARNING: DNU is correctly set, please manually select DNU by running `dnvm list` and `dnvm use`
    SET BuildDnxProjects=0
    SET BuildProj=%~dp0NonDnx.sln
  )
)

:: Check if node exists globally
WHERE node

IF NOT '%ERRORLEVEL%'=='0' (
    ECHO ERROR: build.cmd requires node installed gloablly.
    GOTO :Exit
)

:: Restore packages for .csproj projects

CALL :RestorePackage

:: Log build command line
SET BuildLog=%~dp0msbuild.log
SET BuildPrefix=echo
SET BuildPostfix=^> "%BuildLog%"

CALL :Build %*

:: Build
SET BuildPrefix=
SET BuildPostfix=
CALL :Build %*
IF NOT '%ErrorLevel%'=='0' (
    GOTO :AfterBuild
)

:GenerateNuget
PUSHD tools
:: Install npm packages
CALL npm install

:: GRUNT to generate nuget packages
CALL node node_modules/grunt-cli/bin/grunt --Configuration=%Configuration%

IF NOT '%ErrorLevel%'=='0' (
    SET NugetErrorLevel=1
)
POPD

:AfterBuild

:: Pull the build summary from the log file
ECHO.
ECHO === BUILD RESULT ===
findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%BuildLog%" & cd >nul
IF '%BuildDnxProjects%'=='0' (
   ECHO WARNING: DNX runtime is not successfully configured. Please follow http://docs.asp.net/en/latest/getting-started/installing-on-windows.html#install-the-net-version-manager-dnvm to install dnvm.
)

:: Pull xunit test result from the log file
ECHO.
ECHO === TEST EXECUTION SUMMARY ===
findstr /ir /c:"Total:.*Failed.*Skipped.*Time.*" "%BuildLog%" & cd >nul
ECHO Exit Code: %BuildErrorLevel%
SET ERRORLEVEL=%BuildErrorLevel%

:: Pull nuget package result
IF '%NugetErrorLevel%'=='1' (
    ECHO === GENERATING NUGET PACKAGES ===
    ECHO ERROR: GENERATING NUGET PACKAGES FAILED, TRY RUNNING `grunt` UNDER `tools` FOLDER MANUALLY!
    SET ERRORLEVEL=%NugetErrorLevel%
)

GOTO :Exit

:Build
%BuildPrefix% msbuild "%BuildProj%" /p:Configuration=%Configuration% /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%BuildLog%"; %BuildPostfix%
SET BuildErrorLevel=%ERRORLEVEL%
GOTO :Exit

:RestorePackage
:: Restore inside each subfolder
IF '%BuildDnxProjects%'=='0' (
GOTO :RestoreNormalPackage
)

FOR /D %%x IN ("src","docs","test") DO (
PUSHD %%x
CMD /C dnu restore --parallel
POPD
)

:RestoreNormalPackage
SET CachedNuget=%LocalAppData%\NuGet\NuGet.exe
IF EXIST "%CachedNuget%" GOTO :Restore
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 '%CachedNuget%'"

:Restore
:: Currently has corpnet dependency
nuget restore "%BuildProj%"

:Exit
POPD
ECHO.
EXIT /B %ERRORLEVEL%

@ECHO OFF
PUSHD %~dp0

SETLOCAL
SETLOCAL ENABLEDELAYEDEXPANSION

IF NOT DEFINED VisualStudioVersion (
    IF DEFINED VS140COMNTOOLS (
        CALL "%VS140COMNTOOLS%\VsDevCmd.bat"
        GOTO :EnvSet
    )

    ECHO Error: build.cmd requires Visual Studio 2015.
    SET ERRORLEVEL=1
    GOTO :Exit
)

:EnvSet
SET BuildProj=%~dp0All.sln
SET Configuration=%1
IF '%Configuration%'=='' (
    SET Configuration=Release
)
SET CachedNuget=%LocalAppData%\NuGet\NuGet.exe

:: node.js nuget wrapper requires nuget.exe path in %PATH%
SET PATH=%PATH%;%LocalAppData%\NuGet

:: Check if DNU exists globally
:: DNU is OPTIONAL
SET BuildDnxProjects=1
WHERE dnvm
IF NOT '%ERRORLEVEL%'=='0' (
    ECHO WARNING: DNU is not installed globally, DNX related projects will not be built!
    SET BuildDnxProjects=0
    SET BuildProj=%~dp0NonDnx.sln
) ELSE (
  WHERE dnu
  IF NOT '!ERRORLEVEL!'=='0' (
    ECHO WARNING: DNU is correctly set, please manually select DNU by running `dnvm list` and `dnvm use`
    SET BuildDnxProjects=0
    SET BuildProj=%~dp0NonDnx.sln
  )
)

:: Check if node exists globally
WHERE node

IF NOT '%ERRORLEVEL%'=='0' (
    ECHO ERROR: build.cmd requires node installed gloablly.
    GOTO :Exit
)

:: Restore packages for .csproj projects

CALL :RestorePackage

:: Log build command line
SET BuildLog=%~dp0msbuild.log
SET BuildPrefix=echo
SET BuildPostfix=^> "%BuildLog%"

CALL :Build %*

:: Build
SET BuildPrefix=
SET BuildPostfix=
CALL :Build %*
IF NOT '%ErrorLevel%'=='0' (
    GOTO :AfterBuild
)

:GenerateNuget
PUSHD tools
:: Install npm packages
CALL npm install

:: GRUNT to generate nuget packages
CALL node node_modules/grunt-cli/bin/grunt --Configuration=%Configuration%

IF NOT '%ErrorLevel%'=='0' (
    SET NugetErrorLevel=1
)
POPD

:AfterBuild

:: Pull the build summary from the log file
ECHO.
ECHO === BUILD RESULT ===
findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%BuildLog%" & cd >nul
IF '%BuildDnxProjects%'=='0' (
   ECHO WARNING: DNX runtime is not successfully configured. Please follow http://docs.asp.net/en/latest/getting-started/installing-on-windows.html#install-the-net-version-manager-dnvm to install dnvm.
)

:: Pull xunit test result from the log file
ECHO.
ECHO === TEST EXECUTION SUMMARY ===
findstr /ir /c:"Total:.*Failed.*Skipped.*Time.*" "%BuildLog%" & cd >nul
ECHO Exit Code: %BuildErrorLevel%
SET ERRORLEVEL=%BuildErrorLevel%

:: Pull nuget package result
IF '%NugetErrorLevel%'=='1' (
    ECHO === GENERATING NUGET PACKAGES ===
    ECHO ERROR: GENERATING NUGET PACKAGES FAILED, TRY RUNNING `grunt` UNDER `tools` FOLDER MANUALLY!
    SET ERRORLEVEL=%NugetErrorLevel%
)

GOTO :Exit

:Build
%BuildPrefix% msbuild "%BuildProj%" /p:Configuration=%Configuration% /nologo /maxcpucount:1 /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%BuildLog%"; %BuildPostfix%
SET BuildErrorLevel=%ERRORLEVEL%
GOTO :Exit

:RestorePackage
:: Restore inside each subfolder
IF '%BuildDnxProjects%'=='0' (
GOTO :RestoreNormalPackage
)

FOR /D %%x IN ("src","docs","test") DO (
PUSHD %%x
CMD /C dnu restore --parallel
POPD
)

:RestoreNormalPackage
SET CachedNuget=%LocalAppData%\NuGet\NuGet.exe
IF EXIST "%CachedNuget%" GOTO :Restore
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 '%CachedNuget%'"

:Restore
:: Currently has corpnet dependency
nuget restore "%BuildProj%"

:Exit
POPD
ECHO.
EXIT /B %ERRORLEVEL%

change msbuild to single thread to see if build error goes away


@echo off
rem Public domain
rem http://unlicense.org/
rem Created by Grigore Stefan <g_stefan@yahoo.com>

if "%1" == "" goto SelectDefaultPlatform
if not exist ".\port\build.%1.cmd" goto SelectDefaultPlatform
call ".\port\build.%1.cmd" %2
goto :eof
:SelectDefaultPlatform
set DEFAULT_PLATFORM=
if "%XYO_PLATFORM%" == "win64-msvc-2019" set DEFAULT_PLATFORM=msvc
if "%XYO_PLATFORM%" == "win32-msvc-2019" set DEFAULT_PLATFORM=msvc
if "%XYO_PLATFORM%" == "win64-msvc-2017" set DEFAULT_PLATFORM=msvc
if "%XYO_PLATFORM%" == "win32-msvc-2017" set DEFAULT_PLATFORM=msvc
if "%XYO_PLATFORM%" == "" goto Info
if not exist ".\port\build.%DEFAULT_PLATFORM%.cmd" goto Info
call ".\port\build.%DEFAULT_PLATFORM%.cmd" %1
goto :eof
:Info
echo build [platform] [mode]

@echo off
rem Public domain
rem http://unlicense.org/
rem Created by Grigore Stefan <g_stefan@yahoo.com>

if "%1" == "" goto SelectDefaultPlatform
if not exist ".\port\build.%1.cmd" goto SelectDefaultPlatform
call ".\port\build.%1.cmd" %2
goto :eof
:SelectDefaultPlatform
set DEFAULT_PLATFORM=
if "%XYO_PLATFORM%" == "win64-msvc-2019" set DEFAULT_PLATFORM=msvc
if "%XYO_PLATFORM%" == "win32-msvc-2019" set DEFAULT_PLATFORM=msvc
if "%XYO_PLATFORM%" == "win64-msvc-2017" set DEFAULT_PLATFORM=msvc
if "%XYO_PLATFORM%" == "win32-msvc-2017" set DEFAULT_PLATFORM=msvc
if "%DEFAULT_PLATFORM%" == "" set DEFAULT_PLATFORM=msvc
if not exist ".\port\build.%DEFAULT_PLATFORM%.cmd" goto Info
call ".\port\build.%DEFAULT_PLATFORM%.cmd" %1
goto :eof
:Info
echo build [platform] [mode]

build default platform

build default platform


@ECHO OFF
REM NOTE: This file was auto-generated with `IB.exe prepare` from `IntelliFactory.Build`.

setlocal
set PATH=%PATH%;%ProgramFiles(x86)%\Microsoft SDKs\F#\3.1\Framework\v4.0
set PATH=%PATH%;%ProgramFiles(x86)%\Microsoft SDKs\F#\3.0\Framework\v4.0
set PATH=%PATH%;%ProgramFiles%\Microsoft SDKs\F#\3.1\Framework\v4.0
set PATH=%PATH%;%ProgramFiles%\Microsoft SDKs\F#\3.0\Framework\v4.0
set PATH=%PATH%;tools\NuGet
nuget install IntelliFactory.Build -nocache -pre -ExcludeVersion -o tools\packages
fsi.exe --exec build.fsx %*

Rename Zafir packages to WebSharper

Rename Zafir packages to WebSharper


@echo off

.paket\paket.bootstrapper.exe
.paket\paket.exe install

Build script (Only does paket install for now)


@echo off
:: set path to erlang installation

SETLOCAL ENABLEDELAYEDEXPANSION

set ERL_R17_3=6.2
set ERL_R17_1=6.1
set ERL_R17=6.0
set ERL_R16B03=5.10.4
set ERL_R16B02=5.10.3
set ERL_R16B01=5.10.2
set ERL_R16B=5.10.1
set ERL_R15B03_1=5.9.3.1
set ERL_R15B03=5.9.3
set ERL_R15B02=5.9.2
set ERL_R15B01=5.9.1
set ERL_R15B=5.9
set ERL_R14B04=5.8.5
set ERL_R14B03=5.8.4
set ERL_R14B02=5.8.3
set ERL_R14B01=5.8.2
set ERL_R14B=5.8.1
set ERL_R14A=5.8
set ERL_R13B04=5.7.5
set ERL_R13B03=5.7.4
set ERL_R13B02=5.7.3
set ERL_R13B01=5.7.2
set ERL_ALL=%ERL_R17_3% %ERL_R17_1% %ERL_R17% %ERL_R16B03% %ERL_R16B02% %ERL_R16B01% %ERL_R16B% %ERL_R15B03_1% %ERL_R15B03% %ERL_R15B02% %ERL_R15B01% %ERL_R15B% %ERL_R14B04% %ERL_R14B03% %ERL_R14B02% %ERL_R14B01% %ERL_R14B% %ERL_R14A% %ERL_R13B04% %ERL_R13B03% %ERL_R13B02% %ERL_R13B01%
if not defined ERLANG_HOME (
    FOR %%c in (%ERL_ALL%) DO (
        FOR %%p in ("%ProgramFiles%\erl%%c" "%ProgramFiles(x86)%\erl%%c") DO (
            set FULL_PATH=%%p
            if exist !FULL_PATH! (
                set ERLANG_HOME=%%p
                goto found
            )
        )
    )
)

:found

echo ERLANG_HOME=%ERLANG_HOME%

ENDLOCAL & set ERLANG_HOME=%ERLANG_HOME%

@echo off
:: set path to erlang installation

SETLOCAL ENABLEDELAYEDEXPANSION

set ERL_R18_0=7.0
set ERL_R17_5=6.4 6.4.1
set ERL_R17_4=6.3 6.3.1
set ERL_R17_3=6.2 6.2.1
set ERL_R17_1=6.1 6.1.2 6.1.1
set ERL_R17=6.0 6.0.1
set ERL_R16B03=5.10.4 5.10.4.1
set ERL_R16B02=5.10.3 5.10.3.1
set ERL_R16B01=5.10.2
set ERL_R16B=5.10.1 5.10.1.1 5.10.1.2
set ERL_R15B03=5.9.3 5.9.3.1
set ERL_R15B02=5.9.2
set ERL_R15B01=5.9.1 5.9.1.1 5.9.1.2
set ERL_R15B=5.9 5.9.0.1
set ERL_R14B04=5.8.5
set ERL_ALL=%ERL_R18_0% %ERL_R17_5% %ERL_R17_4% %ERL_R17_3% %ERL_R17_1% %ERL_R17% %ERL_R16B03% %ERL_R16B02% %ERL_R16B01% %ERL_R16B% %ERL_R15B03% %ERL_R15B02% %ERL_R15B01% %ERL_R15B% %ERL_R14B04%
if not defined ERLANG_HOME (
    FOR %%c in (%ERL_ALL%) DO (
        FOR %%p in ("%ProgramFiles%\erl%%c" "%ProgramFiles(x86)%\erl%%c") DO (
            set FULL_PATH=%%p
            if exist !FULL_PATH! (
                set ERLANG_HOME=%%p
                goto found
            )
        )
    )
)

:found

echo ERLANG_HOME=%ERLANG_HOME%

ENDLOCAL & set ERLANG_HOME=%ERLANG_HOME%

windows: update find_erlang.bat for R14B04 <= Erlang <= 18.0


@echo off

echo.
echo Copying NuGet package spec from CSIRO.Metaheuristics to other assemblies.
echo.

set THIS_DIR=%~d0%~p0
REM set THIS_DIR=F:\src\github_jm\metaheuristics\build\
set src_nuspec=%THIS_DIR%..\CSIRO.Metaheuristics\CSIRO.Metaheuristics.nuspec
if not exist "%src_nuspec%" goto noSrcNuspec
if "%BuildConfiguration%" == "" set BuildConfiguration=Debug
set COPYOPTIONS=/Y /R /D

xcopy %src_nuspec% %THIS_DIR%..\CSIRO.Utilities\CSIRO.Utilities.nuspec %COPYOPTIONS%
xcopy %src_nuspec% %THIS_DIR%..\CSIRO.Metaheuristics.DataModel\CSIRO.Metaheuristics.DataModel.nuspec %COPYOPTIONS%
xcopy %src_nuspec% %THIS_DIR%..\CSIRO.Metaheuristics.Logging\CSIRO.Metaheuristics.Logging.nuspec %COPYOPTIONS%
xcopy %src_nuspec% %THIS_DIR%..\CSIRO.Metaheuristics.Parallel\CSIRO.Metaheuristics.Parallel.nuspec %COPYOPTIONS%
xcopy %src_nuspec% %THIS_DIR%..\CSIRO.Metaheuristics.R\CSIRO.Metaheuristics.R.nuspec %COPYOPTIONS%

set pkg_dir=%THIS_DIR%packages
if not exist "%pkg_dir%" mkdir %pkg_dir%
set pack_options=-IncludeReferencedProjects -Verbosity normal -Properties Configuration=%BuildConfiguration% -OutputDirectory %pkg_dir%

nuget pack %THIS_DIR%..\CSIRO.Utilities\CSIRO.Utilities.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics\CSIRO.Metaheuristics.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics.DataModel\CSIRO.Metaheuristics.DataModel.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics.Logging\CSIRO.Metaheuristics.Logging.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics.Parallel\CSIRO.Metaheuristics.Parallel.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics.R\CSIRO.Metaheuristics.R.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics.Tests\CSIRO.Metaheuristics.Tests.csproj %pack_options%

if errorlevel 1 goto bailOut

goto success

:noSrcNuspec
echo not found: source nuspec not found
exit /B 1

:bailOut
echo ERROR
exit /B 1

:success
echo Done!

@echo off

echo.
echo Copying NuGet package spec from CSIRO.Metaheuristics to other assemblies.
echo.

set THIS_DIR=%~d0%~p0
REM set THIS_DIR=F:\src\github_jm\metaheuristics\build\
set src_nuspec=%THIS_DIR%..\CSIRO.Metaheuristics\CSIRO.Metaheuristics.nuspec
if not exist "%src_nuspec%" goto noSrcNuspec
if not defined BuildConfiguration set BuildConfiguration=Debug
set COPYOPTIONS=/Y /R /D

xcopy %src_nuspec% %THIS_DIR%..\CSIRO.Utilities\CSIRO.Utilities.nuspec %COPYOPTIONS%
xcopy %src_nuspec% %THIS_DIR%..\CSIRO.Metaheuristics.DataModel\CSIRO.Metaheuristics.DataModel.nuspec %COPYOPTIONS%
xcopy %src_nuspec% %THIS_DIR%..\CSIRO.Metaheuristics.Logging\CSIRO.Metaheuristics.Logging.nuspec %COPYOPTIONS%
xcopy %src_nuspec% %THIS_DIR%..\CSIRO.Metaheuristics.Parallel\CSIRO.Metaheuristics.Parallel.nuspec %COPYOPTIONS%
xcopy %src_nuspec% %THIS_DIR%..\CSIRO.Metaheuristics.R\CSIRO.Metaheuristics.R.nuspec %COPYOPTIONS%

set pkg_dir=%THIS_DIR%packages
if not exist "%pkg_dir%" mkdir %pkg_dir%
set pack_options=-IncludeReferencedProjects -Verbosity normal -Properties Configuration=%BuildConfiguration% -OutputDirectory %pkg_dir%

nuget pack %THIS_DIR%..\CSIRO.Utilities\CSIRO.Utilities.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics\CSIRO.Metaheuristics.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics.DataModel\CSIRO.Metaheuristics.DataModel.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics.Logging\CSIRO.Metaheuristics.Logging.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics.Parallel\CSIRO.Metaheuristics.Parallel.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics.R\CSIRO.Metaheuristics.R.csproj %pack_options%
nuget pack %THIS_DIR%..\CSIRO.Metaheuristics.Tests\CSIRO.Metaheuristics.Tests.csproj %pack_options%

if errorlevel 1 goto bailOut

goto success

:noSrcNuspec
echo not found: source nuspec not found
exit /B 1

:bailOut
echo ERROR
exit /B 1

:success
echo Done!

fix package build batch file

fix package build batch file


@ECHO OFF

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Rendered math (MathJax) with Slack's desktop client
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Slack (https://slack.com) does not display rendered math. This script injects
:: MathJax (https://www.mathjax.org) into Slack's desktop client, which allows
:: you to write nice-looking inline- and display-style math using familiar
:: TeX/LaTeX syntax. You can also edit equations after you've posted them.
::
:: https://github.com/fsavje/math-with-slack
::
:: MIT License, Copyright 2017 Fredrik Savje
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: User input

SET "FORCE="
SET "SLACK_INDEX="

:parse
IF "%~1" == "" GOTO endparse
IF "%~1" == "-f" (
	SET FORCE=%~1
) ELSE (
	SET SLACK_INDEX=%~1
)
SHIFT
GOTO parse
:endparse

:: If the user-provided "index.js" is not found, try to find it

IF NOT "%SLACK_INDEX%" == "" IF NOT EXIST "%SLACK_INDEX%" (
	IF EXIST "%SLACK_INDEX%AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js" (
		SET SLACK_INDEX=%SLACK_INDEX%AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js
	) ELSE IF EXIST "%SLACK_INDEX%\AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js" (
		SET SLACK_INDEX=%SLACK_INDEX%\AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js
	) ELSE IF EXIST "%SLACK_INDEX%app-2.5.1\resources\app.asar.unpacked\src\static\index.js" (
		SET SLACK_INDEX=%SLACK_INDEX%app-2.5.1\resources\app.asar.unpacked\src\static\index.js
	) ELSE IF EXIST "%SLACK_INDEX%\app-2.5.1\resources\app.asar.unpacked\src\static\index.js" (
		SET SLACK_INDEX=%SLACK_INDEX%\app-2.5.1\resources\app.asar.unpacked\src\static\index.js
	)
)

:: Try to find slack if not provided by user

IF "%SLACK_INDEX%" == "" (
	IF EXIST "%UserProfile%\AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js" (
		SET SLACK_INDEX=%UserProfile%\AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js
	)
)

:: Check so "index.js" exists

IF "%SLACK_INDEX%" == "" (
	ECHO Cannot find Slack's index file.
	PAUSE & EXIT /B 1
)

IF NOT EXIST "%SLACK_INDEX%" (
	ECHO Cannot find Slack's index file: %SLACK_INDEX%
	PAUSE & EXIT /B 1
)

:: Does backup exists? If so, do update

IF EXIST "%SLACK_INDEX%.mwsbak" (
	COPY /Y "%SLACK_INDEX%.mwsbak" "%SLACK_INDEX%" >NUL
)

:: Check so "index.js" is known to work with the script

FOR /F "skip=1 delims=" %%L IN ('CertUtil -hashfile %SLACK_INDEX%') DO SET "INDEX_HASH=%%L" & GOTO breakhashloop
:breakhashloop

IF "%FORCE%" == "" IF NOT "%INDEX_HASH%" == "d4 05 45 4d 96 c6 ac df 4e fa 1d 7c 8a 3a 91 eb 08 69 c3 c8" (
	ECHO Unrecognized index file: %SLACK_INDEX%
	ECHO Call with '-f' flag to suppress this check.
	PAUSE & EXIT /B 1
)

:: Ensure "index.js" contains "startup();"

FINDSTR /R /C:"^    startup();$" "%SLACK_INDEX%" >NUL
IF %ERRORLEVEL% NEQ 0 (
	ECHO Cannot find 'startup(^);' in index file: %SLACK_INDEX%
	PAUSE & EXIT /B 1
)

:: Does backup exists? If not, make one

IF NOT EXIST "%SLACK_INDEX%.mwsbak" (
	COPY "%SLACK_INDEX%" "%SLACK_INDEX%.mwsbak" >NUL
)

:: Write code for MathJax injection

DEL "%SLACK_INDEX%"
IF EXIST "%SLACK_INDEX%" (
	ECHO Cannot write to Slack's index file: %SLACK_INDEX%
	PAUSE & EXIT /B 1
)

FOR /F "delims=" %%L IN (%SLACK_INDEX%.mwsbak) DO (
	IF "%%L" == "    startup();" (
		>>"%SLACK_INDEX%" (
			ECHO.    startup(^);
			ECHO.
			ECHO.    // *** Code injected for MathJax support
			ECHO.    // See: https://github.com/fsavje/math-with-slack
			ECHO.
			ECHO.    var mathjax_inject_script = `
			ECHO.      var mathjax_config = document.createElement("script"^);
			ECHO.      mathjax_config.type = "text/x-mathjax-config";
			ECHO.      mathjax_config.text = \`
			ECHO.        MathJax.Hub.Config({
			ECHO.          messageStyle: "none",
			ECHO.          extensions: ["tex2jax.js"],
			ECHO.          jax: ["input/TeX", "output/HTML-CSS"],
			ECHO.          tex2jax: {
			ECHO.            skipTags: ["script","noscript","style","textarea","pre","code"],
			ECHO.            inlineMath: [ ['\$','\$'] ],
			ECHO.            displayMath: [ ['\$\$','\$\$'] ],
			ECHO.            processEscapes: true
			ECHO.          },
			ECHO.          TeX: {
			ECHO.            extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]
			ECHO.          }
			ECHO.        }^);
			ECHO.        \`;
			ECHO.      var mathjax_script = document.createElement("script"^);
			ECHO.      mathjax_script.type = "text/javascript";
			ECHO.      mathjax_script.src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js";
			ECHO.      document.getElementsByTagName("head"^)[0].appendChild(mathjax_config^);
			ECHO.      document.getElementsByTagName("head"^)[0].appendChild(mathjax_script^);
			ECHO.
			ECHO.      var render = function (records, observer^) {
			ECHO.          MathJax.Hub.Queue(["Typeset", MathJax.Hub]^);
			ECHO.      };
			ECHO.      var target = document.querySelector('#msgs_div'^);
			ECHO.      var observer = new MutationObserver(render^);
			ECHO.      var config = { attributes: false, childList: true, characterData: true, subtree: true };
			ECHO.      observer.observe(target, config^);
			ECHO.    `;
			ECHO.
			ECHO.    window.webviews = document.querySelectorAll(".TeamView webview"^);
			ECHO.    setTimeout(function(^) {
			ECHO.      for(var i = 0; i ^< webviews.length; i++^) {
			ECHO.        webviews[i].executeJavaScript(mathjax_inject_script^);
			ECHO.      }
			ECHO.    }, 20000^);
			ECHO.
			ECHO.    // *** End injected MathJax
			ECHO.
		)
	) ELSE (
		>>"%SLACK_INDEX%" ECHO.%%L
	)
)

ECHO MathJax successfully injected into Slack. Please restart Slack client.
PAUSE

@ECHO OFF

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Rendered math (MathJax) with Slack's desktop client
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Slack (https://slack.com) does not display rendered math. This script injects
:: MathJax (https://www.mathjax.org) into Slack's desktop client, which allows
:: you to write nice-looking inline- and display-style math using familiar
:: TeX/LaTeX syntax. You can also edit equations after you've posted them.
::
:: https://github.com/fsavje/math-with-slack
::
:: MIT License, Copyright 2017 Fredrik Savje
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: User input

SET "FORCE="
SET "SLACK_INDEX="

:parse
IF "%~1" == "" GOTO endparse
IF "%~1" == "-f" (
	SET FORCE=%~1
) ELSE (
	SET SLACK_INDEX=%~1
)
SHIFT
GOTO parse
:endparse

:: If the user-provided "index.js" is not found, try to find it

IF NOT "%SLACK_INDEX%" == "" IF NOT EXIST "%SLACK_INDEX%" (
	IF EXIST "%SLACK_INDEX%AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js" (
		SET SLACK_INDEX=%SLACK_INDEX%AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js
	) ELSE IF EXIST "%SLACK_INDEX%\AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js" (
		SET SLACK_INDEX=%SLACK_INDEX%\AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js
	) ELSE IF EXIST "%SLACK_INDEX%app-2.5.1\resources\app.asar.unpacked\src\static\index.js" (
		SET SLACK_INDEX=%SLACK_INDEX%app-2.5.1\resources\app.asar.unpacked\src\static\index.js
	) ELSE IF EXIST "%SLACK_INDEX%\app-2.5.1\resources\app.asar.unpacked\src\static\index.js" (
		SET SLACK_INDEX=%SLACK_INDEX%\app-2.5.1\resources\app.asar.unpacked\src\static\index.js
	)
)

:: Try to find slack if not provided by user

IF "%SLACK_INDEX%" == "" (
	IF EXIST "%UserProfile%\AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js" (
		SET SLACK_INDEX=%UserProfile%\AppData\Local\slack\app-2.5.1\resources\app.asar.unpacked\src\static\index.js
	)
	IF EXIST "%UserProfile%\AppData\Local\slack\app-2.5.2\resources\app.asar.unpacked\src\static\index.js" (
		SET SLACK_INDEX=%UserProfile%\AppData\Local\slack\app-2.5.2\resources\app.asar.unpacked\src\static\index.js
	)
)

:: Check so "index.js" exists

IF "%SLACK_INDEX%" == "" (
	ECHO Cannot find Slack's index file.
	PAUSE & EXIT /B 1
)

IF NOT EXIST "%SLACK_INDEX%" (
	ECHO Cannot find Slack's index file: %SLACK_INDEX%
	PAUSE & EXIT /B 1
)

:: Does backup exists? If so, do update

IF EXIST "%SLACK_INDEX%.mwsbak" (
	COPY /Y "%SLACK_INDEX%.mwsbak" "%SLACK_INDEX%" >NUL
)

:: Check so "index.js" is known to work with the script

FOR /F "skip=1 delims=" %%L IN ('CertUtil -hashfile %SLACK_INDEX%') DO SET "INDEX_HASH=%%L" & GOTO breakhashloop
:breakhashloop

IF "%FORCE%" == "" IF NOT "%INDEX_HASH%" == "d4 05 45 4d 96 c6 ac df 4e fa 1d 7c 8a 3a 91 eb 08 69 c3 c8" (
	ECHO Unrecognized index file: %SLACK_INDEX%
	ECHO Call with '-f' flag to suppress this check.
	PAUSE & EXIT /B 1
)

:: Ensure "index.js" contains "startup();"

FINDSTR /R /C:"^    startup();$" "%SLACK_INDEX%" >NUL
IF %ERRORLEVEL% NEQ 0 (
	ECHO Cannot find 'startup(^);' in index file: %SLACK_INDEX%
	PAUSE & EXIT /B 1
)

:: Does backup exists? If not, make one

IF NOT EXIST "%SLACK_INDEX%.mwsbak" (
	COPY "%SLACK_INDEX%" "%SLACK_INDEX%.mwsbak" >NUL
)

:: Write code for MathJax injection

DEL "%SLACK_INDEX%"
IF EXIST "%SLACK_INDEX%" (
	ECHO Cannot write to Slack's index file: %SLACK_INDEX%
	PAUSE & EXIT /B 1
)

FOR /F "delims=" %%L IN (%SLACK_INDEX%.mwsbak) DO (
	IF "%%L" == "    startup();" (
		>>"%SLACK_INDEX%" (
			ECHO.    startup(^);
			ECHO.
			ECHO.    // *** Code injected for MathJax support
			ECHO.    // See: https://github.com/fsavje/math-with-slack
			ECHO.
			ECHO.    var mathjax_inject_script = `
			ECHO.      var mathjax_config = document.createElement("script"^);
			ECHO.      mathjax_config.type = "text/x-mathjax-config";
			ECHO.      mathjax_config.text = \`
			ECHO.        MathJax.Hub.Config({
			ECHO.          messageStyle: "none",
			ECHO.          extensions: ["tex2jax.js"],
			ECHO.          jax: ["input/TeX", "output/HTML-CSS"],
			ECHO.          tex2jax: {
			ECHO.            skipTags: ["script","noscript","style","textarea","pre","code"],
			ECHO.            inlineMath: [ ['\$','\$'] ],
			ECHO.            displayMath: [ ['\$\$','\$\$'] ],
			ECHO.            processEscapes: true
			ECHO.          },
			ECHO.          TeX: {
			ECHO.            extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]
			ECHO.          }
			ECHO.        }^);
			ECHO.        \`;
			ECHO.      var mathjax_script = document.createElement("script"^);
			ECHO.      mathjax_script.type = "text/javascript";
			ECHO.      mathjax_script.src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js";
			ECHO.      document.getElementsByTagName("head"^)[0].appendChild(mathjax_config^);
			ECHO.      document.getElementsByTagName("head"^)[0].appendChild(mathjax_script^);
			ECHO.
			ECHO.      var render = function (records, observer^) {
			ECHO.          MathJax.Hub.Queue(["Typeset", MathJax.Hub]^);
			ECHO.      };
			ECHO.      var target = document.querySelector('#msgs_div'^);
			ECHO.      var observer = new MutationObserver(render^);
			ECHO.      var config = { attributes: false, childList: true, characterData: true, subtree: true };
			ECHO.      observer.observe(target, config^);
			ECHO.    `;
			ECHO.
			ECHO.    window.webviews = document.querySelectorAll(".TeamView webview"^);
			ECHO.    setTimeout(function(^) {
			ECHO.      for(var i = 0; i ^< webviews.length; i++^) {
			ECHO.        webviews[i].executeJavaScript(mathjax_inject_script^);
			ECHO.      }
			ECHO.    }, 20000^);
			ECHO.
			ECHO.    // *** End injected MathJax
			ECHO.
		)
	) ELSE (
		>>"%SLACK_INDEX%" ECHO.%%L
	)
)

ECHO MathJax successfully injected into Slack. Please restart Slack client.
PAUSE

Add support for 2.5.2 on Windows

Add support for 2.5.2 on Windows


if "%ARCH%"=="32" (
    set PLATFORM=Win32
) else (
    set PLATFORM=x64
)

msbuild.exe /p:Platform=%PLATFORM% /p:Configuration=Release

dir /s /b

Update bld.bat

Update bld.bat


@echo off
echo *** %~n0 ...
echo.
call %~dp0\_init.bat %1 %2 %3

SET ShpFile=%~dpn1-cutline.shp
if NOT "%2"=="" SET ShpFile=%2

SET TiffOut=%~dpn1-crop.tif
if NOT "%2"=="" SET TiffOut=%~dpn1-%~n2.tif

echo Cutting shapefile: %ShpFile%
echo Input TIFF:        %1
echo Output TIFF:       %TiffOut%

echo.

gdalwarp -srcnodata 255 -dstnodata 0 -r average -wm %GDAL_CACHEMAX% -multi %TiffOpts% -cutline %ShpFile% -crop_to_cutline %1 %TiffOut%

echo.
echo %~n0 finished.
timeout 30

change raster-cut-shp to raster-crop-shp


dir

7za x lts\ldc2-1.9.0-windows-x64.7z -o%SRC_DIR%\lts

mkdir build
cd build
cmake -G Ninja ^
      -DCMAKE_BUILD_TYPE=Release ^
      -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
      -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
      -DBUILD_SHARED_LIBS=ON ^
      -DD_COMPILER=%SRC_DIR%\lts\ldc2-1.9.0-windows-x64\bin\ldmd2.exe ^
      ..
ninja install
ldc2 -version

dir

7za x lts\ldc2-1.9.0-windows-x64.7z -o%SRC_DIR%\lts

mkdir build
cd build
cmake -G Ninja ^
      -DCMAKE_BUILD_TYPE=Release ^
      -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
      -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
      -DD_COMPILER=%SRC_DIR%\lts\ldc2-1.9.0-windows-x64\bin\ldmd2.exe ^
      ..
ninja install
ldc2 -version

Remove build shared libs as it is not supported


cd Installer
set AIP=Minuet-x86

set pfx=Wrapper.Windows.Product.RSA.pkcs12.pfx
copy "%CEFDIR%\%pfx%" %pfx%

if EXIST %AIP%-cache (
	echo "remove old msi cache file"
	rmdir /q /s %AIP%-cache
)
if EXIST %AIP%-SetupFiles (
	echo "remove old msi setup files"
	rmdir /q /s %AIP%-SetupFiles
)

echo "running advanced installer to build msi"

AdvancedInstaller.com /edit %AIP%.aip /SetVersion %WRAPPER_VER%
IF %errorlevel% neq 0 (
	echo "failed to set advanced installer build version"
	exit /b -1
)

AdvancedInstaller.com /build %AIP%.aip
IF %errorlevel% neq 0 (
	echo "error returned from advanced installer:" %errorlevel%
	exit /b -1
)

if NOT EXIST %AIP%-SetupFiles/%AIP%.msi (
	echo "failure did not produce %proc% msi"
	exit /b -1
)

echo "copy result to target dir"
xcopy "%AIP%-SetupFiles\%AIP%.msi" %targetsDir% /i

cd minuet\symphony\Installer
set AIP=Minuet-x86

set pfx=Wrapper.Windows.Product.RSA.pkcs12.pfx
copy "%CEFDIR%\%pfx%" %pfx%

if EXIST %AIP%-cache (
	echo "remove old msi cache file"
	rmdir /q /s %AIP%-cache
)
if EXIST %AIP%-SetupFiles (
	echo "remove old msi setup files"
	rmdir /q /s %AIP%-SetupFiles
)

echo "running advanced installer to build msi"

AdvancedInstaller.com /edit %AIP%.aip /SetVersion %WRAPPER_VER%
IF %errorlevel% neq 0 (
	echo "failed to set advanced installer build version"
	exit /b -1
)

AdvancedInstaller.com /build %AIP%.aip
IF %errorlevel% neq 0 (
	echo "error returned from advanced installer:" %errorlevel%
	exit /b -1
)

if NOT EXIST %AIP%-SetupFiles/%AIP%.msi (
	echo "failure did not produce %proc% msi"
	exit /b -1
)

echo "copy result to target dir"
xcopy "%AIP%-SetupFiles\%AIP%.msi" %targetsDir% /i

fix install path

fix install path


set /p versionNumber=

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

REM preparing staging dirs

mkdir builds
mkdir staging
mkdir staging\net45
mkdir staging\profile259
mkdir staging\net40
copy LICENSE staging
copy NOTICE staging

REM building for net45 ...
"C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\fsc.exe" -o:staging\net45\Unquote.dll --noframework --define:TRACE --doc:staging\net45\Unquote.xml --optimize+ -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Numerics.dll" --target:library --warn:3 --warnaserror:76 --vserrors --validate-type-providers --LCID:1033 --utf8output --fullpaths --flaterrors --subsystemversion:6.00 --highentropyva+ Unquote\Utils\Prelude.fs Unquote\Utils\Regex.fs Unquote\Utils\Printf.fs Unquote\Utils\List.fs Unquote\Utils\Type.fs Unquote\AssemblyInfo.fs Unquote\DynamicOperators.fs Unquote\EvaluationException.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\ReductionException.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\UnquotedExpression.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\AssertionFailedException.fs Unquote\Assertions.fs

REM building for profile259
"C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\fsc.exe" -o:staging\profile259\Unquote.dll --noframework --define:TRACE --define:PORTABLE --doc:staging\profile259\Unquote.xml --optimize+ -r:"C:\Program Files (x86)\MSBuild\..\Reference Assemblies\Microsoft\FSharp\.NETCore\3.259.3.1\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\Microsoft.CSharp.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Collections.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.ComponentModel.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.ComponentModel.EventBasedAsync.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Diagnostics.Contracts.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Diagnostics.Debug.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Diagnostics.Tools.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Dynamic.Runtime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Globalization.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.IO.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Linq.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Linq.Expressions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Linq.Queryable.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Net.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Net.NetworkInformation.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Net.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Net.Requests.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.ObjectModel.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Reflection.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Reflection.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Reflection.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Resources.ResourceManager.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.InteropServices.WindowsRuntime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.Serialization.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.Serialization.Json.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.Serialization.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.Serialization.Xml.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Security.Principal.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.ServiceModel.Web.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Text.Encoding.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Text.Encoding.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Text.RegularExpressions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Threading.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Threading.Tasks.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Windows.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.Linq.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.ReaderWriter.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.Serialization.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.XDocument.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.XmlSerializer.dll" --target:library --warn:3 --warnaserror:76 --vserrors --validate-type-providers --LCID:1033 --utf8output --fullpaths --flaterrors --highentropyva- --targetprofile:netcore Unquote.Profile259\AssemblyInfo.fs Unquote\Utils\Prelude.fs Unquote\Utils\Regex.fs Unquote\Utils\Printf.fs Unquote\Utils\List.fs Unquote\Utils\Type.fs Unquote\DynamicOperators.fs Unquote\EvaluationException.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\ReductionException.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\UnquotedExpression.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\AssertionFailedException.fs Unquote\Assertions.fs

REM building for net40
"C:\Program Files (x86)\Microsoft F#\v4.0\fsc.exe" -o:staging\net40\Unquote.dll --noframework --define:TRACE --define:NET40 --doc:staging\net40\Unquote.xml --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 --vserrors --LCID:1033 --utf8output --fullpaths --flaterrors Unquote.Net40\AssemblyInfo.fs Unquote\Utils\Prelude.fs Unquote\Utils\Regex.fs Unquote\Utils\Printf.fs Unquote\Utils\List.fs Unquote\Utils\Type.fs Unquote\DynamicOperators.fs Unquote\EvaluationException.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\ReductionException.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\UnquotedExpression.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\AssertionFailedException.fs Unquote\Assertions.fs

REM zip builds ...
cd staging
..\tools\7z\7za.exe a -tzip ..\builds\Unquote-%versionNumber%.zip *
cd ..

REM preparing nuget dirs

mkdir nuget
mkdir nuget\lib
mkdir nuget\lib\net45
mkdir "nuget\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"
mkdir nuget\lib\net40
copy Unquote.nuspec nuget

REM copy staging builds to nuget package...

copy staging\net45\Unquote.dll nuget\lib\net45\Unquote.dll
copy staging\net45\Unquote.xml nuget\lib\net45\Unquote.xml
copy staging\profile259\Unquote.dll "nuget\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Unquote.dll"
copy staging\profile259\Unquote.xml "nuget\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Unquote.xml"
copy staging\net40\Unquote.dll nuget\lib\net40\Unquote.dll
copy staging\net40\Unquote.xml nuget\lib\net40\Unquote.xml

REM create nuget package...

".nuget\nuget.exe" pack nuget\Unquote.nuspec -Version %versionNumber%
copy Unquote.%versionNumber%.nupkg builds
del Unquote.%versionNumber%.nupkg

REM cleanup...

rd /q /s staging
rd /q /s nuget

pause

set /p versionNumber=

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

REM preparing staging dirs

mkdir builds
mkdir staging
mkdir staging\net45
mkdir staging\profile259
mkdir staging\net40
copy LICENSE staging
copy NOTICE staging

REM building for net45 ...
"C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\fsc.exe" -o:staging\net45\Unquote.dll --noframework --define:TRACE --doc:staging\net45\Unquote.xml --optimize+ -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Numerics.dll" --target:library --warn:3 --warnaserror:76 --vserrors --validate-type-providers --LCID:1033 --utf8output --fullpaths --flaterrors --subsystemversion:6.00 --highentropyva+ Unquote\Utils\Prelude.fs Unquote\Utils\Regex.fs Unquote\Utils\Printf.fs Unquote\Utils\List.fs Unquote\Utils\Type.fs Unquote\AssemblyInfo.fs Unquote\DynamicOperators.fs Unquote\EvaluationException.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\ReductionException.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\UnquotedExpression.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\AssertionFailedException.fs Unquote\Assertions.fs

REM building for profile259
"C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\fsc.exe" -o:staging\profile259\Unquote.dll --noframework --define:TRACE --define:PORTABLE --doc:staging\profile259\Unquote.xml --optimize+ -r:"C:\Program Files (x86)\MSBuild\..\Reference Assemblies\Microsoft\FSharp\.NETCore\3.259.3.1\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\Microsoft.CSharp.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Collections.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.ComponentModel.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.ComponentModel.EventBasedAsync.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Diagnostics.Contracts.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Diagnostics.Debug.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Diagnostics.Tools.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Dynamic.Runtime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Globalization.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.IO.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Linq.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Linq.Expressions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Linq.Queryable.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Net.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Net.NetworkInformation.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Net.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Net.Requests.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.ObjectModel.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Reflection.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Reflection.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Reflection.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Resources.ResourceManager.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.InteropServices.WindowsRuntime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.Serialization.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.Serialization.Json.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.Serialization.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Runtime.Serialization.Xml.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Security.Principal.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.ServiceModel.Web.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Text.Encoding.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Text.Encoding.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Text.RegularExpressions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Threading.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Threading.Tasks.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Windows.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.Linq.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.ReaderWriter.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.Serialization.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.XDocument.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\System.Xml.XmlSerializer.dll" --target:library --warn:3 --warnaserror:76 --vserrors --validate-type-providers --LCID:1033 --utf8output --fullpaths --flaterrors --highentropyva- --targetprofile:netcore Unquote.Profile259\AssemblyInfo.fs Unquote\Utils\Prelude.fs Unquote\Utils\Regex.fs Unquote\Utils\Printf.fs Unquote\Utils\List.fs Unquote\Utils\Type.fs Unquote\DynamicOperators.fs Unquote\EvaluationException.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\ReductionException.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\UnquotedExpression.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\AssertionFailedException.fs Unquote\Assertions.fs

REM building for net40
"C:\Program Files (x86)\Microsoft F#\v4.0\fsc.exe" -o:staging\net40\Unquote.dll --noframework --define:TRACE --define:NET40 --doc:staging\net40\Unquote.xml --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 --vserrors --LCID:1033 --utf8output --fullpaths --flaterrors Unquote.Net40\AssemblyInfo.fs Unquote\Utils\Prelude.fs Unquote\Utils\Regex.fs Unquote\Utils\Printf.fs Unquote\Utils\List.fs Unquote\Utils\Type.fs Unquote\DynamicOperators.fs Unquote\EvaluationException.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\ReductionException.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\UnquotedExpression.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\AssertionFailedException.fs Unquote\Assertions.fs

REM zip builds ...
cd staging
..\tools\7z\7za.exe a -tzip ..\builds\Unquote-%versionNumber%.zip *
cd ..

REM preparing nuget dirs

mkdir nuget
mkdir nuget\lib
mkdir nuget\lib\net45
mkdir "nuget\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"
mkdir nuget\lib\net40
copy Unquote.nuspec nuget

REM copy staging builds to nuget package...

copy staging\net45\Unquote.dll nuget\lib\net45\Unquote.dll
copy staging\net45\Unquote.xml nuget\lib\net45\Unquote.xml
copy staging\profile259\Unquote.dll "nuget\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Unquote.dll"
copy staging\profile259\Unquote.xml "nuget\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Unquote.xml"
copy staging\net40\Unquote.dll nuget\lib\net40\Unquote.dll
copy staging\net40\Unquote.xml nuget\lib\net40\Unquote.xml

REM create nuget package...

".nuget\nuget.exe" pack nuget\Unquote.nuspec -Version %versionNumber%
copy Unquote.%versionNumber%.nupkg builds
del Unquote.%versionNumber%.nupkg

REM cleanup...

rd /q /s staging
rd /q /s nuget

pause

update F# compiler version for non vs2010 builds


@echo off

pushd %~dp0
set "KRE_NUGET_API_URL=https://www.nuget.org/api/v2"
setlocal EnableDelayedExpansion
where kvm
if %ERRORLEVEL% neq 0 (
    @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))"
    set PATH=!PATH!;!userprofile!\.k\bin
    set KRE_HOME=!USERPROFILE!\.k
    goto install
)

:install
echo "here"
call kvm install 1.0.0-beta3
call kvm use 1.0.0-beta3
rem set the runtime path because the above commands set \.k<space>\runtimes
set PATH=!USERPROFILE!\.k\runtimes\kre-clr-win-x86.1.0.0-beta3\bin;!PATH!

call kpm restore
if %errorlevel% neq 0 exit /b %errorlevel%
cd tests\OmniSharp.Tests
call k test
if %errorlevel% neq 0 exit /b %errorlevel%
cd ..\OmniSharp.Stdio.Tests
call k test
if %errorlevel% neq 0 exit /b %errorlevel%
cd ..\..
call kpm bundle src\OmniSharp --no-source --out artifacts\build\omnisharp --runtime kre-clr-win-x86.1.0.0-beta3

popd

@echo off

pushd %~dp0
set "KRE_NUGET_API_URL=https://www.nuget.org/api/v2"
setlocal EnableDelayedExpansion
where kvm
if %ERRORLEVEL% neq 0 (
    @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))"
    set PATH=!PATH!;!userprofile!\.k\bin
    set KRE_HOME=!USERPROFILE!\.k
    goto install
)

:install
call kvm install 1.0.0-beta3
call kvm use 1.0.0-beta3
rem set the runtime path because the above commands set \.k<space>\runtimes
set PATH=!USERPROFILE!\.k\runtimes\kre-clr-win-x86.1.0.0-beta3\bin;!PATH!

call kpm restore
if %errorlevel% neq 0 exit /b %errorlevel%
cd tests\OmniSharp.Tests
call k test
if %errorlevel% neq 0 exit /b %errorlevel%
cd ..\OmniSharp.Stdio.Tests
call k test
if %errorlevel% neq 0 exit /b %errorlevel%
cd ..\..
call kpm bundle src\OmniSharp --no-source --out artifacts\build\omnisharp --runtime kre-clr-win-x86.1.0.0-beta3

popd

remove debug code

remove debug code


mkdir bin

mkdir bin\Debug
ilasm /dll src\PtrUtils.il /out:bin\Debug\System.Slice.netmodule
csc /t:library /debug /unsafe /o+ /addmodule:bin\System.Slice.netmodule /out:bin\Debug\System.Slice.dll src\*.cs
csc /debug /unsafe /r:bin\Debug\System.Slice.dll /out:bin\Debug\System.Slice.Test.exe tests\*.cs

mkdir bin\Release
ilasm /dll src\PtrUtils.il /out:bin\Release\System.Slice.netmodule
csc /t:library /unsafe /o+ /addmodule:bin\System.Slice.netmodule /out:bin\Release\System.Slice.dll src\*.cs
csc /unsafe /r:bin\Release\System.Slice.dll /out:bin\Release\System.Slice.Test.exe tests\*.cs

mkdir bin
ilasm /dll src\PtrUtils.il /out:bin\System.Slice.netmodule
csc /t:library /debug:pdbonly /unsafe /o+ /addmodule:bin\System.Slice.netmodule /out:bin\System.Slice.dll src\*.cs
csc /debug:pdbonly /unsafe /r:bin\System.Slice.dll /out:bin\System.Slice.Test.exe tests\*.cs

use /debug:pdbonly as suggested to get benefits of pdb files in optimized dll


@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\Sake goto getdnx
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 -Source https://www.nuget.org/api/v2/ -Out packages

:getdnx
IF "%SKIP_DNX_INSTALL%"=="" (
    IF "%BUILDCMD_DNX_VERSION%"=="" (
        BUILDCMD_DNX_VERSION=latest
    )
    CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CoreCLR -arch x86 -alias default
    CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x86 -alias default
) ELSE (
    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\Sake goto getdnx
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 -Source https://www.nuget.org/api/v2/ -Out packages

:getdnx
IF "%BUILDCMD_DNX_VERSION%"=="" (
    SET BUILDCMD_DNX_VERSION=latest
)
IF "%SKIP_DNX_INSTALL%"=="" (
    CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CoreCLR -arch x86 -alias default
    CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x86 -alias default
) ELSE (
    CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
)

packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

Fix local build break

Fix local build break


@ECHO OFF
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*"

Add buildscript

Add buildscript


add start.cmd file for windows

add start.cmd file for windows


REM cx_freeze doesnt seem to work yet with Python34 so use 33
c:\Python33\python.exe setup.py sdist
c:\Python33\python.exe setup.py bdist_msi

c:\Python34\python.exe setup.py sdist
c:\Python34\python.exe setup.py bdist_msi

migrate installer to Python 34

migrate installer to Python 34


@SET CONFIGURATION=Release
@SET NETFX_PATH=C:\Windows\Microsoft.NET\Framework\v3.5
@SET XUNIT_VERSION=1.9.1
@SET OPENCOVER_VERSION=4.5.1604
@SET REPORTGENERATOR_VERSION=1.8.1.0

@ECHO Compiling solution
%NETFX_PATH%\MSBuild.exe "%~dp0..\src\reyna.sln" /property:Platform="Any CPU" /property:Configuration=%CONFIGURATION%
@SET EXITCODE=%ERRORLEVEL%
@IF %ERRORLEVEL% NEQ 0 GOTO error

@SET COVERAGE_DIRECTORY=%~dp0..\Coverage
rmdir /S /Q %COVERAGE_DIRECTORY%
mkdir %COVERAGE_DIRECTORY%

@ECHO Running unit tests
"%~dp0..\tools\opencover\%OPENCOVER_VERSION%\opencover.console.exe" -target:"%~dp0..\tools\xUnit\%XUNIT_VERSION%\xunit.console.x86.exe" -targetargs:"%~dp0..\src\reyna.Facts\bin\%CONFIGURATION%\reyna.Facts.dll /xml ""%COVERAGE_DIRECTORY%/unit-output.xml"" /html ""%COVERAGE_DIRECTORY%/unit-output.html"" /nunit ""%COVERAGE_DIRECTORY%/unit-output.nunit.xml"" /noshadow" -filter:"+[Reyna*]* -[*.Facts]*" -showunvisited -output:"%COVERAGE_DIRECTORY%\coverage-unit.xml" -returntargetcode
@SET EXITCODE=%ERRORLEVEL%
@IF %ERRORLEVEL% NEQ 0 GOTO error

@ECHO Running integration tests
"%~dp0..\tools\opencover\%OPENCOVER_VERSION%\opencover.console.exe" -target:"%~dp0..\tools\xUnit\%XUNIT_VERSION%\xunit.console.x86.exe" -targetargs:"%~dp0..\src\reyna.Integration.Facts\bin\%CONFIGURATION%\reyna.Integration.Facts.dll /xml ""%COVERAGE_DIRECTORY%/integration-output.xml"" /html ""%COVERAGE_DIRECTORY%/integration-output.html"" /nunit ""%COVERAGE_DIRECTORY%/integration-output.nunit.xml"" /noshadow" -filter:"+[Reyna*]* -[*.Facts]*" -showunvisited -output:"%COVERAGE_DIRECTORY%\coverage-integration.xml" -returntargetcode
@SET EXITCODE=%ERRORLEVEL%
@IF %ERRORLEVEL% NEQ 0 GOTO error

@ECHO Generating coverage report
"%~dp0..\tools\ReportGenerator\%REPORTGENERATOR_VERSION%\ReportGenerator.exe" -reports:"%COVERAGE_DIRECTORY%\coverage-unit.xml";"%COVERAGE_DIRECTORY%\coverage-integration.xml" coveragereport -reporttypes:Html;xmlsummary;HtmlSummary -targetdir:"%COVERAGE_DIRECTORY%" -verbosity:Verbose
@SET EXITCODE=%ERRORLEVEL%
@IF %ERRORLEVEL% NEQ 0 GOTO error

@ECHO Coverage report
type "%COVERAGE_DIRECTORY%\summary.xml"

findstr.exe /L "<Coverage>100%%</Coverage>" "%COVERAGE_DIRECTORY%\summary.xml"
@SET FindStrResult=%ERRORLEVEL%
@IF %FindStrResult% EQU 0 (
  @GOTO exit
) ELSE (
  @GOTO coverageNotMet
)

:error
@ECHO build script return code: %EXITCODE%
@EXIT /B %EXITCODE%

:exit
@ECHO Coverage requirements met
@ECHO build succeeded
@EXIT /B 0

:coverageNotMet
@ECHO Coverage requirements not met, to view coverage result click on %COVERAGE_DIRECTORY%\index.htm
@EXIT /B %EXITCODE%

@SET CONFIGURATION=Release
@SET NETFX_PATH=C:\Windows\Microsoft.NET\Framework\v3.5
@SET XUNIT_VERSION=1.9.1
@SET OPENCOVER_VERSION=4.5.1604
@SET REPORTGENERATOR_VERSION=1.8.1.0

@ECHO Compiling solution
%NETFX_PATH%\MSBuild.exe "%~dp0..\src\reyna.sln" /property:Platform="Any CPU" /property:Configuration=%CONFIGURATION%
@SET EXITCODE=%ERRORLEVEL%
@IF %ERRORLEVEL% NEQ 0 GOTO error

@SET COVERAGE_DIRECTORY=%~dp0..\Coverage
rmdir /S /Q %COVERAGE_DIRECTORY%
mkdir %COVERAGE_DIRECTORY%

@ECHO Running unit tests
"%~dp0..\tools\opencover\%OPENCOVER_VERSION%\opencover.console.exe" -target:"%~dp0..\tools\xUnit\%XUNIT_VERSION%\xunit.console.x86.exe" -targetargs:"%~dp0..\src\reyna.Facts\bin\%CONFIGURATION%\reyna.Facts.dll /xml ""%COVERAGE_DIRECTORY%/unit-output.xml"" /html ""%COVERAGE_DIRECTORY%/unit-output.html"" /nunit ""%COVERAGE_DIRECTORY%/unit-output.nunit.xml"" /noshadow" -filter:"+[Reyna*]* -[*.Facts]*" -showunvisited -output:"%COVERAGE_DIRECTORY%\coverage-unit.xml" -returntargetcode
@SET EXITCODE=%ERRORLEVEL%
@IF %ERRORLEVEL% NEQ 0 GOTO error

@ECHO Running integration tests
"%~dp0..\tools\opencover\%OPENCOVER_VERSION%\opencover.console.exe" -target:"%~dp0..\tools\xUnit\%XUNIT_VERSION%\xunit.console.x86.exe" -targetargs:"%~dp0..\src\reyna.Integration.Facts\bin\%CONFIGURATION%\reyna.Integration.Facts.dll /xml ""%COVERAGE_DIRECTORY%/integration-output.xml"" /html ""%COVERAGE_DIRECTORY%/integration-output.html"" /nunit ""%COVERAGE_DIRECTORY%/integration-output.nunit.xml"" /noshadow" -filter:"+[Reyna*]* -[*.Facts]* -[Reyna.Win32]Reyna.EncryptionChecker -[Reyna.Win32]Reyna.ReynaService -[Reyna.Win32]Reyna.SQLiteRepository" -showunvisited -output:"%COVERAGE_DIRECTORY%\coverage-integration.xml" -returntargetcode
@SET EXITCODE=%ERRORLEVEL%
@IF %ERRORLEVEL% NEQ 0 GOTO error

@ECHO Generating coverage report
"%~dp0..\tools\ReportGenerator\%REPORTGENERATOR_VERSION%\ReportGenerator.exe" -reports:"%COVERAGE_DIRECTORY%\coverage-unit.xml";"%COVERAGE_DIRECTORY%\coverage-integration.xml" coveragereport -reporttypes:Html;xmlsummary;HtmlSummary -targetdir:"%COVERAGE_DIRECTORY%" -verbosity:Verbose
@SET EXITCODE=%ERRORLEVEL%
@IF %ERRORLEVEL% NEQ 0 GOTO error

@ECHO Coverage report
type "%COVERAGE_DIRECTORY%\summary.xml"

findstr.exe /L "<Coverage>100%%</Coverage>" "%COVERAGE_DIRECTORY%\summary.xml"
@SET FindStrResult=%ERRORLEVEL%
@IF %FindStrResult% EQU 0 (
  @GOTO exit
) ELSE (
  @GOTO coverageNotMet
)

:error
@ECHO build script return code: %EXITCODE%
@EXIT /B %EXITCODE%

:exit
@ECHO Coverage requirements met
@ECHO build succeeded
@EXIT /B 0

:coverageNotMet
@ECHO Coverage requirements not met, to view coverage result click on %COVERAGE_DIRECTORY%\index.htm
@EXIT /B %EXITCODE%

[#101603012] read cached power information to save battery


Add start batch script

Add start batch script


:<<"::CMDLITERAL"
@ECHO OFF
SET MASTHEADURL=http://%1:52311/masthead/masthead.afxm
ECHO
ECHO I am %COMSPEC%
ECHO put CMD/BAT lines in here.
ECHO %0
ECHO %1
ECHO %MASTHEADURL%
PAUSE
EXIT
::CMDLITERAL

:<<"::CMDLITERAL"
@ECHO OFF
SET MASTHEADURL=http://%1:52311/masthead/masthead.afxm
ECHO

bitsadmin /transfer bigfixdl%random% /download /priority FOREGROUND http://software.bigfix.com/download/bes/95/BigFix-BES-Client-9.5.1.9.exe C:\Windows\Temp\bigfixclient.exe

ECHO I am %COMSPEC%
ECHO put CMD/BAT lines in here.
ECHO %0
ECHO %1
ECHO %MASTHEADURL%

PAUSE
EXIT
::CMDLITERAL

Update install_bigfix.bat

Update install_bigfix.bat


# Copyright 2009 The Go Authors.  All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

all: $(TARG)

# ugly hack to deal with whitespaces in $GOROOT
nullstring :=
space := $(nullstring) # a space at the end
QUOTED_GOROOT:=$(subst $(space),\ ,$(GOROOT))

include $(QUOTED_GOROOT)/src/Make.common

PREREQ+=$(patsubst %,%.make,$(DEPS))

$(TARG): _go_.$O $(OFILES)
	$(QUOTED_GOBIN)/$(LD) -o $@ _go_.$O $(OFILES)

_go_.$O: $(GOFILES) $(PREREQ)
	$(QUOTED_GOBIN)/$(GC) -o $@ $(GOFILES)

install: $(QUOTED_GOBIN)/$(TARG)

$(QUOTED_GOBIN)/$(TARG): $(TARG)
	cp -f $(TARG) $(QUOTED_GOBIN)

CLEANFILES+=$(TARG)

nuke: clean
	rm -f $(QUOTED_GOBIN)/$(TARG)

# Copyright 2009 The Go Authors.  All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

all: $(TARG)

# ugly hack to deal with whitespaces in $GOROOT
nullstring :=
space := $(nullstring) # a space at the end
QUOTED_GOROOT:=$(subst $(space),\ ,$(GOROOT))

include $(QUOTED_GOROOT)/src/Make.common

ifeq ($(GOOS),windows)
TARG:=$(TARG).exe
endif

PREREQ+=$(patsubst %,%.make,$(DEPS))

$(TARG): _go_.$O $(OFILES)
	$(QUOTED_GOBIN)/$(LD) -o $@ _go_.$O $(OFILES)

_go_.$O: $(GOFILES) $(PREREQ)
	$(QUOTED_GOBIN)/$(GC) -o $@ $(GOFILES)

install: $(QUOTED_GOBIN)/$(TARG)

$(QUOTED_GOBIN)/$(TARG): $(TARG)
	cp -f $(TARG) $(QUOTED_GOBIN)

CLEANFILES+=$(TARG)

nuke: clean
	rm -f $(QUOTED_GOBIN)/$(TARG)

windows: append executable extension (done as per Russ' suggestion)

R=rsc
CC=brainman, golang-dev
http://codereview.appspot.com/1690053

Committer: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>


@echo off
setlocal EnableExtensions

set BATDIR=%~dp0
if not exist "%USERPROFILE%" (
    echo [Error] Environment variable %%USERPROFILE%% is not set.
    goto :EOF
)

REM Check access priviledge
if exist "%TEMP%\makelinks.tmp" del "%TEMP%\makelinks.tmp"
(mklink "%TEMP%\makelinks.tmp" "%~0" 2>&1) > NUL
if not %ERRORLEVEL% == 0 (
    echo Failed to create symbolic link
    goto :EOF
)
del ".\makelinks.tmp" 2> NUL

call :COPY "%BATDIR%git/config" "%USERPROFILE%\.gitconfig"
call :COPY "%BATDIR%git/ignore" "%USERPROFILE%\.gitignore"

call :MKDIR "%USERPROFILE%\vimfiles\autoload"
call :MKDIR "%USERPROFILE%\.vim\autoload"
call :MKDIR "%USERPROFILE%\_vim\autoload"
call :MKLINK "%USERPROFILE%\vimfiles\vimrc"             "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\vimfiles\coc-settings.json" "%BATDIR%vimfiles\coc-settings.json"
call :MKLINK "%USERPROFILE%\.vim\vimrc"                 "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\.vim\coc-settings.json"     "%BATDIR%vimfiles\coc-settings.json"
call :MKLINK "%USERPROFILE%\_vim\vimrc"                 "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\_vim\coc-settings.json"     "%BATDIR%vimfiles\coc-settings.json"
call :MKLINK "%USERPROFILE%\vimfiles\autoload\plug.vim" "%BATDIR%vimfiles\autoload\plug.vim"
call :MKLINK "%USERPROFILE%\.vim\autoload\plug.vim"     "%BATDIR%vimfiles\autoload\plug.vim"
call :MKLINK "%USERPROFILE%\_vim\autoload\plug.vim"     "%BATDIR%vimfiles\autoload\plug.vim"
goto :EOF

REM ---------------------------------------------------------------------------
:COPY
    set SRC=%~f1
    set DEST=%~f2
    if not exist "%DEST%" (
        echo copy "%SRC%" "%DEST%"
        copy "%SRC%" "%DEST%" > NUL
    )
    exit /b 0

:MKLINK
    set DEST=%~f1
    set SRC=%~f2
    if exist "%DEST%" del /q "%DEST%"
    echo mklink "%DEST%" "%SRC%"
    mklink "%DEST%" "%SRC%" > NUL
    exit /b 0

:MKDIR
    if not exist "%~f1" (
        echo mkdir "%~f1"
        mkdir "%~f1"
    )
    exit /b 0

@echo off
setlocal EnableExtensions

set BATDIR=%~dp0
if not exist "%USERPROFILE%" (
    echo [Error] Environment variable %%USERPROFILE%% is not set.
    goto :EOF
)

REM Check access priviledge
if exist "%TEMP%\makelinks.tmp" del "%TEMP%\makelinks.tmp"
(mklink "%TEMP%\makelinks.tmp" "%~0" 2>&1) > NUL
if not %ERRORLEVEL% == 0 (
    echo Failed to create symbolic link
    goto :EOF
)
del ".\makelinks.tmp" 2> NUL

call :COPY "%BATDIR%git/config" "%USERPROFILE%\.gitconfig"
call :COPY "%BATDIR%git/ignore" "%USERPROFILE%\.gitignore"

call :MKDIR "%USERPROFILE%\_vim\autoload"
call :MKLINK "%USERPROFILE%\_vim\vimrc"                 "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\_vim\coc-settings.json"     "%BATDIR%vimfiles\coc-settings.json"
call :MKLINK "%USERPROFILE%\_vim\autoload\plug.vim"     "%BATDIR%vimfiles\autoload\plug.vim"
call :MKDIR "%USERPROFILE%\.vim\autoload"
call :MKLINK "%USERPROFILE%\.vim\vimrc"                 "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\.vim\coc-settings.json"     "%BATDIR%vimfiles\coc-settings.json"
call :MKLINK "%USERPROFILE%\.vim\autoload\plug.vim"     "%BATDIR%vimfiles\autoload\plug.vim"
call :MKDIR "%USERPROFILE%\vimfiles\autoload"
call :MKLINK "%USERPROFILE%\vimfiles\vimrc"             "%BATDIR%vimfiles\vimrc"
call :MKLINK "%USERPROFILE%\vimfiles\coc-settings.json" "%BATDIR%vimfiles\coc-settings.json"
call :MKLINK "%USERPROFILE%\vimfiles\autoload\plug.vim" "%BATDIR%vimfiles\autoload\plug.vim"
goto :EOF

REM ---------------------------------------------------------------------------
:COPY
    set SRC=%~f1
    set DEST=%~f2
    if not exist "%DEST%" (
        echo copy "%SRC%" "%DEST%"
        copy "%SRC%" "%DEST%" > NUL
    )
    exit /b 0

:MKLINK
    set DEST=%~f1
    set SRC=%~f2
    if exist "%DEST%" del /q "%DEST%"
    echo mklink "%DEST%" "%SRC%"
    mklink "%DEST%" "%SRC%" > NUL
    exit /b 0

:MKDIR
    if not exist "%~f1" (
        echo mkdir "%~f1"
        mkdir "%~f1"
    )
    exit /b 0

Sort vim setup commands

refactor: Sort vim setup commands


Update start.bat

Update start.bat


@ECHO OFF

REM TeamCity chokes on the COMPONENTSVERSION processing here, it thinks
REM COMPONENTSVERSION is required going into the build step when we would
REM define it in the build step.

SETLOCAL

REM ---------------------------------------------------------------------------
REM Check usage
REM ---------------------------------------------------------------------------

IF "%1" == "" GOTO Usage

SET BUILD_NUMBER=%1

REM ---------------------------------------------------------------------------
REM Build packages
REM ---------------------------------------------------------------------------

SET /P COMPONENTSVERSION=<ver.txt
ECHO COMPONENTSVERSION=%COMPONENTSVERSION%

call build-packages.cmd %COMPONENTSVERSION%.%BUILD_NUMBER%

GOTO :EOF

:Usage
ECHO USAGE: build_packages_teamcity.cmd (build-number)

EXIT 1

GOTO :EOF

ENDLOCAL

@ECHO OFF

REM TeamCity chokes on the COMPONENTS_VERSION processing here, it thinks
REM COMPONENTS_VERSION is required going into the build step when we would
REM define it in the build step.

SETLOCAL

REM ---------------------------------------------------------------------------
REM Check usage
REM ---------------------------------------------------------------------------

IF "%1" == "" GOTO Usage

SET BUILD_NUMBER=%1
ECHO BUILD_NUMBER=%BUILD_NUMBER%

REM ---------------------------------------------------------------------------
REM Build packages
REM ---------------------------------------------------------------------------

SET /P COMPONENTS_VERSION=<ver.txt
ECHO COMPONENTS_VERSION=%COMPONENTS_VERSION%

SET BUILD_VERSION=%COMPONENTS_VERSION%.%BUILD_NUMBER%
ECHO BUILD_VERSION=%BUILD_VERSION%

call build-packages.cmd %BUILD_VERSION%

GOTO :EOF

:Usage
ECHO USAGE: build_packages_teamcity.cmd (build-number)

EXIT 1

GOTO :EOF

ENDLOCAL

Debug output for the build

Debug output for the build


setlocal
call settings.bat

if "%COMPILER%"=="MSVC2013" (
   git clone https://github.com/alex85k/libiconv.git
) else (
   git clone https://github.com/coapp-packages/libiconv.git
)

if "%COMPILER%" == "MINGW" (
   echo "Iconv should be already bundled with MINGW"
   exit /b 0
)

cd libiconv\COPKG\libiconv

msbuild /p:Configuration=%Variant% /clp:Verbosity=minimal /nologo libiconv.vcxproj /flp1:logfile=build_errors.txt;errorsonly /flp2:logfile=build_warnings.txt;warningsonly

copy /y x64\%Variant%\*.lib %PREFIX%\lib
copy /y x64\%Variant%\libiconv.lib %PREFIX%\lib\iconv.lib
copy /y x64\%Variant%\*.dll %PREFIX%\bin
copy /y *.h %PREFIX%\include

cd ..\..\..

setlocal
call settings.bat

if "%COMPILER%" == "MINGW" (
   echo "Iconv should be already bundled with MINGW"
   exit /b 0
)  else (
   git clone https://github.com/alex85k/libiconv-for-Windows.git
)

cd libiconv-for-Windows

rmdir /s /q obj lib lib64
msbuild /p:Configuration=%Variant% /clp:Verbosity=minimal /nologo LibIconv.sln /flp1:logfile=build_errors.txt;errorsonly /flp2:logfile=build_warnings.txt;warningsonly

copy /y lib64\libiconvD.lib %PREFIX%\lib\iconv.lib
copy /y lib64\libiconv.lib %PREFIX%\lib\iconv.lib
copy /y lib64\*.dll %PREFIX%\bin
copy /y include\*.h %PREFIX%\include

cd ..\..\..

switch to libiconv-for-Windows iconv library