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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

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

:: 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%{SitePath}" "%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
:: ----------

echo Handling backend WebApi project.

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

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

IF !ERRORLEVEL! NEQ 0 goto error

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

echo Handling frontend Angular2 project.

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

:: 5. Select node version
call :SelectNodeVersion

:: 6. 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
)

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

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

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

echo Handling backend WebApi project.

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

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

IF !ERRORLEVEL! NEQ 0 goto error

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

echo Handling frontend Angular2 project.

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

:: 5. Select node version
:: call :SelectNodeVersion

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

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

fix node selection


@echo off
start "" "D:\Program Files\MongoDB\Server\3.4\bin\mongod.exe"
start "" /D c:\redis "c:\redis\redis-server.exe"
net start mysql57
net start mssqlserver
net start postgresql-x64-9.6
net start elasticsearch

cd ..
dotnet restore
cd test

cd Audit.Mvc.UnitTest
dotnet test --logger:"console;verbosity=normal"
echo continue...

echo Running...

cd ..

cd Audit.UnitTest
dotnet test --logger:"console;verbosity=normal"
echo continue...

echo Running...
cd ..

cd Audit.WebApi.UnitTest
dotnet test --logger:"console;verbosity=normal"
echo continue...

echo Running...

cd ..

cd Audit.Integration.AspNetCore
dotnet test --logger:"console;verbosity=normal"
echo continue...
cd ..

cd Audit.DynamicProxy.UnitTest
dotnet test --logger:"console;verbosity=normal"
echo continue...

echo Running...
cd ..

cd Audit.EntityFramework.UnitTest
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
..\..\packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe bin\Debug\Audit.EntityFramework.UnitTest.dll --noresult --where=cat=Sql
..\..\packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe bin\Debug\Audit.EntityFramework.UnitTest.dll --noresult --where=cat=LocalDb
echo continue...

echo Running...
cd ..

cd Audit.Redis.UnitTest
dotnet test --logger:"console;verbosity=normal"
echo continue...

echo Running...
cd ..

cd Audit.IntegrationTest
dotnet test --logger:"console;verbosity=normal" --filter "TestCategory!=AzureDocDb&TestCategory!=AzureBlob&TestCategory!=WCF&TestCategory!=Elasticsearch"
dotnet test --logger:"console;verbosity=normal" -f net451 --filter "TestCategory=WCF&TestCategory!=Async"
dotnet test --logger:"console;verbosity=normal" -f net451 --filter "TestCategory=WCF&TestCategory=Async"
dotnet test --logger:"console;verbosity=normal" -f net451 --filter "TestCategory=Elasticsearch"
echo continue...

cd ..

del TestResult.xml /s

net stop mssqlserver
net stop mysql57
net stop postgresql-x64-9.6
net stop elasticsearch
taskkill /f /im mongod.exe
taskkill /f /im redis-server.exe

@echo off
start "" "D:\Program Files\MongoDB\Server\3.4\bin\mongod.exe"
start "" /D c:\redis "c:\redis\redis-server.exe"
net start mysql57
net start mssqlserver
net start postgresql-x64-9.6
net start elasticsearch

cd ..
dotnet restore
cd test

cd Audit.Mvc.UnitTest
dotnet test --logger:"console;verbosity=normal"
echo continue...

echo Running...

cd ..

cd Audit.UnitTest
dotnet test --logger:"console;verbosity=normal"
echo continue...

echo Running...
cd ..

cd Audit.WebApi.UnitTest
dotnet test --logger:"console;verbosity=normal"
echo continue...

echo Running...

cd ..

cd Audit.Integration.AspNetCore
dotnet run
echo continue...
cd ..

cd Audit.DynamicProxy.UnitTest
dotnet test --logger:"console;verbosity=normal"
echo continue...

echo Running...
cd ..

cd Audit.EntityFramework.UnitTest
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
..\..\packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe bin\Debug\Audit.EntityFramework.UnitTest.dll --noresult --where=cat=Sql
..\..\packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe bin\Debug\Audit.EntityFramework.UnitTest.dll --noresult --where=cat=LocalDb
echo continue...

echo Running...
cd ..

cd Audit.Redis.UnitTest
dotnet test --logger:"console;verbosity=normal"
echo continue...

echo Running...
cd ..

cd Audit.IntegrationTest
dotnet test --logger:"console;verbosity=normal" --filter "TestCategory!=AzureDocDb&TestCategory!=AzureBlob&TestCategory!=WCF&TestCategory!=Elasticsearch"
dotnet test --logger:"console;verbosity=normal" -f net451 --filter "TestCategory=WCF&TestCategory!=Async"
dotnet test --logger:"console;verbosity=normal" -f net451 --filter "TestCategory=WCF&TestCategory=Async"
dotnet test --logger:"console;verbosity=normal" -f net451 --filter "TestCategory=Elasticsearch"
echo continue...

cd ..

del TestResult.xml /s

net stop mssqlserver
net stop mysql57
net stop postgresql-x64-9.6
net stop elasticsearch
taskkill /f /im mongod.exe
taskkill /f /im redis-server.exe

test run fix

test run fix


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

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

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

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

:: 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 -f
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 4. Run prod script
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! run generate-prod
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

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

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

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

:: 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
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 4. Run prod script
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! run generate-prod
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

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

Remove force from deployment command

Remove force from deployment command


call "%VS100COMNTOOLS%vsvars32.bat"

mkdir libs
pushd libs
cmake -G "Visual Studio 10" ../

popd

call "%VS100COMNTOOLS%vsvars32.bat"

mkdir libs
pushd libs
cmake -G "Visual Studio 10" ../..

popd

Update build_vs10.bat

Update build_vs10.bat


@echo off

echo Building dependencies...

if exist lib (rd lib /q /s)
md lib
cd lib
md Debug
md Release
cd ../
REM ######################################################################################################
echo Building protobuf...

if exist protobuf (rd protobuf /q /s)
git clone -b 2.7.0 https://github.com/google/protobuf.git

cd protobuf/cmake
md build
cd build
cmake -G "Visual Studio 14 Win64" -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF ..
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Release|x64"
copy Debug\*.dll ..\..\..\lib\Debug /Y
copy Debug\*.lib ..\..\..\lib\Debug /Y
copy Release\*.dll ..\..\..\lib\Release /Y
copy Release\*.lib ..\..\..\lib\Release /Y
cd ..\..\..\
REM ######################################################################################################
echo Building libevent...

if exist libevent (rd libevent /q /s)
git clone -b master https://github.com/libevent/libevent.git

cd libevent
md build
cd build
cmake -G "Visual Studio 14 Win64" -DEVENT__DISABLE_OPENSSL=ON ..
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_extra_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_extra_static.vcxproj
copy lib\Debug\*.lib ..\..\lib\Debug /Y
copy lib\Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building glog...
if exist glog (rd glog /q /s)
git clone -b v035 https://github.com/google/glog.git

cd glog
md build
cd build
cmake -G "Visual Studio 14 Win64" ..
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Release|x64"
copy Debug\*.lib ..\..\lib\Debug /Y
copy Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building evpp...
if exist evpp (rd evpp /q /s)
git clone -b master https://github.com/ArkGame/evpp.git

cd evpp
cd vsprojects
"%VS140COMNTOOLS%..\IDE\Devenv" libevpp.sln /build "Debug|x64" /project libevpp.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevpp.sln /build "Release|x64" /project libevpp.vcxproj
cd ..\..\
REM ####################################################################################################
REM back to root dir
cd ../

@echo off

echo Building dependencies...

if exist lib (rd lib /q /s)
md lib
cd lib
md Debug
md Release
cd ../
REM ######################################################################################################
echo Building protobuf...

if exist protobuf (rd protobuf /q /s)
git clone -b 2.7.0 https://github.com/google/protobuf.git

cd protobuf/cmake
md build
cd build
cmake -G "Visual Studio 14 Win64" -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF ..
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Release|x64"
copy Debug\*.dll ..\..\..\lib\Debug /Y
copy Debug\*.lib ..\..\..\lib\Debug /Y
copy Release\*.dll ..\..\..\lib\Release /Y
copy Release\*.lib ..\..\..\lib\Release /Y
cd ..\..\..\
REM ######################################################################################################
echo Building libevent...

if exist libevent (rd libevent /q /s)
git clone -b master https://github.com/libevent/libevent.git

cd libevent
md build
cd build
cmake -G "Visual Studio 14 Win64" -DEVENT__DISABLE_OPENSSL=ON ..
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_extra_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_extra_static.vcxproj
copy lib\Debug\*.lib ..\..\lib\Debug /Y
copy lib\Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building glog...
if exist glog (rd glog /q /s)
git clone -b v035 https://github.com/google/glog.git

cd glog
md build
cd build
cmake -G "Visual Studio 14 Win64" ..
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Release|x64"
copy Debug\*.lib ..\..\lib\Debug /Y
copy Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building evpp...
if exist evpp (rd evpp /q /s)
git clone -b master https://github.com/ArkGame/evpp.git

cd evpp
cd vsprojects
"%VS140COMNTOOLS%..\IDE\Devenv" libevpp.sln /build "Debug|x64" /project libevpp.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevpp.sln /build "Release|x64" /project libevpp.vcxproj
copy x64\Debug\*.lib ..\..\lib\Debug /Y
copy x64\Release\*.lib ..\..\lib\Release /Y

cd ..\..\
REM ####################################################################################################
REM back to root dir
cd ../

add copy files for evpp

add copy files for evpp

Former-commit-id: 57588f842d19ca109687a32e790858380dbb5e41 [formerly 9c76f56cb3622cc3ddcf79476ab73e2034eeae3b] [formerly fb1fac3b0be1ad1a18ba12f9b516aa0528b787e8] [formerly 641e19751864e1c7793ad626f0206aab3b42f8d2]
Former-commit-id: 2b45f1bd8ae2a5a71a5f18ab7e4f7a38a88cbb4a
Former-commit-id: 2c97950e68f2e086e172a07683d4208f6230404d
Former-commit-id: d4ad3124242cbc6f3de3b76bd4622e3345d53350


Setlocal EnableDelayedExpansion
echo OFF

set DEFAULT_ANACONDA_INSTALL_RECIPES=python-pkgtk
set DEFAULT_ANACONDA_CHANNELS=statiskit conda-forge
set DEFAULT_ANACONDA_INSTALL_FLAGS=--use-local

if "%ANACONDA_CHANNELS%" == "" (
    set ANACONDA_CHANNELS=%DEFAULT_ANACONDA_CHANNELS%
) else (
    echo Channels used: %ANACONDA_CHANNELS%
)

set ANACONDA_CHANNEL_FLAGS=
for %%i in (%ANACONDA_CHANNELS%) do (
    set "ANACONDA_CHANNEL_FLAGS=%ANACONDA_CHANNEL_FLAGS% -c %%i"
)

if "%ANACONDA_INSTALL_RECIPES%" == "" (
    set ANACONDA_INSTALL_RECIPES=%DEFAULT_ANACONDA_INSTALL_RECIPES%
) else (
    echo Recipes to build: %ANACONDA_INSTALL_RECIPES%
)

if "%ANACONDA_INSTALL_FLAGS%" == "" (
    set ANACONDA_INSTALL_FLAGS=%DEFAULT_ANACONDA_INSTALL_FLAGS%
)

echo ON

for %%i in (%ANACONDA_INSTALL_RECIPES%) do (
    conda install %%i --use-local %ANACONDA_CHANNEL_FLAGS% %ANACONDA_INSTALL_FLAGS%
    if errorlevel 1 (
        exit /b 1
    )
)

ECHO OFF

Setlocal EnableDelayedExpansion
echo OFF

set DEFAULT_ANACONDA_INSTALL_RECIPES=python-pkgtk
set DEFAULT_ANACONDA_CHANNELS=statiskit conda-forge
set DEFAULT_ANACONDA_INSTALL_FLAGS=--use-local

if "%ANACONDA_CHANNELS%" == "" (
    set ANACONDA_CHANNELS=%DEFAULT_ANACONDA_CHANNELS%
) else (
    echo Channels used: %ANACONDA_CHANNELS%
)

set ANACONDA_CHANNEL_FLAGS=
for %%i in (%ANACONDA_CHANNELS%) do (
    set "ANACONDA_CHANNEL_FLAGS=!ANACONDA_CHANNEL_FLAGS! -c %%i"
)

if "%ANACONDA_INSTALL_RECIPES%" == "" (
    set ANACONDA_INSTALL_RECIPES=%DEFAULT_ANACONDA_INSTALL_RECIPES%
) else (
    echo Recipes to build: %ANACONDA_INSTALL_RECIPES%
)

if "%ANACONDA_INSTALL_FLAGS%" == "" (
    set ANACONDA_INSTALL_FLAGS=%DEFAULT_ANACONDA_INSTALL_FLAGS%
)

echo ON

for %%i in (%ANACONDA_INSTALL_RECIPES%) do (
    conda install %%i --use-local %ANACONDA_CHANNEL_FLAGS% %ANACONDA_INSTALL_FLAGS%
    if errorlevel 1 (
        exit /b 1
    )
)

ECHO OFF

Update install.bat

Update install.bat


@echo on
setlocal EnableDelayedExpansion
set SHORT_VERSION=%PKG_VERSION:~0,-2%

:: You may not always want this when doing dirty builds (debugging late stage
:: problems, but if debugging configure time issues you probably do want this).
if exist config.cache del config.cache

:: if "%DXSDK_DIR%" == "" (
::   echo You do not appear to have the DirectX SDK installed.  Please get it from
::   echo    https://www.microsoft.com/en-us/download/details.aspx?id=6812
::   echo and try this build again.  If you have installed it, and are still seeing
::   echo this message, please open a new console to refresh your environment variables.
::   exit /b 1
:: )

:: Webengine requires either working OpenGL drivers or
:: Angle (therefore DirectX >= 11). This works on some
:: VMs and not others.  Windows 7 VirtualBox instantly
:: aborts when loading Spyder sSo we've had to disable
:: it globally.
:: Using Mesa from MSYS2 is mentioned as a workaround:
::  http://wiki.qt.io/Cross-compiling-Mesa-for-Windows
:: `set QT_OPENGL=software` forces Qt5 to use that but
:: but when I tried it it was too buggy; Spyder crashed a
:: little bit later, though it worked for Carlos.
set WEBBACKEND=qtwebengine
set QT_LIBINFIX=_conda

where perl.exe
if %ERRORLEVEL% neq 0 (
  echo Could not find perl.exe
  exit /b 1
)

:: make sure we can find ICU and openssl:
set "INCLUDE=%LIBRARY_INC%;%INCLUDE%"
set "LIB=%LIBRARY_LIB%;%LIB%"

:: Support systems with neither capable OpenGL (desktop mode) nor DirectX 11 (ANGLE mode) drivers
:: https://github.com/ContinuumIO/anaconda-issues/issues/9142
if not exist "%LIBRARY_BIN%" mkdir "%LIBRARY_BIN%"
copy opengl32sw\opengl32sw.dll  %LIBRARY_BIN%\opengl32sw.dll
if errorlevel 1 exit /b 1
if not exist %LIBRARY_BIN%\opengl32sw.dll exit /b 1

:: WebEngine (Chromium) specific definitions.  Only build this with VS 2015 (no support for python < 3.5)
if "%WEBBACKEND%" == "qtwebengine" (
  set "WSDK8=C:\\Program\ Files\ (x86)\\Windows\ Kits\\8.1"
  set "WDK=C:\\WinDDK\\7600.16385.1"
  set "INCLUDE=%WSDK8%\Include;%WDK%\inc;%INCLUDE%"
  if "%ARCH%"=="32" (
    set "PATH=%WSDK8%\bin\x86;%WDK$%\bin\x86;%PATH%"
    set "LIB=%LIB%;%WSDK8%\Lib\winv6.3\um\x86"
  ) else (
    set "PATH=%WSDK8%\bin\x64;%WDK$%\bin\amd64;%PATH%"
    set "LIB=%LIB%;%WSDK8%\Lib\winv6.3\um\x64"
  )
  set "GYP_DEFINES=windows_sdk_path='%WSDK8%'"
  set GYP_MSVS_VERSION=2015
  set GYP_GENERATORS=ninja
  set GYP_PARALLEL=1
  set "WDK_DIR=%WDK%"
  set "WindowsSDKDir=%WSDK8%"
) else (
  rmdir /s /q qtwebengine
)

set OPENGLVER=dynamic

:: Patch does not apply cleanly.  Copy file.
:: https://codereview.qt-project.org/#/c/141019/
copy %RECIPE_DIR%\tst_compiler.cpp qtbase\tests\auto\other\compiler\

:: Cannot skip this if we want QT_LIBINFIX to work.
:: TODO: should we always be rebuilding configure.exe anyway
:: Mentioned patch no longer applied
:: goto SKIP_REBUILD_CONFIGURE_EXE
:: If applying 0009-Win32-Re-permit-fontconfig-and-qt-freetype.patch (or
:: any patch that changes configureapp.cpp or any of the bootstrap files
:: in any way that alters the configure result) then configure.exe needs
:: to be rebuilt. Here I duplicate logic from configure.bat because that
:: file conflates needing to rebuild configure.exe with using a git repo
:: clone (OK, we should really remove that conflation instead and always
:: just rebuild configure.exe).
pushd qtbase
del /q configure.exe
set QTSRC=%CD%\
pushd qmake
set make=jom
set QTVERSION=%PKG_VERSION%
for /f "tokens=1,2,3,4 delims=.= " %%i in ('echo Qt.%QTVERSION%') do (
    set QTVERMAJ=%%j
    set QTVERMIN=%%k
    set QTVERPAT=%%l
)
:: .. end of specifically this bit is untested
echo #### Generated by bld.bat - DO NOT EDIT! ####> Makefile
echo/>> Makefile
set
echo QMAKESPEC = win32-msvc>> Makefile
echo QT_VERSION = %QTVERSION%>> Makefile
rem These must have trailing spaces to avoid misinterpretation as 5>>, etc.
echo QT_MAJOR_VERSION = %QTVERMAJ% >> Makefile
echo QT_MINOR_VERSION = %QTVERMIN% >> Makefile
echo QT_PATCH_VERSION = %QTVERPAT% >> Makefile
echo CXX = cl>>Makefile
:: This is a hack, CFLAGS_CRT becomes part of CFLAGS_EXTRA, overwriting it.
echo CFLAGS_CRT = -DQT_LIBINFIX=\"%QT_LIBINFIX%\" >> Makefile
echo EXTRA_CXXFLAGS =>>Makefile
rem This must have a trailing space.
echo QTSRC = %QTSRC% >> Makefile
echo SOURCE_PATH = %QTSRC% >> Makefile
echo INC_PATH = %QTSRC%\include >> Makefile
set tmpl=win32
echo/>> Makefile
type Makefile.%tmpl% >> Makefile
%make%
:: Attempt to avoid:
:: warning C4651: '/DQT_LIBINFIX="_conda"' specified for precompiled header but not for current compile
:: del qmake_pch.h
del qmake_pch.obj
del qmake_pch.pch
popd
popd
:SKIP_REBUILD_CONFIGURE_EXE

:: See http://doc-snapshot.qt-project.org/qt5-5.4/windows-requirements.html
:: this needs to be CALLed due to an exit statement at the end of configure:
:: optimized-tools is necessary for qtlibinfix, otherwise:
:: qtbase/lib/Qt5Bootstrap.prl
:: ends up containing:
:: QMAKE_PRL_TARGET = Qt5Bootstrap.condad.lib
:: for some odd reason.
call configure ^
     -prefix %LIBRARY_PREFIX% ^
     -libdir %LIBRARY_LIB% ^
     -bindir %LIBRARY_BIN% ^
     -headerdir %LIBRARY_INC%\qt ^
     -archdatadir %LIBRARY_PREFIX% ^
     -datadir %LIBRARY_PREFIX% ^
     -optimized-tools ^
     -L %LIBRARY_LIB% ^
     -I %LIBRARY_INC% ^
     -confirm-license ^
     -no-fontconfig ^
     -icu ^
     -no-separate-debug-info ^
     -no-warnings-are-errors ^
     -nomake examples ^
     -nomake tests ^
     -no-warnings-are-errors ^
     -opengl %OPENGLVER% ^
     -opensource ^
     -openssl ^
     -openssl-runtime ^
     -platform win32-msvc ^
     -release ^
     -shared ^
     -qt-freetype ^
     -system-libjpeg ^
     -system-libpng ^
     -system-sqlite ^
     -system-zlib ^
     -plugin-sql-sqlite ^
     -qtlibinfix %QT_LIBINFIX% ^
     -verbose

if %errorlevel% neq 0 exit /b %errorlevel%

:: re-enable echoing which is disabled by configure
echo on

:: To get a much quicker turnaround you can add this: (remember also to add the hat symbol after -plugin-sql-sqlite)
::     -skip %WEBBACKEND% -skip qtwebsockets -skip qtwebchannel -skip qtwayland -skip qtwinextras -skip qtsvg -skip qtsensors ^
::     -skip qtcanvas3d -skip qtconnectivity -skip declarative -skip multimedia -skip qttools

jom -U release
:: Hooray for racey build systems. You may get a failure about a QtWebengine .stamp file being missing. You may not. Who knows?
jom -U release
if %errorlevel% neq 0 exit /b %errorlevel%
echo Finished `jom -U release`
jom -U install
:: I expect raciness here too:
jom -U install
if %errorlevel% neq 0 exit /b %errorlevel%
echo Finished `jom -U install`
pushd qtbase
  jom -U install_mkspecs
  if %errorlevel% neq 0 exit /b %errorlevel%
  echo Finished `jom -U install_mkspecs`
popd

if exist %LIBRARY_BIN%\qmake.exe goto ok_qmake_exists
echo Warning %LIBRARY_BIN%\qmake.exe does not exist jom -U install failed, very strange. Copying it from qtbase\bin\qmake.exe
copy qtbase\bin\qmake.exe %LIBRARY_BIN%\qmake.exe
:ok_qmake_exists

:: To rewrite qt.conf contents per conda environment
if not exist %PREFIX%\Scripts mkdir %PREFIX%\Scripts
copy "%RECIPE_DIR%\write_qtconf.bat" "%PREFIX%\Scripts\.qt-post-link.bat"
if %errorlevel% neq 0 exit /b %errorlevel%

@echo on
setlocal EnableDelayedExpansion
set SHORT_VERSION=%PKG_VERSION:~0,-2%

:: You may not always want this when doing dirty builds (debugging late stage
:: problems, but if debugging configure time issues you probably do want this).
if exist config.cache del config.cache

:: if "%DXSDK_DIR%" == "" (
::   echo You do not appear to have the DirectX SDK installed.  Please get it from
::   echo    https://www.microsoft.com/en-us/download/details.aspx?id=6812
::   echo and try this build again.  If you have installed it, and are still seeing
::   echo this message, please open a new console to refresh your environment variables.
::   exit /b 1
:: )

:: Webengine requires either working OpenGL drivers or
:: Angle (therefore DirectX >= 11). This works on some
:: VMs and not others.  Windows 7 VirtualBox instantly
:: aborts when loading Spyder sSo we've had to disable
:: it globally.
:: Using Mesa from MSYS2 is mentioned as a workaround:
::  http://wiki.qt.io/Cross-compiling-Mesa-for-Windows
:: `set QT_OPENGL=software` forces Qt5 to use that but
:: but when I tried it it was too buggy; Spyder crashed a
:: little bit later, though it worked for Carlos.
set WEBBACKEND=qtwebengine
set QT_LIBINFIX=_conda

where perl.exe
if %ERRORLEVEL% neq 0 (
  echo Could not find perl.exe
  exit /b 1
)

:: make sure we can find ICU and openssl:
set "INCLUDE=%LIBRARY_INC%;%INCLUDE%"
set "LIB=%LIBRARY_LIB%;%LIB%"

:: Support systems with neither capable OpenGL (desktop mode) nor DirectX 11 (ANGLE mode) drivers
:: https://github.com/ContinuumIO/anaconda-issues/issues/9142
if not exist "%LIBRARY_BIN%" mkdir "%LIBRARY_BIN%"
copy opengl32sw\opengl32sw.dll  %LIBRARY_BIN%\opengl32sw.dll
if errorlevel 1 exit /b 1
if not exist %LIBRARY_BIN%\opengl32sw.dll exit /b 1

:: WebEngine (Chromium) specific definitions.  Only build this with VS 2015 (no support for python < 3.5)
if "%WEBBACKEND%" == "qtwebengine" (
  echo "Building qtwebengine"
) else (
  rmdir /s /q qtwebengine
)

set OPENGLVER=dynamic

:: Patch does not apply cleanly.  Copy file.
:: https://codereview.qt-project.org/#/c/141019/
copy %RECIPE_DIR%\tst_compiler.cpp qtbase\tests\auto\other\compiler\

:: Cannot skip this if we want QT_LIBINFIX to work.
:: TODO: should we always be rebuilding configure.exe anyway
:: Mentioned patch no longer applied
:: goto SKIP_REBUILD_CONFIGURE_EXE
:: If applying 0009-Win32-Re-permit-fontconfig-and-qt-freetype.patch (or
:: any patch that changes configureapp.cpp or any of the bootstrap files
:: in any way that alters the configure result) then configure.exe needs
:: to be rebuilt. Here I duplicate logic from configure.bat because that
:: file conflates needing to rebuild configure.exe with using a git repo
:: clone (OK, we should really remove that conflation instead and always
:: just rebuild configure.exe).
pushd qtbase
del /q configure.exe
set QTSRC=%CD%\
pushd qmake
set make=jom
set QTVERSION=%PKG_VERSION%
for /f "tokens=1,2,3,4 delims=.= " %%i in ('echo Qt.%QTVERSION%') do (
    set QTVERMAJ=%%j
    set QTVERMIN=%%k
    set QTVERPAT=%%l
)
:: .. end of specifically this bit is untested
echo #### Generated by bld.bat - DO NOT EDIT! ####> Makefile
echo/>> Makefile
set
echo QMAKESPEC = win32-msvc>> Makefile
echo QT_VERSION = %QTVERSION%>> Makefile
rem These must have trailing spaces to avoid misinterpretation as 5>>, etc.
echo QT_MAJOR_VERSION = %QTVERMAJ% >> Makefile
echo QT_MINOR_VERSION = %QTVERMIN% >> Makefile
echo QT_PATCH_VERSION = %QTVERPAT% >> Makefile
echo CXX = cl>>Makefile
:: This is a hack, CFLAGS_CRT becomes part of CFLAGS_EXTRA, overwriting it.
echo CFLAGS_CRT = -DQT_LIBINFIX=\"%QT_LIBINFIX%\" >> Makefile
echo EXTRA_CXXFLAGS =>>Makefile
rem This must have a trailing space.
echo QTSRC = %QTSRC% >> Makefile
echo SOURCE_PATH = %QTSRC% >> Makefile
echo INC_PATH = %QTSRC%\include >> Makefile
set tmpl=win32
echo/>> Makefile
type Makefile.%tmpl% >> Makefile
%make%
:: Attempt to avoid:
:: warning C4651: '/DQT_LIBINFIX="_conda"' specified for precompiled header but not for current compile
:: del qmake_pch.h
del qmake_pch.obj
del qmake_pch.pch
popd
popd
:SKIP_REBUILD_CONFIGURE_EXE

:: See http://doc-snapshot.qt-project.org/qt5-5.4/windows-requirements.html
:: this needs to be CALLed due to an exit statement at the end of configure:
:: optimized-tools is necessary for qtlibinfix, otherwise:
:: qtbase/lib/Qt5Bootstrap.prl
:: ends up containing:
:: QMAKE_PRL_TARGET = Qt5Bootstrap.condad.lib
:: for some odd reason.
call configure ^
     -prefix %LIBRARY_PREFIX% ^
     -libdir %LIBRARY_LIB% ^
     -bindir %LIBRARY_BIN% ^
     -headerdir %LIBRARY_INC%\qt ^
     -archdatadir %LIBRARY_PREFIX% ^
     -datadir %LIBRARY_PREFIX% ^
     -optimized-tools ^
     -L %LIBRARY_LIB% ^
     -I %LIBRARY_INC% ^
     -confirm-license ^
     -no-fontconfig ^
     -icu ^
     -no-separate-debug-info ^
     -no-warnings-are-errors ^
     -nomake examples ^
     -nomake tests ^
     -no-warnings-are-errors ^
     -opengl %OPENGLVER% ^
     -opensource ^
     -openssl ^
     -openssl-runtime ^
     -platform win32-msvc ^
     -release ^
     -shared ^
     -qt-freetype ^
     -system-libjpeg ^
     -system-libpng ^
     -system-sqlite ^
     -system-zlib ^
     -plugin-sql-sqlite ^
     -qtlibinfix %QT_LIBINFIX% ^
     -verbose

if %errorlevel% neq 0 exit /b %errorlevel%

:: re-enable echoing which is disabled by configure
echo on

:: To get a much quicker turnaround you can add this: (remember also to add the hat symbol after -plugin-sql-sqlite)
::     -skip %WEBBACKEND% -skip qtwebsockets -skip qtwebchannel -skip qtwayland -skip qtwinextras -skip qtsvg -skip qtsensors ^
::     -skip qtcanvas3d -skip qtconnectivity -skip declarative -skip multimedia -skip qttools

jom -U release
:: Hooray for racey build systems. You may get a failure about a QtWebengine .stamp file being missing. You may not. Who knows?
jom -U release
if %errorlevel% neq 0 exit /b %errorlevel%
echo Finished `jom -U release`
jom -U install
:: I expect raciness here too:
jom -U install
if %errorlevel% neq 0 exit /b %errorlevel%
echo Finished `jom -U install`
pushd qtbase
  jom -U install_mkspecs
  if %errorlevel% neq 0 exit /b %errorlevel%
  echo Finished `jom -U install_mkspecs`
popd

if exist %LIBRARY_BIN%\qmake.exe goto ok_qmake_exists
echo Warning %LIBRARY_BIN%\qmake.exe does not exist jom -U install failed, very strange. Copying it from qtbase\bin\qmake.exe
copy qtbase\bin\qmake.exe %LIBRARY_BIN%\qmake.exe
:ok_qmake_exists

:: To rewrite qt.conf contents per conda environment
if not exist %PREFIX%\Scripts mkdir %PREFIX%\Scripts
copy "%RECIPE_DIR%\write_qtconf.bat" "%PREFIX%\Scripts\.qt-post-link.bat"
if %errorlevel% neq 0 exit /b %errorlevel%

Remove gyp stuff as gn is used now

Remove gyp stuff as gn is used now


@echo off

setlocal

if "%_BUILD_MAJOR_VERSION_%"=="" set _BUILD_MAJOR_VERSION_=101
if "%_BUILD_MINOR_VERSION_%"=="" set _BUILD_MINOR_VERSION_=58000
if "%_RHEL_RELEASE_VERSION_%"=="" set _RHEL_RELEASE_VERSION_=61

set _MAJORVERSION_=%_BUILD_MAJOR_VERSION_%
set _MINORVERSION_=%_BUILD_MINOR_VERSION_%
set _NT_TARGET_MIN=%_RHEL_RELEASE_VERSION_%

for %%O in (Win7 Win8 Win10) do for %%P in (Win32 x64) do call :build_driver %%O %%P
for %%P in (Win32 x64) do call :build_vista_driver Vista %%P

endlocal

goto :eof

:set_windows_version
if "%1"=="Vista" set _NT_TARGET_VERSION=0x600
if "%1"=="Wlh" set _NT_TARGET_VERSION=0x600
if "%1"=="Win7" set _NT_TARGET_VERSION=0x610
if "%1"=="Win8" set _NT_TARGET_VERSION=0x620
set /a _NT_TARGET_MAJ="(%_NT_TARGET_VERSION% >> 8) * 10 + ((%_NT_TARGET_VERSION% & 255) >> 4)"
goto :eof

:set_os_and_platform
if "%1"=="Vista" set OS=wlh
if "%1"=="Wlh" set OS=wlh
if "%1"=="Win7" set OS=win7
if "%1"=="Win8" set OS=win8
if "%2"=="Win32" set PLAT=x86
if "%2"=="x64" set PLAT=amd64
goto :eof

:set_out_filename
call :set_os_and_platform %1 %2
set OUT_FILENAME=buildfre_%OS%_%PLAT%.log
goto :eof

:fix_wdfcoinstaller_name
call :set_os_and_platform %1 %2
pushd Install\%OS%\%PLAT%\
for %%V in (01009 01011) do if exist WdfCoinstaller%%V.dll rename WdfCoinstaller%%V.dll WdfCoInstaller%%V.dll
popd
goto :eof

:prebuild_driver
call :set_windows_version %1
call :create_version_file "2012-defines.h"
call :set_out_filename %1 %2
set STAMPINF_VERSION=%_NT_TARGET_MAJ%.%_RHEL_RELEASE_VERSION_%.%_BUILD_MAJOR_VERSION_%.%_BUILD_MINOR_VERSION_%
goto :eof

:build_vista_driver
call :prebuild_driver %1 %2
if "%DDKVER%"=="" set DDKVER=7600.16385.1
set DDKBUILDENV=
set BUILDROOT=C:\WINDDK\%DDKVER%
pushd %BUILDROOT%
set DDKENV=%2
if "%DDKENV%"=="Win32" set DDKENV=x86
call bin\setenv.bat %BUILDROOT% %DDKENV% fre %OS% no_oacr
popd
build -cZg
set ARCH=amd64
if "%2"=="Win32" set ARCH=i386
set SRC_DIR=.\pvpanic\objfre_%OS%_%PLAT%\%ARCH%
set DST_DIR=.\Install\%OS%\%PLAT%
mkdir %DST_DIR%
copy %BUILDROOT%\redist\wdf\%PLAT%\WdfCoInstaller01009.dll %DST_DIR%
for %%E in (inf pdb sys) do copy %SRC_DIR%\pvpanic.%%E %DST_DIR%
if /i "%2"=="Win32" set OS_SYS=Vista_X86,Server2008_X86
if /i "%2"=="x64" set OS_SYS=Vista_X64,Server2008_X64
inf2cat /driver:%DST_DIR% /os:%OS_SYS%
goto :eof

:build_driver
call :prebuild_driver %1 %2
call ..\tools\callVisualStudio.bat 12 pvpanic.sln /Rebuild "%1 Release|%2" /Out %OUT_FILENAME%
call :fix_wdfcoinstaller_name %1 %2
goto :eof

:create_version_file
echo #define _NT_TARGET_MAJ %_NT_TARGET_MAJ% >  "%~1"
echo #define _NT_TARGET_MIN %_NT_TARGET_MIN% >> "%~1"
echo #define _MAJORVERSION_ %_MAJORVERSION_% >> "%~1"
echo #define _MINORVERSION_ %_MINORVERSION_% >> "%~1"
goto :eof

@echo off

setlocal

if "%_BUILD_MAJOR_VERSION_%"=="" set _BUILD_MAJOR_VERSION_=101
if "%_BUILD_MINOR_VERSION_%"=="" set _BUILD_MINOR_VERSION_=58000
if "%_RHEL_RELEASE_VERSION_%"=="" set _RHEL_RELEASE_VERSION_=61

set _MAJORVERSION_=%_BUILD_MAJOR_VERSION_%
set _MINORVERSION_=%_BUILD_MINOR_VERSION_%
set _NT_TARGET_MIN=%_RHEL_RELEASE_VERSION_%

for %%O in (Win7 Win8 Win10) do for %%P in (Win32 x64) do call :build_driver %%O %%P
for %%P in (Win32 x64) do call :build_vista_driver Vista %%P

endlocal

goto :eof

:set_windows_version
if "%1"=="Vista" set _NT_TARGET_VERSION=0x600
if "%1"=="Wlh" set _NT_TARGET_VERSION=0x600
if "%1"=="Win7" set _NT_TARGET_VERSION=0x610
if "%1"=="Win8" set _NT_TARGET_VERSION=0x620
set /a _NT_TARGET_MAJ="(%_NT_TARGET_VERSION% >> 8) * 10 + ((%_NT_TARGET_VERSION% & 255) >> 4)"
goto :eof

:set_os_and_platform
if "%1"=="Vista" set OS=wlh
if "%1"=="Wlh" set OS=wlh
if "%1"=="Win7" set OS=win7
if "%1"=="Win8" set OS=win8
if "%2"=="Win32" set PLAT=x86
if "%2"=="x64" set PLAT=amd64
goto :eof

:set_out_filename
call :set_os_and_platform %1 %2
set OUT_FILENAME=buildfre_%OS%_%PLAT%.log
goto :eof

:fix_wdfcoinstaller_name
call :set_os_and_platform %1 %2
pushd Install\%OS%\%PLAT%\
for %%V in (01009 01011) do if exist WdfCoinstaller%%V.dll rename WdfCoinstaller%%V.dll WdfCoInstaller%%V.dll
popd
goto :eof

:prebuild_driver
call :set_windows_version %1
call :create_version_file "2012-defines.h"
call :set_out_filename %1 %2
set STAMPINF_VERSION=%_NT_TARGET_MAJ%.%_RHEL_RELEASE_VERSION_%.%_BUILD_MAJOR_VERSION_%.%_BUILD_MINOR_VERSION_%
goto :eof

:build_vista_driver
call :prebuild_driver %1 %2
if "%DDKVER%"=="" set DDKVER=7600.16385.1
set DDKBUILDENV=
set BUILDROOT=C:\WINDDK\%DDKVER%
pushd %BUILDROOT%
set DDKENV=%2
if "%DDKENV%"=="Win32" set DDKENV=x86
call bin\setenv.bat %BUILDROOT% %DDKENV% fre %OS% no_oacr
popd
build -cZg
set ARCH=amd64
if "%2"=="Win32" set ARCH=i386
set SRC_DIR=.\pvpanic\objfre_%OS%_%PLAT%\%ARCH%
set DST_DIR=.\Install\%OS%\%PLAT%
mkdir %DST_DIR%
copy %BUILDROOT%\redist\wdf\%PLAT%\WdfCoInstaller01009.dll %DST_DIR%
for %%E in (inf pdb sys) do copy %SRC_DIR%\pvpanic.%%E %DST_DIR%
if /i "%2"=="Win32" set OS_SYS=Vista_X86,Server2008_X86
if /i "%2"=="x64" set OS_SYS=Vista_X64,Server2008_X64
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
inf2cat /driver:%DST_DIR% /os:%OS_SYS%
goto :eof

:build_driver
call :prebuild_driver %1 %2
call ..\tools\callVisualStudio.bat 12 pvpanic.sln /Rebuild "%1 Release|%2" /Out %OUT_FILENAME%
call :fix_wdfcoinstaller_name %1 %2
goto :eof

:create_version_file
echo #define _NT_TARGET_MAJ %_NT_TARGET_MAJ% >  "%~1"
echo #define _NT_TARGET_MIN %_NT_TARGET_MIN% >> "%~1"
echo #define _MAJORVERSION_ %_MAJORVERSION_% >> "%~1"
echo #define _MINORVERSION_ %_MINORVERSION_% >> "%~1"
goto :eof

adjust build settings

adjust build settings


@echo on
mkdir %LIBRARY_BIN%
7z x 20348.1.210507-1500.fe_release_WindowsSDK.iso -aoa
if errorlevel 1 exit 1
msiexec /a "%SRC_DIR%\Installers\Universal CRT Redistributable-x86_en-us.msi" /qb TARGETDIR="%SRC_DIR%\Installers/Universal CRT Redistributable-x86_en-us.msi"
if errorlevel 1 exit 1
xcopy "tmp\Program Files\Windows Kits\10\Redist\%PKG_VERSION%\ucrt\DLLs\x64\"* "%PREFIX%"
if errorlevel 1 exit 1
xcopy "tmp\Program Files\Windows Kits\10\Redist\%PKG_VERSION%\ucrt\DLLs\x64\"* "%LIBRARY_BIN%"
if errorlevel 1 exit 1

@echo on
mkdir %LIBRARY_BIN%
7z x 20348.1.210507-1500.fe_release_WindowsSDK.iso -aoa
if errorlevel 1 exit 1
msiexec /a "%SRC_DIR%\Installers\Universal CRT Redistributable-x86_en-us.msi" /qb TARGETDIR="%SRC_DIR%\tmp"
if errorlevel 1 exit 1
xcopy "tmp\Program Files\Windows Kits\10\Redist\%PKG_VERSION%\ucrt\DLLs\x64\"* "%PREFIX%"
if errorlevel 1 exit 1
xcopy "tmp\Program Files\Windows Kits\10\Redist\%PKG_VERSION%\ucrt\DLLs\x64\"* "%LIBRARY_BIN%"
if errorlevel 1 exit 1

Fix target dir

Fix target dir


@ECHO OFF

setLocal EnableDelayedExpansion
set exporterMainClass=org.drools.workbench.jcr2vfsmigration.JcrExporterLauncher
set importerMainClass=org.drools.workbench.jcr2vfsmigration.VfsImporterLauncher

rem echo "Usage: runMigration.bat <path-to-jcr-repository> <vfs-repository>"
rem echo "For example: runMigration.bat"
rem echo "Some notes:"
rem echo "- Working dir should be the directory of this script."
rem echo "- Java is recommended to be JDK and java 6 for optimal performance"
rem echo "- The environment variable JAVA_HOME should be set to the JDK installation directory"
rem echo "  For example: set JAVA_HOME="C:\Program Files\Java\jdk1.6.0"
rem echo
rem echo "Starting migration app..."

set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs

if exist %JAVA_HOME%\bin\java.exe (
    set JAVA_BIN=%JAVA_HOME%\bin\java
) else (
    set JAVA_BIN=java
)

%JAVA_BIN% -Xms256m -Xmx1024m -cp ..\jcr-exporter-libs\*; %exporterMainClass% %1 .\temp

%JAVA_BIN% -Xms256m -Xmx1024m -cp ..\vfs-importer-libs\*; %importerMainClass% .\temp %2

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

rem Script used to execute the jcr2vfs migration tool.
rem
rem Execution consists of two phases:
rem   1) Exporting the content of JCR repository into XML
rem   2) Importing the XML (generated in the previous step) into newly created VFS Git repository

setLocal enableExtensions enableDelayedExpansion

if exist %JAVA_HOME%\bin\java.exe (
    set "JAVA_BIN=%JAVA_HOME%\bin\java"
) else (
    java 2> NUL
    if not "%ERRORLEVEL%"==9009 (
        set "JAVA_BIN=java"
    ) else (
        echo.
        echo Error^^! Java installation not found on your system^^! Please install Java from http://www.java.com first.
        goto :end_process
    )
)

set "JCR_INPUT_DIR="
set "TMP_DIR=tmp-jcr2vfs"
set "VFS_OUTPUT_DIR=outputVfs"
set "OVERRIDE_VFS_REPO=false"

:loop
if not "%1"=="" (
    if "%1"=="-h" (
        goto :print_help
    )
    if "%1"=="-i" (
        set "JCR_INPUT_DIR=%2"
        shift
    )
    if "%1"=="-o" (
        set "VFS_OUTPUT_DIR=%2"
        shift
    )
    if "%1"=="-t" (
        set "TMP_DIR=%2"
        shift
    )
    if "%1"=="-f" (
        set "OVERRIDE_VFS_REPO=true"
    )
    shift
    goto :loop
)

if "%JCR_INPUT_DIR%"=="" (
    echo Error: JCR repository location needs to be specified using the "-i dir" option^^!
    echo.
    goto :print_help
)

set "EXPORTER_ARGS=-i %JCR_INPUT_DIR% -o %TMP_DIR%"

set "IMPORTER_ARGS=-i %TMP_DIR% -o %VFS_OUTPUT_DIR%"
if "%OVERRIDE_VFS_REPO%"=="true" (
    set "IMPORTER_ARGS=%IMPORTER_ARGS% -f"
)

set "EXPORTER_MAIN_CLASS=org.drools.workbench.jcr2vfsmigration.JcrExporterLauncher"
set "IMPORTER_MAIN_CLASS=org.drools.workbench.jcr2vfsmigration.VfsImporterLauncher"

%JAVA_BIN% -Xms256m -Xmx1024m -cp ..\jcr-exporter-libs\*; -Dlogback.configurationFile=../conf/logback.xml %EXPORTER_MAIN_CLASS% %EXPORTER_ARGS%

%JAVA_BIN% -Xms256m -Xmx1024m -cp ..\vfs-importer-libs\*; -Dlogback.configurationFile=../conf/logback.xml %IMPORTER_MAIN_CLASS% %IMPORTER_ARGS%

goto :end_process

:print_help
    echo Usage: ./runMigration.bat [options]
    echo Description: Migrates Guvnor 5.x JCR content into UberFire VFS repository.
    echo.
    echo Where [options]:
    echo     -h         Prints this help
    echo     -i dir     Directory with the JCR repository configuration
    echo     -o dir     Directory to store the migrated VFS repository in. Optional, defaults to "./outputVfs"
    echo     -r name    VFS repository name. Optional, defaults to "guvnor-jcr2vfs-migration"
    echo     -f         Force overwriting the resulting VFS repository. Optional
    echo.
    echo Notes:
    echo   - Working dir needs to be the directory of this script!
    echo   - Java is recommended to be JDK and version 6 or later
    echo   - The environment variable JAVA_HOME should be set to the JDK installation directory
    echo        For example: set JAVA_HOME="c:\Program Files\Java\jdk1.7.0_65"

:end_process
    endLocal

fix and update runMigration.bat

[BZ-1182629] jcr2vfs: fix and update runMigration.bat


cmake -G"NMake Makefiles" ^
  -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
  -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
  -DCMAKE_BUILD_TYPE:STRING=Release ^
  .
if errorlevel 1 exit 1

nmake
if errorlevel 1 exit 1

nmake install
if errorlevel 1 exit 1

cmake -G"NMake Makefiles JOM" ^
  -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
  -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
  -DCMAKE_BUILD_TYPE:STRING=Release ^
  .
if errorlevel 1 exit 1

jom -j%CPU_COUNT%
if errorlevel 1 exit 1

jom -j%CPU_COUNT% install
if errorlevel 1 exit 1

Enable multi-core compiling

Enable multi-core compiling


Create build.bat

Create build.bat


"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.autocomplete.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jsBezier-0.6-min.js ^
--js=jquery/jquery.jsPlumb-1.7.5.js ^
--js=jquery/jquery.placeholder.js ^
--js=handlebars-v2.0.0.js ^
--js=dropdown.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js

echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause

"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.autocomplete.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jquery.jsPlumb-1.7.5.js ^
--js=jquery/jquery.placeholder.js ^
--js=handlebars-v2.0.0.js ^
--js=dropdown.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js

echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause

Remove another jsBeizer reference as we weren't using it


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

:: Seting  prompt style
@for /f "tokens=2 delims=:." %%x in ('chcp') do @set cp=%%x
:: The slow part
:: World without Unicode is a sad world
@chcp 65001>nul
:: It has to be lambda, I already made a logo
@prompt $E[1;32;40m$P$S{git}$S$_$E[1;30;40mλ$S$E[0m
@chcp %cp%>nul

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

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

:: Prepare for msysgit

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

:: Enhance Path
@set rootDir=%CD%
@set git_install_root=%CD%\vendor\msysgit
@set PATH=%PATH%;%rootDir%\bin;%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;

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

:: cd into users homedir
@cd /d %USERPROFILE%

:: Set home path
@set HOME=%USERPROFILE%
@echo Welcome to cmder!

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

:: Setting prompt style
@for /f "tokens=2 delims=:." %%x in ('chcp') do @set cp=%%x
:: The slow part
:: World without Unicode is a sad world
@chcp 65001>nul
:: It has to be lambda, I already made a logo
@prompt $E[1;32;40m$P$S{git}$S$_$E[1;30;40mλ$S$E[0m
@chcp %cp%>nul

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

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

:: Prepare for msysgit

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

:: Enhance Path
@set rootDir=%CD%
@set git_install_root=%CD%\vendor\msysgit
@set PATH=%PATH%;%rootDir%\bin;%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;

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

:: cd into users homedir
@cd /d %USERPROFILE%

:: Set home path
@set HOME=%USERPROFILE%
@echo Welcome to cmder!

Fix spelling in init.bat

Fix spelling in init.bat


REM This assumes that libutil.a has been previously build with cmake and is
REM available in ..\build

del /f RIBClientRUBY_wrap.cxx *.def *.pdb *.obj

swig -ruby -includeall -c++ -I..\utils -o RIBClientRUBY_wrap.cxx RIBClient.i

REM set USE_PRMAN=1
REM ruby extconf.rb --with-rman-dir=$RMANTREE --with-utils-include=..\utils\ --with-utils-lib=..\build\

set USE_DELIGHT=1
set RUBY_VERSION=180
ruby extconf.rb --with-rman-dir=%DELIGHT% --with-utils-include=..\utils\ --with-utils-lib=..\build\

nmake clean all

REM This assumes that libutil.a has been previously build with cmake and is
REM available in ..\build

del /f RIBClientRUBY_wrap.cxx *.def *.pdb *.obj

swig -ruby -includeall -c++ -I..\utils -o RIBClientRUBY_wrap.cxx RIBClient.i

REM set USE_PRMAN=1
REM ruby extconf.rb --with-rman-dir=$RMANTREE --with-utils-include=..\utils\ --with-utils-lib=..\build_nmake\utils

set USE_DELIGHT=1
set RUBY_VERSION=180
ruby extconf.rb --with-rman-dir=%DELIGHT% --with-utils-include=..\utils\ --with-utils-lib=..\build_nmake\utils

nmake all

Build using utils library being build with CMake


@echo off
echo [INFO] create db.
echo [INFO] please confirm db encoding utf-8.
echo [INFO] please confirm has modified es/web/pom.xml--^>profile--^>development---^>connection.admin.url/connection.username/password
cd %~dp0
cd ../web
call mvn db:create

cd ../bin
pause

@echo off
echo [INFO] create db.
echo [INFO] please confirm db encoding utf-8.
echo [INFO] please confirm has modified es/web/pom.xml--^>profile--^>development---^>connection.admin.url/connection.username/password
cd %~dp0
cd ../web
call mvn db:create -e -X

cd ../bin
pause

print detailed debug info when creating DB


@echo off

REM DBSteward
REM Database SQL compiler and differencing via XML definition
REM
REM @package DBSteward
REM @license http://www.opensource.org/licenses/bsd-license.php Simplified BSD License
REM @author Nicholas J Kiraly <kiraly.nicholas@gmail.com>

php %~dp0\dbsteward %*

Add dbsteward.bat to run DBSteward from Windows console


@ECHO OFF
CLS

REM All praise BAT files
REM
REM Kalabox Uninstaller Script.
REM
REM Copyright (C) 2014 Kalamuna LLC
REM
REM This file also contains a modified VirtualBox uninstallers.
REM
REM

ECHO.
ECHO Welcome to the Kalabox uninstaller script.
ECHO.
ECHO This script will destroy your current Kalabox build. If you want
ECHO to save your current build for later please either vagrant package
ECHO your existing build or export the relevant VirtualBox appliance.
ECHO.
ECHO MAKE SURE THAT YOU'VE EXITED THE KALABOX APP OR THIS WILL BLOW UP!!!
ECHO.
ECHO ALSO MAKE SURE YOU VISIT 127.0.0.1:60008 AND SHUTDOWN SYNCTHING
ECHO.
ECHO WHAT YOU WANT TO DO?
ECHO.
ECHO 1. Remove all the things.
ECHO 2. Forget this ever happened.
ECHO.
SET /p id=Choose your destiny:

IF %id% == 1 (
  ECHO Stopping and removing Kalabox2
  boot2docker --vm="Kalabox2" destroy
  ECHO DESTROYED!
  ECHO.
  IF EXIST "%HOMEPATH%\.kalabox" (
    ECHO Removing Kalabox directories
    RMDIR %HOMEPATH%\.kalabox /S /Q
    RMDIR "%HOMEPATH%\VirtualBox VMs\Kalabox2" /S /Q
    ECHO REMOVED!
    ECHO.
  )
  IF EXIST "C:\Program Files (x86)\Git\unins000.exe" (
    "C:\Program Files (x86)\Git\unins000.exe" /SILENT /SUPRESSMSGBOXES /NORESTART
    ECHO UNINSTALLED MYSYS GIT!
    ECHO.
  )
  IF EXIST "C:\Program Files\Boot2Docker for Windows\unins000.exe" (
    "C:\Program Files\Boot2Docker for Windows\unins000.exe" /SILENT /SUPRESSMSGBOXES /NORESTART
    ECHO UNINSTALLED MYSYS GIT!
    ECHO.
  )
  ECHO "YOU WILL NEED TO UNINSTALL VIRTUALBOX MANUALLY TO COMPLETE THE UNINSTALL"
)

IF %id% == 2 (
  ECHO SO BE IT.... JEDI
)

PAUSE

@ECHO OFF
CLS

REM All praise BAT files
REM
REM Kalabox Uninstaller Script.
REM
REM Copyright (C) 2014 Kalamuna LLC
REM
REM This file also contains a modified VirtualBox uninstallers.
REM
REM

ECHO.
ECHO Welcome to the Kalabox uninstaller script.
ECHO.
ECHO This script will destroy your current Kalabox build. If you want
ECHO to save your current build for later please either vagrant package
ECHO your existing build or export the relevant VirtualBox appliance.
ECHO.
ECHO MAKE SURE THAT YOU'VE EXITED THE KALABOX APP OR THIS WILL BLOW UP!!!
ECHO.
ECHO ALSO MAKE SURE YOU VISIT 127.0.0.1:60008 AND SHUTDOWN SYNCTHING
ECHO.
ECHO WHAT YOU WANT TO DO?
ECHO.
ECHO 1. Remove all the things.
ECHO 2. Forget this ever happened.
ECHO.
SET /p id=Choose your destiny:

IF %id% == 1 (
  ECHO Stopping and removing Kalabox2
  "C:\Program Files\Boot2Docker for Windows\boot2docker.exe" --vm="Kalabox2" destroy
  ECHO DESTROYED!
  ECHO.
  IF EXIST "%HOMEPATH%\.kalabox" (
    ECHO Removing Kalabox directories
    RMDIR %HOMEPATH%\.kalabox /S /Q
    RMDIR "%HOMEPATH%\VirtualBox VMs\Kalabox2" /S /Q
    ECHO REMOVED!
    ECHO.
  )
  IF EXIST "C:\Program Files (x86)\Git\unins000.exe" (
    "C:\Program Files (x86)\Git\unins000.exe" /SILENT /SUPRESSMSGBOXES /NORESTART
    ECHO UNINSTALLED MYSYS GIT!
    ECHO.
  )
  IF EXIST "C:\Program Files\Boot2Docker for Windows\unins000.exe" (
    "C:\Program Files\Boot2Docker for Windows\unins000.exe" /SILENT /SUPRESSMSGBOXES /NORESTART
    ECHO UNINSTALLED MYSYS GIT!
    ECHO.
  )
  ECHO "YOU WILL NEED TO UNINSTALL VIRTUALBOX MANUALLY TO COMPLETE THE UNINSTALL"
)

IF %id% == 2 (
  ECHO SO BE IT.... JEDI
)

PAUSE

Update doze uninstall again

Update doze uninstall again


ng g module shared
ng g module shared/geo
ng g module store
ng g module home
ng g module login
ng g guard shared/auth --implements CanActivate
ng g pipe shared/moment
ng g component about
ng g component checkout
ng g component home/home
ng g component home/home-item
ng g component item
ng g component login
ng g component store
ng g component store/pickup
ng g directive shared/HammerGestures -m shared
ng g service shared/data/data
ng g service shared/data/data-io --flat
ng g service shared/data/data-local-storage --flat
ng g service shared/geo/AbstractGeo --flat
ng g service shared/geo/GoogleGeo --flat
ng g service shared/geo/MockGeo --flat
ng g service shared/logic
ng g class models/appinfo --skip-tests
ng g class models/checkout --skip-tests
ng g class models/item --skip-tests
ng g class models/pickup --skip-tests
ng g class models/store --skip-tests
ng g class shared/data/dto --skip-tests
ng g class shared/geo/Photo --skip-tests
ng g class shared/geo/place --skip-tests
ng g class shared/geo/point --skip-tests
ng g class shared/utilities --skip-tests

npm install @types/googlemaps -D
npm install @types/hammerjs -D
npm install eslint-plugin-gb -D
npm install @angular/fire firebase
npm install font-awesome
npm install hammerjs
npm install moment
npm install ngx-toaster

add generate script

add generate script


@echo off
if "%_echo%"=="" (
echo off
) else (
echo on
)

setlocal

@rem
@rem Manage MSMQ Release Bits Tracing
@rem
@rem Revision History:
@rem      1.1   Shai Kariv (shaik)     05-Apr-2001
@rem      1.2   Conrad Chang (conradc) 05-Feb-2002
@rem      1.3   Conrad Chang (conradc) 31-July-2002
@rem              (Changed to use logman and use names instead of GUIDs)
@rem      1.4   Conrad Chang (conradc) 22-March-2004
@rem              (Added support for XP)
@rem      1.5   Conrad Chang (conradc) 19-Oct-2005
@rem              - Added flushing so that you don't need to stop the trace
@rem              - remove indigo on XP check
@rem              - remove filtering of unable to decode entries in trace file
@rem

echo mqtrace 1.5 - Manage MSMQ Release Bits Tracing.

set mqBinaryLog=%windir%\debug\msmqlog.bin
set mqTextLog=%windir%\debug\msmqlog.txt
set log_session_name=msmq
set msmqtracecfgfile=%windir%\debug\msmqtrc.ini
set msmqtracesessionlog=%windir%\debug\msmqtrc.log
set loggingrunning=
set mqRealTime=
set tracecommand=start
set tracefilemodeoptions=-f bincirc -max 200
set tracefilepathcommand=-o %mqBinaryLog%
set IsWinXP=0
set TmpVerFile=%tmp%\osver.txt
if not exist %windir%\system32\msmqpub.mof (
set MSMQSchemeFile=.\msmqpub.mof
) else (
set MSMQSchemeFile=%windir%\system32\msmqpub.mof
)

rem
rem XP is version 5.1
rem
ver > %TmpVerFile%
findstr /i /c:"5.1" %TmpVerFile%
if %ERRORLEVEL% == 0 set IsWinXP=1
del %TmpVerFile%

@rem
@rem Jump to where we handle usage
@rem
if /I "%1" == "help" goto Usage
if /I "%1" == "-help" goto Usage
if /I "%1" == "/help" goto Usage
if /I "%1" == "-h" goto Usage
if /I "%1" == "/h" goto Usage
if /I "%1" == "-?" goto Usage
if /I "%1" == "/?" goto Usage

@rem
@rem Set TraceFormat environment variable
@rem
if /I "%1" == "-path" shift&goto SetPath
if /I "%1" == "/path" shift&goto SetPath
goto EndSetPath
:SetPath
if /I not "%1" == "" goto DoSetPath
echo ERROR: Argument '-path' specified without argument for TraceFormat folder.
echo Usage example: mqtrace -path x:\symbols.pri\TraceFormat
goto :eof
:DoSetPath
echo Setting TRACE_FORMAT_SEARCH_PATH to '%1'
endlocal
set TRACE_FORMAT_SEARCH_PATH=%1&shift
goto :eof
:EndSetPath

@rem
@rem Format binary log file to text file
@rem
if /I "%1" == "-format" shift&goto FormatFile
if /I "%1" == "/format" shift&goto FormatFile
goto EndFormatFile
:FormatFile
if /I not "%TRACE_FORMAT_SEARCH_PATH%" == "" goto DoFormatFile

REM
REM  LH doesn't need TMF file
REM
if %IsWinXP% == 0 goto DoFormatFile

echo ERROR: Argument '-format' specified without running 'mqtrace -path' first.
echo Usage example: mqtrace -path x:\symbols.pri\TraceFormat
echo                mqtrace -format ('%mqBinaryLog%' to text file '%mqTextLog%')
goto :eof
:DoFormatFile
if /I not "%1" == "" set mqBinaryLog=%1&shift
echo Formatting binary log file '%mqBinaryLog%' to '%mqTextLog%'.
call tracefmt %mqBinaryLog% -o %mqTextLog% -tmf %MSMQSchemeFile%
echo  Please view Trace File at %mqTextLog%

set mqBinaryLog=
goto :eof
:EndFormatFile

@rem
@rem Format binary log file to text file
@rem
if /I "%1" == "-flush" shift&goto FlushTrace
if /I "%1" == "/flush" shift&goto FlushTrace
goto EndFlushTrace
:FlushTrace
logman update msmq -fd -ets
goto :eof
:EndFlushTrace

@rem
@rem Handle the -stop argument
@rem
if /I "%1" == "-stop" shift& goto HandleStopCommand
if /I "%1" == "/stop" shift& goto HandleStopCommand
goto EndHandleStopCommand
:HandleStopCommand
echo Stopping %log_session_name% trace session...
logman stop %log_session_name% -ets
goto :eof
:EndHandleStopCommand

@rem
@rem Handle the -query argument
@rem
if /I "%1" == "-query" shift& goto HandleQueryCommand
if /I "%1" == "/query" shift& goto HandleQueryCommand
goto EndHandleQueryCommand
:HandleQueryCommand
echo Querying %log_session_name% trace session...
logman query %log_session_name% -ets
goto :eof
:EndHandleQueryCommand

@rem
@rem Process the tracing change
@rem
if /I "%1" == "-change" shift&goto ChangeTrace
if /I "%1" == "/change" shift&goto ChangeTrace
goto EndChangeTrace

:ChangeTrace
@rem
@rem Process the module
@rem
if %IsWinXP% == 0 (
set Module=""
if /I "%1" == "AC" set Module="MSMQ: AC" & goto ProcessChangeLevel
if /I "%1" == "DS" set Module="MSMQ: DS" & goto ProcessChangeLevel
if /I "%1" == "GENERAL" set Module="MSMQ: General" & goto ProcessChangeLevel
if /I "%1" == "LOG" set Module="MSMQ: Log" & goto ProcessChangeLevel
if /I "%1" == "PROFILING" set Module="MSMQ: Profiling" & goto ProcessChangeLevel
if /I "%1" == "NETWORKING" set Module="MSMQ: Networking" & goto ProcessChangeLevel
if /I "%1" == "ROUTING" set Module="MSMQ: Routing"& goto ProcessChangeLevel
if /I "%1" == "RPC" set Module="MSMQ: RPC" & goto ProcessChangeLevel
if /I "%1" == "SECURITY" set Module="MSMQ: Security" & goto ProcessChangeLevel
if /I "%1" == "SRMP" set Module="MSMQ: SRMP" & goto ProcessChangeLevel
if /I "%1" == "XACT_GENERAL" set Module="MSMQ: XACT_General" & goto ProcessChangeLevel
if /I "%1" == "XACT_LOG" set Module="MSMQ: XACT_Log" & goto ProcessChangeLevel
if /I "%1" == "XACT_RCV" set Module="MSMQ: XACT_Receive" & goto ProcessChangeLevel
if /I "%1" == "XACT_SEND" set Module="MSMQ: XACT_Send" & goto ProcessChangeLevel

REM
REM For Indigo interop
REM
REM if /I "%1" == "WS" set Module="MSMQ: WS" & goto ProcessChangeLevel
)

goto usage

:ProcessChangeLevel
shift
set TraceLevel=
if /I "%1" == "none" set TraceLevel=() & goto UpdateTraceLevel
if /I "%1" == "error" set TraceLevel=(error) & goto UpdateTraceLevel
if %MODULE% == "MSMQ: ERRORLOGGING" goto usage
if /I "%1" == "warning" set TraceLevel=(error,warning) & goto UpdateTraceLevel
if /I "%1" == "info" set TraceLevel=(error,warning,info) & goto UpdateTraceLevel
if /i "%TraceLevel%"=="" goto usage

:UpdateTraceLevel

logman update msmq -p %Module% %TraceLevel% -ets

goto :eof

:EndChangeTrace

@rem
@rem Consume the "-start" argument if it exists. Default is to start.
@rem
echo Starting %log_session_name% trace logging to '%mqBinaryLog%'...
if /I "%1" == "-start" shift& goto HandleStart
if /I "%1" == "/start" shift& goto HandleStart
goto EndStart

:HandleStart
set tracecommand=start
set tracefilepathcommand=-o %mqBinaryLog%

:EndStart

@rem
@rem Consume the "-update" argument if it exists. Default is to start.
@rem
echo Updating %log_session_name% trace logging to '%mqBinaryLog%'...
if /I "%1" == "-update" shift& set tracecommand=update
if /I "%1" == "/update" shift& set tracecommand=update

@rem
@rem Consume the -rt argument
@rem
if /I "%1" == "-rt" shift&goto ConsumeRealTimeArgument
if /I "%1" == "/rt" shift&goto ConsumeRealTimeArgument
goto EndConsumeRealTimeArgument
:ConsumeRealTimeArgument
if /I not "%TRACE_FORMAT_SEARCH_PATH%" == "" goto DoConsumeRealTimeArgument
echo ERROR: Argument '-rt' specified without running 'mqtrace -path' first.
echo Usage example: mqtrace -path x:\symbols.pri\TraceFormat
echo                mqtrace -rt (start RealTime logging/formatting at Error level)
goto :eof
:DoConsumeRealTimeArgument
echo Running %log_session_name% trace in Real Time mode...
set mqRealTime=-rt -ft 1
set tracecommand=start
:EndConsumeRealTimeArgument

@rem
@rem Process the noise level argument if it exists. Default is error level.
@rem

if /I "%1" == "-info" shift&goto ConsumeInfoArgument
if /I "%1" == "/info" shift&goto ConsumeInfoArgument
goto EndConsumeInfoArgument
:ConsumeInfoArgument
echo %log_session_name% trace noise level is INFORMATION...
if %IsWinXP% == 0 (
Call :FSETUPTRCINIFILE "(error,warning,info)"
) else (
Call :FSETUPTRCINIFILE "0x7"
)
goto EndConsumeNoiseLevelArgument
:EndConsumeInfoArgument

if /I "%1" == "-warning" shift&goto ConsumeWarningArgument
if /I "%1" == "/warning" shift&goto ConsumeWarningArgument
goto EndConsumeWarningArgument
:ConsumeWarningArgument
echo %log_session_name% trace noise level is WARNING...
if %IsWinXP% == 0  (
Call :FSETUPTRCINIFILE "(error,warning)"
) else (
Call :FSETUPTRCINIFILE "0x3"
)
goto EndConsumeNoiseLevelArgument
:EndConsumeWarningArgument

echo %log_session_name% trace noise level is ERROR...
IF %IsWinXP% == 0 (
Call :FSETUPTRCINIFILE "(error)"
) Else (
Call :FSETUPTRCINIFILE "0x1"
)

if /I "%1" == "-error" shift
if /I "%1" == "/error" shift
:EndConsumeNoiseLevelArgument

@rem
@rem At this point if we have any argument it's an error
@rem
if /I not "%1" == "" goto Usage

@rem
@rem Query if %log_session_name% logger is running. If so only update the flags and append to logfile.
@rem
@rem  XP - always return 0 (success or fail)
@rem  W2K3 -  0 success
@rem          4029 fail
@rem  LH   -  0 success
@rem          -2147020695 (< 0) fail
@rem
echo Querying if %log_session_name% logger is currently running...
logman query %log_session_name% -ets   > %msmqtracesessionlog%
if %ERRORLEVEL% NEQ 0 goto settrace

@rem
@rem logman.exe on XP is always return success so we need to look at the output to find MSMQ
@rem
if %IsWinXP% == 1 (
findstr /i msmq %msmqtracesessionlog%
if ERRORLEVEL 1 goto settrace
)

echo %log_session_name% logger is currently running, changing existing trace settings...
set tracecommand=update
set tracefilepathcommand=
set tracefilemodeoptions=

:settrace
if /I "%mqRealTime%"=="" goto settracecontinue
set tracefilepathcommand=
set tracefilemodeoptions=
:settracecontinue
logman %tracecommand% %log_session_name% %mqRealTime% -pf %msmqtracecfgfile%  %tracefilepathcommand% %tracefilemodeoptions% -ets

@rem
@rem In real time mode, start formatting
@rem
if /I "%mqRealTime%" == "" goto EndRealTimeFormat
echo Starting %log_session_name% real time formatting...
if defined mqBinaryLog goto NormalRealTimeStart
logman update %log_session_name% -rt -ets
:NormalRealTimeStart
call tracefmt -display -rt %log_session_name% -o %mqTextLog%
:EndRealTimeFormat
set mqRealTime=
goto :eof

:FSETUPTRCINIFILE
set TEST=%1
if %IsWinXP% == 0 goto :nonxpsetup
goto :xpsetup

:nonxpsetup
@echo "MSMQ: AC" %TEST:~1,-1% > %msmqtracecfgfile%
@echo "MSMQ: Networking" %TEST:~1,-1%  >> %msmqtracecfgfile%
@echo "MSMQ: SRMP" %TEST:~1,-1% 	>> %msmqtracecfgfile%
@echo "MSMQ: XACT_General" %TEST:~1,-1% >> %msmqtracecfgfile%
@echo "MSMQ: RPC" %TEST:~1,-1% >> %msmqtracecfgfile%
@echo "MSMQ: DS" %TEST:~1,-1% >> %msmqtracecfgfile%
@echo "MSMQ: Security" %TEST:~1,-1% >> %msmqtracecfgfile%
@echo "MSMQ: Routing" %TEST:~1,-1% >> %msmqtracecfgfile%
@echo "MSMQ: General" %TEST:~1,-1% >> %msmqtracecfgfile%
@echo "MSMQ: XACT_Send" %TEST:~1,-1% >> %msmqtracecfgfile%
@echo "MSMQ: XACT_Receive" %TEST:~1,-1% >> %msmqtracecfgfile%
@echo "MSMQ: XACT_Log" %TEST:~1,-1% >> %msmqtracecfgfile%
@echo "MSMQ: Log" %TEST:~1,-1% >> %msmqtracecfgfile%

REM
REM Hardcoded ERRORLOGGING TO ERROR flag
REM
@echo "MSMQ: ERRORLOGGING" (error) >> %msmqtracecfgfile%
goto :eof

:xpsetup
@echo {24b9a175-8716-40e0-9b2b-785de75b1e67} %TEST:~1,-1% > %msmqtracecfgfile%
goto :eof

:Usage
if %IsWinXP% == 1 goto WinXPUsage

echo
echo
echo Usage: mqtrace [^<Action^>] [^<Level^>]
echo        mqtrace -?
echo.
echo Advance Usage: mqtrace -path ^<TraceFormat folder^>
echo                mqtrace -rt [^<Action^>] [^<Level^>]
echo                mqtrace -format [^<Binary log file^>]
echo                mqtrace -change [^<Module^>] [^<Level^>]
echo                mqtrace -update [-rt] [^<Level^>]
echo                mqtrace -query
echo.
echo ^<Action^> - Optional trace action:
echo     -start   - start/update trace logging to '%mqBinaryLog%' (default).
echo     -stop    - stop trace logging.
echo.
echo ^<Level^>  - Optional trace level (overrides current trace level):
echo     -error   - trace error messages only (default).
echo     -warning - trace warning and error messages.
echo     -info    - trace information, warning and error messages.
echo.
echo -?      - Display this usage message.
echo.
echo -path   - Set environment variable for TraceFormat folder.
echo           This variable is necessary for later use of -rt or -format
echo           and needs to be set once (per command-line box).
echo.
echo -rt     - Start trace logger and formatter in Real Time mode.
echo           Environment variable must be set first, see '-path'.
echo           In addition, binary log is kept in '%mqBinaryLog%'.
echo.
echo -format - Format binary log file to text file '%mqTextLog%'.
echo           Environment variable must be set first, see '-path'.
echo
echo.
echo -change - Change the trace level for each module
echo
echo.
echo -update - Update the trace level for all modules
echo
echo.
echo ^<Binary log file^> - Optional binary log file. Default is '%mqBinaryLog%'.
echo
echo.
echo ^<Module^>: The module for which to change the debug level
echo     modules are: AC, DS, GENERAL, LOG, PROFILING, NETWORKING, ROUTING,
echo                  RPC, SECURITY, SRMP, XACT_GENERAL, XACT_LOG,
echo                  XACT_RCV, and XACT_SEND.
echo
echo.
echo ^<Level^>  - Trace level (overrides current trace level):
echo     none    - shut down debug from this module
echo     error   - trace error messages only (default).
echo     warning - trace warning and error messages.
echo     info    - trace information, warning and error messages.
echo.
echo.
echo Example 1: mqtrace (start/update logging to '%mqBinaryLog%' at Error level)
echo Example 2: mqtrace -path x:\Symbols.pri\TraceFormat
echo Example 3: mqtrace -rt -info (start real time logging at Info level)
echo Example 4: mqtrace -format (format '%mqBinaryLog%' to '%mqTextLog%')
echo Example 5: mqtrace -stop (stop logging)
echo Example 6: mqtrace -query (query current MSMQ current trace settings)
echo Example 7: mqtrace -change AC warning
echo Example 8: mqtrace -update -rt -info
goto :eof

:WinXPUsage
echo
echo Usage: mqtrace [^<Action^>] [^<Level^>]
echo        mqtrace -?
echo.
echo Advance Usage: mqtrace -path ^<TraceFormat folder^>
echo                mqtrace -rt [^<Action^>] [^<Level^>]
echo                mqtrace -format [^<Binary log file^>]
echo.
echo ^<Action^> - Optional trace action:
echo     -start   - start/update trace logging to 'msmqlog.bin' (default).
echo     -stop    - stop trace logging.
echo.
echo ^<Level^>  - Optional trace level (overrides current trace level):
echo     -error   - trace error messages only (default).
echo     -warning - trace warning and error messages.
echo     -info    - trace information, warning and error messages.
echo.
echo -?      - Display this usage message.
echo.
echo -path   - Set environment variable for TraceFormat folder.
echo           This variable is necessary for later use of -rt or -format
echo           and needs to be set once (per command-line box).
echo.
echo -rt     - Start trace logger and formatter in Real Time mode.
echo           Environment variable must be set first, see '-path'.
echo           In addition, binary log is kept in 'msmqlog.bin'.
echo.
echo -format - Format binary log file to text file 'msmqlog.txt'.
echo           Environment variable must be set first, see '-path'.
echo.
echo -flush  - Flush all the trace buffer to disk
echo.
echo ^<Binary log file^> - Optional binary log file. Default is 'msmqlog.bin'.
echo.
echo Example 1: mqtrace (start/update logging to 'msmqlog.bin' at Error level)
echo Example 2: mqtrace -path x:\Symbols.pri\TraceFormat
echo Example 3: mqtrace -rt -info (start real time logging at Info level)
echo Example 4: mqtrace -format (format 'msmqlog.bin' to 'msmqlog.txt')
echo Example 5: mqtrace -stop (stop logging)
echo Example 6: mqtrace -flush

add MSMQ/MQTrace.cmd

add MSMQ/MQTrace.cmd


REM Batch script to build Inno Setup installer for libexpat for Windows
REM Call from parent directory, e.g.: cmd /c win32\build_expat_iss.bat
REM                          __  __            _
REM                       ___\ \/ /_ __   __ _| |_
REM                      / _ \\  /| '_ \ / _` | __|
REM                     |  __//  \| |_) | (_| | |_
REM                      \___/_/\_\ .__/ \__,_|\__|
REM                               |_| XML parser
REM
REM Copyright (c) 2019 Sebastian Pipping <sebastian@pipping.org>
REM Licensed under the MIT license:
REM
REM Permission is  hereby granted,  free of charge,  to any  person obtaining
REM a  copy  of  this  software   and  associated  documentation  files  (the
REM "Software"),  to  deal in  the  Software  without restriction,  including
REM without  limitation the  rights  to use,  copy,  modify, merge,  publish,
REM distribute, sublicense, and/or sell copies of the Software, and to permit
REM persons  to whom  the Software  is  furnished to  do so,  subject to  the
REM following conditions:
REM
REM The above copyright  notice and this permission notice  shall be included
REM in all copies or substantial portions of the Software.
REM
REM THE  SOFTWARE  IS  PROVIDED  "AS  IS",  WITHOUT  WARRANTY  OF  ANY  KIND,
REM EXPRESS  OR IMPLIED,  INCLUDING  BUT  NOT LIMITED  TO  THE WARRANTIES  OF
REM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
REM NO EVENT SHALL THE AUTHORS OR  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
REM DAMAGES OR  OTHER LIABILITY, WHETHER  IN AN  ACTION OF CONTRACT,  TORT OR
REM OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
REM USE OR OTHER DEALINGS IN THE SOFTWARE.

SET GENERATOR=Visual Studio 15 2017

REM Read by msbuild!
SET CONFIGURATION=RelWithDebInfo

REM Where Inno Setup expects build results
SET BINDIR=win32\bin\Release

MD %BINDIR% || EXIT /b 1

MD build_shared_char || EXIT /b 1
CD build_shared_char || EXIT /b 1
    cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF .. || EXIT /b 1
    msbuild /m expat.sln || EXIT /b 1
    DIR %CONFIGURATION% || EXIT /b 1
    CD .. || EXIT /b 1
COPY build_shared_char\%CONFIGURATION%\libexpat.dll %BINDIR%\ || EXIT /b 1
COPY build_shared_char\%CONFIGURATION%\libexpat.lib %BINDIR%\ || EXIT /b 1

MD build_static_char || EXIT /b 1
CD build_static_char || EXIT /b 1
    cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_SHARED_LIBS=OFF .. || EXIT /b 1
    msbuild /m expat.sln || EXIT /b 1
    DIR %CONFIGURATION% || EXIT /b 1
    CD .. || EXIT /b 1
COPY build_static_char\%CONFIGURATION%\libexpatMT.lib %BINDIR%\ || EXIT /b 1
COPY build_static_char\xmlwf\%CONFIGURATION%\xmlwf.exe %BINDIR%\ || EXIT /b 1

MD build_shared_wchar_t || EXIT /b 1
CD build_shared_wchar_t || EXIT /b 1
    cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_CHAR_TYPE=wchar_t .. || EXIT /b 1
    msbuild /m expat.sln || EXIT /b 1
    DIR %CONFIGURATION% || EXIT /b 1
    CD .. || EXIT /b 1
COPY build_shared_wchar_t\%CONFIGURATION%\libexpatw.dll %BINDIR%\ || EXIT /b 1
COPY build_shared_wchar_t\%CONFIGURATION%\libexpatw.lib %BINDIR%\ || EXIT /b 1

MD build_static_wchar_t || EXIT /b 1
CD build_static_wchar_t || EXIT /b 1
    cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_SHARED_LIBS=OFF -DEXPAT_CHAR_TYPE=wchar_t .. || EXIT /b 1
    msbuild /m expat.sln || EXIT /b 1
    DIR %CONFIGURATION% || EXIT /b 1
    CD .. || EXIT /b 1
COPY build_static_wchar_t\%CONFIGURATION%\libexpatwMT.lib %BINDIR%\ || EXIT /b 1

DIR %BINDIR% || EXIT /b 1
iscc win32\expat.iss || EXIT /b 1

REM Batch script to build Inno Setup installer for libexpat for Windows
REM Call from parent directory, e.g.: cmd /c win32\build_expat_iss.bat
REM                          __  __            _
REM                       ___\ \/ /_ __   __ _| |_
REM                      / _ \\  /| '_ \ / _` | __|
REM                     |  __//  \| |_) | (_| | |_
REM                      \___/_/\_\ .__/ \__,_|\__|
REM                               |_| XML parser
REM
REM Copyright (c) 2019 Sebastian Pipping <sebastian@pipping.org>
REM Licensed under the MIT license:
REM
REM Permission is  hereby granted,  free of charge,  to any  person obtaining
REM a  copy  of  this  software   and  associated  documentation  files  (the
REM "Software"),  to  deal in  the  Software  without restriction,  including
REM without  limitation the  rights  to use,  copy,  modify, merge,  publish,
REM distribute, sublicense, and/or sell copies of the Software, and to permit
REM persons  to whom  the Software  is  furnished to  do so,  subject to  the
REM following conditions:
REM
REM The above copyright  notice and this permission notice  shall be included
REM in all copies or substantial portions of the Software.
REM
REM THE  SOFTWARE  IS  PROVIDED  "AS  IS",  WITHOUT  WARRANTY  OF  ANY  KIND,
REM EXPRESS  OR IMPLIED,  INCLUDING  BUT  NOT LIMITED  TO  THE WARRANTIES  OF
REM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
REM NO EVENT SHALL THE AUTHORS OR  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
REM DAMAGES OR  OTHER LIABILITY, WHETHER  IN AN  ACTION OF CONTRACT,  TORT OR
REM OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
REM USE OR OTHER DEALINGS IN THE SOFTWARE.

SET GENERATOR=Visual Studio 15 2017

REM Read by msbuild!
SET CONFIGURATION=RelWithDebInfo

REM Where Inno Setup expects build results
SET BINDIR=win32\bin\Release

MD %BINDIR% || EXIT /b 1

MD build_shared_char || EXIT /b 1
CD build_shared_char || EXIT /b 1
    cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_WARNINGS_AS_ERRORS=ON -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF .. || EXIT /b 1
    msbuild /m expat.sln || EXIT /b 1
    DIR %CONFIGURATION% || EXIT /b 1
    CD .. || EXIT /b 1
COPY build_shared_char\%CONFIGURATION%\libexpat.dll %BINDIR%\ || EXIT /b 1
COPY build_shared_char\%CONFIGURATION%\libexpat.lib %BINDIR%\ || EXIT /b 1

MD build_static_char || EXIT /b 1
CD build_static_char || EXIT /b 1
    cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_WARNINGS_AS_ERRORS=ON -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_SHARED_LIBS=OFF .. || EXIT /b 1
    msbuild /m expat.sln || EXIT /b 1
    DIR %CONFIGURATION% || EXIT /b 1
    CD .. || EXIT /b 1
COPY build_static_char\%CONFIGURATION%\libexpatMT.lib %BINDIR%\ || EXIT /b 1
COPY build_static_char\xmlwf\%CONFIGURATION%\xmlwf.exe %BINDIR%\ || EXIT /b 1

MD build_shared_wchar_t || EXIT /b 1
CD build_shared_wchar_t || EXIT /b 1
    cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_WARNINGS_AS_ERRORS=ON -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_CHAR_TYPE=wchar_t .. || EXIT /b 1
    msbuild /m expat.sln || EXIT /b 1
    DIR %CONFIGURATION% || EXIT /b 1
    CD .. || EXIT /b 1
COPY build_shared_wchar_t\%CONFIGURATION%\libexpatw.dll %BINDIR%\ || EXIT /b 1
COPY build_shared_wchar_t\%CONFIGURATION%\libexpatw.lib %BINDIR%\ || EXIT /b 1

MD build_static_wchar_t || EXIT /b 1
CD build_static_wchar_t || EXIT /b 1
    cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_WARNINGS_AS_ERRORS=ON -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_SHARED_LIBS=OFF -DEXPAT_CHAR_TYPE=wchar_t .. || EXIT /b 1
    msbuild /m expat.sln || EXIT /b 1
    DIR %CONFIGURATION% || EXIT /b 1
    CD .. || EXIT /b 1
COPY build_static_wchar_t\%CONFIGURATION%\libexpatwMT.lib %BINDIR%\ || EXIT /b 1

DIR %BINDIR% || EXIT /b 1
iscc win32\expat.iss || EXIT /b 1

Add -DEXPAT_WARNINGS_AS_ERRORS=ON

win32/build_expat_iss.bat: Add -DEXPAT_WARNINGS_AS_ERRORS=ON


cmd /k %SystemRoot%\System32\cscript.exe //nologo TestLauncher.vbs VBSClipboard.spec.vbs

cmd /k %SystemRoot%\System32\cscript.exe //nologo TestLauncher.vbs DotNetCompiler.spec.vbs

change default test file

change default test file


python "%~dp0delugePostProcess.py" %1 %2 %3

fix batch file relative path

fix batch file relative path


@echo off
:: check input arguments
if %1.==. (
  echo "No arch"
  call :Help
  goto :eof
)

if %2.==. (
  echo "No project"
  call :Help
  goto :eof
)

if /I "%1"=="help" (
  call :Help
  goto :eof
)

if /I "%1"=="/help" (
  call :Help
  goto :eof
)

if /I "%1"=="-help" (
  call :Help
  goto :eof
)

set ARCH=%1
set PROJECT=%2

if %3.==. (
  set SHORT_TARGET=10
) else (
  set SHORT_TARGET=%3
)

if %4.==. (
  set VCVER=14.0
) else (
  set VCVER=%4
)

set TARGET=%SHORT_TARGET%
if "%TARGET%"=="10" (
  set TARGET=10.0.17763.0
)

:: Setup Python
set PATH=%PATH%;C:\tools\Python35-%ARCH%
set PATH=%PATH%;C:\tools\Python35-%ARCH%\Scripts

:: Setup compiler
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% %TARGET% -vcvars_ver=%VCVER%

:: Setup Clcache
set CLCACHE_DIR=C:\clcache\%PROJECT%-%ARCH%-%TARGET%-%VCVER%
set CLCACHE_HARDLINK=1
:: set CLCACHE_SERVER=1
set CLCACHE_CL=
for /F "delims=" %%a in ('where cl.exe') do @if defined CLCACHE_CL (break ) else (set CLCACHE_CL=%%a)

echo CL path: "%CLCACHE_CL%"

:: install clcache.exe as cl.exe
copy C:\tools\Python35-%ARCH%\Scripts\clcache.exe C:\clcache\cl.exe
set PATH=C:\clcache;%PATH%

if "%PROJECT%"=="xdk" (
  call "clcache.exe" -M 3000000000
)
:: if we need to change cache max size: clcache -M <size-in-bytes>

set IMAGE_NAME=windows-%SHORT_TARGET%-%ARCH%-vc%VCVER%
echo Generated IMAGE_NAME: %IMAGE_NAME%

:: setup path to perl, but add it last ... (there is a libstdc++.dll in that folder...)
set PATH=%PATH%;C:\tools\perl\perl\bin

goto :eof

:Help
setlocal
echo "Usage: dev_env.bat <compiler_arch>  <project>  [<target-os>  [<vc_version>]]"
echo "  <compiler_arch> : 'x86' | 'x64'"
echo "  <project>       : 'xdk' | 'otb'"
echo "  <target-os>     : '8.1' | '10' (default)"
echo "  <vc_version>    :"
echo "    '14.20' (i.e. VS 2019)"
echo "    '14.16' (i.e. VS 2017)"
echo "    '14.0'  (i.e. VS 2015) (default)"
endlocal

@echo off
:: check input arguments
if %1.==. (
  echo "No arch"
  call :Help
  goto :eof
)

if %2.==. (
  echo "No project"
  call :Help
  goto :eof
)

if /I "%1"=="help" (
  call :Help
  goto :eof
)

if /I "%1"=="/help" (
  call :Help
  goto :eof
)

if /I "%1"=="-help" (
  call :Help
  goto :eof
)

set ARCH=%1
set PROJECT=%2

if %3.==. (
  set SHORT_TARGET=10
) else (
  set SHORT_TARGET=%3
)

if %4.==. (
  set VCVER=14.0
) else (
  set VCVER=%4
)

set TARGET=%SHORT_TARGET%
if "%TARGET%"=="10" (
  set TARGET=10.0.17763.0
)

:: Setup Python
set PATH=%PATH%;C:\tools\Python35-%ARCH%
set PATH=%PATH%;C:\tools\Python35-%ARCH%\Scripts

:: Setup compiler
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% %TARGET% -vcvars_ver=%VCVER%

:: Setup Clcache
set CLCACHE_DIR=C:\clcache\%PROJECT%-%ARCH%-%TARGET%-%VCVER%
set CLCACHE_HARDLINK=1
:: set CLCACHE_SERVER=1
set CLCACHE_CL=
for /F "delims=" %%a in ('where cl.exe') do @if defined CLCACHE_CL (break ) else (set CLCACHE_CL=%%a)

echo CL path: "%CLCACHE_CL%"

:: install clcache.exe as cl.exe
copy C:\tools\Python35-%ARCH%\Scripts\clcache.exe C:\clcache\cl.exe
set PATH=C:\clcache;%PATH%

if "%PROJECT%"=="xdk" (
  call "clcache.exe" -M 3000000000
)
:: if we need to change cache max size: clcache -M <size-in-bytes>

set IMAGE_NAME=windows-%SHORT_TARGET%-%ARCH%-vc%VCVER%
echo Generated IMAGE_NAME: %IMAGE_NAME%

:: setup path to perl, but add it last ... (there is a libstdc++.dll in that folder...)
set PATH=%PATH%;C:\tools\perl\perl\bin

:: debug section for git
echo Home dir : %HOMEDRIVE%%HOMEPATH%
mkdir tmp
cd tmp
git clone git@gitlab.orfeo-toolbox.org:gbonnefille/superbuild-artifact.git --branch master --depth 1 sbact
cd sbact
git checkout -b test_branch
echo "v" >foo
git add foo
git commit -m "Test commit"
set GIT_SSH_COMMAND="ssh -vvv"
git push origin test_branch
exit /b 1

goto :eof

:Help
setlocal
echo "Usage: dev_env.bat <compiler_arch>  <project>  [<target-os>  [<vc_version>]]"
echo "  <compiler_arch> : 'x86' | 'x64'"
echo "  <project>       : 'xdk' | 'otb'"
echo "  <target-os>     : '8.1' | '10' (default)"
echo "  <vc_version>    :"
echo "    '14.20' (i.e. VS 2019)"
echo "    '14.16' (i.e. VS 2017)"
echo "    '14.0'  (i.e. VS 2015) (default)"
endlocal

debug instructions to check git push

CI: debug instructions to check git push


@echo off
:loop
git fetch http
git reset --hard http/master
node main.js
PING 1.1.1.1 -n 1 -w 60000 >NUL
goto loop

@echo off
:loop
git fetch http
git reset --hard http/master
npm install
node main.js
PING 1.1.1.1 -n 1 -w 60000 >NUL
goto loop

make start script run npm install

make start script run npm install


@ECHO ON

REM This is based on Scott Hanselman's GetRuby.cmd
REM https://github.com/shanselman/march-is-for-makers/blob/master/getruby.cmd

REM Put Tex in Path
REM You can also use %TEMP% but it is cleared on site restart. Tools is persistent.
SET PATH=%PATH%;D:\home\site\deployments\tools\t\miktex-portable\miktex\bin

REM I am in the repository folder
pushd D:\home\site\deployments\tools
if not exist t md t
cd t
if exist miktex-portable goto end

echo No LaTeX, need to get it!

REM Get Ruby and Rails
REM 32bit
REM  get miktex portable from https://miktex.org/download/ctan/systems/win32/miktex/setup/windows-x86/miktex-portable-2.9.6942.exe
curl -L -o miktex-portable.exe https://miktex.org/download/ctan/systems/win32/miktex/setup/windows-x86/miktex-portable-2.9.6942.exe
REM Azure puts 7zip here!
EcHO START Unzipping MikTex
d:\7zip\7za x -y -omiktex-portable miktex-portable.exe> outmiktex
EcHO DONE Unzipping MikTex

:end
popd
REM Install the url package
mpm --install=url
REM Build the pdf
pdflatex.exe resume.tex -halt-on-error

REM KuduSync is after this!

@ECHO ON

REM This is based on Scott Hanselman's GetRuby.cmd
REM https://github.com/shanselman/march-is-for-makers/blob/master/getruby.cmd

REM Put Tex in Path
REM You can also use %TEMP% but it is cleared on site restart. Tools is persistent.
SET PATH=%PATH%;D:\home\site\deployments\tools\t\miktex-portable\miktex\bin

REM I am in the repository folder
pushd D:\home\site\deployments\tools
if not exist t md t
cd t
if exist miktex-portable goto end

echo No LaTeX, need to get it!

REM  get miktex portable from https://miktex.org/download/ctan/systems/win32/miktex/setup/windows-x86/miktex-portable-2.9.6942.exe
curl -L -o miktex-portable.exe https://miktex.org/download/ctan/systems/win32/miktex/setup/windows-x86/miktex-portable-2.9.6942.exe
REM Azure puts 7zip here!
EcHO START Unzipping MikTex
d:\7zip\7za x -y -omiktex-portable miktex-portable.exe> outmiktex
EcHO DONE Unzipping MikTex

:end
popd
REM Install the url package
mpm --install=url
REM Build the pdf
pdflatex.exe resume.tex -halt-on-error

REM KuduSync is after this!

remove incorrect comments and trigger deployment


@echo off

:: Start the goodness
call clink inject --quiet

:: Setup aliases
if not exist %DOT%\clink\aliases (
  "%GIT_INSTALL_ROOT%\usr\bin\bash" --login %DOT%\clink\collect-aliases.sh
)
doskey /macrofile=%DOT%\clink\aliases

:: Setup PATH
if exist %USERPROFILE%\bin\ set PATH=%USERPROFILE%\bin;%PATH%
set PATH=%DOT%\win\bin;%PATH%
for /F %%p in ('scoop prefix z.lua') do set PATH=%PATH%;%%p

:: ENV
set _ZL_NO_CHECK=1

:: Clean title
title cmd

@echo off

:: Start the goodness
call clink inject --quiet

:: Setup aliases
if not exist %DOT%\clink\aliases (
  "%GIT_INSTALL_ROOT%\usr\bin\bash" --login %DOT%\clink\collect-aliases.sh
)
doskey /macrofile=%DOT%\clink\aliases

:: Setup PATH
if exist %USERPROFILE%\bin\ set PATH=%USERPROFILE%\bin;%PATH%
set PATH=%DOT%\win\bin;%PATH%
for /F %%p in ('scoop prefix z.lua') do set PATH=%PATH%;%%p

:: ENV
set _ZL_NO_CHECK=1
set FZF_DEFAULT_COMMAND=fd -t f
set FZF_DEFAULT_OPTS=--height=40%% --layout=reverse --bind "alt-e:execute(nvr {})"

:: Clean title
title cmd

set default command and options

fzf: set default command and options


if "%1"=="" goto default_value_python:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value_python:
set pythonexe="c:\Python34_x64\python"
:custom_python:
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

if "%1"=="" goto default_value_python:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value_python:
set pythonexe="c:\Python35_x64\python"
:custom_python:
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

update build_script

update build_script


Add new helper batch files

Windows: Add new helper batch files


set CFLAGS=/MT /DNOMINMAX /Ox /DNDEBUG /W4 /Zi /EHsc /nologo -I./include -I../cybozulib_ext/include
set LDFLAGS=/LIBPATH:..\cybozulib_ext\lib /LIBPATH:.\lib

set CFLAGS=/MT /DNOMINMAX /Ox /DNDEBUG /openmp /W4 /Zi /EHsc /nologo -I./include -I../cybozulib_ext/include
set LDFLAGS=/LIBPATH:..\cybozulib_ext\lib /LIBPATH:.\lib

add openmp option to setvar.bat

add openmp option to setvar.bat


git clone https://github.com/SFML/SFML.git
cd SFML

mkdir install
mkdir build
cd build

cmake .. -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX=../install -DSFML_DEPENDENCIES_INSTALL_PREFIX=../install -DSFML_BUILD_FRAMEWORKS=FALSE -DBUILD_SHARED_LIBS=TRUE

msbuild INSTALL.vcxproj

cd ../../
cd TIMLE

mkdir build

mkdir "build/TIMLE"
echo "mkdir build/TIMLE"

echo "Process TIMLE by CMake started"
cmake . -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX=./build/TIMLE -DCMAKE_PREFIX_PATH=./SFML/install
echo "Process TIMLE by CMake ended"

git clone https://github.com/SFML/SFML.git
cd SFML

mkdir install
mkdir build
cd build

cmake .. -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX=../install -DSFML_DEPENDENCIES_INSTALL_PREFIX=../install -DSFML_BUILD_FRAMEWORKS=FALSE -DBUILD_SHARED_LIBS=TRUE

msbuild INSTALL.vcxproj

cd ../../

mkdir build
cd build
mkdir TIMLE

cmake .. -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX=TIMLE -DCMAKE_PREFIX_PATH=../SFML/install

Fix CMake build options

Fix CMake build options