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

:: ----------------------
:: KUDU Deployment Script with Functions Package restore
:: 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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Build
:: -----

:: NuGet package restore
echo "Restoring solution packages"
FOR /F %%d in ('DIR "*.sln" /S /B') DO (
  call :ExecuteCmd nuget restore %%d
)

:: MSBuild
echo "MSBuild solution"
FOR /F %%d in ('DIR "src\*.csproj" /S /B') DO (
setlocal
   call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\src\%%~nd\%%~nd.csproj" /nologo /verbosity:m /t:Build /p:Configuration=Release;OutputPath="%DEPLOYMENT_TEMP%\%%~nd";UseSharedCompilation=false %SCM_BUILD_ARGS%
endlocal
  IF !ERRORLEVEL! NEQ 0 goto error
)

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

:: NuGet package restore
echo "Restoring function packages"

FOR /F %%d in ('DIR "Project.json" /S /B') DO (
  call nuget restore %%d -PackagesDirectory %home%\data\Functions\packages\nuget
)

echo Handling Basic Web Site deployment.

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

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

:: Custom sub routine
:GetParentFolderName
set fullPath=%~p1
set dirNames=%fullPath:~1,-1%
call :GetDirectoryName "%dirNames:\=" "%"
exit /b

:GetDirectoryName
FOR %%i in (%*) DO (
 set parentFolderName=%%~i
)
exit /b

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

:: 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 with Functions Package restore
:: 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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Build
:: -----

:: NuGet package restore
echo "Restoring solution packages"
FOR /F %%d in ('DIR "*.sln" /S /B') DO (
  call :ExecuteCmd nuget restore %%d
)

:: MSBuild
echo "MSBuild solution"
FOR /F %%d in ('DIR "src\*.csproj" /S /B') DO (
   call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\src\%%~nd\%%~nd.csproj" /nologo /verbosity:m /t:Build /p:Configuration=Release;OutputPath="%DEPLOYMENT_TEMP%\%%~nd";UseSharedCompilation=false %SCM_BUILD_ARGS%
  IF !ERRORLEVEL! NEQ 0 goto error
)

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

:: NuGet package restore
echo "Restoring function packages"
FOR /F %%d in ('DIR "Project.json" /S /B') DO (
  call nuget restore %%d -PackagesDirectory %home%\data\Functions\packages\nuget
)

echo Handling Basic Web Site deployment.
:: 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;host.json"
  IF !ERRORLEVEL! NEQ 0 goto error
)

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

:: Custom sub routine
:GetParentFolderName
set fullPath=%~p1
set dirNames=%fullPath:~1,-1%
call :GetDirectoryName "%dirNames:\=" "%"
exit /b

:GetDirectoryName
FOR %%i in (%*) DO (
 set parentFolderName=%%~i
)
exit /b

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

:: 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

update deployment


@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
)
goto Deployment

:: Utility Functions
:: -----------------

:SelectNodeVersion

IF DEFINED KUDU_SELECT_NODE_VERSION_CMD (
  :: The following are done only on Windows Azure Websites environment
  call %KUDU_SELECT_NODE_VERSION_CMD% "%DEPLOYMENT_SOURCE%" "%DEPLOYMENT_TARGET%" "%DEPLOYMENT_TEMP%"
  IF !ERRORLEVEL! NEQ 0 goto error

  IF EXIST "%DEPLOYMENT_TEMP%\__nodeVersion.tmp" (
    SET /p NODE_EXE=<"%DEPLOYMENT_TEMP%\__nodeVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF EXIST "%DEPLOYMENT_TEMP%\__npmVersion.tmp" (
    SET /p NPM_JS_PATH=<"%DEPLOYMENT_TEMP%\__npmVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

  SET NPM_CMD="!NODE_EXE!" "!NPM_JS_PATH!"
) ELSE (
  SET NPM_CMD=npm
  SET NODE_EXE=node
)

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

:: 3. Install npm packages
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install --production
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 3. Install npm packages
IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install bower
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

echo ###########
echo Install Flatten-packages
echo ###########
call :ExecuteCmd NPM_CMD install flatten-packages
IF !ERRORLEVEL! NEQ 0 goto error
node ./node_modules/flatten-packages/bin/flatten .
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.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
)
goto Deployment

:: Utility Functions
:: -----------------

:SelectNodeVersion

IF DEFINED KUDU_SELECT_NODE_VERSION_CMD (
  :: The following are done only on Windows Azure Websites environment
  call %KUDU_SELECT_NODE_VERSION_CMD% "%DEPLOYMENT_SOURCE%" "%DEPLOYMENT_TARGET%" "%DEPLOYMENT_TEMP%"
  IF !ERRORLEVEL! NEQ 0 goto error

  IF EXIST "%DEPLOYMENT_TEMP%\__nodeVersion.tmp" (
    SET /p NODE_EXE=<"%DEPLOYMENT_TEMP%\__nodeVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF EXIST "%DEPLOYMENT_TEMP%\__npmVersion.tmp" (
    SET /p NPM_JS_PATH=<"%DEPLOYMENT_TEMP%\__npmVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

  SET NPM_CMD="!NODE_EXE!" "!NPM_JS_PATH!"
) ELSE (
  SET NPM_CMD=npm
  SET NODE_EXE=node
)

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

:: 3. Install npm packages
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install --production
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 3. Install npm packages
IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install bower
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

echo ###########
echo Install Flatten-packages
echo ###########
call :ExecuteCmd !NPM_CMD! install flatten-packages
IF !ERRORLEVEL! NEQ 0 goto error
!NPM_CMD! ./node_modules/flatten-packages/bin/flatten .
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.

deploy fix

deploy fix


@echo off
SET NODE_PATH="%~dp0\dev_bundle\lib\node_modules"

"%~dp0\dev_bundle\bin\node.exe" "%~dp0\tools\main.js" %*

Add meteor.bat file

Add meteor.bat file


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

:: ----------------------
:: 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%..\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%
)

:: 1. Set DNX Path
set DNVM_CMD_PATH_FILE="%USERPROFILE%\.dnx\temp-set-envvars.cmd"
set DNX_RUNTIME="%USERPROFILE%\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8"

:: 2. Install DNX
call :ExecuteCmd PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';$CmdPathFile='%DNVM_CMD_PATH_FILE%';& '%SCM_DNVM_PS_PATH%' " install 1.0.0-beta8 -arch x86 -r clr %SCM_DNVM_INSTALL_OPTIONS%
IF !ERRORLEVEL! NEQ 0 goto error

:: 3. Run DNU Restore, Nuget restore for specific projects
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\AllReadyApp\AllReady.Models\AllReady.Models.csproj" -SolutionDirectory %DEPLOYMENT_SOURCE%\AllReadyApp
IF !ERRORLEVEL! NEQ 0 goto error
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\AllReadyApp\NotificationsProcessor\NotificationsProcessor.csproj" -SolutionDirectory %DEPLOYMENT_SOURCE%\AllReadyApp
IF !ERRORLEVEL! NEQ 0 goto error

:: 4. Run Our Custom build steps:
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AllReadyApp\AllReady.Models\AllReady.Models.csproj"
IF !ERRORLEVEL! NEQ 0 goto error

call %DNX_RUNTIME%\bin\dnu restore "%DEPLOYMENT_SOURCE%" %SCM_DNU_RESTORE_OPTIONS%
IF !ERRORLEVEL! NEQ 0 goto error

call %DNX_RUNTIME%\bin\dnu build "%DEPLOYMENT_SOURCE%\AllReadyApp\wrap\AllReady.Models\project.json"
IF !ERRORLEVEL! NEQ 0 goto error
call %DNX_RUNTIME%\bin\dnu build "%DEPLOYMENT_SOURCE%\AllReadyApp\Web-App\AllReady\project.json"
IF !ERRORLEVEL! NEQ 0 goto error
call %DNX_RUNTIME%\bin\dnu build "%DEPLOYMENT_SOURCE%\AllReadyApp\Web-App\AllReady.UnitTest\project.json"
IF !ERRORLEVEL! NEQ 0 goto error
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AllReadyApp\NotificationsProcessor\NotificationsProcessor.csproj"

:: 4.1. Publish the site:
call %DNX_RUNTIME%\bin\dnu publish ".\Web-App\AllReady\project.json" --runtime %DNX_RUNTIME% --out "%DEPLOYMENT_TEMP%" %SCM_DNU_PUBLISH_OPTIONS%
IF !ERRORLEVEL! NEQ 0 goto error

:: 5. KuduSync
call %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.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%..\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%
)

:: 1. Set DNX Path
set DNVM_CMD_PATH_FILE="%USERPROFILE%\.dnx\temp-set-envvars.cmd"
set DNX_RUNTIME="%USERPROFILE%\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8"

:: 2. Install DNX
call :ExecuteCmd PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';$CmdPathFile='%DNVM_CMD_PATH_FILE%';& '%SCM_DNVM_PS_PATH%' " install 1.0.0-beta8 -arch x86 -r clr %SCM_DNVM_INSTALL_OPTIONS%
IF !ERRORLEVEL! NEQ 0 goto error

:: 3. Run DNU Restore, Nuget restore for specific projects
call %DNX_RUNTIME%\bin\dnu restore "%DEPLOYMENT_SOURCE%" %SCM_DNU_RESTORE_OPTIONS%
IF !ERRORLEVEL! NEQ 0 goto error
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\AllReadyApp\AllReady.Models\AllReady.Models.csproj" -SolutionDirectory %DEPLOYMENT_SOURCE%\AllReadyApp
IF !ERRORLEVEL! NEQ 0 goto error
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\AllReadyApp\NotificationsProcessor\NotificationsProcessor.csproj" -SolutionDirectory %DEPLOYMENT_SOURCE%\AllReadyApp
IF !ERRORLEVEL! NEQ 0 goto error

:: 4. Run Our Custom build steps:
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AllReadyApp\AllReady.Models\AllReady.Models.csproj"
IF !ERRORLEVEL! NEQ 0 goto error
call %DNX_RUNTIME%\bin\dnu build "%DEPLOYMENT_SOURCE%\AllReadyApp\wrap\AllReady.Models\project.json"
IF !ERRORLEVEL! NEQ 0 goto error
call %DNX_RUNTIME%\bin\dnu build "%DEPLOYMENT_SOURCE%\AllReadyApp\Web-App\AllReady\project.json"
IF !ERRORLEVEL! NEQ 0 goto error
call %DNX_RUNTIME%\bin\dnu build "%DEPLOYMENT_SOURCE%\AllReadyApp\Web-App\AllReady.UnitTest\project.json"
IF !ERRORLEVEL! NEQ 0 goto error
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AllReadyApp\NotificationsProcessor\NotificationsProcessor.csproj"

:: 4.1. Publish the site:
call %DNX_RUNTIME%\bin\dnu publish ".\Web-App\AllReady\project.json" --runtime %DNX_RUNTIME% --out "%DEPLOYMENT_TEMP%" %SCM_DNU_PUBLISH_OPTIONS%
IF !ERRORLEVEL! NEQ 0 goto error

:: 5. KuduSync
call %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.

revert order change.

revert order change.


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

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.2.2
:: ----------------------

:: 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 DEPLOYMENT_SOURCE=%~dp0%.
SET DEPLOYMENT_TARGET=%DEPLOYMENT_SOURCE%\wwwroot\content\themes\tynker

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

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

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

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)

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

echo Handling Basic Web Site deployment.

:: 1. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_SOURCE%" -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: 0.2.2
:: ----------------------

:: 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 DEPLOYMENT_SOURCE=%~dp0%
SET DEPLOYMENT_TARGET=%DEPLOYMENT_SOURCE%..\wwwroot\content\themes\tynker

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

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

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

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)

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

echo Handling Basic Web Site deployment.

:: 1. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_SOURCE%" -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.

Fix path

Fix path


rmdir /S /Q %USERPROFILE%\Documents\Arduino\libraries\Reflecta
xcopy * %USERPROFILE%\Documents\Arduino\libraries\Reflecta /s /e /i

Add Deploy.cmd script for more convenient iteration


@echo off
setlocal enabledelayedexpansion

echo %~n0: Started %date% %time%

IF EXIST "%DEPLOYMENT_SOURCE%\package.json" (
    pushd "%DEPLOYMENT_SOURCE%"
    echo %date% %time% NPM Installing: %DEPLOYMENT_SOURCE%\package.json
    npm install --production --progress=false --cache-min=432000
    npm install --save json-loader --progress=false --cache-min=432000
    IF !ERRORLEVEL! NEQ 0 goto error
    popd
    @echo off
  )

echo %~n0: Completed %date% %time%
goto end

: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 off
setlocal enabledelayedexpansion

echo %~n0: Started %date% %time%

IF EXIST "%DEPLOYMENT_SOURCE%\package.json" (
    pushd "%DEPLOYMENT_SOURCE%"
    echo %date% %time% NPM Installing: %DEPLOYMENT_SOURCE%\package.json
    npm install --production --progress=false --cache-min=432000
    npm install --save json-loader --progress=false --cache-min=432000
    IF !ERRORLEVEL! NEQ 0 goto error
    popd
    @echo off
)

IF EXIST "%DEPLOYMENT_SOURCE%\.deploy\package.json" (
    pushd "%DEPLOYMENT_SOURCE%\.deploy"
    echo %date% %time% NPM Installing: %DEPLOYMENT_SOURCE%\.deploy\package.json
    npm install --production --progress=false --cache-min=432000
    IF !ERRORLEVEL! NEQ 0 goto error
    popd
    @echo off
)

echo %~n0: Completed %date% %time%
goto end

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal

Build Master:2017-02-23T15:08:25.734Z

Build Master:2017-02-23T15:08:25.734Z


@ECHO off
REM This suite requires https://github.com/inkarkat/runVimTests to run

set TEST_SOURCES=--pure --runtime bundle\vim-easygrep\autoload\EasyGrep.vim --runtime bundle\vim-easygrep\plugin\EasyGrep.vim

if %1.==clean. goto Clean
if %1.==run. goto Run
if %1.==runall. goto RunAll

echo "usage: runall.bat clean|run|runall"
goto End

:Clean
echo Cleaning
del /Q *.out 2> nul
del /Q *.msgout 2> nul
goto End

:Run
shift
echo Running %1 %2 %3 %4 %5 %6 %7 %8 %9
../../runVimTests/bin/runVimTests.cmd %TEST_SOURCES% %1 %2 %3 %4 %5 %6 %7 %8 %9
goto End

:RunAll
echo Running all
../../runVimTests/bin/runVimTests.cmd %TEST_SOURCES% vimgrep.suite
goto End

:End

@ECHO off
REM This suite requires https://github.com/inkarkat/runVimTests to run

set TEST_SOURCES=--pure --runtime bundle\vim-easygrep\autoload\EasyGrep.vim --runtime bundle\vim-easygrep\plugin\EasyGrep.vim

if %1.==clean. goto Clean
if %1.==run. goto Run
if %1.==runall. goto RunAll

echo "usage: test.bat clean|run|runall"
goto End

:Clean
echo Cleaning
del /Q *.out 2> nul
del /Q *.msgout 2> nul
goto End

:Run
shift
echo Running %1 %2 %3 %4 %5 %6 %7 %8 %9
../../runVimTests/bin/runVimTests.cmd %TEST_SOURCES% %1 %2 %3 %4 %5 %6 %7 %8 %9
goto End

:RunAll
echo Running all
../../runVimTests/bin/runVimTests.cmd %TEST_SOURCES% vimgrep.suite
goto End

:End

Fix usage statement

Fix usage statement


cd ..
set "destination=testcoverage"

rmdir /q /s %destination%
mkdir %destination%
cd content/tests
dotnet test /p:AltCover=true
mv coverage.xml ../../%destination%/coverage.xml

cd ../../%destination%

set "reportgenerator=%UserProfile%\.nuget\packages\reportgenerator\4.0.11\tools\net47\ReportGenerator.exe"
set "targetdir=."

"%reportGenerator%" -reports:coverage.xml -reporttypes:HtmlInline -targetdir:%targetdir%

cd ..
set "destination=testcoverage"

rmdir /q /s %destination%
mkdir %destination%
cd content/tests
dotnet test /p:AltCover=true
mv coverage.xml ../../%destination%/coverage.xml

cd ../../%destination%

set "reportgenerator=%UserProfile%\.nuget\packages\reportgenerator\4.0.12\tools\net47\ReportGenerator.exe"
set "targetdir=."

"%reportGenerator%" -reports:coverage.xml -reporttypes:HtmlInline -targetdir:%targetdir%

Bump to report generator.

Bump to report generator.


if not exist "C:\Windows\Temp\build-tools.exe" (
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe', 'C:\Windows\Temp\build-tools.exe')" <NUL
)

start /wait C:\Windows\Temp\build-tools.exe /Passive /AdminFile A:\buildtools-adminfile.xml

setx PATH "%PATH%;C:\Program Files (x86)\Windows Kits\8.1\bin\x86\" /m

if not exist "C:\Windows\Temp\build-tools.exe" (
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe', 'C:\Windows\Temp\build-tools.exe')" <NUL
)

start /wait C:\Windows\Temp\build-tools.exe /Passive /AdminFile A:\buildtools-adminfile.xml

setx PATH "%PATH%;C:\Program Files (x86)\Windows Kits\8.1\bin\x86" /m

Fix path update to not include trailing backslash


:: Run all unit tests
@echo off

setlocal EnableDelayedExpansion
dir /b unit-tests > tempFile1
findstr /e /c:".py" tempFile1 > tempFile2
findstr /B /R /C:"[^__]" tempFile2 > tempFile3
del tempFile1
del tempFile2

set /A testIndex=1
for /F "tokens=*" %%A in (tempFile3) do (
	echo|set /p=Test !testIndex!:
	echo  %%~nA
	echo ----------------------------------------------------------------------
	call python -m unit-tests.%%~nA -v
	set /A "testIndex+=1"
	echo.
)

del tempFile3

Add unit testing script for Windows.

Add unit testing script for Windows.


:: Engine source is in a git repo, Klawr source is in a different git repo, no simple way to put the Klawr checkout inside Engine checkout due to a shared directory structure,
:: so create a couple of directory junctions and a few symbolic links in the Engine source that link to the Klawr source.
set ScriptGeneratorLinkDir=C:\Projects\UE4\UnrealEngine\Engine\Plugins\Script\ScriptGeneratorPlugin
set ScriptGeneratorTargetDir=C:\Projects\UE4\klawr\Engine\Plugins\Script\ScriptGeneratorPlugin
mklink /J C:\Projects\UE4\UnrealEngine\Engine\Source\ThirdParty\Klawr C:\Projects\UE4\klawr\Engine\Source\ThirdParty\Klawr
mklink /J %ScriptGeneratorLinkDir%\Resources\WrapperProjectTemplate %ScriptGeneratorTargetDir%\Resources\WrapperProjectTemplate
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\KlawrCodeFormatter.h %ScriptGeneratorTargetDir%\Source\ScriptGeneratorPlugin\Private\KlawrCodeFormatter.h
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\KlawrCodeGenerator.cpp %ScriptGeneratorTargetDir%\Source\Private\ScriptGeneratorPlugin\KlawrCodeGenerator.cpp
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\KlawrCodeGenerator.h %ScriptGeneratorTargetDir%\Source\ScriptGeneratorPlugin\Private\KlawrCodeGenerator.h
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\pugiconfig.hpp %ScriptGeneratorTargetDir%\Source\ScriptGeneratorPlugin\Private\pugiconfig.hpp
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\pugixml.cpp %ScriptGeneratorTargetDir%\Source\ScriptGeneratorPlugin\Private\pugixml.cpp
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\pugixml.hpp %ScriptGeneratorTargetDir%\Source\ScriptGeneratorPlugin\Private\pugixml.hpp
pause

:: Engine source is in a git repo, Klawr source is in a different git repo, no simple way to put the Klawr checkout inside Engine checkout due to a shared directory structure,
:: so create a couple of directory junctions and a few symbolic links in the Engine source that link to the Klawr source.
set ScriptGeneratorLinkDir=C:\Projects\UE4\UnrealEngine\Engine\Plugins\Script\ScriptGeneratorPlugin
set ScriptGeneratorTargetDir=C:\Projects\UE4\klawr\Engine\Plugins\Script\ScriptGeneratorPlugin
mklink /J C:\Projects\UE4\UnrealEngine\Engine\Source\ThirdParty\Klawr C:\Projects\UE4\klawr\Engine\Source\ThirdParty\Klawr
mklink /J %ScriptGeneratorLinkDir%\Resources\WrapperProjectTemplate %ScriptGeneratorTargetDir%\Resources\WrapperProjectTemplate
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\KlawrCodeFormatter.h %ScriptGeneratorTargetDir%\Source\ScriptGeneratorPlugin\Private\KlawrCodeFormatter.h
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\KlawrCodeGenerator.cpp %ScriptGeneratorTargetDir%\Source\ScriptGeneratorPlugin\Private\KlawrCodeGenerator.cpp
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\KlawrCodeGenerator.h %ScriptGeneratorTargetDir%\Source\ScriptGeneratorPlugin\Private\KlawrCodeGenerator.h
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\pugiconfig.hpp %ScriptGeneratorTargetDir%\Source\ScriptGeneratorPlugin\Private\pugiconfig.hpp
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\pugixml.cpp %ScriptGeneratorTargetDir%\Source\ScriptGeneratorPlugin\Private\pugixml.cpp
mklink %ScriptGeneratorLinkDir%\Source\ScriptGeneratorPlugin\Private\pugixml.hpp %ScriptGeneratorTargetDir%\Source\ScriptGeneratorPlugin\Private\pugixml.hpp
pause

Fix wrong path in CreateLinks.bat

Fix wrong path in CreateLinks.bat


@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.

setlocal enabledelayedexpansion

IF [%1] EQU [] (
	echo "USAGE: $0 classname [opts]"
	goto :eof
)

set BASE_DIR=%CD%\..
set CLASSPATH=
echo %BASE_DIR%

for %%i in (%BASE_DIR%\project\boot\scala-2.8.0\lib\*.jar) do (
	call :concat %%i
)

for %%i in (%BASE_DIR%\core\target\scala_2.8.0\*.jar) do (
	call :concat %%i
)

for %%i in (%BASE_DIR%\core\lib\*.jar) do (
	call :concat %%i
)

for %%i in (%BASE_DIR%\perf\target\scala_2.8.0/kafka*.jar) do (
	call :concat %%i
)

for %%i in (%BASE_DIR%\core\lib_managed\scala_2.8.0\compile\*.jar) do (
	call :concat %%i
)

IF ["%KAFKA_JMX_OPTS%"] EQU [""] (
	set KAFKA_JMX_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
)

IF ["%KAFKA_OPTS%"] EQU [""] (
	set KAFKA_OPTS=-Xmx512M -server -Dlog4j.configuration=file:"%BASE_DIR%\config\log4j.properties"
)

IF ["%JMX_PORT%"] NEQ [""] (
	set KAFKA_JMX_OPTS=%KAFKA_JMX_OPTS% -Dcom.sun.management.jmxremote.port=%JMX_PORT%
)

IF ["%JAVA_HOME%"] EQU [""] (
	set JAVA=java
) ELSE (
	set JAVA="%JAVA_HOME%/bin/java"
)

set SEARCHTEXT=\bin\..
set REPLACETEXT=
set CLASSPATH=!CLASSPATH:%SEARCHTEXT%=%REPLACETEXT%!
set COMMAND= %JAVA% %KAFKA_OPTS% %KAFKA_JMX_OPTS% -cp %CLASSPATH% %*
set SEARCHTEXT=-cp ;
set REPLACETEXT=-cp
set COMMAND=!COMMAND:%SEARCHTEXT%=%REPLACETEXT%!

%COMMAND%

:concat
set CLASSPATH=%CLASSPATH%;"%1"

@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.

setlocal enabledelayedexpansion

IF [%1] EQU [] (
	echo "USAGE: $0 classname [opts]"
	goto :eof
)

set BASE_DIR=%CD%\..
set CLASSPATH=
echo %BASE_DIR%

set ivyPath=%USERPROFILE%\.ivy2\cache

set snappy=%ivyPath%/org.xerial.snappy/snappy-java/bundles/snappy-java-1.0.4.1.jar
	call :concat %snappy%

set library=%ivyPath%/org.scala-lang/scala-library/jars/scala-library-2.8.0.jar
	call :concat %library%

set compiler=%ivyPath%/org.scala-lang/scala-compiler/jars/scala-compiler-2.8.0.jar
	call :concat %compiler%

set log4j=%ivyPath%/log4j/log4j/jars/log4j-1.2.15.jar
	call :concat %log4j%

set slf=%ivyPath%/org.slf4j/slf4j-api/jars/slf4j-api-1.6.4.jar
	call :concat %slf%

set zookeeper=%ivyPath%/org.apache.zookeeper/zookeeper/jars/zookeeper-3.3.4.jar
	call :concat %zookeeper%

set jopt=%ivyPath%/net.sf.jopt-simple/jopt-simple/jars/jopt-simple-3.2.jar
	call :concat %jopt%

for %%i in (%BASE_DIR%\core\target\scala-2.8.0\*.jar) do (
	call :concat %%i
)

for %%i in (%BASE_DIR%\core\lib\*.jar) do (
	call :concat %%i
)

for %%i in (%BASE_DIR%\perf\target\scala-2.8.0/kafka*.jar) do (
	call :concat %%i
)

IF ["%KAFKA_JMX_OPTS%"] EQU [""] (
	set KAFKA_JMX_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
)

IF ["%KAFKA_OPTS%"] EQU [""] (
	set KAFKA_OPTS=-Xmx512M -server -Dlog4j.configuration=file:"%BASE_DIR%\config\log4j.properties"
)

IF ["%JMX_PORT%"] NEQ [""] (
	set KAFKA_JMX_OPTS=%KAFKA_JMX_OPTS% -Dcom.sun.management.jmxremote.port=%JMX_PORT%
)

IF ["%JAVA_HOME%"] EQU [""] (
	set JAVA=java
) ELSE (
	set JAVA="%JAVA_HOME%/bin/java"
)

set SEARCHTEXT=\bin\..
set REPLACETEXT=
set CLASSPATH=!CLASSPATH:%SEARCHTEXT%=%REPLACETEXT%!
set COMMAND= %JAVA% %KAFKA_OPTS% %KAFKA_JMX_OPTS% -cp %CLASSPATH% %*
set SEARCHTEXT=-cp ;
set REPLACETEXT=-cp
set COMMAND=!COMMAND:%SEARCHTEXT%=%REPLACETEXT%!

%COMMAND%

:concat
set CLASSPATH=%CLASSPATH%;"%1"

Fix windows build script - kafka-run-class.bat; patched by Mark deVilliers; reviewed by Jun Rao; kafka-751


#!/usr/bin/env bash

# RUN FROM ROOT Bugzilla-ETL DIRECTORY, eg ./resources/docker/debug.sh

docker run --interactive --tty --env-file ./resources/docker/activedata.env -p 8000:8000/tcp --mount source=activedata_state,destination=/app/logs activedata bash

add debug example

add debug example


if not exist "C:\Windows\Temp\7z920-x64.msi" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920-x64.msi', 'C:\Windows\Temp\7z920-x64.msi')" <NUL
)
msiexec /qb /i C:\Windows\Temp\7z920-x64.msi

if "%PACKER_BUILDER_TYPE%" equ "vmware-iso" goto :vmware
if "%PACKER_BUILDER_TYPE%" equ "virtualbox-iso" goto :virtualbox
if "%PACKER_BUILDER_TYPE%" equ "parallels-iso" goto :parallels
goto :done

:vmware

if exist "C:\Users\vagrant\windows.iso" (
    move /Y C:\Users\vagrant\windows.iso C:\Windows\Temp
)

if not exist "C:\Windows\Temp\windows.iso" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://softwareupdate.vmware.com/cds/vmw-desktop/ws/14.0.0/6661328/windows/packages/tools-windows.tar', 'C:\Windows\Temp\vmware-tools.tar')" <NUL
    cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.tar -oC:\Windows\Temp"
    FOR /r "C:\Windows\Temp" %%a in (VMware-tools-windows-*.iso) DO REN "%%~a" "windows.iso"
    rd /S /Q "C:\Program Files (x86)\VMWare"
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x "C:\Windows\Temp\windows.iso" -oC:\Windows\Temp\VMWare"
cmd /c C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\"

rd /Q "C:\Windows\Temp\vmware-tools.tar"
rd /Q "C:\Windows\Temp\windows.iso"
rd /S /Q "C:\Windows\Temp\VMware"
goto :done

:virtualbox

if exist "C:\Users\vagrant\VBoxGuestAdditions.iso" (
    move /Y C:\Users\vagrant\VBoxGuestAdditions.iso C:\Windows\Temp
)

if not exist "C:\Windows\Temp\VBoxGuestAdditions.iso" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://download.virtualbox.org/virtualbox/5.1.30/VBoxGuestAdditions_5.1.30.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
certutil -addstore -f "TrustedPublisher" C:\Windows\Temp\virtualbox\cert\vbox-sha256-r3.cer
certutil -addstore -f "TrustedPublisher" C:\Windows\Temp\virtualbox\cert\vbox-sha256.cer
certutil -addstore -f "TrustedPublisher" C:\Windows\Temp\virtualbox\cert\vbox-sha1.cer
cmd /c C:\Windows\Temp\virtualbox\VBoxWindowsAdditions.exe /S
rd /S /Q "C:\Windows\Temp\virtualbox"
goto :done

:parallels
if exist "C:\Users\vagrant\prl-tools-win.iso" (
	move /Y C:\Users\vagrant\prl-tools-win.iso C:\Windows\Temp
	cmd /C "C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\prl-tools-win.iso -oC:\Windows\Temp\parallels
	cmd /C C:\Windows\Temp\parallels\PTAgent.exe /install_silent
	rd /S /Q "C:\Windows\Temp\parallels"
)

:done
msiexec /qb /x C:\Windows\Temp\7z920-x64.msi

if not exist "C:\Windows\Temp\7z920-x64.msi" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920-x64.msi', 'C:\Windows\Temp\7z920-x64.msi')" <NUL
)
msiexec /qb /i C:\Windows\Temp\7z920-x64.msi

if "%PACKER_BUILDER_TYPE%" equ "vmware-iso" goto :vmware
if "%PACKER_BUILDER_TYPE%" equ "virtualbox-iso" goto :virtualbox
if "%PACKER_BUILDER_TYPE%" equ "parallels-iso" goto :parallels
goto :done

:vmware

if exist "C:\Users\vagrant\windows.iso" (
    move /Y C:\Users\vagrant\windows.iso C:\Windows\Temp
)

if not exist "C:\Windows\Temp\windows.iso" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://softwareupdate.vmware.com/cds/vmw-desktop/ws/14.1.0/7370693/windows/packages/tools-windows.tar', 'C:\Windows\Temp\vmware-tools.tar')" <NUL
    cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.tar -oC:\Windows\Temp"
    FOR /r "C:\Windows\Temp" %%a in (VMware-tools-windows-*.iso) DO REN "%%~a" "windows.iso"
    rd /S /Q "C:\Program Files (x86)\VMWare"
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x "C:\Windows\Temp\windows.iso" -oC:\Windows\Temp\VMWare"
cmd /c C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\"

rd /Q "C:\Windows\Temp\vmware-tools.tar"
rd /Q "C:\Windows\Temp\windows.iso"
rd /S /Q "C:\Windows\Temp\VMware"
goto :done

:virtualbox

if exist "C:\Users\vagrant\VBoxGuestAdditions.iso" (
    move /Y C:\Users\vagrant\VBoxGuestAdditions.iso C:\Windows\Temp
)

if not exist "C:\Windows\Temp\VBoxGuestAdditions.iso" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://download.virtualbox.org/virtualbox/5.2.4/VBoxGuestAdditions_5.2.4.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
certutil -addstore -f "TrustedPublisher" C:\Windows\Temp\virtualbox\cert\vbox-sha256-r3.cer
certutil -addstore -f "TrustedPublisher" C:\Windows\Temp\virtualbox\cert\vbox-sha256.cer
certutil -addstore -f "TrustedPublisher" C:\Windows\Temp\virtualbox\cert\vbox-sha1.cer
cmd /c C:\Windows\Temp\virtualbox\VBoxWindowsAdditions.exe /S
rd /S /Q "C:\Windows\Temp\virtualbox"
goto :done

:parallels
if exist "C:\Users\vagrant\prl-tools-win.iso" (
	move /Y C:\Users\vagrant\prl-tools-win.iso C:\Windows\Temp
	cmd /C "C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\prl-tools-win.iso -oC:\Windows\Temp\parallels
	cmd /C C:\Windows\Temp\parallels\PTAgent.exe /install_silent
	rd /S /Q "C:\Windows\Temp\parallels"
)

:done
msiexec /qb /x C:\Windows\Temp\7z920-x64.msi

Update VMware Tools + VBox guest additions


@ echo off
rem 本文件撰写者：雪山凌狐
rem 版本号：V1.1
rem 时间：20170324
rem 功能：自动把本地项目文件夹上传到云端GitHub和码云，仅适用于非第一次提交（覆盖更新提交，常用）
rem 文件编码：Utf-8无BOM格式编码
rem 本文件适用于已经在云端创建好云端repo，在本地建立好公钥私钥，在云端添加好公钥的朋友们
rem 使用方法：把文件里面的上传地址  git@github.com:xueshanlinghu/learn-git-and-github.git 改成你的即可

echo -------------------create remote origin----------------------
git remote rm origin
rem 这句代码的git@github.com:xueshanlinghu/learn-git-and-github.git改成你自己的远端地址哦~
git remote add origin git@github.com:ganeling888/lending-approved.git
echo.
echo --------------now we push the data to GitHub-----------------
git push origin master
git remote rm origin

echo.
echo ----------------------push done------------------------------

@ echo off
rem 本文件撰写者：雪山凌狐
rem 版本号：V1.1
rem 时间：20170324
rem 功能：自动把本地项目文件夹上传到云端GitHub和码云，仅适用于非第一次提交（覆盖更新提交，常用）
rem 文件编码：Utf-8无BOM格式编码
rem 本文件适用于已经在云端创建好云端repo，在本地建立好公钥私钥，在云端添加好公钥的朋友们
rem 使用方法：把文件里面的上传地址  git@github.com:xueshanlinghu/learn-git-and-github.git 改成你的即可

echo -------------------create remote origin----------------------
git remote rm origin
rem 这句代码的git@github.com:xueshanlinghu/learn-git-and-github.git改成你自己的远端地址哦~
git remote add origin github2.com:ganeling888/lending-approved.git
echo.
echo --------------now we push the data to GitHub-----------------
git push origin master
git remote rm origin

echo.
echo ----------------------push done------------------------------

modify push.bat

modify push.bat


pushd "%~dp0"

echo "Activating virtual environment"
call ..\pvconnect-py27\scripts\activate

call ..\pvconnect-py27\pv-location.bat

echo "%PARAVIEW_BIN_LOCATION%"
set PATH=%PARAVIEW_BIN_LOCATION%;%PATH%
set PYTHONPATH=..;%PARAVIEW_SITE_LIB%\site-packages;%PARAVIEW_SITE_LIB%\site-packages\vtk;%PYTHONPATH%

echo %PYTHONPATH%

python pvserver_launcher.py %*

pushd "%~dp0"

echo "Activating virtual environment"
call ..\pvconnect-py27\scripts\activate

echo %PYTHONPATH%

python pvserver_launcher.py %*

Remove paraview location

Remove paraview location


@echo off
for /f "tokens=* delims= " %%a in ('wd -n %1') do set DIR=%%a
cd %DIR%

@echo off
for /f "tokens=* delims= " %%a in ('wd -n %1') do set DIR=%%a
cd /d %DIR%

update wcd.bat

update wcd.bat

this just ensure change in drive


echo ON

:: Set the right msvc version according to Python version
if "%PY_VER%"=="2.7" (
    set MSVC_VER=9.0
    set LIB_VER=90
) else if "%PY_VER%"=="3.4" (
    set MSVC_VER=10.0
    :: set LIB_VER=100
) else (
    set MSVC_VER=14.0
    set LIB_VER=140
)

call bootstrap.bat
if errorlevel 1 exit 1

echo Architecture: %ARCH%

CALL b2 install toolset=msvc-%MSVC_VER% ^
        address-model=%ARCH% ^
        variant=release ^
        threading=multi ^
        link=static,shared ^
        runtime-link=static ^
        define=BOOST_ALL_NO_LIB ^
        -j%CPU_COUNT% ^
        --with-python ^
        --layout=system ^
        --build-dir=buildboost ^
        --prefix=%LIBRARY_PREFIX%
IF errorlevel 1 exit 1

:: move %LIBRARY_INC%\boost-1_61\boost %LIBRARY_INC%
:: IF errorlevel 1 exit 1

move %LIBRARY_LIB%\boost_*.dll "%LIBRARY_BIN%"
IF errorlevel 1 exit 1

echo ON

:: Set the right msvc version according to Python version
if "%PY_VER%"=="2.7" (
    set MSVC_VER=9.0
    set LIB_VER=90
) else if "%PY_VER%"=="3.4" (
    set MSVC_VER=10.0
    set LIB_VER=100
) else (
    set MSVC_VER=14.0
    set LIB_VER=140
)

call bootstrap.bat
if errorlevel 1 exit 1

echo Architecture: %ARCH%

CALL b2 install toolset=msvc-%MSVC_VER% ^
        address-model=%ARCH% ^
        variant=release ^
        threading=multi ^
        link=static,shared ^
        runtime-link=static ^
        define=BOOST_ALL_NO_LIB ^
        -j%CPU_COUNT% ^
        --with-python ^
        --layout=system ^
        --build-dir=buildboost ^
        --prefix=%LIBRARY_PREFIX%
IF errorlevel 1 exit 1

:: move %LIBRARY_INC%\boost-1_61\boost %LIBRARY_INC%
:: IF errorlevel 1 exit 1

move %LIBRARY_LIB%\boost_*.dll "%LIBRARY_BIN%"
IF errorlevel 1 exit 1

Update bld.bat

Update bld.bat


@REM NOTE: This script must be run from a Visual Studio command prompt window

@setlocal
@ECHO off

SET CMDHOME=%~dp0.
if "%FrameworkDir%" == "" set FrameworkDir=%WINDIR%\Microsoft.NET\Framework
if "%FrameworkVersion%" == "" set FrameworkVersion=v4.0.30319

SET MSBUILDEXEDIR=%FrameworkDir%\%FrameworkVersion%
SET MSBUILDEXE=%MSBUILDEXEDIR%\MSBuild.exe

cd %CMDHOME%

FOR /R %%I in (*.sln) do (
  @Echo %%I

  nuget restore %%I

  "%MSBUILDEXE%" /verbosity:quiet %%I
)

Add Build.cmd file to automate building of all Samples projects.


REM This is not guaranteed to work, ever. It's just a little helper
REM script that I threw together to help me build the win32 version of
REM the library. If someone with more win32-fu than I wants to make
REM something more robust, please feel free! I'd love to include it.
REM -- Jamis Buck

cl /LD /Ie:\WinSDK\Include /Ic:\ruby\lib\ruby\1.8\i386-mswin32 /Ic:\ruby\sqlite3\src /Ic:\ruby\src\ruby-1.8.4_2006-04-14 sqlite3_api_wrap.c /link /LIBPATH:c:\ruby\sqlite3 /LIBPATH:e:\WinSDK\Lib /LIBPATH:c:\ruby\lib sqlite3.lib msvcrt-ruby18.lib

REM This is not guaranteed to work, ever. It's just a little helper
REM script that I threw together to help me build the win32 version of
REM the library. If someone with more win32-fu than I wants to make
REM something more robust, please feel free! I'd love to include it.
REM -- Jamis Buck

cl /LD /Ie:\WinSDK\Include /Ic:\ruby\lib\ruby\1.8\i386-mswin32 /Ic:\ruby\sqlite3 /Ic:\ruby\src\ruby-1.8.4_2006-04-14 sqlite3_api_wrap.c /link /LIBPATH:c:\ruby\sqlite3 /LIBPATH:e:\WinSDK\Lib /LIBPATH:c:\ruby\lib sqlite3.lib msvcrt-ruby18.lib

update build.bat

update build.bat

As the batch file itself says, this is not expected to work, in
general. Rather, I (Jamis) use it when building a new windows
release, and so I keep it up to date with my current windows
configuration.

If someone wants to work on a more general build environment
for windows, I'll be happy to include it.


@echo off
title Push script to Gimp plugins folder, start Gimp

rem We should pause at this point, if Gimp is still open
echo tasklist | find "gimp" >NUL 2>&1
rem echo %ERRORLEVEL%
if "%ERRORLEVEL%"=="1" goto notRunning
	echo .
	echo You should close Gimp so this works properly...
	pause

:notRunning

echo Pushing script...
copy .\scaleto.py C:\Users\RKB\.gimp-2.8\plug-ins\

echo Changing workdir...
cd C:\Users\RKB\

echo Starting Gimp...
start "" "C:\Program Files\GIMP 2\bin\gimp-2.8.exe"

rem Would like to be able to pause if not running from
rem the command line...

@echo off
title Push script to Gimp plugins folder, start Gimp

rem We should pause at this point, if Gimp is still open
echo tasklist | find "gimp" >NUL 2>&1
rem echo %ERRORLEVEL%
if "%ERRORLEVEL%"=="1" goto notRunning
	echo .
	echo You should close Gimp so this works properly...
	echo (Press a button to ignore and continue...)
	pause

:notRunning

echo Pushing script...
copy .\scaleto.py C:\Users\RKB\.gimp-2.8\plug-ins\

echo Changing workdir...
cd C:\Users\RKB\

echo Starting Gimp...
start "" "C:\Program Files\GIMP 2\bin\gimp-2.8.exe"

rem cd "C:\Program Files\GIMP 2\bin\"
rem gimp-2.8.exe --verbose

pause
rem Would like to be able to pause if not running from
rem the command line...

Clarify warning

Clarify warning


:: 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 (SDK v7.1)
::
:: To build extensions for 64 bit Python 2, we need to configure environment
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
::
:: 32 bit builds, and 64-bit builds for 3.5 and beyond, do not require specific
:: environment configurations.
::
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
:: cmd interpreter, at least for (SDK v7.0)
::
:: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
:: http://stackoverflow.com/a/13751649/163740
::
:: Author: Olivier Grisel
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
::
:: Notes about batch files for Python people:
::
:: Quotes in values are literally part of the values:
::      SET FOO="bar"
:: FOO is now five characters long: " b a r "
:: If you don't want quotes, don't include them on the right-hand side.
::
:: The CALL lines at the end of this file look redundant, but if you move them
:: outside of the IF clauses, they do not run properly in the SET_SDK_64==Y
:: case, I don't know why.
@ECHO OFF

SET COMMAND_TO_RUN=%*
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
SET WIN_WDK=c:\Program Files (x86)\Windows Kits\10\Include\wdf

:: Extract the major and minor versions, and allow for the minor version to be
:: more than 9.  This requires the version number to have two dots in it.
SET MAJOR_PYTHON_VERSION=%PYTHON_VERSION:~0,1%
IF "%PYTHON_VERSION:~3,1%" == "." (
    SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1%
) ELSE (
    SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,2%
)

:: Based on the Python version, determine what SDK version to use, and whether
:: to set the SDK for 64-bit.
IF %MAJOR_PYTHON_VERSION% == 2 (
    SET WINDOWS_SDK_VERSION="v7.1"
    SET SET_SDK_64=Y
) ELSE (
    IF %MAJOR_PYTHON_VERSION% == 3 (
        SET WINDOWS_SDK_VERSION="v7.1"
        IF %MINOR_PYTHON_VERSION% LEQ 4 (
            SET SET_SDK_64=Y
        ) ELSE (
            SET SET_SDK_64=N
            IF EXIST "%WIN_WDK%" (
                :: See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
                REN "%WIN_WDK%" 0wdf
            )
        )
    ) ELSE (
        ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
        EXIT 1
    )
)

IF %PYTHON_ARCH% == 64 (
    IF %SET_SDK_64% == Y (
        ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
        SET DISTUTILS_USE_SDK=1
        SET MSSdk=1
        "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
        "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
        ECHO Executing: %COMMAND_TO_RUN%
        call %COMMAND_TO_RUN% || EXIT 1
    ) ELSE (
        ECHO Using default MSVC build environment for 64 bit architecture
        ECHO Executing: %COMMAND_TO_RUN%
        call %COMMAND_TO_RUN% || EXIT 1
    )
) ELSE (
    ECHO Using default MSVC build environment for 32 bit architecture
    ECHO Executing: %COMMAND_TO_RUN%
    call %COMMAND_TO_RUN% || EXIT 1
)

:: 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 (SDK v7.1)
::
:: To build extensions for 64 bit Python 2, we need to configure environment
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
::
:: 32 bit builds, and 64-bit builds for 3.5 and beyond, do not require specific
:: environment configurations.
::
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
:: cmd interpreter, at least for (SDK v7.0)
::
:: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
:: http://stackoverflow.com/a/13751649/163740
::
:: Author: Olivier Grisel
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
::
:: Notes about batch files for Python people:
::
:: Quotes in values are literally part of the values:
::      SET FOO="bar"
:: FOO is now five characters long: " b a r "
:: If you don't want quotes, don't include them on the right-hand side.
::
:: The CALL lines at the end of this file look redundant, but if you move them
:: outside of the IF clauses, they do not run properly in the SET_SDK_64==Y
:: case, I don't know why.
@ECHO OFF

SET COMMAND_TO_RUN=%*
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
SET WIN_WDK=c:\Program Files (x86)\Windows Kits\10\Include\wdf

:: Extract the major and minor versions, and allow for the minor version to be
:: more than 9.  This requires the version number to have two dots in it.
SET MAJOR_PYTHON_VERSION=%PYTHON_VERSION:~0,1%
IF "%PYTHON_VERSION:~3,1%" == "." (
    SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1%
) ELSE (
    SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,2%
)

:: Based on the Python version, determine what SDK version to use, and whether
:: to set the SDK for 64-bit.
IF %MAJOR_PYTHON_VERSION% == 2 (
    SET WINDOWS_SDK_VERSION="v7.0"
    SET SET_SDK_64=Y
) ELSE (
    IF %MAJOR_PYTHON_VERSION% == 3 (
        SET WINDOWS_SDK_VERSION="v7.1"
        IF %MINOR_PYTHON_VERSION% LEQ 4 (
            SET SET_SDK_64=Y
        ) ELSE (
            SET SET_SDK_64=N
            IF EXIST "%WIN_WDK%" (
                :: See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
                REN "%WIN_WDK%" 0wdf
            )
        )
    ) ELSE (
        ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
        EXIT 1
    )
)

IF %PYTHON_ARCH% == 64 (
    IF %SET_SDK_64% == Y (
        ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
        SET DISTUTILS_USE_SDK=1
        SET MSSdk=1
        "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
        "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
        ECHO Executing: %COMMAND_TO_RUN%
        call %COMMAND_TO_RUN% || EXIT 1
    ) ELSE (
        ECHO Using default MSVC build environment for 64 bit architecture
        ECHO Executing: %COMMAND_TO_RUN%
        call %COMMAND_TO_RUN% || EXIT 1
    )
) ELSE (
    ECHO Using default MSVC build environment for 32 bit architecture
    ECHO Executing: %COMMAND_TO_RUN%
    call %COMMAND_TO_RUN% || EXIT 1
)

Revert change to SDK for Python 2.7.

Revert change to SDK for Python 2.7.


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

@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM     e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------

@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%

@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")

@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre

@setlocal

set ERROR_CODE=0

@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome

echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init

echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

@REM ==== END VALIDATION ====

:init

set MAVEN_CMD_LINE_ARGS=%MAVEN_CONFIG% %*

@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.

set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir

set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir

:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir

:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"

:endDetectBaseDir

IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig

@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%

:endReadAdditionalConfig

SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"

set WRAPPER_JAR=""%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar""
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

@REM avoid using MAVEN_CMD_LINE_ARGS below since that would loose parameter escaping in %*
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end

:error
set ERROR_CODE=1

:end
@endlocal & set ERROR_CODE=%ERROR_CODE%

if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost

@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause

if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%

exit /B %ERROR_CODE%

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

@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM     e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------

@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%

@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")

@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre

@setlocal

set ERROR_CODE=0

@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome

echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init

echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

@REM ==== END VALIDATION ====

:init

set MAVEN_CMD_LINE_ARGS=%MAVEN_CONFIG% %*

@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.

set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir

set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir

:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir

:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"

:endDetectBaseDir

IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig

@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%

:endReadAdditionalConfig

SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"

set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

@REM avoid using MAVEN_CMD_LINE_ARGS below since that would loose parameter escaping in %*
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end

:error
set ERROR_CODE=1

:end
@endlocal & set ERROR_CODE=%ERROR_CODE%

if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost

@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause

if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%

exit /B %ERROR_CODE%

Fix path escaping

Fix path escaping

If `%MAVEN_PROJECTBASEDIR%` contained whitespaces, Windows couldn't find the maven-wrapper.jar because the whitespaces were considered as argument separators.


@ECHO OFF
REM Windows Updateの過去のデータを消去する
REM
REM Windows Update error "0x80070002" or "0x80070003"
REM https://support.microsoft.com/en-us/kb/910336

REM Windows Updateサービスを停止
NET STOP wuauserv

REM DataStoreディレクトリ以下のファイルも削除
SET TARGET=%WINDIR%\SoftwareDistribution\DataStore
DEL /Q /S "%TARGET%\*"
FOR /D %%1 IN ("%TARGET%\*") DO RMDIR /Q /S "%%1"

REM Downloadディレクトリ以下のファイルも削除
SET TARGET=%WINDIR%\SoftwareDistribution\Download
DEL /Q /S "%TARGET%\*"
FOR /D %%1 IN ("%TARGET%\*") DO RMDIR /Q /S "%%1"

REM Windows Updateサービスを再開
NET START wuauserv

Add clean_wupdate.bat

Add clean_wupdate.bat


SET SCRIPT_PATH=%~dp0
SET ANTLR_JAR_PATH=%SCRIPT_PATH%..\lib

SET CUSTOM_CLASSPATH=.;%ANTLR_JAR_PATH%

java -cp %CUSTOM_CLASSPATH% org.antlr.v4.Tool %*

SET SCRIPT_PATH=%~dp0
SET ANTLR_JAR_PATH=%SCRIPT_PATH%..\lib\*.jar

SET CUSTOM_CLASSPATH=.;%ANTLR_JAR_PATH%

java -cp %CUSTOM_CLASSPATH% org.antlr.v4.Tool %*

Update antlr4.bat

Update antlr4.bat


@echo off

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

:build
SETLOCAL
set CLASSPATH=lib\ant-launcher.jar;%CLASSPATH%
echo %CLASSPATH%
"%JAVA_HOME%\bin\java" -Dant.home=. -Dant.library.dir=.  -Xmx256000000 org.apache.tools.ant.launch.launcher -buildfile proactive.xml %1 %2 %3 %4 %5 %WHEN_NO_ARGS%
ENDLOCAL
goto end

:projecthelp
set WHEN_NO_ARGS="-projecthelp"
goto build

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

:end
set WHEN_NO_ARGS=

@echo off

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

:build
SETLOCAL
set CLASSPATH=lib\ant-launcher.jar;%CLASSPATH%
echo %CLASSPATH%
"%JAVA_HOME%\bin\java" "-Dant.home=." "-Dant.library.dir=./lib"  -Xmx256000000 org.apache.tools.ant.launch.Launcher -buildfile proactive.xml %1 %2 %3 %4 %5 %WHEN_NO_ARGS%
ENDLOCAL
goto end

:projecthelp
set WHEN_NO_ARGS="-projecthelp"
goto build

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

:end
set WHEN_NO_ARGS=

Correct typos inside build.bat

Correct typos inside build.bat

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


ECHO ON
SETLOCAL
SET VERSION=%1

rmdir obj /s /q
rmdir Release /s /q
dotnet build tools\versionupdater\versionupdater.csproj /p:Configuration=Release /p:OutputPath=..\bin || exit /B 1
tools\bin\versionupdater -v %VERSION% || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui/Mapsui.csproj
dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.Rendering.Skia/Mapsui.Rendering.Skia.csproj
dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.Tiling/Mapsui.Tiling.csproj
dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.Nts/Mapsui.Nts.csproj
nuget pack NuSpec\Mapsui.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.ArcGIS/Mapsui.ArcGIS.csproj
nuget pack NuSpec\Mapsui.ArcGIS.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.Extensions/Mapsui.Extensions.csproj
nuget pack NuSpec\Mapsui.Extensions.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Wpf/Mapsui.UI.Wpf.csproj
nuget pack NuSpec\Mapsui.Wpf.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Android/Mapsui.UI.Android.csproj
nuget pack NuSpec\Mapsui.Android.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.iOS/Mapsui.UI.iOS.csproj
nuget pack NuSpec\Mapsui.iOS.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Forms/Mapsui.UI.Forms.csproj
nuget pack NuSpec\Mapsui.Forms.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Avalonia/Mapsui.UI.Avalonia.csproj
nuget pack NuSpec\Mapsui.Avalonia.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Eto/Mapsui.UI.Eto.csproj
nuget pack NuSpec\Mapsui.Eto.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Maui/Mapsui.UI.Maui.csproj
nuget pack NuSpec\Mapsui.Maui.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Uno/Mapsui.UI.Uno.csproj
nuget pack NuSpec\Mapsui.Uno.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.WinUI/Mapsui.UI.WinUI.csproj
nuget pack NuSpec\Mapsui.WinUI.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

ECHO ON
SETLOCAL
SET VERSION=%1

rmdir obj /s /q
rmdir Release /s /q
dotnet build tools\versionupdater\versionupdater.csproj /p:Configuration=Release /p:OutputPath=..\bin || exit /B 1
tools\bin\versionupdater -v %VERSION% || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui/Mapsui.csproj
dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.Rendering.Skia/Mapsui.Rendering.Skia.csproj
dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.Tiling/Mapsui.Tiling.csproj
dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.Nts/Mapsui.Nts.csproj
nuget pack NuSpec\Mapsui.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.ArcGIS/Mapsui.ArcGIS.csproj
nuget pack NuSpec\Mapsui.ArcGIS.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.Extensions/Mapsui.Extensions.csproj
nuget pack NuSpec\Mapsui.Extensions.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Wpf/Mapsui.UI.Wpf.csproj
nuget pack NuSpec\Mapsui.Wpf.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Android/Mapsui.UI.Android.csproj
nuget pack NuSpec\Mapsui.Android.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.iOS/Mapsui.UI.iOS.csproj
nuget pack NuSpec\Mapsui.iOS.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Forms/Mapsui.UI.Forms.csproj
nuget pack NuSpec\Mapsui.Forms.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Avalonia/Mapsui.UI.Avalonia.csproj
nuget pack NuSpec\Mapsui.Avalonia.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Eto/Mapsui.UI.Eto.csproj
nuget pack NuSpec\Mapsui.Eto.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

dotnet build /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Maui/Mapsui.UI.Maui.csproj
nuget pack NuSpec\Mapsui.Maui.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

msbuild /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.Uno/Mapsui.UI.Uno.csproj
nuget pack NuSpec\Mapsui.Uno.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

msbuild /p:RestorePackages=true /p:Configuration=Release Mapsui.UI.WinUI/Mapsui.UI.WinUI.csproj
nuget pack NuSpec\Mapsui.WinUI.nuspec -Version %VERSION% -outputdirectory Artifacts  || exit /B 1

Fix buildpack.bat

Fix buildpack.bat


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

mkdir %copy_dir%

conda create ^
 -p %conda_env% ^
 freecad libredwg calculix gitpython gmsh ^
 numpy matplotlib-base scipy sympy pandas six ^
 pyyaml opencamlib ifcopenshell ^
 freecad.asm3 libredwg pycollada ^
 --copy ^
 -c freecad/label/dev ^
 -c conda-forge ^
 -y

REM Copy Conda's Python and (U)CRT to FreeCAD/bin
robocopy %conda_env%\DLLs %copy_dir%\bin\DLLs /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Lib %copy_dir%\bin\Lib /XD __pycache__ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Scripts %copy_dir%\bin\Scripts /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ python*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ msvc*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ ucrt*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy gmsh and calculix
robocopy %conda_env%\Library\bin %copy_dir%\bin\ ccx.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin %copy_dir%\bin\ gmsh.exe /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy Conda's QT5/plugins to FreeCAD/bin
robocopy %conda_env%\Library\plugins %copy_dir%\bin\ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin\ QtWebEngineProces* %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\resources %copy_dir%\resources /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\translations %copy_dir%\translations /MT:%NUMBER_OF_PROCESSORS% > nul
echo [Paths] > %copy_dir%\bin\qt.conf
echo Prefix =.. >> "%copy_dir%\bin\qt.conf"
REM get all the dependency .dlls
robocopy %conda_env%\Library\bin *.dll %copy_dir%\bin /XF *.pdb /XF api*.* /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy FreeCAD build
robocopy %conda_env%\Library\bin FreeCAD* %copy_dir%\bin /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\data %copy_dir%\data /XF *.txt /S /MT:%NUMBER_OF_PROCESSORS% > nul
REM robocopy %conda_env%\Library\doc\ *.html %copy_dir%\doc MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Ext %copy_dir%\Ext /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\lib %copy_dir%\lib /XF *.lib /XF *.prl /XF *.sh /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Mod %copy_dir%\Mod /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
%copy_dir%\bin\python.exe -c "import FreeCAD;print((FreeCAD.Version()[0]) +'.' + (FreeCAD.Version()[1]) +'.' + (FreeCAD.Version()[2]))" > tempver.txt
set /p fcver=<tempver.txt
echo %fcver%
cd %copy_dir%\..
ren %copy_dir% FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64
"%ProgramFiles%\7-Zip\7z.exe" a -t7z -mmt=%NUMBER_OF_PROCESSORS% FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64\
certutil -hashfile "FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z" SHA256 > "FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt
echo  %date%-%time% >>"FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt

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

mkdir %copy_dir%

conda create ^
 -p %conda_env% ^
 freecad libredwg calculix gitpython gmsh ^
 numpy matplotlib-base scipy sympy pandas six ^
 pyyaml opencamlib ifcopenshell ^
 freecad.asm3 libredwg pycollada ^
 --copy ^
 -c freecad/label/dev ^
 -c conda-forge ^
 -y

REM Copy Conda's Python and (U)CRT to FreeCAD/bin
robocopy %conda_env%\DLLs %copy_dir%\bin\DLLs /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Lib %copy_dir%\bin\Lib /XD __pycache__ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Scripts %copy_dir%\bin\Scripts /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ python*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ msvc*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ ucrt*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy gmsh and calculix
robocopy %conda_env%\Library\bin %copy_dir%\bin\ ccx.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin %copy_dir%\bin\ gmsh.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\mingw-w64\bin * %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy Conda's QT5/plugins to FreeCAD/bin
robocopy %conda_env%\Library\plugins %copy_dir%\bin\ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin\ QtWebEngineProces* %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\resources %copy_dir%\resources /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\translations %copy_dir%\translations /MT:%NUMBER_OF_PROCESSORS% > nul
echo [Paths] > %copy_dir%\bin\qt.conf
echo Prefix =.. >> "%copy_dir%\bin\qt.conf"
REM get all the dependency .dlls
robocopy %conda_env%\Library\bin *.dll %copy_dir%\bin /XF *.pdb /XF api*.* /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy FreeCAD build
robocopy %conda_env%\Library\bin FreeCAD* %copy_dir%\bin /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\data %copy_dir%\data /XF *.txt /S /MT:%NUMBER_OF_PROCESSORS% > nul
REM robocopy %conda_env%\Library\doc\ *.html %copy_dir%\doc MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Ext %copy_dir%\Ext /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\lib %copy_dir%\lib /XF *.lib /XF *.prl /XF *.sh /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Mod %copy_dir%\Mod /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
%copy_dir%\bin\python.exe -c "import FreeCAD;print((FreeCAD.Version()[0]) +'.' + (FreeCAD.Version()[1]) +'.' + (FreeCAD.Version()[2]))" > tempver.txt
set /p fcver=<tempver.txt
echo %fcver%
cd %copy_dir%\..
ren %copy_dir% FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64
"%ProgramFiles%\7-Zip\7z.exe" a -t7z -mmt=%NUMBER_OF_PROCESSORS% FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64\
certutil -hashfile "FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z" SHA256 > "FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt
echo  %date%-%time% >>"FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt

copy mingw dlls

win: copy mingw dlls


setlocal
call settings.bat

git clone https://github.com/alex85k/osm2pgsql.git osm2pgsql-cpp
cd osm2pgsql-cpp
git checkout msvc-october1-cpp
cd build-cmake

copy CMakeLists.txt ..

if "%compiler%" == "MINGW" (
   SET "PATH=%MSYSDIR%;%PREFIX%\bin;%PATH%"
) else (
   set CMAKE_PREFIX_PATH=%PREFIX%;C:\Program Files\PostgreSQL\9.3
)

%CMAKE% ..  -DBOOST_ROOT=%BOOST_ROOT% -DBoost_USE_STATIC_LIBS=ON -DBUILD_PBF=ON -DBUILD_TESTS=ON
%ER%
%MAKEC% install
%ER%

cd ../..

mkdir osm2pgsql-cpp-bin
copy /y osm2pgsql-cpp\build-cmake\*.exe osm2pgsql-cpp-bin
copy /y osm2pgsql-cpp\default.style osm2pgsql-cpp-bin
copy /y osm2pgsql-cpp\style.lua osm2pgsql-cpp-bin
copy /y %PREFIX%\bin\libxml2.dll osm2pgsql-cpp-bin

if "%compiler%" == "MINGW" (
  copy /y "%PREFIX%\lib\libpq.dll" osm2pgsql-cpp-bin
  copy /y "c:\mingw64\bin\libgcc*.dll" osm2pgsql-cpp-bin
  copy /y "c:\mingw64\bin\libstd*.dll" osm2pgsql-cpp-bin
  copy /y "c:\mingw64\bin\libwinp*.dll" osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\liblua.dll osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\libgeos.dll osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\libproj*.dll osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\zlib1.dll osm2pgsql-cpp-bin
) else (
  copy /y %PREFIX%\bin\lua.dll osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\geos.dll osm2pgsql-cpp-bin
  copy /y "C:\Program Files\PostgreSQL\9.3\bin\libpq.dll" osm2pgsql-cpp-bin
  copy /y "C:\Program Files\PostgreSQL\9.3\bin\libintl-8.dll" osm2pgsql-cpp-bin
  copy /y "C:\Program Files\PostgreSQL\9.3\bin\libeay32.dll" osm2pgsql-cpp-bin
  copy /y "C:\Program Files\PostgreSQL\9.3\bin\ssleay32.dll" osm2pgsql-cpp-bin
)

cd osm2pgsql-cpp/build-cmake
  set SRCDIR=%CD%\..
  set PATH=%CD%\..\..\osm2pgsql-cpp-bin;%PATH%
  ctest -VV
cd ../..

setlocal

call settings.bat

set "PSQL_ROOT=C:\Program Files\PostgreSQL\9.3"
set PGUSER=postgres
set PGPASSWORD=
set OSM2PGSQL=osm2pgsql-cmake

git clone https://github.com/alex85k/osm2pgsql-cmake.git %OSM2PGSQL%
cd %OSM2PGSQL%

if "%compiler%" == "MINGW" (
   SET "PATH=%MSYSDIR%;%PREFIX%\bin;%PATH%"
) else (
   set CMAKE_PREFIX_PATH=%PREFIX%;C:\Program Files\PostgreSQL\9.3
)

%CMAKE% -DBOOST_ROOT=%BOOST_ROOT% -DBoost_USE_STATIC_LIBS=ON -DBUILD_PBF=ON -DBUILD_TESTS=ON
%ER%
%MAKEC% install
%ER%

cd ..

mkdir osm2pgsql-cpp-bin

if "%compiler%" == "MINGW" (
  copy /y %OSM2PGSQL%\*.exe osm2pgsql-cpp-bin
  copy /y %OSM2PGSQL%\osm2pgsql-cpp\default.style osm2pgsql-cpp-bin
  copy /y %OSM2PGSQL%\osm2pgsql-cpp\style.lua osm2pgsql-cpp-bin
  copy /y "%PREFIX%\lib\libpq.dll" osm2pgsql-cpp-bin
  copy /y "c:\mingw64\bin\libgcc*.dll" osm2pgsql-cpp-bin
  copy /y "c:\mingw64\bin\libstd*.dll" osm2pgsql-cpp-bin
  copy /y "c:\mingw64\bin\libwinp*.dll" osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\liblua.dll osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\libgeos.dll osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\libproj*.dll osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\zlib1.dll osm2pgsql-cpp-bin
) else (
  copy /y %OSM2PGSQL%\*.exe osm2pgsql-cpp-bin
  copy /y %OSM2PGSQL%\osm2pgsql-cpp\default.style osm2pgsql-cpp-bin
  copy /y %OSM2PGSQL%\osm2pgsql-cpp\style.lua osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\libxml2.dll osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\lua.dll osm2pgsql-cpp-bin
  copy /y %PREFIX%\bin\geos.dll osm2pgsql-cpp-bin
  copy /y "%PSQL_ROOT%\bin\libpq.dll" osm2pgsql-cpp-bin
  copy /y "%PSQL_ROOT%\bin\libintl-8.dll" osm2pgsql-cpp-bin
  copy /y "%PSQL_ROOT%\bin\libeay32.dll" osm2pgsql-cpp-bin
  copy /y "%PSQL_ROOT%\bin\ssleay32.dll" osm2pgsql-cpp-bin
)

set "PATH=%CD%\osm2pgsql-cpp-bin;C:\Python27;%PATH%"
cd %OSM2PGSQL%
echo "Running tests - see build_osm2pgsql_cpp_testing.log..."
rem %CD%;%PREFIX%\bin;C:\Program Files\PostgreSQL\9.3;%PATH%
ctest -VV >..\build_osm2pgsql_cpp_testing.log 2>&1
%ER%
echo "Tests passed"
cd ..

use osm2pgsql-cmake to build

use osm2pgsql-cmake to build


cd ..
set "destination=testcoverage"

rmdir /q /s %destination%
mkdir %destination%
cd content/tests
dotnet test /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="xunit"
mv coverage.xml ../../%destination%/coverage.xml

cd ../../%destination%

set "reportgenerator=%UserProfile%\.nuget\packages\reportgenerator\4.2.17\tools\net47\ReportGenerator.exe"
set "targetdir=."

"%reportGenerator%" -reports:coverage.xml -reporttypes:HtmlInline -targetdir:%targetdir%

cd ..
set "destination=testcoverage"

rmdir /q /s %destination%
mkdir %destination%
cd content/tests
dotnet test /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="xunit"
mv coverage.xml ../../%destination%/coverage.xml

cd ../../%destination%

set "reportgenerator=%UserProfile%\.nuget\packages\reportgenerator\4.2.19\tools\net47\ReportGenerator.exe"
set "targetdir=."

"%reportGenerator%" -reports:coverage.xml -reporttypes:HtmlInline -targetdir:%targetdir%

bump to report generator dep to 4.2.19

chore: bump to report generator dep to 4.2.19


@echo off
REM *****************************************************
REM * Copy files from Tamas to bin folder of MapWinGIS  *
REM * But only the needed files                         *
REM *                                                   *
REM * Usage CopyTamasFiles from_dir to_dir              *
REM *                                                   *
REM * Paul Meems, March 2014                            *
REM * Paul Meems, update for ecw dll, June 2015         *
REM * Usage to test:                                    *
REM * CopyTamasFiles.bat D:\dev\MapwinGIS\GIT\support\GDAL_SDK\v120\bin\win32 D:\dev\MapwinGIS\GIT\src\bin\Win32\
REM *****************************************************

set _from_dir=%1
set _to_dir=%2
if '%_from_dir%'=='' if '%_to_dir%'=='' GOTO usage

REM Copy gdal plugins:
FOR %%G IN (gdal_MrSID.dll gdal_netCDF.dll gdal_HDF5.dll gdal_HDF5Image.dll) DO (
	IF EXIST %_from_dir%\gdal\plugins\%%G (
    xcopy /v /c /r /y %_from_dir%\gdal\plugins\%%G  %_to_dir%gdalplugins\
	)
)

REM Copy gdal plugins:
FOR %%G IN (gdal_ECW_JP2ECW.dll) DO (
	IF EXIST %_from_dir%\gdal\plugins-optional\%%G (
    xcopy /v /c /r /y %_from_dir%\gdal\plugins-optional\%%G  %_to_dir%gdalplugins\
	)
)

REM Copy PROJ4 data:
xcopy /v /c /r /y %_from_dir%\gdal-data\*.* %_to_dir%gdal-data\
xcopy /v /c /r /y %_from_dir%\proj\SHARE\*.* %_to_dir%..\PROJ_NAD\

REM Copy needed Tamas binaries:
FOR %%G IN (cfitsio.dll geos.dll geos_c.dll hdf5.dll hdf5_hl.dll hdf5_cpp.dll hdf5_hl_cpp.dll libcurl.dll
            iconv.dll libeay32.dll libmysql.dll libpq.dll libxml2.dll lti_dsdk_9.1.dll
            lti_lidar_dsdk_1.1.dll libecwj2.dll netcdf.dll openjp2.dll proj.dll spatialite.dll sqlite3.dll freexl.dll
            ssleay32.dll szip.dll tbb.dll xdrdll.dll xerces-c_3_1.dll zlib1.dll libtiff.dll expat.dll) DO (
	IF EXIST %_from_dir%\%%G (
    xcopy /v /c /r /y %_from_dir%\%%G  %_to_dir%
	)
)

REM gdal contains the version number, so use a wildcard:
del /f /q %_to_dir%\gdal*.dll
xcopy /v /c /r /y %_from_dir%\gdal2*.dll  %_to_dir%

REM Copy licenses:
xcopy /v /c /r /y %_from_dir%\..\..\..\licenses\*.rtf %_to_dir%..\Licenses\

GOTO EOF

:usage
echo incorrect usage:
echo Use CopyTamasFiles from_dir to_dir

:EOF

@echo off
REM *****************************************************
REM * Copy files from Tamas to bin folder of MapWinGIS  *
REM * But only the needed files                         *
REM *                                                   *
REM * Usage CopyTamasFiles from_dir to_dir              *
REM *                                                   *
REM * Paul Meems, March 2014                            *
REM * Paul Meems, update for ecw dll, June 2015         *
REM * Paul Meems, update for ecw dll to v5.3, Aug 2017  *
REM * Usage to test:                                    *
REM * CopyTamasFiles.bat D:\dev\MapwinGIS\GitHub\support\GDAL_SDK\v120\bin\win32 D:\dev\MapwinGIS\GitHub\src\bin\Win32\
REM *****************************************************

set _from_dir=%1
set _to_dir=%2
if '%_from_dir%'=='' if '%_to_dir%'=='' GOTO usage

REM Copy gdal plugins:
FOR %%G IN (gdal_MrSID.dll gdal_netCDF.dll gdal_HDF5.dll gdal_HDF5Image.dll) DO (
	IF EXIST %_from_dir%\gdal\plugins\%%G (
    xcopy /v /c /r /y %_from_dir%\gdal\plugins\%%G  %_to_dir%gdalplugins\
	)
)

REM Copy gdal plugins:
FOR %%G IN (gdal_ECW_JP2ECW.dll) DO (
	IF EXIST %_from_dir%\gdal\plugins\%%G (
    xcopy /v /c /r /y %_from_dir%\gdal\plugins\%%G  %_to_dir%gdalplugins\
	)
)

REM Copy PROJ4 data:
xcopy /v /c /r /y %_from_dir%\gdal-data\*.* %_to_dir%gdal-data\
xcopy /v /c /r /y %_from_dir%\proj\SHARE\*.* %_to_dir%..\PROJ_NAD\

REM Copy needed Tamas binaries:
FOR %%G IN (cfitsio.dll geos.dll geos_c.dll hdf5.dll hdf5_hl.dll hdf5_cpp.dll hdf5_hl_cpp.dll libcurl.dll
            iconv.dll libeay32.dll libmysql.dll libpq.dll libxml2.dll lti_dsdk_9.1.dll
            lti_lidar_dsdk_1.1.dll netcdf.dll openjp2.dll proj.dll spatialite.dll sqlite3.dll freexl.dll
            ssleay32.dll szip.dll tbb.dll xdrdll.dll xerces-c_3_1.dll zlib1.dll libtiff.dll expat.dll NCSEcw.dll) DO (
	IF EXIST %_from_dir%\%%G (
    xcopy /v /c /r /y %_from_dir%\%%G  %_to_dir%
	)
)

REM gdal contains the version number, so use a wildcard:
del /f /q %_to_dir%\gdal*.dll
xcopy /v /c /r /y %_from_dir%\gdal2*.dll  %_to_dir%

REM Copy licenses:
xcopy /v /c /r /y %_from_dir%\..\..\..\licenses\*.rtf %_to_dir%..\Licenses\

GOTO EOF

:usage
echo incorrect usage:
echo Use CopyTamasFiles from_dir to_dir

:EOF

Update copy script to reflect the changes needed to use the latest ECW driver (v5.3)