@echo off
set PACKAGE_DIR="%CD%"

REM clean if requested
if "%1" == "clean" (
      call clean-build.bat
      if exist CMakeCache.txt del CMakeCache.txt
)

REM check for required programs on PATH
for %%F in (ant cmake) do (
      where /q %%F
      if ERRORLEVEL 1 (
            echo '%%F' not found on PATH; exiting
            exit /b 1
      )
)

setlocal

REM Remove system Rtools from PATH
call set PATH=%PATH:C:\Rtools\bin=%
call set PATH=%PATH:C:\Rtools\gcc-4.6.3\bin=%

REM Remove Git from PATH (otherwise cmake complains about 'sh.exe')
call set PATH=%PATH:C:\Program Files (x86)\Git\bin=%
call set PATH=%PATH:C:\Program Files\Git\bin=%

REM Establish build dir
set BUILD_DIR=build
if "%CMAKE_BUILD_TYPE%" == "" set CMAKE_BUILD_TYPE=RelWithDebInfo
if "%CMAKE_BUILD_TYPE%" == "Debug" set BUILD_DIR=build-debug

REM perform 64-bit build
cd "%PACKAGE_DIR%"
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
cd "%BUILD_DIR%"
if exist "%BUILD_DIR%/_CPack_Packages" rmdir /s /q "%BUILD_DIR%\_CPack_Packages"

REM Configure and build the project. (Note that Windows / MSVC builds require
REM that we specify the build type both at configure time and at build time)
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -clean_env -no_logo || goto :error
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -arch=amd64 -startdir=none -host_arch=amd64 -winsdk=10.0.17134.0 -no_logo || goto :error
cmake -G "Ninja" ^
      -DRSTUDIO_TARGET=Desktop ^
      -DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
      -DRSTUDIO_PACKAGE_BUILD=1 ^
      -DCMAKE_C_COMPILER=cl ^
      -DCMAKE_CXX_COMPILER=cl ^
      ..\..\.. || goto :error
cmake --build . %MAKEFLAGS% --config %CMAKE_BUILD_TYPE% || goto :error
cd ..

REM perform 32-bit build and install it into the 64-bit tree
call make-install-win32.bat "%PACKAGE_DIR%\%BUILD_DIR%\src\cpp\session" %1 || goto :error

REM create packages
cd "%BUILD_DIR%"
if not "%1" == "quick" cpack -C "%CMAKE_BUILD_TYPE%" -G NSIS
if "%CMAKE_BUILD_TYPE%" == "RelWithDebInfo" cpack -C "%CMAKE_BUILD_TYPE%" -G ZIP
cd ..

REM reset modified environment variables (PATH)
endlocal
goto :EOF

:error
echo Failed to build RStudio! Error: %ERRORLEVEL%
exit /b %ERRORLEVEL%

@echo off
set PACKAGE_DIR="%CD%"

REM clean if requested
if "%1" == "clean" (
      call clean-build.bat
      if exist CMakeCache.txt del CMakeCache.txt
)

REM check for required programs on PATH
for %%F in (ant cmake) do (
      where /q %%F
      if ERRORLEVEL 1 (
            echo '%%F' not found on PATH; exiting
            exit /b 1
      )
)

setlocal

REM Remove system Rtools from PATH
call set PATH=%PATH:C:\Rtools\bin=%
call set PATH=%PATH:C:\Rtools\gcc-4.6.3\bin=%

REM Remove Git from PATH (otherwise cmake complains about 'sh.exe')
call set PATH=%PATH:C:\Program Files (x86)\Git\bin=%
call set PATH=%PATH:C:\Program Files\Git\bin=%

REM Establish build dir
set BUILD_DIR=build
if "%CMAKE_BUILD_TYPE%" == "" set CMAKE_BUILD_TYPE=RelWithDebInfo
if "%CMAKE_BUILD_TYPE%" == "Debug" set BUILD_DIR=build-debug

REM perform 64-bit build
cd "%PACKAGE_DIR%"
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
cd "%BUILD_DIR%"
if exist "%BUILD_DIR%/_CPack_Packages" rmdir /s /q "%BUILD_DIR%\_CPack_Packages"

REM Configure and build the project. (Note that Windows / MSVC builds require
REM that we specify the build type both at configure time and at build time)
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -clean_env -no_logo || goto :error
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -arch=amd64 -startdir=none -host_arch=amd64 -winsdk=10.0.17134.0 -no_logo || goto :error
cmake -G "Ninja" ^
      -DRSTUDIO_TARGET=Desktop ^
      -DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
      -DRSTUDIO_PACKAGE_BUILD=1 ^
      -DCMAKE_C_COMPILER=cl ^
      -DCMAKE_CXX_COMPILER=cl ^
      ..\..\.. || goto :error
cmake --build . --config %CMAKE_BUILD_TYPE% -- %MAKEFLAGS% || goto :error
cd ..

REM perform 32-bit build and install it into the 64-bit tree
call make-install-win32.bat "%PACKAGE_DIR%\%BUILD_DIR%\src\cpp\session" %1 || goto :error

REM create packages
cd "%BUILD_DIR%"
if not "%1" == "quick" cpack -C "%CMAKE_BUILD_TYPE%" -G NSIS
if "%CMAKE_BUILD_TYPE%" == "RelWithDebInfo" cpack -C "%CMAKE_BUILD_TYPE%" -G ZIP
cd ..

REM reset modified environment variables (PATH)
endlocal
goto :EOF

:error
echo Failed to build RStudio! Error: %ERRORLEVEL%
exit /b %ERRORLEVEL%

move makeflags after --

move makeflags after --

Co-authored-by: Kevin Ushey <ffb4761cba839470133bee36aeb139f58d7dbaa9@rstudio.com>


conda list -p "%PREFIX%" --canonical
if errorlevel 1 exit 1
for /f "delims=" %%i in ('conda list -p "%PREFIX%" --canonical') do set condalist=%%i
if errorlevel 1 exit 1
echo "%condalist%"
if not "%condalist%"=="conda-build-test-build-string-1.0-1" exit 1
cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-1.json"
if errorlevel 1 exit 1
cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-1.json" | grep '"build_number": 0'
if errorlevel 1 exit 1
cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-1.json" | grep '"build": "abc"'
if errorlevel 1 exit 1

conda list -p "%PREFIX%" --canonical
if errorlevel 1 exit 1
for /f "delims=" %%i in ('conda list -p "%PREFIX%" --canonical') do set condalist=%%i
if errorlevel 1 exit 1
echo "%condalist%"
if not "%condalist%"=="conda-build-test-build-string-1.0-abc" exit 1
cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-abc.json"
if errorlevel 1 exit 1
cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-abc.json" | grep '"build_number": 0'
if errorlevel 1 exit 1
cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-abc.json" | grep '"build": "abc"'
if errorlevel 1 exit 1

Use correct build string in metadata files


# Skip the tests because they require to have a tango database running
cmd.exe /c mvn install -DskipTests

# Generate third party license report
cmd.exe /c mvn license:aggregate-third-party-report
copy "target\site\aggregate-third-party-report.html" "%RECIPE_DIR%"

copy "bundle\target\cdk-%PKG_VERSION%.jar" "%LIBRARY_LIB%\"

Add bld.bat

Add bld.bat


@echo off
set QTDIR=C:\Qt\Qt5.9.5\5.9.5\mingw53_32
set MINGWDIR=C:\Qt\Qt5.9.5\Tools\mingw530_32
set PATH=%QTDIR%\bin;%MINGWDIR%\bin;%PATH%

add vars5.9.5 for windows

add vars5.9.5 for windows


Update the Windows installer to bundle Python 3.10.8.

This modernizes our Windows installer, shipping Python 3.10.8 instead of
3.8.14. This release is faster and a better environment to develop on.

Python 3.10 no longer supports Windows 7, so we're dropping that
support. We now require Windows 8 or higher.

Testing Done:
Successfully built the installer, and installed RBTools on a separate
Windows 10 machine. Verified I had a working RBTools 4 installation
available via the command line.

Reviewed at https://reviews.reviewboard.org/r/12691/


@echo off
cls
:start
echo Starting server...

"Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.78" -password "" -tcpLobby "149.202.51.185" 25565

echo.
echo Restarting server...
echo.
goto start

@echo off
cls
:start
echo Starting server...

"Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.79" -password "" -tcpLobby "149.202.51.185" 25565

echo.
echo Restarting server...
echo.
goto start

Patch for version 0.79 update

[Nomad] Patch for version 0.79 update


for %%F in ("." "bin") do (
    cmake -G "%CMAKE_GENERATOR%" ^
          -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
          -DCMAKE_INSTALL_DEBUG_LIBRARIES:BOOL="OFF" ^
          -DCMAKE_INSTALL_DEBUG_LIBRARIES_ONLY:BOOL="OFF" ^
          -DCMAKE_INSTALL_OPENMP_LIBRARIES:BOOL="ON" ^
          -DCMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION:STRING=%%F ^
          "%RECIPE_DIR%"
    if errorlevel 1 exit 1

    cmake --build "%SRC_DIR%" ^
          --target INSTALL ^
          --config Release
    if errorlevel 1 exit 1
)

if "%ARCH%" == "32" (set "ARCH_DIR=x86")
if "%ARCH%" == "64" (set "ARCH_DIR=amd64")

dir /a:d /o:-n /s /b C:\Windows\WinSxS\%ARCH_DIR%_microsoft.vc90.openmp* > vcomp90_locs.txt
type vcomp90_locs.txt

set /p VCOMP_DIR=<vcomp90_locs.txt
echo "%VCOMP_DIR%"

for %%F in ("." "bin") do (
    cmake -G "%CMAKE_GENERATOR%" ^
          -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
          -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS:PATH="%VCOMP_DIR%\vcomp90.dll" ^
          -DCMAKE_INSTALL_DEBUG_LIBRARIES:BOOL="OFF" ^
          -DCMAKE_INSTALL_DEBUG_LIBRARIES_ONLY:BOOL="OFF" ^
          -DCMAKE_INSTALL_OPENMP_LIBRARIES:BOOL="ON" ^
          -DCMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION:STRING=%%F ^
          "%RECIPE_DIR%"
    if errorlevel 1 exit 1

    cmake --build "%SRC_DIR%" ^
          --target INSTALL ^
          --config Release
    if errorlevel 1 exit 1
)

Add WinSxS path to vcomp90

Add WinSxS path to vcomp90


echo off
cls
Rem This batch file will run the Ring Notepad Application.
Rem Ring Notepad is just a sample about what we can do using Ring in little hours.
Rem Using Ring Notepad we can write and execute Ring programs quickly.
Rem Author : Mahmoud Fayed <msfclipper@yahoo.com>

cd applications
cd rnote
"../../bin/ring.exe" rnote.ring

Rem This batch file will run the Ring Notepad Application.
Rem Ring Notepad is just a sample about what we can do using Ring in little hours.
Rem Using Ring Notepad we can write and execute Ring programs quickly.
Rem Author : Mahmoud Fayed <msfclipper@yahoo.com>

echo off
cls

cd applications
cd rnote
"../../bin/ring.exe" rnote.ring

Update Start.bat

Update Start.bat


@ECHO OFF
IF NOT EXIST virtualenv GOTO DIRNOTEXISTS

:DIREXISTS
CALL virtualenv\scripts\activate

SET PYTHONPATH=%CD%\submodule\s3g;%CD%\src\main\python;%PYTHONPATH%

REM EXIT /B 0

easy_install -q submodule\conveyor_bins\python\pyserial-2.7_mb2.1-py2.7.egg
easy_install -q submodule\conveyor_bins\python\mock-1.0.1-py2.7.egg
easy_install -q submodule\conveyor_bins\python\lockfile-0.9.1-py2.7.egg
easy_install -q submodule\conveyor_bins\python\python_daemon-1.6-py2.7.egg
easy_install -q submodule\conveyor_bins\python\argparse-1.2.1-py2.7.egg
easy_install -q submodule\conveyor_bins\python\unittest2-0.5.1-py2.7.egg
easy_install -q submodule\conveyor_bins\python\pyserial-2.7_mb2.1-py2.7.egg

GOTO DONE

:DIRNOTEXISTS

IF "%1" == "" GOTO DEFAULTPY
set PYTHON=%1
GOTO VIRTUALENV

:DEFAULTPY
set PYTHON=python

:VIRTUALENV
%PYTHON% virtualenv.py --extra-search-dir=submodule/conveyor_bins/python --never-download virtualenv
GOTO DIREXISTS

:DONE

@ECHO OFF
IF NOT EXIST virtualenv GOTO DIRNOTEXISTS

:DIREXISTS
CALL virtualenv\scripts\activate

SET PYTHONPATH=%CD%\submodule\s3g;%CD%\src\main\python;%PYTHONPATH%

REM EXIT /B 0

easy_install -q submodule\conveyor_bins\pyserial-2.7_mb2.1-py2.7.egg
easy_install -q submodule\conveyor_bins\mock-1.0.1-py2.7.egg
easy_install -q submodule\conveyor_bins\lockfile-0.9.1-py2.7.egg
easy_install -q submodule\conveyor_bins\python_daemon-1.6-py2.7.egg
easy_install -q submodule\conveyor_bins\argparse-1.2.1-py2.7.egg
easy_install -q submodule\conveyor_bins\unittest2-0.5.1-py2.7.egg
easy_install -q submodule\conveyor_bins\pyserial-2.7_mb2.1-py2.7.egg

GOTO DONE

:DIRNOTEXISTS

IF "%1" == "" GOTO DEFAULTPY
set PYTHON=%1
GOTO VIRTUALENV

:DEFAULTPY
set PYTHON=python

:VIRTUALENV
%PYTHON% virtualenv.py --extra-search-dir=submodule/conveyor_bins/python --never-download virtualenv
GOTO DIREXISTS

:DONE

Fix setup.bat to look for eggs in a conveyor_bins not poluted with other platform files


ECHO OFF

SET "ARCH=x64"
SET "VC_ARCH=amd64"
SET "QT_KIT=C:\Qt\5.12.0\msvc2017_64"
SET "DIR=%~dp0"
SET "BUILD_TYPE=release"
SET "BUILD_DIR=%DIR%..\build-OAuthRedirectExample-Desktop_Qt_5_12_0_MSVC2017_64bit-Release\%BUILD_TYPE%"
SET "ARCGIS_SDK_DIR=C:\Program Files (x86)\ArcGIS SDKs\Qt100.7\sdk\windows\%ARCH%\bin\%BUILD_TYPE%"

call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" %VC_ARCH%
call %QT_KIT%\bin\windeployqt.exe %BUILD_DIR%\OAuthRedirectExample.exe --qmldir %DIR% -sensors -positioning

copy "%ARCGIS_SDK_DIR%\EsriCommonQt.dll" "%BUILD_DIR%\EsriCommonQt.dll"
copy "%ARCGIS_SDK_DIR%\runtimecore.dll" "%BUILD_DIR%\runtimecore.dll"

ECHO OFF

SET "ARCH=x64"
SET "VC_ARCH=amd64"
SET "QT_KIT=C:\Qt\5.12.6\msvc2017_64"
SET "DIR=%~dp0"
SET "BUILD_TYPE=release"
SET "BUILD_DIR=%DIR%..\build-OAuthRedirectExample-Desktop_Qt_5_12_6_MSVC2017_64bit-Release\%BUILD_TYPE%"
SET "ARCGIS_SDK_DIR=C:\Program Files (x86)\ArcGIS SDKs\Qt100.7\sdk\windows\%ARCH%\bin\%BUILD_TYPE%"

call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" %VC_ARCH%
call %QT_KIT%\bin\windeployqt.exe %BUILD_DIR%\OAuthRedirectExample.exe --qmldir %DIR% -sensors -positioning

copy "%ARCGIS_SDK_DIR%\EsriCommonQt.dll" "%BUILD_DIR%\EsriCommonQt.dll"
copy "%ARCGIS_SDK_DIR%\runtimecore.dll" "%BUILD_DIR%\runtimecore.dll"

Update the version to 5.12.6.

Update the version to 5.12.6.


@echo off

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

echo Xerces-Java Build System
echo ------------------------

if "%JAVA_HOME%" == "" goto error

rem Keep this classpath to the minimum required to run ant
rem Application dependent classpaths are specified in build.xml
set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip;.\tools\ant.jar;.\tools\ant-nodeps.jar;.\tools\xercesImpl.jar;.\tools\xml-apis.jar;.\tools\bin\xjavac.jar

echo Building with ant classpath %LOCALCLASSPATH%
echo Starting Ant...
"%JAVA_HOME%\bin\java.exe" -Dant.home="./tools" -classpath "%LOCALCLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5
goto end

:error
echo "ERROR: JAVA_HOME not found in your environment."
echo "Please, set the JAVA_HOME variable in your environment to match the"
echo "location of the Java Virtual Machine you want to use."

:end
set LOCALCLASSPATH=
@echo on

@echo off

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

echo Xerces-Java Build System
echo ------------------------

if "%JAVA_HOME%" == "" goto error

rem Keep this classpath to the minimum required to run ant
rem Application dependent classpaths are specified in build.xml
set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip;.\tools\ant.jar;.\tools\ant-nodeps.jar;.\tools\xercesImpl.jar;.\tools\xml-apis.jar;.\tools\bin\xjavac.jar

echo Building with ant classpath %LOCALCLASSPATH%
echo Starting Ant...
"%JAVA_HOME%\bin\java.exe" -Dant.home="./tools" -classpath "%LOCALCLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5
goto end

:error
echo "ERROR: JAVA_HOME not found in your environment."
echo "Please, set the JAVA_HOME variable in your environment to match the"
echo "location of the Java Virtual Machine you want to use."

:end
set LOCALCLASSPATH=
@echo on

Update to the latest ASF license header. See http://www.apache.org/legal/src-headers.html.

git-svn-id: 21df804813e9d3638e43477f308dd0be51e5f30f@447710 13f79535-47bb-0310-9956-ffa450edef68


@echo off

pushd %~dp0

SET PACKAGEPATH=.\packages\
SET NUGET=.\tools\nuget\NuGet.exe
SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion

IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.25.4 (
  RD /S/Q %PACKAGEPATH%FAKE
  %NUGET% install FAKE -Version 4.25.4 %NUGETOPTIONS%
  COPY NUL %PACKAGEPATH%FAKE\Ver_4.25.4
)

IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.1 (
  RD /S/Q %PACKAGEPATH%FAKE.BuildLib
  %NUGET% install FAKE.BuildLib -Version 0.3.1 %NUGETOPTIONS%
  COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.1
)

set encoding=utf-8
"%PACKAGEPATH%FAKE\tools\FAKE.exe" build.fsx %*

popd

@echo off

pushd %~dp0

SET PACKAGEPATH=.\packages\
SET NUGET=.\tools\nuget\NuGet.exe
SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion

IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.25.4 (
  RD /S/Q %PACKAGEPATH%FAKE
  %NUGET% install FAKE -Version 4.25.4 %NUGETOPTIONS%
  COPY NUL %PACKAGEPATH%FAKE\Ver_4.25.4
)

IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.2 (
  RD /S/Q %PACKAGEPATH%FAKE.BuildLib
  %NUGET% install FAKE.BuildLib -Version 0.3.2 %NUGETOPTIONS%
  COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.2
)

set encoding=utf-8
"%PACKAGEPATH%FAKE\tools\FAKE.exe" build.fsx %*

popd

Update BuildLib 0.3.2

Update BuildLib 0.3.2


@ECHO off
SETLOCAL

SET REPO_FOLDER=%~dp0
CD %REPO_FOLDER%

SET BUILD_FOLDER=.build
SET KOREBUILD_FOLDER=%BUILD_FOLDER%\KoreBuild-dotnet
SET KOREBUILD_VERSION=

SET NUGET_PATH=%BUILD_FOLDER%\NuGet.exe
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe

IF NOT EXIST %BUILD_FOLDER% (
    md %BUILD_FOLDER%
)

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

    copy %CACHED_NUGET% %NUGET_PATH% > nul
)

IF NOT EXIST %KOREBUILD_FOLDER% (
    SET KOREBUILD_DOWNLOAD_ARGS=
    IF NOT "%KOREBUILD_VERSION%"=="" (
        SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION%
    )

    %BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS%
)

"%KOREBUILD_FOLDER%\build\KoreBuild.cmd" %*

@ECHO off
SETLOCAL

SET REPO_FOLDER=%~dp0
CD "%REPO_FOLDER%"

SET BUILD_FOLDER=.build
SET KOREBUILD_FOLDER=%BUILD_FOLDER%\KoreBuild-dotnet
SET KOREBUILD_VERSION=

SET NUGET_PATH=%BUILD_FOLDER%\NuGet.exe
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe

IF NOT EXIST %BUILD_FOLDER% (
    md %BUILD_FOLDER%
)

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

    copy %CACHED_NUGET% %NUGET_PATH% > nul
)

SET KOREBUILD_DOWNLOAD_ARGS=
IF NOT "%KOREBUILD_VERSION%"=="" (
    SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION%
)
IF NOT EXIST %KOREBUILD_FOLDER% (
    %BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS%
)

"%KOREBUILD_FOLDER%\build\KoreBuild.cmd" %*

Update `build.cmd` to match latest template - aspnet/Universe#347 - `%KOREBUILD_VERSION%` doesn't work without this fix


@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 build -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 build -I packages\KoreBuild\build -f makefile.shade %*

Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL


@echo off
rem Try to find the highest version of MSBuild available...
set MSBUILD=%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe
set MSBUILD_SCRIPT="%~dp0src\NLog.proj"
set POST_BUILD_COMMAND=
if not exist %MSBUILD% set MSBUILD=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
if not exist %MSBUILD% set MSBUILD=%WINDIR%\Microsoft.NET\Framework\v3.5\msbuild.exe
if not exist %MSBUILD% (
	echo MSBuild not found, please update %0
	exit /b 1
)

set MSBUILD_ARGUMENTS=
:next
if (%1)==() goto build
if (%1)==(usemsbuild35) (
	set MSBUILD=%WINDIR%\Microsoft.NET\Framework\v3.5\msbuild.exe
	shift
	goto next
)

if (%1)==(netfx20) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildNetFX20=true
	shift
	goto next
)

if (%1)==(netfx35) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildNetFX35=true
	shift
	goto next
)

if (%1)==(netfx40) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildNetFX40=true
	shift
	goto next
)

if (%1)==(netfx45) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildNetFX45=true
	shift
	goto next
)

if (%1)==(mono2) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildMono2=true
	shift
	goto next
)

if (%1)==(sl4) (
	set MSBUILD=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildSL4=true
	shift
	goto next
)

if (%1)==(sl5) (
	set MSBUILD=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildSL5=true
	shift
	goto next
)

if (%1)==(wp7) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildWP7=true
	shift
	goto next
)

if (%1)==(wp71) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildWP71=true
	shift
	goto next
)

if (%1)==(debug) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:Configuration=Debug
	shift
	goto next
)

if (%1)==(release) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:Configuration=Release
	shift
	goto next
)

if (%1)==(doc) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Documentation
	shift
	goto next
)

if (%1)==(dumpapi) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:DumpApi
	shift
	goto next
)

if (%1)==(builddocpages) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:BuildDocPages
	shift
	goto next
)

if (%1)==(clean) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Clean
	shift
	goto next
)

if (%1)==(deepclean) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:DeepClean
	shift
	goto next
)

if (%1)==(build) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Build
	shift
	goto next
)

if (%1)==(buildtests) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:BuildTests
	shift
	goto next
)

if (%1)==(runtests) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:RunTests
	set POST_BUILD_COMMAND="%~dp0build\bin\LastTestRunSummary.cmd"
	shift
	goto next
)

if (%1)==(rebuild) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Rebuild
	shift
	goto next
)

if (%1)==(tools) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Tools
	shift
	goto next
)

if (%1)==(syncprojectitems) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:SyncProjectItems
	shift
	goto next
)

if (%1)==(web) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Web
	shift
	goto next
)

if (%1)==(checkinsuite) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:CheckinSuite
	set POST_BUILD_COMMAND="%~dp0src\LastTestRunSummary.cmd"
	shift
	goto next
)

if (%1)==(xsd) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:XSD
	shift
	goto next
)

if (%1)==(archive) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Archive
	shift
	goto next
)

if (%1)==(sourcearchive) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:SourceArchive
	shift
	goto next
)

if (%1)==(label) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildLabelOverride=%2
	shift
	shift
	goto next
)

if (%1)==(ccnetlabel) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:CCNetLabel=%2
	shift
	shift
	goto next
)

if (%1)==(buildpath) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BaseOutputDirectory=%2
	shift
	shift
	goto next
)

if (%1)==(websitedir) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:WebsiteDir=%2
	shift
	shift
	goto next
)

if (%1)==(all) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:All
	set POST_BUILD_COMMAND="%~dp0src\LastTestRunSummary.cmd"
	shift
	goto next
)

if (%1)==(nightlybuild) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:NightlyBuild
	shift
	goto next
)

if (%1)==(installer) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Installer
	shift
	goto next
)

if (%1)==(nuget) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:NuGetPackage
	shift
	goto next
)

echo Usage: %0 [configuration] [platform]... [target]...
echo.
echo Where platform is one or more of the following:
echo.
echo  netfx20            .NET Framework 2.0
echo  netfx35            .NET Framework 3.5
echo  netfx40            .NET Framework 4.0
echo  netcf20            .NET Compact Framework 2.0
echo  netcf35            .NET Compact Framework 3.5
echo  sl2                Silverlight 2.0
echo  sl3                Silverlight 3.0
echo  sl4                Silverlight 4.0
echo  wp7                Silverlight for Windows Phone 7
echo  wp71               Silverlight for Windows Phone 7.1
echo  mono2              Mono 2.x
echo.
echo Configurations are:
echo.
echo  debug
echo  release
echo.
echo Targets can be:
echo.
echo  clean              Removes output files
echo  deepclean          Removes temporary and intermediate files
echo  archive            Produce ZIP files for each framework
echo  sourcearchive      Produce ZIP file of the source code
echo  build              Compiles assemblies
echo  buildtests         Compiles tests
echo  runtests           Runs unit tests
echo  checkinsuite       Cleans, builds and runs all tests
echo  doc                Builds documentation
echo  all                Full build
echo  nightlybuild       Nightly build
echo  web                Website files
echo  xsd                NLog.xsd Intellisense files
echo  installer          Installer
echo  nuget              NuGet package
echo  tools              Tools
echo  label {suffix}     Define build label (defaults to 'PrivateBuild')
echo  ccnetlabel {label} Override CCNetLabel
echo  buildpath {dir}    Set build directory.
exit /b 1

:build
echo MSBUILD: %MSBUILD%
echo MSBUILD_SCRIPT: %MSBUILD_SCRIPT%
echo MSBUILD_ARGUMENTS: %MSBUILD_ARGUMENTS%
%MSBUILD% /nologo /fl %MSBUILD_SCRIPT% %MSBUILD_ARGUMENTS%
%POST_BUILD_COMMAND%
exit /b 0

@echo off
rem Try to find the highest version of MSBuild available...
set MSBUILD=%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe
set MSBUILD_SCRIPT="%~dp0src\NLog.proj"
set POST_BUILD_COMMAND=
if not exist %MSBUILD% set MSBUILD=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
if not exist %MSBUILD% set MSBUILD=%WINDIR%\Microsoft.NET\Framework\v3.5\msbuild.exe
if not exist %MSBUILD% (
	echo MSBuild not found, please update %0
	exit /b 1
)

set MSBUILD_ARGUMENTS=
:next
if (%1)==() goto build
if (%1)==(usemsbuild35) (
	set MSBUILD=%WINDIR%\Microsoft.NET\Framework\v3.5\msbuild.exe
	shift
	goto next
)

if (%1)==(netfx20) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildNetFX20=true
	shift
	goto next
)

if (%1)==(netfx35) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildNetFX35=true
	shift
	goto next
)

if (%1)==(netfx40) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildNetFX40=true
	shift
	goto next
)

if (%1)==(netfx45) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildNetFX45=true
	shift
	goto next
)

if (%1)==(mono2) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildMono2=true
	shift
	goto next
)

if (%1)==(sl4) (
	set MSBUILD=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildSL4=true
	shift
	goto next
)

if (%1)==(sl5) (
	set MSBUILD=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildSL5=true
	shift
	goto next
)

if (%1)==(wp7) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildWP7=true
	shift
	goto next
)

if (%1)==(wp71) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildWP71=true
	shift
	goto next
)

if (%1)==(debug) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:Configuration=Debug
	shift
	goto next
)

if (%1)==(release) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:Configuration=Release
	shift
	goto next
)

if (%1)==(doc) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Documentation
	shift
	goto next
)

if (%1)==(dumpapi) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:DumpApi
	shift
	goto next
)

if (%1)==(builddocpages) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:BuildDocPages
	shift
	goto next
)

if (%1)==(clean) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Clean
	shift
	goto next
)

if (%1)==(deepclean) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:DeepClean
	shift
	goto next
)

if (%1)==(build) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Build
	shift
	goto next
)

if (%1)==(buildtests) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:BuildTests
	shift
	goto next
)

if (%1)==(runtests) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:RunTests
	set POST_BUILD_COMMAND="%~dp0build\bin\LastTestRunSummary.cmd"
	shift
	goto next
)

if (%1)==(rebuild) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Rebuild
	shift
	goto next
)

if (%1)==(tools) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Tools
	shift
	goto next
)

if (%1)==(syncprojectitems) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:SyncProjectItems
	shift
	goto next
)

if (%1)==(web) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Web
	shift
	goto next
)

if (%1)==(checkinsuite) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:CheckinSuite
	set POST_BUILD_COMMAND="%~dp0src\LastTestRunSummary.cmd"
	shift
	goto next
)

if (%1)==(xsd) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:XSD
	shift
	goto next
)

if (%1)==(archive) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Archive
	shift
	goto next
)

if (%1)==(sourcearchive) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:SourceArchive
	shift
	goto next
)

if (%1)==(label) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BuildLabelOverride=%2
	shift
	shift
	goto next
)

if (%1)==(ccnetlabel) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:CCNetLabel=%2
	shift
	shift
	goto next
)

if (%1)==(buildpath) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:BaseOutputDirectory=%2
	shift
	shift
	goto next
)

if (%1)==(websitedir) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /p:WebsiteDir=%2
	shift
	shift
	goto next
)

if (%1)==(all) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:All
	set POST_BUILD_COMMAND="%~dp0src\LastTestRunSummary.cmd"
	shift
	goto next
)

if (%1)==(nightlybuild) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:NightlyBuild
	shift
	goto next
)

if (%1)==(installer) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Installer
	shift
	goto next
)

if (%1)==(nuget) (
	set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:NuGetPackage
	shift
	goto next
)

echo Usage: %0 [configuration] [platform]... [target]...
echo.
echo Where platform is one or more of the following:
echo.
echo  netfx20            .NET Framework 2.0
echo  netfx35            .NET Framework 3.5
echo  netfx40            .NET Framework 4.0
echo  netfx45            .NET Framework 4.5
echo  sl4                Silverlight 4.0
echo  wp7                Silverlight for Windows Phone 7
echo  wp71               Silverlight for Windows Phone 7.1
echo  mono2              Mono 2.x
echo.
echo Configurations are:
echo.
echo  debug
echo  release
echo.
echo Targets can be:
echo.
echo  clean              Removes output files
echo  deepclean          Removes temporary and intermediate files
echo  archive            Produce ZIP files for each framework
echo  sourcearchive      Produce ZIP file of the source code
echo  build              Compiles assemblies
echo  buildtests         Compiles tests
echo  runtests           Runs unit tests
echo  checkinsuite       Cleans, builds and runs all tests
echo  doc                Builds documentation
echo  all                Full build
echo  nightlybuild       Nightly build
echo  web                Website files
echo  xsd                NLog.xsd Intellisense files
echo  installer          Installer
echo  nuget              NuGet package
echo  tools              Tools
echo  label {suffix}     Define build label (defaults to 'PrivateBuild')
echo  ccnetlabel {label} Override CCNetLabel
echo  buildpath {dir}    Set build directory.
exit /b 1

:build
echo MSBUILD: %MSBUILD%
echo MSBUILD_SCRIPT: %MSBUILD_SCRIPT%
echo MSBUILD_ARGUMENTS: %MSBUILD_ARGUMENTS%
%MSBUILD% /nologo /fl %MSBUILD_SCRIPT% %MSBUILD_ARGUMENTS%
%POST_BUILD_COMMAND%
exit /b 0

Update build script help text

Update build script help text


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


@echo off
setlocal EnableDelayedExpansion

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

:: Default to highest Visual Studio version available
set __VSVersion=vs2015

:: Default to highest Visual Studio version available
if defined VS120COMNTOOLS set __VSVersion=vs2013
if defined VS140COMNTOOLS set __VSVersion=vs2015

:: 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 "__SourceDir=%__ProjectDir%\src"
set "__PackagesDir=%__ProjectDir%\packages"
set "__RootBinDir=%__ProjectDir%\bin"
set "__LogsDir=%__RootBinDir%\Logs"
set __MSBCleanBuildArgs=
set __SkipTestBuild=

: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" == "x86"    (set __BuildArch=x86&&shift&goto Arg_Loop)
if /i "%1" == "arm"    (set __BuildArch=arm&&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" == "skiptestbuild" (set __SkipTestBuild=1&shift&goto Arg_Loop)

echo Invalid command line argument: %1
goto Usage

:ArgsDone

echo Commencing CoreRT Repo build
echo.

:: Set the remaining variables based upon the determined build configuration
set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%"
set "__IntermediatesDir=%__RootBinDir%\obj\Native\%__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 /p:CleanedTheBuild=1

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

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

: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%\Native\probe-win.ps1"""') do %%a

:CheckVS

set __VSProductVersion=
if /i "%__VSVersion%" == "vs2013" set __VSProductVersion=120
if /i "%__VSVersion%" == "vs2015" set __VSProductVersion=140

:: Check presence of VS
if defined VS%__VSProductVersion%COMNTOOLS goto CheckVSExistence
echo Visual Studio 2013+ (Community is free) is a pre-requisite to build this repository.
echo See: https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md#prerequisites
exit /b 1

:CheckVSExistence
:: Does VS 2013 or VS 2015 really exist?
if exist "!VS%__VSProductVersion%COMNTOOLS!\..\IDE\devenv.exe" goto CheckMSBuild
echo Visual Studio 2013+ (Community is free) is a pre-requisite to build this repository.
echo See: https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md#prerequisites
exit /b 1

: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"
: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/blob/master/Documentation/project-docs/developer-guide.md for build instructions. && exit /b 1

:: All set to commence the build

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

:: Set the environment for the native build
set __VCBuildArch=x86_amd64
if /i "%__BuildArch%" == "x86" (set __VCBuildArch=x86)
call "!VS%__VSProductVersion%COMNTOOLS!\..\..\VC\vcvarsall.bat" %__VCBuildArch%

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 is free).
echo See: https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md#prerequisites
exit /b 1

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

:BuildComponents
if exist "%__IntermediatesDir%\install.vcxproj" goto BuildCoreRT
echo Failed to generate native component build project!
exit /b 1

REM Build CoreRT
:BuildCoreRT
set "__CoreRTBuildLog=%__LogsDir%\CoreRT_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
%_msbuildexe% "%__IntermediatesDir%\install.vcxproj" %__MSBCleanBuildArgs% /nologo /maxcpucount /nodeReuse:false /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% /fileloggerparameters:Verbosity=normal;LogFile="%__CoreRTBuildLog%"
IF NOT ERRORLEVEL 1 goto ManagedBuild
echo Native component build failed. Refer !__CoreRTBuildLog! for details.
exit /b 1

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

REM setlocal to prepare for vsdevcmd.bat
setlocal

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

:: Set the environment for the managed build
call "!VS%__VSProductVersion%COMNTOOLS!\VsDevCmd.bat"
echo Commencing build of managed components for %__BuildOS%.%__BuildArch%.%__BuildType%
echo.
set "__ILCompilerBuildLog=%__LogsDir%\ILCompiler_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
%_msbuildexe% "%__ProjectDir%\build.proj" %__MSBCleanBuildArgs% /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=normal;LogFile="%__ILCompilerBuildLog%"
IF NOT ERRORLEVEL 1 (
  findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%__ILCompilerBuildLog%"
  goto AfterILCompilerBuild
)
echo ILCompiler build failed. Refer !__ILCompilerBuildLog! for details.
exit /b 1

:AfterILCompilerBuild

pushd "%__ProjectDir%\tests"
call "runtest.cmd" %__BuildType% %__BuildArch%
set TEST_EXIT_CODE=%ERRORLEVEL%
popd
exit /b %TEST_EXIT_CODE%

@echo off
setlocal EnableDelayedExpansion

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

:: Default to highest Visual Studio version available
set __VSVersion=vs2015

:: 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 "__SourceDir=%__ProjectDir%\src"
set "__PackagesDir=%__ProjectDir%\packages"
set "__RootBinDir=%__ProjectDir%\bin"
set "__LogsDir=%__RootBinDir%\Logs"
set __MSBCleanBuildArgs=
set __SkipTestBuild=

: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" == "x86"    (set __BuildArch=x86&&shift&goto Arg_Loop)
if /i "%1" == "arm"    (set __BuildArch=arm&&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" == "skiptestbuild" (set __SkipTestBuild=1&shift&goto Arg_Loop)

echo Invalid command line argument: %1
goto Usage

:ArgsDone

echo Commencing CoreRT Repo build
echo.

:: Set the remaining variables based upon the determined build configuration
set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%"
set "__IntermediatesDir=%__RootBinDir%\obj\Native\%__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 /p:CleanedTheBuild=1

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

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

: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%\Native\probe-win.ps1"""') do %%a

:CheckVS

set __VSProductVersion=
if /i "%__VSVersion%" == "vs2015" set __VSProductVersion=140

:: Check presence of VS
if defined VS%__VSProductVersion%COMNTOOLS goto CheckVSExistence
echo Visual Studio 2015 (Community is free) is a pre-requisite to build this repository.
echo See: https://github.com/dotnet/corert/blob/master/Documentation/prerequisites-for-building.md
exit /b 1

:CheckVSExistence
:: Does VS VS 2015 really exist?
if exist "!VS%__VSProductVersion%COMNTOOLS!\..\IDE\devenv.exe" goto CheckMSBuild
echo Visual Studio 2015 (Community is free) is a pre-requisite to build this repository.
echo See: https://github.com/dotnet/corert/blob/master/Documentation/prerequisites-for-building.md
exit /b 1

: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.
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
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/corert/blob/master/Documentation/prerequisites-for-building.md for build instructions. && exit /b 1

:: All set to commence the build

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

:: Set the environment for the native build
set __VCBuildArch=x86_amd64
if /i "%__BuildArch%" == "x86" (set __VCBuildArch=x86)
call "!VS%__VSProductVersion%COMNTOOLS!\..\..\VC\vcvarsall.bat" %__VCBuildArch%

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 is free).
echo See: https://github.com/dotnet/corert/blob/master/Documentation/prerequisites-for-building.md
exit /b 1

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

:BuildComponents
if exist "%__IntermediatesDir%\install.vcxproj" goto BuildCoreRT
echo Failed to generate native component build project!
exit /b 1

REM Build CoreRT
:BuildCoreRT
set "__CoreRTBuildLog=%__LogsDir%\CoreRT_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
%_msbuildexe% "%__IntermediatesDir%\install.vcxproj" %__MSBCleanBuildArgs% /nologo /maxcpucount /nodeReuse:false /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% /fileloggerparameters:Verbosity=normal;LogFile="%__CoreRTBuildLog%"
IF NOT ERRORLEVEL 1 goto ManagedBuild
echo Native component build failed. Refer !__CoreRTBuildLog! for details.
exit /b 1

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

REM setlocal to prepare for vsdevcmd.bat
setlocal

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

:: Set the environment for the managed build
call "!VS%__VSProductVersion%COMNTOOLS!\VsDevCmd.bat"
echo Commencing build of managed components for %__BuildOS%.%__BuildArch%.%__BuildType%
echo.
set "__ILCompilerBuildLog=%__LogsDir%\ILCompiler_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
%_msbuildexe% "%__ProjectDir%\build.proj" %__MSBCleanBuildArgs% /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=normal;LogFile="%__ILCompilerBuildLog%"
IF NOT ERRORLEVEL 1 (
  findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%__ILCompilerBuildLog%"
  goto AfterILCompilerBuild
)
echo ILCompiler build failed. Refer !__ILCompilerBuildLog! for details.
exit /b 1

:AfterILCompilerBuild

pushd "%__ProjectDir%\tests"
call "runtest.cmd" %__BuildType% %__BuildArch%
set TEST_EXIT_CODE=%ERRORLEVEL%
popd
exit /b %TEST_EXIT_CODE%

Update links to developer guide in the batch script

We now have a developer guide - stop referring to the CoreCLR one.

I also took this opportunity to delete the VS2013 support. I don't think
anyone ever used that - we just inherited it when I forked this script
from CoreCLR, but nobody tests this configuration.


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

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

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

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

Update 'build.cmd' to pull Sake from v2 NuGet feed.


cls

dotnet --version

dotnet restore src/AspNetCore.Lambda
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet build src/AspNetCore.Lambda
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet restore tests/AspNetCore.Lambda.Tests
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet build tests/AspNetCore.Lambda.Tests
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet test tests/AspNetCore.Lambda.Tests/AspNetCore.Lambda.Tests.fsproj
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet restore samples/AspNetCore.Lambda.SampleApp
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet build samples/AspNetCore.Lambda.SampleApp -c Release
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet pack src/AspNetCore.Lambda -c Release
if %errorlevel% neq 0 exit /b %errorlevel%

cls

dotnet --version

dotnet restore src/AspNetCore.Lambda
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet build src/AspNetCore.Lambda
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet restore tests/AspNetCore.Lambda.Tests
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet build tests/AspNetCore.Lambda.Tests
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet test tests/AspNetCore.Lambda.Tests/AspNetCore.Lambda.Tests.fsproj
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet restore samples/SampleApp/SampleApp
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet build samples/SampleApp/SampleApp -c Release
if %errorlevel% neq 0 exit /b %errorlevel%

dotnet pack src/AspNetCore.Lambda -c Release
if %errorlevel% neq 0 exit /b %errorlevel%

Fix build.cmd for samples

Fix build.cmd for samples


@ECHO OFF
@SETLOCAL

@ECHO.
@ECHO  **** STARTING BUILD  ****

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

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

SET PRERELEASE_PACKAGE_VERSION=%PACKAGE_VERSION%-prerelease

@SET NUGET_PACKAGE_ID=Serilog.Sinks.Kafka
@SET SOLUTION=%THIS_SCRIPT_FOLDER%src\Serilog.Sinks.Kafka.sln
@SET PROJECT_FOLDER=src\%NUGET_PACKAGE_ID%
@SET MSBUILDARGS=/target:Rebuild /fileLogger /verbosity:minimal /ToolsVersion:14.0
@SET NUGET_PACKAGE_FOLDER=%ARTIFACTS%\%NUGET_PACKAGE_ID%
@SET DOTNET_FRAMEWORK=net45
@SET NUGET_FRAMEWORK_FOLDER=%NUGET_PACKAGE_FOLDER%\lib\%DOTNET_FRAMEWORK%

RMDIR /Q /S "%ARTIFACTS%" >nul 2>&1
MKDIR "%ARTIFACTS%"

@ECHO.
@ECHO  **** RESTORE NUGET PACKAGES  ****
"%NUGET_COMMAND%" restore "%SOLUTION%"  -Verbosity quiet ||  GOTO BuildFailed

@ECHO.
@ECHO  **** BUIILD DEBUG  ****
MSBuild "%SOLUTION%" %MSBUILDARGS% ||  GOTO BuildFailed
COPY msbuild.log "%ARTIFACTS%\msbuild.DEBUG.log" ||  GOTO BuildFailed

IF "%APPVEYOR_BUILD_VERSION%"=="" (
	@ECHO.
	@ECHO  **** UNIT TEST ****
	mstest /nologo /category:unit ^
	/testcontainer:src\Serilog.Sinks.Kafka.Test\bin\Debug\Serilog.Sinks.Kafka.Test.dll
)

@ECHO.
@ECHO  **** BUIILD RELEASE  ****
MSBuild "%SOLUTION%" %MSBUILDARGS% /property:Configuration=Release ||  GOTO BuildFailed
COPY msbuild.log "%ARTIFACTS%\msbuild.RELEASE.log" ||  GOTO BuildFailed

@ECHO.
@ECHO  **** STAGE NUGET PACKAGE FOLDER ****
MKDIR "%NUGET_FRAMEWORK_FOLDER%" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\%NUGET_PACKAGE_ID%.??l" "%NUGET_FRAMEWORK_FOLDER%\" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\%NUGET_PACKAGE_ID%.pdb" "%NUGET_FRAMEWORK_FOLDER%\" ||  GOTO BuildFailed
MKDIR "%NUGET_FRAMEWORK_FOLDER%\CodeContracts\" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\CodeContracts\*.*" "%NUGET_FRAMEWORK_FOLDER%\CodeContracts\" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\%NUGET_PACKAGE_ID%.nuspec" "%NUGET_PACKAGE_FOLDER%\" ||  GOTO BuildFailed

@ECHO.
@ECHO  **** CREATE PRE-RELEASE NUGET PACKAGE ****
%NUGET_COMMAND% pack "%NUGET_PACKAGE_FOLDER%\%NUGET_PACKAGE_ID%.nuspec" -Version %PRERELEASE_PACKAGE_VERSION% ^
     -NonInteractive -OutputDirectory %ARTIFACTS% -Properties version=%PACKAGE_VERSION%||  GOTO BuildFailed

@ECHO.
@ECHO  **** CREATE RELEASE NUGET PACKAGE ****
%NUGET_COMMAND% pack "%NUGET_PACKAGE_FOLDER%\%NUGET_PACKAGE_ID%.nuspec" -Version %PACKAGE_VERSION% ^
     -NonInteractive -OutputDirectory %ARTIFACTS% -Properties version=%PACKAGE_VERSION%||  GOTO BuildFailed

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

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

@ECHO OFF
@SETLOCAL

@ECHO.
@ECHO  **** STARTING BUILD  ****

CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"

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

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

SET PRERELEASE_PACKAGE_VERSION=%PACKAGE_VERSION%-prerelease

@SET NUGET_PACKAGE_ID=Serilog.Sinks.Kafka
@SET SOLUTION=%THIS_SCRIPT_FOLDER%src\Serilog.Sinks.Kafka.sln
@SET PROJECT_FOLDER=src\%NUGET_PACKAGE_ID%
@SET MSBUILDARGS=/target:Rebuild /fileLogger /verbosity:minimal /ToolsVersion:14.0
@SET NUGET_PACKAGE_FOLDER=%ARTIFACTS%\%NUGET_PACKAGE_ID%
@SET DOTNET_FRAMEWORK=net45
@SET NUGET_FRAMEWORK_FOLDER=%NUGET_PACKAGE_FOLDER%\lib\%DOTNET_FRAMEWORK%

RMDIR /Q /S "%ARTIFACTS%" >nul 2>&1
MKDIR "%ARTIFACTS%"

@ECHO.
@ECHO  **** RESTORE NUGET PACKAGES  ****
"%NUGET_COMMAND%" restore "%SOLUTION%"  -Verbosity quiet ||  GOTO BuildFailed

@ECHO.
@ECHO  **** BUIILD DEBUG  ****
MSBuild "%SOLUTION%" %MSBUILDARGS% ||  GOTO BuildFailed
COPY msbuild.log "%ARTIFACTS%\msbuild.DEBUG.log" ||  GOTO BuildFailed

IF "%APPVEYOR_BUILD_VERSION%"=="" (
	@ECHO.
	@ECHO  **** UNIT TEST ****
	mstest /nologo /category:unit ^
	/testcontainer:src\Serilog.Sinks.Kafka.Test\bin\Debug\Serilog.Sinks.Kafka.Test.dll
)

@ECHO.
@ECHO  **** BUIILD RELEASE  ****
MSBuild "%SOLUTION%" %MSBUILDARGS% /property:Configuration=Release ||  GOTO BuildFailed
COPY msbuild.log "%ARTIFACTS%\msbuild.RELEASE.log" ||  GOTO BuildFailed

@ECHO.
@ECHO  **** STAGE NUGET PACKAGE FOLDER ****
MKDIR "%NUGET_FRAMEWORK_FOLDER%" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\%NUGET_PACKAGE_ID%.??l" "%NUGET_FRAMEWORK_FOLDER%\" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\%NUGET_PACKAGE_ID%.pdb" "%NUGET_FRAMEWORK_FOLDER%\" ||  GOTO BuildFailed
MKDIR "%NUGET_FRAMEWORK_FOLDER%\CodeContracts\" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\CodeContracts\*.*" "%NUGET_FRAMEWORK_FOLDER%\CodeContracts\" ||  GOTO BuildFailed
COPY "%PROJECT_FOLDER%\bin\Release\%NUGET_PACKAGE_ID%.nuspec" "%NUGET_PACKAGE_FOLDER%\" ||  GOTO BuildFailed

@ECHO.
@ECHO  **** CREATE PRE-RELEASE NUGET PACKAGE ****
%NUGET_COMMAND% pack "%NUGET_PACKAGE_FOLDER%\%NUGET_PACKAGE_ID%.nuspec" -Version %PRERELEASE_PACKAGE_VERSION% ^
     -NonInteractive -OutputDirectory %ARTIFACTS% -Properties version=%PACKAGE_VERSION%||  GOTO BuildFailed

@ECHO.
@ECHO  **** CREATE RELEASE NUGET PACKAGE ****
%NUGET_COMMAND% pack "%NUGET_PACKAGE_FOLDER%\%NUGET_PACKAGE_ID%.nuspec" -Version %PACKAGE_VERSION% ^
     -NonInteractive -OutputDirectory %ARTIFACTS% -Properties version=%PACKAGE_VERSION%||  GOTO BuildFailed

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

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

Fix build from non-Visual Studio command prompt


@echo off
cd %~dp0

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

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

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

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

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

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

@echo off
cd %~dp0

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

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

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

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

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

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

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


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

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

delete auto-generated components file

delete auto-generated components file


@echo off

IF [%1]==[] GOTO MissingApiKey

reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath > nul 2>&1
if ERRORLEVEL 1 goto MissingMSBuildRegistry

for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B

IF NOT EXIST %MSBUILDDIR%nul goto MissingMSBuildToolsPath
IF NOT EXIST %MSBUILDDIR%msbuild.exe goto MissingMSBuildExe

::BUILD
"tools\nuget.exe" restore EntityContextLibrary.sln
"%MSBUILDDIR%msbuild.exe" "EntityContextLibrary\EntityContextLibrary.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\Aliencube.EntityContextLibrary.xml

mkdir build
del "build\*.nupkg"

::SET API KEY
"tools\nuget.exe" setApiKey %1

::PACK
"tools\nuget.exe" pack "EntityContextLibrary\EntityContextLibrary.nuspec" -OutputDirectory build

::DEPLOY
"tools\nuget.exe" push "build\*.nupkg"

goto:eof
::ERRORS
::---------------------
:MissingApiKey
echo API Key not found
goto:eof
:MissingMSBuildRegistry
echo Cannot obtain path to MSBuild tools from registry
goto:eof
:MissingMSBuildToolsPath
echo The MSBuild tools path from the registry '%MSBUILDDIR%' does not exist
goto:eof
:MissingMSBuildExe
echo The MSBuild executable could not be found at '%MSBUILDDIR%'
goto:eof

@echo off

IF [%1]==[] GOTO MissingApiKey

reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath > nul 2>&1
if ERRORLEVEL 1 goto MissingMSBuildRegistry

for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B

IF NOT EXIST %MSBUILDDIR%nul goto MissingMSBuildToolsPath
IF NOT EXIST %MSBUILDDIR%msbuild.exe goto MissingMSBuildExe

::BUILD
"tools\nuget.exe" restore EntityContextLibrary.sln
"%MSBUILDDIR%msbuild.exe" "03_Services\EntityContextLibrary\EntityContextLibrary.csproj" /t:ReBuild /p:Configuration=Release;TargetFrameworkVersion=v4.5;DefineConstants="TRACE;NET45";OutPutPath=bin\Release\net45\;DocumentationFile=bin\Release\net45\Aliencube.EntityContextLibrary.xml

mkdir build
del "build\*.nupkg"

::SET API KEY
"tools\nuget.exe" setApiKey %1

::PACK
"tools\nuget.exe" pack "03_Services\EntityContextLibrary\EntityContextLibrary.nuspec" -OutputDirectory build

::DEPLOY
"tools\nuget.exe" push "build\*.nupkg"

goto:eof
::ERRORS
::---------------------
:MissingApiKey
echo API Key not found
goto:eof
:MissingMSBuildRegistry
echo Cannot obtain path to MSBuild tools from registry
goto:eof
:MissingMSBuildToolsPath
echo The MSBuild tools path from the registry '%MSBUILDDIR%' does not exist
goto:eof
:MissingMSBuildExe
echo The MSBuild executable could not be found at '%MSBUILDDIR%'
goto:eof

Update build.bat

Update build.bat


@ECHO OFF

rem %~dp0 is the expanded pathname of the current script under NT
set LOCAL_FOP_HOME=
if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME=%~dp0

rem Code from Apache Ant project
rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).
rem Could also do a "shift" and "%*" for all params, but apparently doesn't work
rem with Win9x.
set FOP_CMD_LINE_ARGS=%1
if ""%1""=="""" goto doneStart
shift
:setupArgs
if ""%1""=="""" goto doneStart
set FOP_CMD_LINE_ARGS=%FOP_CMD_LINE_ARGS% %1
shift
goto setupArgs
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.
:doneStart

set LOGCHOICE=
rem The default commons logger for JDK1.4 is JDK1.4Logger.
rem To use a different logger, uncomment the one desired below
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

set LOGLEVEL=
rem Logging levels
rem Below option is only if you are using SimpleLog instead of the default JDK1.4 Logger.
rem To set logging levels for JDK 1.4 Logger, edit the %JAVA_HOME%\JRE\LIB\logging.properties
rem file instead.
rem Possible SimpleLog values:  "trace", "debug", "info" (default), "warn", "error", or "fatal".
rem set LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=INFO

set LIBDIR=%LOCAL_FOP_HOME%lib

set LOCALCLASSPATH=%LOCAL_FOP_HOME%build\fop.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LOCAL_FOP_HOME%build\fop-sandbox.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LOCAL_FOP_HOME%build\fop-hyph.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis-1.3.02.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.7.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.7.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\serializer-2.7.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik-all-1.6.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-4.2.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-io-1.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-logging-1.0.4.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\fop-hyph.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%FOP_HYPHENATION_PATH%

java %LOGCHOICE% %LOGLEVEL% -cp "%LOCALCLASSPATH%" org.apache.fop.cli.Main %FOP_CMD_LINE_ARGS%

correct line endings for fop commands

correct line endings for fop commands

git-svn-id: 102839466c3b40dd9c7e25c0a1a6d26afc40150a@375575 13f79535-47bb-0310-9956-ffa450edef68


@echo off
REM Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
REM for details. All rights reserved. Use of this source code is governed by a
REM BSD-style license that can be found in the LICENSE file.

setlocal
rem Handle the case where dart-sdk/bin has been symlinked to.
set DIR_NAME_WITH_SLASH=%~dp0
set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%%
call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR
rem Get rid of surrounding quotes.
for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi

set DART=%BIN_DIR%\dart
set SNAPSHOT=%BIN_DIR%\snapshots\dartdoc.dart.snapshot

"%DART%" --packages="$BIN_DIR/snapshots/resources/dartdoc/.packages" "%SNAPSHOT%" %*

endlocal

exit /b %errorlevel%

rem Follow the symbolic links (junctions points) using `dir to determine the
rem canonical path. Output with a link looks something like this
rem
rem 01/03/2013  10:11 PM    <JUNCTION>     abc def
rem [c:\dart_bleeding\dart-repo.9\dart\build\ReleaseIA32\dart-sdk]
rem
rem So in the output of 'dir /a:l "targetdir"' we are looking for a filename
rem surrounded by right angle bracket and left square bracket. Once we get
rem the filename, which is name of the link, we recursively follow that.
:follow_links
setlocal
for %%i in (%1) do set result=%%~fi
set current=
for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^
                                             ^| find ">     %~n1 ["`) do (
  set current=%%i
)
if not "%current%"=="" call :follow_links "%current%", result
endlocal & set %~2=%result%
goto :eof

:end

@echo off
REM Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
REM for details. All rights reserved. Use of this source code is governed by a
REM BSD-style license that can be found in the LICENSE file.

setlocal
rem Handle the case where dart-sdk/bin has been symlinked to.
set DIR_NAME_WITH_SLASH=%~dp0
set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%%
call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR
rem Get rid of surrounding quotes.
for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi

set DART=%BIN_DIR%\dart
set SNAPSHOT=%BIN_DIR%\snapshots\dartdoc.dart.snapshot

"%DART%" --packages="%BIN_DIR%/snapshots/resources/dartdoc/.packages" "%SNAPSHOT%" %*

endlocal

exit /b %errorlevel%

rem Follow the symbolic links (junctions points) using `dir to determine the
rem canonical path. Output with a link looks something like this
rem
rem 01/03/2013  10:11 PM    <JUNCTION>     abc def
rem [c:\dart_bleeding\dart-repo.9\dart\build\ReleaseIA32\dart-sdk]
rem
rem So in the output of 'dir /a:l "targetdir"' we are looking for a filename
rem surrounded by right angle bracket and left square bracket. Once we get
rem the filename, which is name of the link, we recursively follow that.
:follow_links
setlocal
for %%i in (%1) do set result=%%~fi
set current=
for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^
                                             ^| find ">     %~n1 ["`) do (
  set current=%%i
)
if not "%current%"=="" call :follow_links "%current%", result
endlocal & set %~2=%result%
goto :eof

:end

fix dartdoc.bat

fix dartdoc.bat

BUG=

Review URL: https://codereview.chromium.org//1318603006 .


setlocal
call clean.bat
call ..\Tools\SetVsEnv x86

inf2cat /uselocaltime /driver:. /os:XP_X86,Server2003_X86,XP_X64,Server2003_X64,Vista_X86,Server2008_X86,Vista_X64,Server2008_X64,7_X86,7_X64,Server2008R2_X64,8_X86,8_X64,Server8_X64,6_3_X86,6_3_X64,Server6_3_X64,10_X86,10_X64,Server10_X64

mkdir Install
copy qemufwcfg.* .\Install\

endlocal

setlocal
call clean.bat
call ..\Tools\SetVsEnv x86

inf2cat /uselocaltime /driver:. /os:8_X86,8_X64,Server8_X64,6_3_X86,6_3_X64,Server6_3_X64,10_X86,10_X64,Server10_X64

mkdir Install
copy qemufwcfg.* .\Install\

endlocal

Remove code for legacy OSes

fwcfg: Remove code for legacy OSes

Signed-off-by: Kostiantyn Kostiuk <88b496cab076c092c564e40d69a70d175fb00bcc@daynix.com>


@echo off

taskkill /f /IM "Ulterius Server.exe"

pushd %~dp0

"Ulterius Server.exe"
popd
pause >nul

remove pause from restart script

remove pause from restart script


@echo off
goto continue

:showUsage
echo Usage: %0 ^<mode^> ^<name^> ^<max-memory^> "<vmarg-list>" ^<app-classname^> ^<app-args^>...
echo    ^<mode^>: fg    run as foreground process in current shell
echo              bg    run as background process in new shell
echo              debug run as foreground process in current shell in debug mode ^(suspend=n^)
echo              debug-suspend   run as foreground process in current shell in debug mode ^(suspend=y^)
echo              NOTE: for all debug modes environment variable DEBUG_ADDRESS may be set to
echo                    override default debug address of 127.0.0.1:18001
echo    ^<name^>: application name used for naming console window
echo    ^<max-memory^>: maximum memory heap size in MB ^(e.g., 768M or 2G^).  Use "" if default should be used.
echo                  This will generally be upto 1/4 of the physical memory available to the OS.  On
echo                  some systems the default could be much less (particularly for 32-bit OS).
echo    ^<vmarg-list^>: pass-thru args ^(e.g.,  "-Xmx512M -Dmyvar=1 -DanotherVar=2"^) - use
echo                empty "" if vmargs not needed
echo    ^<app-classname^>: application classname ^(e.g., ghidra.GhidraRun ^)
echo    ^<app-args^>...: arguments to be passed to the application
echo.
echo    Example:
echo       %0 debug Ghidra 768M "" ghidra.GhidraRun
exit /B 1

:continue

:: Delay the expansion of our loop items below since the value is being updated as the loop works
setlocal enabledelayedexpansion

:: See if we were doubled clicked or run from a command prompt
set DOUBLE_CLICKED=n
for /f "tokens=2" %%# in ("%cmdcmdline%") do if /i "%%#" equ "/c" set DOUBLE_CLICKED=y

:: Sets SUPPORT_DIR to the directory that contains this file (ends with '\')
::
:: '% ~' dereferences the value in param 0
:: 'd' - drive
:: 'p' - path (without filename)
set "SUPPORT_DIR=%~dp0"

::
:: Parse arguments
::
set VMARG_LIST=
set ARGS=
set INDEX=0
for %%A in (%*) do (
	set /A INDEX=!INDEX!+1
	if "!INDEX!"=="1" ( set MODE=%%A
	) else if "!INDEX!"=="2" ( set APPNAME=%%A
	) else if "!INDEX!"=="3" ( set MAXMEM=%%~A
	) else if "!INDEX!"=="4" ( if not "%%~A"=="" set VMARG_LIST=%%~A
	) else if "!INDEX!"=="5" ( set CLASSNAME=%%~A
	) else set ARGS=!ARGS! %%A
)

if %INDEX% geq 5 goto continue1
echo Incorrect launch usage - missing argument^(s^)
goto showUsage

:continue1

::
:: Production Environment
::
set "INSTALL_DIR=%SUPPORT_DIR%..\"
set "CPATH=%INSTALL_DIR%Ghidra\Framework\Utility\lib\Utility.jar"
set "LS_CPATH=%SUPPORT_DIR%LaunchSupport.jar"
set "DEBUG_LOG4J=%SUPPORT_DIR%debug.log4j.xml"

if exist "%INSTALL_DIR%Ghidra" goto continue2

::
:: Development Environment
::
set "INSTALL_DIR=%INSTALL_DIR%..\..\..\"
set "CPATH=%INSTALL_DIR%Ghidra\Framework\Utility\bin\main"
set "LS_CPATH=%INSTALL_DIR%GhidraBuild\LaunchSupport\bin\main"
set "DEBUG_LOG4J=%INSTALL_DIR%Ghidra\RuntimeScripts\Common\support\debug.log4j.xml"

:continue2

:: This is to force Java to use the USERPROFILE directory for user.home
if exist "%USERPROFILE%" (
	set VMARG_LIST=%VMARG_LIST% -Duser.home="%USERPROFILE%"
)

:: Make sure some kind of java is on the path.  It's required to run the LaunchSupport program.
java -version >nul 2>nul
if not %ERRORLEVEL% == 0 (
	echo Java runtime not found.  Please refer to the Ghidra Installation Guide's Troubleshooting section.
	goto exit1
)

:: Get the JDK that will be used to launch Ghidra
set JAVA_HOME=
for /f "delims=*" %%i in ('java -cp "%LS_CPATH%" LaunchSupport "%INSTALL_DIR%\" -jdk_home -save') do set JAVA_HOME=%%i
if "%JAVA_HOME%" == "" (
	:: No JDK has been setup yet.  Let the user choose one.
	java -cp "%LS_CPATH%" LaunchSupport "%INSTALL_DIR%\" -jdk_home -ask

	:: Now that the user chose one, try again to get the JDK that will be used to launch Ghidra
	for /f "delims=*" %%i in ('java -cp "%LS_CPATH%" LaunchSupport "%INSTALL_DIR%\" -jdk_home -save') do set JAVA_HOME=%%i
	if "!JAVA_HOME!" == "" (
		echo.
		echo Failed to find a supported JDK.  Please refer to the Ghidra Installation Guide's Troubleshooting section.
		set ERRORLEVEL=1
		goto exit1
	)
)
set JAVA_CMD=%JAVA_HOME%\bin\java

:: Get the configurable VM arguments from the launch properties
for /f "delims=*" %%i in ('java -cp "%LS_CPATH%" LaunchSupport "%INSTALL_DIR%\" -vmargs') do set VMARG_LIST=%VMARG_LIST% %%i

:: Set Max Heap Size if specified
if not "%MAXMEM%"=="" (
	set VMARG_LIST=%VMARG_LIST% -Xmx%MAXMEM%
)

set BACKGROUND=n
set DEBUG=n
set SUSPEND=n

if "%MODE%"=="debug" (
	set DEBUG=y
)

if "%MODE%"=="debug-suspend" (
	set DEBUG=y
	set SUSPEND=y
)

if "%DEBUG%"=="y" (
	if "%DEBUG_ADDRESS%"=="" (
		set DEBUG_ADDRESS=127.0.0.1:18001
	)

	set VMARG_LIST=!VMARG_LIST! -Xdebug
	set VMARG_LIST=!VMARG_LIST! -Xnoagent
	set VMARG_LIST=!VMARG_LIST! -Djava.compiler=NONE
	set VMARG_LIST=!VMARG_LIST! -Dlog4j.configuration="!DEBUG_LOG4J!"
	set VMARG_LIST=!VMARG_LIST! -Xrunjdwp:transport=dt_socket,server=y,suspend=!SUSPEND!,address=!DEBUG_ADDRESS!
	goto continue3
)

if "%MODE%"=="fg" (
	goto continue3
)

if "%MODE%"=="bg" (
	set BACKGROUND=y
	goto continue3
)

echo "Incorrect launch usage - invalid launch mode: %MODE%"
exit /B 1

:continue3

set CMD_ARGS=%FORCE_JAVA_VERSION% %JAVA_USER_HOME_DIR_OVERRIDE% %VMARG_LIST% -cp "%CPATH%" ghidra.GhidraLauncher %CLASSNAME% %ARGS%

if "%BACKGROUND%"=="y" (
	set JAVA_CMD=!JAVA_CMD!w
	start "%APPNAME%" /I /B "!JAVA_CMD!" %CMD_ARGS%

	REM If our process dies immediately, output something so the user knows to run in debug mode.
	REM Otherwise they'll never see any error output from background mode.
	REM NOTE: The below check isn't perfect because they might have other javaw's running, but
	REM without the PID of the thing we launched, it's the best we can do (maybe use WMI?).
	REM Worst case, they just won't see the error message.
	%SystemRoot%\System32\timeout.exe /NOBREAK 1 > NUL
	%SystemRoot%\System32\tasklist.exe | %SystemRoot%\System32\findstr.exe "javaw" > NUL
	if not "!ERRORLEVEL!"=="0" (
		echo Exited with error.  Run in foreground ^(fg^) mode for more details.
	)
) else (
	"%JAVA_CMD%" %CMD_ARGS%
)

:exit1
if not %ERRORLEVEL% == 0 (
	if "%DOUBLE_CLICKED%"=="y" (
		pause
	)
)

exit /B %ERRORLEVEL%

@echo off
goto continue

:showUsage
echo Usage: %0 ^<mode^> ^<name^> ^<max-memory^> "<vmarg-list>" ^<app-classname^> ^<app-args^>...
echo    ^<mode^>: fg    run as foreground process in current shell
echo              bg    run as background process in new shell
echo              debug run as foreground process in current shell in debug mode ^(suspend=n^)
echo              debug-suspend   run as foreground process in current shell in debug mode ^(suspend=y^)
echo              NOTE: for all debug modes environment variable DEBUG_ADDRESS may be set to
echo                    override default debug address of 127.0.0.1:18001
echo    ^<name^>: application name used for naming console window
echo    ^<max-memory^>: maximum memory heap size in MB ^(e.g., 768M or 2G^).  Use "" if default should be used.
echo                  This will generally be upto 1/4 of the physical memory available to the OS.  On
echo                  some systems the default could be much less (particularly for 32-bit OS).
echo    ^<vmarg-list^>: pass-thru args ^(e.g.,  "-Xmx512M -Dmyvar=1 -DanotherVar=2"^) - use
echo                empty "" if vmargs not needed
echo    ^<app-classname^>: application classname ^(e.g., ghidra.GhidraRun ^)
echo    ^<app-args^>...: arguments to be passed to the application
echo.
echo    Example:
echo       %0 debug Ghidra 768M "" ghidra.GhidraRun
exit /B 1

:continue

:: Delay the expansion of our loop items below since the value is being updated as the loop works
setlocal enabledelayedexpansion

:: See if we were doubled clicked or run from a command prompt
set DOUBLE_CLICKED=n
for /f "tokens=2" %%# in ("%cmdcmdline%") do if /i "%%#" equ "/c" set DOUBLE_CLICKED=y

:: Sets SUPPORT_DIR to the directory that contains this file (ends with '\')
::
:: '% ~' dereferences the value in param 0
:: 'd' - drive
:: 'p' - path (without filename)
set "SUPPORT_DIR=%~dp0"

::
:: Parse arguments
::
set VMARG_LIST=
set ARGS=
set INDEX=0
for %%A in (%*) do (
	set /A INDEX=!INDEX!+1
	if "!INDEX!"=="1" ( set MODE=%%A
	) else if "!INDEX!"=="2" ( set APPNAME=%%A
	) else if "!INDEX!"=="3" ( set MAXMEM=%%~A
	) else if "!INDEX!"=="4" ( if not "%%~A"=="" set VMARG_LIST=%%~A
	) else if "!INDEX!"=="5" ( set CLASSNAME=%%~A
	) else set ARGS=!ARGS! %%A
)

if %INDEX% geq 5 goto continue1
echo Incorrect launch usage - missing argument^(s^)
goto showUsage

:continue1

::
:: Production Environment
::
set "INSTALL_DIR=%SUPPORT_DIR%..\"
set "CPATH=%INSTALL_DIR%Ghidra\Framework\Utility\lib\Utility.jar"
set "LS_CPATH=%SUPPORT_DIR%LaunchSupport.jar"
set "DEBUG_LOG4J=%SUPPORT_DIR%debug.log4j.xml"

if exist "%INSTALL_DIR%Ghidra" goto continue2

::
:: Development Environment
::
set "INSTALL_DIR=%INSTALL_DIR%..\..\..\"
set "CPATH=%INSTALL_DIR%Ghidra\Framework\Utility\bin\main"
set "LS_CPATH=%INSTALL_DIR%GhidraBuild\LaunchSupport\bin\main"
set "DEBUG_LOG4J=%INSTALL_DIR%Ghidra\RuntimeScripts\Common\support\debug.log4j.xml"

:continue2

:: This is to force Java to use the USERPROFILE directory for user.home
if exist "%USERPROFILE%" (
	set VMARG_LIST=%VMARG_LIST% -Duser.home="%USERPROFILE%"
)

:: Make sure some kind of java is on the path.  It's required to run the LaunchSupport program.
java -version >nul 2>nul
if not %ERRORLEVEL% == 0 (
	echo Java runtime not found.  Please refer to the Ghidra Installation Guide's Troubleshooting section.
	goto exit1
)

:: Get the JDK that will be used to launch Ghidra
set JAVA_HOME=
for /f "delims=*" %%i in ('java -cp "%LS_CPATH%" LaunchSupport "%INSTALL_DIR%\" -jdk_home -save') do set JAVA_HOME=%%i
if "%JAVA_HOME%" == "" (
	:: No JDK has been setup yet.  Let the user choose one.
	java -cp "%LS_CPATH%" LaunchSupport "%INSTALL_DIR%\" -jdk_home -ask

	:: Now that the user chose one, try again to get the JDK that will be used to launch Ghidra
	for /f "delims=*" %%i in ('java -cp "%LS_CPATH%" LaunchSupport "%INSTALL_DIR%\" -jdk_home -save') do set JAVA_HOME=%%i
	if "!JAVA_HOME!" == "" (
		echo.
		echo Failed to find a supported JDK.  Please refer to the Ghidra Installation Guide's Troubleshooting section.
		set ERRORLEVEL=1
		goto exit1
	)
)
set "JAVA_CMD=%JAVA_HOME%\bin\java"

:: Get the configurable VM arguments from the launch properties
for /f "delims=*" %%i in ('java -cp "%LS_CPATH%" LaunchSupport "%INSTALL_DIR%\" -vmargs') do set VMARG_LIST=%VMARG_LIST% %%i

:: Set Max Heap Size if specified
if not "%MAXMEM%"=="" (
	set VMARG_LIST=%VMARG_LIST% -Xmx%MAXMEM%
)

set BACKGROUND=n
set DEBUG=n
set SUSPEND=n

if "%MODE%"=="debug" (
	set DEBUG=y
)

if "%MODE%"=="debug-suspend" (
	set DEBUG=y
	set SUSPEND=y
)

if "%DEBUG%"=="y" (
	if "%DEBUG_ADDRESS%"=="" (
		set DEBUG_ADDRESS=127.0.0.1:18001
	)

	set VMARG_LIST=!VMARG_LIST! -Xdebug
	set VMARG_LIST=!VMARG_LIST! -Xnoagent
	set VMARG_LIST=!VMARG_LIST! -Djava.compiler=NONE
	set VMARG_LIST=!VMARG_LIST! -Dlog4j.configuration="!DEBUG_LOG4J!"
	set VMARG_LIST=!VMARG_LIST! -Xrunjdwp:transport=dt_socket,server=y,suspend=!SUSPEND!,address=!DEBUG_ADDRESS!
	goto continue3
)

if "%MODE%"=="fg" (
	goto continue3
)

if "%MODE%"=="bg" (
	set BACKGROUND=y
	goto continue3
)

echo "Incorrect launch usage - invalid launch mode: %MODE%"
exit /B 1

:continue3

set CMD_ARGS=%FORCE_JAVA_VERSION% %JAVA_USER_HOME_DIR_OVERRIDE% %VMARG_LIST% -cp "%CPATH%" ghidra.GhidraLauncher %CLASSNAME% %ARGS%

if "%BACKGROUND%"=="y" (
	set JAVA_CMD=!JAVA_CMD!w
	start "%APPNAME%" /I /B "!JAVA_CMD!" %CMD_ARGS%

	REM If our process dies immediately, output something so the user knows to run in debug mode.
	REM Otherwise they'll never see any error output from background mode.
	REM NOTE: The below check isn't perfect because they might have other javaw's running, but
	REM without the PID of the thing we launched, it's the best we can do (maybe use WMI?).
	REM Worst case, they just won't see the error message.
	%SystemRoot%\System32\timeout.exe /NOBREAK 1 > NUL
	%SystemRoot%\System32\tasklist.exe | %SystemRoot%\System32\findstr.exe "javaw" > NUL
	if not "!ERRORLEVEL!"=="0" (
		echo Exited with error.  Run in foreground ^(fg^) mode for more details.
	)
) else (
	"%JAVA_CMD%" %CMD_ARGS%
)

:exit1
if not %ERRORLEVEL% == 0 (
	if "%DOUBLE_CLICKED%"=="y" (
		pause
	)
)

exit /B %ERRORLEVEL%

Add one more missing quote around JAVA_CMD


::
:: Microsoft Azure SDK for Net - Generate library code
:: Copyright (C) Microsoft Corporation. All Rights Reserved.
::

@echo off
set autoRestVersion=1.0.0-Nightly20170212
if  "%1" == "" (
    set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-containerregistry/2017-03-01/swagger/containerregistry.json"
) else (
    set specFile="%1"
)
set repoRoot=%~dp0..\..\..\..
set generateFolder=%~dp0Generated

if exist %generateFolder% rd /S /Q  %generateFolder%
call "%repoRoot%\tools\autorest.gen.cmd" %specFile% Microsoft.Azure.Management.ContainerRegistry %autoRestVersion% %generateFolder% MICROSOFT_MIT "-FT 2"

::
:: Microsoft Azure SDK for Net - Generate library code
:: Copyright (C) Microsoft Corporation. All Rights Reserved.
::

@echo off
set autoRestVersion=1.0.0-Nightly20170212
if  "%1" == "" (
    set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/3b0b26b4b6e3bc5e7cf3610b0866d310abb5b814/arm-containerregistry/2017-03-01/swagger/containerregistry.json"
) else (
    set specFile="%1"
)
set repoRoot=%~dp0..\..\..\..
set generateFolder=%~dp0Generated

if exist %generateFolder% rd /S /Q  %generateFolder%
call "%repoRoot%\tools\autorest.gen.cmd" %specFile% Microsoft.Azure.Management.ContainerRegistry %autoRestVersion% %generateFolder% MICROSOFT_MIT "-FT 2"

Update swagger link

Update swagger link


Update comport and avrdude path.

Update comport and avrdude path.


@echo off
SET zip_file=php-gtk-%1-win32.zip
md \php-gtk-dist
cd \php-gtk-dist
md php4
md winnt
md winnt\system32
md test
copy \php4\php.exe php4
copy \php4\php-cgi.exe php4
copy \php4\php_win.exe php4
copy \php4\php4ts.dll php4
copy \php4\php_gtk.dll php4
copy \php4\php_gtk_combobutton.dll php4
copy \php4\php_gtk_libglade.dll php4
copy \php4\php_gtk_scrollpane.dll php4
copy \php4\php_gtk_spaned.dll php4
copy \php4\php_gtk_sqpane.dll php4
copy \php\php4\php.ini-dist winnt\php.ini
type \php\php-gtk\win32\php.ini >>winnt\php.ini
copy \php\php-gtk\win32\php.ini php4\php.ini-gtk

copy \php4\iconv.dll php4
copy \php4\libgdk-0.dll php4
copy \php4\libglade-0.1.dll php4
copy \php4\libglib-2.0-0.dll php4
copy \php4\libgmodule-2.0-0.dll php4
copy \php4\libgobject-2.0-0.dll php4
copy \php4\libgthread-2.0-0.dll php4
copy \php4\libgtk-0.dll php4
copy \php4\libintl-1.dll php4
copy \php4\libxml2.dll php4

copy \php\php-gtk\test\combobutton.php test
copy \php\php-gtk\test\fileselection.php test
copy \php\php-gtk\test\gtk.php test
copy \php\php-gtk\test\hello.php test
copy \php\php-gtk\test\list.php test
copy \php\php-gtk\test\scribble.php test
copy \php\php-gtk\test\scrollpane.php test
copy \php\php-gtk\test\spaned.php test
copy \php\php-gtk\test\sqpane.php test
copy \php\php-gtk\test\testgtkrc test
copy \php\php-gtk\test\testgtkrc2 test
copy \php\php-gtk\test\window.xpm test
copy \php\php-gtk\win32\README.txt
copy \php\php-gtk\NEWS
"c:\Program Files\WinZip\WZZip" -ampr %zip_file%
copy %zip_file% \php\php-gtk-web\distributions
del %zip_file%
cd \php\php-gtk\win32

@echo off
SET zip_file=php-gtk-%1-win32.zip
md \php-gtk-dist
cd \php-gtk-dist
md php4
md winnt
md winnt\system32
md test
copy \php4\php.exe php4
copy \php4\php-cgi.exe php4
copy \php4\php_win.exe php4
copy \php4\php4ts.dll php4
copy \php4\php_gtk.dll php4
copy \php4\php_gtk_combobutton.dll php4
copy \php4\php_gtk_libglade.dll php4
copy \php4\php_gtk_scintilla.dll php4
copy \php4\php_gtk_scrollpane.dll php4
copy \php4\php_gtk_spaned.dll php4
copy \php4\php_gtk_sqpane.dll php4
copy \php\php4\php.ini-dist winnt\php.ini
type \php\php-gtk\win32\php.ini >>winnt\php.ini
copy \php\php-gtk\win32\php.ini php4\php.ini-gtk

copy \php4\iconv.dll php4
copy \php4\libgdk-0.dll php4
copy \php4\libglade-0.1.dll php4
copy \php4\libglib-2.0-0.dll php4
copy \php4\libgmodule-2.0-0.dll php4
copy \php4\libgobject-2.0-0.dll php4
copy \php4\libgthread-2.0-0.dll php4
copy \php4\libgtk-0.dll php4
copy \php4\libintl-1.dll php4
copy \php4\libxml2.dll php4

copy \php\php-gtk\test\combobutton.php test
copy \php\php-gtk\test\fileselection.php test
copy \php\php-gtk\test\gtk.php test
copy \php\php-gtk\test\hello.php test
copy \php\php-gtk\test\list.php test
copy \php\php-gtk\test\scribble.php test
copy \php\php-gtk\test\scrollpane.php test
copy \php\php-gtk\test\spaned.php test
copy \php\php-gtk\test\sqpane.php test
copy \php\php-gtk\test\testgtkrc test
copy \php\php-gtk\test\testgtkrc2 test
copy \php\php-gtk\test\window.xpm test
copy \php\php-gtk\win32\README.txt
copy \php\php-gtk\NEWS
"c:\Program Files\WinZip\WZZip" -ampr %zip_file%
copy %zip_file% \php\php-gtk-web\distributions
del %zip_file%
cd \php\php-gtk\win32

include the scintilla extension in the distribution


@echo off
SET PLAT=Win32
if "%1" == "x64" SET PLAT=x64
if exist Bin rd /S /Q Bin
del /F /Q Wrapper\*.cs
rem swig -csharp -c++ -nodefaultctor -nodefaultdtor -namespace OSGeo.FDO -outdir "%CD%\Wrapper" -o "%CD%\FdoDotNet\fdo_wrap.cpp" -I"%CD%\..\..\Fdo\Inc" fdo.i
..\..\Tools\swigwin-3.0.2\swig.exe -csharp -c++ -nodefaultctor -nodefaultdtor -namespace OSGeo.FDO -outdir "%CD%\Wrapper" -o "%CD%\FdoDotNet\fdo_wrap.cpp" -I"%CD%\..\..\Fdo\Inc" fdo.i 1> swig_build.log 2>&1
msbuild FdoDotNet.sln /p:Configuration=Release;Platform=%PLAT%

@echo off
SET PLAT=x86
if "%1" == "x64" SET PLAT=x64
if exist Bin rd /S /Q Bin
del /F /Q Wrapper\*.cs
rem swig -csharp -c++ -nodefaultctor -nodefaultdtor -namespace OSGeo.FDO -outdir "%CD%\Wrapper" -o "%CD%\FdoDotNet\fdo_wrap.cpp" -I"%CD%\..\..\Fdo\Inc" fdo.i
..\..\Tools\swigwin-3.0.2\swig.exe -csharp -c++ -nodefaultctor -nodefaultdtor -namespace OSGeo.FDO -outdir "%CD%\Wrapper" -o "%CD%\FdoDotNet\fdo_wrap.cpp" -I"%CD%\..\..\Fdo\Inc" fdo.i 1> swig_build.log 2>&1
msbuild FdoDotNet.sln /p:Configuration=Release;Platform=%PLAT%

Fix build.bat under default settings

Fix build.bat under default settings