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

:: Installs all scripts of the utility.
::
:: Version: 2014-02-14 1-RC
:: Author: Andres Gomez Casanova (AngocA)
:: Made in COLOMBIA.

:: Global variables
set continue=1
set adminInstall=1
set temporalTable=0
set v9_7=0
set retValue=0

:: Main call.
:: Checks if there is already a connection established
db2 connect > NUL
if %ERRORLEVEL% EQU 0 (
 call:init %1 %2 %3
) else (
 echo Please connect to a database before the execution of the installation.
 set retValue=2
)
exit /B %retValue%
goto:eof

:: Installs a given script in DB2.
:: It uses the continue global variable to stop the execution if an error occurs.
:installScript
 set script=%~1
 echo %script%
 db2 -tsf %script%
 if %ERRORLEVEL% NEQ 0 (
  set continue=0
 )
goto:eof

:: Function that install the utility for version 10.1.
:: DB2 v10.1
:v10.1
 echo Installing utility for v10.1
 if %adminInstall% EQU 1 (
  if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\00-AdminObjects.sql
 )
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\01-Tables.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\02-UtilityHeader.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\03-UtilityBody.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\04-Appenders.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\05-LOG.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\06-GET_LOGGER.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\07-Trigger.sql

 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\08-AdminHeader.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\09-AdminBody.sql

 cd %LOG4DB2_SRC_MAIN_CODE_PATH%
 cd ..
 cd xml
 if %continue% EQU 1 call:installScript 10-AppendersXML.sql
 cd ..
 cd scripts 2> NUL

 :: Temporal capabilities for tables.
 if %temporalTable% EQU 1 if %continue% EQU 1 (
  echo Create table for Time Travel
  call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\11-TablesTimeTravel.sql
 )

 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\12-Version.sql

 echo Please visit the wiki to learn how to use and configure this utility
 echo https://github.com/angoca/log4db2/wiki
 echo To report an issue or provide feedback, please visit:
 echo https://github.com/angoca/log4db2/issues
 echo.
 if %continue% EQU 1 (
  echo log4db2 was successfully installed
  db2 -x "values 'Database: ' || current server"
  db2 -x "values 'Version: ' || logger.version"
  db2 -x "select 'Schema: ' || base_moduleschema from syscat.modules where moduleschema = 'SYSPUBLIC' and modulename = 'LOGGER'"
  set retValue=0
 ) else (
  echo "Check the error(s) and reinstall the utility"
  set retValue=1
 )
goto:eof

:: Function that install the utility for version 9.7.
:: DB2 v9.7
:v9.7
 echo Installing utility for v9.7
 if %adminInstall% EQU 1 (
  if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\AdminObjects.sql
 )
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\Tables_v9_7.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\UtilityHeader.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\UtilityBody.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\Appenders.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\LOG.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\GET_LOGGER_v9_7.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\Trigger.sql

 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\AdminHeader.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\AdminBody.sql

 cd %LOG4DB2_SRC_MAIN_CODE_PATH%
 cd ..
 cd xml
 if %continue% EQU 1 call:installScript AppendersXML.sql
 cd ..
 cd scripts 2> NUL

 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\Version.sql

 echo Please visit the wiki to learn how to use and configure this utility
 echo https://github.com/angoca/log4db2/wiki
 echo To report an issue or provide feedback, please visit:
 echo https://github.com/angoca/log4db2/issues
 echo.
 if %continue% EQU 1 (
  echo log4db2 was successfully installed
  db2 -x "values 'Database: ' || current server"
  db2 -x "values 'Version: ' || logger.version"
  db2 -x "select 'Schema: ' || base_moduleschema from syscat.modules where moduleschema = 'SYSPUBLIC' and modulename = 'LOGGER'"
  set retValue=0
 ) else (
  echo "Check the error(s) and reinstall the utility"
  set retValue=1
 )
goto:eof

:: This functions checks all parameters and assign them to global variables.
:checkParam
 set param1=%1
 set param2=%2
 set param3=%3
 if /I "%param1%" == "-A" (
  set adminInstall=0
 )
 if /I "%param2%" == "-A" (
  set adminInstall=0
 )
 if /I "%param3%" == "-A" (
  set adminInstall=0
 )
 if /I "%param1%" == "-t" (
  set temporalTable=1
 )
 if /I "%param2%" == "-t" (
  set temporalTable=1
 )
 if /I "%param3%" == "-t" (
  set temporalTable=1
 )
 if /I "%param1%" == "-v9_7" (
  set v9_7=1
 )
 if /I "%param2%" == "-v9_7" (
  set v9_7=1
 )
 if /I "%param3%" == "-v9_7" (
  set v9_7=1
 )
goto:eof

:: Main unction that starts the installation.
:init
 :: Initialize the environment.
 if EXIST init.bat (
  call init.bat
 )

 echo log4db2 is licensed under the terms of the Simplified-BSD license

 :: Check the given parameters.
 call:checkParam %1 %2 %3

 :: Checks in which DB2 version the utility will be installed.
 :: DB2 v10.1 is the default version.
 if %v9_7% EQU 1 (
  call:v9.7
 ) else (
  call:v10.1
 )

 if EXIST uninit.bat (
  call uninit.bat
 )
goto:eof

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

:: Installs all scripts of the utility.
::
:: Version: 2014-02-14 1-RC
:: Author: Andres Gomez Casanova (AngocA)
:: Made in COLOMBIA.

:: Global variables
set continue=1
set adminInstall=1
set temporalTable=0
set v9_7=0
set retValue=0

:: Main call.
:: Checks if there is already a connection established
db2 connect > NUL
if %ERRORLEVEL% EQU 0 (
 call:init %1 %2 %3
) else (
 echo Please connect to a database before the execution of the installation.
 set retValue=2
)
exit /B %retValue%
goto:eof

:: Installs a given script in DB2.
:: It uses the continue global variable to stop the execution if an error occurs.
:installScript
 set script=%~1
 echo %script%
 db2 -tsf %script%
 if %ERRORLEVEL% NEQ 0 (
  set continue=0
 )
goto:eof

:: Function that install the utility for version 10.1.
:: DB2 v10.1
:v10.1
 echo Installing utility for v10.1
 if %adminInstall% EQU 1 (
  if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\00-AdminObjects.sql
 )
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\01-Tables.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\02-UtilityHeader.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\03-UtilityBody.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\04-Appenders.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\05-LOG.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\06-GET_LOGGER.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\07-Trigger.sql

 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\08-AdminHeader.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\09-AdminBody.sql

 cd %LOG4DB2_SRC_MAIN_CODE_PATH%
 cd ..
 cd xml
 if %continue% EQU 1 call:installScript 10-AppendersXML.sql
 cd ..
 cd scripts 2> NUL

 :: Temporal capabilities for tables.
 if %temporalTable% EQU 1 if %continue% EQU 1 (
  echo Create table for Time Travel
  call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\11-TablesTimeTravel.sql
 )

 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\12-Version.sql

 echo Please visit the wiki to learn how to use and configure this utility
 echo https://github.com/angoca/log4db2/wiki
 echo To report an issue or provide feedback, please visit:
 echo https://github.com/angoca/log4db2/issues
 echo.
 if %continue% EQU 1 (
  echo log4db2 was successfully installed
  db2 -x "values 'Database: ' || current server"
  db2 -x "values 'Version: ' || logger.version"
  db2 -x "select 'Schema: ' || base_moduleschema from syscat.modules where moduleschema = 'SYSPUBLIC' and modulename = 'LOGGER'"
  set retValue=0
 ) else (
  echo "Check the error(s) and reinstall the utility"
  set retValue=1
 )
goto:eof

:: Function that install the utility for version 9.7.
:: DB2 v9.7
:v9.7
 echo Installing utility for v9.7
 if %adminInstall% EQU 1 (
  if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\00-AdminObjects.sql
 )
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\01-Tables_v9_7.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\02-UtilityHeader.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\03-UtilityBody.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\04-Appenders.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\05-LOG.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\06-GET_LOGGER_v9_7.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\07-Trigger.sql

 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\08-AdminHeader.sql
 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\09-AdminBody.sql

 cd %LOG4DB2_SRC_MAIN_CODE_PATH%
 cd ..
 cd xml
 if %continue% EQU 1 call:installScript 10-AppendersXML.sql
 cd ..
 cd scripts 2> NUL

 if %continue% EQU 1 call:installScript %LOG4DB2_SRC_MAIN_CODE_PATH%\12-Version.sql

 echo Please visit the wiki to learn how to use and configure this utility
 echo https://github.com/angoca/log4db2/wiki
 echo To report an issue or provide feedback, please visit:
 echo https://github.com/angoca/log4db2/issues
 echo.
 if %continue% EQU 1 (
  echo log4db2 was successfully installed
  db2 -x "values 'Database: ' || current server"
  db2 -x "values 'Version: ' || logger.version"
  db2 -x "select 'Schema: ' || base_moduleschema from syscat.modules where moduleschema = 'SYSPUBLIC' and modulename = 'LOGGER'"
  set retValue=0
 ) else (
  echo "Check the error(s) and reinstall the utility"
  set retValue=1
 )
goto:eof

:: This functions checks all parameters and assign them to global variables.
:checkParam
 set param1=%1
 set param2=%2
 set param3=%3
 if /I "%param1%" == "-A" (
  set adminInstall=0
 )
 if /I "%param2%" == "-A" (
  set adminInstall=0
 )
 if /I "%param3%" == "-A" (
  set adminInstall=0
 )
 if /I "%param1%" == "-t" (
  set temporalTable=1
 )
 if /I "%param2%" == "-t" (
  set temporalTable=1
 )
 if /I "%param3%" == "-t" (
  set temporalTable=1
 )
 if /I "%param1%" == "-v9_7" (
  set v9_7=1
 )
 if /I "%param2%" == "-v9_7" (
  set v9_7=1
 )
 if /I "%param3%" == "-v9_7" (
  set v9_7=1
 )
goto:eof

:: Main unction that starts the installation.
:init
 :: Initialize the environment.
 if EXIST init.bat (
  call init.bat
 )

 echo log4db2 is licensed under the terms of the Simplified-BSD license

 :: Check the given parameters.
 call:checkParam %1 %2 %3

 :: Checks in which DB2 version the utility will be installed.
 :: DB2 v10.1 is the default version.
 if %v9_7% EQU 1 (
  call:v9.7
 ) else (
  call:v10.1
 )

 if EXIST uninit.bat (
  call uninit.bat
 )
goto:eof

Order in names

Order in names


c:\python26\python.exe setup.py clean
c:\python26\python.exe setup.py install
c:\python26\python.exe setup.py bdist_wininst
c:\python26\python.exe setup.py sdist --formats=gztar,zip
copy dist\*.* \\ironpaw\pub\jasons\arcrest
copy documentation\html\*.* \\ironpaw\pub\jasons\arcrest\documentation\
python mergeifneeded.py
hg history > \\ironpaw\pub\jasons\arcrest\changelog.txt
unix2dos \\ironpaw\pub\jasons\arcrest\changelog.txt
del \\ironpaw\pub\jasons\arcrest\*.bak

c:\python26\python.exe setup.py clean
c:\python26\python.exe setup.py install
c:\python26\python.exe setup.py bdist_wininst
c:\python26\python.exe setup.py sdist --formats=gztar,zip
copy dist\*.* c:\pub\arcrest
copy documentation\html\*.* c:\pub\arcrest\documentation\
python mergeifneeded.py
hg history > c:\pub\arcrest\changelog.txt
unix2dos c:\pub\arcrest\changelog.txt
del c:\pub\arcrest\*.bak

Deploy to \\jscheirer\pub\

Deploy to \\jscheirer\pub\


mkdir src
cpptoxml\debug\cpptoxml.exe QtGui -qt > src\qtgui.xml
lua generator\generator.lua src\qtgui.xml -n qtgui -t generator\types.lua -i QtGui -f generator\qt_internal.lua
cd qtgui_src
copy /Y ..\common\*.* .
::qmake -project -template lib -o qtgui.pro
::qmake -tp vc qtgui.pro
qmake -tp vc qtgui_merged_build.pro
cd ..

add script for building on windows

add script for building on windows


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\portable259
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\Prelude.fs Unquote\DynamicOperators.fs Unquote\EvaluationException.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\AssertionFailedException.fs Unquote\Assertions.fs

REM building for portable259
"C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\fsc.exe" -o:staging\portable259\Unquote.dll --noframework --define:TRACE --define:PORTABLE --doc:staging\portable259\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\Prelude.fs Unquote\DynamicOperators.fs Unquote\EvaluationException.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\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"
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\portable259\Unquote.dll "nuget\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Unquote.dll"
copy staging\portable259\Unquote.xml "nuget\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\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
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\Prelude.fs Unquote\DynamicOperators.fs Unquote\EvaluationException.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\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\Prelude.fs Unquote\DynamicOperators.fs Unquote\EvaluationException.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\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"
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"

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

change path

change path


@echo off
echo building Addin...
python makeaddin.py
echo signing Addin...
c:\apps\arcgis\Desktop10.1\bin\ESRISignAddin.exe c:\data\arcgis\addins\genegis\genegis.esriaddin /c:c:\data\arcgis\addins\cert.cer
start genegis.esriaddin
start %HOMEDRIVE%%HOMEPATH%\Documents\ArcGIS\genegis.mxd

build batch file.

build batch file.


@echo off
cd %~dp0

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

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

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

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

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

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

@echo off
cd %~dp0

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

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

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

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

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

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

Enable pinning build script

Enable pinning build script


@echo off
setlocal

set _projectName=CommandLine
set _solution=%_projectName%.sln
set _codeProject=src\%_projectName%.csproj
set _testProject=test\%_projectName%.tests.csproj

set _config=%1
if not defined _config (
  set _config=Debug
)

echo Building Config '%_config%'
echo Solution: '%_solution%'
echo Code: '%_codeProject%'
echo Test: '%_testProject%'

echo Restoring packages
dotnet restore

echo Cleaning solution
dotnet clean %_solution%

echo Building solution
dotnet build %_solution% -c %_config%

echo Running tests
dotnet test --no-build -c %_config% %_testProject%

echo Creating NuGet package
dotnet pack --no-build -c %_config% %_codeProject%

endlocal
@echo on

@echo off
setlocal

set _projectName=CommandLine
set _solution=%_projectName%.sln
set _codeProject=src\%_projectName%.csproj
set _testProject=test\%_projectName%.tests.csproj

set _config=%1
if not defined _config (
  set _config=Debug
)

echo Building Config '%_config%'
echo Solution: '%_solution%'
echo Code: '%_codeProject%'
echo Test: '%_testProject%'

echo --------------------------
echo !!! Restoring packages !!!
echo --------------------------
dotnet restore

echo -------------------------
echo !!! Cleaning solution !!!
echo -------------------------
dotnet clean %_solution%

echo -------------------------
echo !!! Building solution !!!
echo -------------------------
dotnet build %_solution% -c %_config%

echo ---------------------
echo !!! Running tests !!!
echo ---------------------
dotnet test --no-build -c %_config% %_testProject%

echo ------------------------------
echo !!! Creating NuGet package !!!
echo ------------------------------
dotnet pack --no-build -c %_config% %_codeProject%

endlocal
@echo on

Make the build script output easier to read


@echo off
cd %~dp0

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

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

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

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_DOTNET_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

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

@echo off
cd %~dp0

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

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

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

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_KRE_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

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

Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL


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

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

:: RUNTIME
set REEF_VERSION=0.1-SNAPSHOT
set SELF_JAR=%REEF_HOME%\reef-examples\target\reef-examples-%REEF_VERSION%.jar
set REEF_JAR=%REEF_HOME%\reef-runtime-yarn\target\reef-runtime-yarn-%REEF_VERSION%-jar-with-dependencies.jar
set LOCAL_JAR=%REEF_HOME%\reef-runtime-local\target\reef-runtime-local-%REEF_VERSION%.jar

:: set LOCAL_RUNTIME_TMP="-Dcom.microsoft.reef.runtime.local.folder=%REEF_HOME%\reef-examples\REEF_RUNTIME_LOCAL\"
set LOGGING_CONFIG=-Djava.util.logging.config.class=com.microsoft.reef.util.logging.Config

set CLASSPATH=%YARN_CONF_DIR%;%YARN_HOME%\share\hadoop\common\lib\*;%YARN_HOME%\share\hadoop\common\*;%YARN_HOME%\contrib\capacity-scheduler\*.jar;%YARN_HOME%\share\hadoop\hdfs;%YARN_HOME%\share\hadoop\hdfs\lib\*;%YARN_HOME%\share\hadoop\hdfs\*;%YARN_HOME%\share\hadoop\yarn\lib\*;%YARN_HOME%\share\hadoop\yarn\*;%YARN_HOME%\share\hadoop\mapreduce\lib\*;%YARN_HOME%\share\hadoop\mapreduce\*;%CLASSPATH%

set CMD=java -cp %REEF_JAR%;%LOCAL_JAR%;%SELF_JAR%;%CLASSPATH% %LOCAL_RUNTIME_TMP% %LOGGING_CONFIG% %*
echo %CMD%
%CMD%

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

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

:: RUNTIME
set REEF_VERSION=0.1-SNAPSHOT
set SELF_JAR=%REEF_HOME%\reef-examples\target\reef-examples-%REEF_VERSION%.jar
set REEF_JAR=%REEF_HOME%\reef-runtime-yarn\target\reef-runtime-yarn-%REEF_VERSION%-jar-with-dependencies.jar
set LOCAL_JAR=%REEF_HOME%\reef-runtime-local\target\reef-runtime-local-%REEF_VERSION%.jar

:: set LOCAL_RUNTIME_TMP="-Dcom.microsoft.reef.runtime.local.folder=%REEF_HOME%\reef-examples\REEF_RUNTIME_LOCAL\"
set LOGGING_CONFIG=-Djava.util.logging.config.class=com.microsoft.reef.util.logging.Config

set CLASSPATH=%YARN_CONF_DIR%;%YARN_HOME%\share\hadoop\common\lib\*;%YARN_HOME%\share\hadoop\common\*;%YARN_HOME%\contrib\capacity-scheduler\*.jar;%YARN_HOME%\share\hadoop\hdfs;%YARN_HOME%\share\hadoop\hdfs\lib\*;%YARN_HOME%\share\hadoop\hdfs\*;%YARN_HOME%\share\hadoop\yarn\lib\*;%YARN_HOME%\share\hadoop\yarn\*;%YARN_HOME%\share\hadoop\mapreduce\lib\*;%YARN_HOME%\share\hadoop\mapreduce\*;%YARN_HOME%\etc\hadoop\;%CLASSPATH%

set CMD=java -cp %REEF_JAR%;%LOCAL_JAR%;%SELF_JAR%;%CLASSPATH% %LOCAL_RUNTIME_TMP% %LOGGING_CONFIG% %*
echo %CMD%
%CMD%

Update run.cmd

Update run.cmd

Adding %YARN_HOME%\etc\hadoop\; to the classpath


:: Copyright (c) 2011 The Native Client Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.

@echo off
setlocal
set HERMETIC_CYGWIN=hermetic_cygwin_1_7_15-0_1-with-20120803-cygwin
if exist "%~dp0..\cygwin\%HERMETIC_CYGWIN%.installed" goto :skip_cygwin_install
if exist "%~dp0..\tools\BUILD\.gcc-extras-version" del "%~dp0..\tools\BUILD\.gcc-extras-version"
if exist "%~dp0..\tools\BACKPORTS\binutils" rmdir /s /q "%~dp0..\tools\BACKPORTS\binutils"
if exist "%~dp0..\tools\BACKPORTS\gcc" rmdir /s /q "%~dp0..\tools\BACKPORTS\gcc"
if exist "%~dp0..\tools\BACKPORTS\gdb" rmdir /s /q "%~dp0..\tools\BACKPORTS\gdb"
if exist "%~dp0..\tools\BACKPORTS\glibc" rmdir /s /q "%~dp0..\tools\BACKPORTS\glibc"
if exist "%~dp0..\tools\BACKPORTS\linux-headers-for-nacl" rmdir /s /q "%~dp0..\tools\BACKPORTS\linux-headers-for-nacl"
if exist "%~dp0..\tools\BACKPORTS\newlib" rmdir /s /q "%~dp0..\tools\BACKPORTS\newlib"
if not exist "%~dp0..\cygwin" goto :dont_remove_cygwin
rmdir /s /q "%~dp0..\cygwin"
if errorlevel 1 goto :rmdir_fail
mkdir "%~dp0..\cygwin"
:dont_remove_cygwin
cscript //nologo //e:jscript "%~dp0get_file.js" https://commondatastorage.googleapis.com/nativeclient-mirror/nacl/cygwin_mirror/%HERMETIC_CYGWIN%.exe "%~dp0%HERMETIC_CYGWIN%.exe"
if errorlevel 1 goto :download_fail
:download_success
start /WAIT %~dp0%HERMETIC_CYGWIN%.exe /DEVEL /S /D=%~dp0..\cygwin
if errorlevel 1 goto :install_fail
set CYGWIN=nodosfilewarning
"%~dp0..\cygwin\bin\touch" "%~dp0..\cygwin\%HERMETIC_CYGWIN%.installed"
if errorlevel 1 goto :install_fail
del /f /q "%~dp0%HERMETIC_CYGWIN%.exe"
:skip_cygwin_install
endlocal
set "PATH=%~dp0..\cygwin\bin;%PATH%"
goto :end
:rmdir_fail
endlocal
echo Failed to remove old version of cygwin
set ERRORLEVEL=1
goto :end
:download_fail
:: TODO(bradnelson): Check certs when this issue is resolved.
::     http://code.google.com/p/nativeclient/issues/detail?id=2931
c:\cygwin\bin\wget --no-check-certificate https://commondatastorage.googleapis.com/nativeclient-mirror/nacl/cygwin_mirror/%HERMETIC_CYGWIN%.exe -O "%~dp0%HERMETIC_CYGWIN%.exe"
if errorlevel 1 goto :wget_fail
goto download_success
:wget_fail
c:\cygwin\bin\wget --no-check-certificate https://commondatastorage.googleapis.com/nativeclient-mirror/nacl/cygwin_mirror/%HERMETIC_CYGWIN%.exe -O "%~dp0%HERMETIC_CYGWIN%.exe"
if errorlevel 1 goto :cygwin_wget_fail
goto download_success
:cygwin_wget_fail
endlocal
echo Failed to download cygwin
set ERRORLEVEL=1
goto :end
:install_fail
endlocal
echo Failed to install cygwin
set ERRORLEVEL=1
goto :end
:end

:: Copyright (c) 2011 The Native Client Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.

@echo off
setlocal
set HERMETIC_CYGWIN=hermetic_cygwin_1_7_15-0_1-with-20120816-cygwin
if exist "%~dp0..\cygwin\%HERMETIC_CYGWIN%.installed" goto :skip_cygwin_install
if exist "%~dp0..\tools\BUILD\.gcc-extras-version" del "%~dp0..\tools\BUILD\.gcc-extras-version"
if exist "%~dp0..\tools\BACKPORTS\binutils" rmdir /s /q "%~dp0..\tools\BACKPORTS\binutils"
if exist "%~dp0..\tools\BACKPORTS\gcc" rmdir /s /q "%~dp0..\tools\BACKPORTS\gcc"
if exist "%~dp0..\tools\BACKPORTS\gdb" rmdir /s /q "%~dp0..\tools\BACKPORTS\gdb"
if exist "%~dp0..\tools\BACKPORTS\glibc" rmdir /s /q "%~dp0..\tools\BACKPORTS\glibc"
if exist "%~dp0..\tools\BACKPORTS\linux-headers-for-nacl" rmdir /s /q "%~dp0..\tools\BACKPORTS\linux-headers-for-nacl"
if exist "%~dp0..\tools\BACKPORTS\newlib" rmdir /s /q "%~dp0..\tools\BACKPORTS\newlib"
if not exist "%~dp0..\cygwin" goto :dont_remove_cygwin
rmdir /s /q "%~dp0..\cygwin"
if errorlevel 1 goto :rmdir_fail
mkdir "%~dp0..\cygwin"
:dont_remove_cygwin
cscript //nologo //e:jscript "%~dp0get_file.js" https://commondatastorage.googleapis.com/nativeclient-mirror/nacl/cygwin_mirror/%HERMETIC_CYGWIN%.exe "%~dp0%HERMETIC_CYGWIN%.exe"
if errorlevel 1 goto :download_fail
:download_success
start /WAIT %~dp0%HERMETIC_CYGWIN%.exe /DEVEL /S /D=%~dp0..\cygwin
if errorlevel 1 goto :install_fail
set CYGWIN=nodosfilewarning
"%~dp0..\cygwin\bin\touch" "%~dp0..\cygwin\%HERMETIC_CYGWIN%.installed"
if errorlevel 1 goto :install_fail
del /f /q "%~dp0%HERMETIC_CYGWIN%.exe"
:skip_cygwin_install
endlocal
set "PATH=%~dp0..\cygwin\bin;%PATH%"
goto :end
:rmdir_fail
endlocal
echo Failed to remove old version of cygwin
set ERRORLEVEL=1
goto :end
:download_fail
:: TODO(bradnelson): Check certs when this issue is resolved.
::     http://code.google.com/p/nativeclient/issues/detail?id=2931
c:\cygwin\bin\wget --no-check-certificate https://commondatastorage.googleapis.com/nativeclient-mirror/nacl/cygwin_mirror/%HERMETIC_CYGWIN%.exe -O "%~dp0%HERMETIC_CYGWIN%.exe"
if errorlevel 1 goto :wget_fail
goto download_success
:wget_fail
c:\cygwin\bin\wget --no-check-certificate https://commondatastorage.googleapis.com/nativeclient-mirror/nacl/cygwin_mirror/%HERMETIC_CYGWIN%.exe -O "%~dp0%HERMETIC_CYGWIN%.exe"
if errorlevel 1 goto :cygwin_wget_fail
goto download_success
:cygwin_wget_fail
endlocal
echo Failed to download cygwin
set ERRORLEVEL=1
goto :end
:install_fail
endlocal
echo Failed to install cygwin
set ERRORLEVEL=1
goto :end
:end

Update cygwin version. New version fixes bug occuring on our bots.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=1918
TEST= bots
Review URL: https://chromiumcodereview.appspot.com/10834356

git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@9513 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2


mklink /j %userprofile%\bin %userprofile%\.dotfiles\bin
mklink /j %userprofile%\vimfiles %userprofile%\.dotfiles\vimfiles
mklink /j %userprofile%\.git_template %userprofile%\.dotfiles\.git_template
mklink /j %userprofile%\.prompts %userprofile%\.dotfiles\prompts
mklink /j %userprofile%\.zsh %userprofile%\.dotfiles\zsh
mklink /j %userprofile%\AutoHotkey %userprofile%\.dotfiles\AutoHotkey
mklink %userprofile%\.agignore %userprofile%\.dotfiles\.agignore
mklink %userprofile%\.aprc %userprofile%\.dotfiles\.aprc
mklink %userprofile%\.bash_profile %userprofile%\.dotfiles\.bash_profile
mklink %userprofile%\.bashrc %userprofile%\.dotfiles\.bashrc
mklink %userprofile%\.ctags %userprofile%\.dotfiles\.ctags
mklink %userprofile%\.curlrc %userprofile%\.dotfiles\.curlrc
mklink %userprofile%\.dir_colors %userprofile%\.dotfiles\.dir_colors
mklink %userprofile%\.editorconfig %userprofile%\.dotfiles\.editorconfig
mklink %userprofile%\.gemrc %userprofile%\.dotfiles\.gemrc
mklink %userprofile%\.gitconfig %userprofile%\.dotfiles\.gitconfig
mklink %userprofile%\.gitignore %userprofile%\.dotfiles\.gitignore
mklink %userprofile%\.inputrc %userprofile%\.dotfiles\.inputrc
mklink %userprofile%\.irbrc %userprofile%\.dotfiles\.irbrc
mklink %userprofile%\.jscs.json %userprofile%\.dotfiles\.jscs.json
mklink %userprofile%\.jshintrc %userprofile%\.dotfiles\.jshintrc
mklink %userprofile%\.pryrc %userprofile%\.dotfiles\.pryrc
mklink %userprofile%\.rubocop-disabled.yml %userprofile%\.dotfiles\.rubocop-disabled.yml
mklink %userprofile%\.rubocop-enabled.yml %userprofile%\.dotfiles\.rubocop-enabled.yml
mklink %userprofile%\.rubocop.yml %userprofile%\.dotfiles\.rubocop.yml
mklink %userprofile%\.tmux.conf %userprofile%\.dotfiles\.tmux.conf
mklink %userprofile%\.vimrc %userprofile%\.dotfiles\.vimrc
mklink %userprofile%\.yamllint %userprofile%\.dotfiles\.yamllint
mklink %userprofile%\.zshrc %userprofile%\.dotfiles\.zshrc
mklink %userprofile%\.zshrc.private %userprofile%\.dotfiles\.zshrc.private
mklink %userprofile%\console_config.rb %userprofile%\.dotfiles\console_config.rb

mkdir %userprofile%\Documents\WindowsPowerShell
mklink %userprofile%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 %userprofile%\.dotfiles\powershell\Microsoft.PowerShell_profile.ps1

mklink "C:\\Program Files\\ConEmu\\ConEmu.xml" %userprofile%\.dotfiles\ConEmu.xml

pause

mklink /j %userprofile%\bin %userprofile%\.dotfiles\bin
mklink /j %userprofile%\vimfiles %userprofile%\.dotfiles\vimfiles
mklink /j %userprofile%\.git_template %userprofile%\.dotfiles\.git_template
mklink /j %userprofile%\.prompts %userprofile%\.dotfiles\prompts
mklink /j %userprofile%\.zsh %userprofile%\.dotfiles\zsh
mklink /j %userprofile%\AutoHotkey %userprofile%\.dotfiles\AutoHotkey
mklink %userprofile%\.agignore %userprofile%\.dotfiles\.agignore
mklink %userprofile%\.aprc %userprofile%\.dotfiles\.aprc
mklink %userprofile%\.bash_profile %userprofile%\.dotfiles\.bash_profile
mklink %userprofile%\.bashrc %userprofile%\.dotfiles\.bashrc
mklink %userprofile%\.ctags %userprofile%\.dotfiles\.ctags
mklink %userprofile%\.curlrc %userprofile%\.dotfiles\.curlrc
mklink %userprofile%\.dir_colors %userprofile%\.dotfiles\.dir_colors
mklink %userprofile%\.editorconfig %userprofile%\.dotfiles\.editorconfig
mklink %userprofile%\.gemrc %userprofile%\.dotfiles\.gemrc
mklink %userprofile%\.gitconfig %userprofile%\.dotfiles\.gitconfig
mklink %userprofile%\.gitignore %userprofile%\.dotfiles\.gitignore
mklink %userprofile%\.inputrc %userprofile%\.dotfiles\.inputrc
mklink %userprofile%\.irbrc %userprofile%\.dotfiles\.irbrc
mklink %userprofile%\.jscs.json %userprofile%\.dotfiles\.jscs.json
mklink %userprofile%\.jshintrc %userprofile%\.dotfiles\.jshintrc
mklink %userprofile%\.pryrc %userprofile%\.dotfiles\.pryrc
mklink %userprofile%\.rubocop-disabled.yml %userprofile%\.dotfiles\.rubocop-disabled.yml
mklink %userprofile%\.rubocop-enabled.yml %userprofile%\.dotfiles\.rubocop-enabled.yml
mklink %userprofile%\.rubocop.yml %userprofile%\.dotfiles\.rubocop.yml
mklink %userprofile%\.tmux.conf %userprofile%\.dotfiles\.tmux.conf
mklink %userprofile%\.vimrc %userprofile%\.dotfiles\.vimrc
mklink %userprofile%\.yamllint %userprofile%\.dotfiles\.yamllint
mklink %userprofile%\.zshrc %userprofile%\.dotfiles\.zshrc
mklink %userprofile%\.zshrc.private %userprofile%\.dotfiles\.zshrc.private
mklink %userprofile%\console_config.rb %userprofile%\.dotfiles\console_config.rb
mklink %userprofile%\AppData\Roaming\alacritty\alacritty.yml %userprofile%\.dotfiles\alacritty.yml

mkdir %userprofile%\Documents\WindowsPowerShell
mklink %userprofile%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 %userprofile%\.dotfiles\powershell\Microsoft.PowerShell_profile.ps1

mklink "C:\\Program Files\\ConEmu\\ConEmu.xml" %userprofile%\.dotfiles\ConEmu.xml

pause

Add alacritty.yml link

Bootstrap: Add alacritty.yml link


@ECHO OFF

:: === Usage ===
:: This script builds a primesieve binary that is suitable for
:: distribution on the internet. The built primesieve binary
:: will only depend on kernel32.dll.
::
:: 1) Open a Visual Studio Command Prompt
:: 2) cd into primesieve repo
:: 3) Run: scripts/build_msvc.bat

rmdir /s /q build-msvc
mkdir build-msvc
cd build-msvc

cl /O2 /EHsc /W3 /D NDEBUG /I ../include ../src/*.cpp ../src/app/*.cpp /Feprimesieve.exe

echo ""
primesieve.exe --version

echo ""
primesieve.exe --test

Test primesieve binary

Test primesieve binary


@ECHO OFF
REM Fetch the DolphinVM binaries from GitHub into the current directory.
REM Specify a parameter to fetch a specific version or leave blank to
REM get the recommended VM version for this release of the image.

FOR /F "usebackq delims=" %%A in (`"git describe --abbrev=0"`) do SET tag=%%A
powershell.exe -ExecutionPolicy RemoteSigned -file FetchVM.ps1 %tag% %*

@ECHO OFF
REM Fetch the DolphinVM binaries from GitHub into the current directory.
REM Specify a parameter to fetch a specific version or leave blank to
REM get the recommended VM version for this release of the image.

FOR /F "usebackq delims=" %%A in (`"git describe --tags --abbrev=0"`) do SET tag=%%A
powershell.exe -ExecutionPolicy RemoteSigned -file FetchVM.ps1 %tag% %*

Use unannotated tags for fetchvm as github creates these for releases

The FetchVM script uses the latest tag to decide which VM to download, but
was assuming that only annotated tags should be considered. However, since
the tags created by github releases are not annotated, this is not very
useful!


@echo off
goto license
The MIT License (MIT)

Copyright (c) 2014 Jesper S. Dramsch

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
:license

tasklist /FI "IMAGENAME eq steam.exe" 2>NUL | find /I /N "steam.exe">NUL
if "%ERRORLEVEL%"=="0" (
echo Program is running
set yup=1
@"C:\Program Files (x86)\Steam\Steam.exe" -shutdown
timeout /T 2  > nul
)
tasklist /FI "IMAGENAME eq steam.exe" 2>NUL | find /I /N "steam.exe">NUL
if "%ERRORLEVEL%"=="0" (
echo Attempting force close
taskkill /F /IM steam.exe
echo Program shut down
) else (
if "%yup%"=="1" (
echo Program shut down
) else (
echo Program not running
)
)
set /p id="Enter SteamID: "
set "psCommand=powershell -Command "$pword = read-host 'Enter Password' -AsSecureString ; ^
    $BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^
        [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)""
for /f "usebackq delims=" %%p in (`%psCommand%`) do set password=%%p
echo Starting up
@"C:\Program Files (x86)\Steam\Steam.exe" -login "%id%" "%password%"
exit

Add Switcher

Add Switcher


cls
call ../../src/locatevc.bat
cl /c /DEBUG ring_allegro.c -I"..\..\libdepwin\allegro\include" -I"..\..\include"
link /DEBUG ring_allegro.obj  ..\..\lib\ring.lib ..\..\libdepwin\allegro\lib\allegro_monolith.lib /DLL /OUT:..\..\bin\ring_allegro.dll /SUBSYSTEM:CONSOLE,"5.01"
del ring_allegro.obj

cls
call ../../src/locatevc.bat
cl /c /DEBUG ring_allegro.c -I"..\..\libdepwin\allegro\include" -I"..\..\include"
link /DEBUG ring_allegro.obj  ..\..\lib\ring.lib ..\..\libdepwin\allegro\lib\allegro.lib ..\..\libdepwin\allegro\lib\allegro_image.lib ..\..\libdepwin\allegro\lib\allegro_dialog.lib ..\..\libdepwin\allegro\lib\allegro_ttf.lib ..\..\libdepwin\allegro\lib\allegro_acodec.lib ..\..\libdepwin\allegro\lib\allegro_primitives.lib ^
..\..\libdepwin\allegro\lib\allegro_audio.lib ..\..\libdepwin\allegro\lib\allegro_color.lib ..\..\libdepwin\allegro\lib\allegro_font.lib ..\..\libdepwin\allegro\lib\allegro_video.lib ..\..\libdepwin\allegro\lib\allegro_primitives.lib ..\..\libdepwin\allegro\lib\allegro_memfile.lib ^
		..\..\libdepwin\allegro\lib\allegro_physfs.lib ^
	  /DLL /OUT:..\..\bin\ring_allegro.dll /SUBSYSTEM:CONSOLE,"5.01"
del ring_allegro.obj

Update RingAllegro - buildvc.bat - Use Allegro 5.2 instead of Allegro 5.1 (Nice update because the new version of Allegro support dpi awareness on Microsoft Windows) - So when we run games in full screen, it will not be in wrong scale because when the user settings uses scaling like 125% or 150% and so on.


@ECHO OFF

REM Configure our environment variables.  We assume that TASM is
REM installed in ~\bin and that your MFORTH source is located in
REM ~\Dev\main\MFORTH.
SETLOCAL

SET TASMDIR=%USERPROFILE%\bin\tasm3.2
SET TASM=%TASMDIR%\tasm.exe
SET TASMTABS=%TASMDIR%

SET MFORTHDIR=%USERPROFILE%\Dev\main\MFORTH
SET BINDIR=%MFORTHDIR%\bin
SET SRCDIR=%MFORTHDIR%\src\MFORTH

REM Enable the line below to generate a build with the MFORTH profiler.
REM SET PROFILER=-dPROFILER

REM Get the Perforce change number for this build if -v was specified.
IF "%1"=="-v" (GOTO :getchange) ELSE (GOTO :nochange)

:getchange
FOR /F "Tokens=2" %%I IN ('p4 changes -i -m 1 //depot/main/MFORTH/src/...#have') DO SET MFORTH_CHANGE=%%I
ECHO Change number is %MFORTH_CHANGE%.
GOTO assemble

:nochange
SET MFORTH_CHANGE=0
GOTO assemble

:assemble
REM TASM can only process relative includes if they are relative to the
REM current directory.  That means that we need to change into the
REM source directory before we try to assemble MFORTH.  We store the
REM current directory so that we can return to that directory after
REM assembling.
SET PREVDIR=%CD%
CD %SRCDIR%

REM Assemble MFORTH using the standard, linked-list dictionary.
%TASM% -85 -s -b -f00 ^
	%PROFILER% -dMFORTH_CHANGE=%MFORTH_CHANGE% ^
	main.asm ^
	%BINDIR%\MFORTH.BX ^
	%BINDIR%\MFORTH.LST ^
	%BINDIR%\MFORTH.EXP ^
	%BINDIR%\MFORTH.SYM

REM Use PhashGen to generate a perfect hash table for the dictionary.
%MFORTHDIR%\tools\PhashGen.exe ^
	%BINDIR%\MFORTH.BX ^
	%BINDIR%\MFORTH.SYM ^
	%SRCDIR%\phash.asm

REM Assemble MFORTH again, this time using the perfect hash table.
%TASM% -85 -s -b -f00 ^
	%PROFILER% -dPHASH -dMFORTH_CHANGE=%MFORTH_CHANGE% ^
	main.asm ^
	%BINDIR%\MFORTH.BX ^
	%BINDIR%\MFORTH.LST ^
	%BINDIR%\MFORTH.EXP ^
	%BINDIR%\MFORTH.SYM

REM Restore the previous directory.
CD %PREVDIR%

Add the MFORTH ROM build file.

Add the MFORTH ROM build file.


rem @echo off
setlocal

if not exist .\build\* mkdir build

rem only build passed in font
if not "%1%"=="" (
	call :build_font %1
	exit /b
)

rem build all fonts
for /d %%d in (.\ligature\*) do call :build_font %%~nd
exit /b

:build_font
@echo Building %1
set lig=%1
set otf=%lig:Lig=%

if not exist .\original\%otf%.otf exit /b

@echo Building %lig%
ttx -f .\original\%otf%.otf
node index.js %otf%
ttx -f .\build\%lig%.ttx
exit /b

@echo off
setlocal

if not exist .\build\* mkdir build

rem only build passed in font
if not "%1%"=="" (
	call :build_font %1
	exit /b
)

rem build all fonts
for /d %%d in (.\ligature\*) do call :build_font %%~nd
exit /b

:build_font
set lig=%1
set otf=%lig:Lig=%

if not exist .\original\%otf%.otf exit /b

@echo Building %lig%
ttx -f .\original\%otf%.otf
node index.js %otf%
ttx -f .\build\%lig%.ttx
exit /b

Remove debugging stuff

Remove debugging stuff


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

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

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

dir

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

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

nuget.exe restore Sigma.sln

%programfiles(x86)%\MSBuild\14.0\Bin\MsBuild.exe Sigma.sln /p:Configuration="%config%" /p:Platform=x64

REM pack Sigma.Core

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

cd ..

REM pack Sigma.Core.Monitors.WPF

cd Sigma.Core.Monitors.WPF

REM update the targets file

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

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

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

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

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

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

cp nuget.exe Sigma.Core/
cp nuget.exe Sigma.Core.Monitors.WPF/

nuget.exe restore Sigma.sln

"%programfiles(x86)%\MSBuild\14.0\Bin\MsBuild.exe" Sigma.sln /p:Configuration="%config%" /p:Platform=x64

REM pack Sigma.Core

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

cd ..

REM pack Sigma.Core.Monitors.WPF

cd Sigma.Core.Monitors.WPF

REM update the targets file

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

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

Fix path

Fix path


@ECHO OFF
call dmdenv 1.057-tango-0.99.9
xfbuild -g -debug -unittest -version=Unittest +xtango +D.xf/LexerTest.deps +O.xf/LexerTest.objs +oLexerTest LexerTest.d
xfbuild -g -debug -unittest -version=Unittest +xtango +D.xf/AstTest.deps +O.xf/AstTest.objs +oAstTest AstTest.d
xfbuild -g -debug -unittest -version=Unittest +xtango +D.xf/EvalTest.deps +O.xf/EvalTest.objs +oEvalTest EvalTest.d
xfbuild -g -debug -unittest -version=Unittest +xtango +D.xf/ReplTest.deps +O.xf/ReplTest.objs +oReplTest ReplTest.d

@ECHO OFF
call dmdenv 1.057-tango-0.99.9
REM xfbuild -g -debug -unittest -version=Unittest +xtango +D.xf/LexerTest.deps +O.xf/LexerTest.objs +oLexerTest LexerTest.d
REM xfbuild -g -debug -unittest -version=Unittest +xtango +D.xf/AstTest.deps +O.xf/AstTest.objs +oAstTest AstTest.d
REM xfbuild -g -debug -unittest -version=Unittest +xtango +D.xf/EvalTest.deps +O.xf/EvalTest.objs +oEvalTest EvalTest.d
xfbuild -g -debug -unittest -version=Unittest +xtango +D.xf/ReplTest.deps +O.xf/ReplTest.objs +oMathEval ReplTest.d

Build now only builds the REPL.

Build now only builds the REPL.


@echo Off
set config=%1
if "%config%" == "" (
   set config=Debug
)
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild Build\Build.proj /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false

@echo Off
set config=%1
if "%config%" == "" (
   set config=Debug
)
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild Build\Build.proj /p:Configuration="%config%" /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false

Remove parallel building. Causes issues for nuget restore


@echo off
setlocal EnableDelayedExpansion

:: Set the default arguments for build
set __BuildArch=x64
set __BuildType=Debug
set __BuildOS=Windows_NT

:: Default to VS2013
set __VSVersion=VS2013
set __VSProductVersion=120

:: Set the various build properties here so that CMake and MSBuild can pick them up
set "__ProjectDir=%~dp0"
:: remove trailing slash
if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
set "__ProjectFilesDir=%__ProjectDir%"
set "__SourceDir=%__ProjectDir%\src"
set "__PackagesDir=%__ProjectDir%\packages"
set "__RootBinDir=%__ProjectDir%\bin"
set "__LogsDir=%__RootBinDir%\Logs"
set __MSBCleanBuildArgs=

:Arg_Loop
if "%1" == "" goto ArgsDone
if /i "%1" == "/?" goto Usage
if /i "%1" == "x64"    (set __BuildArch=x64&&shift&goto Arg_Loop)

if /i "%1" == "debug"    (set __BuildType=Debug&shift&goto Arg_Loop)
if /i "%1" == "release"   (set __BuildType=Release&shift&goto Arg_Loop)

if /i "%1" == "clean"   (set __CleanBuild=1&shift&goto Arg_Loop)

if /i "%1" == "linuxmscorlib" (set __MscorlibOnly=1&set __BuildOS=Linux&shift&goto Arg_Loop)
if /i "%1" == "osxmscorlib" (set __MscorlibOnly=1&set __BuildOS=OSX&shift&goto Arg_Loop)

if /i "%1" == "vs2013" (set __VSVersion=%1&set __VSProductVersion=120&shift&goto Arg_Loop)
if /i "%1" == "vs2015" (set __VSVersion=%1&set __VSProductVersion=140&shift&goto Arg_Loop)

echo Invalid commandline argument: %1
goto Usage

:ArgsDone

echo Commencing CoreCLR Repo build
echo.

:: Set the remaining variables based upon the determined build configuration
set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%"
set "__IntermediatesDir=%__RootBinDir%\obj\%__BuildOS%.%__BuildArch%.%__BuildType%"
set "__PackagesBinDir=%__BinDir%\.nuget"
set "__ToolsDir=%__RootBinDir%\tools"
set "__TestBinDir=%__RootBinDir%\tests\%__BuildOS%.%__BuildArch%.%__BuildType%"
set "__TestIntermediatesDir=%__RootBinDir%\tests\obj\%__BuildOS%.%__BuildArch%.%__BuildType%"

:: Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash
set "__CMakeBinDir=%__BinDir%"
set "__CMakeBinDir=%__CMakeBinDir:\=/%"

:: Configure environment if we are doing a clean build.
if not defined __CleanBuild goto MakeDirectories
echo Doing a clean build
echo.

:: MSBuild projects would need a rebuild
set __MSBCleanBuildArgs=/t:rebuild

:: Cleanup the previous output for the selected configuration
if exist "%__BinDir%" rd /s /q "%__BinDir%"
if exist "%__IntermediatesDir%" rd /s /q "%__IntermediatesDir%"

if exist "%__TestBinDir%" rd /s /q "%__TestBinDir%"
if exist "%__TestIntermediatesDir%" rd /s /q "%__TestIntermediatesDir%"

if exist "%__LogsDir%" del /f /q "%__LogsDir%\*_%__BuildOS%__%__BuildArch%__%__BuildType%.*"

:MakeDirectories
if not exist "%__BinDir%" md "%__BinDir%"
if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%"
if not exist "%__LogsDir%" md "%__LogsDir%"

:: CMake isn't a requirement when building mscorlib only
if defined __MscorlibOnly goto CheckVS

:CheckPrereqs
:: Check prerequisites
echo Checking pre-requisites...
echo.
:: Eval the output from probe-win1.ps1
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy RemoteSigned "& ""%__SourceDir%\pal\tools\probe-win.ps1"""') do %%a

goto CheckVS

:CheckVS
:: Check presence of VS
if defined VS%__VSProductVersion%COMNTOOLS goto CheckVSExistence
echo Visual Studio 2013 Community (free) is a pre-requisite to build this repository.
echo See: https://github.com/dotnet/coreclr/wiki/Developer-Guide#prerequisites
goto :eof

:CheckVSExistence
:: Does VS 2013 or VS 2015 really exist?
if exist "!VS%__VSProductVersion%COMNTOOLS!\..\IDE\devenv.exe" goto CheckMSBuild
echo Visual Studio 2013 Community (free) is a pre-requisite to build this repository.
echo See: https://github.com/dotnet/coreclr/wiki/Developer-Guide#prerequisites
goto :eof

:CheckMSBuild
:: Note: We've disabled node reuse because it causes file locking issues.
::       The issue is that we extend the build with our own targets which
::       means that that rebuilding cannot successfully delete the task
::       assembly.
if /i "%__VSVersion%" =="vs2015" goto MSBuild14
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
goto :CheckMSBuild14
:MSBuild14
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
set UseRoslynCompiler=true
:CheckMSBuild14
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe.  Please see https://github.com/dotnet/coreclr/wiki/Developer%%20Guide for build instructions. && exit /b 1

:: All set to commence the build

setlocal
if defined __MscorlibOnly goto PerformMScorlibBuild

echo Commencing build of native components for %__BuildOS%.%__BuildArch%.%__BuildType%
echo.

:: Set the environment for the native build
call "!VS%__VSProductVersion%COMNTOOLS!\..\..\VC\vcvarsall.bat" x86_amd64

if exist "%VSINSTALLDIR%DIA SDK" goto GenVSSolution
echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^
This is due to a bug in the Visual Studio installer. It does not install DIA SDK at "%VSINSTALLDIR%" but rather ^
at VS install location of previous version. Workaround is to copy DIA SDK folder from VS install location ^
of previous version to "%VSINSTALLDIR%" and then resume build.
:: DIA SDK not included in Express editions
echo Visual Studio 2013 Express does not include the DIA SDK. ^
You need Visual Studio 2013 Community (free).
echo See: https://github.com/dotnet/coreclr/wiki/Developer-Guide#prerequisites
goto :eof

:GenVSSolution
:: Regenerate the VS solution
pushd "%__IntermediatesDir%"
call "%__SourceDir%\pal\tools\gen-buildsys-win.bat" "%__ProjectDir%" %__VSVersion%
popd

:BuildComponents
if exist "%__IntermediatesDir%\install.vcxproj" goto BuildCoreCLR
echo Failed to generate native component build project!
goto :eof

REM Build CoreCLR
:BuildCoreCLR
set "__CoreCLRBuildLog=%__LogsDir%\CoreCLR_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
%_msbuildexe% "%__IntermediatesDir%\install.vcxproj" %__MSBCleanBuildArgs% /nologo /maxcpucount /nodeReuse:false /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% /fileloggerparameters:Verbosity=diag;LogFile="%__CoreCLRBuildLog%"
IF NOT ERRORLEVEL 1 goto PerformMScorlibBuild
echo Native component build failed. Refer !__CoreCLRBuildLog! for details.
goto :eof

:PerformMScorlibBuild
REM endlocal to rid us of environment changes from vcvarsall.bat
endlocal

REM setlocal to prepare for vsdevcmd.bat
setlocal
set __AdditionalMSBuildArgs=

rem Explicitly set Platform causes conflicts in mscorlib project files. Clear it to allow building from VS x64 Native Tools Command Prompt
set Platform=

if defined __MscorlibOnly set __AdditionalMSBuildArgs=/p:BuildNugetPackage=false

:: Set the environment for the managed build
call "!VS%__VSProductVersion%COMNTOOLS!\VsDevCmd.bat"
echo Commencing build of mscorlib for %__BuildOS%.%__BuildArch%.%__BuildType%
echo.
set "__MScorlibBuildLog=%__LogsDir%\MScorlib_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
%_msbuildexe% "%__ProjectFilesDir%\build.proj" %__MSBCleanBuildArgs% /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%__MScorlibBuildLog%" /p:OS=%__BuildOS% %__AdditionalMSBuildArgs%
IF NOT ERRORLEVEL 1 (
  if defined __MscorlibOnly goto :eof
  goto CrossGenMscorlib
)

echo MScorlib build failed. Refer !__MScorlibBuildLog! for details.
goto :eof

:CrossGenMscorlib
echo Generating native image of mscorlib for %__BuildOS%.%__BuildArch%.%__BuildType%
echo.
set "__CrossGenMScorlibLog=%__LogsDir%\CrossgenMScorlib_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
%__BinDir%\crossgen.exe %__BinDir%\mscorlib.dll > "%__CrossGenMScorlibLog%" 2>&1
IF NOT ERRORLEVEL 1 (
  goto PerformTestBuild
)

echo CrossGen mscorlib failed. Refer !__CrossGenMScorlibLog! for details.
goto :eof

:PerformTestBuild
echo.
echo Commencing build of tests for %__BuildOS%.%__BuildArch%.%__BuildType%
echo.
call tests\buildtest.cmd
IF NOT ERRORLEVEL 1 goto SuccessfulBuild
echo Test binaries build failed. Refer !__MScorlibBuildLog! for details.
goto :eof

:SuccessfulBuild
::Build complete
echo Repo successfully built.
echo.
echo Product binaries are available at !__BinDir!
echo Test binaries are available at !__TestBinDir!
goto :eof

:Usage
echo.
echo Usage:
echo %0 BuildArch BuildType [clean] [vsversion] where:
echo.
echo BuildArch can be: x64
echo BuildType can be: Debug, Release
echo Clean - optional argument to force a clean build.
echo VSVersion - optional argument to use VS2013 or VS2015 (default VS2013)
echo linuxmscorlib - Build mscorlib for Linux
echo osxmscorlib - Build mscorlib for OS X
exit /b 1

@echo off
setlocal EnableDelayedExpansion

:: Set the default arguments for build
set __BuildArch=x64
set __BuildType=Debug
set __BuildOS=Windows_NT

:: Default to VS2013
set __VSVersion=VS2013
set __VSProductVersion=120

:: Set the various build properties here so that CMake and MSBuild can pick them up
set "__ProjectDir=%~dp0"
:: remove trailing slash
if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
set "__ProjectFilesDir=%__ProjectDir%"
set "__SourceDir=%__ProjectDir%\src"
set "__PackagesDir=%__ProjectDir%\packages"
set "__RootBinDir=%__ProjectDir%\bin"
set "__LogsDir=%__RootBinDir%\Logs"
set __MSBCleanBuildArgs=

:Arg_Loop
if "%1" == "" goto ArgsDone
if /i "%1" == "/?" goto Usage
if /i "%1" == "x64"    (set __BuildArch=x64&&shift&goto Arg_Loop)

if /i "%1" == "debug"    (set __BuildType=Debug&shift&goto Arg_Loop)
if /i "%1" == "release"   (set __BuildType=Release&shift&goto Arg_Loop)

if /i "%1" == "clean"   (set __CleanBuild=1&shift&goto Arg_Loop)

if /i "%1" == "linuxmscorlib" (set __MscorlibOnly=1&set __BuildOS=Linux&shift&goto Arg_Loop)
if /i "%1" == "osxmscorlib" (set __MscorlibOnly=1&set __BuildOS=OSX&shift&goto Arg_Loop)

if /i "%1" == "vs2013" (set __VSVersion=%1&set __VSProductVersion=120&shift&goto Arg_Loop)
if /i "%1" == "vs2015" (set __VSVersion=%1&set __VSProductVersion=140&shift&goto Arg_Loop)

echo Invalid commandline argument: %1
goto Usage

:ArgsDone

echo Commencing CoreCLR Repo build
echo.

:: Set the remaining variables based upon the determined build configuration
set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%"
set "__IntermediatesDir=%__RootBinDir%\obj\%__BuildOS%.%__BuildArch%.%__BuildType%"
set "__PackagesBinDir=%__BinDir%\.nuget"
set "__ToolsDir=%__RootBinDir%\tools"
set "__TestBinDir=%__RootBinDir%\tests\%__BuildOS%.%__BuildArch%.%__BuildType%"
set "__TestIntermediatesDir=%__RootBinDir%\tests\obj\%__BuildOS%.%__BuildArch%.%__BuildType%"

:: Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash
set "__CMakeBinDir=%__BinDir%"
set "__CMakeBinDir=%__CMakeBinDir:\=/%"

:: Configure environment if we are doing a clean build.
if not defined __CleanBuild goto MakeDirs
echo Doing a clean build
echo.

:: MSBuild projects would need a rebuild
set __MSBCleanBuildArgs=/t:rebuild

:: Cleanup the previous output for the selected configuration
if exist "%__BinDir%" rd /s /q "%__BinDir%"
if exist "%__IntermediatesDir%" rd /s /q "%__IntermediatesDir%"

if exist "%__TestBinDir%" rd /s /q "%__TestBinDir%"
if exist "%__TestIntermediatesDir%" rd /s /q "%__TestIntermediatesDir%"

if exist "%__LogsDir%" del /f /q "%__LogsDir%\*_%__BuildOS%__%__BuildArch%__%__BuildType%.*"

:MakeDirs
if not exist "%__BinDir%" md "%__BinDir%"
if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%"
if not exist "%__LogsDir%" md "%__LogsDir%"

:: CMake isn't a requirement when building mscorlib only
if defined __MscorlibOnly goto CheckVS

:CheckPrereqs
:: Check prerequisites
echo Checking pre-requisites...
echo.
:: Eval the output from probe-win1.ps1
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy RemoteSigned "& ""%__SourceDir%\pal\tools\probe-win.ps1"""') do %%a

goto CheckVS

:CheckVS
:: Check presence of VS
if defined VS%__VSProductVersion%COMNTOOLS goto CheckVSExistence
echo Visual Studio 2013 Community (free) is a pre-requisite to build this repository.
echo See: https://github.com/dotnet/coreclr/wiki/Developer-Guide#prerequisites
goto :eof

:CheckVSExistence
:: Does VS 2013 or VS 2015 really exist?
if exist "!VS%__VSProductVersion%COMNTOOLS!\..\IDE\devenv.exe" goto CheckMSBuild
echo Visual Studio 2013 Community (free) is a pre-requisite to build this repository.
echo See: https://github.com/dotnet/coreclr/wiki/Developer-Guide#prerequisites
goto :eof

:CheckMSBuild
:: Note: We've disabled node reuse because it causes file locking issues.
::       The issue is that we extend the build with our own targets which
::       means that that rebuilding cannot successfully delete the task
::       assembly.
if /i "%__VSVersion%" =="vs2015" goto MSBuild14
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
goto :CheckMSBuild14
:MSBuild14
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
set UseRoslynCompiler=true
:CheckMSBuild14
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe.  Please see https://github.com/dotnet/coreclr/wiki/Developer%%20Guide for build instructions. && exit /b 1

:: All set to commence the build

setlocal
if defined __MscorlibOnly goto PerformMScorlibBuild

echo Commencing build of native components for %__BuildOS%.%__BuildArch%.%__BuildType%
echo.

:: Set the environment for the native build
call "!VS%__VSProductVersion%COMNTOOLS!\..\..\VC\vcvarsall.bat" x86_amd64

if exist "%VSINSTALLDIR%DIA SDK" goto GenVSSolution
echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^
This is due to a bug in the Visual Studio installer. It does not install DIA SDK at "%VSINSTALLDIR%" but rather ^
at VS install location of previous version. Workaround is to copy DIA SDK folder from VS install location ^
of previous version to "%VSINSTALLDIR%" and then resume build.
:: DIA SDK not included in Express editions
echo Visual Studio 2013 Express does not include the DIA SDK. ^
You need Visual Studio 2013 Community (free).
echo See: https://github.com/dotnet/coreclr/wiki/Developer-Guide#prerequisites
goto :eof

:GenVSSolution
:: Regenerate the VS solution
pushd "%__IntermediatesDir%"
call "%__SourceDir%\pal\tools\gen-buildsys-win.bat" "%__ProjectDir%" %__VSVersion%
popd

:BuildComponents
if exist "%__IntermediatesDir%\install.vcxproj" goto BuildCoreCLR
echo Failed to generate native component build project!
goto :eof

REM Build CoreCLR
:BuildCoreCLR
set "__CoreCLRBuildLog=%__LogsDir%\CoreCLR_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
%_msbuildexe% "%__IntermediatesDir%\install.vcxproj" %__MSBCleanBuildArgs% /nologo /maxcpucount /nodeReuse:false /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% /fileloggerparameters:Verbosity=diag;LogFile="%__CoreCLRBuildLog%"
IF NOT ERRORLEVEL 1 goto PerformMScorlibBuild
echo Native component build failed. Refer !__CoreCLRBuildLog! for details.
goto :eof

:PerformMScorlibBuild
REM endlocal to rid us of environment changes from vcvarsall.bat
endlocal

REM setlocal to prepare for vsdevcmd.bat
setlocal
set __AdditionalMSBuildArgs=

rem Explicitly set Platform causes conflicts in mscorlib project files. Clear it to allow building from VS x64 Native Tools Command Prompt
set Platform=

if defined __MscorlibOnly set __AdditionalMSBuildArgs=/p:BuildNugetPackage=false

:: Set the environment for the managed build
call "!VS%__VSProductVersion%COMNTOOLS!\VsDevCmd.bat"
echo Commencing build of mscorlib for %__BuildOS%.%__BuildArch%.%__BuildType%
echo.
set "__MScorlibBuildLog=%__LogsDir%\MScorlib_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
%_msbuildexe% "%__ProjectFilesDir%\build.proj" %__MSBCleanBuildArgs% /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%__MScorlibBuildLog%" /p:OS=%__BuildOS% %__AdditionalMSBuildArgs%
IF NOT ERRORLEVEL 1 (
  if defined __MscorlibOnly goto :eof
  goto CrossGenMscorlib
)

echo MScorlib build failed. Refer !__MScorlibBuildLog! for details.
goto :eof

:CrossGenMscorlib
echo Generating native image of mscorlib for %__BuildOS%.%__BuildArch%.%__BuildType%
echo.
set "__CrossGenMScorlibLog=%__LogsDir%\CrossgenMScorlib_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
%__BinDir%\crossgen.exe %__BinDir%\mscorlib.dll > "%__CrossGenMScorlibLog%" 2>&1
IF NOT ERRORLEVEL 1 (
  goto PerformTestBuild
)

echo CrossGen mscorlib failed. Refer !__CrossGenMScorlibLog! for details.
goto :eof

:PerformTestBuild
echo.
echo Commencing build of tests for %__BuildOS%.%__BuildArch%.%__BuildType%
echo.
call tests\buildtest.cmd
IF NOT ERRORLEVEL 1 goto SuccessfulBuild
echo Test binaries build failed. Refer !__MScorlibBuildLog! for details.
goto :eof

:SuccessfulBuild
::Build complete
echo Repo successfully built.
echo.
echo Product binaries are available at !__BinDir!
echo Test binaries are available at !__TestBinDir!
goto :eof

:Usage
echo.
echo Usage:
echo %0 BuildArch BuildType [clean] [vsversion] where:
echo.
echo BuildArch can be: x64
echo BuildType can be: Debug, Release
echo Clean - optional argument to force a clean build.
echo VSVersion - optional argument to use VS2013 or VS2015 (default VS2013)
echo linuxmscorlib - Build mscorlib for Linux
echo osxmscorlib - Build mscorlib for OS X
exit /b 1

Fix for build script on Win7 - label too long


REM ###########################################################################
REM #  Copyright (c) 2014-2015 libbitcoin-server developers (see COPYING).
REM #
REM #         GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
REM #
REM ###########################################################################
@echo off
SETLOCAL ENABLEEXTENSIONS
SET "parent=%~dp0"
SET "path_base=%~1"
SET "nuget_pkg_path=%~1\..\nuget"
SET "msbuild_args=/verbosity:minimal /p:Platform=%~2 /p:Configuration=%~3"
SET "proj_version=%~4"
SET "msbuild_exe=msbuild"
IF EXIST "%~5" SET "msbuild_exe=%~5"

call :pending "Build initialized..."
IF NOT EXIST "%nuget_pkg_path%" (
  call mkdir "%nuget_pkg_path%"
  IF %ERRORLEVEL% NEQ 0 (
    call :failure "mkdir %nuget_pkg_path% failed."
    exit /b 1
  )
)

call :init libbitcoin libbitcoin master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-consensus master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-consensus master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-database master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-database master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-blockchain master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-blockchain master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-network master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-network master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-node master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-node master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-protocol master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-protocol master failed."
  exit /b 1
)
call :bld_repo libbitcoin-server
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Building libbitcoin-server failed."
  exit /b 1
)

call :success "Build complete."
exit /b 0

:init
call :pending "Initializing repository %~1/%~2/%~3..."
IF NOT EXIST "%path_base%\%~2" (
  call git clone -q --branch=%~3 https://github.com/%~1/%~2 "%path_base%\%~2"
  IF %ERRORLEVEL% NEQ 0 (
    call :failure "git clone %~1/%~2 failed."
    exit /b 1
  )
) ELSE (
  call :success "%path_base%\%~2 exists, assuming valid clone."
)

call :bld_proj %~2
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Building project %~2 failed."
  exit /b 1
)
call :success "Initialization of %~1/%~2/%~3 complete."
exit /b 0

:bld_repo
call :pending "Building respository %~1..."
call :depends "%~1"
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing dependencies %~1 failed."
  exit /b 1
)
call cd /d "%path_base%\%~1\builds\msvc\%proj_version%"
call "%msbuild_exe%" %msbuild_args% %~1.sln
IF %ERRORLEVEL% NEQ 0 (
  call :failure "%msbuild_exe% %msbuild_args% %~1.sln failed."
  exit /b 1
)
call :success "Building repository %~1 execution complete."
call cd /d "%path_base%"
exit /b 0

:bld_proj
call :pending "Building respository project %~1..."
call :depends %~1
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing dependencies %~1 failed."
  exit /b 1
)
call cd /d "%path_base%\%~1\builds\msvc\%proj_version%"
call "%msbuild_exe%" %msbuild_args% /target:%~1:Rebuild %~1.sln
IF %ERRORLEVEL% NEQ 0 (
  call :failure "%msbuild_exe% %msbuild_args% /target:%~1:Rebuild %~1.sln"
  exit /b 1
)
call :success "Building repository project %~1 execution complete."
call cd /d "%path_base%"
exit /b 0

:depends
call :pending "nuget restoring dependencies for %~1..."
call nuget restore "%path_base%\%~1\builds\msvc\%proj_version%\%~1.sln" -Outputdir "%nuget_pkg_path%"
IF %ERRORLEVEL% NEQ 0 (
  call :failure "nuget restore failed."
  exit /b 1
)
call :success "nuget restoration for %~1 complete."
exit /b 0

:pending
echo %~1
exit /b 0

:success
echo %~1
exit /b 0

:failure
echo %~1
exit /b 0

REM ###########################################################################
REM #  Copyright (c) 2014-2015 libbitcoin-server developers (see COPYING).
REM #
REM #         GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
REM #
REM ###########################################################################
@echo off
SETLOCAL ENABLEEXTENSIONS
SET "parent=%~dp0"
SET "path_base=%~1"
SET "nuget_pkg_path=%~1\.nuget\packages"
SET "msbuild_args=/verbosity:minimal /p:Platform=%~2 /p:Configuration=%~3"
SET "proj_version=%~4"
SET "msbuild_exe=msbuild"
IF EXIST "%~5" SET "msbuild_exe=%~5"

call :pending "Build initialized..."
IF NOT EXIST "%nuget_pkg_path%" (
  call mkdir "%nuget_pkg_path%"
  IF %ERRORLEVEL% NEQ 0 (
    call :failure "mkdir %nuget_pkg_path% failed."
    exit /b 1
  )
)

call :init libbitcoin libbitcoin master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-consensus master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-consensus master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-database master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-database master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-blockchain master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-blockchain master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-network master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-network master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-node master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-node master failed."
  exit /b 1
)
call :init libbitcoin libbitcoin-protocol master
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing repository libbitcoin libbitcoin-protocol master failed."
  exit /b 1
)
call :bld_repo libbitcoin-server
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Building libbitcoin-server failed."
  exit /b 1
)

call :success "Build complete."
exit /b 0

:init
call :pending "Initializing repository %~1/%~2/%~3..."
IF NOT EXIST "%path_base%\%~2" (
  call git clone -q --branch=%~3 https://github.com/%~1/%~2 "%path_base%\%~2"
  IF %ERRORLEVEL% NEQ 0 (
    call :failure "git clone %~1/%~2 failed."
    exit /b 1
  )
) ELSE (
  call :success "%path_base%\%~2 exists, assuming valid clone."
)

call :bld_proj %~2
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Building project %~2 failed."
  exit /b 1
)
call :success "Initialization of %~1/%~2/%~3 complete."
exit /b 0

:bld_repo
call :pending "Building respository %~1..."
call :depends "%~1"
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing dependencies %~1 failed."
  exit /b 1
)
call cd /d "%path_base%\%~1\builds\msvc\%proj_version%"
call "%msbuild_exe%" %msbuild_args% %~1.sln
IF %ERRORLEVEL% NEQ 0 (
  call :failure "%msbuild_exe% %msbuild_args% %~1.sln failed."
  exit /b 1
)
call :success "Building repository %~1 execution complete."
call cd /d "%path_base%"
exit /b 0

:bld_proj
call :pending "Building respository project %~1..."
call :depends %~1
IF %ERRORLEVEL% NEQ 0 (
  call :failure "Initializing dependencies %~1 failed."
  exit /b 1
)
call cd /d "%path_base%\%~1\builds\msvc\%proj_version%"
call "%msbuild_exe%" %msbuild_args% /target:%~1:Rebuild %~1.sln
IF %ERRORLEVEL% NEQ 0 (
  call :failure "%msbuild_exe% %msbuild_args% /target:%~1:Rebuild %~1.sln"
  exit /b 1
)
call :success "Building repository project %~1 execution complete."
call cd /d "%path_base%"
exit /b 0

:depends
call :pending "nuget restoring dependencies for %~1..."
call nuget restore "%path_base%\%~1\builds\msvc\%proj_version%\%~1.sln" -Outputdir "%nuget_pkg_path%"
IF %ERRORLEVEL% NEQ 0 (
  call :failure "nuget restore failed."
  exit /b 1
)
call :success "nuget restoration for %~1 complete."
exit /b 0

:pending
echo %~1
exit /b 0

:success
echo %~1
exit /b 0

:failure
echo %~1
exit /b 0

Fix appveyor build nuget repository path.


@ECHO Off

SET Config=%1
IF "%1"=="" (
  SET Config="Release"
)

msbuild WebJobs.Script.proj /p:Configuration=%Config%

Update default build script

Update default build script


@echo off
cd %~dp0

set buildType=Release
set test=OFF
set doc=OFF

for %%A in (%*) do (
    if "%%A"=="/r" (
        if exist build (rmdir /S /Q build)
        if exist bin (rmdir /S /Q bin)
        if exist doc (rmdir /S /Q doc)
    )

    if "%%A"=="/D" ( :: debug build type
        set buildType=Debug
    )

    if "%%A"=="/test" ( :: build testing applications
        set test=ON
    )

    if "%%A"=="/doc" ( :: generate documentation
        set doc=ON
    )
)

if not exist build (mkdir build)
cd build

cls
    cmake ../ -DTEST_APP=%test% -DCMAKE_BUILD_TYPE=%buildType% -DDOC=%doc% && msbuild FakeInput.sln
        :: /p:Configuration=Release

cd ..

@echo on

@echo off
cd %~dp0

set buildType=Release
set test=OFF
set doc=OFF

for %%A in (%*) do (
    if "%%A"=="/r" (
        if exist build (rmdir /S /Q build)
        if exist bin (rmdir /S /Q bin)
        if exist doc (rmdir /S /Q doc)
    )

    if "%%A"=="/D" ( :: debug build type
        set buildType=Debug
    )

    if "%%A"=="/test" ( :: build testing applications
        set test=ON
    )

    if "%%A"=="/doc" ( :: generate documentation
        set doc=ON
    )
)

if not exist build (mkdir build)
cd build

cls
    cmake ../ -DTEST_APP=%test% -DCMAKE_BUILD_TYPE=%buildType% -DDOC=%doc% && msbuild FakeInput.sln /p:Configuration=Release

cd ..

@echo on

fix build.bat script

fix build.bat script