@ECHO off
SETLOCAL EnableExtensions
SETLOCAL EnableDelayedExpansion

:: ### Version History -- X.Y.Z_YYYYMMDD-hhmm Author Description
SET version=1.0.0_20150930-0600 &: Peter Kirschner   downloading,extract,configure and launch eclipse-installer with jre
SET version=%version: =%
SET title=idefixInstaller script %~nx0 - version %version%
TITLE %title%
SET POWERSHELL_TITLE=$Host.UI.RawUI.WindowTitle='%title%'

IF "%1"=="" (
	SET BRANCH=master
) ELSE (
    SET BRANCH=%1
)

:: ###########################################################
SET SCRIPTNAME=%~n0
SET SCRIPT_PATH=%~dp0
SET SCRIPT_PATH=%SCRIPT_PATH:~0,-1%

SET IDEFIX_NAME=idefixInstaller
SET DL=%SCRIPT_PATH%\.download
:: folder must exists for powershell download requests
MKDIR %DL% 2>&1 > NUL

SET GITHUB_IO=http://peterkir.github.io/org.eclipse.oomph/
SET GITHUB_IO_LATEST=latest

SET GITHUB_IO_BOOT=http://peterkir.github.io/idefix/bootstrap/peterkir/win32
SET OOMPH_VERSION=1.4.0

::ECHO.
::ECHO # workaroung for NTLMv2 ProxyAuth - starting IE
::ECHO.
::SET IE_CMD="C:\Program Files (x86)\Internet Explorer\iexplore.exe www.google.de"
::SET IE_DIR="%TEMP%"
::FOR /F "tokens=2 delims=;=" %%a IN (
::  'WMIC process call create %IE_CMD%^, %IE_DIR% ^| find "ProcessId"'
::) DO (
::  SET IE_PID=%%a
::)
::ECHO browser launched with PID %IE_PID%
:: TODO search an kill the IE if not previously open WMIC process %IE_PID% delete

SET JAVA=%SCRIPT_PATH%\java

:: source archives location
SET JAVA_WEB=http://www.klib.io/_archives/java

:: concrete version names for the Java Archives
SET JAVA_ARCHIVE=win32.x86_64-jre1.8.0_74.zip

:: Java Name (includes version)
SET JAVA_VERSION=%JAVA_ARCHIVE:~16,-9%
SET JAVA_NAME=%JAVA_ARCHIVE:~13,-4%
SET JAVA_WEB_DL=%JAVA_WEB%/%JAVA_VERSION%/%JAVA_ARCHIVE%
SET JAVA_DL=%DL%\%JAVA_ARCHIVE%

:: extract locations
SET JAVA_EXTRACT=%JAVA%\%JAVA_VERSION%

ECHO.
ECHO # setup local JDK %JAVA_VERSION% in version %JAVA_NAME%
ECHO.
powershell -nologo -noprofile  -command "%POWERSHELL_TITLE%;if ( Test-Path '%JAVA_DL%' ) { Write-Output '   - skipping download,   cause file exists   - %JAVA_DL%' } else { Write-Output '   - downloading archive %JAVA_ARCHIVE%';(New-Object System.Net.WebClient).DownloadFile('%JAVA_WEB_DL%','%JAVA_DL%')}"
IF "%ERRORLEVEL%"=="" (
    ECHO failing downloading file %JAVA_WEB%/%JAVA_ARCHIVE%
    GOTO END
)

powershell -nologo -noprofile  -command "%POWERSHELL_TITLE%;if ( Test-Path '%JAVA_EXTRACT%\%JAVA_NAME%' -PathType Container )  { Write-Output '   - skipping extraction, cause folder exists - %JAVA_EXTRACT%\%JAVA_NAME%' } else { Write-Output '   - extracting %JAVA_DL% archive to %JAVA_EXTRACT%'; Add-Type -A System.IO.Compression.FileSystem; [IO.Compression.ZipFile]::ExtractToDirectory('%JAVA_DL%', '%JAVA_EXTRACT%')}"

FOR /F %%a IN ('DIR /B %SCRIPT_PATH%\java\1.8') DO SET JAVA=%SCRIPT_PATH%\java\1.8\%%a

ECHO.
ECHO # setup local %IDEFIX_NAME%
ECHO.

:: download of a file with powershell - http://superuser.com/a/423789/344922
powershell -nologo -noprofile -command "%POWERSHELL_TITLE%; (New-Object System.Net.WebClient).DownloadFile('%GITHUB_IO%/%BRANCH%/%GITHUB_IO_LATEST%','%DL%\%BRANCH%_%GITHUB_IO_LATEST%')"
SET /P LATEST=<%DL%\%BRANCH%_%GITHUB_IO_LATEST%
ECHO found latest build ^<%LATEST%^> from %GITHUB_IO%/%BRANCH%/%GITHUB_IO_LATEST%
ECHO.

::SET BINTRAY_BUILD_ROOT=https://dl.bintray.com/peterkir/generic/org.eclipse.oomph/%VERSION%/%BRANCH%/%LATEST%
SET BINTRAY_BUILD_ROOT=http://klib.io/org.eclipse.oomph/%VERSION%/%BRANCH%/%LATEST%

SET ECLIPSE_INSTALLER_WEB=%BINTRAY_BUILD_ROOT%/products
SET ECLIPSE_INSTALLER_ARCHIVE=org.eclipse.oomph.setup.installer.product-win32.win32.x86_64.zip
SET ECLIPSE_INSTALLER=%ECLIPSE_INSTALLER_ARCHIVE:~0,-4%

powershell -nologo -noprofile -command "%POWERSHELL_TITLE%;if ( Test-Path %DL%\%ECLIPSE_INSTALLER_ARCHIVE% ) { Write-Output '   - skipping download, cause file exists - %DL%\%ECLIPSE_INSTALLER_ARCHIVE%' } else { Write-Output '   - downloading archive %ECLIPSE_INSTALLER_WEB%/%ECLIPSE_INSTALLER_ARCHIVE%';(New-Object System.Net.WebClient).DownloadFile('%ECLIPSE_INSTALLER_WEB%/%ECLIPSE_INSTALLER_ARCHIVE%','%DL%\%ECLIPSE_INSTALLER_ARCHIVE%')}"
IF "%ERRORLEVEL%"=="" (
    ECHO failing downloading file %ECLIPSE_INSTALLER_WEB%/%ECLIPSE_INSTALLER_ARCHIVE%
    GOTO END
)

powershell -nologo -noprofile  -command "%POWERSHELL_TITLE%;if ( Test-Path '%SCRIPT_PATH%\%IDEFIX_NAME%' -PathType Container )  { Write-Output '   - skipping extraction, cause folder exists - %SCRIPT_PATH%\%IDEFIX_NAME%' } else { Write-Output '   - extracting ECLIPSE_INSTALLER archive to %SCRIPT_PATH%\%IDEFIX_NAME%'; Add-Type -A System.IO.Compression.FileSystem; [IO.Compression.ZipFile]::ExtractToDirectory('%DL%\%ECLIPSE_INSTALLER_ARCHIVE%', '%SCRIPT_PATH%\%IDEFIX_NAME%')}"

ECHO    - copying latest java %JAVA%\jre into %SCRIPT_PATH%\%IDEFIX_NAME%\jre
IF NOT EXIST %SCRIPT_PATH%\%IDEFIX_NAME%\jre\NUL (
    XCOPY /Y /I /E /H %JAVA% %SCRIPT_PATH%\%IDEFIX_NAME%\jre 2>&1 > NUL
)

SET "IDEFIX_HOME=%SCRIPT_PATH%"
MKDIR %IDEFIX_HOME% 2>&1 > NUL

SET IDEFIX_HOME=%IDEFIX_HOME:\=/%
SET IDEFIX_INI=%SCRIPT_PATH%\%IDEFIX_NAME%\eclipse-inst.ini

FINDSTR peterkir.github.io %IDEFIX_INI% 2>&1 > NUL
IF "%ERRORLEVEL%"=="" (
    ECHO    - skipping vmArgs addition, cause already inside
) ELSE (
    ECHO    - adding vmArgs to ini file
    :: allow installation of unsigned bundles
    ECHO -Declipse.p2.unsignedPolicy=allow >> %IDEFIX_INI%

    :: hidden p2 options (configured to default)
    ECHO -Declipse.p2.max.threads=4        >> %IDEFIX_INI%
    ECHO -Declipse.p2.force.threading=true >> %IDEFIX_INI%
    ECHO -Declipse.p2.mirrors=true         >> %IDEFIX_INI%

    :: filtering user displayed catalogs/products/versions
    ECHO -Doomph.setup.product.catalog.filter=osgi\.products>> %IDEFIX_INI%
    ECHO -Doomph.setup.product.filter=osgi\.idefix\.mars>> %IDEFIX_INI%
    ECHO -Doomph.setup.product.version.filter=latest\.bndtools\.bintray>> %IDEFIX_INI%

    ECHO -Doomph.setup.jre.choice=false                                 >> %IDEFIX_INI%
    ::ECHO -Doomph.installer.update.url=%BINTRAY_BUILD_ROOT%/p2/installer >> %IDEFIX_INI%
    ::ECHO -Doomph.update.url=%BINTRAY_BUILD_ROOT%/p2/oomph               >> %IDEFIX_INI%
    ECHO -Doomph.setup.installer.mode=advanced                          >> %IDEFIX_INI%
    ECHO -Doomph.redirection.klibProductCatalog=index:/redirectable.products.setup-^>https://peterkir.github.io/idefix/oomph/osgi/productsCatalog.setup >> %IDEFIX_INI%
    ECHO -Doomph.redirection.klibProjectCatalog=index:/redirectable.projects.setup-^>https://peterkir.github.io/idefix/oomph/osgi/projectsCatalog.setup >> %IDEFIX_INI%
)

ECHO.
ECHO # launching %IDEFIX_NAME%
ECHO.
START /B %SCRIPT_PATH%\%IDEFIX_NAME%\eclipse-inst.exe

::ECHO.
::ECHO # clean-up
::ECHO.
::RMDIR /Q /S %DL%

:END

@ECHO off
SETLOCAL EnableExtensions
SETLOCAL EnableDelayedExpansion

:: ### Version History -- X.Y.Z_YYYYMMDD-hhmm Author Description
SET version=1.0.0_20150930-0600 &: Peter Kirschner   downloading,extract,configure and launch eclipse-installer with jre
SET version=%version: =%
SET title=idefixInstaller script %~nx0 - version %version%
TITLE %title%
SET POWERSHELL_TITLE=$Host.UI.RawUI.WindowTitle='%title%'

IF "%1"=="" (
	SET BRANCH=master
) ELSE (
    SET BRANCH=%1
)

:: ###########################################################
SET SCRIPTNAME=%~n0
SET SCRIPT_PATH=%~dp0
SET SCRIPT_PATH=%SCRIPT_PATH:~0,-1%

SET IDEFIX_NAME=idefixInstaller
SET DL=%SCRIPT_PATH%\.download
:: folder must exists for powershell download requests
MKDIR %DL% 2>&1 > NUL

SET GITHUB_IO=http://peterkir.github.io/org.eclipse.oomph/
SET GITHUB_IO_LATEST=latest

SET GITHUB_IO_BOOT=http://peterkir.github.io/idefix/bootstrap/peterkir/win32
SET OOMPH_VERSION=1.4.0

::ECHO.
::ECHO # workaroung for NTLMv2 ProxyAuth - starting IE
::ECHO.
::SET IE_CMD="C:\Program Files (x86)\Internet Explorer\iexplore.exe www.google.de"
::SET IE_DIR="%TEMP%"
::FOR /F "tokens=2 delims=;=" %%a IN (
::  'WMIC process call create %IE_CMD%^, %IE_DIR% ^| find "ProcessId"'
::) DO (
::  SET IE_PID=%%a
::)
::ECHO browser launched with PID %IE_PID%
:: TODO search an kill the IE if not previously open WMIC process %IE_PID% delete

SET JAVA=%SCRIPT_PATH%\java

:: source archives location
SET JAVA_WEB=http://www.klib.io/_archives/java

:: concrete version names for the Java Archives
SET JAVA_ARCHIVE=win32.x86_64-jre1.8.0_74.zip

:: Java Name (includes version)
SET JAVA_VERSION=%JAVA_ARCHIVE:~16,-9%
SET JAVA_NAME=%JAVA_ARCHIVE:~13,-4%
SET JAVA_WEB_DL=%JAVA_WEB%/%JAVA_VERSION%/%JAVA_ARCHIVE%
SET JAVA_DL=%DL%\%JAVA_ARCHIVE%

:: extract locations
SET JAVA_EXTRACT=%JAVA%\%JAVA_VERSION%

ECHO.
ECHO # setup local JDK %JAVA_VERSION% in version %JAVA_NAME%
ECHO.
powershell -nologo -noprofile  -command "%POWERSHELL_TITLE%;if ( Test-Path '%JAVA_DL%' ) { Write-Output '   - skipping download,   cause file exists   - %JAVA_DL%' } else { Write-Output '   - downloading archive %JAVA_ARCHIVE%';(New-Object System.Net.WebClient).DownloadFile('%JAVA_WEB_DL%','%JAVA_DL%')}"
IF "%ERRORLEVEL%"=="" (
    ECHO failing downloading file %JAVA_WEB%/%JAVA_ARCHIVE%
    GOTO END
)

powershell -nologo -noprofile  -command "%POWERSHELL_TITLE%;if ( Test-Path '%JAVA_EXTRACT%\%JAVA_NAME%' -PathType Container )  { Write-Output '   - skipping extraction, cause folder exists - %JAVA_EXTRACT%\%JAVA_NAME%' } else { Write-Output '   - extracting %JAVA_DL% archive to %JAVA_EXTRACT%'; Add-Type -A System.IO.Compression.FileSystem; [IO.Compression.ZipFile]::ExtractToDirectory('%JAVA_DL%', '%JAVA_EXTRACT%')}"

FOR /F %%a IN ('DIR /B %SCRIPT_PATH%\java\1.8') DO SET JAVA=%SCRIPT_PATH%\java\1.8\%%a

ECHO.
ECHO # setup local %IDEFIX_NAME%
ECHO.

:: download of a file with powershell - http://superuser.com/a/423789/344922
powershell -nologo -noprofile -command "%POWERSHELL_TITLE%; (New-Object System.Net.WebClient).DownloadFile('%GITHUB_IO%/%BRANCH%/%GITHUB_IO_LATEST%','%DL%\%BRANCH%_%GITHUB_IO_LATEST%')"
SET /P LATEST=<%DL%\%BRANCH%_%GITHUB_IO_LATEST%
ECHO found latest build ^<%LATEST%^> from %GITHUB_IO%/%BRANCH%/%GITHUB_IO_LATEST%
ECHO.

::SET BINTRAY_BUILD_ROOT=https://dl.bintray.com/peterkir/generic/org.eclipse.oomph/%OOMPH_VERSION%/%BRANCH%/%LATEST%
SET BINTRAY_BUILD_ROOT=http://klib.io/org.eclipse.oomph/%OOMPH_VERSION%/%BRANCH%/%LATEST%

SET ECLIPSE_INSTALLER_WEB=%BINTRAY_BUILD_ROOT%/products
SET ECLIPSE_INSTALLER_ARCHIVE=org.eclipse.oomph.setup.installer.product-win32.win32.x86_64.zip
SET ECLIPSE_INSTALLER=%ECLIPSE_INSTALLER_ARCHIVE:~0,-4%

powershell -nologo -noprofile -command "%POWERSHELL_TITLE%;if ( Test-Path %DL%\%ECLIPSE_INSTALLER_ARCHIVE% ) { Write-Output '   - skipping download, cause file exists - %DL%\%ECLIPSE_INSTALLER_ARCHIVE%' } else { Write-Output '   - downloading archive %ECLIPSE_INSTALLER_WEB%/%ECLIPSE_INSTALLER_ARCHIVE%';(New-Object System.Net.WebClient).DownloadFile('%ECLIPSE_INSTALLER_WEB%/%ECLIPSE_INSTALLER_ARCHIVE%','%DL%\%ECLIPSE_INSTALLER_ARCHIVE%')}"
IF "%ERRORLEVEL%"=="" (
    ECHO failing downloading file %ECLIPSE_INSTALLER_WEB%/%ECLIPSE_INSTALLER_ARCHIVE%
    GOTO END
)

powershell -nologo -noprofile  -command "%POWERSHELL_TITLE%;if ( Test-Path '%SCRIPT_PATH%\%IDEFIX_NAME%' -PathType Container )  { Write-Output '   - skipping extraction, cause folder exists - %SCRIPT_PATH%\%IDEFIX_NAME%' } else { Write-Output '   - extracting ECLIPSE_INSTALLER archive to %SCRIPT_PATH%\%IDEFIX_NAME%'; Add-Type -A System.IO.Compression.FileSystem; [IO.Compression.ZipFile]::ExtractToDirectory('%DL%\%ECLIPSE_INSTALLER_ARCHIVE%', '%SCRIPT_PATH%\%IDEFIX_NAME%')}"

ECHO    - copying latest java %JAVA%\jre into %SCRIPT_PATH%\%IDEFIX_NAME%\jre
IF NOT EXIST %SCRIPT_PATH%\%IDEFIX_NAME%\jre\NUL (
    XCOPY /Y /I /E /H %JAVA% %SCRIPT_PATH%\%IDEFIX_NAME%\jre 2>&1 > NUL
)

SET "IDEFIX_HOME=%SCRIPT_PATH%"
MKDIR %IDEFIX_HOME% 2>&1 > NUL

SET IDEFIX_HOME=%IDEFIX_HOME:\=/%
SET IDEFIX_INI=%SCRIPT_PATH%\%IDEFIX_NAME%\eclipse-inst.ini

FINDSTR peterkir.github.io %IDEFIX_INI% 2>&1 > NUL
IF "%ERRORLEVEL%"=="" (
    ECHO    - skipping vmArgs addition, cause already inside
) ELSE (
    ECHO    - adding vmArgs to ini file
    :: allow installation of unsigned bundles
    ECHO -Declipse.p2.unsignedPolicy=allow >> %IDEFIX_INI%

    :: hidden p2 options (configured to default)
    ECHO -Declipse.p2.max.threads=4        >> %IDEFIX_INI%
    ECHO -Declipse.p2.force.threading=true >> %IDEFIX_INI%
    ECHO -Declipse.p2.mirrors=true         >> %IDEFIX_INI%

    :: filtering user displayed catalogs/products/versions
    ECHO -Doomph.setup.product.catalog.filter=osgi\.products>> %IDEFIX_INI%
    ECHO -Doomph.setup.product.filter=osgi\.idefix\.mars>> %IDEFIX_INI%
    ECHO -Doomph.setup.product.version.filter=latest\.bndtools\.bintray>> %IDEFIX_INI%

    ECHO -Doomph.setup.jre.choice=false                                 >> %IDEFIX_INI%
    ::ECHO -Doomph.installer.update.url=%BINTRAY_BUILD_ROOT%/p2/installer >> %IDEFIX_INI%
    ::ECHO -Doomph.update.url=%BINTRAY_BUILD_ROOT%/p2/oomph               >> %IDEFIX_INI%
    ECHO -Doomph.setup.installer.mode=advanced                          >> %IDEFIX_INI%
    ECHO -Doomph.redirection.klibProductCatalog=index:/redirectable.products.setup-^>https://peterkir.github.io/idefix/oomph/osgi/productsCatalog.setup >> %IDEFIX_INI%
    ECHO -Doomph.redirection.klibProjectCatalog=index:/redirectable.projects.setup-^>https://peterkir.github.io/idefix/oomph/osgi/projectsCatalog.setup >> %IDEFIX_INI%
)

ECHO.
ECHO # launching %IDEFIX_NAME%
ECHO.
START /B %SCRIPT_PATH%\%IDEFIX_NAME%\eclipse-inst.exe

::ECHO.
::ECHO # clean-up
::ECHO.
::RMDIR /Q /S %DL%

:END

fix version reference

fix version reference


@ECHO OFF

setlocal ENABLEDELAYEDEXPANSION
SET ATKParam=
FOR /R jar %%G IN (*.jar) DO set CLASSPATH=!CLASSPATH!;%%G
Echo The Classpath definition is %CLASSPATH%

IF "%1" == "-gui" GOTO GUI
:Loop

	IF "%1"=="" GOTO NOGUI

	SET ATKParam=%ATKParam% %1

	SHIFT

GOTO Loop

:NOGUI

REM if defined CLASSPATH (set CLASSPATH=%CLASSPATH%;.) else (set CLASSPATH=.)
java com.orange.atk.launcher.LaunchJATK %ATKParam%
GOTO END

:GUI

java com.orange.atk.launcher.LaunchGUIJATK

:END
Echo Thanks for using ATK !

add a batch script to launch ATK with commandline


:: Copyright 2012 The Go Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style
:: license that can be found in the LICENSE file.
@echo off

:: Keep environment variables within this script
:: unless invoked with --no-local.
if x%1==x--no-local goto nolocal
if x%2==x--no-local goto nolocal
setlocal
:nolocal

set GOBUILDFAIL=0

rem TODO avoid rebuild if possible

if x%1==x--no-rebuild goto norebuild
echo # Building packages and commands.
go install -a -v std
if errorlevel 1 goto fail
echo.
:norebuild

echo # Testing packages.
go test std -short -timeout=120s
if errorlevel 1 goto fail
echo.

echo # runtime -cpu=1,2,4
go test runtime -short -timeout=120s -cpu=1,2,4
if errorlevel 1 goto fail
echo.

echo # sync -cpu=10
go test sync -short -timeout=120s -cpu=10
if errorlevel 1 goto fail
echo.

echo # ..\misc\dashboard\builder ..\misc\goplay
go build ..\misc\dashboard\builder ..\misc\goplay
if errorlevel 1 goto fail
echo.

echo # ..\test\bench\go1
go test ..\test\bench\go1
if errorlevel 1 goto fail
echo.

:: TODO: The other tests in run.bash.

echo # test
cd ..\test
set FAIL=0
go run run.go
if errorlevel 1 set FAIL=1
cd ..\src
echo.
if %FAIL%==1 goto fail

echo # Checking API compatibility.
go tool api -c ..\api\go1.txt
if errorlevel 1 goto fail
echo.

echo ALL TESTS PASSED
goto end

:fail
set GOBUILDFAIL=1

:end

:: Copyright 2012 The Go Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style
:: license that can be found in the LICENSE file.
@echo off

:: Keep environment variables within this script
:: unless invoked with --no-local.
if x%1==x--no-local goto nolocal
if x%2==x--no-local goto nolocal
setlocal
:nolocal

set GOBUILDFAIL=0

rem TODO avoid rebuild if possible

if x%1==x--no-rebuild goto norebuild
echo # Building packages and commands.
go install -a -v std
if errorlevel 1 goto fail
echo.
:norebuild

echo # Testing packages.
go test std -short -timeout=120s
if errorlevel 1 goto fail
echo.

echo # runtime -cpu=1,2,4
go test runtime -short -timeout=120s -cpu=1,2,4
if errorlevel 1 goto fail
echo.

echo # sync -cpu=10
go test sync -short -timeout=120s -cpu=10
if errorlevel 1 goto fail
echo.

echo # ..\misc\dashboard\builder ..\misc\goplay
go build ..\misc\dashboard\builder ..\misc\goplay
if errorlevel 1 goto fail
echo.

:: TODO(brainman): disabled, because it fails with: mkdir C:\Users\ADMINI~1\AppData\Local\Temp\2.....\test\bench\: The filename or extension is too long.
::echo # ..\test\bench\go1
::go test ..\test\bench\go1
::if errorlevel 1 goto fail
::echo.

:: TODO: The other tests in run.bash.

echo # test
cd ..\test
set FAIL=0
go run run.go
if errorlevel 1 set FAIL=1
cd ..\src
echo.
if %FAIL%==1 goto fail

echo # Checking API compatibility.
go tool api -c ..\api\go1.txt
if errorlevel 1 goto fail
echo.

echo ALL TESTS PASSED
goto end

:fail
set GOBUILDFAIL=1

:end

run.bat: disable test in test\bench\go1 to fix build

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5848066


@echo off

set SELF_PATH=%~dp0
call %SELF_PATH%\env.bat

set QTC_SOURCE=%cd%\qtcreator-latest\src
set QTC_BUILD=%cd%\qtcreator-latest\compiled

rmdir /s /q build
mkdir build

cd build
lrelease %SELF_PATH%\..\..\qtc-cppcheck.pro
qmake %SELF_PATH%\..\..
nmake
cd ..

set /p VERSION=<qtcreator-latest\version
set PLUGIN_NAME=QtcCppcheck

if not exist qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll  exit /b 1

rd /Q /S dist
mkdir dist\lib\qtcreator\plugins
mkdir dist\share\qtcreator\translations
copy /Y qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll dist\lib\qtcreator\plugins
copy /Y %SELF_PATH%\..\..\translation\*.qm dist\share\qtcreator\translations

if exist %PLUGIN_NAME%-%VERSION%-win.zip del /Q %PLUGIN_NAME%-%VERSION%-win.zip
cd dist
zip -q -r ..\%PLUGIN_NAME%-%VERSION%-win.zip *
cd ..

@echo off

set SELF_PATH=%~dp0
call %SELF_PATH%\env.bat

set QTC_SOURCE=%cd%\qtcreator-latest\src
set QTC_BUILD=%cd%\qtcreator-latest\compiled

rmdir /s /q build
mkdir build

cd build
lrelease %SELF_PATH%\..\..\qtc-cppcheck.pro
qmake %SELF_PATH%\..\..
nmake
cd ..

set /p VERSION=<qtcreator-latest\version
set PLUGIN_NAME=QtcCppcheck

if not exist qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll  exit /b 1

rd /Q /S dist
mkdir dist\lib\qtcreator\plugins
mkdir dist\share\qtcreator\translations
copy /Y qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll dist\lib\qtcreator\plugins
copy /Y %SELF_PATH%\..\..\translation\*.qm dist\share\qtcreator\translations

if exist %PLUGIN_NAME%-%VERSION%-win.zip del /Q %PLUGIN_NAME%-%VERSION%-win.zip
cd dist
7z a ..\%PLUGIN_NAME%-%VERSION%-win.zip *
cd ..

Use 7zip instead of zip.

Use 7zip instead of zip.


@echo off
setlocal EnableDelayedExpansion

REM This script automatically extracts the downloaded FFmpeg 7-zip archives and sets up the required folder structure

SET version=ffmpeg-2.8.2
SET platforms="win32" "win64"
SET disttypes="dev" "shared"

REM 7-Zip
REM echo without newline at end
ECHO|SET /p=Searching for 7-zip...

WHERE 7z >nul 2>nul
IF %ERRORLEVEL% EQU 0 (
    ECHO found on path
    SET sevenzip=7z
) ELSE (
    IF EXIST "%PROGRAMFILES%\7-zip\7z.exe" (
        ECHO found in program files
        SET sevenzip="%PROGRAMFILES%\7-zip\7z.exe"
    ) ELSE (
        IF EXIST "%PROGRAMFILES(X86)%\7-zip\7z.exe" (
            ECHO found in x86 program files
            SET sevenzip="%PROGRAMFILES(X86)%\7-zip\7z.exe"
        ) ELSE (
            ECHO NOT FOUND
            ECHO ERROR: 7-zip not found... please install to default directory and retry, or extract files manually according to the instructions in ffmpeg-prepare.txt
            GOTO end
        )
    )
)

REM FFmpeg archive files
ECHO Looking for required archive files...
SET filenotfound=0

FOR %%p in (%platforms%) DO (
    FOR %%d in (%disttypes%) DO (
        SET file=%version%-%%~p-%%~d.7z

        REM echo without newline at end
        ECHO|SET /p=Checking !file!...

        IF NOT EXIST !file! (
            ECHO MISSING
            SET filenotfound=1
        ) ELSE (
            ECHO ok
        )
    )
)

IF %filenotfound% EQU 1 (
    ECHO ERROR: Missing file^(s^)^^! Please download the required files into this script's directory^^!
    GOTO end
)

REM Extraction
ECHO Extracting...

FOR %%p in (%platforms%) DO (
    REM create target dir, suppress errors if dir already exists
    mkdir %%~p >nul 2>nul

    FOR %%d in (%disttypes%) DO (
        REM assemble archive name
        SET name=%version%-%%~p-%%~d

        REM extract archive without cmd output
        %sevenzip% x -y !name!.7z >nul

        REM move necessary folders from extracted archive to target folder
        REM (not every archive contains every folder)
        FOR %%d in (bin include lib) DO (
            IF EXIST !name!\%%~d (
                move !name!\%%~d %%~p\%%~d >nul
            )
        )

        REM force delete remainder of extracted folder
        rmdir /S /Q !name!
    )
)

ECHO Finished^^! FFmpeg is setup correctly^^! You can now safely delete the downloaded archive files.

:end
REM wait for key press, to display results also to users calling this script directly (not from a prompt)
pause

Add FFmpeg setup helper script

Add FFmpeg setup helper script


@echo off

<<<<<<< HEAD
java -cp .:./10_bin:./02_lib/ccOutils.jar org.capcaval.ccoutils.lafabrique.LaFabrique %*
=======
java -cp .;../10_bin;./10_bin;./02_lib/ccOutils.jar org.capcaval.ccoutils.lafabrique.LaFabrique %*
>>>>>>> 7ca053b8518e9c6519c8daa469f16447a236a453

@echo off

java -cp .;../10_bin;./10_bin;./02_lib/ccOutils.jar org.capcaval.ccoutils.lafabrique.LaFabrique %*

Update laFab.bat

Update laFab.bat

; change


@echo off

rem The autobuilder is already being traced
set CODEQL_AUTOBUILDER_CSHARP_NO_INDEXING=true

type NUL && "%CODEQL_EXTRACTOR_CSHARP_ROOT%/tools/%CODEQL_PLATFORM%/Semmle.Autobuild.CSharp.exe"
IF %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%

@echo off

rem The autobuilder is already being traced
set CODEQL_AUTOBUILDER_CSHARP_NO_INDEXING=true

type NUL && "%CODEQL_EXTRACTOR_CSHARP_ROOT%/tools/%CODEQL_PLATFORM%/Semmle.Autobuild.CSharp.exe"
exit /b %ERRORLEVEL%

Simplify exit code logic

Simplify exit code logic

Co-authored-by: Arthur Baars <b737fa86ea43b99b3ad72c4cffc9d23953684ab2@github.com>


@ECHO OFF
%~dp0paket.bootstrapper.exe --self --prefer-nuget
%~dp0paket.bootstrapper.exe --prefer-nuget
%~dp0paket.exe %1 %2 %3 %4 %5 %6 %7 %8

@ECHO OFF
%~dp0paket.bootstrapper.exe --self
%~dp0paket.bootstrapper.exe
%~dp0paket.exe %1 %2 %3 %4 %5 %6 %7 %8

Update paket.bat

Update paket.bat


cd /d %~dp0

mkdir OSVR-Unity-Dist
xcopy Managed-OSVR OSVR-Unity-Dist /Y /S

cd /d %~dp0

mkdir OSVR-Unity-Dist
mkdir OSVR-Unity-Dist\OSVR-Unity
xcopy Managed-OSVR OSVR-Unity-Dist\ /Y /S

Tweak build script.

Tweak build script.


@setlocal enabledelayedexpansion

REM Parse Arguments.

set NugetZipUrlRoot=https://dotnetci.blob.core.windows.net/roslyn
set NugetZipUrl=%NuGetZipUrlRoot%/nuget.32.zip
set RoslynRoot=%~dp0
set BuildConfiguration=Debug
set BuildRestore=false

REM Because override the C#/VB toolset to build against our LKG package, it is important
REM that we do not reuse MSBuild nodes from other jobs/builds on the machine. Otherwise,
REM we'll run into issues such as https://github.com/dotnet/roslyn/issues/6211.
set MSBuildAdditionalCommandLineArgs=/nologo /v:m /m /nodeReuse:false

:ParseArguments
if "%1" == "" goto :DoneParsing
if /I "%1" == "/?" call :Usage && exit /b 1
if /I "%1" == "/debug" set BuildConfiguration=Debug&&shift&& goto :ParseArguments
if /I "%1" == "/release" set BuildConfiguration=Release&&shift&& goto :ParseArguments
if /I "%1" == "/test32" set Test64=false&&shift&& goto :ParseArguments
if /I "%1" == "/test64" set Test64=true&&shift&& goto :ParseArguments
if /I "%1" == "/perf" set Perf=true&&shift&& goto :ParseArguments
if /I "%1" == "/restore" set BuildRestore=true&&shift&& goto :ParseArguments
call :Usage && exit /b 1
:DoneParsing

if defined Perf (
  if defined Test64 (
    echo ERROR: Cannot combine /perf with either /test32 or /test64
    call :Usage && exit /b 1
  )

  if "%BuildConfiguration%" == "Debug" (
    echo Warning: Running perf tests on a Debug build is not recommended. Use /release for a Release build.
  )
)

call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" || goto :BuildFailed

REM Restore the NuGet packages
if "%BuildRestore%" == "true" (
    call "%RoslynRoot%\Restore.cmd" || goto :BuildFailed
) else (
    powershell -noprofile -executionPolicy RemoteSigned -command "%RoslynRoot%\build\scripts\restore.ps1 %NugetZipUrl%" || goto :BuildFailed
)

REM Set the build version only so the assembly version is set to the semantic version,
REM which allows analyzers to laod because the compiler has binding redirects to the
REM semantic version
msbuild %MSBuildAdditionalCommandLineArgs% /p:BuildVersion=0.0.0.0 %RoslynRoot%build/Toolset.sln /p:NuGetRestorePackages=false /p:Configuration=%BuildConfiguration% || goto :BuildFailed

if not exist "%RoslynRoot%Binaries\Bootstrap" mkdir "%RoslynRoot%Binaries\Bootstrap" || goto :BuildFailed
move "Binaries\%BuildConfiguration%\*" "%RoslynRoot%Binaries\Bootstrap" || goto :BuildFailed
copy "build\scripts\*" "%RoslynRoot%Binaries\Bootstrap" || goto :BuildFailed

REM Clean the previous build
msbuild %MSBuildAdditionalCommandLineArgs% /t:Clean build/Toolset.sln /p:Configuration=%BuildConfiguration%  || goto :BuildFailed

call :TerminateCompilerServer

if defined Perf (
  set Target=Build
) else (
  set Target=BuildAndTest
)

msbuild %MSBuildAdditionalCommandLineArgs% /p:BootstrapBuildPath=%RoslynRoot%Binaries\Bootstrap BuildAndTest.proj /t:%Target% /p:Configuration=%BuildConfiguration% /p:Test64=%Test64% || goto :BuildFailed

call :TerminateCompilerServer

REM Verify that our project.lock.json files didn't change as a result of
REM restore.  If they do then the commit changed the dependencies without
REM updating the lock files.
REM git diff --exit-code --quiet
REM if ERRORLEVEL 1 (
REM    echo Commit changed dependencies without updating project.lock.json
REM    git diff --exit-code
REM    exit /b 1
REM )

if defined Perf (
  if DEFINED JenkinsCIPerfCredentials (
    powershell .\ciperf.ps1 -BinariesDirectory %RoslynRoot%Binaries\%BuildConfiguration% %JenkinsCIPerfCredentials% || goto :BuildFailed
  ) else (
    powershell .\ciperf.ps1 -BinariesDirectory %RoslynRoot%Binaries\%BuildConfiguration% -StorageAccountName roslynscratch -StorageContainer drops -SCRAMScope 'Roslyn\Azure' || goto :BuildFailed
  )
)

REM Ensure caller sees successful exit.
exit /b 0

:Usage
@echo Usage: cibuild.cmd [/debug^|/release] [/test32^|/test64^|/perf]
@echo   /debug   Perform debug build.  This is the default.
@echo   /release Perform release build.
@echo   /test32  Run unit tests in the 32-bit runner.  This is the default.
@echo   /test64  Run units tests in the 64-bit runner.
@echo   /perf    Submit a job to the performance test system. Usually combined
@echo            with /release. May not be combined with /test32 or /test64.
@echo.
@goto :eof

:BuildFailed
echo Build failed with ERRORLEVEL %ERRORLEVEL%
call :TerminateCompilerServer
exit /b 1

:TerminateCompilerServer
@REM Kill any instances VBCSCompiler.exe to release locked files, ignoring stderr if process is not open
@REM This prevents future CI runs from failing hile trying to delete those files.

taskkill /F /IM vbcscompiler.exe 2> nul

@setlocal enabledelayedexpansion

REM Parse Arguments.

set NugetZipUrlRoot=https://dotnetci.blob.core.windows.net/roslyn
set NugetZipUrl=%NuGetZipUrlRoot%/nuget.32.zip
set RoslynRoot=%~dp0
set BuildConfiguration=Debug
set BuildRestore=false

REM Because override the C#/VB toolset to build against our LKG package, it is important
REM that we do not reuse MSBuild nodes from other jobs/builds on the machine. Otherwise,
REM we'll run into issues such as https://github.com/dotnet/roslyn/issues/6211.
set MSBuildAdditionalCommandLineArgs=/nologo /m /nodeReuse:false /consoleloggerparameters:Verbosity=minimal /filelogger /fileloggerparameters:Verbosity=normal

:ParseArguments
if "%1" == "" goto :DoneParsing
if /I "%1" == "/?" call :Usage && exit /b 1
if /I "%1" == "/debug" set BuildConfiguration=Debug&&shift&& goto :ParseArguments
if /I "%1" == "/release" set BuildConfiguration=Release&&shift&& goto :ParseArguments
if /I "%1" == "/test32" set Test64=false&&shift&& goto :ParseArguments
if /I "%1" == "/test64" set Test64=true&&shift&& goto :ParseArguments
if /I "%1" == "/perf" set Perf=true&&shift&& goto :ParseArguments
if /I "%1" == "/restore" set BuildRestore=true&&shift&& goto :ParseArguments
call :Usage && exit /b 1
:DoneParsing

if defined Perf (
  if defined Test64 (
    echo ERROR: Cannot combine /perf with either /test32 or /test64
    call :Usage && exit /b 1
  )

  if "%BuildConfiguration%" == "Debug" (
    echo Warning: Running perf tests on a Debug build is not recommended. Use /release for a Release build.
  )
)

call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" || goto :BuildFailed

REM Restore the NuGet packages
if "%BuildRestore%" == "true" (
    call "%RoslynRoot%\Restore.cmd" || goto :BuildFailed
) else (
    powershell -noprofile -executionPolicy RemoteSigned -command "%RoslynRoot%\build\scripts\restore.ps1 %NugetZipUrl%" || goto :BuildFailed
)

REM Set the build version only so the assembly version is set to the semantic version,
REM which allows analyzers to laod because the compiler has binding redirects to the
REM semantic version
msbuild %MSBuildAdditionalCommandLineArgs% /p:BuildVersion=0.0.0.0 %RoslynRoot%build/Toolset.sln /p:NuGetRestorePackages=false /p:Configuration=%BuildConfiguration% /fileloggerparameters:LogFile=%RoslynRoot%Binaries\Bootstrap.log || goto :BuildFailed

if not exist "%RoslynRoot%Binaries\Bootstrap" mkdir "%RoslynRoot%Binaries\Bootstrap" || goto :BuildFailed
move "Binaries\%BuildConfiguration%\*" "%RoslynRoot%Binaries\Bootstrap" || goto :BuildFailed
copy "build\scripts\*" "%RoslynRoot%Binaries\Bootstrap" || goto :BuildFailed

REM Clean the previous build
msbuild %MSBuildAdditionalCommandLineArgs% /t:Clean build/Toolset.sln /p:Configuration=%BuildConfiguration%  /fileloggerparameters:LogFile=%RoslynRoot%Binaries\BootstrapClean.log || goto :BuildFailed

call :TerminateCompilerServer

if defined Perf (
  set Target=Build
) else (
  set Target=BuildAndTest
)

msbuild %MSBuildAdditionalCommandLineArgs% /p:BootstrapBuildPath=%RoslynRoot%Binaries\Bootstrap BuildAndTest.proj /t:%Target% /p:Configuration=%BuildConfiguration% /p:Test64=%Test64% /fileloggerparameters:LogFile=%RoslynRoot%Binaries\Build.log || goto :BuildFailed

call :TerminateCompilerServer

REM Verify that our project.lock.json files didn't change as a result of
REM restore.  If they do then the commit changed the dependencies without
REM updating the lock files.
REM git diff --exit-code --quiet
REM if ERRORLEVEL 1 (
REM    echo Commit changed dependencies without updating project.lock.json
REM    git diff --exit-code
REM    exit /b 1
REM )

if defined Perf (
  if DEFINED JenkinsCIPerfCredentials (
    powershell .\ciperf.ps1 -BinariesDirectory %RoslynRoot%Binaries\%BuildConfiguration% %JenkinsCIPerfCredentials% || goto :BuildFailed
  ) else (
    powershell .\ciperf.ps1 -BinariesDirectory %RoslynRoot%Binaries\%BuildConfiguration% -StorageAccountName roslynscratch -StorageContainer drops -SCRAMScope 'Roslyn\Azure' || goto :BuildFailed
  )
)

REM Ensure caller sees successful exit.
exit /b 0

:Usage
@echo Usage: cibuild.cmd [/debug^|/release] [/test32^|/test64^|/perf]
@echo   /debug   Perform debug build.  This is the default.
@echo   /release Perform release build.
@echo   /test32  Run unit tests in the 32-bit runner.  This is the default.
@echo   /test64  Run units tests in the 64-bit runner.
@echo   /perf    Submit a job to the performance test system. Usually combined
@echo            with /release. May not be combined with /test32 or /test64.
@echo.
@goto :eof

:BuildFailed
echo Build failed with ERRORLEVEL %ERRORLEVEL%
call :TerminateCompilerServer
exit /b 1

:TerminateCompilerServer
@REM Kill any instances VBCSCompiler.exe to release locked files, ignoring stderr if process is not open
@REM This prevents future CI runs from failing hile trying to delete those files.

taskkill /F /IM vbcscompiler.exe 2> nul

Add an MSBuild log to output on Windows

Add an MSBuild log to output on Windows

This helps with build failure diagnostics. I've verified that this
added nearly-zero impact on build time.


@set __e=%1
@if "%1" == "" set __e=off
@echo %__e%
rem builder_custom_init

set VC_VER=14.0
set BUILDER_CFG_PLATFORM=Win64
set BUILDER_CFG_BUILD_TYPE=Release
set PYTHON_VERSION=3.6
set PYTHON_FILE_VERSION=36

rem if Win64 then setup path to include the 64bit CL.exe
rem when called in place this can fork bomb (lots of CMD.exe in task manager)
call "C:\Program Files (x86)\Microsoft Visual Studio %VC_VER%\VC\bin\amd64\vcvars64.bat"
@echo %__e%

set PYTHON=c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%\python
PATH c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%;%PATH%
%PYTHON% -c "import sys;print( 'Python:', sys.version )"

@set __e=%1
@if "%1" == "" set __e=off
@echo %__e%
rem builder_custom_init

set VC_VER=14.0
set BUILDER_CFG_PLATFORM=Win64
set BUILDER_CFG_BUILD_TYPE=Release
set PYTHON_VERSION=3.6
set PYTHON_FILE_VERSION=36

rem if Win64 then setup path to include the 64bit CL.exe
rem when called in place this can fork bomb (lots of CMD.exe in task manager)
if exist "C:\Program Files (x86)\Microsoft Visual Studio %VC_VER%\VC\bin\amd64\vcvars64.bat" (
    call "C:\Program Files (x86)\Microsoft Visual Studio %VC_VER%\VC\bin\amd64\vcvars64.bat"
)
if exist "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" (
    call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
)
@echo %__e%

set PYTHON=c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%\python
PATH c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%;"c:\Program Files\gettext-iconv\bin";%PATH%
%PYTHON% -c "import sys;print( 'Python:', sys.version )"

Test for install location of the Visual Studio files


:: Build Windows 8
setlocal
call tools\set_version.bat 0x0620
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win8 Release|Win32"
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

setlocal
call tools\set_version.bat 0x0620
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win8 Release|x64"
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

rem setlocal
rem call tools\set_version.bat 0x0620
rem call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win8 Debug|Win32"
rem endlocal
rem if %ERRORLEVEL% NEQ 0 goto :eof

rem setlocal
rem call tools\set_version.bat 0x0620
rem call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win8 Debug|x64"
rem endlocal
rem if %ERRORLEVEL% NEQ 0 goto :eof

:: Build Windows 7
setlocal
call tools\set_version.bat 0x0610
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win7 Release|Win32"
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

setlocal
call tools\set_version.bat 0x0610
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win7 Release|x64"
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

rem setlocal
rem call tools\set_version.bat 0x0610
rem call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win7 Debug|Win32"
rem endlocal
rem if %ERRORLEVEL% NEQ 0 goto :eof

rem setlocal
rem call tools\set_version.bat 0x0610
rem call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win7 Debug|x64"
rem endlocal
rem if %ERRORLEVEL% NEQ 0 goto :eof

:: Build Windows Vista
setlocal
call tools\set_version.bat 0x0600
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Vista Release|Win32"
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

setlocal
call tools\set_version.bat 0x0600
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Vista Release|x64"
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

:: XP
pushd NDIS5
call buildall.bat XP
popd
if %ERRORLEVEL% NEQ 0 goto :eof
xcopy /S /I /Y NDIS5\Install\XP\x86 Install\XP\x86

:: XP64
pushd NDIS5
call buildall.bat XP64
popd
if %ERRORLEVEL% NEQ 0 goto :eof
xcopy /S /I /Y NDIS5\Install\XP\amd64 Install\XP\amd64

call create_dvl_log.cmd

:: Build Windows 8
setlocal
call tools\set_version.bat 0x0620
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win8 Release|Win32" /Out buildfre_win8_x86.log
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

setlocal
call tools\set_version.bat 0x0620
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win8 Release|x64" /Out buildfre_win8_amd64.log
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

rem setlocal
rem call tools\set_version.bat 0x0620
rem call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win8 Debug|Win32"
rem endlocal
rem if %ERRORLEVEL% NEQ 0 goto :eof

rem setlocal
rem call tools\set_version.bat 0x0620
rem call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win8 Debug|x64"
rem endlocal
rem if %ERRORLEVEL% NEQ 0 goto :eof

:: Build Windows 7
setlocal
call tools\set_version.bat 0x0610
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win7 Release|Win32" /Out buildfre_win7_x86.log
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

setlocal
call tools\set_version.bat 0x0610
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win7 Release|x64" /Out buildfre_win7_amd64.log
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

rem setlocal
rem call tools\set_version.bat 0x0610
rem call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win7 Debug|Win32"
rem endlocal
rem if %ERRORLEVEL% NEQ 0 goto :eof

rem setlocal
rem call tools\set_version.bat 0x0610
rem call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Win7 Debug|x64"
rem endlocal
rem if %ERRORLEVEL% NEQ 0 goto :eof

:: Build Windows Vista
setlocal
call tools\set_version.bat 0x0600
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Vista Release|Win32" /Out buildfre_wlh_x86.log
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

setlocal
call tools\set_version.bat 0x0600
call ..\tools\callVisualStudio.bat 12 netkvm.sln /Rebuild "Vista Release|x64" /Out buildfre_wlh_amd64.log
endlocal
if %ERRORLEVEL% NEQ 0 goto :eof

:: XP
pushd NDIS5
call buildall.bat XP
popd
if %ERRORLEVEL% NEQ 0 goto :eof
xcopy /S /I /Y NDIS5\Install\XP\x86 Install\XP\x86

:: XP64
pushd NDIS5
call buildall.bat XP64
popd
if %ERRORLEVEL% NEQ 0 goto :eof
xcopy /S /I /Y NDIS5\Install\XP\amd64 Install\XP\amd64

call create_dvl_log.cmd

add log files

add log files


powershell -Command "(New-Object Net.WebClient).DownloadFile('https://www.python.org/ftp/python/2.7.13/python-2.7.13.amd64.msi', 'python-2.7.msi')"
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi', 'VCForPython27.msi')"
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://chromedriver.storage.googleapis.com/2.32/chromedriver_win32.zip', 'chromedriver_win32.zip')"
powershell -Command "(New-Object Net.WebClient).DownloadFile('http://stahlworks.com/dev/unzip.exe', 'unzip.exe')"
python-2.7.msi
VCForPython27.msi
unzip chromedriver_win32.zip
del VCForPython27.msi
del chromedriver_win32.zip
del unzip.exe
del python-2.7.msi
C:\Python27\Scripts\easy_install.exe pip
C:\Python27\Scripts\pip.exe install -q -r requirements.txt
C:\Python27\Scripts\pip.exe install python-dateutil --upgrade

powershell -Command "(New-Object Net.WebClient).DownloadFile('https://www.python.org/ftp/python/2.7.13/python-2.7.13.amd64.msi', 'python-2.7.msi')"
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi', 'VCForPython27.msi')"
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://chromedriver.storage.googleapis.com/2.38/chromedriver_win32.zip', 'chromedriver_win32.zip')"
powershell -Command "(New-Object Net.WebClient).DownloadFile('http://stahlworks.com/dev/unzip.exe', 'unzip.exe')"
python-2.7.msi
VCForPython27.msi
unzip chromedriver_win32.zip
del VCForPython27.msi
del chromedriver_win32.zip
del unzip.exe
del python-2.7.msi
C:\Python27\Scripts\easy_install.exe pip
C:\Python27\Scripts\pip.exe install -q -r requirements.txt
C:\Python27\Scripts\pip.exe install python-dateutil --upgrade

Update chromedriver.

Update chromedriver.


:Required Software
	:: Microsoft.NET v2.0						http://www.filehippo.com/download_dotnet_framework_2/
	:: Microsoft.NET v3.5						http://www.filehippo.com/download_dotnet_framework_3/
	:: TortoiseSVN (+command line tools)		http://www.filehippo.com/download_tortoisesvn/
	:: 7zip 32bit								http://www.filehippo.com/download_7zip_32/
	:: 7zip 64bit								http://www.filehippo.com/download_7-zip_64/
	:: SharpDevelop v4x							http://www.icsharpcode.net/OpenSource/SD/Download/#SharpDevelop4x

:Optional Software
	:: php										http://windows.php.net/download/

:DownloadLink
	:: GoogleCode: https://code.google.com/p/sar-tool/downloads/list
	:: SourceForge: http://sourceforge.net/projects/sartool/files/
	:: GitHub: https://github.com/kboronka/sar-tool/trunk

:BuildEnvironment
	@echo off
	pushd "%~dp0"
	set SOLUTION=sar.sln
	set REPO=https://github.com/kboronka/sar-tool
	set CONFIG=Release
	set BASEPATH=%~dp0

:Paths
	set SAR="release\sar.exe"
	set ZIP="%PROGRAMFILES%\7-Zip\7zG.exe" a -tzip

	%SAR% -bower
	%SAR% file.removedirectory ".\libs\sar-controls" /q

:BuildEnvironment
	@echo off
	pushd "%~dp0"

:Paths
	set uSAR="release\sar.exe"
	set ZIP="%PROGRAMFILES%\7-Zip\7zG.exe" a -tzip

	%uSAR% -bower
	%uSAR% file.removedirectory ".\libs\sar-controls" /q

use "uSAR" environment variable

use "uSAR" environment variable


@ECHO OFF
SETLOCAL
SET PathTo7Zip=
SET OutputFile="%~n1.exe"
SET SourceFiles="%TEMP%MakeEXE_files.txt"
SET Config="%TEMP%MakeEXE_config.txt"
SET Source7ZFile="%Temp%MakeEXE.7z"
IF EXIST %OutputFile% DEL %OutputFile%
ECHO "%~dpnx1" > %SourceFiles%
:AddInclude
IF {%2}=={} GOTO EndInclude
ECHO "%~dpnx2" >> %SourceFiles%
SHIFT /2
GOTO AddInclude
:EndInclude
"%PathTo7Zip%7za.exe" a %Source7ZFile% @%SourceFiles%
ECHO ;!@Install@!UTF-8! > %Config%
ECHO RunProgram="%~nx1" >> %Config%
ECHO ;!@InstallEnd@! >> %Config%
COPY /B "%PathTo7Zip%7zsd.sfx" + %Config% + %Source7ZFile% %OutputFile%
IF EXIST %SourceFiles% DEL %SourceFiles%
IF EXIST %Config% DEL %Config%
IF EXIST %Source7ZFile% DEL %Source7ZFile%
ENDLOCAL

@ECHO OFF
SETLOCAL
SET PathTo7Zip=
SET OutputFile="%~n1.exe"
SET SourceFiles="%TEMP%EXE_files.txt"
SET Config="%TEMP%EXE_config.txt"
SET Source7ZFile="%Temp%EXE.7z"
IF EXIST %OutputFile% DEL %OutputFile%
ECHO "%~dpnx1" > %SourceFiles%
:AddInclude
IF {%2}=={} GOTO EndInclude
ECHO "%~dpnx2" >> %SourceFiles%
SHIFT /2
GOTO AddInclude
:EndInclude
"%PathTo7Zip%7za.exe" a %Source7ZFile% @%SourceFiles%
ECHO ;!@Install@!UTF-8! > %Config%
ECHO RunProgram="%~nx1" >> %Config%
ECHO ;!@InstallEnd@! >> %Config%
COPY /B "%PathTo7Zip%7zsd.sfx" + %Config% + %Source7ZFile% %OutputFile%
IF EXIST %SourceFiles% DEL %SourceFiles%
IF EXIST %Config% DEL %Config%
IF EXIST %Source7ZFile% DEL %Source7ZFile%
ENDLOCAL

Update Bat2Exe.bat

Update Bat2Exe.bat


@echo off
call ..\src\Samples\Adaptive.Aeron.Samples.Ping\bin\x64\Release\Adaptive.Aeron.Samples.Ping.exe ^
	-Daeron.sample.messages=100000 ^
	-Daeron.sample.messageLength=32

@echo off
call ..\src\Samples\Adaptive.Aeron.Samples.Ping\bin\x64\Release\Adaptive.Aeron.Samples.Ping.exe ^
	-Daeron.sample.messages=1000000 ^
	-Daeron.sample.messageLength=32

Increase number of messages for ping scripts. (5881753)


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

@echo off
if "%OS%" == "Windows_NT" setlocal

pushd "%~dp0"
call cassandra.in.bat

if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
if NOT DEFINED JAVA_HOME goto :err

set CASSANDRA_PARAMS=%CASSANDRA_PARAMS% -Dcassandra.logdir="%CASSANDRA_HOME%\logs"
set CASSANDRA_PARAMS=%CASSANDRA_PARAMS% -Dcassandra.storagedir="%CASSANDRA_HOME%\data"

echo Starting NodeTool
"%JAVA_HOME%\bin\java" -cp %CASSANDRA_CLASSPATH% %CASSANDRA_PARAMS% -Dlogback.configurationFile=logback-tools.xml org.apache.cassandra.tools.NodeTool %*
goto finally

:err
echo The JAVA_HOME environment variable must be set to run this program!
pause

:finally
ENDLOCAL & set RC=%ERRORLEVEL%
exit /B %RC%

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

@echo off
if "%OS%" == "Windows_NT" setlocal

pushd "%~dp0"
call cassandra.in.bat

if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
if NOT DEFINED JAVA_HOME goto :err

set CASSANDRA_PARAMS=%CASSANDRA_PARAMS% -Dcassandra.logdir="%CASSANDRA_HOME%\logs"
set CASSANDRA_PARAMS=%CASSANDRA_PARAMS% -Dcassandra.storagedir="%CASSANDRA_HOME%\data"

"%JAVA_HOME%\bin\java" -cp %CASSANDRA_CLASSPATH% %CASSANDRA_PARAMS% -Dlogback.configurationFile=logback-tools.xml org.apache.cassandra.tools.NodeTool %*
goto finally

:err
echo The JAVA_HOME environment variable must be set to run this program!
pause

:finally
ENDLOCAL & set RC=%ERRORLEVEL%
exit /B %RC%

ninja: remove extra print output from nodetool.bat


mkdir pubdocs
cd pubdocs

git clone https://%1%:%2%@github.com/SkillsFundingAgency/das-paymentsacceptancetesting.git --branch gh-pages

xcopy ..\das-payments-AcceptanceTests\AcceptanceTests\docs das-paymentsacceptancetesting /E /R /Y

cd das-paymentsacceptancetesting
git add --all
git commit -m "Update docs for release %RELEASE_RELEASENAME%"
git push origin gh-pages

mkdir pubdocs
cd pubdocs

git clone https://%1:%2@github.com/SkillsFundingAgency/das-paymentsacceptancetesting.git --branch gh-pages

xcopy ..\das-payments-AcceptanceTests\AcceptanceTests\docs das-paymentsacceptancetesting /E /R /Y

cd das-paymentsacceptancetesting
git add --all
git commit -m "Update docs for release %RELEASE_RELEASENAME%"
git push origin gh-pages

Update publishdocs.bat

Update publishdocs.bat


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

@echo off
set autoRestVersion=0.16.0-Nightly20160310
if  "%1" == "" (
    set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/2015-06-15/swagger/compositeComputeClient.json"
) else (
    set specFile="%1"
)
set repoRoot=%~dp0..\..\..\..
set generateFolder=%~dp0Generated

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

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

@echo off
set autoRestVersion=0.16.0-Nightly20160310
if  "%1" == "" (
    set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/compositeComputeClient.json"
) else (
    set specFile="%1"
)
set repoRoot=%~dp0..\..\..\..
set generateFolder=%~dp0Generated

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

Fix generate.cmd to get the correct json file from Github


@echo off
cmd /C "powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/WheatonCS/Lexos/master/install/windows/update.ps1'))""

@echo off
cmd /C "cd C:\ && powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/WheatonCS/Lexos/master/install/windows/update.ps1'))""

fix the error... I am being stupid, this cannot delete itself


@echo off
setlocal
cd %~dp0

rem By default on Windows we build Hadrian using Stack
./build.stack.bat %*

@echo off

rem By default on Windows we build Hadrian using Cabal
hadrian/build.cabal.bat %*

Hadrian: Use the Cabal build script on Windows by default

The Stack build script `build.stack.bat` currently fails on Windows
when invoked with the `--configure` flag, see:

https://ghc.haskell.org/trac/ghc/ticket/15982

The Cabal build script `build.cabal.bat` works reliably on my Windows
machine, so I am proposing to switch to it by default, that is, to run
it from the default `build.bat` script.

The Stack build script can still be run directly if need be.


@echo off
:: Batch arguments:
:: %~1: Project/Solution to build
:: %~2: Target(Normally should be Debug or Release)
:: %~3: Platform(Normally should be "Any CPU" for sln and AnyCPU for a csproj)
:: if none are passed, defaults to building Sharpmake.sln in Debug|AnyCPU

setlocal enabledelayedexpansion
: set batch file directory as current
pushd "%~dp0"

set VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if not exist %VSWHERE% (
    echo ERROR: Cannot determine the location of the vswhere command Common Tools folder.
    goto error
)

set VSMSBUILDCMD=
for /f "usebackq delims=" %%i in (`%VSWHERE% -latest -property installationPath`) do (
  if exist "%%i\Common7\Tools\VsMSBuildCmd.bat" (
    set VSMSBUILDCMD="%%i\Common7\Tools\VsMSBuildCmd.bat"
  )
)

if not defined VSMSBUILDCMD (
    echo ERROR: Cannot determine the location of Common Tools folder.
    goto error
)
echo MSBuild batch path: !VSMSBUILDCMD!
call !VSMSBUILDCMD!
if %errorlevel% NEQ 0 goto end

if "%~1" == "" (
    call :BuildSharpmake "Sharpmake.sln" "Debug" "Any CPU"
) else (
    call :BuildSharpmake %1 %2 %3
)
goto end

:: Build Sharpmake using specified arguments
:BuildSharpmake
echo Compiling %~1 in "%~2|%~3"...

set MSBUILD_CMD=msbuild -t:build -restore "%~1" /nologo /verbosity:quiet /p:Configuration="%~2" /p:Platform="%~3"
echo %MSBUILD_CMD%
%MSBUILD_CMD%
if %errorlevel% NEQ 0 (
    echo ERROR: Failed to compile %~1 in "%~2|%~3".
    exit /b 1
)
exit /b 0

:: End of batch file
:end
popd

@echo off
:: Batch arguments:
:: %~1: Project/Solution to build
:: %~2: Target(Normally should be Debug or Release)
:: %~3: Platform(Normally should be "Any CPU" for sln and AnyCPU for a csproj)
:: if none are passed, defaults to building Sharpmake.sln in Debug|AnyCPU

setlocal enabledelayedexpansion
: set batch file directory as current
pushd "%~dp0"

set VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if not exist %VSWHERE% (
    echo ERROR: Cannot determine the location of the vswhere command Common Tools folder.
    goto error
)

set VSMSBUILDCMD=
for /f "usebackq delims=" %%i in (`%VSWHERE% -latest -property installationPath`) do (
  if exist "%%i\Common7\Tools\VsMSBuildCmd.bat" (
    set VSMSBUILDCMD="%%i\Common7\Tools\VsMSBuildCmd.bat"
  )
)

if not defined VSMSBUILDCMD (
    echo ERROR: Cannot determine the location of Common Tools folder.
    goto error
)
echo MSBuild batch path: !VSMSBUILDCMD!
call !VSMSBUILDCMD!
if %errorlevel% NEQ 0 goto end

if "%~1" == "" (
    call :BuildSharpmake "Sharpmake.sln" "Debug" "Any CPU"
) else (
    call :BuildSharpmake %1 %2 %3
)
goto end

:: Build Sharpmake using specified arguments
:BuildSharpmake
echo Compiling %~1 in "%~2|%~3"...

set MSBUILD_CMD=msbuild -t:build -restore "%~1" /nologo /verbosity:quiet /p:Configuration="%~2" /p:Platform="%~3" /p:RestoreConfigFile="nuget.config"
echo %MSBUILD_CMD%
%MSBUILD_CMD%
if %errorlevel% NEQ 0 (
    echo ERROR: Failed to compile %~1 in "%~2|%~3".
    exit /b 1
)
exit /b 0

:: End of batch file
:end
popd

Fix nuget restore when compiling sharpmake

MSBuild from cmd line doesn't automatically look up the nuget.config, it needs to be passed explicitly...


Create apigen4-netbeans-connector.bat

Create apigen4-netbeans-connector.bat


@echo off
setlocal ENABLEDELAYEDEXPANSION

call build_plugin.bat || goto ERROR_HANDLER

call setup_environment.bat

:: Notice that variables TEMP_BUILD_DIR and CLIENT_SRC_RELEASE_DIR are set in build_plugin.bat script.

:CREATE_ARCHIVE
    echo Creating archive...
    set /p PROJECT_VERSION= < %PROJECT_VERSION_FILE% || set PROJECT_VERSION=unknown_version
    set FULLPATH_ZIP=%TEMP_BUILD_DIR%\aimp_control_plugin_!PROJECT_VERSION!.7z

    :: add htdocs
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\%CLIENT_SRC_RELEASE_DIR% || goto ERROR_HANDLER
    :: add plugin DLL
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\%TEMP_BUILD_DIR%\aimp_control_plugin.dll || goto ERROR_HANDLER
    :: add default settings.dat
    copy /Y .\inno_setup_data\default_settings.dat .\%TEMP_BUILD_DIR%\settings.dat || goto ERROR_HANDLER
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\%TEMP_BUILD_DIR%\settings.dat || goto ERROR_HANDLER
    :: add Readme.dat
    copy /Y .\HowToSetupPluginFrom7zPackage.txt .\%TEMP_BUILD_DIR%\Readme.txt || goto ERROR_HANDLER
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\%TEMP_BUILD_DIR%\Readme.txt || goto ERROR_HANDLER
    :: add FreeImage DLLs
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\3rd_party\FreeImage\%FreeImage_VERSION%\Dist\FreeImage.dll || goto ERROR_HANDLER
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\3rd_party\FreeImage\%FreeImage_VERSION%\Wrapper\FreeImagePlus\dist\FreeImagePlus.dll || goto ERROR_HANDLER

echo Archive created.
exit /B

:ERROR_HANDLER
    set ORIGINAL_ERROR_LEVEL=%ERRORLEVEL%
    echo Archive creation failed. Error code %ORIGINAL_ERROR_LEVEL%
    exit /B %ORIGINAL_ERROR_LEVEL%

@echo off
setlocal ENABLEDELAYEDEXPANSION

call build_plugin.bat || goto ERROR_HANDLER

call setup_environment.bat

:: Notice that variables TEMP_BUILD_DIR and CLIENT_SRC_RELEASE_DIR are set in build_plugin.bat script.

:CREATE_ARCHIVE
    echo Creating archive...
    set /p PROJECT_VERSION= < %PROJECT_VERSION_FILE% || set PROJECT_VERSION=unknown_version
    set FULLPATH_ZIP=%TEMP_BUILD_DIR%\aimp_control_plugin_!PROJECT_VERSION!.7z

    :: add htdocs
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\%CLIENT_SRC_RELEASE_DIR% || goto ERROR_HANDLER
    :: add plugin DLL
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\%TEMP_BUILD_DIR%\aimp_control_plugin.dll || goto ERROR_HANDLER
    :: add default settings.dat
    copy /Y .\inno_setup_data\default_settings.dat .\%TEMP_BUILD_DIR%\settings.dat || goto ERROR_HANDLER
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\%TEMP_BUILD_DIR%\settings.dat || goto ERROR_HANDLER
    :: add Readme.dat
    copy /Y .\HowToSetupPluginFrom7zPackage.txt .\%TEMP_BUILD_DIR%\Readme.txt || goto ERROR_HANDLER
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\%TEMP_BUILD_DIR%\Readme.txt || goto ERROR_HANDLER
    :: add FreeImage DLLs
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\3rd_party\FreeImage\%FreeImage_VERSION%\Dist\FreeImage.dll || goto ERROR_HANDLER
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\3rd_party\FreeImage\%FreeImage_VERSION%\Wrapper\FreeImagePlus\dist\FreeImagePlus.dll || goto ERROR_HANDLER
    :: add Settings Manager
    tools\7z a -t7z !FULLPATH_ZIP! ^
             .\%TEMP_BUILD_DIR%\SettingsManager || goto ERROR_HANDLER

echo Archive created.
exit /B

:ERROR_HANDLER
    set ORIGINAL_ERROR_LEVEL=%ERRORLEVEL%
    echo Archive creation failed. Error code %ORIGINAL_ERROR_LEVEL%
    exit /B %ORIGINAL_ERROR_LEVEL%

add SettingsManager to 7z distrib package.


call a:\resetvars.bat

cinst git
cinst GoogleChrome
cinst Firefox
cinst javaruntime
cinst PyWin32
cinst pip

call a:\resetvars.bat
choco install python -Version 2.7.6
call a:\resetvars.bat
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "((new-object net.webclient).DownloadString('https://bootstrap.pypa.io/get-pip.py'))" > get-pip.py
python get-pip.py
setx PATH "%PATH%;C:\Python27\Scripts;"
call a:\resetvars.bat
cinst PyWin32

call a:\resetvars.bat
cinst git

call a:\resetvars.bat
cinst javaruntime

call a:\resetvars.bat
cinst GoogleChrome
call a:\resetvars.bat
cinst Firefox

fix install pip on win

fix install pip on win


@echo off
echo *** %~n0 ...
echo *** %SrcDir%
echo.
call %~dp0\_init.bat %1 %2 %3

SET MergeName=FotoMapa-2019
::SET MergeParams=-vrtnodata 0

echo VRT...
gdalbuildvrt %MergeParams% %MergeName%.vrt *%SrcExt%

:: -te xmin ymin xmax ymax
SET ExtWybrz=-te 410000 765000 465000 777000
SET ExtZatoka=-te 455000 743000 500000 777000
SET ExtTrm=-te 455000 710000 503000 750000
SET ExtZw=-te 490000 695000 555000 735000

echo.
echo Merge Wybrzeze...
gdalwarp -wm 1024 -multi %ExtWybrz%  %TiffOpts% %MergeName%.vrt %MergeName%-wybrz%SrcExt%

echo.
echo Merge Zatoka...
gdalwarp -wm 1024 -multi %ExtZatoka% %TiffOpts% %MergeName%.vrt %MergeName%-zatoka%SrcExt%

echo.
echo Merge Trojmiasto...
gdalwarp -wm 1024 -multi %ExtTrm%    %TiffOpts% %MergeName%.vrt %MergeName%-trm%SrcExt%

echo.
echo Merge Zalew wislany...
gdalwarp -wm 1024 -multi %ExtZw%     %TiffOpts% %MergeName%.vrt %MergeName%-zw%SrcExt%

echo.

echo.
echo Pyramid Wybrzeze...
call %~dp0\raster-pyramid.bat %MergeName%-wybrz%SrcExt%

echo.
echo Pyramid Zatoka...
call %~dp0\raster-pyramid.bat %MergeName%-zatoka%SrcExt%

echo.
echo Pyramid Trojmiasto...
call %~dp0\raster-pyramid.bat %MergeName%-trm%SrcExt%

echo.
echo Pyramid Zalew wislany...
call %~dp0\raster-pyramid.bat %MergeName%-zw%SrcExt%

echo.
echo %~n0 finished.
timeout 30

@echo off
echo *** %~n0 ...
echo *** %SrcDir%
echo.
call %~dp0\_init.bat %1 %2 %3

SET MergeName=FotoMapa-2019
::SET MergeParams=-vrtnodata 0

echo VRT...
gdalbuildvrt %MergeParams% %MergeName%.vrt *%SrcExt%

:: -te xmin ymin xmax ymax
SET ExtWybrz=-te 410000 765000 465000 777000
SET ExtZatoka=-te 455000 743000 500000 777000
SET ExtTrm=-te 455000 710000 503000 750000
SET ExtZw=-te 490000 695000 555000 735000

echo.
echo Merge Wybrzeze...
gdalwarp -wm 1024 -multi %ExtWybrz%  %TiffOpts% %MergeName%.vrt %MergeName%-wybrz%SrcExt%

echo.
echo Merge Zatoka...
gdalwarp -wm 1024 -multi %ExtZatoka% %TiffOpts% %MergeName%.vrt %MergeName%-zatoka%SrcExt%

echo.
echo Merge Trojmiasto...
gdalwarp -wm 1024 -multi %ExtTrm%    %TiffOpts% %MergeName%.vrt %MergeName%-trm%SrcExt%

echo.
echo Merge Zalew wislany...
gdalwarp -wm 1024 -multi %ExtZw%     %TiffOpts% %MergeName%.vrt %MergeName%-zw%SrcExt%

echo.
echo.

call %~dp0\raster-pyramid.bat %MergeName%-wybrz%SrcExt%
call %~dp0\raster-pyramid.bat %MergeName%-zatoka%SrcExt%
call %~dp0\raster-pyramid.bat %MergeName%-trm%SrcExt%
call %~dp0\raster-pyramid.bat %MergeName%-zw%SrcExt%

echo.
echo %~n0 finished.
timeout 30

Update output messages.

Update output messages.


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

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

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

@REM Execute a user defined script before this one
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"

@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" @setlocal

set ERROR_CODE=0

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

echo.
echo ERROR: JAVA_HOME not found in your environment.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation
echo.
set ERROR_CODE=1
goto end

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

echo.
echo ERROR: JAVA_HOME is set to an invalid directory.
echo JAVA_HOME = %JAVA_HOME%
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation
echo.
set ERROR_CODE=1
goto end

:chkMHome
if not "%M2_HOME%"=="" goto valMHome

if "%OS%"=="Windows_NT" SET M2_HOME=%~dps0\..
if not "%M2_HOME%"=="" goto valMHome

echo.
echo ERROR: M2_HOME not found in your environment.
echo Please set the M2_HOME variable in your environment to match the
echo location of the Maven installation
echo.
set ERROR_CODE=1
goto end

:valMHome
if exist "%M2_HOME%\bin\m2.bat" goto init

echo.
echo ERROR: M2_HOME is set to an invalid directory.
echo M2_HOME = %M2_HOME%
echo Please set the M2_HOME variable in your environment to match the
echo location of the Maven installation
echo.
set ERROR_CODE=1
goto end
@REM ==== END VALIDATION ====

:init
@REM Decide how to startup depending on the version of windows

@REM -- Win98ME
if NOT "%OS%"=="Windows_NT" goto Win9xArg

@REM -- 4NT shell
if "%eval[2+2]" == "4" goto 4NTArgs

@REM -- Regular WinNT shell
set MAVEN_CMD_LINE_ARGS=%*
goto endInit

@REM The 4NT Shell from jp software
:4NTArgs
set MAVEN_CMD_LINE_ARGS=%$
goto endInit

:Win9xArg
@REM Slurp the command line arguments.  This loop allows for an unlimited number
@REM of agruments (up to the command line limit, anyway).
set MAVEN_CMD_LINE_ARGS=
:Win9xApp
if %1a==a goto endInit
set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
shift
goto Win9xApp

@REM Reaching here means variables are defined and arguments have been captured
:endInit
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"

@REM Start MAVEN2
for %%i in ("%M2_HOME%"\core\boot\classworlds-*) do set CLASSWORLDS_JAR="%%i"
%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%
goto end

:error
if "%OS%"=="Windows_NT" @endlocal
set ERROR_CODE=1

:end
@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" goto endNT

@REM For old DOS remove the set variables from ENV - we assume they were not set
@REM before we started - at least we don't leave any baggage around
set MAVEN_JAVA_EXE=
set MAVEN_CMD_LINE_ARGS=
goto postExec

:endNT
@endlocal

:postExec
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause

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

exit /B %ERROR_CODE%

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

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

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

@REM Execute a user defined script before this one
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"

@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" @setlocal

set ERROR_CODE=0

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

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

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

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

:chkMHome
if not "%M2_HOME%"=="" goto valMHome

if "%OS%"=="Windows_NT" SET M2_HOME=%~dps0\..
if not "%M2_HOME%"=="" goto valMHome

echo.
echo ERROR: M2_HOME not found in your environment.
echo Please set the M2_HOME variable in your environment to match the
echo location of the Maven installation
echo.
goto error

:valMHome
if exist "%M2_HOME%\bin\m2.bat" goto init

echo.
echo ERROR: M2_HOME is set to an invalid directory.
echo M2_HOME = %M2_HOME%
echo Please set the M2_HOME variable in your environment to match the
echo location of the Maven installation
echo.
goto error
@REM ==== END VALIDATION ====

:init
@REM Decide how to startup depending on the version of windows

@REM -- Win98ME
if NOT "%OS%"=="Windows_NT" goto Win9xArg

@REM -- 4NT shell
if "%eval[2+2]" == "4" goto 4NTArgs

@REM -- Regular WinNT shell
set MAVEN_CMD_LINE_ARGS=%*
goto endInit

@REM The 4NT Shell from jp software
:4NTArgs
set MAVEN_CMD_LINE_ARGS=%$
goto endInit

:Win9xArg
@REM Slurp the command line arguments.  This loop allows for an unlimited number
@REM of agruments (up to the command line limit, anyway).
set MAVEN_CMD_LINE_ARGS=
:Win9xApp
if %1a==a goto endInit
set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
shift
goto Win9xApp

@REM Reaching here means variables are defined and arguments have been captured
:endInit
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"

@REM Start MAVEN2
for %%i in ("%M2_HOME%"\core\boot\classworlds-*) do set CLASSWORLDS_JAR="%%i"
%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%
if ERRORLEVEL 1 goto error
goto end

:error
if "%OS%"=="Windows_NT" @endlocal
set ERROR_CODE=1

:end
@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" goto endNT

@REM For old DOS remove the set variables from ENV - we assume they were not set
@REM before we started - at least we don't leave any baggage around
set MAVEN_JAVA_EXE=
set MAVEN_CMD_LINE_ARGS=
goto postExec

:endNT
@endlocal

:postExec
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause

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

exit /B %ERROR_CODE%

Fix exit code

Fix exit code

git-svn-id: 2c527eb49caa05e19d6b2be874bf74fa9d7ea670@358565 13f79535-47bb-0310-9956-ffa450edef68


:: Start with bootstrap
cd .\tools\build
ECHO .\bootstrap.bat
CALL .\bootstrap.bat
IF errorlevel 1 exit 1
ECHO .\bootstrap.bat gcc
CALL .\bootstrap.bat gcc
IF errorlevel 1 exit 1
ECHO .\b2.exe install toolset=gcc --prefix=%LIBRARY_PREFIX%
CALL .\b2.exe install toolset=gcc --prefix=%LIBRARY_PREFIX%
IF errorlevel 1 exit 1

:: Start with bootstrap
cd .\tools\build
ECHO .\bootstrap.bat
CALL .\bootstrap.bat
IF errorlevel 1 exit 1
ECHO .\bootstrap.bat gcc
CALL .\bootstrap.bat gcc
:: IF errorlevel 1 exit 1
ECHO .\b2.exe install toolset=gcc --prefix=%LIBRARY_PREFIX%
CALL .\b2.exe install toolset=gcc --prefix=%LIBRARY_PREFIX%
IF errorlevel 1 exit 1

Update bld.bat

Update bld.bat


@echo off

setlocal enabledelayedexpansion
setlocal enableextensions

SET params='%*'

:loop
FOR /F "usebackq tokens=1* delims= " %%A IN (!params!) DO (
    SET current=%%A
    SET params='%%B'
	SET silent=N

	IF "!current!" == "-s" (
		SET silent=Y
	)
	IF "!current!" == "--silent" (
		SET silent=Y
	)

	IF "!silent!" == "Y" (
		SET nopauseonerror=Y
	) ELSE (
	    IF "x!newparams!" NEQ "x" (
	        SET newparams=!newparams! !current!
        ) ELSE (
            SET newparams=!current!
        )
	)

    IF "x!params!" NEQ "x" (
		GOTO loop
	)
)

CALL "%~dp0elasticsearch-env.bat" || exit /b 1
IF ERRORLEVEL 1 (
	IF NOT DEFINED nopauseonerror (
		PAUSE
	)
	EXIT /B %ERRORLEVEL%
)

set "ES_JVM_OPTIONS=%ES_PATH_CONF%\jvm.options"
@setlocal
for /F "usebackq delims=" %%a in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.JvmOptionsParser" "!ES_JVM_OPTIONS!" || echo jvm_options_parser_failed"`) do set JVM_OPTIONS=%%a
@endlocal & set "MAYBE_JVM_OPTIONS_PARSER_FAILED=%JVM_OPTIONS%" & set ES_JAVA_OPTS=%JVM_OPTIONS:${ES_TMPDIR}=!ES_TMPDIR!% %ES_JAVA_OPTS%

if "%MAYBE_JVM_OPTIONS_PARSER_FAILED%" == "jvm_options_parser_failed" (
  exit /b 1
)

cd "%ES_HOME%"
%JAVA% %ES_JAVA_OPTS% -Delasticsearch -Des.path.home="%ES_HOME%" -Des.path.conf="%ES_PATH_CONF%" -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch" !newparams!

endlocal
endlocal

@echo off

setlocal enabledelayedexpansion
setlocal enableextensions

SET params='%*'

:loop
FOR /F "usebackq tokens=1* delims= " %%A IN (!params!) DO (
    SET current=%%A
    SET params='%%B'
	SET silent=N

	IF "!current!" == "-s" (
		SET silent=Y
	)
	IF "!current!" == "--silent" (
		SET silent=Y
	)

	IF "!silent!" == "Y" (
		SET nopauseonerror=Y
	) ELSE (
	    IF "x!newparams!" NEQ "x" (
	        SET newparams=!newparams! !current!
        ) ELSE (
            SET newparams=!current!
        )
	)

    IF "x!params!" NEQ "x" (
		GOTO loop
	)
)

CALL "%~dp0elasticsearch-env.bat" || exit /b 1
IF ERRORLEVEL 1 (
	IF NOT DEFINED nopauseonerror (
		PAUSE
	)
	EXIT /B %ERRORLEVEL%
)

set "ES_JVM_OPTIONS=%ES_PATH_CONF%\jvm.options"
@setlocal
for /F "usebackq delims=" %%a in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.JvmOptionsParser" "!ES_JVM_OPTIONS!" || echo jvm_options_parser_failed"`) do set JVM_OPTIONS=%%a
@endlocal & set "MAYBE_JVM_OPTIONS_PARSER_FAILED=%JVM_OPTIONS%" & set ES_JAVA_OPTS=%JVM_OPTIONS:${ES_TMPDIR}=!ES_TMPDIR!% %ES_JAVA_OPTS%

if "%MAYBE_JVM_OPTIONS_PARSER_FAILED%" == "jvm_options_parser_failed" (
  exit /b 1
)

cd /d "%ES_HOME%"
%JAVA% %ES_JAVA_OPTS% -Delasticsearch -Des.path.home="%ES_HOME%" -Des.path.conf="%ES_PATH_CONF%" -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch" !newparams!

endlocal
endlocal

Fix starting on Windows from another drive (#29086)

The cd command on Windows has an oddity regarding changing
directories. If the drive of the current directory is a different drive
than than of the directory that was passed to the cd command, cd acts in
query mode and does not change the current directory. Instead, a flag is
needed to put the cd command into set mode so that the directory
actually changes. This causes a problem when starting Elasticsearch from
a directory different than the one where it is installed and this commit
fixes the issue.


@rem Common file shared between external.bat and external-amd64.bat.  Responsible for
@rem fetching external components into the root\.. buildbot directories.

cd ..
@rem XXX: If you need to force the buildbots to start from a fresh environment, uncomment
@rem the following, check it in, then check it out, comment it out, then check it back in.
@rem if exist bzip2-1.0.5 rd /s/q bzip2-1.0.5
@rem if exist tcltk rd /s/q tcltk
@rem if exist tcltk64 rd /s/q tcltk64
@rem if exist tcl8.4.12 rd /s/q tcl8.4.12
@rem if exist tcl8.4.16 rd /s/q tcl8.4.16
@rem if exist tcl-8.4.18.1 rd /s/q tcl-8.4.18.1
@rem if exist tk8.4.12 rd /s/q tk8.4.12
@rem if exist tk8.4.16 rd /s/q tk8.4.16
@rem if exist tk-8.4.18.1 rd /s/q tk-8.4.18.1
@rem if exist db-4.4.20 rd /s/q db-4.4.20
@rem if exist openssl-1.0.0a rd /s/q openssl-1.0.0a
@rem if exist sqlite-3.6.21 rd /s/q sqlite-3.6.21

@rem bzip
if not exist bzip2-1.0.5 (
   rd /s/q bzip2-1.0.3
  svn export http://svn.python.org/projects/external/bzip2-1.0.5
)

@rem Sleepycat db
if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20-vs9 db-4.4.20

@rem OpenSSL
if not exist openssl-1.0.0a svn export http://svn.python.org/projects/external/openssl-1.0.0a

@rem tcl/tk
if not exist tcl-8.5.2.1 (
   rd /s/q tcltk tcltk64
   svn export http://svn.python.org/projects/external/tcl-8.5.2.1
)
if not exist tk-8.5.2.0 svn export http://svn.python.org/projects/external/tk-8.5.2.0

@rem sqlite3
if not exist sqlite-3.6.21 (
  rd /s/q sqlite-source-3.3.4
  svn export http://svn.python.org/projects/external/sqlite-3.6.21
)

@rem Common file shared between external.bat and external-amd64.bat.  Responsible for
@rem fetching external components into the root\.. buildbot directories.

cd ..
@rem XXX: If you need to force the buildbots to start from a fresh environment, uncomment
@rem the following, check it in, then check it out, comment it out, then check it back in.
@rem if exist bzip2-1.0.5 rd /s/q bzip2-1.0.5
@rem if exist tcltk rd /s/q tcltk
@rem if exist tcltk64 rd /s/q tcltk64
@rem if exist tcl8.4.12 rd /s/q tcl8.4.12
@rem if exist tcl8.4.16 rd /s/q tcl8.4.16
@rem if exist tcl-8.4.18.1 rd /s/q tcl-8.4.18.1
@rem if exist tk8.4.12 rd /s/q tk8.4.12
@rem if exist tk8.4.16 rd /s/q tk8.4.16
@rem if exist tk-8.4.18.1 rd /s/q tk-8.4.18.1
@rem if exist db-4.4.20 rd /s/q db-4.4.20
rem if exist openssl-0.9.8l rd /s/q openssl-0.9.8l
rem if exist openssl-1.0.0a rd /s/q openssl-1.0.0a
@rem if exist sqlite-3.6.21 rd /s/q sqlite-3.6.21

@rem bzip
if not exist bzip2-1.0.5 (
   rd /s/q bzip2-1.0.3
  svn export http://svn.python.org/projects/external/bzip2-1.0.5
)

@rem Sleepycat db
if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20-vs9 db-4.4.20

@rem OpenSSL
if not exist openssl-1.0.0a svn export http://svn.python.org/projects/external/openssl-1.0.0a

@rem tcl/tk
if not exist tcl-8.5.2.1 (
   rd /s/q tcltk tcltk64
   svn export http://svn.python.org/projects/external/tcl-8.5.2.1
)
if not exist tk-8.5.2.0 svn export http://svn.python.org/projects/external/tk-8.5.2.0

@rem sqlite3
if not exist sqlite-3.6.21 (
  rd /s/q sqlite-source-3.3.4
  svn export http://svn.python.org/projects/external/sqlite-3.6.21
)

Delete openssl checkouts.

Delete openssl checkouts.


ECHO OFF

reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32&&set OS2=x86||set OS=64&& set OS2=x64
for /f "tokens=2" %%I in ('git.exe branch 2^> NUL ^| findstr /b "* "') do set GITBRANCH=%%I

ECHO.
ECHO ----------------------------------------
ECHO download core
ECHO ----------------------------------------

mkdir "%~dp0\FileConverter\bin"
mkdir "%~dp0\FileConverter\bin\HtmlFileInternal"

powershell -executionpolicy remotesigned -file update-core.ps1 "http://repo-doc-onlyoffice-com.s3.amazonaws.com/windows/core/origin/%GITBRANCH%/latest/%OS2%/core.zip" "%~dp0FileConverter\bin\core.zip" "%~dp0FileConverter\bin\core"

cd /D "%~dp0\FileConverter\bin" || goto ERROR
copy "core\Common\3dParty\v8\win_%OS%\release\icudt.dll" "."
copy "core\Common\3dParty\icu\win_%OS%\build\icudt55.dll" "."
copy "core\Common\3dParty\icu\win_%OS%\build\icuuc55.dll" "."
copy "core\build\lib\win_%OS%\doctrenderer.dll" "."
copy "core\build\lib\win_%OS%\HtmlRenderer.dll" "."
copy "core\build\lib\win_%OS%\DjVuFile.dll" "."
copy "core\build\lib\win_%OS%\XpsFile.dll" "."
copy "core\build\lib\win_%OS%\PdfReader.dll" "."
copy "core\build\lib\win_%OS%\PdfWriter.dll" "."
copy "core\build\lib\win_%OS%\HtmlFile.dll" "."
copy "core\build\lib\win_%OS%\UnicodeConverter.dll" "."
copy "core\build\lib\win_%OS%\HtmlFileInternal.exe" ".\HtmlFileInternal"
xcopy /s/h/e/k/c/y/q "core\Common\3dParty\cef\win_%OS%\build" ".\HtmlFileInternal"
copy "core\build\bin\win_%OS%\x2t.exe" "."

if exist "%~dp0\..\fonts" rmdir /S /Q "%~dp0\..\fonts"
mkdir "%~dp0\..\fonts"
"core\build\bin\AllFontsGen\win_%OS%.exe" --input="%~dp0\..\onlyoffice-fonts" --allfonts-web="%~dp0\..\sdkjs\common\AllFonts.js" --allfonts="%~dp0\FileConverter\bin\AllFonts.js" --images="%~dp0\..\sdkjs\common\Images" --selection="%~dp0\FileConverter\bin\font_selection.bin" --output-web="%~dp0\..\fonts" --use-system="true"

:ERROR

ECHO OFF

reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32&&set OS2=x86||set OS=64&& set OS2=x64
for /f "tokens=2" %%I in ('git.exe branch 2^> NUL ^| findstr /b "* "') do set GITBRANCH=%%I

ECHO.
ECHO ----------------------------------------
ECHO download core
ECHO ----------------------------------------

mkdir "%~dp0\FileConverter\bin"
mkdir "%~dp0\FileConverter\bin\HtmlFileInternal"

powershell -executionpolicy remotesigned -file update-core.ps1 "http://repo-doc-onlyoffice-com.s3.amazonaws.com/windows/core/origin/%GITBRANCH%/latest/%OS2%/core.zip" "%~dp0FileConverter\bin\core.zip" "%~dp0FileConverter\bin\core"

cd /D "%~dp0\FileConverter\bin" || goto ERROR
copy "core\Common\3dParty\v8\win_%OS%\release\icudt.dll" "."
copy "core\Common\3dParty\icu\win_%OS%\build\icudt55.dll" "."
copy "core\Common\3dParty\icu\win_%OS%\build\icuuc55.dll" "."
copy "core\build\lib\win_%OS%\doctrenderer.dll" "."
copy "core\build\lib\win_%OS%\HtmlRenderer.dll" "."
copy "core\build\lib\win_%OS%\DjVuFile.dll" "."
copy "core\build\lib\win_%OS%\XpsFile.dll" "."
copy "core\build\lib\win_%OS%\PdfReader.dll" "."
copy "core\build\lib\win_%OS%\PdfWriter.dll" "."
copy "core\build\lib\win_%OS%\HtmlFile.dll" "."
copy "core\build\lib\win_%OS%\UnicodeConverter.dll" "."
copy "core\build\lib\win_%OS%\HtmlFileInternal.exe" ".\HtmlFileInternal"
xcopy /s/h/e/k/c/y/q "core\Common\3dParty\cef\win_%OS%\build" ".\HtmlFileInternal"
copy "core\build\bin\win_%OS%\x2t.exe" "."

if exist "%~dp0\..\fonts" rmdir /S /Q "%~dp0\..\fonts"
mkdir "%~dp0\..\fonts"
"core\build\bin\AllFontsGen\win_%OS%.exe" --input="%~dp0\..\core-fonts" --allfonts-web="%~dp0\..\sdkjs\common\AllFonts.js" --allfonts="%~dp0\FileConverter\bin\AllFonts.js" --images="%~dp0\..\sdkjs\common\Images" --selection="%~dp0\FileConverter\bin\font_selection.bin" --output-web="%~dp0\..\fonts" --use-system="true"

:ERROR

Add using core-fonts

[fonts] Add using core-fonts


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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

IF NOT DEFINED MSBUILD_PATH (
  SET MSBUILD_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
)

IF NOT DEFINED POST_DEPLOYMENT_SOURCE (
  SET POST_DEPLOYMENT_SOURCE=.\Scripts\PostDeploymentActions
)

IF NOT DEFINED POST_DEPLOYMENT_TARGET (
  SET POST_DEPLOYMENT_TARGET=..\deployments\tools\PostDeploymentActions
  SET CLEAN_POST_DEPLOYMENT_TARGET=true
)

IF DEFINED CLEAN_POST_DEPLOYMENT_TARGET (
  pushd "%DEPLOYMENT_SOURCE%"
  IF EXIST "%POST_DEPLOYMENT_TARGET%" rd /s /q "%POST_DEPLOYMENT_TARGET%"
  mkdir "%POST_DEPLOYMENT_TARGET%"
  popd
)

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

echo Handling .NET Web Application deployment.

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

:: 2. Install npm packages, bower, grunt, and bower packages
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  pushd "%DEPLOYMENT_SOURCE%\Resume"

  echo Installing npm packages...
  call :ExecuteCmd npm install
  IF !ERRORLEVEL! NEQ 0 goto error

  echo Running npm dedupe...
  call :ExecuteCmd npm dedupe
  IF !ERRORLEVEL! NEQ 0 goto error

  echo Installing grunt-cli...
  call :ExecuteCmd npm install grunt-cli -g
  IF !ERRORLEVEL! NEQ 0 goto error

  echo Installing bower...
  call :ExecuteCmd npm install bower -g
  IF !ERRORLEVEL! NEQ 0 goto error

  echo Running bower-install grunt task...
  call :ExecuteCmd grunt bower-install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

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

IF !ERRORLEVEL! NEQ 0 goto error

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

:: 5. Copy the post deployment scripts
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  pushd "%DEPLOYMENT_SOURCE%"
  echo Copy the post deployment scripts...
  call :ExecuteCmd xcopy /I "%POST_DEPLOYMENT_SOURCE%" "%POST_DEPLOYMENT_TARGET%"
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

IF NOT DEFINED MSBUILD_PATH (
  SET MSBUILD_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
)

IF NOT DEFINED POST_DEPLOYMENT_SOURCE (
  SET POST_DEPLOYMENT_SOURCE=.\Scripts\PostDeploymentActions
)

IF NOT DEFINED POST_DEPLOYMENT_TARGET (
  SET POST_DEPLOYMENT_TARGET=..\deployments\tools\PostDeploymentActions
  SET CLEAN_POST_DEPLOYMENT_TARGET=true
)

IF DEFINED CLEAN_POST_DEPLOYMENT_TARGET (
  pushd "%DEPLOYMENT_SOURCE%"
  IF EXIST "%POST_DEPLOYMENT_TARGET%" rd /s /q "%POST_DEPLOYMENT_TARGET%"
  mkdir "%POST_DEPLOYMENT_TARGET%"
  popd
)

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

echo Handling .NET Web Application deployment.

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

:: 2. Install npm packages, bower, grunt, and bower packages
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  pushd "%DEPLOYMENT_SOURCE%\Resume"

  echo Installing npm packages...
  call :ExecuteCmd npm install
  IF !ERRORLEVEL! NEQ 0 goto error

  echo Running npm dedupe...
  call :ExecuteCmd npm dedupe
  IF !ERRORLEVEL! NEQ 0 goto error

  echo Installing grunt-cli...
  call :ExecuteCmd npm install grunt-cli -g
  IF !ERRORLEVEL! NEQ 0 goto error

  echo Installing bower...
  call :ExecuteCmd npm install bower -g
  IF !ERRORLEVEL! NEQ 0 goto error

  echo Running bower-install grunt task...
  call :ExecuteCmd grunt bower-install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

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

IF !ERRORLEVEL! NEQ 0 goto error

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

:: 5. Copy the post deployment scripts
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  pushd "%DEPLOYMENT_SOURCE%"
  echo Copy the post deployment scripts...
  call :ExecuteCmd xcopy /I "%POST_DEPLOYMENT_SOURCE%" "%POST_DEPLOYMENT_TARGET%"
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

add post deployment stub to deploy script


application.bat - 2015 - Boishardy ###
version = "1.2"

application.bat - 2015 - Boishardy ###
version = "1.2.0-b"

update minor alternative version

update minor alternative version


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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

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

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

goto :EOF

:error
exit /b 1

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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

@rem npm path is not currently set in our image, we should fix this next time
@rem we upgrade Node.js in the image:
SET PATH=%PATH%;/cygdrive/c/Program Files/nodejs/npm

call nvm use v12.14.1
call which node

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

goto :EOF

:error
exit /b 1

build: update windows configuration to match new vm