echo off

set BuildMode=Debug
if not {%1} == {} (
    set BuildMode=%1
)

set OriginalPath=%cd%
set TestPath=%~dp0..\test
"%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild" %TestPath%\DMLibTest\DMLibTest.csproj /t:Rebuild /p:Configuration=%BuildMode%  >NUL
"%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild" %TestPath%\DMLibTestCodeGen\DMLibTestCodeGen.csproj /t:Rebuild /p:Configuration=%BuildMode% >NUL
%TestPath%\DMLibTestCodeGen\bin\Debug\DMLibTestCodeGen.exe %TestPath%\DMLibTest\bin\Debug\DMLibTest.dll %TestPath%\DMLibTest\Generated DNetCore

cd %~dp0
dotnet restore -s https://www.nuget.org/api/v2/
cd %~dp0\Microsoft.WindowsAzure.Storage.DataMovement
dotnet build -c %BuildMode%
cd %~dp0\MsTestLib
dotnet build -c %BuildMode%
cd %~dp0\DMTestLib
dotnet build -c %BuildMode%
cd %~dp0\DMLibTest
dotnet build -c %BuildMode%
dotnet publish -c %BuildMode%
cd %OriginalPath%

set BuildMode=Debug
if not {%1} == {} (
    set BuildMode=%1
)

set OriginalPath=%cd%
set TestPath=%~dp0..\test
"%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild" %TestPath%\DMLibTest\DMLibTest.csproj /t:Rebuild /p:Configuration=%BuildMode%  >NUL
"%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild" %TestPath%\DMLibTestCodeGen\DMLibTestCodeGen.csproj /t:Rebuild /p:Configuration=%BuildMode% >NUL
%TestPath%\DMLibTestCodeGen\bin\Debug\DMLibTestCodeGen.exe %TestPath%\DMLibTest\bin\Debug\DMLibTest.dll %TestPath%\DMLibTest\Generated DNetCore

dotnet restore -s https://www.nuget.org/api/v2/ %~dp0\DMLibTest
cd %~dp0\Microsoft.WindowsAzure.Storage.DataMovement
dotnet build -c %BuildMode%
cd %~dp0\MsTestLib
dotnet build -c %BuildMode%
cd %~dp0\DMTestLib
dotnet build -c %BuildMode%
cd %~dp0\DMLibTest
dotnet build -c %BuildMode%
dotnet publish -c %BuildMode%
cd %OriginalPath%

Change build script after moving DMLib to VS2017


@echo off

pushd %1

set attempts=5
set counter=0

:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%

if exist %1\node_modules\azure-cli\bin\azure (
  cmd /c npm update https://github.com/amitapl/azure-sdk-tools-xplat/tarball/latest
) else (
  cmd /c npm install https://github.com/amitapl/azure-sdk-tools-xplat/tarball/latest
)

IF %ERRORLEVEL% NEQ 0 goto error

if exist %1\node_modules\kudusync\bin\kudusync (
  cmd /c npm update kudusync
) else (
  cmd /c npm install kudusync
)

IF %ERRORLEVEL% NEQ 0 goto error

goto end

:error
if %counter% GEQ %attempts% goto :lastError
goto retry

:lastError
popd
echo An error has occured during npm install.
exit /b 1

:end
popd
echo Finished successfully.
exit /b 0

Make sure exit code is 0 when successful.


@echo off
rem This will download the Kolibri windows installer artifact at the windows-2016 buildkite agent.
rem After the installer successfully sign it will upload the signed installer at the Sign Windows installer pipeline artifact.
rem To sign the Windows installer set the `SIGN_WINDOWS_INSTALLER=true` environment variable.

IF NOT "%SIGN_WINDOWS_INSTALLER%" == "true" (GOTO DONT_SIGN)

set current_path=%cd%
buildkite-agent.exe artifact download "installer/*.exe" . --step "Build kolibri windows installer" --build %BUILDKITE_BUILD_ID% --agent-access-token %BUILDKITE_AGENT_ACCESS_TOKEN%
%WINDOWS_SIGN_SCRIPT_PATH% "%current_path%\installer" && cd "%current_path%\installer\" && buildkite-agent.exe artifact upload "*.exe"
GOTO END

:DONT_SIGN
echo Set the SIGN_WINDOWS_INSTALLER=true environment variable to sign the Windows installer.

:END

@echo off
rem To sign the Windows installer, set the `SIGN_WINDOWS_INSTALLER=true` environment variable.
rem This will download the Kolibri Windows installer artifact at the windows-2016 Buildkite agent.
rem After the installer successfully sign it will upload the installer at the Sign Windows Installer pipeline artifact.

IF NOT "%SIGN_WINDOWS_INSTALLER%" == "true" (GOTO DONT_SIGN)

set current_path=%cd%
buildkite-agent.exe artifact download "installer/*.exe" . --step "Build kolibri windows installer" --build %BUILDKITE_BUILD_ID% --agent-access-token %BUILDKITE_AGENT_ACCESS_TOKEN%
%WINDOWS_SIGN_SCRIPT_PATH% "%current_path%\installer" && cd "%current_path%\installer\" && ren *.exe *-signed.exe && buildkite-agent.exe artifact upload "*.exe"
GOTO END

:DONT_SIGN
echo Set the SIGN_WINDOWS_INSTALLER=true environment variable to sign the Windows installer.

:END

Add a singed name at the filename of the installer, after it was successfully signed.


SET GOPATH=%CD%\gopath
SET PATH=C:\Go\bin;C:\Program Files\Git\cmd\;%GOPATH%\bin;%PATH%

cd %GOPATH%\src\code.cloudfoundry.org\cli

powershell -command set-executionpolicy remotesigned

go version

go get -u github.com/onsi/ginkgo/ginkgo

ginkgo version

ginkgo -r -race -randomizeAllSpecs -randomizeSuites -skipPackage integration -flakeAttempts=2 .

SET GOPATH=%CD%\gopath
SET PATH=C:\Go\bin;C:\Program Files\Git\cmd\;%GOPATH%\bin;%PATH%

cd %GOPATH%\src\code.cloudfoundry.org\cli

powershell -command set-executionpolicy remotesigned

go version

go get -u github.com/onsi/ginkgo/ginkgo

ginkgo version

ginkgo -r -randomizeAllSpecs -randomizeSuites -skipPackage integration -flakeAttempts=2 .

Remove -race from windows units temporarily

Because of https://github.com/golang/go/issues/27089, passing "-race" to
ginkgo causes the windows build to fail. We are simply removing this
flag until the golang issue is resolved. (Units on other operating
systems still check for race conditions.)

[#160911621]

Signed-off-by: Will Murphy <a0e419adf8e2224ae039ba5f1877fb7f62d300e5@pivotal.io>


if not exist "C:\Windows\Temp\msys2.exe" (
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20161025.exe', 'C:\Windows\Temp\msys2.exe')" <NUL
)

start /wait C:\Windows\Temp\msys2.exe --script A:\msys2-install.qs
start /wait C:\msys64\usr\bin\bash.exe --login -c "pacman -Syu --noconfirm"
start /wait C:\msys64\usr\bin\bash.exe --login -c "pacman -Syu --noconfirm"
start /wait C:\msys64\usr\bin\bash.exe --login -c "pacman -S --noconfirm zip unzip"
start /wait C:\msys64\usr\bin\bash.exe --login -c "pacman -S --noconfirm base-devel"

Install the base-devel meta package on setup


REM Installing Chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

REM Installing virtualbox
choco install virtualbox -y

REM Killing the default adapter and DHCP server to avoid network issues down the road
"C:\Program Files\Oracle\VirtualBox\VBoxManage" dhcpserver remove --netname "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter"
"C:\Program Files\Oracle\VirtualBox\VBoxManage" hostonlyif remove "VirtualBox Host-Only Ethernet Adapter"

REM Installing vagrant
choco install vagrant -y

REM Installing Chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

REM Installing virtualbox
choco upgrade virtualbox -y

REM Killing the default adapter and DHCP server to avoid network issues down the road
"C:\Program Files\Oracle\VirtualBox\VBoxManage" dhcpserver remove --netname "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter"
"C:\Program Files\Oracle\VirtualBox\VBoxManage" hostonlyif remove "VirtualBox Host-Only Ethernet Adapter"

REM Installing vagrant
choco upgrade vagrant -y

Use upgrade command with choco on Windows

`choco upgrade` will do `install` if the package is missing.


universe   = vanilla
executable = ./x_job_filexfer_testjob.pl
log = job_filexfer_output-withvacate_van.log
output = job_filexfer_output-withvacate_van.out
error = job_filexfer_output-withvacate_van.err
should_transfer_files = YES
when_to_transfer_output = ON_EXIT_OR_EVICT
transfer_output_files = submit_filetrans_output14821e.txt,submit_filetrans_output14821f.txt,submit_filetrans_output14821g.txt
Notification = NEVER
arguments = --job=14821 --long
queue

universe   = vanilla
executable = ./x_job_filexfer_testjob.pl
log = job_filexfer_output-withvacate_van.log
output = job_filexfer_output-withvacate_van.out
error = job_filexfer_output-withvacate_van.err
should_transfer_files = YES
when_to_transfer_output = ON_EXIT_OR_EVICT
transfer_output_files = submit_filetrans_output14821e.txt,submit_filetrans_output14821f.txt,submit_filetrans_output14821g.txt
Notification = NEVER
arguments = --job=14821 --forever
queue

Remove race condition on vacate in test by using -forever option. Fix parallel test behaviour.


@call set_vars.bat
copy %QTPATH%\Qt5Charts.dll %ROOTPATH%\release\
copy %QTPATH%\Qt5Core.dll %ROOTPATH%\release\
copy %QTPATH%\Qt5Gui.dll %ROOTPATH%\release\
copy %QTPATH%\Qt5Network.dll %ROOTPATH%\release\
copy %QTPATH%\Qt5Widgets.dll %ROOTPATH%\release\
copy %MINGW%\bin\libgcc_s_dw2-1.dll %ROOTPATH%\release\
copy %MINGW%\bin\libstdc++-6.dll %ROOTPATH%\release\
copy %MINGW%\bin\libgcc_s_dw2-1.dll %ROOTPATH%\release\
copy %MINGW%\bin\libwinpthread-1.dll %ROOTPATH%\release\
@if not "%RUNALL%"=="1" pause

@call set_vars.bat
copy %QTPATH%\Qt5Charts.dll %ROOTPATH%\release\
copy %QTPATH%\Qt5Core.dll %ROOTPATH%\release\
copy %QTPATH%\Qt5Gui.dll %ROOTPATH%\release\
copy %QTPATH%\Qt5Network.dll %ROOTPATH%\release\
copy %QTPATH%\Qt5Widgets.dll %ROOTPATH%\release\
copy %QTPATH%\libgcc_s_dw2-1.dll %ROOTPATH%\release\
copy %QTPATH%\libstdc++-6.dll %ROOTPATH%\release\
copy %QTPATH%\libgcc_s_dw2-1.dll %ROOTPATH%\release\
copy %QTPATH%\libwinpthread-1.dll %ROOTPATH%\release\
@if not "%RUNALL%"=="1" pause

Fix invalid DLL paths when deploying.

Fix invalid DLL paths when deploying.


@echo off

if exist "C:\Work\D\Vvmn\*" goto deleteDir
echo No existing build directory
goto updateScripts

:deleteDir
echo Delete directory
pushd "C:\Work\D\Vvmn"
for /d %%d in (*.*) do rmdir /s /q "%%d"
del /q *.*
popd

:updateScripts
cd C:\Work\VesselView\Dashboards\VesselView
"C:\Program Files (x86)\Git\bin\git" fetch origin
"C:\Program Files (x86)\Git\bin\git" reset --hard master

:startDashboards
echo Start dashboards
call "C:\Program Files (x86)\CMake 3.0.2\bin\ctest.exe" -S C:\Work\VesselView\Dashboards\VesselView\Utilities\Dashboards\VesselView-errai-master-nightly.cmake -V -C Release > C:\Work\VesselView\Dashboards\Logs\VesselView-errai-master-nightly.log 2>&1

@echo off

if exist "C:\Work\D\Vvmn\*" goto deleteDir
echo No existing build directory
goto updateScripts

:deleteDir
echo Delete directory
pushd "C:\Work\D\Vvmn"
for /d %%d in (*.*) do rmdir /s /q "%%d"
del /q *.*
popd

:updateScripts
cd C:\Work\VesselView\Dashboards\VesselView
"C:\Program Files (x86)\Git\bin\git" fetch origin
"C:\Program Files (x86)\Git\bin\git" reset --hard origin/master

:startDashboards
echo Start dashboards
call "C:\Program Files (x86)\CMake 3.0.2\bin\ctest.exe" -S C:\Work\VesselView\Dashboards\VesselView\Utilities\Dashboards\VesselView-errai-master-nightly.cmake -V -C Release > C:\Work\VesselView\Dashboards\Logs\VesselView-errai-master-nightly.log 2>&1

Fix errai dashboard script reset to master

See issue #45


@ECHO OFF
REM Test default configuration against examples on windows.

REM WORKSPACE is always set inside our testing environment. If this is run
REM outside that environment, the caller is responsible for setting it.
IF "%WORKSPACE%"=="" GOTO ErrExit

REM NOTE: This is pretty messy, but it is the only way I could figure out how to
REM       get the correct environment setup and then invoke
REM       nightly.windows. (thomasvandoren, 2014-07-14)
c:\cygwin64\bin\bash -exc "export PATH='/usr/local/bin:/usr/bin:/cygdrive/c/windows/system32:/cygdrive/c/windows:/cygdrive/c/windows/System32/Wbem:/cygdrive/c/windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/SysinternalsSuite:/usr/bin:/cygdrive/c/emacs-24.3/bin' ; export CHPL_HOME=$WORKSPACE ; source $CHPL_HOME/util/cron/common.bash && $CHPL_HOME/util/cron/nightly.windows"
GOTO End

:ErrExit
ECHO "ERROR: WORKSPACE must be set in the environment"
EXIT 1
GOTO End

:End

@ECHO OFF
REM Test default configuration against examples on windows.

REM WORKSPACE is always set inside our testing environment. If this is run
REM outside that environment, the caller is responsible for setting it.
IF "%WORKSPACE%"=="" GOTO ErrExit

REM NOTE: This is pretty messy, but it is the only way I could figure out how to
REM       get the correct environment setup and then invoke
REM       nightly.windows. (thomasvandoren, 2014-07-14)
c:\cygwin64\bin\bash -exc "export PATH='/usr/local/bin:/usr/bin:/cygdrive/c/windows/system32:/cygdrive/c/windows:/cygdrive/c/windows/System32/Wbem:/cygdrive/c/windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/SysinternalsSuite:/usr/bin:/cygdrive/c/emacs-24.3/bin' ; export CHPL_HOME=$PWD ; source $CHPL_HOME/util/cron/common.bash && $CHPL_HOME/util/cron/nightly.windows"
GOTO End

:ErrExit
ECHO "ERROR: WORKSPACE must be set in the environment"
EXIT 1
GOTO End

:End

Use PWD instead of WORKSPACE in windows batch script.

WORKSPACE use windows file path separators, which does not translate well to
the cygwin/bash environment. PWD uses the cygwin/bash file separator _and_ it
uses the correct file system mapping.

git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@23856 3a8e244f-b0f2-452b-bcba-4c88e055c3ca


:: Forward the ./doom script to Emacs

@ECHO OFF
PUSHD "%~dp0" >NUL

IF "%1"=="run" (
   SHIFT
   emacs -Q %* -l ..\init.el -f "doom|run-all-startup-hooks"
) ELSE (
   emacs --quick --script .\doom -- %*
)

POPD >NUL
ECHO ON

:: Forward the ./doom script to Emacs

@ECHO OFF
PUSHD "%~dp0" >NUL

IF "%1"=="run" (
   SHIFT
   start runemacs -Q %* -l ..\init.el -f "doom|run-all-startup-hooks"
) ELSE (
   emacs --quick --script .\doom -- %*
)

POPD >NUL
ECHO ON

Tweak the command used for the "run" argument

- Using "start" will allow the batch script to return immediately,
  rather than waiting for the command to finish.
- Using "runemacs" (instead of plain "emacs") will hide the console
  window that is displayed while Emacs is running


@ECHO OFF
ECHO Running regression tests
START /Wait Dolphin7 DPRO.img7 -f RegressionTestsRun.st -q

IF %ERRORLEVEL% NEQ 0 (
  TYPE DPRO.testlog
  ECHO Tests failed=%ERRORLEVEL%
  EXIT -1
)

TYPE DPRO.testlog
ECHO Finished regression tests

@ECHO OFF
ECHO Running regression tests
START /Wait Dolphin7 DPRO.img7 -f RegressionTestsRun.st -q
FINDSTR /L /C:" 0 errors" DPRO.testlog

IF %ERRORLEVEL% NEQ 0 (
  TYPE DPRO.testlog
  ECHO Tests failed
  EXIT -1
)

ECHO Finished regression tests

Use contents of .lestlog file to determine success or failure rather than relying on exit code from Dolphin. The move to VS2015 seems to have exacerbated a situation where the return code from SessionManager>>quit: may not make it back to the shell. For the the time being we'll change the way we detect success or failure of the tests.


@echo off
setlocal
call NightlyBuild.cmd
set PackageDir=%~dp0LocalPackages
call dnu restore dnx\src\Microsoft.DotNet.xunit.performance.runner.dnx\project.json -f %PackageDir%
call dnu pack dnx\src\Microsoft.DotNet.xunit.performance.runner.dnx\project.json --out %PackageDir% --configuration Release

Add a batch file to build all of the nuget packages, including the DNX stuff. This isn't part of NightlyBuild.cmd yet, because it requires some special machine setup for the DNX part.


@echo off
setlocal
for %%i in (NuGet.exe) do set nuget_path=%%~dpnx$PATH:i
if "%nuget_path%"=="" goto :nonuget
set packages_path=%~dp0packages
if exist "%packages_path%\repositories.config" (
    for /f "usebackq delims=" %%p in (`PowerShell -C "Get-Content '%packages_path%\repositories.config' | Select-Xml //repository/@path | %%{$_.Node.Value}"`) do if errorlevel==0 call :restore "%packages_path%\%%p"
) else (
    for /r %%d in (.) do if errorlevel==0 if exist %%d\packages.config call :restore "%%d"
)
goto :EOF

:restore
setlocal
echo Restoring packages for "%~1"
cd "%~1"
"%nuget_path%" install -OutputDirectory "%packages_path%" ^
                       -Source https://nuget.org/api/v2/ ^
                       -Source P:\Development\NuGet
goto :EOF

:nonuget
echo NuGet executable not found in PATH
echo For more on NuGet, see http://nuget.codeplex.com
exit /b 2

@echo off
setlocal
for %%i in (NuGet.exe) do set nuget_path=%%~dpnx$PATH:i
if "%nuget_path%"=="" goto :nonuget
set packages_path=%~dp0packages
if exist "%packages_path%\repositories.config" (
    for /f "usebackq delims=" %%p in (`PowerShell -C "[xml](Get-Content '%packages_path%\repositories.config') | Select-Xml //repository/@path | %%{$_.Node.Value}"`) do if errorlevel==0 call :restore "%packages_path%\%%p"
) else (
    for /r %%d in (.) do if errorlevel==0 if exist %%d\packages.config call :restore "%%d"
)
goto :EOF

:restore
setlocal
echo Restoring packages for "%~1"
cd "%~dp1"
"%nuget_path%" install -OutputDirectory "%packages_path%"
goto :EOF

:nonuget
echo NuGet executable not found in PATH
echo For more on NuGet, see http://nuget.codeplex.com
exit /b 2

Package restore script fixes (possibly some due to PowerShell 4 compatibility issues)


@echo off

SETLOCAL

if NOT DEFINED JAVA_HOME goto err

set SCRIPT_DIR=%~dp0

for %%I in ("%SCRIPT_DIR%..") do set REDPEN_HOME=%%~dpfI

set REDPEN_CLASSPATH=%REDPEN_HOME%/conf;%REDPEN_HOME%/lib/*
set JAVA_OPTS=%JAVA_OPTS%

"%JAVA_HOME%\bin\java" %JAVA_OPTS% -classpath "%REDPEN_CLASSPATH%" cc.redpen.Main %*
goto finally

:err
echo Error: JAVA_HOME is not defined. Can not start RedPen
pause

:finally
ENDLOCAL

@echo off

SETLOCAL

if NOT DEFINED JAVA_HOME goto err

set SCRIPT_DIR=%~dp0

for %%I in ("%SCRIPT_DIR%..") do set REDPEN_HOME=%%~dpfI

set REDPEN_CLASSPATH=%REDPEN_HOME%/conf;%REDPEN_HOME%/lib/*
set JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8

"%JAVA_HOME%\bin\java" %JAVA_OPTS% -classpath "%REDPEN_CLASSPATH%" cc.redpen.Main %*
goto finally

:err
echo Error: JAVA_HOME is not defined. Can not start RedPen
pause

:finally
ENDLOCAL

Fix character corruption in Windows

Fix character corruption in Windows


@echo off
rem check that JAVA_HOME and LCF_HOME are set
if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome
if not exist "%LCF_HOME%\properties.ini" goto nolcfhome
rem save existing path here
set OLDDIR=%CD%
cd "%LCF_HOME%\processes"
set CLASSPATH=.
for %%f in (jar/*) do call script\setclasspath.bat %%f
set JAVADEFINES=
for %%g in (define/*) do call script\setdefine.bat %%g
rem restore old path here
cd "%OLDDIR%"
"%JAVA_HOME%\bin\java" "-Dorg.apache.lcf.configfile=%LCF_HOME%\properties.ini" %JAVADEFINES% -classpath "%CLASSPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto done
:nojavahome
echo Environment variable JAVA_HOME is not set properly.
goto done
:nolcfhome
echo Environment variable LCF_HOME is not set properly.
goto done
:done

@echo off
rem check that JAVA_HOME and LCF_HOME are set
if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome
if not exist "%LCF_HOME%\properties.ini" goto nolcfhome
rem save existing path here
set OLDDIR=%CD%
cd "%LCF_HOME%\processes"
set CLASSPATH=.
for %%f in (jar/*) do call script\setclasspath.bat %%f
set JAVADEFINES=
for %%g in (define/*) do call script\setdefine.bat %%g
rem restore old path here
cd "%OLDDIR%"
"%JAVA_HOME%\bin\java" "-Dorg.apache.lcf.configfile=%LCF_HOME%\properties.ini" %JAVADEFINES% -classpath "%CLASSPATH%" %*
goto done
:nojavahome
echo Environment variable JAVA_HOME is not set properly.
goto done
:nolcfhome
echo Environment variable LCF_HOME is not set properly.
goto done
:done

Use %* instead of enumerated arguments when calling java

git-svn-id: 0503cfb7d358eaa9bd718f348f448f10022ea703@939729 13f79535-47bb-0310-9956-ffa450edef68


function cdt()
{

    case "$1" in
    "-h") showcdtusage;;

    "") cdtbranches unstable;;
    "unstable") cdtbranches $1;;
    "10.3") cdtbranches $1;;
    "10.2") cdtbranches $1;;
    "10.1") cdtbranches $1;;

    "conv") cd /c/src/conversion;;
    "home") cd /c/users/chirag.shukla;;
    "d") cd /d;;
    "safe") cd /d/safe_exes;;
    "tempsrc") cd /d/tempsrc;;
    "stash") cd /d/stashedsrc;;
    "review") cd /d/code-review;;
    esac
}

function cdtbranches()
{
    cd /c/src/leds/branches/$1
}

function showcdtusage()
{
    echo 'Usage: . cdt 10.2        cd into 10.2 branch'
    echo '       . cdt 10.1        cd into 10.1 branch'
    echo '       . cdt unstable    cd into unstable branch'
    echo '       . cdt             cd into unstable branch'
    echo '       . cdt conv        cd into conversion'
    echo '       . cdt home        cd into c:\users\zf'
    echo '       . cdt d           cd into d: drive'
    echo '       . cdt safe        cd into d:\safe_exes'
    echo '       . cdt tempsrc     cd into d:\tempsrc'
    echo '       . cdt stash       cd into d:\stashedsrc'
    echo '       . cdt review      cd into d:\code-review'
}

Change directory - useful with ConEmu and MinGW


@echo off

REM docs\build_autodoc_files.py
sphinx-build -b html doc_src pywinauto\docs

REM c:\.temp\pudge\pudge\cli  --documents doc_source\index.rst,doc_source\controls_overview.rst,doc_source\howto.rst,doc_source\getting_started.rst,history.txt,license.txt,todo.txt --title pywinauto  -v  -d website  -m pywinauto.application,pywinauto.taskbar,pywinauto.clipboard,pywinauto.timings,pywinauto.findbestmatch,pywinauto.findwindows,pywinauto.handleprops,pywinauto.XMLHelpers,pywinauto.controls,pywinauto.tests   -t doc_source\template

REM These are the python modules
REM application.py
REM clipboard.py
REM findbestmatch.py
REM findwindows.py
REM handleprops.py
REM taskbar.py
REM win32defines.py
REM win32functions.py
REM win32structures.py
REM XMLHelpers.py

REM controls
REM tests

REM c:\.temp\pudge\pudge\cli --title pywinauto -v -m pywinauto --documents docs\index.rst,history.txt,license.txt,todo.txt,docs\howto.rst -d pudge_output_green_paste   -t \.temp\pudge\pudge\template\green_paste

@echo off

doc_src\build_autodoc_files.py
sphinx-build -b html doc_src pywinauto\docs

REM c:\.temp\pudge\pudge\cli  --documents doc_source\index.rst,doc_source\controls_overview.rst,doc_source\howto.rst,doc_source\getting_started.rst,history.txt,license.txt,todo.txt --title pywinauto  -v  -d website  -m pywinauto.application,pywinauto.taskbar,pywinauto.clipboard,pywinauto.timings,pywinauto.findbestmatch,pywinauto.findwindows,pywinauto.handleprops,pywinauto.XMLHelpers,pywinauto.controls,pywinauto.tests   -t doc_source\template

REM These are the python modules
REM application.py
REM clipboard.py
REM findbestmatch.py
REM findwindows.py
REM handleprops.py
REM taskbar.py
REM win32defines.py
REM win32functions.py
REM win32structures.py
REM XMLHelpers.py

REM controls
REM tests

REM c:\.temp\pudge\pudge\cli --title pywinauto -v -m pywinauto --documents docs\index.rst,history.txt,license.txt,todo.txt,docs\howto.rst -d pudge_output_green_paste   -t \.temp\pudge\pudge\template\green_paste

Fix the path to build_autodoc_files.py and call it by default everytime (it is safe as it does not re-generate files which already exist)


@echo off

@rem ------------------------------------
@rem @file   xxx.bat
@rem @brief  yyy
@rem @author zzz@aaa
@rem @date   yyyy/mm/dd
@rem @par    Copyright
@rem         2016-20XX YYYY All rights reserved.
@rem         Released under the MIT license
@rem         http://opensource.org/licenses/mit-license.php
@rem ------------------------------------

@rem ------------------------------------
@rem @brief  Main routine
@rem @param  none
@rem @return none
@rem ------------------------------------
call :INITIALIZE
call :EXECUTE
call :FINALIZE
exit

@rem ------------------------------------
@rem @brief  Initialize global variables
@rem @param  none
@rem @return none
@rem ------------------------------------
:INITIALIZE
echo "enter INITIALIZE"
echo "exit INITIAIZE"
exit /b

@rem ------------------------------------
@rem @brief  Executes
@rem @param  none
@rem @return none
@rem ------------------------------------
:EXECUTE
echo "enter EXECUTE"
echo "exit EXECUTE"
exit /b

@rem ------------------------------------
@rem @brief  Finalize
@rem @param  none
@rem @return none
@rem ------------------------------------
:FINALIZE
echo "enter FINALIZE"
pause
echo "exit FINALIZE"
exit /b

Add template of bat script

Add template of bat script


set FFMPEG_FN=ffmpeg-%PKG_VERSION%-win%ARCH%

curl -L -O "https://ffmpeg.zeranoe.com/builds/win%ARCH%/dev/%FFMPEG_FN%-dev.7z"

7za x %SRC_DIR%\%FFMPEG_FN%-shared.7z -o%SRC_DIR%
7za x %FFMPEG_FN%-dev.7z -o%SRC_DIR%

copy %SRC_DIR%\%FFMPEG_FN%-shared\bin %LIBRARY_BIN%
copy %SRC_DIR%\%FFMPEG_FN%-dev\include %LIBRARY_INC%
copy %SRC_DIR%\%FFMPEG_FN%-dev\lib %LIBRARY_LIB%
copy %SRC_DIR%\%FFMPEG_FN%-shared\README.txt %RECIPE_DIR%

mkdir %RECIPE_DIR%\licenses
copy %SRC_DIR%\%FFMPEG_FN%-shared\licenses %RECIPE_DIR%\licenses

exit 0

set FFMPEG_FN=ffmpeg-%PKG_VERSION%-win%ARCH%

curl -L -O "https://ffmpeg.zeranoe.com/builds/win%ARCH%/dev/%FFMPEG_FN%-dev.7z"

7za x %SRC_DIR%\%FFMPEG_FN%-shared.7z -o%SRC_DIR%
7za x %FFMPEG_FN%-dev.7z -o%SRC_DIR%

robocopy %SRC_DIR%\%FFMPEG_FN%-shared\bin\ %LIBRARY_BIN%\ *.* /E
if %ERRORLEVEL% GEQ 8 exit 1

robocopy %SRC_DIR%\%FFMPEG_FN%-dev\include\ %LIBRARY_INC%\ *.* /E
if %ERRORLEVEL% GEQ 8 exit 1

robocopy %SRC_DIR%\%FFMPEG_FN%-dev\lib\ %LIBRARY_LIB%\ *.* /E
if %ERRORLEVEL% GEQ 8 exit 1

copy %SRC_DIR%\%FFMPEG_FN%-shared\README.txt %RECIPE_DIR%

mkdir %RECIPE_DIR%\licenses
copy %SRC_DIR%\%FFMPEG_FN%-shared\licenses %RECIPE_DIR%\licenses

exit 0

Use robocopy to copy subdirs too

Use robocopy to copy subdirs too


@echo off

REM
REM Batch script to build and test on Windows. You can use this in conjunction
REM with the Vagrant machine.
REM

echo Building
go build
if %errorlevel% neq 0 exit /b %errorlevel%

echo Testing
go test ./...
if %errorlevel% neq 0 exit /b %errorlevel%

echo System Testing
go test -c -covermode=atomic -coverpkg ./...
if %errorlevel% neq 0 exit /b %errorlevel%
nosetests -w tests\system --process-timeout=30
if %errorlevel% neq 0 exit /b %errorlevel%

Normalize all the line endings

Normalize all the line endings


REM install db
call C:\funda_components\reports_manager\report_manager_database\reports_manager_test_db\install_reports_manager_test_db.bat

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d reports_manager_test_db  -p 5432 -f ..\action_enter_edit_folders.sql 1> test_action_enter_edit_folders.log 2>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d reports_manager_test_db  -p 5432 -f test_action_enter_edit_folders.sql  1>> test_action_enter_edit_folders.log 2>>&1

Add complete db installation before tests


@echo off

traceview.exe -start UsbDk -rt -flag 0xFF -level 6 -ft 1 -pdb UsbDk.pdb -guid UsbDk.ctl

mkdir WPP
start traceview.exe -process -rt UsbDk -display -ods -o WPP\\UsbDk.txt -pdb UsbDk.pdb -guid UsbDk.ctl
start dbgview.exe

pause

traceview.exe -stop UsbDk

@echo off

traceview.exe -start UsbDk -rt -flag 0x7FFFFFFF -level 6 -ft 1 -pdb UsbDk.pdb -guid UsbDk.ctl

mkdir WPP
start traceview.exe -process -rt UsbDk -display -ods -o WPP\\UsbDk.txt -pdb UsbDk.pdb -guid UsbDk.ctl
start dbgview.exe

pause

traceview.exe -stop UsbDk

Enable all trace flags by default

Trace: Enable all trace flags by default

Signed-off-by: Dmitry Fleytman <f50f56ffad4b379c2a89812e98b14900ef87e9ea@redhat.com>


mkdir -p build-cmake
cd build-cmake
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DCMAKE_BUILD_TYPE=Release ..
if errorlevel 1 exit 1
nmake
if errorlevel 1 exit 1
nmake install
if errorlevel 1 exit 1
MOVE %LIBRARY_LIB%\ann.dll %LIBRARY_BIN%

mkdir -p build-cmake
cd build-cmake
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DCMAKE_BUILD_TYPE=Release -DANN_NO_RANDOM ..
if errorlevel 1 exit 1
nmake
if errorlevel 1 exit 1
nmake install
if errorlevel 1 exit 1
MOVE %LIBRARY_LIB%\ann.dll %LIBRARY_BIN%

Add flag specifying that random/srandom are not available on windows


@echo off

set DIST_DIR=dist
set CERTIFICATE_PATH=%HOMEPATH%\certificates\nuxeo.com.pfx
set MSI_PROGRAM_NAME="Nuxeo Drive"
set TIMESTAMP_URL=http://timestamp.verisign.com/scripts/timstamp.dll

set SIGN_CMD=signtool sign /v /f %CERTIFICATE_PATH% /d %MSI_PROGRAM_NAME% /t %TIMESTAMP_URL%
set VERIFY_CMD=signtool verify /v /pa

FOR %%F IN (%DIST_DIR%\*.msi) DO (
	echo ---------------------------------------------
	echo Signing %%F
    echo ---------------------------------------------
	echo %SIGN_CMD% %%F
	%SIGN_CMD% %%F
	echo ---------------------------------------------
    echo Verifying %%F
	echo ---------------------------------------------
    echo %VERIFY_CMD% %%F
	%VERIFY_CMD% %%F
)

@echo off

set DIST_DIR=dist
set CERTIFICATE_PATH=%USERPROFILE%\certificates\nuxeo.com.pfx
set MSI_PROGRAM_NAME="Nuxeo Drive"
set TIMESTAMP_URL=http://timestamp.verisign.com/scripts/timstamp.dll

set SIGN_CMD=signtool sign /v /f %CERTIFICATE_PATH% /d %MSI_PROGRAM_NAME% /t %TIMESTAMP_URL%
set VERIFY_CMD=signtool verify /v /pa

FOR %%F IN (%DIST_DIR%\*.msi) DO (
	echo ---------------------------------------------
	echo Signing %%F
    echo ---------------------------------------------
	echo %SIGN_CMD% %%F
	%SIGN_CMD% %%F
	echo ---------------------------------------------
    echo Verifying %%F
	echo ---------------------------------------------
    echo %VERIFY_CMD% %%F
	%VERIFY_CMD% %%F
)

NXP-12981: Use C:\Users\nuxeo instead of \Users\nuxeo in msi signing batch script (not set by Jenkins)


@rem Makes a build of the viewer
@rem You should have a directory ..\viewerbuilddlls which has release versions of
@rem all dependency dlls, including gtkmm & the Visual Studio 9 runtime
@echo off
rmdir build /S /Q
md build
xcopy bin\*.* build /S /C
del build\data\configuration\*.xml
rmdir build\testing /S /Q
del build\*.dll
del build\viewerd.exe
del build\modules\core\*d.dll
del build\modules\test\*d.dll
del build\modules\test\TestModule*.*
del build\modules\test\non_existing_system.xml
xcopy ..\viewerbuilddlls\*.* build /S /C

@rem Makes a build of the viewer
@rem You should have a directory ..\viewerbuilddlls which has release versions of
@rem all dependency dlls, including gtkmm & the Visual Studio 9 runtime
@echo off
rmdir build /S /Q
md build
xcopy bin\*.* build /S /C
del build\data\configuration\*.xml
rmdir build\testing /S /Q
del build\*.dll
del build\viewerd.exe
del build\modules\core\*d.dll
del build\modules\test\*d.dll
del build\modules\test\TestModule*.*
del build\modules\test\non_existing_system.xml
del build\modules\core\OpenAL*.*
xcopy ..\viewerbuilddlls\*.* build /S /C

Delete OpenAL module from build from now on, because it's not yet used.

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@918 5b2332b8-efa3-11de-8684-7d64432d61a3


@echo Copying debug information...
@IF %toolchain%==msvc ROBOCOPY "%devroot%\mesa\build\%toolchain%-%abi%" "%devroot%\%projectname%\debugsymbols\%abi%" *.pdb /E
@IF NOT %toolchain%==msvc IF EXIST "%msysloc%\%LMSYSTEM%\bin\strip.exe" IF EXIST "%msysloc%\%LMSYSTEM%\bin\objcopy.exe" for /f delims^=^ eol^= %%a in ('dir /b "%devroot%\%projectname%\bin\%abi%\*.*" 2^>^&1') do @IF EXIST "%devroot%\%projectname%\bin\%abi%\%%~nxa" IF /I NOT "%%~na"=="dxil" IF /I NOT "%%~na"=="openclon12" IF /I NOT "%%~na"=="WinPixEventRuntime" IF /I NOT "%%~xa"=="json" (
@"%msysloc%\%LMSYSTEM%\bin\objcopy.exe" --only-keep-debug "%devroot%\%projectname%\bin\%abi%\%%~nxa" "%devroot%\%projectname%\debugsymbols\%abi%\%%~nxa.sym"
@"%msysloc%\%LMSYSTEM%\bin\strip.exe" --strip-debug --strip-unneeded "%devroot%\%projectname%\bin\%abi%\%%~nxa"
)
@echo.

@IF %toolchain%==msvc ROBOCOPY "%devroot%\mesa\build\%toolchain%-%abi%" "%devroot%\%projectname%\debugsymbols\%abi%" *.pdb /E
@IF NOT %toolchain%==msvc IF EXIST "%msysloc%\%LMSYSTEM%\bin\strip.exe" IF EXIST "%msysloc%\%LMSYSTEM%\bin\objcopy.exe" for /f delims^=^ eol^= %%a in ('dir /b "%devroot%\%projectname%\bin\%abi%\*.*" 2^>^&1') do @IF EXIST "%devroot%\%projectname%\bin\%abi%\%%~nxa" IF /I NOT "%%~na"=="dxil" IF /I NOT "%%~na"=="openclon12" IF /I NOT "%%~na"=="WinPixEventRuntime" IF /I NOT "%%~xa"==".json" IF /I NOT "%%~xa"=="json" (
@echo Extracting debug information from %%~nxa into %%~nxa.sym...
@"%msysloc%\%LMSYSTEM%\bin\objcopy.exe" --only-keep-debug "%devroot%\%projectname%\bin\%abi%\%%~nxa" "%devroot%\%projectname%\debugsymbols\%abi%\%%~nxa.sym"
@"%msysloc%\%LMSYSTEM%\bin\strip.exe" --strip-debug --strip-unneeded "%devroot%\%projectname%\bin\%abi%\%%~nxa"
@echo Finished.
)
@echo.

MinGW: Make symbol extraction more verbose so progress can be observed


mvn clean jacoco:prepare-agent verify jacoco:report -Dmaven.javadoc.failOnError=false -s dev\settings-sonarqube.xml %*

mvn clean jacoco:prepare-agent verify jacoco:report sonar:sonar -Dmaven.javadoc.failOnError=false -s dev\settings-sonarqube.xml %*

Add missing `sonar:sonar` for windows script


@echo off

setlocal

set _test_root=%DLR_ROOT%\Test
set _runner=%_test_root%\TestRunner\TestRunner\bin\Debug\TestRunner.exe

call :build_runner

"%_runner%" "%_test_root%\IronPython.tests" /verbose /threads:1 /binpath:"%DLR_BIN%" /nunitoutput:"%_test_root%\TestResult.xml" %*

endlocal
goto:eof

:build_runner
%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /t:Rebuild %_test_root%\ClrAssembly\ClrAssembly.csproj /p:Configuration=Debug /v:quiet /nologo
%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /t:Rebuild %_test_root%\TestRunner\TestRunner.sln /p:Configuration=Debug /v:quiet /nologo
goto:eof

@echo off

setlocal

if "%DLR_BIN%"=="" (
  echo "You must set DLR_BIN before running this command"
  exit /b -1
)

if "%DLR_ROOT%"=="" (
  echo "You must set DLR_ROOT before running this command"
  exit /b -1
)

set _test_root=%DLR_ROOT%\Test
set _config=%CONFIGURATION%
if "%_config%"=="" (
  set _config=Debug
)

set _runner=%_test_root%\TestRunner\TestRunner\bin\%_config%\TestRunner.exe

call :build_runner

"%_runner%" "%_test_root%\IronPython.tests" /verbose /threads:1 /binpath:"%DLR_BIN%" /nunitoutput:"%_test_root%\TestResult.xml" %*

endlocal
goto:eof

:build_runner
%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /t:Rebuild %_test_root%\ClrAssembly\ClrAssembly.csproj /p:Configuration=%_config% /v:quiet /nologo
%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /t:Rebuild %_test_root%\TestRunner\TestRunner.sln /p:Configuration=%_config% /v:quiet /nologo
goto:eof

Make test runner use the correct configuration


@echo off
setlocal

:: Note: We've disabled node reuse because it causes file locking issues.
::       The issue is that we extend the build with our own targets which
::       means that that rebuilding cannot successully delete the task
::       assembly.

:: Check prerequisites
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe.  Please see http://go.microsoft.com/fwlink/?LinkID=518812 for build instructions. && goto :eof

:: Log build command line
set _buildprefix=echo
set _buildpostfix=^> "%~dp0msbuild.log"
call :build %*

:: Build
set _buildprefix=
set _buildpostfix=
call :build %*

goto :eof

:build
%_buildprefix% %_msbuildexe% "%~dp0build.proj" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%~dp0msbuild.log";Append %* %_buildpostfix%
goto :eof

@echo off
setlocal

:: Note: We've disabled node reuse because it causes file locking issues.
::       The issue is that we extend the build with our own targets which
::       means that that rebuilding cannot successully delete the task
::       assembly.

:: Check prerequisites
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe.  Please see https://github.com/dotnet/corefx/blob/master/docs/Developers.md for build instructions. && goto :eof

:: Log build command line
set _buildprefix=echo
set _buildpostfix=^> "%~dp0msbuild.log"
call :build %*

:: Build
set _buildprefix=
set _buildpostfix=
call :build %*

goto :eof

:build
%_buildprefix% %_msbuildexe% "%~dp0build.proj" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%~dp0msbuild.log";Append %* %_buildpostfix%
goto :eof

Replace fwlink with direct link to contributor's guide.


@echo off
pushd %~dp0
setlocal

if exist bin goto build
mkdir bin

:Build
set MSBuild="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MsBuild.exe"
if not exist %MSBuild% @set MSBuild="%ProgramFiles%\MSBuild\12.0\Bin\MsBuild.exe"
if not exist %MSBuild% @set MSBuild="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"

if "%1" == "" goto BuildDefaults

%MSBuild% Runtime.msbuild /m /nr:false /t:%* /p:Platform="Any CPU" /p:Desktop=true /v:M /fl /flp:LogFile=bin\msbuild.log;Verbosity=Normal
if %ERRORLEVEL% neq 0 goto BuildFail
goto BuildSuccess

:BuildDefaults
%MSBuild% Runtime.msbuild /m /nr:false /p:Platform="Any CPU" /p:Desktop=true /v:M /fl /flp:LogFile=bin\msbuild.log;Verbosity=Normal
if %ERRORLEVEL% neq 0 goto BuildFail
goto BuildSuccess

:BuildFail
echo.
echo *** BUILD FAILED ***
goto End

:BuildSuccess
echo.
echo **** BUILD SUCCESSFUL ***
goto end

:End
popd
endlocal

@echo off
pushd %~dp0
setlocal

if exist bin goto build
mkdir bin

:Build

REM Find the most recent 32bit MSBuild.exe on the system. If v12.0 (installed with VS2013) does not exist, fall back to
REM v4.0. Also handle x86 operating systems, where %ProgramFiles(x86)% is not defined. Always quote the %MSBuild% value
REM when setting the variable and never quote %MSBuild% references.
set MSBuild="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %MSBuild% @set MSBuild="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %MSBuild% @set MSBuild="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"

if "%1" == "" goto BuildDefaults

%MSBuild% Runtime.msbuild /m /nr:false /t:%* /p:Platform="Any CPU" /p:Desktop=true /v:M /fl /flp:LogFile=bin\msbuild.log;Verbosity=Normal
if %ERRORLEVEL% neq 0 goto BuildFail
goto BuildSuccess

:BuildDefaults
%MSBuild% Runtime.msbuild /m /nr:false /p:Platform="Any CPU" /p:Desktop=true /v:M /fl /flp:LogFile=bin\msbuild.log;Verbosity=Normal
if %ERRORLEVEL% neq 0 goto BuildFail
goto BuildSuccess

:BuildFail
echo.
echo *** BUILD FAILED ***
goto End

:BuildSuccess
echo.
echo **** BUILD SUCCESSFUL ***
goto end

:End
popd
endlocal

Add comment for %MSBuild% setting - CR follow-up


@echo off
setlocal
for %%i in (NuGet.exe) do set nuget=%%~dpnx$PATH:i
if "%nuget%"=="" (
    echo WARNING! NuGet executable not found in PATH so build may fail!
    echo For more on NuGet, see https://github.com/nuget/home
)
pushd "%~dp0"
nuget restore && call :build Debug && call :build Release
popd
goto :EOF

:build
setlocal
if "%PROCESSOR_ARCHITECTURE%"=="x86" set MSBUILD=%ProgramFiles%
if defined ProgramFiles(x86) set MSBUILD=%ProgramFiles(x86)%
set MSBUILD=%MSBUILD%\MSBuild\14.0\bin\msbuild
if not exist "%MSBUILD%" (
    echo Microsoft Build Tools 2015 does not appear to be installed on this
    echo machine, which is required to build the solution. You can install
    echo it from the URL below and then try building again:
    echo https://www.microsoft.com/en-us/download/details.aspx?id=48159
    exit /b 1
)
"%MSBUILD%" /p:Configuration=%1 /v:m %2 %3 %4 %5 %6 %7 %8 %9
goto :EOF

@echo off
setlocal
for %%i in (NuGet.exe) do set nuget=%%~dpnx$PATH:i
if "%nuget%"=="" (
    echo WARNING! NuGet executable not found in PATH so build may fail!
    echo For more on NuGet, see https://github.com/nuget/home
)
pushd "%~dp0"
nuget restore && call :build Debug %* && call :build Release %*
popd
goto :EOF

:build
setlocal
if "%PROCESSOR_ARCHITECTURE%"=="x86" set MSBUILD=%ProgramFiles%
if defined ProgramFiles(x86) set MSBUILD=%ProgramFiles(x86)%
set MSBUILD=%MSBUILD%\MSBuild\14.0\bin\msbuild
if not exist "%MSBUILD%" (
    echo Microsoft Build Tools 2015 does not appear to be installed on this
    echo machine, which is required to build the solution. You can install
    echo it from the URL below and then try building again:
    echo https://www.microsoft.com/en-us/download/details.aspx?id=48159
    exit /b 1
)
"%MSBUILD%" /p:Configuration=%1 /v:m %2 %3 %4 %5 %6 %7 %8 %9
goto :EOF

Build script args pass-thru fix to get clean.cmd working again


@if "%_echo%" neq "on" echo off

:: To run tests outside of MSBuild.exe
:: %1 is the path to the tests\<OSConfig> folder
:: %2 is the path to the packages folder

pushd %1

FOR /D %%F IN (*.Tests) DO (
	IF EXIST %%F\netcoreapp1.0 (
		pushd %%F\netcoreapp1.0
		CALL RunTests.cmd %2
		popd
	)
)

popd

@if "%_echo%" neq "on" echo off

:: To run tests outside of MSBuild.exe
:: %1 is the path to the tests\<OSConfig> folder
:: %2 is the path to the packages folder

pushd %1

FOR /D %%F IN (*.Tests) DO (
	IF EXIST %%F\netcoreapp1.0 (
		pushd %%F\netcoreapp1.0
		IF EXIST RunTests.cmd (
			CALL RunTests.cmd %2
		)
		popd
	)
)

popd

Check for RunTest.cmd before running test on Nano.


@echo off

set NaturalDocsParams=

rem Shift and loop so we can get more than nine parameters.
rem This is especially important if we have spaces in file names.

:MORE
if "%1"=="" goto NOMORE
set NaturalDocsParams=%NaturalDocsParams% %1
shift
goto MORE
:NOMORE

perl NaturalDocs %NaturalDocsParams%

set NaturalDocsParams=

Make the Wndows batch callable from any directory

The perl script NaturalDocs shuld be referred to with the same path
as the calling batch, otherwise the script would have to be in the
search path. The %~dp0 environment variable points to the directory
which the script is being executed in.

All batch arguments can bepassed to a nested batch by %*.


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

setlocal
set "PATH=c:\cygwin\bin;%PATH%"
bash -c "buildbot/buildbot_pnacl.sh %*"
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
endlocal

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

setlocal
:: Load the hermetic cygwin environment (downloading/installing/updating
:: it if necessary).
call "%~dp0cygwin_env.bat"
bash -c "buildbot/buildbot_pnacl.sh %*"
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
endlocal

Build Pnacl in hermetic cygwin
Use the same cygwin used for the GNU toolchain. This gets us a standard environment that is kept updated on the bots (see cygwin_env.bat).

R=jvoung@chromium.org,robertm@chromium.org,sehr@chromium.org
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2918

Review URL: https://chromiumcodereview.appspot.com/10837191

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


:: Build tcplotter command-line utilities using cmake

:: Change working directory to archive directory
cd "%PKG_NAME%"

:: Create build directory
cd "src"
mkdir build
if errorlevel 1 exit 1
cd build
if errorlevel 1 exit 1

:: Build with cmake
cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 --prefix=%PREFIX% ..
if errorlevel 1 exit 1
cmake --build .
if errorlevel 1 exit 1

:: Install executables to bin directory
cmake --install . --prefix=%PREFIX%
if errorlevel 1 exit 1

:: Install tcplotter
cd "%SRC_DIR%"
$PYTHON -m pip install . -vv

:: Build tcplotter command-line utilities using cmake

:: Change working directory to archive directory
cd "%PKG_NAME%"

:: Create build directory
cd "src"
mkdir build
if errorlevel 1 exit 1
cd build
if errorlevel 1 exit 1

:: Build with cmake
cmake -G "MinGW Makefiles" -D CMAKE_CXX_STANDARD=11 -D CMAKE_INSTALL_PREFIX=%PREFIX% ..
if errorlevel 1 exit 1
cmake --build .
if errorlevel 1 exit 1

:: Install executables to bin directory
cmake --build . --target install
if errorlevel 1 exit 1

:: Install tcplotter
cd "%SRC_DIR%"
$PYTHON -m pip install . -vv

Adjust build for windows to change how prefix is defined


@ECHO OFF

REM Configure your favorite diff3/merge program here.
SET DIFF3="C:\Program Files\Funky Stuff\My Merge Tool.exe"

SET MINE=%9
SHIFT
SET OLDER=%9
SHIFT
SET YOURS=%9

REM Call the merge command (change the following line to make sense)
%DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS%

REM After performing the merge, this script needs to print the contents
REM of the merged file to stdout.  Do that in whatever way you see fit.

@ECHO OFF

REM Configure your favorite diff3/merge program here.
SET DIFF3="C:\Program Files\Funky Stuff\My Merge Tool.exe"

REM We only have access to nine parameters at a time.  We use SHIFT to slide
REM our nine-parameter window a little bit so we can get to what we need.
SET MINE=%9
SHIFT
SET OLDER=%9
SHIFT
SET YOURS=%9

REM Call the merge command (change the following line to make sense)
%DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS%

REM After performing the merge, this script needs to print the contents
REM of the merged file to stdout.  Do that in whatever way you see fit.

Add a helpful comment for folks unfamiliar with the SHIFT construct.

* contrib/client-side/diff3wrap.bat


@ECHO OFF

REM Set data directory with GTFS files as text in separate directories
SET DATA_DIRECTORY="%~dp0..\data\gtfs"

REM Set output directory for tests in GTFS zip format
REM Don't chose a directory inside %DATA_DIRECTORY%
SET GTFS_OUTPUT_DIRECTORY="%~dp0tests"

REM Set output file for all tests combined in GTFS zip format
SET ALL_TESTS_ZIP="%~dp0alltests.zip"

REM Add 7-zip path to PATH
SET SEVEN_ZIP_PATH="C:\Program Files\7-Zip"
IF EXIST %SEVEN_ZIP_PATH% SET PATH=%PATH%;%SEVEN_ZIP_PATH%
SET SEVEN_ZIP_PATH="C:\Program Files (x86)\7-Zip"
IF EXIST %SEVEN_ZIP_PATH% SET PATH=%PATH%;%SEVEN_ZIP_PATH%

REM Create tests in GTFS zip format
MKDIR %GTFS_OUTPUT_DIRECTORY%
DEL /Q %GTFS_OUTPUT_DIRECTORY%\*.*
FOR /F "delims=" %%f in ('dir %DATA_DIRECTORY% /A:D /B /O:N') DO (
    7z a %GTFS_OUTPUT_DIRECTORY%\"%%f.zip" %DATA_DIRECTORY%\"%%f"\*.txt
)

REM Combine tests
java -jar %~dp0..\bin\onebusaway-gtfs-transformer-cli.jar --overwriteDuplicates %GTFS_OUTPUT_DIRECTORY%\*.zip %ALL_TESTS_ZIP%

@ECHO OFF

REM Set data directory with GTFS files as text in separate directories
SET DATA_DIRECTORY="%~dp0..\data\gtfs"

REM Set output directory for tests in GTFS zip format
REM Don't chose a directory inside %DATA_DIRECTORY%
SET GTFS_OUTPUT_DIRECTORY="%~dp0tests"

REM Set output file for all tests combined in GTFS zip format
SET ALL_TESTS_ZIP="%~dp0alltests.zip"

REM Add 7-zip path to PATH
SET SEVEN_ZIP_PATH="C:\Program Files\7-Zip"
IF EXIST %SEVEN_ZIP_PATH% SET PATH=%PATH%;%SEVEN_ZIP_PATH%
SET SEVEN_ZIP_PATH="C:\Program Files (x86)\7-Zip"
IF EXIST %SEVEN_ZIP_PATH% SET PATH=%PATH%;%SEVEN_ZIP_PATH%

REM Create tests in GTFS zip format
MKDIR %GTFS_OUTPUT_DIRECTORY%
DEL /Q %GTFS_OUTPUT_DIRECTORY%\*.*
FOR /F "delims=" %%f in ('dir %DATA_DIRECTORY% /A:D /B /O:N') DO (
    7z a %GTFS_OUTPUT_DIRECTORY%\"%%f.zip" %DATA_DIRECTORY%\"%%f"\*.txt
)

REM Combine tests
java -jar "%~dp0..\bin\onebusaway-gtfs-transformer-cli.jar" --overwriteDuplicates %GTFS_OUTPUT_DIRECTORY%\*.zip %ALL_TESTS_ZIP%

Fix for spaces in path of repository

Fix for spaces in path of repository


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

@rem Fixup ENV issues with SSH
set APPDATA=C:\Users\build\AppData\Roaming
set LOCALAPPDATA=C:\Users\build\AppData\Local
set TEMP=C:\Users\build\AppData\Local\Temp\3
set TMP=C:\Users\build\AppData\Local\Temp\3
if not exist %TEMP% mkdir %TEMP%

@rem Setup VC
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %*

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

@rem Fixup ENV issues with SSH
set APPDATA=C:\Users\build\AppData\Roaming
set LOCALAPPDATA=C:\Users\build\AppData\Local
set TEMP=C:\Users\build\AppData\Local\Temp\3
set TMP=C:\Users\build\AppData\Local\Temp\3
if not exist %TEMP% mkdir %TEMP%

@rem Setup VC
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %*

GEODE-2741: Update Windows build to use Visual Studio 2015 / VC14.


mkdir ..\libm2dec\Release
mkdir ..\libm2dec\Debug
mkdir ..\h264dec\Release
mkdir ..\h264dec\Debug
mkdir ..\m2dec\Release
mkdir ..\m2dec\Debug
"C:\Program Files (x86)\Renesas\Hew\hmake.exe" m2dec.mak > buildlog.txt
find "ERROR" buildlog.txt
if errorlevel 1 exit /b 0
exit /b 1

Add wrapper batch file for Jenkins to build


call tools\build_win_bdist64-py26.bat
call tools\build_win_bdist32-py26.bat
call tools\build_win_bdist64-py27.bat
call tools\build_win_bdist32-py27.bat
call tools\build_win_bdist32-py32.bat
call tools\build_win_bdist64-py32.bat
call python setup.py sdist --formats=zip,gztar

Create archives in windows build script

BLD: Create archives in windows build script


doxygen
cd latex
pdflatex -shell-escape refman.tex
makeindex -s ../refman.ist refman.idx
pdflatex -shell-escape refman.tex
pdflatex -shell-escape refman.tex
cd ..
copy latex\refman.pdf .

doxygen
cd latex
pdflatex -interaction=nonstopmode -shell-escape refman.tex
makeindex -s ../refman.ist refman.idx
pdflatex -interaction=nonstopmode -shell-escape refman.tex
pdflatex -interaction=nonstopmode -shell-escape refman.tex
cd ..
copy latex\refman.pdf .

Call pdflatex in non stop mode

Call pdflatex in non stop mode


"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d system_user_demo_db  -p 5432 -f ..\action_user_login.sql 1> test_action_user_login.log 2>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d system_user_demo_db  -p 5432 -f test_action_user_login.sql  1>> test_action_user_login.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d system_user_demo_db  -p 5432 -f ..\action_user_login.sql 1> test_action_user_login.log 2>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d system_user_demo_db  -p 5432 -f test_action_user_login_master.sql  1>> test_action_user_login.log 2>>&1

Add variable for password to call

Add variable for password to call


"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


@echo off
pushd .

ECHO ********** Build projects in release mode
"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" Avalara.AvaTax.Net20.sln /t:Build /p:Configuration="Release"
"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" Avalara.AvaTax.Net45.sln /t:Build /p:Configuration="Release"
"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" Avalara.AvaTax.Portable.sln /t:Build /p:Configuration="Release"

ECHO ********** Packaging NUGET
cd src
..\..\..\nuget.exe pack Avalara.AvaTax.nuspec
popd
pause

Revert "Removed the Batch script in favior of the powershell script."

This reverts commit 4841ed6650df6b6965d45bfa9c3c0e6c6b8ef336.


mkdir obj

SET PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin;%PATH%

SET "VSCMD_START_DIR=%CD%"
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64

cl.exe /std:c++14 /O2 /MT /EHsc /I . /Fo.\obj\ ^
 /D_USE_MATH_DEFINES ^
 .\hlt\entity.cpp .\hlt\map.cpp .\hlt\move.cpp ^
 .\MyBot.cpp ^
 /link /out:MyBot.exe

Add build script for MSVC 2017 community.


@echo off
setlocal
pushd "%~dp0"
for /f %%i in (kwindex.txt) do call :id %%i
goto :EOF

:id
setlocal
echo %1
for /f "usebackq tokens=*" %%i in (`hg parents %1 --template "%~nx1 {node|short} {date|isodate} {author}\n"`) do set x=%%i
call replace %1 \$Id(:.+?)?\$ "$Id: %x% $" > %temp%\%~nx1
copy %temp%\%~nx1 %1 /y > nul
goto :EOF

@echo off
setlocal
pushd "%~dp0"
for /f %%i in (kwindex.txt) do call :id %%i
goto :EOF

:id
setlocal
echo %1
for /f "usebackq tokens=*" %%i in (`hg parents %1 --template "%~nx1 {node|short} {date|isodate} {author|user}\n"`) do set x=%%i
call replace %1 \$Id(:.+?)?\$ "$Id: %x% $" > %temp%\%~nx1
copy %temp%\%~nx1 %1 /y > nul
goto :EOF

Expand author in Id keyword with user portion only


@setlocal
@set SCHEME_H_DIR=..\src
@set TSCOMPILE=cl /nologo /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /DUSE_DL=1 /I%SCHEME_H_DIR%
@set TSLIB=lib /nologo
@set TSLINK=link /nologo
@set REGSRC=re.c regcomp.c regexec.c regerror.c regfree.c
@set OBJPRODN=re.obj regcomp.obj regexec.obj regerror.obj regfree.obj

@if "%1" == "static" goto STATIC
@if not exist dll\ (
  mkdir dll
)

%TSCOMPILE% /MT %REGSRC%
%TSLINK% /DLL /out:dll\re.dll /export:init_re %OBJPRODN%

%TSCOMPILE% /MDd %REGSRC%
%TSLINK% /DLL /out:dll\re_d.dll /export:init_re %OBJPRODN%

@goto END

:STATIC
@if not exist lib\ (
  mkdir lib
)

%TSCOMPILE% /MT %REGSRC%
%TSLIB% /out:lib\re.lib %OBJPRODN%

%TSCOMPILE% /MDd %REGSRC%
%TSLIB% /out:lib\re_d.lib %OBJPRODN%

:END
del %OBJPRODN%

Add a batch file to build on Windows with MSVC.


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

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

java -cp "../../bin/*;*" %* org.wso2.appserver.samples.sso.Quickstart

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

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

rem ----- if JAVA_HOME is not set we're not happy ------------------------------

:checkJava
if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto checkJdk18

:noJavaHome
echo "You must set the JAVA_HOME variable before running the Quickstart."
goto end

:checkJdk18
"%JAVA_HOME%\bin\java" -version 2>&1 | findstr /r "1.8" >NUL
IF ERRORLEVEL 1 goto unknownJdk
goto runQuickstart

:unknownJdk
echo [ERROR] You need to have JDK 1.8 or above to run this Quickstart
goto end

:runQuickstart
"%JAVA_HOME%\bin\java" -cp "../../bin/*;../../lib/*;*" %* org.wso2.appserver.samples.httpanalytics.Quickstart
goto end

:end

Fix http-analytics quickstart script for windows


curl -sSf https://static.rust-lang.org/dist/rust-1.10.0-i686-pc-windows-msvc.exe -o rust.exe
rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust"
set PATH=%PATH%;C:\Rust\bin

curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe
7z x LLVM.exe -oC:\LLVM
set PATH=%PATH%;C:\LLVM\bin
set LIBCLANG_PATH=C:\LLVM\bin

curl -sSf https://static.rust-lang.org/dist/rust-1.24.0-i686-pc-windows-msvc.exe -o rust.exe
rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust"
set PATH=%PATH%;C:\Rust\bin

curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe
7z x LLVM.exe -oC:\LLVM
set PATH=%PATH%;C:\LLVM\bin
set LIBCLANG_PATH=C:\LLVM\bin

Update Rust version used by Appveyor

Update Rust version used by Appveyor


@ECHO OFF

SET BASEDIR=%~dp0

PUSHD %BASEDIR%

IF NOT EXIST pyenv\NUL GOTO NOENVDIR
ECHO removing existing environment
RMDIR /S /Q pyenv
:NOENVDIR

virtualenv pyenv
CALL pyenv\Scripts\activate
python -m pip install -r pyenv.pkgs
CALL pyenv\Scripts\deactivate

POPD

@ECHO OFF

SET BASEDIR=%~dp0

PUSHD %BASEDIR%

IF NOT EXIST pyenv\NUL GOTO NOENVDIR
ECHO removing existing environment
RMDIR /S /Q pyenv
:NOENVDIR

virtualenv pyenv
CALL pyenv\Scripts\activate
python -m pip install -r pyenv.pkgs --no-cache-dir
CALL pyenv\Scripts\deactivate

POPD

Disable pip cache dir on Windows

Disable pip cache dir on Windows


SET EXE=%2
start %1%EXE%
timeout /t %3

FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% taskkill /im %EXE% /f & exit /b 1
exit /b %errorlevel%

Add Batch File for Automated Testing with timeout

On Windows...
Param1 (%1) is The Path to the Directory, Param2 (%2)
the exe name, Param3 (%3) the timeout in seconds.


set SPECWARE4=\Progra~1\Specware4
rem SWPATH needs /s rather than \s so URI parsing works
set SWPATH=/Progra~1/Specware4:/
set XEMACS=C:\Progra~1\XEmacs\XEmacs-21.4.6
rem Set allegro to the version you have
set ALLEGRO=C:\Progra~1\acl62
rem set ALLEGRO=C:\Progra~1\acl61

set SPECWARE_BIN=$SPECWARE4\Applications\Specware\bin\windows

set LISP_EXECUTABLE=%ALLEGRO%\alisp.exe
set LISP_HEAP_IMAGE=%SPECWARE_BIN%\Specware4.dxl
set LISP_DIRECTORY=%Specware4%/
cd "%Specware4%"

%XEMACS%\i586-pc-win32\xemacs.exe -debug-init -l "%ALLEGRO%/eli/fi-site-init" -l "%SPECWARE4%/Library/IO/Emacs/load" -f "run-specware4" &

set SPECWARE4=\Progra~1\Specware4
rem SWPATH needs /s rather than \s so URI parsing works
set SWPATH=/Progra~1/Specware4:/
set XEMACS=C:\Progra~1\XEmacs\XEmacs-21.4.6
rem Set allegro to the version you have
rem set ALLEGRO=C:\Progra~1\acl62
set ALLEGRO=C:\Progra~1\acl61

set SPECWARE_BIN=$SPECWARE4\Applications\Specware\bin\windows

set LISP_EXECUTABLE=%ALLEGRO%\alisp.exe
set LISP_HEAP_IMAGE=%SPECWARE_BIN%\Specware4.dxl
set LISP_DIRECTORY=%Specware4%/
cd "%Specware4%"

%XEMACS%\i586-pc-win32\xemacs.exe -debug-init -l "%ALLEGRO%/xeli/fi-site-init" -l "%SPECWARE4%/Library/IO/Emacs/load" -f "run-specware4" &

Use xeli instead of eli

Use xeli instead of eli

git-svn-id: 9ecf60ce9baff443e30a0472d3fd222fcb8117cf@242 7b97033b-253e-4a5c-9b07-e25f9089a9fd


set PATH=%PATH%;lib
java -Djava.library.path=lib -cp lib/NeticaJ.jar;target/vetaraus-1.0-SNAPSHOT-jar-with-dependencies.jar de.dhbw.vetaraus.Application --learn P003_learn.csv P003_classify.csv

Make Netica.dll available to Windows

Make Netica.dll available to Windows


.\Debug\res2h.exe .\test .\results -s -v -h .\results\resources.h -u .\results\resources.cpp
.\Debug\res2h.exe .\test .\results\data.bin -b -s -v

.\Release\res2h.exe .\test .\results -s -v -h .\results\resources.h -u .\results\resources.cpp
.\Release\res2h.exe .\test .\results\data.bin -b -s -v
.\Release\res2hdump.exe .\results\data.bin .\results -f -v

Update tests to dump binary archive

Update tests to dump binary archive


msbuild\msbuild ..\src\Torken.CQRS.Core\Torken.CQRS.Core.csproj /p:Configuration=Release

nuget\nuget pack ..\src\Torken.CQRS.Core\Torken.CQRS.Core.csproj -IncludeReferencedProjects  -Prop Configuration=Release >>log.txt

Add script to create nuget packages

Add script to create nuget packages


@echo off

echo.
echo Portable Accord.NET Framework NuGet package publisher
echo =========================================================
echo.
echo This Windows batch file uses NuGet to automatically
echo push the Portable Accord.NET Framework packages to the gallery.
echo.

timeout /T 5

:: Directory settings
set output=..\bin\nupkg
set current=%~dp0

echo.
echo Current directory: %current%
echo Output  directory: %output%
echo.

forfiles /p %output% /m *.nupkg /c "cmd /c %current%\NuGet.exe push @file"

pause

@echo off

echo.
echo Portable Accord.NET Framework NuGet package publisher
echo =========================================================
echo.
echo This Windows batch file uses NuGet to automatically
echo push the Portable Accord.NET Framework packages to the gallery.
echo.

timeout /T 5

:: Directory settings
set output=..\bin\nupkg
set current=..\..\NuGet

echo.
echo Current directory: %current%
echo Output  directory: %output%
echo.

forfiles /p %output% /m *.nupkg /c "cmd /c %current%\NuGet.exe push @file"

pause

Use no-space path to current directory

Use no-space path to current directory


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

setlocal

md build
cd build

cmake -L ^
-G "%~1" ^
-T "%~2" ^
-D OSPRAY_BUILD_ISA=ALL ^
-D OSPRAY_MODULE_MPI=ON ^
-D OSPRAY_MODULE_BILINEAR_PATCH=ON ^
-D OSPRAY_ENABLE_TESTING=ON ^
-D USE_IMAGE_MAGICK=OFF ^
..

(cmake --build . --config Release --target ALL_BUILD -- /m /nologo) -and (ctest . -C Release)

:abort
endlocal
:end

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

setlocal

md build
cd build

cmake -L ^
-G "%~1" ^
-T "%~2" ^
-D OSPRAY_BUILD_ISA=ALL ^
-D OSPRAY_MODULE_MPI=ON ^
-D OSPRAY_MODULE_BILINEAR_PATCH=ON ^
-D OSPRAY_ENABLE_TESTING=ON ^
-D USE_IMAGE_MAGICK=OFF ^
..

(cmake --build . --config Release --target ALL_BUILD -- /m /nologo) ^
-and ^
(ctest . -C Release)

:abort
endlocal
:end

Revert "fix syntax in Win ci build script"

This reverts commit f0eb26d197ef3f0dd750caefc7d25940102f8a18.


setlocal

set BUILDSTAGE=build-stage
set NUGETPATH=%BUILDSTAGE%\.nuget
set NUGET=%NUGETPATH%\nuget.exe
set PACKAGESPATH=%NUGETPATH%\packages

:Build_EnvCheck
  call e5r 1>nul
  if "%ERRORLEVEL%"=="0" goto Build_NugetDownload
  echo.
  echo E5R Environment not installed!
  goto Build_End

:Build_NugetDownload
  if exist %NUGET% goto Build_Before
  echo Downloading NuGet...
  echo TODO: Move to E5R ENV BOOT --tech aspnet
  if not exist "%NUGETPATH%" md "%NUGETPATH%"
  @powershell -NoProfile -ExecutionPolicy unrestricted -Command ^
    "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%NUGET%'"

:Build_NugetCheck
  echo TODO: Move to Build_EnvCheck
  if exist %NUGET% goto Build_Before
  echo.
  echo NUGET not installed!
  goto Build_End

:Build_Before
    call e5r env boot
    call e5r env install --version 1.0.0-beta3 -runtime CLR -x86
    call e5r env use --version 1.0.0-beta3 -runtime CLR -x86
    echo TODO: Delete packages.config and use install Sake here
    call "%NUGET%" install -OutputDirectory %PACKAGESPATH%  -ExcludeVersion .\packages.config

:Build
  echo Building...
  call "%PACKAGESPATH%\Sake\tools\sake.exe" -I "build" -f makefile.shade %*

:Build_End

setlocal

set BUILDSTAGE=build-stage
set NUGETPATH=%BUILDSTAGE%\.nuget
set NUGET=%NUGETPATH%\nuget.exe
set PACKAGESPATH=%NUGETPATH%\packages

:Build_EnvCheck
  call e5r 1>nul
  if "%ERRORLEVEL%"=="0" goto Build_NugetDownload
  echo.
  echo E5R Environment not installed!
  goto Build_End

:Build_NugetDownload
  if exist %NUGET% goto Build_Before
  echo Downloading NuGet...
  echo TODO: Move to E5R ENV BOOT --tech aspnet
  if not exist "%NUGETPATH%" md "%NUGETPATH%"
  @powershell -NoProfile -ExecutionPolicy unrestricted -Command ^
    "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%NUGET%'"

:Build_NugetCheck
  echo TODO: Move to Build_EnvCheck
  if exist %NUGET% goto Build_Before
  echo.
  echo NUGET not installed!
  goto Build_End

:Build_Before
    call e5r env boot
    call e5r env install
    call e5r env use
    echo TODO: Delete packages.config and use install Sake here
    call "%NUGET%" install -OutputDirectory %PACKAGESPATH%  -ExcludeVersion .\packages.config

:Build
  echo Building...
  call "%PACKAGESPATH%\Sake\tools\sake.exe" -I "build" -f makefile.shade %*

:Build_End

Use version of file and defaults runtime and arch


@echo off

rem installer bug. http://stackoverflow.com/a/25095327
mkdir "%APPDATA%\npm" > NUL 2>&1

set PATH=node_modules\.bin;node_modules\lisb-hubot\node_modules\.bin;%PATH%
call npm install

for /f "delims=\" %%i in ("%CD%") do set UID=%%i

if "%REDIS_URL%" == "" (
  set REDIS_URL=redis://localhost:6379/%UID%
)

if "%1" == "start" (
  forever start ^
    --uid "%UID%" ^
    --minUptime 10000 --spinSleepTime 600000 ^
    -o hubot.log -a ^
    -w --watchDirectory scripts ^
    -c coffee node_modules\.bin\hubot.cmd -a direct %*
) else if "%1" == "stop" (
  forever stop "%UID%"
) else if "%1" == "restart" (
  forever restart "%UID%"
) else if "%1" == "status" (
  forever list | find "] %UID% "
) else if "%1" == "logs" (
  cat hubot.log | more
) else (
  node_modules\.bin\hubot.cmd -a direct %*
)

@echo off

rem installer bug. http://stackoverflow.com/a/25095327
mkdir "%APPDATA%\npm" > NUL 2>&1

set PATH=node_modules\.bin;node_modules\lisb-hubot\node_modules\.bin;%PATH%
call npm install

for /f "delims=\" %%i in ("%CD%") do set UID=%%i

for /f "tokens=1,2 delims==" %%i in (.env) do set %%i=%%j

if "%REDIS_URL%" == "" (
  set REDIS_URL=redis://localhost:6379/%UID%
)

if "%1" == "start" (
  forever start ^
    --uid "%UID%" ^
    --minUptime 10000 --spinSleepTime 600000 ^
    -o hubot.log -a ^
    -w --watchDirectory scripts ^
    -c coffee node_modules\.bin\hubot.cmd -a direct %*
) else if "%1" == "stop" (
  forever stop "%UID%"
) else if "%1" == "restart" (
  forever restart "%UID%"
) else if "%1" == "status" (
  forever list | find "] %UID% "
) else if "%1" == "logs" (
  cat hubot.log | more
) else (
  node_modules\.bin\hubot.cmd -a direct %*
)

Load .env file on windows.

Load .env file on windows.


@echo off
if "%1" == "" goto :Error
goto :Start

:Error
echo usage: %0 ^<application name^>
echo   where application name is a azure mobile Service app.
goto :TheEnd

:Start
call azure mobile api create %1 admin --permissions *=admin
call azure mobile api create %1 application --permissions *=application
call azure mobile api create %1 user  --permissions *=user
call azure mobile api create %1 public --permissions *=public
call azure mobile api create %1 shared --permissions *=admin
call azure mobile api create %1 movieFinder --permissions *=application

call azure mobile script upload %1 api/admin.js -f admin.js
call azure mobile script upload %1 api/application.js -f application.js
call azure mobile script upload %1 api/user.js -f user.js
call azure mobile script upload %1 api/public.js -f public.js
call azure mobile script upload %1 api/shared.js -f shared.js
call azure mobile script upload %1 api/moviefinder.js -f moviefinder.js

:TheEnd

Add sript to set APIs used by E2E Apps

Add sript to set APIs used by E2E Apps


@echo off
if not exist CMakeCache.txt (
    echo Run this script from the CMake build folder
    exit /b
)

if not exist graphviz mkdir graphviz
cmake --graphviz=.\graphviz\deps.dot . && dot -Tpng -Gdpi=100 .\graphviz\deps.dot > deps.png && deps.png

Add script to plot dependency graph via cmake --graphviz


Make run_webkit_test.bat workable even if we execute it
on a directory other than webkit\tools\layout_tests\.

%~dp0 means Drive name + Path name of the 0th argument (the bat file).

Original patch by tkent@google.com.
See http://codereview.chromium.org/113389
r=ojan

TEST=None
BUG=None

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@16838 4ff67af0-8c30-449e-8e8b-ad334ec8d88c


@echo off
call "..\VsDevCmd.cmd"

set platform="%1"
if "%1" == "AnyCPU" (
  set platform="x86"
)

for /r ..\..\Tests\Magick.NET.Tests\bin %%a in (*.dll) do (
  if "%%~nxa"=="Magick.NET.Tests.dll" (
    echo "Running tests from: %%~dpnxa"
    vstest.console /inIsolation /platform:%platform% /logger:AppVeyor %%~dpnxa
    if %errorlevel% neq 0 exit /b %errorlevel%
  )
)

@echo off
call "..\VsDevCmd.cmd"

set platform="%1"
if "%1" == "AnyCPU" (
  set platform="x86"
)

set vstest="%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"

for /r ..\..\Tests\Magick.NET.Tests\bin %%a in (*.dll) do (
  if "%%~nxa"=="Magick.NET.Tests.dll" (
    echo "Running tests from: %%~dpnxa"
    %vstest% %%~dpnxa /inIsolation /platform:%platform% /TestAdapterPath:%%~dpa /logger:AppVeyor
    if %errorlevel% neq 0 exit /b %errorlevel%
  )
)

Use a different version of vstest.console to make sure the exit code is correct.


@rem ***************************************************************************
@rem (C) Copyright 2016 Jerome Comte and Dorian Cransac
@rem
@rem This file is part of STEP
@rem
@rem STEP is free software: you can redistribute it and/or modify
@rem it under the terms of the GNU Affero General Public License as published by
@rem the Free Software Foundation, either version 3 of the License, or
@rem (at your option) any later version.
@rem
@rem STEP is distributed in the hope that it will be useful,
@rem but WITHOUT ANY WARRANTY; without even the implied warranty of
@rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@rem GNU Affero General Public License for more details.
@rem
@rem You should have received a copy of the GNU Affero General Public License
@rem along with STEP.  If not, see <http://www.gnu.org/licenses/>.
@rem ***************************************************************************
rem @echo off

TITLE STEP MongoDB

SET MONGO_PATH=
rem if mongod.exe isn't on your path, then set your own as follows (watch for the backslash and double quote at the end):
rem SET MONGO_PATH="D:\Program Files\MongoDB\Server\3.0\bin"\

for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined mydate set mydate=%%x

%MONGO_PATH%mongod.exe -dbpath ..\data\mongodb > mongod_%mydate%.log 2>&1

@rem ***************************************************************************
@rem (C) Copyright 2016 Jerome Comte and Dorian Cransac
@rem
@rem This file is part of STEP
@rem
@rem STEP is free software: you can redistribute it and/or modify
@rem it under the terms of the GNU Affero General Public License as published by
@rem the Free Software Foundation, either version 3 of the License, or
@rem (at your option) any later version.
@rem
@rem STEP is distributed in the hope that it will be useful,
@rem but WITHOUT ANY WARRANTY; without even the implied warranty of
@rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@rem GNU Affero General Public License for more details.
@rem
@rem You should have received a copy of the GNU Affero General Public License
@rem along with STEP.  If not, see <http://www.gnu.org/licenses/>.
@rem ***************************************************************************
rem @echo off

TITLE STEP MongoDB

SET MONGO_PATH=
rem if mongod.exe isn't on your path, then set your own as follows (watch for the backslash and double quote at the end):
rem SET MONGO_PATH="D:\Program Files\MongoDB\Server\3.0\bin"\

for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined mydate set mydate=%%x

%MONGO_PATH%mongod.exe -dbpath ..\data\mongodb > ..\log\mongod_%mydate%.log 2>&1

Put MongoDB log files in the log folder

Put MongoDB log files in the log folder


msbuild /p:Configuration=Release NSISInfoWriter.sln
ilrepack /targetplatform:v4 ^
    /out:target\nsisiw.exe ^
    /parallel ^
    "%~dp0\NSISInfoWriter\bin\Release\nsisiw.exe" ^
    "%~dp0\NSISInfoWriter\bin\Release\CommandLine.dll"

msbuild /p:Configuration=Release NSISInfoWriter.sln
ilrepack /targetplatform:v4 ^
    /out:target\nsisiw.exe ^
    /parallel ^
    /ndebug ^
    "%~dp0\NSISInfoWriter\bin\Release\nsisiw.exe" ^
    "%~dp0\NSISInfoWriter\bin\Release\CommandLine.dll"

Disable debug information generation when using ilrepack


md build
cd build
cmake -DLIBWS_WITH_AUTOBAHN=ON ..
cmake --build .
ctest
bin\Debug\autobahntest.exe --config ..\test\autobahn\libws.cfg

cd deps
cd libevent
md build
cd build
cmake -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_REGRESS=ON -DEVENT__DISABLE_BENCHMARK=ON ..
cd ..
cd ..
cd ..

md build
cd build
cmake -DLibevent_DIR=deps/libevent/build/  -DLIBWS_WITH_AUTOBAHN=ON ..
cmake --build .
ctest
bin\Debug\autobahntest.exe --config ..\test\autobahn\libws.cfg

Update the jenkins build to build Libevent.


@ECHO off
REM This suite requires https://github.com/inkarkat/runVimTests to run
../../runVimTests/bin/runVimTests.cmd --pure vimgrep.suite

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

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

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

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

:Run
echo Running
../../runVimTests/bin/runVimTests.cmd --pure vimgrep.suite
goto End

:End

Add an option to clean the test directory


@echo off

echo.
echo James Build System
echo -------------------

set ANT_HOME=tools
set CLASSPATH=lib\xerces.jar

%ANT_HOME%\bin\ant.bat -emacs %1 %2 %3 %4 %5 %6 %7 %8
goto cleanup

:cleanup
set ANT_HOME=

@echo off

echo.
echo James Build System
echo -------------------

set ANT_HOME=tools
set CLASSPATH=lib\xerces-1.4.3.jar;tools\lib\velocity-1.3-dev.jar;tools\lib\jdom-b7.jar

%ANT_HOME%\bin\ant.bat -emacs %1 %2 %3 %4 %5 %6 %7 %8
goto cleanup

:cleanup
set ANT_HOME=

Use velocity and jdom that was copied from jakarta-site2

git-svn-id: 88158f914d5603334254b4adf21dfd50ec107162@107714 13f79535-47bb-0310-9956-ffa450edef68


@echo off
echo *** Building Microsoft.Bot.Builder.History
setlocal
setlocal enabledelayedexpansion
setlocal enableextensions
set errorlevel=0
mkdir ..\nuget
erase /s ..\nuget\Microsoft.Bot.Builder.History*nupkg
msbuild /property:Configuration=release Microsoft.Bot.Builder.History.csproj
for /f %%v in ('powershell -noprofile "(Get-Command .\bin\release\Microsoft.Bot.Builder.dll).FileVersionInfo.FileVersion"') do set builder=%%v
for /f %%v in ('powershell -noprofile "(Get-Command .\bin\release\Microsoft.Bot.Builder.History.dll).FileVersionInfo.FileVersion"') do set version=%%v
..\..\packages\NuGet.CommandLine.3.4.3\tools\NuGet.exe pack Microsoft.Bot.Builder.History.nuspec -symbols -properties version=%version%;builder=%builder% -OutputDirectory ..\nuget
echo *** Finished building Microsoft.Bot.Builder.History

@echo off
echo *** Building Microsoft.Bot.Builder.History
setlocal
setlocal enabledelayedexpansion
setlocal enableextensions
set errorlevel=0
mkdir ..\nuget
erase /s ..\nuget\Microsoft.Bot.Builder.History*nupkg
msbuild /property:Configuration=release Microsoft.Bot.Builder.History.csproj
for /f %%v in ('powershell -noprofile "(Get-Command .\bin\release\Microsoft.Bot.Builder.dll).FileVersionInfo.FileVersion"') do set builder=%%v
for /f %%v in ('powershell -noprofile "(Get-Command .\bin\release\Microsoft.Bot.Builder.History.dll).FileVersionInfo.FileVersion"') do set version=%%v
..\..\packages\NuGet.CommandLine.4.1.0\tools\NuGet.exe pack Microsoft.Bot.Builder.History.nuspec -symbols -properties version=%version%;builder=%builder% -OutputDirectory ..\nuget
echo *** Finished building Microsoft.Bot.Builder.History

Update nuget commandline tool to 4.1.0 for bot.builder.history


@echo off

setlocal
set COLLECOTR_PROCESS_TITLE=Skywalking-Collector
set COLLECTOR_BASE_PATH=%~dp0%..
set COLLECTOR_RUNTIME_OPTIONS="-Xms256M -Xmx512M"

set CLASSPATH=%COLLECTOR_BASE_PATH%\config;
SET CLASSPATH=%COLLECTOR_BASE_PATH%\libs\*;%CLASSPATH%

if ""%JAVA_HOME%"" == """" (
  set _EXECJAVA=java
) else (
  set _EXECJAVA="%JAVA_HOME%"/bin/java
)

start /MIN "%COLLECOTR_PROCESS_TITLE%" %_EXECJAVA% "%COLLECTOR_RUNTIME_OPTIONS%" -cp "%CLASSPATH%" org.skywalking.apm.collector.worker.CollectorBootStartUp &
echo Collector started successfully!

endlocal

@echo off

setlocal
set COLLECOTR_PROCESS_TITLE=Skywalking-Collector
set COLLECTOR_BASE_PATH=%~dp0%..
set COLLECTOR_RUNTIME_OPTIONS="-Xms256M -Xmx512M"

set CLASSPATH=%COLLECTOR_BASE_PATH%\config;
SET CLASSPATH=%COLLECTOR_BASE_PATH%\libs\*;%CLASSPATH%

if defined JAVA_HOME (
 set _EXECJAVA="%JAVA_HOME:"=%"\bin\java
)

if not defined JAVA_HOME (
 echo "JAVA_HOME not set."
 set _EXECJAVA=java
)

start /MIN "%COLLECOTR_PROCESS_TITLE%" %_EXECJAVA% "%COLLECTOR_RUNTIME_OPTIONS%" -cp "%CLASSPATH%" org.skywalking.apm.collector.worker.CollectorBootStartUp &
echo Collector started successfully!

endlocal

Fix windows script start collector failure.


@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%

@set BASE_DIR=%HOME%\.spf13-vim-3
call git clone --recursive -b 3.0 git://github.com/spf13/spf13-vim.git "%BASE_DIR%"
call mkdir "%BASE_DIR%\.vim\bundle"
call mklink /J "%HOME%\.vim" "%BASE_DIR%\.vim"
call mklink "%HOME%\.vimrc" "%BASE_DIR%\.vimrc"
call mklink "%HOME%\_vimrc" "%BASE_DIR%\.vimrc"
call mklink "%HOME%\.vimrc.bundles" "%BASE_DIR%\.vimrc.bundles"

call git clone http://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle"
call vim -u "%BASE_DIR%/.vimrc.bundles" +BundleInstall! +BundleClean +qall

@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%

@set BASE_DIR=%HOME%\.spf13-vim-3
IF NOT EXIST "%BASE_DIR%" (
  call git clone --recursive -b 3.0 https://github.com/spf13/spf13-vim.git "%BASE_DIR%"
) ELSE (
	@set ORIGINAL_DIR=%CD%
    echo updating spf13-vim
    chdir /d "%BASE_DIR%"
	call git pull
    chdir /d "%ORIGINAL_DIR%"
	call cd "%BASE_DIR%"
)

call mklink "%HOME%\.vimrc" "%BASE_DIR%\.vimrc"
call mklink "%HOME%\_vimrc" "%BASE_DIR%\.vimrc"
call mklink "%HOME%\.vimrc.fork" "%BASE_DIR%\.vimrc.fork"
call mklink "%HOME%\.vimrc.bundles" "%BASE_DIR%\.vimrc.bundles"
call mklink "%HOME%\.vimrc.bundles.fork" "%BASE_DIR%\.vimrc.bundles.fork"
call mklink /J "%HOME%\.vim" "%BASE_DIR%\.vim"

IF NOT EXIST "%BASE_DIR%\.vim\bundle" (
	call mkdir "%BASE_DIR%\.vim\bundle"
)

IF NOT EXIST "%HOME%/.vim/bundle/vundle" (
	call git clone https://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle"
)

call vim -u "%BASE_DIR%/.vimrc.bundles" +BundleInstall! +BundleClean +qall

Make Windows Installer more robust & auto updating


@echo off

echo Compiling...
cd windeployqt
qmake windeployqt.pro
IF ERRORLEVEL ==1 GOTO :ERROR
mingw32-make.exe release
IF ERRORLEVEL ==1 GOTO :ERROR
cd ..

qmake presi-aoke.pro
IF ERRORLEVEL ==1 GOTO :ERROR
mingw32-make.exe release
IF ERRORLEVEL ==1 GOTO :ERROR

echo Copying files to staging
del /Q /S .\staging
mkdir .\staging
copy .\release\presi-aoke.exe .\staging

echo Copying qt libraries to staging
.\windeployqt\release\windeployqt.exe .\staging\presi-aoke.exe -no-translations -no-webkit2 -opengl

echo Creating installer

if exist "C:\Program Files (x86)\NSIS\makensis.exe" (set nsis="C:\Program Files (x86)\NSIS\makensis.exe") else (set nsis="C:\Program Files\NSIS\makensis.exe")
%nsis% presi-aoke.nsi
IF ERRORLEVEL ==1 GOTO :ERROR

echo Build complete
EXIT /B 0

:ERROR
ECHO Build failed.
EXIT /B 1

@echo off

echo Compiling...
cd windeployqt
qmake windeployqt.pro
IF ERRORLEVEL ==1 GOTO :ERROR
mingw32-make.exe release
IF ERRORLEVEL ==1 GOTO :ERROR
cd ..

qmake presi-aoke.pro
IF ERRORLEVEL ==1 GOTO :ERROR
mingw32-make.exe release
IF ERRORLEVEL ==1 GOTO :ERROR

echo Copying files to staging
del /Q /S .\staging
mkdir .\staging
copy .\release\presi-aoke.exe .\staging

echo Copying qt libraries to staging
.\windeployqt\release\windeployqt.exe .\staging\presi-aoke.exe -no-translations -no-webkit -no-webkit2 -no-opengl -no-svg
rem Trim a bunch of plugins that we don't use
del /Q /S .\staging\iconengines
erase .\staging\imageformats\qdds*.dll .\staging\imageformats\qicns*.dll .\staging\imageformats\qico*.dll .\staging\imageformats\qjp2*.dll .\staging\imageformats\qmng*.dll .\staging\imageformats\qsvg*.dll .\staging\imageformats\qtga*.dll .\staging\imageformats\qtiff*.dll .\staging\imageformats\qweb*.dll
erase .\staging\imageformats\qgifd.dll .\staging\imageformats\qjpegd.dll .\staging\imageformats\qwbmpd.dll

echo Creating installer

if exist "C:\Program Files (x86)\NSIS\makensis.exe" (set nsis="C:\Program Files (x86)\NSIS\makensis.exe") else (set nsis="C:\Program Files\NSIS\makensis.exe")
%nsis% presi-aoke.nsi
IF ERRORLEVEL ==1 GOTO :ERROR

echo Build complete
EXIT /B 0

:ERROR
ECHO Build failed.
EXIT /B 1

Trim down the Windows installer size

Trim down the Windows installer size


@echo off

if "%~1" == "" (
  echo Usage: release_win.bat path-to-bin-folder
  goto end
)

setlocal
set destroot=%cd%\%~1
set DESTDIR=

mkdir build
cd build
del CMakeCache.txt rem make sure to use default settings
cmake -D CMAKE_INSTALL_PREFIX=%destroot%\x64 -D COMPILER=ICC -G "Visual Studio 12 2013 Win64" ..
ICProjConvert150 embree.sln /IC /s /f
cmake --build . --config Release --target INSTALL -- /m
cmake --build . --config Release --target PACKAGE -- /m
copy embree*.exe %destroot%
cd ..

mkdir build32
cd build32
del CMakeCache.txt rem make sure to use default settings
cmake -D CMAKE_INSTALL_PREFIX=%destroot%\win32 -D COMPILER=ICC -G "Visual Studio 12 2013" ..
ICProjConvert150 embree.sln /IC /s /f
cmake --build . --config Release --target INSTALL -- /m
cmake --build . --config Release --target PACKAGE -- /m
copy embree*.exe %destroot%
cd ..

endlocal
:end

@echo off

if "%~1" == "" (
  echo Usage: release_win.bat path-to-bin-folder
  goto end
)

setlocal
set destroot=%cd%\%~1
set DESTDIR=

mkdir build
cd build
del CMakeCache.txt rem make sure to use default settings
cmake -D CMAKE_INSTALL_PREFIX=%destroot%\x64 -D COMPILER=ICC -G "Visual Studio 12 2013 Win64" ..
ICProjConvert150 embree.sln /IC /s /f
if %ERRORLEVEL%==9009 (
  echo Problems converting the project to ICC, aborting
  goto abort
)
cmake --build . --config Release --target INSTALL -- /m
cmake --build . --config Release --target PACKAGE -- /m
copy embree*.exe %destroot%
cd ..

mkdir build32
cd build32
del CMakeCache.txt rem make sure to use default settings
cmake -D CMAKE_INSTALL_PREFIX=%destroot%\win32 -D COMPILER=ICC -G "Visual Studio 12 2013" ..
ICProjConvert150 embree.sln /IC /s /f
if %ERRORLEVEL%==9009 (
  echo Problems converting the project to ICC, aborting
  goto abort
)
cmake --build . --config Release --target INSTALL -- /m
cmake --build . --config Release --target PACKAGE -- /m
copy embree*.exe %destroot%
cd ..

:abort
endlocal
:end

Check for errors regarding ICProjConvert150


@echo off
setlocal
set PATH=C:\Program Files (x86)\Git\bin\;%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\vc\vcvarsall.bat" x86
msbuild /tv:12.0 /p:BuildSignedSharpDX=false /t:RunCertificationTests /verbosity:quiet /clp:ErrorsOnly /fl /flp:Summary;Verbosity=minimal;logfile=BuildErrors.log;Append=true %* d:\Artiom\Projects\SharpDX\SharpDX.build

@echo off
setlocal
set PATH=C:\Program Files (x86)\Git\bin\;%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\vc\vcvarsall.bat" x86
msbuild /tv:12.0 /p:BuildSignedSharpDX=false /t:RunCertificationTests /verbosity:quiet /clp:ErrorsOnly /fl /flp:Summary;Verbosity=minimal;logfile=BuildErrors.log;Append=true %* SharpDX.build

[Build] Fix path to SharpDX.build for certification tests.


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

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

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

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

:Run
echo Running
../../runVimTests/bin/runVimTests.cmd --pure vimgrep.suite
goto End

:End

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

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

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

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

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

:RunAll
echo Running all
../../runVimTests/bin/runVimTests.cmd --pure vimgrep.suite
goto End

:End

Add an argument to run only certain tests


@echo off

setlocal EnableDelayedExpansion

set registryRoot=HKCU\Software\Classes
set key=TortoiseGit

reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\Directory\Background\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\Directory\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\Drive\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\Folder\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\InternetShortcut\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\LibraryFolder\background\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\LibraryLocation\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\lnkfile\shellex\ContextMenuHandlers\%key%" /d "---" /f

Disable tortoise git context menu on more types


call sbt assembly
del greedy.zip
java -jar out/proguard5.0/lib/proguard.jar @proguard.config
"C:\Program Files\7-Zip\7za.exe" a -tzip greedy.zip greedy.jar
PAUSE

call sbt assembly
del greedy.zip
java -jar out/proguard5.0/lib/proguard.jar @proguard.config
"C:\Program Files\7-Zip\7za.exe" a -tzip greedy.zip greedy.jar
del greedy.jar
PAUSE

Delete jar after packaging in zip

Delete jar after packaging in zip


rem ba.bat - download and build all of scintilla and scite
rd /s/q scintilla scite
cvs co scintilla scite
cd scintilla
call delbin
del/q bin\*.a
call delcvs
call zipsrc
cd win32
nmake -f scintilla.mak
cd ..
cd ..
cd scite
del/q bin\*.properties
del/q bin\SciTE
call delbin
call delcvs
call zipsrc
cd win32
nmake -f scite.mak
cd ..
call upxsc1
call zipwscite
call delbin
cd ..
cd scintilla
call delbin
cd ..

rem ba.bat - download and build all of scintilla and scite
rd /s/q scintilla scite
cvs co scintilla scite
cd scintilla
call delbin
del/q bin\*.a
call delcvs
call zipsrc
cd win32
nmake -f scintilla.mak
cd ..
del/q bin\*.pdb
cd ..
cd scite
del/q bin\*.properties
del/q bin\SciTE
call delbin
call delcvs
call zipsrc
cd win32
nmake -f scite.mak
cd ..
call upxsc1
call zipwscite
call delbin
cd ..
cd scintilla
call delbin
cd ..

Delete pdb files so they are not included in source zips.


for /f %%c in ('wmic cpu get NumberOfCores ^| findstr [0-9]') do set "CORES=%%c"
set SOURCE_DIR=%CD%
set BUILD_DIR=../build-sqlitewrapper
set CMAKE_COMMAND=cmake.exe
set MAKE_COMMAND=C:\Qt-Installation\Tools\QtCreator\bin\jom.exe /J %CORES%

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

python projectfiles_unchanged.py
if %ERRORLEVEL% NEQ 0 (
  RMDIR /S /Q "%BUILD_DIR%"
)

if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
cd "%BUILD_DIR%" || goto error
%CMAKE_COMMAND% -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" "%SOURCE_DIR%" || goto error
%MAKE_COMMAND% || goto error

cd "%SOURCE_DIR%"
goto :EOF

:error
cd "%SOURCE_DIR%"
exit /b 1

set BUILD_DIR=../build-sqlitewrapper
set CMAKE_BUILD_TYPE=Release

for /f %%c in ('wmic cpu get NumberOfCores ^| findstr [0-9]') do set "CORES=%%c"
set SOURCE_DIR=%CD%
set CMAKE_COMMAND=cmake.exe
set MAKE_COMMAND=C:\Qt-Installation\Tools\QtCreator\bin\jom.exe /J %CORES%

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

python projectfiles_unchanged.py
if %ERRORLEVEL% NEQ 0 (
  RMDIR /S /Q "%BUILD_DIR%"
)

if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
cd "%BUILD_DIR%" || goto error
%CMAKE_COMMAND% -DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% -G "NMake Makefiles" "%SOURCE_DIR%" || goto error
%MAKE_COMMAND% || goto error

cd "%SOURCE_DIR%"
goto :EOF

:error
cd "%SOURCE_DIR%"
exit /b 1

Move build type variables to the top

Move build type variables to the top

to make merging of both build scripts easy


set SOURCE_DIR=%CD%
set BUILD_DIR=build-sqlitewrapper
set CMAKE_COMMAND=cmake.exe
set MAKE_COMMAND=mingw32-make.exe -j2

cd ..
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
cd "%BUILD_DIR%" || goto error
%CMAKE_COMMAND% -G "MinGW Makefiles" "%SOURCE_DIR%" || goto error
%MAKE_COMMAND% || goto error

cd "%SOURCE_DIR%"
exit /b 0

:error
cd "%SOURCE_DIR%"
exit /b 1

set SOURCE_DIR=%CD%
set BUILD_DIR=build-sqlitewrapper
set CMAKE_COMMAND=cmake.exe
set MAKE_COMMAND=C:\Qt\Tools\QtCreator\bin\jom.exe /J 2

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

cd ..
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
cd "%BUILD_DIR%" || goto error
%CMAKE_COMMAND% -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" "%SOURCE_DIR%" || goto error
%MAKE_COMMAND% || goto error

cd "%SOURCE_DIR%"
exit /b 0

:error
cd "%SOURCE_DIR%"
exit /b 1

Convert Windows build script to MSVC

Convert Windows build script to MSVC


@echo off

rem
rem Extra installation script
rem
rem See CK LICENSE.txt for licensing details.
rem See CK Copyright.txt for copyright details.
rem
rem Developer(s): Grigori Fursin, 2016-2017
rem

rem ############################################################
echo.
echo Preparing vars ...

cd %INSTALL_DIR%\%PACKAGE_SUB_DIR%

mingw32-make PREFIX="%INSTALL_DIR%\install" BINARY=%CK_TARGET_CPU_BITS% ONLY_CBLAS=1 MAKE=mingw32-make.exe CFLAGS="-DMS_ABI" NOFORTRAN=1 NO_LAPACK=1

if %errorlevel% neq 0 (
 echo.
 echo Error: make failed!
 goto err
)

mingw32-make install PREFIX="%INSTALL_DIR%\install"

if %errorlevel% neq 0 (
 echo.
 echo Error: make install failed!
 goto err
)

exit /b 0

@echo off

rem
rem Extra installation script
rem
rem See CK LICENSE.txt for licensing details.
rem See CK Copyright.txt for copyright details.
rem
rem Developer(s): Grigori Fursin, 2016-2017
rem

rem ############################################################
echo.
echo Preparing vars ...

cd %INSTALL_DIR%\%PACKAGE_SUB_DIR%

rem mingw32-make PREFIX="%INSTALL_DIR%\install" BINARY=%CK_TARGET_CPU_BITS% ONLY_CBLAS=1 MAKE=mingw32-make.exe CFLAGS="-DMS_ABI" NOFORTRAN=1 NO_LAPACK=1
make PREFIX="%INSTALL_DIR%\install" BINARY=%CK_TARGET_CPU_BITS% CC=gcc FC=gfortran

if %errorlevel% neq 0 (
 echo.
 echo Error: make failed!
 goto err
)

mingw32-make install PREFIX="%INSTALL_DIR%\install"

if %errorlevel% neq 0 (
 echo.
 echo Error: make install failed!
 goto err
)

exit /b 0

Fix OpenBLAS build on Windows

Fix OpenBLAS build on Windows


@echo off

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

setlocal

:: TODO(noelallen) Share list with POSIX
gcl try %* -b naclsdkm-mac -b naclsdkm-linux -b naclsdkm-linux ^
-b naclsdkm-pnacl-linux -b naclsdkm-pnacl-mac -b naclsdkm-windows32 ^
-b naclsdkm-windows64 -S svn://svn.chromium.org/chrome-try/try-nacl

@echo off

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

setlocal

:: TODO(noelallen) Share list with POSIX
gcl try %* -b naclsdkm-mac -b naclsdkm-linux -b naclsdkm-pnacl-linux ^
-b naclsdkm-windows32 -b naclsdkm-windows64 ^
-S svn://svn.chromium.org/chrome-try/try-nacl

Fix Windows bat file for SDK try

Fix Windows bat file for SDK try

The script currently does not run tries, since the try mechanism rejects
the entire request if any requrest bot is bogus.
Review URL: https://chromiumcodereview.appspot.com/10854028

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@150839 0039d316-1c4b-4281-b951-d872f2087c98


@echo off
setlocal

if not defined VisualStudioVersion (
    if defined VS140COMNTOOLS (
        call "%VS140COMNTOOLS%\VsDevCmd.bat"
        goto :EnvSet
    )

    if defined VS120COMNTOOLS (
        call "%VS120COMNTOOLS%\VsDevCmd.bat"
        goto :EnvSet
    )

    echo Error: %~nx0 requires Visual Studio 2013 or 2015.
    echo        Please see https://github.com/dotnet/wcf/blob/master/Documentation/developer-guide.md for build instructions.
    exit /b 1
)

:EnvSet

:: Log build command line
set _buildproj=%~dp0..\CertificateGenerator\CertificateGenerator.sln
set _buildlog=%~dp0..\..\..\..\msbuildCertificateGenerator.log
set _buildprefix=echo
set _buildpostfix=^> "%_buildlog%"

set cmd=msbuild /p:Configuration=Release /t:restore;build "%_buildproj%" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%_buildlog%";Append %*
echo %cmd%
%cmd%
set BUILDERRORLEVEL=%ERRORLEVEL%

:AfterBuild

echo.
:: Pull the build summary from the log file
findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%_buildlog%"
echo Build Exit Code = %BUILDERRORLEVEL%

exit /b %BUILDERRORLEVEL%

@echo off
setlocal

if not defined VisualStudioVersion (
    if defined VS160COMNTOOLS (
        call "%VS160COMNTOOLS%\VsDevCmd.bat"
        goto :EnvSet
    )

    echo Error: %~nx0 requires Visual Studio 2019 because the .NET Core 3.0 SDK is needed.
    echo        Please see https://github.com/dotnet/wcf/blob/master/Documentation/developer-guide.md for build instructions.
    exit /b 1
)

:EnvSet

:: Log build command line
set _buildproj=%~dp0..\CertificateGenerator\CertificateGenerator.sln
set _buildlog=%~dp0..\..\..\..\msbuildCertificateGenerator.log
set _buildprefix=echo
set _buildpostfix=^> "%_buildlog%"

set cmd=msbuild /p:Configuration=Release /t:restore;build "%_buildproj%" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%_buildlog%";Append %*
echo %cmd%
%cmd%
set BUILDERRORLEVEL=%ERRORLEVEL%

:AfterBuild

echo.
:: Pull the build summary from the log file
findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%_buildlog%"
echo Build Exit Code = %BUILDERRORLEVEL%

exit /b %BUILDERRORLEVEL%

Fix script to require VS 2019.

Fix script to require VS 2019.

* Since converting to .NET 3.0 SDK projects we now need that SDK in order to build.


set S7Z=%~dp0.\bin\7za.exe
mkdir Package
copy Source\*.txt Package\
copy Source\*LICENSE* Package\
copy Source\*README* Package\

"%S7Z%" x -oPackage Build\package-*.7z
echo [Paths]>>Package\bin\qt.conf
echo Prefix=..>>Package\bin\qt.conf

pushd Package\include
for /f "delims=" %%D in ('dir /ad /b /s ^| sort /r') DO @rmdir "%%D"
popd

move Package "%1"

"%S7Z%" a "%1.7z" "%1"

set S7Z=%~dp0.\bin\7za.exe
mkdir Package
copy Source\*.txt Package\
copy Source\*LICENSE* Package\
copy Source\*README* Package\

"%S7Z%" x -oPackage Build\package-*.7z
echo [Paths]>>Package\bin\qt.conf
echo Prefix=..>>Package\bin\qt.conf

pushd Package\include
for /f "delims=" %%D in ('dir /ad /b /s ^| sort /r') DO @rmdir "%%D"
popd

xcopy /e /y Package\lib\cmake\install Package\lib\cmake

move Package "%1"

"%S7Z%" a "%1.7z" "%1"

Update script, seems to work for Qt-5.7.0 now.