@setlocal
@rem Create distribution.
@rem Keep both clover standalone and ICD intact
@IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\*penCL-1.dll" IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\*penCL.dll" del /Q "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\*penCL.dll"
@IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\MesaOpenCL-1.dll" REN "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\MesaOpenCL-1.dll" MesaOpenCL.dll
@IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\OpenCL-1.dll" REN "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\OpenCL-1.dll" OpenCL.dll
@IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\libMesaOpenCL-1.dll" REN "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\libMesaOpenCL-1.dll" MesaOpenCL.dll
@IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\libOpenCL-1.dll" REN "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\libOpenCL-1.dll" OpenCL.dll

@set dist=n
@set /p dist=Create or update Mesa3D distribution package (y/n):
@echo.
@if /I NOT "%dist%"=="y" GOTO donedist
@cd "%devroot%\%projectname%"

@rem Normal distribution vs Meson install
@set normaldist=1
@IF %normaldist% EQU 1 GOTO normaldist

@IF %toolchain%==msvc GOTO donedist
@%mesonloc% install --no-rebuild --skip-subprojects -C "%devroot%\mesa\build\%toolchain%-%abi%"
@echo.
@GOTO donedist

:normaldist
@set keeplastbuild=n
@IF %toolchain%==msvc IF EXIST "%devroot%\%projectname%\lib\%abi%\*.lib set /p keeplastbuild=Keep binaries and libraries from previous build (y/n):
@IF %toolchain%==msvc IF EXIST "%devroot%\%projectname%\lib\%abi%\*.lib echo.
@if NOT EXIST "bin\" MD bin
@if NOT EXIST "lib\" MD lib
@IF /I NOT "%keeplastbuild%"=="y" if EXIST "bin\%abi%\" RD /S /Q bin\%abi%
@IF /I NOT "%keeplastbuild%"=="y" if EXIST "lib\%abi%\" RD /S /Q lib\%abi%
@IF /I NOT "%keeplastbuild%"=="y" if EXIST "debug\%abi%\" RD /S /Q debug\%abi%
@IF /I NOT "%keeplastbuild%"=="y" if EXIST "include\" RD /S /Q include
@if NOT EXIST "bin\%abi%\" MD bin\%abi%
@if NOT EXIST "lib\%abi%\" MD lib\%abi%
@if NOT EXIST "lib\%abi%\pkgconfig\" MD lib\%abi%\pkgconfig
@if NOT EXIST "debug\%abi%\" MD debug\%abi%
@if NOT EXIST "include\" MD include

:mesondist
@echo Copying Mesa3D shared libraries and PDBs...
@for /R "%devroot%\mesa\build\%toolchain%-%abi%\src" %%a IN (*.dll) do @(
@IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%%~dpna.pdb" copy "%%~dpna.pdb" "%devroot%\%projectname%\debug\%abi%"
)
@IF EXIST "%devroot%\%projectname%\bin\%abi%\libclon12compiler.dll" REN "%devroot%\%projectname%\bin\%abi%\libclon12compiler.dll" clon12compiler.dll
@echo.

@echo Copying runtimes for Microsoft drivers if needed...
@IF EXIST "%devroot%\%projectname%\bin\%abi%\*on12compiler.dll" for /R "%devroot%\clon12\out\%abi%\bin" %%a IN (*.dll) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\*pirv_to_dxil.dll" IF NOT EXIST "%devroot%\%projectname%\bin\%abi%\dxil.dll" for /f delims^=^ eol^= %%a in ('@call "%devroot%\%projectname%\buildscript\modules\winsdk.cmd" dxil') do @IF EXIST %%a copy %%a "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\openglon12.dll" IF NOT EXIST "%devroot%\%projectname%\bin\%abi%\dxil.dll" for /f delims^=^ eol^= %%a in ('@call "%devroot%\%projectname%\buildscript\modules\winsdk.cmd" dxil') do @IF EXIST %%a copy %%a "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\openclon12.dll" IF NOT EXIST "%devroot%\%projectname%\bin\%abi%\dxil.dll" for /f delims^=^ eol^= %%a in ('@call "%devroot%\%projectname%\buildscript\modules\winsdk.cmd" dxil') do @IF EXIST %%a copy %%a "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\vulkan_dzn.dll" IF NOT EXIST "%devroot%\%projectname%\bin\%abi%\dxil.dll" for /f delims^=^ eol^= %%a in ('@call "%devroot%\%projectname%\buildscript\modules\winsdk.cmd" dxil') do @IF EXIST %%a copy %%a "%devroot%\%projectname%\bin\%abi%"
@echo.

@echo Copying test suite and commandline utilities...
@for /R "%devroot%\mesa\build\%toolchain%-%abi%\src" %%a IN (*.exe) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@echo.

@echo Copying Vulkan drivers initialization configuration files if needed...
@IF EXIST "%devroot%\%projectname%\bin\%abi%\vulkan_lvp.dll" for /R "%devroot%\mesa\build\%toolchain%-%abi%\src" %%a IN (lvp_icd.*.json) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\*ulkan_radeon.dll" for /R "%devroot%\mesa\build\%toolchain%-%abi%\src" %%a IN (radeon_icd.*.json) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\vulkan_dzn.dll" for /R "%devroot%\mesa\build\%toolchain%-%abi%\src" %%a IN (dzn_icd.*.json) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@echo.

@rem Patch Vulkan drivers JSONs
@IF EXIST "%devroot%\%projectname%\bin\%abi%\lvp_icd.*.json" call "%devroot%\%projectname%\buildscript\modules\fixvulkanjsons.cmd" lvp
@IF EXIST "%devroot%\%projectname%\bin\%abi%\radeon_icd.*.json" call "%devroot%\%projectname%\buildscript\modules\fixvulkanjsons.cmd" radeon
@IF EXIST "%devroot%\%projectname%\bin\%abi%\dzn_icd.*.json" call "%devroot%\%projectname%\buildscript\modules\fixvulkanjsons.cmd" dzn

@echo Copying static libraries...
@for /R "%devroot%\mesa\build\%toolchain%-%abi%" %%a IN (*.lib) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\lib\%abi%"
@for /R "%devroot%\mesa\build\%toolchain%-%abi%" %%a IN (*.dll.a) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\lib\%abi%"
@echo.

@echo Copying pkg-config scripts...
@for /R "%devroot%\mesa\build\%toolchain%-%abi%\meson-private" %%a IN (*.pc) do @IF EXIST "%%a" IF /I NOT "%%~na"=="DirectX-Headers" IF /I NOT "%%~na"=="libelf" IF /I NOT "%%~na"=="zlib" copy "%%a" "%devroot%\%projectname%\lib\%abi%\pkgconfig"
@echo.

@IF /I NOT "%keeplastbuild%"=="y" echo Copying headers...
@IF /I NOT "%keeplastbuild%"=="y" ROBOCOPY "%devroot%\mesa\include" "%devroot%\%projectname%\include" /E
@IF /I NOT "%keeplastbuild%"=="y" echo.

:donedist
@IF EXIST "%devroot%\%projectname%\bin\%abi%\*.dll" IF NOT EXIST "%devroot%\%projectname%\lib\%abi%\*.lib set /p getdebugbin=Collect MinGW debug binaries (y/n):
@IF EXIST "%devroot%\%projectname%\bin\%abi%\*.dll" IF NOT EXIST "%devroot%\%projectname%\lib\%abi%\*.lib echo.
@if /I "%getdebugbin%"=="y" echo Moving debug binaries to distinct location...
@if /I "%getdebugbin%"=="y" MOVE "%devroot%\%projectname%\bin\%abi%\*.dll" "%devroot%\%projectname%\debug\%abi%\"
@if /I "%getdebugbin%"=="y" IF EXIST "%devroot%\%projectname%\bin\%abi%\*.json" MOVE "%devroot%\%projectname%\bin\%abi%\*.json" "%devroot%\%projectname%\debug\%abi%\"
@if /I "%getdebugbin%"=="y" echo.
@endlocal

@setlocal
@rem Create distribution.
@rem Keep both clover standalone and ICD intact
@IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\*penCL-1.dll" IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\*penCL.dll" del /Q "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\*penCL.dll"
@IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\MesaOpenCL-1.dll" REN "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\MesaOpenCL-1.dll" MesaOpenCL.dll
@IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\OpenCL-1.dll" REN "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\OpenCL-1.dll" OpenCL.dll
@IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\libMesaOpenCL-1.dll" REN "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\libMesaOpenCL-1.dll" MesaOpenCL.dll
@IF EXIST "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\libOpenCL-1.dll" REN "%devroot%\mesa\build\%toolchain%-%abi%\src\gallium\targets\opencl\libOpenCL-1.dll" OpenCL.dll

@set dist=n
@set /p dist=Create or update Mesa3D distribution package (y/n):
@echo.
@if /I NOT "%dist%"=="y" GOTO donedist
@cd "%devroot%\%projectname%"

@rem Normal distribution vs Meson install
@set normaldist=1
@IF %normaldist% EQU 1 GOTO normaldist

@IF %toolchain%==msvc GOTO donedist
@%mesonloc% install --no-rebuild --skip-subprojects -C "%devroot%\mesa\build\%toolchain%-%abi%"
@echo.
@GOTO donedist

:normaldist
@set keeplastbuild=n
@IF %toolchain%==msvc IF EXIST lib\%abi%\*.lib set /p keeplastbuild=Keep binaries and libraries from previous build (y/n):
@IF %toolchain%==msvc IF EXIST lib\%abi%\*.lib echo.
@if NOT EXIST "bin\" MD bin
@if NOT EXIST "lib\" MD lib
@IF /I NOT "%keeplastbuild%"=="y" if EXIST "bin\%abi%\" RD /S /Q bin\%abi%
@IF /I NOT "%keeplastbuild%"=="y" if EXIST "lib\%abi%\" RD /S /Q lib\%abi%
@IF /I NOT "%keeplastbuild%"=="y" if EXIST "debug\%abi%\" RD /S /Q debug\%abi%
@IF /I NOT "%keeplastbuild%"=="y" if EXIST "include\" RD /S /Q include
@if NOT EXIST "bin\%abi%\" MD bin\%abi%
@if NOT EXIST "lib\%abi%\" MD lib\%abi%
@if NOT EXIST "lib\%abi%\pkgconfig\" MD lib\%abi%\pkgconfig
@if NOT EXIST "debug\%abi%\" MD debug\%abi%
@if NOT EXIST "include\" MD include

:mesondist
@echo Copying Mesa3D shared libraries and PDBs...
@for /R "%devroot%\mesa\build\%toolchain%-%abi%\src" %%a IN (*.dll) do @(
@IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%%~dpna.pdb" copy "%%~dpna.pdb" "%devroot%\%projectname%\debug\%abi%"
)
@IF EXIST "%devroot%\%projectname%\bin\%abi%\libclon12compiler.dll" REN "%devroot%\%projectname%\bin\%abi%\libclon12compiler.dll" clon12compiler.dll
@echo.

@echo Copying runtimes for Microsoft drivers if needed...
@IF EXIST "%devroot%\%projectname%\bin\%abi%\*on12compiler.dll" for /R "%devroot%\clon12\out\%abi%\bin" %%a IN (*.dll) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\*pirv_to_dxil.dll" IF NOT EXIST "%devroot%\%projectname%\bin\%abi%\dxil.dll" for /f delims^=^ eol^= %%a in ('@call "%devroot%\%projectname%\buildscript\modules\winsdk.cmd" dxil') do @IF EXIST %%a copy %%a "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\openglon12.dll" IF NOT EXIST "%devroot%\%projectname%\bin\%abi%\dxil.dll" for /f delims^=^ eol^= %%a in ('@call "%devroot%\%projectname%\buildscript\modules\winsdk.cmd" dxil') do @IF EXIST %%a copy %%a "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\openclon12.dll" IF NOT EXIST "%devroot%\%projectname%\bin\%abi%\dxil.dll" for /f delims^=^ eol^= %%a in ('@call "%devroot%\%projectname%\buildscript\modules\winsdk.cmd" dxil') do @IF EXIST %%a copy %%a "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\vulkan_dzn.dll" IF NOT EXIST "%devroot%\%projectname%\bin\%abi%\dxil.dll" for /f delims^=^ eol^= %%a in ('@call "%devroot%\%projectname%\buildscript\modules\winsdk.cmd" dxil') do @IF EXIST %%a copy %%a "%devroot%\%projectname%\bin\%abi%"
@echo.

@echo Copying test suite and commandline utilities...
@for /R "%devroot%\mesa\build\%toolchain%-%abi%\src" %%a IN (*.exe) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@echo.

@echo Copying Vulkan drivers initialization configuration files if needed...
@IF EXIST "%devroot%\%projectname%\bin\%abi%\vulkan_lvp.dll" for /R "%devroot%\mesa\build\%toolchain%-%abi%\src" %%a IN (lvp_icd.*.json) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\*ulkan_radeon.dll" for /R "%devroot%\mesa\build\%toolchain%-%abi%\src" %%a IN (radeon_icd.*.json) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@IF EXIST "%devroot%\%projectname%\bin\%abi%\vulkan_dzn.dll" for /R "%devroot%\mesa\build\%toolchain%-%abi%\src" %%a IN (dzn_icd.*.json) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\bin\%abi%"
@echo.

@rem Patch Vulkan drivers JSONs
@IF EXIST "%devroot%\%projectname%\bin\%abi%\lvp_icd.*.json" call "%devroot%\%projectname%\buildscript\modules\fixvulkanjsons.cmd" lvp
@IF EXIST "%devroot%\%projectname%\bin\%abi%\radeon_icd.*.json" call "%devroot%\%projectname%\buildscript\modules\fixvulkanjsons.cmd" radeon
@IF EXIST "%devroot%\%projectname%\bin\%abi%\dzn_icd.*.json" call "%devroot%\%projectname%\buildscript\modules\fixvulkanjsons.cmd" dzn

@echo Copying static libraries...
@for /R "%devroot%\mesa\build\%toolchain%-%abi%" %%a IN (*.lib) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\lib\%abi%"
@for /R "%devroot%\mesa\build\%toolchain%-%abi%" %%a IN (*.dll.a) do @IF EXIST "%%a" copy "%%a" "%devroot%\%projectname%\lib\%abi%"
@echo.

@echo Copying pkg-config scripts...
@for /R "%devroot%\mesa\build\%toolchain%-%abi%\meson-private" %%a IN (*.pc) do @IF EXIST "%%a" IF /I NOT "%%~na"=="DirectX-Headers" IF /I NOT "%%~na"=="libelf" IF /I NOT "%%~na"=="zlib" copy "%%a" "%devroot%\%projectname%\lib\%abi%\pkgconfig"
@echo.

@IF /I NOT "%keeplastbuild%"=="y" echo Copying headers...
@IF /I NOT "%keeplastbuild%"=="y" ROBOCOPY "%devroot%\mesa\include" "%devroot%\%projectname%\include" /E
@IF /I NOT "%keeplastbuild%"=="y" echo.

:donedist
@IF EXIST "%devroot%\%projectname%\bin\%abi%\*.dll" IF NOT EXIST "%devroot%\%projectname%\lib\%abi%\*.lib" set /p getdebugbin=Collect MinGW debug binaries (y/n):
@IF EXIST "%devroot%\%projectname%\bin\%abi%\*.dll" IF NOT EXIST "%devroot%\%projectname%\lib\%abi%\*.lib" echo.
@if /I "%getdebugbin%"=="y" echo Moving debug binaries to distinct location...
@if /I "%getdebugbin%"=="y" MOVE "%devroot%\%projectname%\bin\%abi%\*.dll" "%devroot%\%projectname%\debug\%abi%\"
@if /I "%getdebugbin%"=="y" IF EXIST "%devroot%\%projectname%\bin\%abi%\*.json" MOVE "%devroot%\%projectname%\bin\%abi%\*.json" "%devroot%\%projectname%\debug\%abi%\"
@if /I "%getdebugbin%"=="y" echo.
@endlocal

Fix regression from fc534234

Fix regression from fc534234


:: Init Script for cmd.exe
:: Sets some nice defaults
:: Created as part of cmder project

:: Find root dir
@if not defined CMDER_ROOT (
    for /f %%i in ("%ConEmuDir%\..\..") do @set CMDER_ROOT="%%~fi"
)

:: Change the prompt style
:: Mmm tasty lamb
@prompt $E[1;32;40m$P$S{git}$S$_$E[1;30;40m{lamb}$S$E[0m

:: Pick right version of clink
@if "%PROCESSOR_ARCHITECTURE%"=="x86" (
    set architecture=86
) else (
    set architecture=64
)

:: Run clink
@"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config"

:: Prepare for msysgit

:: I do not even know, copypasted from their .bat
@set PLINK_PROTOCOL=ssh
@if not defined TERM set TERM=cygwin

:: Enhance Path
@set git_install_root=%CMDER_ROOT%\vendor\msysgit
@set PATH=%PATH%;%CMDER_ROOT%\bin;%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%git_install_root%\share\vim\vim73;

:: Add aliases
@doskey /macrofile="%CMDER_ROOT%\config\aliases"

:: Set home path
@set HOME=%USERPROFILE%

@if defined CMDER_START cd /d "%CMDER_START%"

:: Init Script for cmd.exe
:: Sets some nice defaults
:: Created as part of cmder project

:: Find root dir
@if not defined CMDER_ROOT (
    for /f %%i in ("%ConEmuDir%\..\..") do @set CMDER_ROOT=%%~fi
)

:: Change the prompt style
:: Mmm tasty lamb
@prompt $E[1;32;40m$P$S{git}$S$_$E[1;30;40m{lamb}$S$E[0m

:: Pick right version of clink
@if "%PROCESSOR_ARCHITECTURE%"=="x86" (
    set architecture=86
) else (
    set architecture=64
)

:: Run clink
@"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config"

:: Prepare for msysgit

:: I do not even know, copypasted from their .bat
@set PLINK_PROTOCOL=ssh
@if not defined TERM set TERM=cygwin

:: Enhance Path
@set git_install_root=%CMDER_ROOT%\vendor\msysgit
@set PATH=%PATH%;%CMDER_ROOT%\bin;%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%git_install_root%\share\vim\vim73;

:: Add aliases
@doskey /macrofile="%CMDER_ROOT%\config\aliases"

:: Set home path
@set HOME=%USERPROFILE%

@if defined CMDER_START cd /d "%CMDER_START%"

Remove extraneous quotes.

Remove extraneous quotes.

Extra quotes in previous commit caused PATH to be set incorrectly in admin
shell.


@echo off

SET EXPECT_OUTPUT=

FOR %%a IN (%*) DO (
  IF /I "%%a"=="-h"           SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="--help"       SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="-v"           SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="--version"    SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="-f"           SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="--foreground" SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="-w"           SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="--wait"       SET EXPECT_OUTPUT=YES
)

IF "%EXPECT_OUTPUT%"=="YES" (
  "%~dp0\..\atom.exe" %*
) ELSE (
  "%~dp0\..\resources\app\apm\node_modules\atom-package-manager\bin\node.exe" "%~dp0\atom.js" %*
)

@echo off

SET EXPECT_OUTPUT=

FOR %%a IN (%*) DO (
  IF /I "%%a"=="-f"           SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="--foreground" SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="-h"           SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="--help"       SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="-t"           SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="--test"       SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="-v"           SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="--version"    SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="-w"           SET EXPECT_OUTPUT=YES
  IF /I "%%a"=="--wait"       SET EXPECT_OUTPUT=YES
)

IF "%EXPECT_OUTPUT%"=="YES" (
  "%~dp0\..\atom.exe" %*
) ELSE (
  "%~dp0\..\resources\app\apm\node_modules\atom-package-manager\bin\node.exe" "%~dp0\atom.js" %*
)

Add -t and --test to expected output args


SET bin_dir=%~dp0
SET TOP_DIR=%bin_dir%\..\..\
SET build_type=%1
SET build_dir=%~f2

IF "%build_type%" EQU "" SET build_type=Debug

IF "%build_dir%" EQU "" (
    CALL %bin_dir%\echoc.exe 4 please specify build_dir
    GOTO error
)

IF NOT EXIST %build_dir% (
    CALL %bin_dir%\echoc.exe 4 %build_dir% does not exist
    GOTO error
)

CALL %bin_dir%\echoc.exe 2 run the tests here ...

:: run dll-embedded unit tests
SET DSN_TEST_HOST=%DSN_ROOT:/=\%\bin\dsn.svchost.exe
IF EXIST "%build_dir%\bin\dsn.svchost\%build_type%\dsn.svchost.exe"  SET DSN_TEST_HOST=%build_dir%\bin\dsn.svchost\%build_type%\dsn.svchost.exe

FOR /D %%A IN (%build_dir%\test\*) DO (
    IF EXIST %%A\gtests (
        pushd %%A
        FOR /F %%I IN (%%A\gtests) DO (
            IF EXIST %%A (
                ECHO =========== %DSN_TEST_HOST% %%I ======================
                CALL %DSN_TEST_HOST% %%I
                IF ERRORLEVEL 1 popd && echo test %%I failed && goto error
            )
        )
        popd
    )
)

:: run e-e tests
FOR /D %%A IN (%build_dir%\bin\*) DO (
    IF EXIST %%A\test.cmd (
        pushd %%A
        ECHO ================= %%A\test.cmd ================================
        CALL test.cmd %TOP_DIR% %build_type% %build_dir%
        IF ERRORLEVEL 1 popd && echo test %%A failed && goto error
        popd
    )
)

goto exit

:error
    CALL %bin_dir%\echoc.exe 4  "Usage: run.cmd test build_type(Debug|Release|RelWithDebInfo|MinSizeRel) build_dir"
    exit -1

:exit
    exit /b 0

SET bin_dir=%~dp0
SET TOP_DIR=%bin_dir%\..\..\
SET build_type=%1
SET build_dir=%~f2

IF "%build_type%" EQU "" SET build_type=Debug

IF "%build_dir%" EQU "" (
    CALL %bin_dir%\echoc.exe 4 please specify build_dir
    GOTO error
)

IF NOT EXIST %build_dir% (
    CALL %bin_dir%\echoc.exe 4 %build_dir% does not exist
    GOTO error
)

CALL %bin_dir%\echoc.exe 2 run the tests here ...

:: set the path of built binaries
SET DSN_BUILD_DIR_IN_PATH=
@FOR %%P in ("%Path:;=";"%") DO @IF /I %%P=="%build_dir%\bin\%build_type%" SET DSN_BUILD_DIR_IN_PATH=true
IF NOT DEFINED DSN_BUILD_DIR_IN_PATH SET Path=%build_dir%\bin\%build_type%;%build_dir%\lib;%Path%
SET DSN_BUILD_DIR_IN_PATH=

:: run dll-embedded unit tests
SET DSN_TEST_HOST=%DSN_ROOT:/=\%\bin\dsn.svchost.exe
IF EXIST "%build_dir%\bin\dsn.svchost\%build_type%\dsn.svchost.exe"  SET DSN_TEST_HOST=%build_dir%\bin\dsn.svchost\%build_type%\dsn.svchost.exe

FOR /D %%A IN (%build_dir%\test\*) DO (
    IF EXIST %%A\gtests (
        pushd %%A
        FOR /F %%I IN (%%A\gtests) DO (
            IF EXIST %%A (
                ECHO =========== %DSN_TEST_HOST% %%I ======================
                CALL %DSN_TEST_HOST% %%I
                IF ERRORLEVEL 1 popd && echo test %%I failed && goto error
            )
        )
        popd
    )
)

:: run e-e tests
FOR /D %%A IN (%build_dir%\bin\*) DO (
    IF EXIST %%A\test.cmd (
        pushd %%A
        ECHO ================= %%A\test.cmd ================================
        CALL test.cmd %TOP_DIR% %build_type% %build_dir%
        IF ERRORLEVEL 1 popd && echo test %%A failed && goto error
        popd
    )
)

goto exit

:error
    CALL %bin_dir%\echoc.exe 4  "Usage: run.cmd test build_type(Debug|Release|RelWithDebInfo|MinSizeRel) build_dir"
    exit -1

:exit
    exit /b 0

Fix issue https://github.com/Microsoft/rDSN/issues/200 by setting the path of built binaries in %Path% environment variable.


@echo off

if [%1]==[] goto USAGE
goto MKVIRTUALENV

:USAGE
echo.
echo  Pass a name to create a new virtualenv
echo.
goto END

:MKVIRTUALENV
if not defined WORKON_HOME (
    set WORKON_HOME="%USERPROFILE%\Envs"
)

if defined VIRTUAL_ENV (
    call "%VIRTUAL_ENV%\Scripts\deactivate.bat"
)

if defined PYTHONHOME (
    goto HOMEOK
)
FOR /F "tokens=*" %%i in ('whereis.bat python.exe') do set PYTHONHOME=%%~dpi
SET PYTHONHOME=%PYTHONHOME:~0,-1%
:HOMEOK

call :GET_ENVNAME %*

SETLOCAL EnableDelayedExpansion

pushd "%WORKON_HOME%" 2>NUL && popd
@if errorlevel 1 (
    mkdir "%WORKON_HOME%"
)

pushd "%WORKON_HOME%\%ENVNAME%" 2>NUL && popd
@if not errorlevel 1 (
    echo.
    echo  virtualenv "%ENVNAME%" already exists
    echo.
    goto end
)

pushd "%WORKON_HOME%"
REM As of Python 2.7, calling virtualenv.exe causes a new window to open,
REM so call the script directly
REM virtualenv.exe %*
python.exe "%PYTHONHOME%\Scripts\virtualenv-script.py" %* 2>NUL
popd

REM In activate.bat, add VIRTUAL_ENV directories to PYTHONPATH and
REM set PYTHONHOME to the VIRTUAL_ENV.
REM This should be a change adopted by virtualenv.
>>"%WORKON_HOME%\%ENVNAME%\Scripts\activate.bat" (
    echo.
    echo.if defined _OLD_VIRTUAL_PYTHONPATH (
    echo.    set PYTHONPATH=%%_OLD_VIRTUAL_PYTHONPATH%%
    echo.    goto SKIPPYTHONPATH
    echo.^)
    echo.
    echo.set _OLD_VIRTUAL_PYTHONPATH=%%PYTHONPATH%%
    echo.
    echo.:SKIPPYTHONPATH
    echo.set PYTHONPATH=%%VIRTUAL_ENV%%\Scripts;%%VIRTUAL_ENV%%\Lib;%%VIRTUAL_ENV%%\Lib\site-packages;%%PYTHONPATH%%
    echo.
    echo.set PYTHONHOME=%%VIRTUAL_ENV%%
)

REM In deactivate.bat, reset PYTHONPATH to its former value
REM and unset VIRTUAL_ENV
>>"%WORKON_HOME%\%ENVNAME%\Scripts\deactivate.bat" (
    echo.
    echo.if defined _OLD_VIRTUAL_PYTHONPATH (
    echo.    set PYTHONPATH=%%_OLD_VIRTUAL_PYTHONPATH%%
    echo.^)
    echo.set VIRTUAL_ENV=
)

ENDLOCAL & call "%WORKON_HOME%\%ENVNAME%\Scripts\activate.bat"
echo.
goto END

:GET_ENVNAME
  set "ENVNAME=%~1"
  shift
  if not "%~1"=="" goto GET_ENVNAME
goto :eof

:END

@echo off

if [%1]==[] goto USAGE
goto MKVIRTUALENV

:USAGE
echo.
echo  Pass a name to create a new virtualenv
echo.
goto END

:MKVIRTUALENV
if not defined WORKON_HOME (
    set WORKON_HOME="%USERPROFILE%\Envs"
)

if defined VIRTUAL_ENV (
    call "%VIRTUAL_ENV%\Scripts\deactivate.bat"
)

if defined PYTHONHOME (
    goto HOMEOK
)
FOR /F "tokens=*" %%i in ('whereis.bat python.exe') do set PYTHONHOME=%%~dpi
SET PYTHONHOME=%PYTHONHOME:~0,-1%
:HOMEOK

call :GET_ENVNAME %*

SETLOCAL EnableDelayedExpansion

pushd "%WORKON_HOME%" 2>NUL && popd
@if errorlevel 1 (
    mkdir "%WORKON_HOME%"
)

pushd "%WORKON_HOME%\%ENVNAME%" 2>NUL && popd
@if not errorlevel 1 (
    echo.
    echo  virtualenv "%ENVNAME%" already exists
    echo.
    goto end
)

pushd "%WORKON_HOME%"
REM As of Python 2.7, calling virtualenv.exe causes a new window to open,
REM so call the script directly
REM virtualenv.exe %*
python.exe "%PYTHONHOME%\Scripts\virtualenv-script.py" %* 2>NUL
popd

REM In activate.bat, add VIRTUAL_ENV directories to PYTHONPATH and
REM set PYTHONHOME to the VIRTUAL_ENV.
REM This should be a change adopted by virtualenv.
>>"%WORKON_HOME%\%ENVNAME%\Scripts\activate.bat" (
    echo.
    echo.if defined _OLD_VIRTUAL_PYTHONPATH (
    echo.    set PYTHONPATH=%%_OLD_VIRTUAL_PYTHONPATH%%
    echo.    goto SKIPPYTHONPATH
    echo.^)
    echo.
    echo.set _OLD_VIRTUAL_PYTHONPATH=%%PYTHONPATH%%
    echo.
    echo.:SKIPPYTHONPATH
    echo.set PYTHONPATH=%%VIRTUAL_ENV%%\Scripts;%%VIRTUAL_ENV%%\Lib;%%VIRTUAL_ENV%%\Lib\site-packages;%%PYTHONPATH%%
    echo.
    echo.set PYTHONHOME=%%VIRTUAL_ENV%%
)

REM In deactivate.bat, reset PYTHONPATH to its former value
REM and unset VIRTUAL_ENV
>>"%WORKON_HOME%\%ENVNAME%\Scripts\deactivate.bat" (
    echo.
    echo.if defined _OLD_VIRTUAL_PYTHONPATH (
    echo.    set PYTHONPATH=%%_OLD_VIRTUAL_PYTHONPATH%%
    echo.^)
)

ENDLOCAL & call "%WORKON_HOME%\%ENVNAME%\Scripts\activate.bat"
echo.
goto END

:GET_ENVNAME
  set "ENVNAME=%~1"
  shift
  if not "%~1"=="" goto GET_ENVNAME
goto :eof

:END

Remove VIRTUAL_ENV unsetting, now that 1.9.x branch of virtualenv covers this


@echo off
rem ----------------------------------------------------------------------------
rem
rem This variable should be set to the directory where is installed ProActive
rem

IF NOT DEFINED PROACTIVE set PROACTIVE=%CD%\..\..

rem ----------------------------------------------------------------------------

if NOT DEFINED JAVA_HOME goto javahome
if "%JAVA_HOME%" == "" goto javahome

rem ----
rem Set up the classpath using classes dir or jar files
rem

IF DEFINED CLASSPATHEXT (
	SET CLASSPATH=%CLASSPATHEXT%
) ELSE (
	SET CLASSPATH=.
)

IF EXIST "%PROACTIVE%\classes" (
	SET CLASSPATH=%CLASSPATH%;%PROACTIVE%\classes\Core;%PROACTIVE%\classes\Extensions;%PROACTIVE%\classes\Extra;%PROACTIVE%\classes\Examples;%PROACTIVE%\classes\IC2D-old
	SET JARS=%PROACTIVE%\lib\
	FOR %%j IN (%PROACTIVE%\lib\*.jar) DO SET JARS=!JARS!;%%j
) ELSE (
	SET JARS=%PROACTIVE%\dist\lib\
	FOR %%j IN (%PROACTIVE%\dist\lib\*.jar) DO SET JARS=!JARS!;%%j
)

SET CLASSPATH=%CLASSPATH%;%JARS%
IF EXIST "%PROACTIVE%\ProActive_examples.jar" set CLASSPATH=%CLASSPATH%;%PROACTIVE%\ProActive_examples.jar

set JAVA_CMD="%JAVA_HOME%\bin\java.exe" -Djava.security.manager -Djava.security.policy="%PROACTIVE%\scripts\proactive.java.policy" -Dlog4j.configuration=file:"%PROACTIVE%\scripts\proactive-log4j"

rem Adding java tools to the path
SET OK=1
FOR /F "delims=;" %%i IN ("%PATH%") DO (
IF /I "%%i" == "%JAVA_HOME%\bin" SET OK=0
)
IF /I %OK%==1 SET PATH=%JAVA_HOME%\bin;%PATH%

goto end

:javahome
echo.
echo The enviroment variable JAVA_HOME must be set the current jdk distribution
echo installed on your computer.
echo Use
echo    set JAVA_HOME=<the directory where is the JDK>
goto end

:end

@echo off
rem ----------------------------------------------------------------------------
rem
rem This variable should be set to the directory where is installed ProActive
rem

IF NOT DEFINED PROACTIVE set PROACTIVE=%CD%\..\..

rem ----------------------------------------------------------------------------

if NOT DEFINED JAVA_HOME goto javahome
if "%JAVA_HOME%" == "" goto javahome

rem ----
rem Set up the classpath using classes dir or jar files
rem

IF DEFINED CLASSPATHEXT (
	SET CLASSPATH=%CLASSPATHEXT%
) ELSE (
	SET CLASSPATH=.
)

IF EXIST "%PROACTIVE%\classes" (
	SET CLASSPATH=%CLASSPATH%;%PROACTIVE%\classes\Core;%PROACTIVE%\classes\Extensions;%PROACTIVE%\classes\Extra;%PROACTIVE%\classes\Examples;%PROACTIVE%\classes\IC2D-old
	SET JARS=%PROACTIVE%\lib\
	FOR %%j IN ("%PROACTIVE%\lib\*.jar") DO SET JARS=!JARS!;%%j
) ELSE (
	SET JARS=%PROACTIVE%\dist\lib\
	FOR %%j IN ("%PROACTIVE%\dist\lib\*.jar") DO SET JARS=!JARS!;%%j
)

SET CLASSPATH=%CLASSPATH%;%JARS%
IF EXIST "%PROACTIVE%\ProActive_examples.jar" set CLASSPATH=%CLASSPATH%;%PROACTIVE%\ProActive_examples.jar

set JAVA_CMD="%JAVA_HOME%\bin\java.exe" -Djava.security.manager -Djava.security.policy="%PROACTIVE%\scripts\proactive.java.policy" -Dlog4j.configuration=file:"%PROACTIVE%\scripts\proactive-log4j"

rem Adding java tools to the path
SET OK=1
FOR /F "delims=;" %%i IN ("%PATH%") DO (
IF /I "%%i" == "%JAVA_HOME%\bin" SET OK=0
)
IF /I %OK%==1 SET PATH=%JAVA_HOME%\bin;%PATH%

goto end

:javahome
echo.
echo The enviroment variable JAVA_HOME must be set the current jdk distribution
echo installed on your computer.
echo Use
echo    set JAVA_HOME=<the directory where is the JDK>
goto end

:end

fix for PROACTIVE-188

fix for PROACTIVE-188

git-svn-id: 9146c88ff6d39b48099bf954d15d68f687b3fa69@7485 28e8926c-6b08-0410-baaa-805c5e19b8d6


@echo off

:CountLines
setlocal
cd ..
set /a totalNumLines = 0
for /r %1 %%F in (*.java *.html *.hpp *.cs *.c) do (
  echo "%%F"
  for /f %%N in ('find /v /c "" ^<"%%F"') do set /a totalNumLines+=%%N
)

echo Total LOC (Java) = %totalNumLines%
timeout 15 > NUL

Add Java line count script for windows

Add Java line count script for windows


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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

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

goto :EOF

:error
exit /b 1

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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

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

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

goto :EOF

:error
exit /b 1

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


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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

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

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

goto :EOF

:error
exit /b 1

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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

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

goto :EOF

:error
exit /b 1

use latest npm on Windows (#203)

chore: use latest npm on Windows (#203)


pip install --upgrade wxPython
pip install -r requirements.txt

pyinstaller --onefile --windowed --version-file=build/version.txt --icon=build/icons/wail_blue.ico bundledApps/WAIL.py

::Windows shell (CMD.exe)
move /Y ".\dist\WAIL.exe" ".\WAIL.exe"

::Unix shell (e.g., from Git Bash on Windows)
::mv "./dist/WAIL.exe" "./WAIL.exe"

Install dependencies on Windows

Install dependencies on Windows


@cd "%~dp0"
@cd ..\..\
@for %%I in ("%cd%") do @set mesa=%%~sI
@set mesa=%mesa%\
@set abi=x86
@set /p x64=Do you want to build for x64? (y/n) Otherwise build for x86:
@if /I "%x64%"=="y" set abi=x64
@set longabi=%abi%
@if %abi%==x64 set longabi=x86_64
@set altabi=i686
@if %abi%==x64 set altabi=%longabi%
@set minabi=32
@if %abi%==x64 set minabi=64
@set vsenv="%ProgramFiles%
@if NOT "%ProgramW6432%"=="" set vsenv=%vsenv% (x86)
@set vsenv15=%vsenv%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars%minabi%.bat"
@set vsenv14="%VS140COMNTOOLS%..\..\VC\bin\vcvars%minabi%.bat"
@set gcc=%mesa%mingw-w64\%abi%\mingw%minabi%\bin
@set vsenvloaded=0
@set dxtnbuilt=0
@set toolset=14
@if EXIST %vsenv15% set toolset=15
@if EXIST toolset-%abi%.ini set /p toolset=<toolset-%abi%.ini
@set vsenv=%vsenv14%
@if %toolset%==15 set vsenv=%vsenv15%
@where /q cmake.exe
@IF ERRORLEVEL 1 set PATH=%mesa%cmake\bin\;%PATH%
@set ERRORLEVEL=0
@where /q python.exe
@IF ERRORLEVEL 1 set PATH=%mesa%Python\;%mesa%Python\Scripts\;%PATH%
@set ERRORLEVEL=0
@set PATH=%mesa%flexbison\;%PATH%
@python -m pip install -U mako
@python -m pip freeze > requirements.txt
@python -m pip install -r requirements.txt --upgrade
@del requirements.txt
@echo.

:build_llvm
@set /p buildllvm=Begin LLVM build. Only needs to run once for each ABI and version. Proceed (y/n):
@if /I NOT "%buildllvm%"=="y" GOTO build_dxtn
@echo.
@cd %mesa%llvm
@if EXIST %abi% RD /S /Q %abi%
@if EXIST cmake-%abi% RD /S /Q cmake-%abi%
@md cmake-%abi%
@cd cmake-%abi%
@set toolchain=Visual Studio 14
@set toolset=14
@if EXIST %vsenv15% set toolchain=Visual Studio 15 2017
@if EXIST %vsenv15% set toolset=15
@set ninja=n
@set oldtoolset=n
@if EXIST %mesa%ninja set ninja=1
@if EXIST %vsenv15% set ninja=%ninja%2
@if %ninja%==12 set /p oldtoolset=Build with MSVC 2015 backward compatibility toolset, alternative solution for LLVM 3.9.1 build with Visual Studio 2017 (y/n):
@if %ninja%==12 echo.
@if /I "%oldtoolset%"=="y" set ninja=y
@if /I "%oldtoolset%"=="y" set toolset=14
@if %ninja%==12 set ninja=2
@if %ninja%==1 set ninja=2
@if %ninja%==2 set /p ninja=Use Ninja build system instead of MsBuild, there is no requirement to do this with the primary toolset though (y/n):
@echo.
@if /I "%ninja%"=="y" set toolchain=Ninja
@if "%toolchain%"=="Ninja" set PATH=%mesa%ninja\;%PATH%
@set vsenv=%vsenv14%
@if %toolset%==15 set vsenv=%vsenv15%
@call %vsenv%
@set vsenvloaded=1
@echo.
@set modtoolchainabi=0
@if NOT "%toolchain%"=="Ninja" set modtoolchainabi=1
@if %abi%==x64 set modtoolchainabi=%modtoolchainabi%2
@if %modtoolchainabi%==12 set toolchain=%toolchain% Win64
@cmake -G "%toolchain%" -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_CRT_RELEASE=MT -DLLVM_ENABLE_RTTI=1 -DLLVM_ENABLE_TERMINFO=OFF -DCMAKE_INSTALL_PREFIX=../%abi% ..
@echo.
@pause
@echo.
@if NOT "%toolchain%"=="Ninja" cmake --build . --config Release --target install
@if "%toolchain%"=="Ninja" ninja install
@echo.
@echo %toolset% > %mesa%toolset-%abi%.ini

:build_dxtn
@if NOT EXIST %gcc% GOTO build_mesa
@if NOT EXIST %mesa%dxtn GOTO build_mesa
@set /p builddxtn=Do you want to build S3 texture compression library? (y/n):
@if /i NOT "%builddxtn%"=="y" GOTO build_mesa
@set PATH=%gcc%\;%PATH%
@cd %mesa%dxtn
@echo.
@if EXIST %abi% RD /S /Q %abi%
@MD %abi%
@set dxtn=gcc -shared -m%minabi% -v *.c *.h -I ..\mesa\include -Wl,--dll,--dynamicbase,--enable-auto-image-base,--nxcompat -o %abi%\dxtn.dll
@%dxtn%
@echo.
@set dxtnbuilt=1

:build_mesa
@set /p buildmesa=Begin mesa build. Proceed (y/n):
@if /i NOT "%buildmesa%"=="y" GOTO exit
@echo.
@set LLVM=%mesa%llvm\%abi%
@if NOT EXIST %LLVM% (
@echo Could not find LLVM, aborting mesa build.
@echo.
@pause
@GOTO exit
)
@cd %mesa%mesa
@set openswr=n
@set sconscmd=python %mesa%Python\Scripts\scons.py build=release platform=windows machine=%longabi% libgl-gdi
@set /p openswr=Do you want to build OpenSWR drivers? (y=yes):
@echo.
@if /I "%openswr%"=="y" set sconscmd=%sconscmd% swr=1
@set /p osmesa=Do you want to build off-screen rendering drivers (y/n):
@echo.
@if /I "%osmesa%"=="y" set sconscmd=%sconscmd% osmesa
@set /p graw=Do you want to build graw library (y/n):
@echo.
@if /I "%graw%"=="y" set sconscmd=%sconscmd% graw-gdi
@GOTO build_with_vs

:build_with_mingw
@set mingw=n
@set mingwtest=0
@if EXIST %gcc% set mingwtest=1
@set msys2=%mesa%msys64\msys2_shell.cmd
@if EXIST %msys2% set mingwtest=%mingwtest%2
@if %mingwtest%==12 set /p mingw=Do you want to build with MinGW-W64 instead of Visual Studio (y=yes):
@if %dxtnbuilt%==0 set PATH=%gcc%\;%PATH%
@if /I "%mingw%"=="y" set sconscmd=%sconscmd% toolchain=crossmingw
@if /I "%mingw%"=="y" copy %gcc%\%altabi%-w64-mingw32-gcc-ar.exe %gcc%\%altabi%-w64-mingw32-ar.exe
@if /I "%mingw%"=="y" copy %gcc%\%altabi%-w64-mingw32-gcc-ranlib.exe %gcc%\%altabi%-w64-mingw32-ranlib.exe
@if /I "%mingw%"=="y" call "%msys2%" -use-full-path
@if /I "%mingw%"=="y" (
pacman -Syu
pacman -S python2
wget https://bootstrap.pypa.io/get-pip.py
python2 get-pip.py
pip install -U mako
pip install -U scons
pip freeze > requirements.txt
pip install -r requirements.txt --upgrade
cd $mesa
cd mesa
)

:build_with_vs
@set cleanbuild=n
@if EXIST build\windows-%longabi% set /p cleanbuild=Do you want to clean build (y/n):
@if EXIST build\windows-%longabi% echo.
@if /I "%cleanbuild%"=="y" RD /S /Q build\windows-%longabi%
@if %vsenvloaded%==0 (
@call %vsenv%
@echo.
)

:build_mesa_exec
@%sconscmd%
@echo.
@pause
@cd %mesa%
@if NOT EXIST mesa-dist-win MD mesa-dist-win
@cd mesa-dist-win
@if NOT EXIST bin MD bin
@cd bin
@if EXIST %abi% RD /S /Q %abi%
@MD %abi%
@cd %abi%
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\libgl-gdi\opengl32.dll opengl32.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\drivers\swr\swrAVX.dll swrAVX.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\drivers\swr\swrAVX2.dll swrAVX2.dll
@copy %mesa%mesa\build\windows-%longabi%\mesa\drivers\osmesa\osmesa.dll osmesa-swrast.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\osmesa\osmesa.dll osmesa-gallium.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\graw-gdi\graw.dll graw.dll
@copy %mesa%dxtn\%abi%\dxtn.dll dxtn.dll
@echo.
@pause

:exit
exit

@cd "%~dp0"
@cd ..\..\
@for %%I in ("%cd%") do @set mesa=%%~sI
@set mesa=%mesa%\
@where /q cmake.exe
@IF ERRORLEVEL 1 set PATH=%mesa%cmake\bin\;%PATH%
@set ERRORLEVEL=0
@where /q python.exe
@IF ERRORLEVEL 1 set PATH=%mesa%Python\;%mesa%Python\Scripts\;%PATH%
@set ERRORLEVEL=0
@python -m pip install -U mako
@python -m pip freeze > requirements.txt
@python -m pip install -r requirements.txt --upgrade
@del requirements.txt
@echo.
@set abi=x86
@set /p x64=Do you want to build for x64? (y/n) Otherwise build for x86:
@if /I "%x64%"=="y" set abi=x64
@set longabi=%abi%
@if %abi%==x64 set longabi=x86_64
@set altabi=i686
@if %abi%==x64 set altabi=%longabi%
@set minabi=32
@if %abi%==x64 set minabi=64
@set vsenv="%ProgramFiles%
@if NOT "%ProgramW6432%"=="" set vsenv=%vsenv% (x86)
@set vsenv15=%vsenv%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars%minabi%.bat"
@set vsenv14="%VS140COMNTOOLS%..\..\VC\bin\vcvars%minabi%.bat"
@set gcc=%mesa%mingw-w64\%abi%\mingw%minabi%\bin
@set vsenvloaded=0
@set dxtnbuilt=0
@set toolset=14
@if EXIST %vsenv15% set toolset=15
@if EXIST toolset-%abi%.ini set /p toolset=<toolset-%abi%.ini
@set vsenv=%vsenv14%
@if %toolset%==15 set vsenv=%vsenv15%
@set PATH=%mesa%flexbison\;%PATH%

:build_llvm
@set /p buildllvm=Begin LLVM build. Only needs to run once for each ABI and version. Proceed (y/n):
@if /I NOT "%buildllvm%"=="y" GOTO build_dxtn
@echo.
@cd %mesa%llvm
@if EXIST %abi% RD /S /Q %abi%
@if EXIST cmake-%abi% RD /S /Q cmake-%abi%
@md cmake-%abi%
@cd cmake-%abi%
@set toolchain=Visual Studio 14
@set toolset=14
@if EXIST %vsenv15% set toolchain=Visual Studio 15 2017
@if EXIST %vsenv15% set toolset=15
@set ninja=n
@set oldtoolset=n
@if EXIST %mesa%ninja set ninja=1
@if EXIST %vsenv15% set ninja=%ninja%2
@if %ninja%==12 set /p oldtoolset=Build with MSVC 2015 backward compatibility toolset, alternative solution for LLVM 3.9.1 build with Visual Studio 2017 (y/n):
@if %ninja%==12 echo.
@if /I "%oldtoolset%"=="y" set ninja=y
@if /I "%oldtoolset%"=="y" set toolset=14
@if %ninja%==12 set ninja=2
@if %ninja%==1 set ninja=2
@if %ninja%==2 set /p ninja=Use Ninja build system instead of MsBuild, there is no requirement to do this with the primary toolset though (y/n):
@echo.
@if /I "%ninja%"=="y" set toolchain=Ninja
@if "%toolchain%"=="Ninja" set PATH=%mesa%ninja\;%PATH%
@set vsenv=%vsenv14%
@if %toolset%==15 set vsenv=%vsenv15%
@call %vsenv%
@set vsenvloaded=1
@echo.
@set modtoolchainabi=0
@if NOT "%toolchain%"=="Ninja" set modtoolchainabi=1
@if %abi%==x64 set modtoolchainabi=%modtoolchainabi%2
@if %modtoolchainabi%==12 set toolchain=%toolchain% Win64
@cmake -G "%toolchain%" -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_CRT_RELEASE=MT -DLLVM_ENABLE_RTTI=1 -DLLVM_ENABLE_TERMINFO=OFF -DCMAKE_INSTALL_PREFIX=../%abi% ..
@echo.
@pause
@echo.
@if NOT "%toolchain%"=="Ninja" cmake --build . --config Release --target install
@if "%toolchain%"=="Ninja" ninja install
@echo.
@echo %toolset% > %mesa%toolset-%abi%.ini

:build_dxtn
@if NOT EXIST %gcc% GOTO build_mesa
@if NOT EXIST %mesa%dxtn GOTO build_mesa
@set /p builddxtn=Do you want to build S3 texture compression library? (y/n):
@if /i NOT "%builddxtn%"=="y" GOTO build_mesa
@set PATH=%gcc%\;%PATH%
@cd %mesa%dxtn
@echo.
@if EXIST %abi% RD /S /Q %abi%
@MD %abi%
@set dxtn=gcc -shared -m%minabi% -v *.c *.h -I ..\mesa\include -Wl,--dll,--dynamicbase,--enable-auto-image-base,--nxcompat -o %abi%\dxtn.dll
@%dxtn%
@echo.
@set dxtnbuilt=1

:build_mesa
@set /p buildmesa=Begin mesa build. Proceed (y/n):
@if /i NOT "%buildmesa%"=="y" GOTO exit
@echo.
@set LLVM=%mesa%llvm\%abi%
@if NOT EXIST %LLVM% (
@echo Could not find LLVM, aborting mesa build.
@echo.
@pause
@GOTO exit
)
@cd %mesa%mesa
@set openswr=n
@set sconscmd=python %mesa%Python\Scripts\scons.py build=release platform=windows machine=%longabi% libgl-gdi
@set /p openswr=Do you want to build OpenSWR drivers? (y=yes):
@echo.
@if /I "%openswr%"=="y" set sconscmd=%sconscmd% swr=1
@set /p osmesa=Do you want to build off-screen rendering drivers (y/n):
@echo.
@if /I "%osmesa%"=="y" set sconscmd=%sconscmd% osmesa
@set /p graw=Do you want to build graw library (y/n):
@echo.
@if /I "%graw%"=="y" set sconscmd=%sconscmd% graw-gdi
@GOTO build_with_vs

:build_with_mingw
@set mingw=n
@set mingwtest=0
@if EXIST %gcc% set mingwtest=1
@set msys2=%mesa%msys64\msys2_shell.cmd
@if EXIST %msys2% set mingwtest=%mingwtest%2
@if %mingwtest%==12 set /p mingw=Do you want to build with MinGW-W64 instead of Visual Studio (y=yes):
@if %dxtnbuilt%==0 set PATH=%gcc%\;%PATH%
@if /I "%mingw%"=="y" set sconscmd=%sconscmd% toolchain=crossmingw
@if /I "%mingw%"=="y" copy %gcc%\%altabi%-w64-mingw32-gcc-ar.exe %gcc%\%altabi%-w64-mingw32-ar.exe
@if /I "%mingw%"=="y" copy %gcc%\%altabi%-w64-mingw32-gcc-ranlib.exe %gcc%\%altabi%-w64-mingw32-ranlib.exe
@if /I "%mingw%"=="y" call "%msys2%" -use-full-path
@if /I "%mingw%"=="y" (
pacman -Syu
pacman -S python2
wget https://bootstrap.pypa.io/get-pip.py
python2 get-pip.py
pip install -U mako
pip install -U scons
pip freeze > requirements.txt
pip install -r requirements.txt --upgrade
cd $mesa
cd mesa
)

:build_with_vs
@set cleanbuild=n
@if EXIST build\windows-%longabi% set /p cleanbuild=Do you want to clean build (y/n):
@if EXIST build\windows-%longabi% echo.
@if /I "%cleanbuild%"=="y" RD /S /Q build\windows-%longabi%
@if %vsenvloaded%==0 (
@call %vsenv%
@echo.
)

:build_mesa_exec
@%sconscmd%
@echo.
@pause
@cd %mesa%
@if NOT EXIST mesa-dist-win MD mesa-dist-win
@cd mesa-dist-win
@if NOT EXIST bin MD bin
@cd bin
@if EXIST %abi% RD /S /Q %abi%
@MD %abi%
@cd %abi%
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\libgl-gdi\opengl32.dll opengl32.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\drivers\swr\swrAVX.dll swrAVX.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\drivers\swr\swrAVX2.dll swrAVX2.dll
@copy %mesa%mesa\build\windows-%longabi%\mesa\drivers\osmesa\osmesa.dll osmesa-swrast.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\osmesa\osmesa.dll osmesa-gallium.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\graw-gdi\graw.dll graw.dll
@copy %mesa%dxtn\%abi%\dxtn.dll dxtn.dll
@echo.
@pause

:exit
exit

Update python even before asking for ABI While at it look for cmake too since we only need one copy of them to build for both ABI.


bumpversion release --tag
bumpversion patch --no-tag --message "master is {new_version}"

bump2version release --tag
bump2version patch --no-tag --message "master is {new_version}"

Update bump.bat to use `bump2version`

Update bump.bat to use `bump2version`


set QL_DIR=C:\Miniconda\
set INCLUDE=C:\Miniconda\include

cd Python
python setup.py build
python setup.py test
python setup.py install

set QL_DIR=C:\Miniconda\

cd Python
python setup.py build
python setup.py test
python setup.py install

remove boost include

remove boost include


update electron version

update electron version


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

%~dp0kafka-run-class.bat kafka.admin.ConfigCommand %*

add kafka-configs.bat for Windows boxes

KAFKA-4684: add kafka-configs.bat for Windows boxes

Add kafka-configs.bat script for Windows.

Author: huxi <huxi@zhenrongbao.com>

Reviewers: Guozhang Wang, Vahid Hashemian

Closes #2419 from amethystic/kafka4684_offer_kafkaconfigs_script


git clean -fx -d
mkdir Artifacts
.\.nuget\nuget restore Mapsui.sln

git clean -fx -d -e .vs
mkdir Artifacts
.\.nuget\nuget restore Mapsui.sln

Exclude remove of .vs folder in NugetRestore.cmd


@ECHO OFF
ECHO Checking if Vagrant and VirtualBox are installed...
vagrant -v > vagrant_version 2>&1
set vagrant=%errorlevel%

IF %vagrant% == 0 (
TYPE vagrant_version
) ELSE (
ECHO Vagrant is not installed
)
del vagrant_version

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" -v > virtualbox_version 2>&1
set virtualbox=%errorlevel%

IF %virtualbox% == 0 (
	set vara=VirtualBox Version
	set /p varb= < virtualbox_version
	set newvar=%vara%%varb%
	ECHO %newvar%
) ELSE (
	ECHO Virtualbox is not installed
)
del virtualbox_version

IF %vagrant% == 0 (
	IF %virtualbox% == 0 (
		XCOPY ..\cli\target\robot.jar . /-Y > NUL 2>&1
		vagrant up
		ECHO Starting tests...
		vagrant ssh -c "sh /vagrant/wrap_run_tests.sh"
		REM vagrant destroy -f
		ECHO =====TEST RESULTS=====
		TYPE .\target\test_results.txt
		ECHO Tests complete...
		findstr FAILED .\target\test_results.txt
		set found=%errorlevel%
		IF "%found%" == "0" (
			ECHO Tests Passed
		) ELSE (
		 	goto :EXIT_FAIL_TESTS
		)
	) ELSE (
		ECHO [WARNING]Tests cannot be run in this environment...nothing will be built
	)
) ELSE (
	ECHO [WARNING]Tests cannot be run in this environment...nothing will be built
)

:EXIT_SUCCESS
EXIT /B 0

:EXIT_FAIL_TESTS
ECHO Tests failed...Failing Build
EXIT /B 2

@ECHO OFF
ECHO Checking if Vagrant and VirtualBox are installed...
vagrant -v > vagrant_version 2>&1
set vagrant=%errorlevel%

IF %vagrant% == 0 (
TYPE vagrant_version
) ELSE (
ECHO Vagrant is not installed
)
del vagrant_version

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" -v > virtualbox_version 2>&1
set virtualbox=%errorlevel%

IF %virtualbox% == 0 (
	set vara=VirtualBox Version
	set /p varb= < virtualbox_version
	set newvar=%vara%%varb%
	ECHO %newvar%
) ELSE (
	ECHO Virtualbox is not installed
)
del virtualbox_version

IF %vagrant% == 0 (
	IF %virtualbox% == 0 (
		XCOPY ..\cli\target\robot.jar . /-Y > NUL 2>&1
		vagrant up
		ECHO Starting tests...
		vagrant ssh -c "sh /vagrant/wrap_run_tests.sh"
		REM vagrant destroy -f
		ECHO =====TEST RESULTS=====
		TYPE .\target\test_results.txt
		ECHO Tests complete...
		findstr FAILED .\target\test_results.txt
		set found=%errorlevel%
		IF "%found%" == "0" (
			ECHO Tests Passed
		) ELSE (
		 	goto :EXIT_FAIL_TESTS
		)
	) ELSE (
		ECHO [WARNING]Tests cannot be run in this environment...nothing will be built
	)
) ELSE (
	ECHO [WARNING]Tests cannot be run in this environment...nothing will be built
)

:EXIT_SUCCESS
EXIT /B 0

:EXIT_FAIL_TESTS
ECHO Tests failed...Failing Build
EXIT /B 1

update exit error code on test.bat

update exit error code on test.bat


cd runtime-testsuite
mvn -Dparallel=classes -DthreadCount=4 -Dtest=javascript.** test
cd ..

Update run-tests-javascript.cmd

Update run-tests-javascript.cmd


@echo off

echo "----- start clean -----"
pyinstaller cli.py --clean --noconfirm
echo "----- complete clean -----"

echo "----- start build -----"
pyinstaller cli.py --onefile --name sqlitebiter_win_x64 --noconfirm
echo "----- complete build -----"

echo "----- start compress -----"
set BIN_PATH=dist/sqlitebiter_win_x64
powershell compress-archive -Force %BIN_PATH%.exe %BIN_PATH%.zip
echo "----- complete compress -----"

pause

@echo off

set BIN_NAME=sqlitebiter

echo "----- start clean -----"
pyinstaller cli.py --clean --noconfirm
echo "----- complete clean -----"

echo "----- start build -----"
pyinstaller cli.py --onefile --name %BIN_NAME% --noconfirm
echo "----- complete build -----"

echo "----- start compress -----"
set DIST_DIR_NAME=dist
set BIN_PATH=%DIST_DIR_NAME%/%BIN_NAME%
set ARCHIVE_PATH=%DIST_DIR_NAME%/%BIN_NAME%_win_x64

powershell compress-archive -Force %BIN_PATH%.exe %ARCHIVE_PATH%.zip
echo "----- complete compress -----"

pause

Update packaging

Update packaging


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

:: Turn this on to debug @echo on

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.3
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

SET DEPLOYMENT_SOURCE=%DEPLOYMENT_SOURCE%\AllReadyApp

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

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

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

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

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
IF NOT DEFINED DEPLOYMENT_TEMP (
  SET DEPLOYMENT_TEMP=%temp%\___deployTemp%random%
  SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
)

IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (
  IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
  mkdir "%DEPLOYMENT_TEMP%"
)

IF DEFINED MSBUILD_PATH goto MsbuildPathDefined
SET MSBUILD_PATH=%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe
:MsbuildPathDefined
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

echo Custom Deployment script for combined csproj and xproj deployment.

:: Remove wwwroot if deploying to default location
IF "%DEPLOYMENT_TARGET%" == "%WEBROOT_PATH%" (
    FOR /F %%i IN ("%DEPLOYMENT_TARGET%") DO IF "%%~nxi"=="wwwroot" (
    SET DEPLOYMENT_TARGET=%%~dpi
    )
)

:: Remove trailing slash if present
IF "%DEPLOYMENT_TARGET:~-1%"=="\" (
    SET DEPLOYMENT_TARGET=%DEPLOYMENT_TARGET:~0,-1%
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

echo Handling ASP.NET Core Web Application deployment.

:: 1. Restore nuget packages
call :ExecuteCmd nuget.exe restore -packagesavemode nuspec
IF !ERRORLEVEL! NEQ 0 goto error

:: 2. Build and publish
:: 4. Run Our Custom build steps:
call :ExecuteCmd PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "(Get-Content AllReadyApp\Web-App\AllReady\version.json).replace('GITVERSION', (git rev-parse --short HEAD)) | Set-Content AllReadyApp\Web-App\AllReady\version.json"
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AllReady.Models\AllReady.Models.csproj"
IF !ERRORLEVEL! NEQ 0 goto error
call dotnet build "%DEPLOYMENT_SOURCE%\wrap\AllReady.Models\project.json"
IF !ERRORLEVEL! NEQ 0 goto error
call dotnet build "%DEPLOYMENT_SOURCE%\Web-App\AllReady\project.json"
IF !ERRORLEVEL! NEQ 0 goto error
call dotnet build "%DEPLOYMENT_SOURCE%\Web-App\AllReady.UnitTest\project.json"
IF !ERRORLEVEL! NEQ 0 goto error
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\NotificationsProcessor\NotificationsProcessor.csproj"

call :ExecuteCmd dotnet publish "{PROJECT_JSON}" --output "%DEPLOYMENT_TEMP%" --configuration Release
IF !ERRORLEVEL! NEQ 0 goto error

:: 4.2 Xcopy the webjobs:
:: Note this uses debug, and I can't find how to read the
:: build config.

mkdir "%DEPLOYMENT_TEMP%\wwwroot\app_data\jobs\continuous\notificationsprocessor\"

call xcopy /S "%DEPLOYMENT_SOURCE%\NotificationsProcessor\bin\debug" "%DEPLOYMENT_TEMP%\wwwroot\app_data\jobs\continuous\notificationsprocessor\"

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: Post deployment stub
IF DEFINED POST_DEPLOYMENT_ACTION call "%POST_DEPLOYMENT_ACTION%"
IF !ERRORLEVEL! NEQ 0 goto error

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.7
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
IF NOT DEFINED DEPLOYMENT_TEMP (
  SET DEPLOYMENT_TEMP=%temp%\___deployTemp%random%
  SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
)

IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (
  IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
  mkdir "%DEPLOYMENT_TEMP%"
)

IF DEFINED MSBUILD_PATH goto MsbuildPathDefined
SET MSBUILD_PATH=%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe
:MsbuildPathDefined
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

echo Handling ASP.NET Core Web Application deployment.

:: 1. Restore nuget packages
echo Restoring nuget packages for csproj projects (NotificationsProcessor)
call :ExecuteCmd nuget.exe restore "%DEPLOYMENT_SOURCE%\AllReadyApp\NotificationsProcessor\packages.config" -SolutionDirectory "%DEPLOYMENT_SOURCE%\AllReadyApp" -source https://www.nuget.org/api/v2/
IF !ERRORLEVEL! NEQ 0 goto error

echo Restoring nuget packages for all project.json projects
call :ExecuteCmd nuget.exe restore -packagesavemode nuspec
IF !ERRORLEVEL! NEQ 0 goto error

:: 2a. Build
echo Storing Git Version Info for Runtime Display
call :ExecuteCmd PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "(Get-Content AllReadyApp\Web-App\AllReady\version.json).replace('GITVERSION', (git rev-parse --short HEAD)) | Set-Content AllReadyApp\Web-App\AllReady\version.json"

echo Building AllReady.Models Project (csproj)
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AllReadyApp\AllReady.Models\AllReady.Models.csproj" /p:Configuration=Debug
IF !ERRORLEVEL! NEQ 0 goto error

echo Building AllReady.Models Project (project.json)
call :ExecuteCmd dotnet build "%DEPLOYMENT_SOURCE%\AllReadyApp\wrap\AllReady.Models\project.json" --configuration Debug
IF !ERRORLEVEL! NEQ 0 goto error

echo Not Building AllReady Project (it gets built with publish command)

echo Building NotificationsProcessor Project (csproj)
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AllReadyApp\NotificationsProcessor\NotificationsProcessor.csproj" /p:Configuration=Debug
IF !ERRORLEVEL! NEQ 0 goto error

:: 2b. Publish AllReady
echo Publishing Allready Project (project.json) which includes building it
call :ExecuteCmd dotnet publish "%DEPLOYMENT_SOURCE%\AllReadyApp\Web-App\AllReady" --output "%DEPLOYMENT_TEMP%" --configuration Debug
IF !ERRORLEVEL! NEQ 0 goto error

:: 2c. Publish WebJobs (NotificationsProcessor)
echo Publishing NotificationsProcessor WebJob
call :ExecuteCmd mkdir "%DEPLOYMENT_TEMP%\app_data\jobs\continuous\notificationsprocessor\"
call :ExecuteCmd xcopy /S "%DEPLOYMENT_SOURCE%\AllReadyApp\NotificationsProcessor\bin\debug" "%DEPLOYMENT_TEMP%\app_data\jobs\continuous\notificationsprocessor\"

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

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

update deploy.cmd for RTM transition

update deploy.cmd for RTM transition


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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.6
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
IF NOT DEFINED DEPLOYMENT_TEMP (
  SET DEPLOYMENT_TEMP=%temp%\___deployTemp%random%
  SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
)

IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (
  IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
  mkdir "%DEPLOYMENT_TEMP%"
)

IF DEFINED MSBUILD_PATH goto MsbuildPathDefined
SET MSBUILD_PATH=%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe
:MsbuildPathDefined

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

echo Handling backend WebApi project.

:: 1. Restore NuGet packages
IF /I "AzureFunctions.sln" NEQ "" (
  call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\AzureFunctions.sln"
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 2. Build to the temporary path
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AzureFunctions\AzureFunctions.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="%DEPLOYMENT_TEMP%";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="%DEPLOYMENT_SOURCE%\.\\" %SCM_BUILD_ARGS%
) ELSE (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AzureFunctions\AzureFunctions.csproj" /nologo /verbosity:m /t:Build /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="%DEPLOYMENT_SOURCE%\.\\" %SCM_BUILD_ARGS%
)

IF !ERRORLEVEL! NEQ 0 goto error

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

echo Handling frontend Angular2 project.

:: 4. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd ROBOCOPY "%DEPLOYMENT_SOURCE%\AzureFunctions.Client" -t "%DEPLOYMENT_TARGET%" /E /IS
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 5. Install npm packages
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  pushd "%DEPLOYMENT_TARGET%"

  call :ExecuteCmd npm install
  IF !ERRORLEVEL! NEQ 0 (
    call :ExecuteCmd npm install
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  call :ExecuteCmd npm run jspm:i
  IF !ERRORLEVEL! NEQ 0 (
    call :ExecuteCmd npm run jspm:i
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  call :ExecuteCmd npm run typings install
  IF !ERRORLEVEL! NEQ 0 goto error

  call :ExecuteCmd gulp
  IF !ERRORLEVEL! NEQ 0 goto error

  call :ExecuteCmd npm run tsc
  IF !ERRORLEVEL! NEQ 0 goto error

  call :ExecuteCmd npm run jspm:bundle
  IF !ERRORLEVEL! NEQ 0 goto error

  ::call :ExecuteCmd npm run uglifyjs
  ::IF !ERRORLEVEL! NEQ 0 goto error

  popd
)

:: 7. Install bower
IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
  pushd "%DEPLOYMENT_TARGET%"

  call :ExecuteCmd bower install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 8. Copy templates-update webjob
SET WEBJOB_PATH=%HOME%\site\wwwroot\App_Data\jobs\triggered\templates-update
IF NOT EXIST "%WEBJOB_PATH%" (
  mkdir "%WEBJOB_PATH%"
)

copy "%DEPLOYMENT_SOURCE%\WebJobs\templates-update\templates-update.cmd" "%WEBJOB_PATH%"
copy "%DEPLOYMENT_SOURCE%\WebJobs\templates-update\settings.job" "%WEBJOB_PATH%"

:: 9. update build.txt
call :ExecuteCmd echo %SCM_COMMIT_ID% > %DEPLOYMENT_TARGET%\build.txt
IF !ERRORLEVEL! NEQ 0 (
  call :ExecuteCmd echo %SCM_COMMIT_ID% > %DEPLOYMENT_TARGET%\build.txt
  IF !ERRORLEVEL! NEQ 0 goto error
)

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.6
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
IF NOT DEFINED DEPLOYMENT_TEMP (
  SET DEPLOYMENT_TEMP=%temp%\___deployTemp%random%
  SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
)

IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (
  IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
  mkdir "%DEPLOYMENT_TEMP%"
)

IF DEFINED MSBUILD_PATH goto MsbuildPathDefined
SET MSBUILD_PATH=%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe
:MsbuildPathDefined

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

echo Handling backend WebApi project.

:: 1. Restore NuGet packages
IF /I "AzureFunctions.sln" NEQ "" (
  call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\AzureFunctions.sln"
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 2. Build to the temporary path
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AzureFunctions\AzureFunctions.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="%DEPLOYMENT_TEMP%";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="%DEPLOYMENT_SOURCE%\.\\" %SCM_BUILD_ARGS%
) ELSE (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AzureFunctions\AzureFunctions.csproj" /nologo /verbosity:m /t:Build /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="%DEPLOYMENT_SOURCE%\.\\" %SCM_BUILD_ARGS%
)

IF !ERRORLEVEL! NEQ 0 goto error

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

echo Handling frontend Angular2 project.

:: 4. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd ROBOCOPY "%DEPLOYMENT_SOURCE%\AzureFunctions.Client" "%DEPLOYMENT_TARGET%" /E /IS
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 5. Install npm packages
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  pushd "%DEPLOYMENT_TARGET%"

  call :ExecuteCmd npm install
  IF !ERRORLEVEL! NEQ 0 (
    call :ExecuteCmd npm install
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  call :ExecuteCmd npm run jspm:i
  IF !ERRORLEVEL! NEQ 0 (
    call :ExecuteCmd npm run jspm:i
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  call :ExecuteCmd npm run typings install
  IF !ERRORLEVEL! NEQ 0 goto error

  call :ExecuteCmd gulp
  IF !ERRORLEVEL! NEQ 0 goto error

  call :ExecuteCmd npm run tsc
  IF !ERRORLEVEL! NEQ 0 goto error

  call :ExecuteCmd npm run jspm:bundle
  IF !ERRORLEVEL! NEQ 0 goto error

  ::call :ExecuteCmd npm run uglifyjs
  ::IF !ERRORLEVEL! NEQ 0 goto error

  popd
)

:: 7. Install bower
IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
  pushd "%DEPLOYMENT_TARGET%"

  call :ExecuteCmd bower install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 8. Copy templates-update webjob
SET WEBJOB_PATH=%HOME%\site\wwwroot\App_Data\jobs\triggered\templates-update
IF NOT EXIST "%WEBJOB_PATH%" (
  mkdir "%WEBJOB_PATH%"
)

copy "%DEPLOYMENT_SOURCE%\WebJobs\templates-update\templates-update.cmd" "%WEBJOB_PATH%"
copy "%DEPLOYMENT_SOURCE%\WebJobs\templates-update\settings.job" "%WEBJOB_PATH%"

:: 9. update build.txt
call :ExecuteCmd echo %SCM_COMMIT_ID% > %DEPLOYMENT_TARGET%\build.txt
IF !ERRORLEVEL! NEQ 0 (
  call :ExecuteCmd echo %SCM_COMMIT_ID% > %DEPLOYMENT_TARGET%\build.txt
  IF !ERRORLEVEL! NEQ 0 goto error
)

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Update deployment script

Update deployment script


rem -------------------------------------------------------------------------------------------------
rem batch-file to configure proxy settings: windows environment-variable, npm-, git- and bower-config
rem -------------------------------------------------------------------------------------------------

@echo off
cls
title set proxy batch - v1.0
@color 4F

:MENUE
echo;
echo;
echo --------------------------------------------------------
echo ----------------- proxy batch - v1.0 -------------------
echo --------------------------------------------------------
echo;
echo;

@choice /c:12 /m "please select if you like to work behind a company-proxy [1] or without a proxy [2], e.g. in the homeoffice."

if errorlevel 2 goto proxyOFF
if errorlevel 1 goto proxyON
goto end

rem "setx <variable> <wert>" setzt umgebungsvariable als benutzervariable
rem "setx <variable> <wert> -m" setzt umgebungsvariable als systemvariable
rem "setx < variable > "" bzw. "... -m" entfernt werte der variablen

:proxyON
echo.
echo you have pressed [1] to set a company-proxy
echo.
@echo please insert valid url-proxy url (e.g. proxy.company.de)
  set /p proxyUrl=

@echo please insert proxy-port (e.g. 3128)
  set /p port=

echo.
echo your given proxy url: %proxyUrl%
echo your given proxy port: %port%
echo.

rem user-environment variable
echo.
echo set msg proxy settings ...
echo.
echo 1. set globale http-proxy
call setx http_proxy http://%proxyurl%:%port%
call setx https_proxy http://%proxyurl%:%port%
echo.

rem .npmrc, path c:\users\<name>
echo 2. set npm http-proxy
echo.
call npm config set proxy http://%proxyUrl%:%port%
call npm config set https-proxy https://%proxyUrl%:%port%
echo done...
echo.

rem  .gitconfig, path c:\users\<name>
echo 3. set git http-proxy
echo.
call git config --global http.proxy http://%proxyUrl%:%port%
echo done...
echo.
echo 4. set git. to https
echo.
call git config --global url."https://".insteadOf git://
echo done...
echo.

rem  .bowerrc at current project dir
echo 5. create and update msg .bowerrc config
echo.
echo { > .bowerrc
echo  "directory": "app/bower_components", >> .bowerrc
echo  "proxy": "http://%proxyUrl%:%port%", >> .bowerrc
echo  "https-proxy": "http://%proxyUrl%:%port%" >> .bowerrc
echo } >> .bowerrc
echo done...

GOTO end

:proxyOFF
rem user-environment variable
echo.
echo you have pressed [2] to set no proxy
echo.
echo set homeoffice settings (no proxy) ...
echo.
echo 1. delete globale http-proxy
call setx http_proxy ""
call setx https_proxy ""
echo.

rem .npmrc, path c:\users\<name>
echo 2. remove npm http-proxy
echo.
call npm config delete proxy
call npm config delete https-proxy
echo done...
echo.

rem  .gitconfig, path c:\users\<name>
echo 3. remove git http-proxy
echo.
call git config --global --unset http.proxy
echo done...
echo.
echo 4. remove git http-proxy
echo.
call git config --global --unset url."https://".insteadOf git://
echo done...
echo.

rem  .bowerrc at current project dir
echo.
echo 5. create and update homeoffice .bowerrc config
echo.
echo { > .bowerrc
echo  "directory": "app/bower_components" >> .bowerrc
echo } >> .bowerrc
echo done...

goto end

:end
echo.
echo.
echo --------------------------------------------------------
echo --------- all work is done! have fun... :) -------------
echo --------------------------------------------------------
echo.
echo.

@pause
rem pause > nul
exit

Create configProxy.bat

Create configProxy.bat


@echo off
call ..\..\SetNugetApiKey.bat
del *.nupkg
nuget pack RocketLeagueReplayParser.csproj -Build -Prop Configuration=Release
nuget setApiKey %NUGET_API_KEY%
nuget push *.nupkg
pause

@echo off
call ..\..\SetNugetApiKey.bat
del *.nupkg
..\..\nuget pack RocketLeagueReplayParser.csproj -Build -Prop Configuration=Release
..\..\nuget setApiKey %NUGET_API_KEY%
..\..\nuget push *.nupkg
pause

Update nuget publish script for updated nuget.exe path


@echo off
:: To build extensions for 64 bit Python 3, we need to configure environment
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 4
::
:: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows

IF "%DISTUTILS_USE_SDK%"=="1" (
    ECHO Configuring environment to build with MSVC on a 64bit architecture
    ECHO Using Windows SDK 7.1
    "C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe" -q -version:v7.1
    CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release
    SET MSSdk=1
    REM Need the following to allow tox to see the SDK compiler
    SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB
) ELSE (
    ECHO Using default MSVC build environment
)

CALL %*

@echo off
:: To build extensions for 64 bit Python 3, we need to configure environment
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 4
::
:: More details at:
:: https://packaging.python.org/appveyor/

IF "%DISTUTILS_USE_SDK%"=="1" (
    ECHO Configuring environment to build with MSVC on a 64bit architecture
    ECHO Using Windows SDK 7.1
    "C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe" -q -version:v7.1
    CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release
    SET MSSdk=1
    REM Need the following to allow tox to see the SDK compiler
    SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB
) ELSE (
    ECHO Using default MSVC build environment
)

CALL %*

Update source for appveyor build script

DOC: Update source for appveyor build script

Old link was broken/the wrong link in the first place.


set TO_CHECKOUT=%1

if "%APPVEYOR%"=="True" (
    pip install virtualenv
    virtualenv -p C:\Python35\python.exe env
    call env\scripts\activate.bat

    move %APPVEYOR_BUILD_FOLDER% .
    set TO_CHECKOUT=%APPVEYOR_REPO_BRANCH%

    if "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" (
        set TO_CHECKOUT=
    )
)

if not exist angr git clone https://github.com/angr/angr.git || goto :error
if not exist ailment git clone https://github.com/angr/ailment.git || goto :error
if not exist claripy git clone https://github.com/angr/claripy.git || goto :error
if not exist cle git clone https://github.com/angr/cle.git || goto :error
if not exist pyvex git clone https://github.com/angr/pyvex.git || goto :error
if not exist vex git clone https://github.com/angr/vex.git || goto :error
if not exist archinfo git clone https://github.com/angr/archinfo.git || goto :error
if not exist angr-doc git clone https://github.com/angr/angr-doc.git || goto :error
if not exist binaries git clone https://github.com/angr/binaries.git || goto :error
if not exist wheels git clone https://github.com/angr/wheels.git || goto :error

if not "%TO_CHECKOUT%" == "" (
    call git_all.bat checkout %TO_CHECKOUT%
)

pip install unicorn
pip install sqlalchemy
pip install cffi

pip install -e .\archinfo || goto :error
pip install -e .\pyvex || goto :error
pip install -e .\cle || goto :error
pip install -e .\claripy || goto :error
pip install -e .\ailment || goto :error
pip install -e .\angr || goto :error

pip install nose flaky monkeyhex ipdb || goto :error

echo "Development install success!"
exit /b 0

:error
echo "Development install failed!"
exit /b 1

set TO_CHECKOUT=%1

if "%APPVEYOR%"=="True" (
    pip install virtualenv
    virtualenv -p C:\Python35\python.exe env
    call env\scripts\activate.bat

    move %APPVEYOR_BUILD_FOLDER% .
    set TO_CHECKOUT=%APPVEYOR_REPO_BRANCH%

    if "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" (
        set TO_CHECKOUT=
    )
)

if not exist angr git clone https://github.com/angr/angr.git || goto :error
if not exist ailment git clone https://github.com/angr/ailment.git || goto :error
if not exist claripy git clone https://github.com/angr/claripy.git || goto :error
if not exist cle git clone https://github.com/angr/cle.git || goto :error
if not exist pyvex git clone https://github.com/angr/pyvex.git || goto :error
if not exist vex git clone https://github.com/angr/vex.git || goto :error
if not exist archinfo git clone https://github.com/angr/archinfo.git || goto :error
if not exist angr-doc git clone https://github.com/angr/angr-doc.git || goto :error
if not exist binaries git clone https://github.com/angr/binaries.git || goto :error
if not exist wheels git clone https://github.com/angr/wheels.git || goto :error
if not exist angr-management git clone https://github.com/angr/angr-management.git || goto :error

if not "%TO_CHECKOUT%" == "" (
    call git_all.bat checkout %TO_CHECKOUT%
)

pip install -e .\archinfo || goto :error
pip install -e .\pyvex || goto :error
pip install -e .\cle || goto :error
pip install -e .\claripy || goto :error
pip install -e .\ailment || goto :error
pip install -e .\angr[angrdb] || goto :error
pip install -e .\angr-management || goto :error

pip install nose nose2 flaky monkeyhex ipdb || goto :error

echo "Development install success!"
exit /b 0

:error
echo "Development install failed!"
exit /b 1

Add angr-management to setup.bat (#116)

Add angr-management to setup.bat (#116)


update batch command

update batch command


@echo off
REM Windows and symlinks do not get along with each other, so on Windows
REM `node_modules\ep_etherpad-lite` is sometimes a full copy of `src` not a
REM symlink to `src`. If it is a copy, Node.js sees `src\foo.js` and
REM `node_modules\ep_etherpad-lite\foo.js` as two independent modules with
REM independent state, when they should be treated as the same file. To work
REM around this, everything must consistently use either `src` or
REM `node_modules\ep_etherpad-lite` on Windows. Because some plugins access
REM Etherpad internals via `require('ep_etherpad-lite/foo')`,
REM `node_modules\ep_etherpad-lite` is used here.
node node_modules\ep_etherpad-lite\node\server.js

Fix path to `server.js` in `start.bat`

windows: Fix path to `server.js` in `start.bat`


scrapy crawl moneynews -a year=%DATE:~2,2% -a month=%DATE:~5,2% -a day=%DATE:~8,2%

add in DOS batch file to extract today's news