@echo off

set MY_TOOLS_DIR=%~dp0
cd %MY_TOOLS_DIR%..
set MY_INSTALL_DIR=%cd%
echo "MY_INSTALL_DIR=%MY_INSTALL_DIR%"

:: this is set in wrapper script
::set EXIT_ON_ERROR=0
IF %EXIT_ON_ERROR%.==. ( set EXIT_ON_ERROR=1)
IF %VERBOSE%.==. ( set VERBOSE=1)

:: if "/q" is given, hide the error dialogs (hence make the script non-interactive)
if /i not -%1-==-/q- (
  goto :skip_hide_error
)
echo Hide error dialogs
call :getDontShowUI
if %DONTSHOWUI_VALUE% equ 0 call :setDontShowUI 1
:skip_hide_error
:: Get current PID
type NUL > pid.log
wmic PROCESS where "Name='WMIC.exe'" get ParentProcessId >pid.log 2>&1
for /F "TOKENS=1" %%b in ('type pid.log ^| findstr [0-9]') do set CURRENT_PID=%%b

:: setup the otbenv
call otbenv.bat

:: -----------------------------------------------------------------------------------
REM Check 1 : check binaries
for /R %%i in (*.dll) do (
  call :check_binary %%i
)
for %%i in (bin\mapla.exe,bin\monteverdi.exe,bin\otbApplicationLauncherCommandLine.exe,bin\otbApplicationLauncherQt.exe) do (
  call :check_binary %%i
)
call :check_binary lib\python\_otbApplication.pyd

:: -----------------------------------------------------------------------------------
rem Check 2 : check applications and Python wrapping
set /a app_count=0
for /R %%i in (lib\otb\applications\otbapp_*.dll) do (
  call :check_application %%i
)
if %app_count% leq 90 (
  echo WARNING: only %app_count% applications found ! Expected at least 90
)
call :check_python_wrapping

:: -----------------------------------------------------------------------------------
rem Check 3 : check monteverdi & mapla
call :check_desktop_app monteverdi
call :check_desktop_app mapla 20

if /i not -%1-==-/q- (
  goto :skip_restore_error
)
if %DONTSHOWUI_VALUE% equ 0 call :setDontShowUI 0
:skip_restore_error
setlocal
del pid.log
del tmp.log
endlocal
goto :eof

::########################[ FUNCTIONS ]##################################
:check_binary
setlocal
if %VERBOSE% equ  1 ( echo ":check_binary %1" )
type NUL > tmp.log
tools\otb_loader.exe %1 > tmp.log 2>&1
call :nb_tmp_lines
if %nb_tmp_lines_out% gtr 0 (
  echo "ERROR: otb_loader.exe %1"
  type tmp.log
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
)
endlocal
goto :eof
::-----------------------------------------------------------------------
:check_application
setlocal
set dll_path=%~n1
set app=%dll_path:~7%
if %VERBOSE% equ  1 ( echo ":check_application %app%" )
if not exist bin\otbcli_%app%.bat (
  echo ERROR : missing cli launcher for application %app%
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
  goto :check_gui
)
type NUL > tmp.log
cmd /C bin\otbcli_%app%.bat "-help" ^> tmp.log ^2^>^&^1
call :parse_cli_output
if %parse_cli_result% equ 0 (
  echo ERROR : error launching application otbcli_%app%
  type results.txt
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
  )

:check_gui
if not exist bin\otbgui_%app%.bat (
  echo ERROR : missing gui launcher for application %app%
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
  goto :check_application_end
)
if %app_count% geq 2 goto :check_application_end
type NUL > tmp.log
start "otbgui application" /b bin\otbgui_%app%.bat ^> tmp.log ^2^>^&^1
timeout 5 >nul
call :get_child_pid %CURRENT_PID% cmd.exe
set first_child=0
if %child_pid% gtr 1 (
  set first_child=%child_pid%
) else (
  echo ERROR : could not launch otbgui_%app%
  type tmp.log
  goto :check_application_clean
)
call :get_child_pid %first_child% otbApplicationLauncherQt.exe
if not %child_pid% gtr 1 (
  echo ERROR : could not launch otbApplicationLauncherQt %app%
  type tmp.log
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
)

:check_application_clean
if not %first_child% == 0 (
  taskkill /PID %first_child% /F /T > NUL 2>&1
)

:check_application_end
endlocal & set /a app_count=app_count+1
goto :eof
::-----------------------------------------------------------------------
:check_desktop_app
setlocal
set appName=%1
set delay=5
if not -%2-==-- set delay=%2
type NUL > tmp.log
start "Desktop app" /b bin\%appName%.exe > tmp.log 2>&1
timeout %delay% >nul
call :get_child_pid %CURRENT_PID% %appName%.exe
if %child_pid% gtr 1 (
  taskkill /PID %child_pid% /F /T > NUL 2>&1
) else (
  echo ERROR : could not launch %appName%.exe
  type tmp.log
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
)
endlocal
goto :eof
::-----------------------------------------------------------------------
:check_python_wrapping
setlocal
type NUL > tmp.log
python -c "import otbApplication" > tmp.log 2>&1
call :nb_tmp_lines
if %nb_tmp_lines_out% gtr 0 (
  echo ERROR : failed to run python wrapping
  type tmp.log
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
)
endlocal
goto :eof
::-----------------------------------------------------------------------
:parse_cli_output
setlocal
set /a ret=1
findstr /n /r /c:"^This is the *.*(%app%) application, version " tmp.log  > results.txt
if %errorlevel%==1 (
  set /a ret=0
  echo "findstr failed 1st regex in parse_cli_output"
  goto :parse_cli_output_end
)
findstr /n /r /c:"^Parameters: " tmp.log  > results.txt
if %errorlevel%==1 (
  set /a ret=0
  echo "findstr failed 2nd regex in parse_cli_output"
  goto :parse_cli_output_end
)
findstr /n /r /c:"^Examples: " tmp.log  > results.txt
if %errorlevel%==1 (
  set /a ret=0
    echo "findstr failed 3rd regex in parse_cli_output"
  goto :parse_cli_output_end
)
findstr /n /r /c:"FATAL" tmp.log  > results.txt
if %errorlevel%==0 (
  set /a ret=0
    echo "findstr passed 4th regex in parse_cli_output"
  goto :parse_cli_output_end
)

:parse_cli_output_end
endlocal & set /a parse_cli_result=%ret%
goto :eof
::-----------------------------------------------------------------------

:nb_tmp_lines
setlocal
for /F "delims=" %%i in ('find /C /V "" ^< tmp.log') do set output=%%i
endlocal & set nb_tmp_lines_out=%output%
goto :eof
::-----------------------------------------------------------------------
:get_child_pid
setlocal
set parent_pid=%1
set process_name=%2
set output=0
type NUL > pid.log
wmic PROCESS where (ParentProcessId=%parent_pid% AND Name="%process_name%") get ProcessId >pid.log 2>&1
for /F "TOKENS=1" %%a in ('type pid.log ^| findstr [0-9]') do set output=%%a
endlocal & set child_pid=%output%
goto :eof
::-----------------------------------------------------------------------
:getDontShowUI
setlocal
set output=0
for /F "TOKENS=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v DontShowUI ^| findstr DontShowUI') do set output=%%a
endlocal & set DONTSHOWUI_VALUE=%output:~2%
goto :eof
::-----------------------------------------------------------------------
:setDontShowUI
setlocal
reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v DontShowUI /t REG_DWORD /d %1 /f
endlocal
goto :eof

@echo off

set MY_TOOLS_DIR=%~dp0
cd %MY_TOOLS_DIR%..
set MY_INSTALL_DIR=%cd%
echo "MY_INSTALL_DIR=%MY_INSTALL_DIR%"

:: this is set in wrapper script
::set EXIT_ON_ERROR=0
IF %EXIT_ON_ERROR%.==. ( set EXIT_ON_ERROR=1)
IF %VERBOSE%.==. ( set VERBOSE=1)

:: if "/q" is given, hide the error dialogs (hence make the script non-interactive)
if /i not -%1-==-/q- (
  goto :skip_hide_error
)
echo Hide error dialogs
call :getDontShowUI
if %DONTSHOWUI_VALUE% equ 0 call :setDontShowUI 1
:skip_hide_error
:: Get current PID
type NUL > pid.log
wmic PROCESS where "Name='WMIC.exe'" get ParentProcessId >pid.log 2>&1
for /F "TOKENS=1" %%b in ('type pid.log ^| findstr [0-9]') do set CURRENT_PID=%%b

:: setup the otbenv
call otbenv.bat

:: -----------------------------------------------------------------------------------
REM Check 1 : check binaries
for /R %%i in (*.dll) do (
  call :check_binary %%i
)
for %%i in (bin\mapla.exe,bin\monteverdi.exe,bin\otbApplicationLauncherCommandLine.exe,bin\otbApplicationLauncherQt.exe) do (
  call :check_binary %%i
)
call :check_binary lib\python\_otbApplication.pyd

:: -----------------------------------------------------------------------------------
rem Check 2 : check applications and Python wrapping
set /a app_count=0
for /R %%i in (lib\otb\applications\otbapp_*.dll) do (
  call :check_application %%i
)
if %app_count% leq 90 (
  echo WARNING: only %app_count% applications found ! Expected at least 90
)
call :check_python_wrapping

:: -----------------------------------------------------------------------------------
rem Check 3 : check monteverdi & mapla
call :check_desktop_app monteverdi
call :check_desktop_app mapla 20

if /i not -%1-==-/q- (
  goto :skip_restore_error
)
if %DONTSHOWUI_VALUE% equ 0 call :setDontShowUI 0
:skip_restore_error
setlocal
del pid.log
del tmp.log
endlocal
goto :eof

::########################[ FUNCTIONS ]##################################
:check_binary
setlocal
if %VERBOSE% gtr 1 ( echo ":check_binary %1" )
type NUL > tmp.log
tools\otb_loader.exe %1 > tmp.log 2>&1
call :nb_tmp_lines
if %nb_tmp_lines_out% gtr 0 (
  echo "ERROR: otb_loader.exe %1"
  type tmp.log
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
)
endlocal
goto :eof
::-----------------------------------------------------------------------
:check_application
setlocal
set dll_path=%~n1
set app=%dll_path:~7%
if %VERBOSE% equ 1 ( echo ":check_application %app%" )
if not exist bin\otbcli_%app%.bat (
  echo ERROR : missing cli launcher for application %app%
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
  goto :check_gui
)
type NUL > tmp.log
cmd /C bin\otbcli_%app%.bat "-help" ^> tmp.log ^2^>^&^1
call :parse_cli_output
if %parse_cli_result% equ 0 (
  echo ERROR : error launching application otbcli_%app%
  type results.txt
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
  )

:check_gui
if not exist bin\otbgui_%app%.bat (
  echo ERROR : missing gui launcher for application %app%
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
  goto :check_application_end
)
if %app_count% geq 2 goto :check_application_end
type NUL > tmp.log
start "otbgui application" /b bin\otbgui_%app%.bat ^> tmp.log ^2^>^&^1
timeout 5 >nul
call :get_child_pid %CURRENT_PID% cmd.exe
set first_child=0
if %child_pid% gtr 1 (
  set first_child=%child_pid%
) else (
  echo ERROR : could not launch otbgui_%app%
  type tmp.log
  goto :check_application_clean
)
call :get_child_pid %first_child% otbApplicationLauncherQt.exe
if not %child_pid% gtr 1 (
  echo ERROR : could not launch otbApplicationLauncherQt %app%
  type tmp.log
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
)

:check_application_clean
if not %first_child% == 0 (
  taskkill /PID %first_child% /F /T > NUL 2>&1
)

:check_application_end
endlocal & set /a app_count=app_count+1
goto :eof
::-----------------------------------------------------------------------
:check_desktop_app
setlocal
set appName=%1
set delay=5
if not -%2-==-- set delay=%2
type NUL > tmp.log
start "Desktop app" /b bin\%appName%.exe > tmp.log 2>&1
timeout %delay% >nul
call :get_child_pid %CURRENT_PID% %appName%.exe
if %child_pid% gtr 1 (
  taskkill /PID %child_pid% /F /T > NUL 2>&1
) else (
  echo ERROR : could not launch %appName%.exe
  type tmp.log
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
)
endlocal
goto :eof
::-----------------------------------------------------------------------
:check_python_wrapping
setlocal
type NUL > tmp.log
python -c "import otbApplication" > tmp.log 2>&1
call :nb_tmp_lines
if %nb_tmp_lines_out% gtr 0 (
  echo ERROR : failed to run python wrapping
  type tmp.log
  if %EXIT_ON_ERROR% equ 1 ( exit 1 )
)
endlocal
goto :eof
::-----------------------------------------------------------------------
:parse_cli_output
setlocal
set /a ret=1
findstr /n /r /c:"^This is the *.*(%app%) application, version " tmp.log  > results.txt
if %errorlevel%==1 (
  set /a ret=0
  echo "findstr failed 1st regex in parse_cli_output"
  goto :parse_cli_output_end
)
findstr /n /r /c:"^Parameters: " tmp.log  > results.txt
if %errorlevel%==1 (
  set /a ret=0
  echo "findstr failed 2nd regex in parse_cli_output"
  goto :parse_cli_output_end
)
findstr /n /r /c:"^Examples: " tmp.log  > results.txt
if %errorlevel%==1 (
  set /a ret=0
    echo "findstr failed 3rd regex in parse_cli_output"
  goto :parse_cli_output_end
)
findstr /n /r /c:"FATAL" tmp.log  > results.txt
if %errorlevel%==0 (
  set /a ret=0
    echo "findstr passed 4th regex in parse_cli_output"
  goto :parse_cli_output_end
)

:parse_cli_output_end
endlocal & set /a parse_cli_result=%ret%
goto :eof
::-----------------------------------------------------------------------

:nb_tmp_lines
setlocal
for /F "delims=" %%i in ('find /C /V "" ^< tmp.log') do set output=%%i
endlocal & set nb_tmp_lines_out=%output%
goto :eof
::-----------------------------------------------------------------------
:get_child_pid
setlocal
set parent_pid=%1
set process_name=%2
set output=0
type NUL > pid.log
wmic PROCESS where (ParentProcessId=%parent_pid% AND Name="%process_name%") get ProcessId >pid.log 2>&1
for /F "TOKENS=1" %%a in ('type pid.log ^| findstr [0-9]') do set output=%%a
endlocal & set child_pid=%output%
goto :eof
::-----------------------------------------------------------------------
:getDontShowUI
setlocal
set output=0
for /F "TOKENS=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v DontShowUI ^| findstr DontShowUI') do set output=%%a
endlocal & set DONTSHOWUI_VALUE=%output:~2%
goto :eof
::-----------------------------------------------------------------------
:setDontShowUI
setlocal
reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v DontShowUI /t REG_DWORD /d %1 /f
endlocal
goto :eof

configure verbose level

TEST: configure verbose level


echo Available processor count: %NUMBER_OF_PROCESSORS%
echo Starting build # %BUILD_NUMBER%
cd bitshares_toolkit
rem git reset --hard
rem git pull
rem reset and pull not needed because we assume
rem that bitshares_toolkit was just cloned fresh
git submodule init || exit /b 21
git submodule update || exit /b 22

cd %WORKSPACE%
cd bitshares_toolkit/vendor
if exist leveldb-win (
    pushd leveldb-win
    git reset --hard || exit /b 23
    git pull || exit /b 24
) else (
    git clone https://www.github.com/InvictusInnovations/leveldb-win.git || exit /b 25
)

cd %WORKSPACE%
call bitshares_toolkit/setenv.bat || exit /b 26

call npm install grunt
call npm install lineman -g --prefix=%NPM_INSTALL_PREFIX%
call npm install lineman-angular
call npm install lineman-less

if exist build (
  rmdir /Q /S build || exit /b 27
)
mkdir build
cd build
cmake -DINCLUDE_QT_WALLET=TRUE -G "Visual Studio 12" ../bitshares_toolkit || exit /b 28
msbuild.exe /M:%NUMBER_OF_PROCESSORS% /p:Configuration=RelWithDebinfo /p:Platform=Win32 /target:rebuild /v:diag BitShares.sln || exit /b 30

echo Available processor count: %NUMBER_OF_PROCESSORS%
echo Starting build # %BUILD_NUMBER%
cd bitshares_play
rem git reset --hard
rem git pull
rem reset and pull not needed because we assume
rem that bitshares_toolkit was just cloned fresh
git submodule init || exit /b 21
git submodule update || exit /b 22

cd %WORKSPACE%
cd bitshares_play/vendor
if exist leveldb-win (
    pushd leveldb-win
    git reset --hard || exit /b 23
    git pull || exit /b 24
) else (
    git clone https://www.github.com/InvictusInnovations/leveldb-win.git || exit /b 25
)

cd %WORKSPACE%
call bitshares_play/setenv.bat || exit /b 26

call npm install grunt
call npm install lineman -g --prefix=%NPM_INSTALL_PREFIX%
call npm install lineman-angular
call npm install lineman-less

if exist build (
  rmdir /Q /S build || exit /b 27
)
mkdir build
cd build
cmake -DINCLUDE_QT_WALLET=TRUE -G "Visual Studio 12" ../bitshares_play || exit /b 28
msbuild.exe /M:%NUMBER_OF_PROCESSORS% /p:Configuration=RelWithDebinfo /p:Platform=Win32 /target:rebuild /v:diag BitShares.sln || exit /b 30

Update jenkins_build32.bat

Update jenkins_build32.bat


rem	Simple Batch file to update Ring and RingQt in the Android-Qt Version
rem	Author : Mahmoud Fayed <msfclipper@yahoo.com>

copy ..\..\..\..\src\*.c ..\project\
copy ring_ext.c ..\project\
copy ..\..\..\..\include\*.h ..\project\
copy ring_ext.h ..\project\
cd ..\..\..\ringqt\
call gencodeandroid.bat
copy cpp\src\*.cpp ..\android\ringqt\project\
copy cpp\include\*.h ..\android\ringqt\project\
call gencodeqt512_nobluetooth.bat
cd ..\android\ringqt\update_ring

rem	Simple Batch file to update Ring and RingQt in the Android-Qt Version
rem	Author : Mahmoud Fayed <msfclipper@yahoo.com>

copy ..\..\..\..\src\*.c ..\project\ring\src\
copy ring_ext.c ..\project\ring\src\
copy ..\..\..\..\include\*.h ..\project\ring\include\
copy ring_ext.h ..\project\ring\include\
cd ..\..\..\ringqt\
call gencodeandroid.bat
copy cpp\src\*.cpp ..\android\ringqt\project\ringqt\src\
copy cpp\include\*.h ..\android\ringqt\project\ringqt\include\
call gencodeqt512_nobluetooth.bat
cd ..\android\ringqt\update_ring

Update Ring For Android - extensions/android/ringqt/update_ring/update.bat


rem Generate the zip Release package.
rem For information on how to setup your environment.
rem see https://github.com/neuoy/KSPTrajectories/tree/master/misc/VisualStudio/Readme.md

@echo off

rem get parameters that are passed by visual studio post build event
SET TargetName=%1
SET Dllversion=%2

rem make sure the initial working directory is the one containing the current script
SET scriptPath=%~dp0
SET rootPath=%scriptPath%..\..\..\..\
SET initialWD=%CD%

rem current module manager version in misc\3rdParty\
SET MODMANAGER_VERSION=2.7.5

echo Generating %TargetName% Release Package...
cd "%rootPath%"

IF EXIST package\ rd /s /q package
mkdir package
cd package

mkdir GameData
cd GameData
xcopy /y ..\..\3rdParty\ModuleManager.%MODMANAGER_VERSION%.dll .
xcopy /y ..\..\3rdParty\ModuleManager-License.txt .

mkdir %TargetName%
cd %TargetName%
xcopy /y ..\..\..\License.txt .
xcopy /y ..\..\..\%TargetName%.cfg .
xcopy /y ..\..\..\%TargetName%.version .
xcopy /y ..\..\..\README.md .

mkdir Plugin
xcopy /y %initialWD%\%TargetName%.dll Plugin

mkdir Textures
xcopy /y ..\..\..\Textures\icon.png Textures
xcopy /y ..\..\..\Textures\icon-blizzy1.png Textures

echo.
echo Compressing %TargetName% Release Package...
IF EXIST "%rootPath%%TargetName%*.zip" del "%rootPath%%TargetName%*.zip"
"%scriptPath%7za.exe" a "..\..\..\%TargetName%%Dllversion%.zip" ..\..\GameData

cd "%rootPath%"
rd /s /q package

cd "%initialWD%"

rem Generate the zip Release package.
rem For information on how to setup your environment.
rem see https://github.com/neuoy/KSPTrajectories/tree/master/misc/VisualStudio/Readme.md

@echo off

rem get parameters that are passed by visual studio post build event
SET TargetName=%1
SET Dllversion=%2

rem make sure the initial working directory is the one containing the current script
SET scriptPath=%~dp0
SET rootPath=%scriptPath%..\..\..\..\
SET initialWD=%CD%

rem current module manager version in misc\3rdParty\
SET MODMANAGER_VERSION=2.7.6

echo Generating %TargetName% Release Package...
cd "%rootPath%"

IF EXIST package\ rd /s /q package
mkdir package
cd package

mkdir GameData
cd GameData
xcopy /y ..\..\3rdParty\ModuleManager.%MODMANAGER_VERSION%.dll .
xcopy /y ..\..\3rdParty\ModuleManager-License.txt .

mkdir %TargetName%
cd %TargetName%
xcopy /y ..\..\..\License.txt .
xcopy /y ..\..\..\%TargetName%.cfg .
xcopy /y ..\..\..\%TargetName%.version .
xcopy /y ..\..\..\README.md .

mkdir Plugin
xcopy /y %initialWD%\%TargetName%.dll Plugin

mkdir Textures
xcopy /y ..\..\..\Textures\icon.png Textures
xcopy /y ..\..\..\Textures\icon-blizzy1.png Textures

echo.
echo Compressing %TargetName% Release Package...
IF EXIST "%rootPath%%TargetName%*.zip" del "%rootPath%%TargetName%*.zip"
"%scriptPath%7za.exe" a "..\..\..\%TargetName%%Dllversion%.zip" ..\..\GameData

cd "%rootPath%"
rd /s /q package

cd "%initialWD%"

Update build script for Module Manager update

Updated the ZipPack build script for Module Manager v2.7.6


@ECHO OFF
java ^
-Dlogback.configurationFile="../config/logback.xml" ^
-Daspectran.baseDir=".." ^
-cp "../lib/*" ^
com.aspectran.shell.jline.JLineAspectranShell ^
../config/aspectran-config.apon

@ECHO OFF
set BASE_DIR=%~dp0%\..

java ^
    -Dlogback.configurationFile="%BASE_DIR%\config\logback.xml" ^
    -Daspectran.baseDir="%BASE_DIR%" ^
    -cp "%BASE_DIR%/lib/*" ^
    com.aspectran.shell.jline.JLineAspectranShell ^
    %BASE_DIR%/config/aspectran-config.apon

Update shell.bat

Update shell.bat


SET PATH=C:\Qt\Qt5.4.1\5.4\msvc2013_64\bin;%PATH%
SET INCLUDE=C:\icu\include\;%INCLUDE%
SET LIB=C:\icu\lib\;%LIB%

rem needed: put this script in build dir
windeployqt.exe MangaLib.exe

pause

add deploy script

add deploy script


Make a .bat file to start the layout test http_server on windows.

TEST=none
BUG=none
Review URL: http://codereview.chromium.org/392009

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


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

apache-incubator-serviceomb-frontend.exe

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

apache-incubator-serviceomb-frontend.exe

Update Start scripts

Update Start scripts


call settings.bat

git clone https://github.com/coapp-packages/libiconv.git

cd libiconv\COPKG\libiconv
devenv  libiconv.sln /Upgrade /nologo
msbuild /p:Configuration=%Variant% /clp:Verbosity=minimal /nologo libiconv.vcxproj /flp1:logfile=build_errors.txt;errorsonly /flp2:logfile=build_warnings.txt;warningsonly

copy /y x64\Debug\*.lib %PREFIX%\lib
copy /y x64\Debug\libiconv.lib %PREFIX%\lib\iconv.lib
copy /y x64\Debug\*.dll %PREFIX%\bin
copy /y *.h %PREFIX%\include

cd ..\..\..

call settings.bat

git clone https://github.com/coapp-packages/libiconv.git

cd libiconv\COPKG\libiconv
devenv  libiconv.sln /Upgrade /nologo
msbuild /p:Configuration=%Variant% /clp:Verbosity=minimal /nologo libiconv.vcxproj /flp1:logfile=build_errors.txt;errorsonly /flp2:logfile=build_warnings.txt;warningsonly

copy /y x64\%Variant%\*.lib %PREFIX%\lib
copy /y x64\%Variant%\libiconv.lib %PREFIX%\lib\iconv.lib
copy /y x64\%Variant%\*.dll %PREFIX%\bin
copy /y *.h %PREFIX%\include

cd ..\..\..

fix iconv release install

fix iconv release install


/* Equivalent to sign.sh for OS/2 */
PARSE ARG dist objdir os_target nspr_lib_dir therest
dist=forwardtoback(dist);
objdir=forwardtoback(objdir);
nspr_lib_dir=forwardtoback(nspr_lib_dir);
'echo 'dist
'echo 'objdir
'echo 'nspr_lib_dir
'set BEGINLIBPATH='dist'\lib;'nspr_lib_dir';%BEGINLIBPATH%'
'set LIBPATHSTRICT=T'
objdir'\shlibsign -v -i 'therest
exit

forwardtoback: procedure
  arg pathname
  parse var pathname pathname'/'rest
  do while (rest <> "")
    pathname = pathname'\'rest
    parse var pathname pathname'/'rest
  end
  return pathname

/* Equivalent to sign.sh for OS/2 */
PARSE ARG dist objdir os_target nspr_lib_dir therest
dist=forwardtoback(dist);
objdir=forwardtoback(objdir);
nspr_lib_dir=forwardtoback(nspr_lib_dir);
'echo 'dist
'echo 'objdir
'echo 'nspr_lib_dir
'set BEGINLIBPATH='dist'\lib;'nspr_lib_dir';'dist'\bin;%BEGINLIBPATH%'
'set LIBPATHSTRICT=T'
objdir'\shlibsign -v -i 'therest
exit

forwardtoback: procedure
  arg pathname
  parse var pathname pathname'/'rest
  do while (rest <> "")
    pathname = pathname'\'rest
    parse var pathname pathname'/'rest
  end
  return pathname

Fix for bug 390074 . OS/2 sign.cmd needs to have dist\bin in LIBPATH. Patch contributed by Peter Weilbacher. r=julien.pierre.boogz


set PATH=%Qt5_DIR%/bin;%PATH%
md build
cd build
cmake -G "MinGW Makefiles" -DBUILD_QT5=ON ..
mingw32-make

set PATH=%Qt5_DIR%/bin;%PATH%
cmake --version
gcc -v
g++ -v
md build
cd build
cmake -G "MinGW Makefiles" -DBUILD_QT5=ON ..
mingw32-make

Update buildqt5win64_github.bat

Update buildqt5win64_github.bat


call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
cl /MD /LD /Fe:arma3urlfetch_x64.dll^
    src\common.cpp^
    src\arguments.cpp^
    src\requests.cpp^
    src\clients.cpp^
    src\output.cpp^
    src\handler.cpp^
    src\main.cpp^
    /DCURL_STATICLIB^
    /I include\windows\x64^
    lib\windows\libcurl_a_x64.lib^
    /std:c++17
rm *.obj
rm *.lib
rm *.exp

call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
cl /MD /LD /Fe:arma3urlfetch_x64.dll^
    src\common.cpp^
    src\arguments.cpp^
    src\requests.cpp^
    src\clients.cpp^
    src\output.cpp^
    src\handler.cpp^
    src\main.cpp^
    /DCURL_STATICLIB^
    /I include\windows\x64^
    lib\windows\libcurl_a_x64.lib^
    /std:c++17^
    /EHsc
rm *.obj
rm *.lib
rm *.exp

add /EHsc to 64bit build

add /EHsc to 64bit build


SET JSDOC_DIR=%1%
SET JSDOC_TEMPLATE_DIR=%1%\jsdoc-toolkit\templates\BBTemplate
SET BB_TEMPLATE_DIR=BBTemplate
SET BB_PLUGIN=bbPlugin.js
SET API_DOC_DIR=..\api
SET OUTPUT_DIR=..\output

xcopy %BB_TEMPLATE_DIR% "%JSDOC_TEMPLATE_DIR%" /e /y
copy %BB_PLUGIN% "%JSDOC_DIR%\app\plugins\" /y

java -jar %JSDOC_DIR%\jsrun.jar %JSDOC_DIR%\app\run.js -a "%API_DOC_DIR%" -t=%JSDOC_TEMPLATE_DIR% -d="%OUTPUT_DIR%"

SET JSDOC_DIR=%1%
SET JSDOC_TEMPLATE_DIR=%1%\jsdoc-toolkit\templates\BBTemplate
SET BB_TEMPLATE_DIR=BBTemplate
SET BB_PLUGIN=bbPlugin.js
SET API_DOC_DIR=..\api
SET OUTPUT_DIR=..\..\output

rmdir /s /q "%JSDOC_TEMPLATE_DIR%"
mkdir "%JSDOC_TEMPLATE_DIR%"
xcopy %BB_TEMPLATE_DIR% "%JSDOC_TEMPLATE_DIR%" /e /y
copy %BB_PLUGIN% "%JSDOC_DIR%\app\plugins\" /y

java -jar %JSDOC_DIR%\jsrun.jar %JSDOC_DIR%\app\run.js -a "%API_DOC_DIR%" -t=%JSDOC_TEMPLATE_DIR% -d="%OUTPUT_DIR%"

Fix for #192: need to delete folder prior to xcopy


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

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

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

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

test version

test version

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


@echo off

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

@echo on

@if "%~1"=="" goto usage
@if not "%3"=="" goto usage
@set leveldir=%~1-%~2
@set svnloc=tags/%~1/%leveldir%
@goto execute

@:usage
@echo off
echo Run this command in its directory to tag a uima-as release
echo This will copy the HEAD in the repository for several projects
echo Usage: tag level release-candidate
echo  example tag uima-as-2.2.2 01
@echo on
@goto exit

@:execute
@set baseURL=https://svn.apache.org/repos/asf/incubator/uima/uimaj/trunk
@set asURL=https://svn.apache.org/repos/asf/incubator/uima/sandbox/trunk
@set tagURL=https://svn.apache.org/repos/asf/incubator/uima/sandbox/%svnloc%
@set commitMsg=Create Tag for UIMA-AS

svn copy --dry-run %asURL%/uima-as             %tagURL%                    -m "%commitMsg%"
svn copy --dry-run %baseURL%/uimaj             %tagURL%/uimaj              -m "%commitMsg%"
svn copy --dry-run %baseURL%/uimaj-distr       %tagURL%/uimaj-distr        -m "%commitMsg%"
svn copy --dry-run %baseURL%/uimaj-examples    %tagURL%/uimaj-examples     -m "%commitMsg%"
svn copy --dry-run %baseURL%/uima-docbooks     %tagURL%/uima-docbooks      -m "%commitMsg%"
svn copy --dry-run %baseURL%/uima-docbook-tool %tagURL%/uima-docbook-tool  -m "%commitMsg%"

@:exit

add script to tag a uima-as release

[UIMA-1009] add script to tag a uima-as release

git-svn-id: dd361d0afbe84f3eb97f7061549e905c2c5df34b@650253 13f79535-47bb-0310-9956-ffa450edef68


@echo on
del *.zip
del *.sql
del *.txt

docker login -u="%DOCKER_USER%" -p="%DOCKER_PASS%"

docker build -t acemulator/ace:latest -t acemulator/ace:%APPVEYOR_BUILD_VERSION% .

docker push acemulator/ace

@echo on
del *.zip
del *.sql
del *.txt
@echo off
docker login -u="%DOCKER_USER%" -p="%DOCKER_PASS%"
@echo on
docker build -t acemulator/ace:latest -t acemulator/ace:%APPVEYOR_BUILD_VERSION% .

docker push acemulator/ace

Update AppVeyorAfterDeploy.bat

Update AppVeyorAfterDeploy.bat


@echo on

if "%CUDA_VERSION%" == "cpu" (
    echo Skipping for CPU builds
    exit /b 0
)

set SRC_DIR=%~dp0\..

if not exist "%SRC_DIR%\temp_build" mkdir "%SRC_DIR%\temp_build"

set /a CUDA_VER=%CUDA_VERSION%
set CUDA_VER_MAJOR=%CUDA_VERSION:~0,-1%
set CUDA_VER_MINOR=%CUDA_VERSION:~-1,1%
set CUDA_VERSION_STR=%CUDA_VER_MAJOR%.%CUDA_VER_MINOR%

if %CUDA_VER% EQU 92 goto cuda92
if %CUDA_VER% EQU 100 goto cuda100
if %CUDA_VER% EQU 101 goto cuda101
if %CUDA_VER% EQU 102 goto cuda102

echo CUDA %CUDA_VERSION_STR% is not supported
exit /b 1

:cuda92
if not exist "%SRC_DIR%\temp_build\cuda_9.2.148_win10.exe" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/win2016/cuda_9.2.148_win10.exe --output "%SRC_DIR%\temp_build\cuda_9.2.148_win10.exe"
    if errorlevel 1 exit /b 1
    set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\cuda_9.2.148_win10.exe"
    set "ARGS=nvcc_9.2 cuobjdump_9.2 nvprune_9.2 cupti_9.2 cublas_9.2 cublas_dev_9.2 cudart_9.2 cufft_9.2 cufft_dev_9.2 curand_9.2 curand_dev_9.2 cusolver_9.2 cusolver_dev_9.2 cusparse_9.2 cusparse_dev_9.2 nvgraph_9.2 nvgraph_dev_9.2 npp_9.2 npp_dev_9.2 nvrtc_9.2 nvrtc_dev_9.2 nvml_dev_9.2"
)

if not exist "%SRC_DIR%\temp_build\cudnn-9.2-windows10-x64-v7.2.1.38.zip" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/win2016/cudnn-9.2-windows10-x64-v7.2.1.38.zip --output "%SRC_DIR%\temp_build\cudnn-9.2-windows10-x64-v7.2.1.38.zip"
    if errorlevel 1 exit /b 1
    set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\cudnn-9.2-windows10-x64-v7.2.1.38.zip"
)

goto cuda_common

:cuda100

if not exist "%SRC_DIR%\temp_build\cuda_10.0.130_411.31_win10.exe" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/win2016/cuda_10.0.130_411.31_win10.exe --output "%SRC_DIR%\temp_build\cuda_10.0.130_411.31_win10.exe"
    if errorlevel 1 exit /b 1
    set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\cuda_10.0.130_411.31_win10.exe"
    set "ARGS=nvcc_10.0 cuobjdump_10.0 nvprune_10.0 cupti_10.0 cublas_10.0 cublas_dev_10.0 cudart_10.0 cufft_10.0 cufft_dev_10.0 curand_10.0 curand_dev_10.0 cusolver_10.0 cusolver_dev_10.0 cusparse_10.0 cusparse_dev_10.0 nvgraph_10.0 nvgraph_dev_10.0 npp_10.0 npp_dev_10.0 nvrtc_10.0 nvrtc_dev_10.0 nvml_dev_10.0"
)

if not exist "%SRC_DIR%\temp_build\cudnn-10.0-windows10-x64-v7.4.1.5.zip" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/win2016/cudnn-10.0-windows10-x64-v7.4.1.5.zip --output "%SRC_DIR%\temp_build\cudnn-10.0-windows10-x64-v7.4.1.5.zip"
    if errorlevel 1 exit /b 1
    set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\cudnn-10.0-windows10-x64-v7.4.1.5.zip"
)

goto cuda_common

:cuda101

if not exist "%SRC_DIR%\temp_build\cuda_10.1.243_426.00_win10.exe" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/cuda_10.1.243_426.00_win10.exe --output "%SRC_DIR%\temp_build\cuda_10.1.243_426.00_win10.exe"
    if errorlevel 1 exit /b 1
    set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\cuda_10.1.243_426.00_win10.exe"
    set "ARGS=nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 cublas_10.1 cublas_dev_10.1 cudart_10.1 cufft_10.1 cufft_dev_10.1 curand_10.1 curand_dev_10.1 cusolver_10.1 cusolver_dev_10.1 cusparse_10.1 cusparse_dev_10.1 nvgraph_10.1 nvgraph_dev_10.1 npp_10.1 npp_dev_10.1 nvrtc_10.1 nvrtc_dev_10.1 nvml_dev_10.1"
)

if not exist "%SRC_DIR%\temp_build\cudnn-10.1-windows10-x64-v7.6.4.38.zip" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/cudnn-10.1-windows10-x64-v7.6.4.38.zip --output "%SRC_DIR%\temp_build\cudnn-10.1-windows10-x64-v7.6.4.38.zip"
    if errorlevel 1 exit /b 1
    set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\cudnn-10.1-windows10-x64-v7.6.4.38.zip"
)

goto cuda_common

:cuda102

if not exist "%SRC_DIR%\temp_build\cuda_10.2.89_441.22_win10.exe" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/cuda_10.2.89_441.22_win10.exe --output "%SRC_DIR%\temp_build\cuda_10.2.89_441.22_win10.exe"
    if errorlevel 1 exit /b 1
    set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\cuda_10.2.89_441.22_win10.exe"
    set "ARGS=nvcc_10.2 cuobjdump_10.2 nvprune_10.2 cupti_10.2 cublas_10.2 cublas_dev_10.2 cudart_10.2 cufft_10.2 cufft_dev_10.2 curand_10.2 curand_dev_10.2 cusolver_10.2 cusolver_dev_10.2 cusparse_10.2 cusparse_dev_10.2 nvgraph_10.2 nvgraph_dev_10.2 npp_10.2 npp_dev_10.2 nvrtc_10.2 nvrtc_dev_10.2 nvml_dev_10.2"
)

if not exist "%SRC_DIR%\temp_build\cudnn-10.2-windows10-x64-v7.6.5.32.zip" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/cudnn-10.1-windows10-x64-v7.6.4.38.zip --output "%SRC_DIR%\temp_build\cudnn-10.2-windows10-x64-v7.6.5.32.zip"
    if errorlevel 1 exit /b 1
    set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\cudnn-10.2-windows10-x64-v7.6.5.32.zip"
)

goto cuda_common

:cuda_common

if not exist "%SRC_DIR%\temp_build\NvToolsExt.7z" (
    curl -k -L https://www.dropbox.com/s/9mcolalfdj4n979/NvToolsExt.7z?dl=1 --output "%SRC_DIR%\temp_build\NvToolsExt.7z"
    if errorlevel 1 exit /b 1
)

if not exist "%SRC_DIR%\temp_build\gpu_driver_dlls.7z" (
    curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq&export=download" --output "%SRC_DIR%\temp_build\gpu_driver_dlls.7z"
    if errorlevel 1 exit /b 1
)

echo Installing CUDA toolkit...
7z x %CUDA_SETUP_FILE% -o"%SRC_DIR%\temp_build\cuda"
pushd "%SRC_DIR%\temp_build\cuda"
start /wait setup.exe -s %ARGS%
popd

echo Installing VS integration...
xcopy /Y "%SRC_DIR%\temp_build\cuda\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\BuildCustomizations"

echo Installing NvToolsExt...
7z x %SRC_DIR%\temp_build\NvToolsExt.7z -o"%SRC_DIR%\temp_build\NvToolsExt"
mkdir "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\bin\x64"
mkdir "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\include"
mkdir "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\lib\x64"
xcopy /Y "%SRC_DIR%\temp_build\NvToolsExt\bin\x64\*.*" "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\bin\x64"
xcopy /Y "%SRC_DIR%\temp_build\NvToolsExt\include\*.*" "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\include"
xcopy /Y "%SRC_DIR%\temp_build\NvToolsExt\lib\x64\*.*" "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\lib\x64"

echo Setting up environment...
set "PATH=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin;%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\libnvvp;%PATH%"
set "CUDA_PATH=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%"
set "CUDA_PATH_V%CUDA_VER_MAJOR%_%CUDA_VER_MINOR%=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%"
set "NVTOOLSEXT_PATH=%ProgramFiles%\NVIDIA Corporation\NvToolsExt\bin\x64"

if not exist "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin\nvcc.exe" (
    echo CUDA %CUDA_VERSION_STR% installed failed.
    exit /b 1
)

echo Installing cuDNN...
7z x %CUDNN_SETUP_FILE% -o"%SRC_DIR%\temp_build\cudnn"
xcopy /Y "%SRC_DIR%\temp_build\cudnn\cuda\bin\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin"
xcopy /Y "%SRC_DIR%\temp_build\cudnn\cuda\lib\x64\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\lib\x64"
xcopy /Y "%SRC_DIR%\temp_build\cudnn\cuda\include\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\include"

echo Installing GPU driver DLLs
7z x %SRC_DIR%\temp_build\gpu_driver_dlls.zip -o"C:\Windows\System32"

echo Cleaning temp files
rd /s /q "%SRC_DIR%\temp_build" || ver > nul

@echo on

if "%CUDA_VERSION%" == "cpu" (
    echo Skipping for CPU builds
    exit /b 0
)

set SRC_DIR=%~dp0\..

if not exist "%SRC_DIR%\temp_build" mkdir "%SRC_DIR%\temp_build"

set /a CUDA_VER=%CUDA_VERSION%
set CUDA_VER_MAJOR=%CUDA_VERSION:~0,-1%
set CUDA_VER_MINOR=%CUDA_VERSION:~-1,1%
set CUDA_VERSION_STR=%CUDA_VER_MAJOR%.%CUDA_VER_MINOR%

if %CUDA_VER% EQU 92 goto cuda92
if %CUDA_VER% EQU 100 goto cuda100
if %CUDA_VER% EQU 101 goto cuda101
if %CUDA_VER% EQU 102 goto cuda102

echo CUDA %CUDA_VERSION_STR% is not supported
exit /b 1

:cuda92
if not exist "%SRC_DIR%\temp_build\cuda_9.2.148_win10.exe" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/win2016/cuda_9.2.148_win10.exe --output "%SRC_DIR%\temp_build\cuda_9.2.148_win10.exe"
    if errorlevel 1 exit /b 1
    set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\cuda_9.2.148_win10.exe"
    set "ARGS=nvcc_9.2 cuobjdump_9.2 nvprune_9.2 cupti_9.2 cublas_9.2 cublas_dev_9.2 cudart_9.2 cufft_9.2 cufft_dev_9.2 curand_9.2 curand_dev_9.2 cusolver_9.2 cusolver_dev_9.2 cusparse_9.2 cusparse_dev_9.2 nvgraph_9.2 nvgraph_dev_9.2 npp_9.2 npp_dev_9.2 nvrtc_9.2 nvrtc_dev_9.2 nvml_dev_9.2"
)

if not exist "%SRC_DIR%\temp_build\cudnn-9.2-windows10-x64-v7.2.1.38.zip" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/win2016/cudnn-9.2-windows10-x64-v7.2.1.38.zip --output "%SRC_DIR%\temp_build\cudnn-9.2-windows10-x64-v7.2.1.38.zip"
    if errorlevel 1 exit /b 1
    set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\cudnn-9.2-windows10-x64-v7.2.1.38.zip"
)

goto cuda_common

:cuda100

if not exist "%SRC_DIR%\temp_build\cuda_10.0.130_411.31_win10.exe" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/win2016/cuda_10.0.130_411.31_win10.exe --output "%SRC_DIR%\temp_build\cuda_10.0.130_411.31_win10.exe"
    if errorlevel 1 exit /b 1
    set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\cuda_10.0.130_411.31_win10.exe"
    set "ARGS=nvcc_10.0 cuobjdump_10.0 nvprune_10.0 cupti_10.0 cublas_10.0 cublas_dev_10.0 cudart_10.0 cufft_10.0 cufft_dev_10.0 curand_10.0 curand_dev_10.0 cusolver_10.0 cusolver_dev_10.0 cusparse_10.0 cusparse_dev_10.0 nvgraph_10.0 nvgraph_dev_10.0 npp_10.0 npp_dev_10.0 nvrtc_10.0 nvrtc_dev_10.0 nvml_dev_10.0"
)

if not exist "%SRC_DIR%\temp_build\cudnn-10.0-windows10-x64-v7.4.1.5.zip" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/win2016/cudnn-10.0-windows10-x64-v7.4.1.5.zip --output "%SRC_DIR%\temp_build\cudnn-10.0-windows10-x64-v7.4.1.5.zip"
    if errorlevel 1 exit /b 1
    set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\cudnn-10.0-windows10-x64-v7.4.1.5.zip"
)

goto cuda_common

:cuda101

if not exist "%SRC_DIR%\temp_build\cuda_10.1.243_426.00_win10.exe" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/cuda_10.1.243_426.00_win10.exe --output "%SRC_DIR%\temp_build\cuda_10.1.243_426.00_win10.exe"
    if errorlevel 1 exit /b 1
    set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\cuda_10.1.243_426.00_win10.exe"
    set "ARGS=nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 cublas_10.1 cublas_dev_10.1 cudart_10.1 cufft_10.1 cufft_dev_10.1 curand_10.1 curand_dev_10.1 cusolver_10.1 cusolver_dev_10.1 cusparse_10.1 cusparse_dev_10.1 nvgraph_10.1 nvgraph_dev_10.1 npp_10.1 npp_dev_10.1 nvrtc_10.1 nvrtc_dev_10.1 nvml_dev_10.1"
)

if not exist "%SRC_DIR%\temp_build\cudnn-10.1-windows10-x64-v7.6.4.38.zip" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/cudnn-10.1-windows10-x64-v7.6.4.38.zip --output "%SRC_DIR%\temp_build\cudnn-10.1-windows10-x64-v7.6.4.38.zip"
    if errorlevel 1 exit /b 1
    set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\cudnn-10.1-windows10-x64-v7.6.4.38.zip"
)

goto cuda_common

:cuda102

if not exist "%SRC_DIR%\temp_build\cuda_10.2.89_441.22_win10.exe" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/cuda_10.2.89_441.22_win10.exe --output "%SRC_DIR%\temp_build\cuda_10.2.89_441.22_win10.exe"
    if errorlevel 1 exit /b 1
    set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\cuda_10.2.89_441.22_win10.exe"
    set "ARGS=nvcc_10.2 cuobjdump_10.2 nvprune_10.2 cupti_10.2 cublas_10.2 cublas_dev_10.2 cudart_10.2 cufft_10.2 cufft_dev_10.2 curand_10.2 curand_dev_10.2 cusolver_10.2 cusolver_dev_10.2 cusparse_10.2 cusparse_dev_10.2 nvgraph_10.2 nvgraph_dev_10.2 npp_10.2 npp_dev_10.2 nvrtc_10.2 nvrtc_dev_10.2 nvml_dev_10.2"
)

if not exist "%SRC_DIR%\temp_build\cudnn-10.2-windows10-x64-v7.6.5.32.zip" (
    curl -k -L https://ossci-windows.s3.amazonaws.com/cudnn-10.1-windows10-x64-v7.6.4.38.zip --output "%SRC_DIR%\temp_build\cudnn-10.2-windows10-x64-v7.6.5.32.zip"
    if errorlevel 1 exit /b 1
    set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\cudnn-10.2-windows10-x64-v7.6.5.32.zip"
)

goto cuda_common

:cuda_common

if not exist "%SRC_DIR%\temp_build\NvToolsExt.7z" (
    curl -k -L https://www.dropbox.com/s/9mcolalfdj4n979/NvToolsExt.7z?dl=1 --output "%SRC_DIR%\temp_build\NvToolsExt.7z"
    if errorlevel 1 exit /b 1
)

if not exist "%SRC_DIR%\temp_build\gpu_driver_dlls.7z" (
    curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq&export=download" --output "%SRC_DIR%\temp_build\gpu_driver_dlls.zip"
    if errorlevel 1 exit /b 1
)

echo Installing CUDA toolkit...
7z x %CUDA_SETUP_FILE% -o"%SRC_DIR%\temp_build\cuda"
pushd "%SRC_DIR%\temp_build\cuda"
start /wait setup.exe -s %ARGS%
popd

echo Installing VS integration...
xcopy /Y "%SRC_DIR%\temp_build\cuda\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\BuildCustomizations"

echo Installing NvToolsExt...
7z x %SRC_DIR%\temp_build\NvToolsExt.7z -o"%SRC_DIR%\temp_build\NvToolsExt"
mkdir "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\bin\x64"
mkdir "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\include"
mkdir "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\lib\x64"
xcopy /Y "%SRC_DIR%\temp_build\NvToolsExt\bin\x64\*.*" "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\bin\x64"
xcopy /Y "%SRC_DIR%\temp_build\NvToolsExt\include\*.*" "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\include"
xcopy /Y "%SRC_DIR%\temp_build\NvToolsExt\lib\x64\*.*" "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\lib\x64"

echo Setting up environment...
set "PATH=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin;%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\libnvvp;%PATH%"
set "CUDA_PATH=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%"
set "CUDA_PATH_V%CUDA_VER_MAJOR%_%CUDA_VER_MINOR%=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%"
set "NVTOOLSEXT_PATH=%ProgramFiles%\NVIDIA Corporation\NvToolsExt\bin\x64"

if not exist "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin\nvcc.exe" (
    echo CUDA %CUDA_VERSION_STR% installed failed.
    exit /b 1
)

echo Installing cuDNN...
7z x %CUDNN_SETUP_FILE% -o"%SRC_DIR%\temp_build\cudnn"
xcopy /Y "%SRC_DIR%\temp_build\cudnn\cuda\bin\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin"
xcopy /Y "%SRC_DIR%\temp_build\cudnn\cuda\lib\x64\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\lib\x64"
xcopy /Y "%SRC_DIR%\temp_build\cudnn\cuda\include\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\include"

echo Installing GPU driver DLLs
7z x %SRC_DIR%\temp_build\gpu_driver_dlls.zip -o"C:\Windows\System32"

echo Cleaning temp files
rd /s /q "%SRC_DIR%\temp_build" || ver > nul

Fix link for gpu driver DLLs (#2046)

Fix link for gpu driver DLLs (#2046)


@echo off
rem Run Tests.  Run the regression test suite.
rem Usage:  rt [-d] [-O] [-q] [-x64] regrtest_args
rem -d   Run Debug build (python_d.exe).  Else release build.
rem -O   Run python.exe or python_d.exe (see -d) with -O.
rem -q   "quick" -- normally the tests are run twice, the first time
rem      after deleting all the .py[co] files reachable from Lib/.
rem      -q runs the tests just once, and without deleting .py[co] files.
rem -x64 Run the 64-bit build of python (or python_d if -d was specified)
rem      from the 'amd64' dir instead of the 32-bit build in this dir.
rem All leading instances of these switches are shifted off, and
rem whatever remains is passed to regrtest.py.  For example,
rem     rt -O -d -x test_thread
rem runs
rem     python_d -O ../lib/test/regrtest.py -x test_thread
rem twice, and
rem     rt -q -g test_binascii
rem runs
rem     python_d ../lib/test/regrtest.py -g test_binascii
rem to generate the expected-output file for binascii quickly.
rem
rem Confusing:  if you want to pass a comma-separated list, like
rem     -u network,largefile
rem then you have to quote it on the rt line, like
rem     rt -u "network,largefile"

setlocal

set prefix=.\
set suffix=
set qmode=
set dashO=
set tcltk=

:CheckOpts
if "%1"=="-O" (set dashO=-O)     & shift & goto CheckOpts
if "%1"=="-q" (set qmode=yes)    & shift & goto CheckOpts
if "%1"=="-d" (set suffix=_d)    & shift & goto CheckOpts
if "%1"=="-x64" (set prefix=amd64) & (set tcltk=tcltk64) & shift & goto CheckOpts

PATH %PATH%;..\..\%tcltk%\bin
set exe=%prefix%\python%suffix%
set cmd=%exe% %dashO% -Wd -E ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
if defined qmode goto Qmode

echo Deleting .pyc/.pyo files ...
%exe% rmpyc.py

echo on
%cmd%
@echo off

echo About to run again without deleting .pyc/.pyo first:
pause

:Qmode
echo on
%cmd%

@echo off
rem Run Tests.  Run the regression test suite.
rem Usage:  rt [-d] [-O] [-q] [-x64] regrtest_args
rem -d   Run Debug build (python_d.exe).  Else release build.
rem -O   Run python.exe or python_d.exe (see -d) with -O.
rem -q   "quick" -- normally the tests are run twice, the first time
rem      after deleting all the .py[co] files reachable from Lib/.
rem      -q runs the tests just once, and without deleting .py[co] files.
rem -x64 Run the 64-bit build of python (or python_d if -d was specified)
rem      from the 'amd64' dir instead of the 32-bit build in this dir.
rem All leading instances of these switches are shifted off, and
rem whatever remains is passed to regrtest.py.  For example,
rem     rt -O -d -x test_thread
rem runs
rem     python_d -O ../lib/test/regrtest.py -x test_thread
rem twice, and
rem     rt -q -g test_binascii
rem runs
rem     python_d ../lib/test/regrtest.py -g test_binascii
rem to generate the expected-output file for binascii quickly.
rem
rem Confusing:  if you want to pass a comma-separated list, like
rem     -u network,largefile
rem then you have to quote it on the rt line, like
rem     rt -u "network,largefile"

setlocal

set prefix=.\
set suffix=
set qmode=
set dashO=
set tcltk=

:CheckOpts
if "%1"=="-O" (set dashO=-O)     & shift & goto CheckOpts
if "%1"=="-q" (set qmode=yes)    & shift & goto CheckOpts
if "%1"=="-d" (set suffix=_d)    & shift & goto CheckOpts
if "%1"=="-x64" (set prefix=amd64) & (set tcltk=tcltk64) & shift & goto CheckOpts

PATH %PATH%;..\..\%tcltk%\bin
set exe=%prefix%\python%suffix%
set cmd=%exe% %dashO% -Wd -E -bb ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
if defined qmode goto Qmode

echo Deleting .pyc/.pyo files ...
%exe% rmpyc.py

echo on
%cmd%
@echo off

echo About to run again without deleting .pyc/.pyo first:
pause

:Qmode
echo on
%cmd%

Add -bb to rt.bat to do some extra checks during the tests (it is already used by the non-Windows buildbots).


Tweak ab.bat file for tests under Windows


rem dennyhalim.com
rem this will be copied after first reboot and then run after next reboot

rem replace defaultlayouts before it gets created
move "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.dennyhalim"
copy /y "%WINDIR%\Setup\Files\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml"
move "%SystemRoot%\SysWOW64\OneDriveSetup.exe" "%SystemRoot%\SysWOW64\OneDriveSetup.dennyhalim"
move "%SystemRoot%\System32\OneDriveSetup.exe" "%SystemRoot%\System32\OneDriveSetup.dennyhalim"
rem move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.dennyhalim"
rem startmenu disabled if shellex disabled
rem move "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy" "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy.dennyhalim"

wmic.exe USERACCOUNT WHERE "Name='admin'" set PasswordExpires=FALSE
wmic.exe USERACCOUNT WHERE "Name='user'" set PasswordExpires=FALSE

reg.exe load "HKLM\DEFAULT" "%Public%\..\default\ntuser.dat"
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /v PeopleBand /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /d Deny /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v epicsetup /t REG_SZ /D "%WINDIR%\Setup\Files\mini_installer.exe" /F
reg.exe delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg.exe unload "HKLM\DEFAULT"

reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v LetAppsRunInBackground /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpgrade /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v BranchReadinessLevel /t REG_DWORD /d 32 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodinDays /t REG_DWORD /d 365 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseCredShared /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseOpen /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" /v 1 /t REG_SZ /d pool.ntp.org /f
reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\sppsvc" /v Start /t REG_DWORD /d 4 /f
reg.exe add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f
reg.exe add "HKLM\Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Wow6432Node\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v DefaultCookiesSetting /f /t REG_DWORD /d 4
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v DefaultNotificationsSetting /f /t REG_DWORD /d 2
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v DefaultGeolocationSetting /f /t REG_DWORD /d 2
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v HomepageLocation /f /t REG_SZ /d "http://dennyhalim.com"
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v BackgroundModeEnabled /f /t REG_DWORD /d 0
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v BlockThirdPartyCookies /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v BuiltInDnsClientEnabled /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v DiskCacheSize /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v ForceGoogleSafeSearch /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v ForceYouTubeRestrict /f /t REG_DWORD /d 1

cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon LBP2900" -i "%WINDIR%\Setup\Drivers\CanonLBP2900\CNAB4STD.inf"
cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon G2000 series Printer" -i "%WINDIR%\Setup\Drivers\CanonG2000\Driver\G2000P6.inf"
rem move "%WINDIR%\Setup\Drivers\*" "%WINDIR%\INF"

schtasks.exe /change /TN "\Microsoft\Windows\Setup\SetupCleanupTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE

"%WINDIR%\Setup\Files\chocolatey.exe" /S
"%WINDIR%\Setup\Files\Firefox Setup 52.6.0esr.exe" -ms
"%WINDIR%\Setup\Files\vlc-3.0.1-win64.exe" /L=1033 /S
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /S
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\just-install.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\NpackdCL-1.23.2.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\7z1805-x64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\qalculate-2.4.0a.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\GoogleChromeStandaloneEnterprise64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\LibreOffice_5.4.6_Win_x64.msi"
rem "%WINDIR%\Setup\Files\avira_pc_cleaner_en.exe" /s
"%WINDIR%\Setup\Files\mb3-setup-consumer-3.4.5.2467-1.0.342-1.0.4664.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"%WINDIR%\Setup\Files\avast_business_antivirus_managed_setup_offline_silent.exe"

powershell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Progs\OpenSSH\install-sshd.ps1"
PowerShell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Files\setup.ps1"

sc.exe config wuauserv start= demand
sc.exe config DiagTrack start= disabled
sc.exe config dmwappushservice start= disabled
sc.exe config RetailDemo start= disabled
sc.exe config lfsvc start= disabled
sc.exe config ssh-agent start= auto
sc.exe config sshd start= auto

netsh advfirewall firewall add rule dir=in action=allow profile=any protocol=TCP localport=2222 name="sshd"

mkdir "%Public%\Desktop.dennyhalim"
move "%Public%\Desktop\*.*" "%Public%\Desktop.dennyhalim"

rem use powershell for w10 only features
dism.exe /online /norestart /Enable-Feature /FeatureName:TelnetClient
dism.exe /online /norestart /Disable-Feature /FeatureName:MediaPlayback
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsMediaPlayer
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsGadgetPlatform
dism.exe /online /norestart /Disable-Feature /FeatureName:Indexing-Service-Package
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-x86
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64

powercfg -hibernate on
REAGENTC.EXE /enable
rem "%WINDIR%\Setup-githubbox.exe"
rem shutdown /r /f /t 0

rem dennyhalim.com
rem this will be copied after first reboot and then run after next reboot

rem replace defaultlayouts before it gets created
move "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.dennyhalim"
copy /y "%WINDIR%\Setup\Files\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml"
move "%SystemRoot%\SysWOW64\OneDriveSetup.exe" "%SystemRoot%\SysWOW64\OneDriveSetup.dennyhalim"
move "%SystemRoot%\System32\OneDriveSetup.exe" "%SystemRoot%\System32\OneDriveSetup.dennyhalim"
rem move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.dennyhalim"
rem startmenu disabled if shellex disabled
rem move "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy" "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy.dennyhalim"

wmic.exe USERACCOUNT WHERE "Name='admin'" set PasswordExpires=FALSE
wmic.exe USERACCOUNT WHERE "Name='user'" set PasswordExpires=FALSE

reg.exe load "HKLM\DEFAULT" "%Public%\..\default\ntuser.dat"
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /v PeopleBand /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /d Deny /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v epicsetup /t REG_SZ /D "%WINDIR%\Setup\Files\mini_installer.exe" /F
reg.exe delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg.exe unload "HKLM\DEFAULT"

reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v LetAppsRunInBackground /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpgrade /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v BranchReadinessLevel /t REG_DWORD /d 32 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodinDays /t REG_DWORD /d 365 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseCredShared /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseOpen /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" /v 1 /t REG_SZ /d pool.ntp.org /f
reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\sppsvc" /v Start /t REG_DWORD /d 4 /f
reg.exe add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f
reg.exe add "HKLM\Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Wow6432Node\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultCookiesSetting /f /t REG_DWORD /d 4
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultNotificationsSetting /f /t REG_DWORD /d 2
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultGeolocationSetting /f /t REG_DWORD /d 2
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v HomepageLocation /f /t REG_SZ /d "http://dennyhalim.com"
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v BackgroundModeEnabled /f /t REG_DWORD /d 0
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v BlockThirdPartyCookies /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v BuiltInDnsClientEnabled /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DiskCacheSize /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v ForceGoogleSafeSearch /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v ForceYouTubeRestrict /f /t REG_DWORD /d 1

cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon LBP2900" -i "%WINDIR%\Setup\Drivers\CanonLBP2900\CNAB4STD.inf"
cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon G2000 series Printer" -i "%WINDIR%\Setup\Drivers\CanonG2000\Driver\G2000P6.inf"
rem move "%WINDIR%\Setup\Drivers\*" "%WINDIR%\INF"

schtasks.exe /change /TN "\Microsoft\Windows\Setup\SetupCleanupTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE

"%WINDIR%\Setup\Files\chocolatey.exe" /S
"%WINDIR%\Setup\Files\Firefox Setup 52.6.0esr.exe" -ms
"%WINDIR%\Setup\Files\vlc-3.0.1-win64.exe" /L=1033 /S
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /S
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\just-install.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\NpackdCL-1.23.2.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\7z1805-x64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\qalculate-2.4.0a.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\GoogleChromeStandaloneEnterprise64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\LibreOffice_5.4.6_Win_x64.msi"
rem "%WINDIR%\Setup\Files\avira_pc_cleaner_en.exe" /s
"%WINDIR%\Setup\Files\mb3-setup-consumer-3.4.5.2467-1.0.342-1.0.4664.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"%WINDIR%\Setup\Files\avast_business_antivirus_managed_setup_offline_silent.exe"

powershell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Progs\OpenSSH\install-sshd.ps1"
PowerShell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Files\setup.ps1"

sc.exe config wuauserv start= demand
sc.exe config DiagTrack start= disabled
sc.exe config dmwappushservice start= disabled
sc.exe config RetailDemo start= disabled
sc.exe config lfsvc start= disabled
sc.exe config ssh-agent start= auto
sc.exe config sshd start= auto

netsh advfirewall firewall add rule dir=in action=allow profile=any protocol=TCP localport=2222 name="sshd"

mkdir "%Public%\Desktop.dennyhalim"
move "%Public%\Desktop\*.*" "%Public%\Desktop.dennyhalim"

rem use powershell for w10 only features
dism.exe /online /norestart /Enable-Feature /FeatureName:TelnetClient
dism.exe /online /norestart /Disable-Feature /FeatureName:MediaPlayback
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsMediaPlayer
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsGadgetPlatform
dism.exe /online /norestart /Disable-Feature /FeatureName:Indexing-Service-Package
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-x86
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64

powercfg -hibernate on
REAGENTC.EXE /enable
rem "%WINDIR%\Setup-githubbox.exe"
rem shutdown /r /f /t 0

Update SetupComplete.cmd

Update SetupComplete.cmd


@echo on
choco install -y --allowEmptyChecksum firefox googlechrome wget notepadplusplus sublimetext3 mono monodevelop gtksharp visualstudiocode microsoft-build-tools visualstudio2015community p4merge dotnet4.5 ruby nodejs stylecop

wget -c https://cygwin.com/setup-x86_64.exe
setup-x86_64.exe -R "C:\cygwin64" -s http://cygwin.netbet.org/ -q -g -P curl,zsh,git,vim,wget,xz,tar,gawk,bzip2,subversion,zlib,fontconfig,clang,cmake,lua,perl

set script_path=%~dp0
set repo_path=%script_path%\..\
set bash=c:\cygwin64\bin\bash.exe --login -c

for /f "delims=" %%A in ('%bash% "cd `cygpath $HOMEPATH`/dev/dotfiles && git rev-parse --abbrev-ref HEAD"') do set "branch=%%A"
%bash% 'echo "branch is $branch"'
%bash% "cp -vr `cygpath $HOMEPATH`/.ssh $HOME/"
%bash% "export OUTER_CLONE=`cygpath $repo_path` && $script_path/build_insider.sh"

@echo on
choco install -y --allowEmptyChecksum firefox googlechrome wget notepadplusplus sublimetext3 mono monodevelop gtksharp visualstudiocode microsoft-build-tools visualstudio2015community p4merge dotnet4.5 ruby nodejs stylecop

wget -c https://cygwin.com/setup-x86_64.exe
setup-x86_64.exe -R "C:\cygwin64" -s http://cygwin.netbet.org/ -q -g -P curl,zsh,git,vim,wget,xz,tar,gawk,bzip2,subversion,zlib,fontconfig,clang,cmake,lua,perl,the_silver_searcher

set script_path=%~dp0
set repo_path=%script_path%\..\
set bash=c:\cygwin64\bin\bash.exe --login -c

for /f "delims=" %%A in ('%bash% "cd `cygpath $HOMEPATH`/dev/dotfiles && git rev-parse --abbrev-ref HEAD"') do set "branch=%%A"
%bash% 'echo "branch is $branch"'
%bash% "cp -vr `cygpath $HOMEPATH`/.ssh $HOME/"
%bash% "export OUTER_CLONE=`cygpath $repo_path` && $script_path/build_insider.sh"

Add `ag` to cygwin

Add `ag` to cygwin


powershell -NoProfile -ExecutionPolicy Bypass -Command "windows_cygwin\build.ps1"

add missing .bat wrapper for appveyor

add missing .bat wrapper for appveyor


echo ON

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

call bootstrap.bat
if errorlevel 1 exit 1

echo Architecture: %ARCH%

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

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

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

echo ON

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

call bootstrap.bat
if errorlevel 1 exit 1

echo Architecture: %ARCH%

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

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

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

Update bld.bat

Update bld.bat


@echo off
boot2docker start
boot2docker ssh sudo cp -f %unixpath%/profile /var/lib/boot2docker/profile
boot2docker ssh sudo /etc/init.d/docker restart
boot2docker ssh cp -f %unixpath%/profile .ashrc
boot2docker ssh

make shell silent (no echo)

b2d.bat: make shell silent (no echo)


set RINGQT_QT512=1
set RINGQT_QT515=1

set RINGQT_WEBASSEMBLY=
set RINGQT_ANDROID=
set RINGQT_ANDROID_QT512=

set RINGQT_NOCORE=
set RINGQT_NOWIDGETS=1
set RINGQT_NOGUI=1
set RINGQT_NOTESTLIB=1
set RINGQT_NOOPENGL=1
set RINGQT_NOWEBKIT=1
set RINGQT_NOBLUETOOTH=1
set RINGQT_NOMULTIMEDIA=1
set RINGQT_NOMULTIMEDIAWIDGETS=1
set RINGQT_NOPRINTSUPPORT=1
set RINGQT_NONETWORK=1
set RINGQT_NOSQL=1
set RINGQT_NOPOSITIONING=1
set RINGQT_NOWEBKITWIDGETS=1
set RINGQT_NOWEBENGINEWIDGETS=1
set RINGQT_NOSERIALPORT=1
set RINGQT_NOAXCONTAINER=1
set RINGQT_NOQUICKWIDGETS=1
set RINGQT_NOQML=1
set RINGQT_NOSPEECH=1
set RINGQT_NOQT3D=1
set RINGQT_NOCHARTS=1

set RINGQT_CORE_ALONE=1

ring ..\codegen\parsec.ring classes\qt.cf cpp\src\ring_qtcore.cpp ..\..\libraries\guilib\classes\ring_qtcore.ring
cd events
ring qtevents.ring
cd ..
set RINGQT_QT512=
set RINGQT_QT515=
set RINGQT_CORE_ALONE=
set RINGQT_NOWIDGETS=
set RINGQT_NOGUI=
set RINGQT_NOTESTLIB=
set RINGQT_NOOPENGL=
set RINGQT_NOWEBKIT=
set RINGQT_NOBLUETOOTH=
set RINGQT_NOMULTIMEDIA=
set RINGQT_NOMULTIMEDIAWIDGETS=
set RINGQT_NOPRINTSUPPORT=
set RINGQT_NONETWORK=
set RINGQT_NOSQL=
set RINGQT_NOPOSITIONING=
set RINGQT_NOWEBKITWIDGETS=
set RINGQT_NOWEBENGINEWIDGETS=
set RINGQT_NOSERIALPORT=
set RINGQT_NOAXCONTAINER=
set RINGQT_NOQUICKWIDGETS=
set RINGQT_NOQML=
set RINGQT_NOSPEECH=
set RINGQT_NOQT3D=
set RINGQT_NOCHARTS=

Update RingQt - Add: extensions/ringqt/gencodeqt515_core.bat


@ECHO OFF

set LIBDIR=lib
set LOCALCLASSPATH=build/fop.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.2.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-cvs-20020806.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar
java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8

@ECHO OFF

set LIBDIR=lib
set LOCALCLASSPATH=build/fop.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.2.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-4.1.4.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar
java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8

Update for new Avalon Framework version

Update for new Avalon Framework version

git-svn-id: 102839466c3b40dd9c7e25c0a1a6d26afc40150a@196184 13f79535-47bb-0310-9956-ffa450edef68


@ECHO OFF

SET BASEDIR=%~dp0..
SET USERINI=%BASEDIR%\user.ini
FOR /F "tokens=1,2 delims=:" %%a in ("%STEELTOE_PCF_CREDENTIALS%") do (
   set CF_USER=%%a
   set CF_PASS=%%b
)

SET PYTHON_HOME=C:\Python36
SET MAVEN_HOME=C:\opt\apache\apache-maven-3.3.9

ECHO [behave.userdata] > %USERINI%
ECHO cf_apiurl = api.run.pcfbeta.io >> %USERINI%
ECHO cf_org = STEELTOE >> %USERINI%
ECHO cf_username = %CF_USER% >> %USERINI%
ECHO cf_password = %CF_PASS% >> %USERINI%

SET PATH=%PYTHON_HOME%\Scripts;%MAVEN_HOME%\bin;%PATH%

CALL %BASEDIR%\test-setup
CALL %BASEDIR%\test-run %*

@ECHO OFF

SET BASEDIR=%~dp0..
SET USERINI=%BASEDIR%\user.ini
FOR /F "tokens=1,2 delims=:" %%a in ("%STEELTOE_PCF_CREDENTIALS%") do (
   set CF_USER=%%a
   set CF_PASS=%%b
)

SET PYTHON_HOME=C:\Python36
SET DOTNET_HOME=C:\Program Files\dotnet
SET MAVEN_HOME=C:\opt\apache\apache-maven-3.3.9

ECHO [behave.userdata] > %USERINI%
ECHO cf_apiurl = api.run.pcfbeta.io >> %USERINI%
ECHO cf_org = STEELTOE >> %USERINI%
ECHO cf_username = %CF_USER% >> %USERINI%
ECHO cf_password = %CF_PASS% >> %USERINI%

SET PATH=%PYTHON_HOME%\Scripts;%DOTNET_HOME%;%MAVEN_HOME%\bin;%PATH%

CALL %BASEDIR%\test-setup
CALL %BASEDIR%\test-run %*

Update path to DotNet

Update path to DotNet


for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\compiler\" ^| findstr /V latest ^| sort`) do @set "LATEST_VERSION=%%f"
echo "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat"
echo "::set-output name=env_bat::C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat"

Add script to find latest oneAPI compiler environment script.


set SCRIPT=%0

rem determine Elasticsearch home; to do this, we strip from the path util we
rem find bin, and then strip bin (there is an assumption here that there is no
rem nested directory under bin also named bin)
for %%I in (%SCRIPT%) do set ES_HOME=%%~dpI

:es_home_loop
for %%I in ("%ES_HOME:~1,-1%") do set DIRNAME=%%~nxI
if not "%DIRNAME%" == "bin" (
  for %%I in ("%ES_HOME%..") do set ES_HOME=%%~dpfI
  goto es_home_loop
)
for %%I in ("%ES_HOME%..") do set ES_HOME=%%~dpfI

rem now set the classpath
set ES_CLASSPATH=!ES_HOME!\lib\*

rem now set the path to java
if defined JAVA_HOME (
  set JAVA="%JAVA_HOME%\bin\java.exe"
) else (
  for %%I in (java.exe) do set JAVA="%%~$PATH:I"
)

if not exist %JAVA% (
  echo could not find java; set JAVA_HOME or ensure java is in PATH 1>&2
  exit /B 1
)

rem check the Java version
%JAVA% -cp "%ES_CLASSPATH%" "org.elasticsearch.tools.JavaVersionChecker"

if errorlevel 1 (
  echo|set /p="the minimum required Java version is 8; "
  echo your Java version from %JAVA% does not meet this requirement
  exit /B 1
)

rem JAVA_OPTS is not a built-in JVM mechanism but some people think it is so we
rem warn them that we are not observing the value of %JAVA_OPTS%
if not "%JAVA_OPTS%" == "" (
  echo|set /p="warning: ignoring JAVA_OPTS=%JAVA_OPTS%; "
  echo pass JVM parameters via ES_JAVA_OPTS
)

if "%CONF_DIR%" == "" (
  set CONF_DIR=!ES_HOME!\config
)

set SCRIPT=%0

rem determine Elasticsearch home; to do this, we strip from the path until we
rem find bin, and then strip bin (there is an assumption here that there is no
rem nested directory under bin also named bin)
for %%I in (%SCRIPT%) do set ES_HOME=%%~dpI

:es_home_loop
for %%I in ("%ES_HOME:~1,-1%") do set DIRNAME=%%~nxI
if not "%DIRNAME%" == "bin" (
  for %%I in ("%ES_HOME%..") do set ES_HOME=%%~dpfI
  goto es_home_loop
)
for %%I in ("%ES_HOME%..") do set ES_HOME=%%~dpfI

rem now set the classpath
set ES_CLASSPATH=!ES_HOME!\lib\*

rem now set the path to java
if defined JAVA_HOME (
  set JAVA="%JAVA_HOME%\bin\java.exe"
) else (
  for %%I in (java.exe) do set JAVA="%%~$PATH:I"
)

if not exist %JAVA% (
  echo could not find java; set JAVA_HOME or ensure java is in PATH 1>&2
  exit /B 1
)

rem check the Java version
%JAVA% -cp "%ES_CLASSPATH%" "org.elasticsearch.tools.JavaVersionChecker"

if errorlevel 1 (
  echo|set /p="the minimum required Java version is 8; "
  echo your Java version from %JAVA% does not meet this requirement
  exit /B 1
)

rem JAVA_OPTS is not a built-in JVM mechanism but some people think it is so we
rem warn them that we are not observing the value of %JAVA_OPTS%
if not "%JAVA_OPTS%" == "" (
  echo|set /p="warning: ignoring JAVA_OPTS=%JAVA_OPTS%; "
  echo pass JVM parameters via ES_JAVA_OPTS
)

if "%CONF_DIR%" == "" (
  set CONF_DIR=!ES_HOME!\config
)

Fix typo in Windows elasticsearch-env script

This commit fixes a simple typo in the Windows version of the
elasticsearch-env script; this typo is harmless as it appears in a
comment.


:: ========================================================================================================
:: ==== <CONFIGURATION>
:: ========================================================================================================

:: Set the version of Visual Studio. This will just add a suffix to the string
:: of your directories to avoid mixing them up.
SET VS_VERSION=vs2013

:: Set this to the directory that contains vcvarsall.bat file of the
:: VC Visual Studio version you want to use for building ICU.
SET VISUAL_STUDIO_VC="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC"

:: Set this to the version of ICU you are building
SET V8_VERSION=3.31.74.1

:: x86_amd64 or x86
set ARCHITECTURE=%1

::x64 or ia32
set PLATFORM=%2

:: x64 or Win32
set MSPLATFORM=%3

:: 64 or 32
set SUFFIX=%4

:: ========================================================================================================
:: ==== <BUILD>
:: ========================================================================================================

call %VISUAL_STUDIO_VC%\vcvarsall.bat %ARCHITECTURE%

set CMD=-G msvs_version=2013
set CMD=%CMD% -Dtarget_arch=%PLATFORM%
set CMD=%CMD% -Dcomponent=static_library
set CMD=%CMD% -Dmode=release
set CMD=%CMD% -Dlibrary=static_library
set CMD=%CMD% -Dv8_use_snapshot=false

echo %CMD%

cd V8-%V8_VERSION%

python build\gyp_v8 %CMD%

cd build

:: DEBUG

rmdir /S /Q Debug
rmdir /S /Q Debug%SUFFIX%

msbuild All.sln /t:v8 /p:Configuration=Debug /p:Platform=%MSPLATFORM%
msbuild All.sln /t:v8_libbase /p:Configuration=Debug /p:Platform=%MSPLATFORM%
msbuild All.sln /t:v8_libplatform /p:Configuration=Debug /p:Platform=%MSPLATFORM%

cd ..\third_party\icu
msbuild icu.sln /t:icudata /p:Configuration=Debug /p:Platform=%MSPLATFORM%
msbuild icu.sln /t:icui18n /p:Configuration=Debug /p:Platform=%MSPLATFORM%
msbuild icu.sln /t:icuuc /p:Configuration=Debug /p:Platform=%MSPLATFORM%
cd ..\..\build

ren Debug Debug%SUFFIX%

:: RELEASE

rmdir /S /Q Release
rmdir /S /Q Release%SUFFIX%

msbuild All.sln /t:v8 /p:Configuration=Release /p:Platform=%MSPLATFORM%
msbuild All.sln /t:v8_libbase /p:Configuration=Release /p:Platform=%MSPLATFORM%
msbuild All.sln /t:v8_libplatform /p:Configuration=Release /p:Platform=%MSPLATFORM%

cd ..\third_party\icu
msbuild icu.sln /t:icudata /p:Configuration=Release /p:Platform=%MSPLATFORM%
msbuild icu.sln /t:icui18n /p:Configuration=Release /p:Platform=%MSPLATFORM%
msbuild icu.sln /t:icuuc /p:Configuration=Release /p:Platform=%MSPLATFORM%
cd ..\..\build

ren Release Release%SUFFIX%

cd ..
cd ..

exit

:: ========================================================================================================
:: ==== <CONFIGURATION>
:: ========================================================================================================

:: Set the version of Visual Studio. This will just add a suffix to the string
:: of your directories to avoid mixing them up.
SET VS_VERSION=vs2013

:: Set this to the directory that contains vcvarsall.bat file of the
:: VC Visual Studio version you want to use for building ICU.
SET VISUAL_STUDIO_VC="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC"

:: Set this to the version of ICU you are building
SET V8_VERSION=3.31.74.1

:: x86_amd64 or x86
set ARCHITECTURE=%1

::x64 or ia32
set PLATFORM=%2

:: x64 or Win32
set MSPLATFORM=%3

:: 64 or 32
set SUFFIX=%4

:: ========================================================================================================
:: ==== <BUILD>
:: ========================================================================================================

call %VISUAL_STUDIO_VC%\vcvarsall.bat %ARCHITECTURE%

set CMD=-G msvs_version=2013
set CMD=%CMD% -Dtarget_arch=%PLATFORM%
set CMD=%CMD% -Dcomponent=static_library
set CMD=%CMD% -Dmode=release
set CMD=%CMD% -Dlibrary=static_library
set CMD=%CMD% -Dv8_use_snapshot=false

echo %CMD%

cd V8-%V8_VERSION%

.\third_party\python_26\python.exe build\gyp_v8 %CMD%

cd build

:: DEBUG

rmdir /S /Q Debug
rmdir /S /Q Debug%SUFFIX%

msbuild All.sln /t:v8 /p:Configuration=Debug /p:Platform=%MSPLATFORM%
msbuild All.sln /t:v8_libbase /p:Configuration=Debug /p:Platform=%MSPLATFORM%
msbuild All.sln /t:v8_libplatform /p:Configuration=Debug /p:Platform=%MSPLATFORM%

cd ..\third_party\icu
msbuild icu.sln /t:icudata /p:Configuration=Debug /p:Platform=%MSPLATFORM%
msbuild icu.sln /t:icui18n /p:Configuration=Debug /p:Platform=%MSPLATFORM%
msbuild icu.sln /t:icuuc /p:Configuration=Debug /p:Platform=%MSPLATFORM%
cd ..\..\build

ren Debug Debug%SUFFIX%

:: RELEASE

rmdir /S /Q Release
rmdir /S /Q Release%SUFFIX%

msbuild All.sln /t:v8 /p:Configuration=Release /p:Platform=%MSPLATFORM%
msbuild All.sln /t:v8_libbase /p:Configuration=Release /p:Platform=%MSPLATFORM%
msbuild All.sln /t:v8_libplatform /p:Configuration=Release /p:Platform=%MSPLATFORM%

cd ..\third_party\icu
msbuild icu.sln /t:icudata /p:Configuration=Release /p:Platform=%MSPLATFORM%
msbuild icu.sln /t:icui18n /p:Configuration=Release /p:Platform=%MSPLATFORM%
msbuild icu.sln /t:icuuc /p:Configuration=Release /p:Platform=%MSPLATFORM%
cd ..\..\build

ren Release Release%SUFFIX%

cd ..
cd ..

exit

Use the python interpreter which V8 brings to run gyp.


@echo off
REM Update source for glslang, spirv-tools, and shaderc

REM
REM Copyright 2016 The Android Open Source Project
REM Copyright (C) 2015 Valve Corporation
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

setlocal EnableDelayedExpansion
set errorCode=0
set ANDROID_BUILD_DIR=%~dp0
set BUILD_DIR=%ANDROID_BUILD_DIR%..
set BASE_DIR=%BUILD_DIR%\external
set GLSLANG_DIR=%BASE_DIR%\glslang
set SPIRV_TOOLS_DIR=%BASE_DIR%\spirv-tools
set SHADERC_DIR=%BASE_DIR%\shaderc

for %%X in (where.exe) do (set FOUND=%%~$PATH:X)
if not defined FOUND (
   echo Dependency check failed:
   echo   where.exe not found
   echo   This script requires Windows Vista or later, which includes where.exe.
   set errorCode=1
)

where /q git.exe
if %ERRORLEVEL% equ 1 (
   echo Dependency check failed:
   echo   git.exe not found
   echo   Git for Windows can be downloaded here:  https://git-scm.com/download/win
   echo   Install and ensure git.exe makes it into your PATH
   set errorCode=1
)

where /q ndk-build.cmd
if %ERRORLEVEL% equ 1 (
   echo Dependency check failed:
   echo   ndk-build.cmd not found
   echo   Android NDK can be downloaded here:  http://developer.android.com/ndk/guides/setup.html
   echo   Install and ensure ndk-build.cmd makes it into your PATH
   set errorCode=1
)

REM ensure where is working with below false test
REM where /q foo
REM if %ERRORLEVEL% equ 1 (
REM echo foo
REM )

:main

if %errorCode% neq 0 (goto:error)

REM Read the target versions from external file, which is shared with Linux script

if not exist %ANDROID_BUILD_DIR%\glslang_revision_android (
   echo.
   echo Missing glslang_revision_android file. Place it in %ANDROID_BUILD_DIR%
   goto:error
)

if not exist %ANDROID_BUILD_DIR%\spirv-tools_revision_android (
   echo.
   echo Missing spirv-tools_revision_android file. Place it in %ANDROID_BUILD_DIR%
   set errorCode=1
   goto:error
)

if not exist %ANDROID_BUILD_DIR%\shaderc_revision_android (
   echo.
   echo Missing shaderc_revision_android file. Place it in %ANDROID_BUILD_DIR%
   set errorCode=1
   goto:error
)

set /p GLSLANG_REVISION= < glslang_revision_android
set /p SPIRV_TOOLS_REVISION= < spirv-tools_revision_android
set /p SHADERC_REVISION= < shaderc_revision_android
echo GLSLANG_REVISION=%GLSLANG_REVISION%
echo SPIRV_TOOLS_REVISION=%SPIRV_TOOLS_REVISION%
echo SHADERC_REVISION=%SHADERC_REVISION%

echo Creating and/or updating glslang, spirv-tools, shaderc in %BASE_DIR%

set sync-glslang=1
set sync-spirv-tools=1
set sync-shaderc=1
set build-shaderc=1

if %sync-glslang% equ 1 (
   if exist %GLSLANG_DIR% (
      rd /S /Q %GLSLANG_DIR%
   )
   if not exist %GLSLANG_DIR% (
      call:create_glslang
   )
   if %errorCode% neq 0 (goto:error)
   call:update_glslang
   if %errorCode% neq 0 (goto:error)
)

if %sync-spirv-tools% equ 1 (
   if exist %SPIRV_TOOLS_DIR% (
      rd /S /Q %SPIRV_TOOLS_DIR%
   )
   if %ERRORLEVEL% neq 0 (goto:error)
   if not exist %SPIRV_TOOLS_DIR% (
      call:create_spirv-tools
   )
   if %errorCode% neq 0 (goto:error)
   call:update_spirv-tools
   if %errorCode% neq 0 (goto:error)
)

if %sync-shaderc% equ 1 (
   if exist %SHADERC_DIR% (
      rd /S /Q %SHADERC_DIR%
   )
   if not exist %SHADERC_DIR% (
      call:create_shaderc
   )
   if %errorCode% neq 0 (goto:error)
   call:update_shaderc
   if %errorCode% neq 0 (goto:error)
)

if %build-shaderc% equ 1 (
   call:build_shaderc
   if %errorCode% neq 0 (goto:error)
)

echo.
echo Exiting
goto:finish

:error
echo.
echo Halting due to error
goto:finish

:finish
if not "%cd%\" == "%BUILD_DIR%" ( cd %BUILD_DIR% )
endlocal
goto:eof

REM // ======== Functions ======== //

:create_glslang
   echo.
   echo Creating local glslang repository %GLSLANG_DIR%
   mkdir %GLSLANG_DIR%
   cd %GLSLANG_DIR%
   git clone https://github.com/KhronosGroup/glslang.git .
   git checkout %GLSLANG_REVISION%
   if not exist %GLSLANG_DIR%\SPIRV (
      echo glslang source download failed!
      set errorCode=1
   )
goto:eof

:update_glslang
   echo.
   echo Updating %GLSLANG_DIR%
   cd %GLSLANG_DIR%
   git fetch --all
   git checkout %GLSLANG_REVISION%
   if not exist %GLSLANG_DIR%\SPIRV (
      echo glslang source update failed!
      set errorCode=1
   )
goto:eof

:create_spirv-tools
   echo.
   echo Creating local spirv-tools repository %SPIRV_TOOLS_DIR%
   mkdir %SPIRV_TOOLS_DIR%
   cd %SPIRV_TOOLS_DIR%
   git clone https://github.com/KhronosGroup/SPIRV-Tools.git .
   git checkout %SPIRV_TOOLS_REVISION%
   if not exist %SPIRV_TOOLS_DIR%\source (
      echo spirv-tools source download failed!
      set errorCode=1
   )
goto:eof

:update_spirv-tools
   echo.
   echo Updating %SPIRV_TOOLS_DIR%
   cd %SPIRV_TOOLS_DIR%
   git fetch --all
   git checkout %SPIRV_TOOLS_REVISION%
   if not exist %SPIRV_TOOLS_DIR%\source (
      echo spirv-tools source update failed!
      set errorCode=1
   )
goto:eof

:create_shaderc
   echo.
   echo Creating local shaderc repository %SHADERC_DIR%
   mkdir %SHADERC_DIR%
   cd %SHADERC_DIR%
   git clone git@github.com:google/shaderc.git .
   git checkout %SHADERC_REVISION%
   if not exist %SHADERC_DIR%\libshaderc (
      echo shaderc source download failed!
      set errorCode=1
   )
goto:eof

:update_shaderc
   echo.
   echo Updating %SHADERC_DIR%
   cd %SHADERC_DIR%
   git fetch --all
   git checkout %SHADERC_REVISION%
   if not exist %SHADERC_DIR%\libshaderc (
      echo shaderc source update failed!
      set errorCode=1
   )
goto:eof

:build_shaderc
   echo.
   echo Building %SHADERC_DIR%
   cd %SHADERC_DIR%\android_test
   echo Building shaderc with Android NDK
   call ndk-build THIRD_PARTY_PATH=../.. -j 4
   REM Check for existence of one lib, even though we should check for all results
   if not exist %SHADERC_DIR%\android_test\obj\local\x86\libshaderc.a (
      echo.
      echo shaderc build failed!
      set errorCode=1
   )
goto:eof

@echo off
REM Update source for glslang, spirv-tools, and shaderc

REM
REM Copyright 2016 The Android Open Source Project
REM Copyright (C) 2015 Valve Corporation
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

setlocal EnableDelayedExpansion
set errorCode=0
set ANDROID_BUILD_DIR=%~dp0
set BUILD_DIR=%ANDROID_BUILD_DIR%..
set BASE_DIR=%BUILD_DIR%\external
set GLSLANG_DIR=%BASE_DIR%\glslang
set SPIRV_TOOLS_DIR=%BASE_DIR%\spirv-tools
set SHADERC_DIR=%BASE_DIR%\shaderc

for %%X in (where.exe) do (set FOUND=%%~$PATH:X)
if not defined FOUND (
   echo Dependency check failed:
   echo   where.exe not found
   echo   This script requires Windows Vista or later, which includes where.exe.
   set errorCode=1
)

where /q git.exe
if %ERRORLEVEL% equ 1 (
   echo Dependency check failed:
   echo   git.exe not found
   echo   Git for Windows can be downloaded here:  https://git-scm.com/download/win
   echo   Install and ensure git.exe makes it into your PATH
   set errorCode=1
)

where /q ndk-build.cmd
if %ERRORLEVEL% equ 1 (
   echo Dependency check failed:
   echo   ndk-build.cmd not found
   echo   Android NDK can be downloaded here:  http://developer.android.com/ndk/guides/setup.html
   echo   Install and ensure ndk-build.cmd makes it into your PATH
   set errorCode=1
)

REM ensure where is working with below false test
REM where /q foo
REM if %ERRORLEVEL% equ 1 (
REM echo foo
REM )

:main

if %errorCode% neq 0 (goto:error)

REM Read the target versions from external file, which is shared with Linux script

if not exist %ANDROID_BUILD_DIR%\glslang_revision_android (
   echo.
   echo Missing glslang_revision_android file. Place it in %ANDROID_BUILD_DIR%
   goto:error
)

if not exist %ANDROID_BUILD_DIR%\spirv-tools_revision_android (
   echo.
   echo Missing spirv-tools_revision_android file. Place it in %ANDROID_BUILD_DIR%
   set errorCode=1
   goto:error
)

if not exist %ANDROID_BUILD_DIR%\shaderc_revision_android (
   echo.
   echo Missing shaderc_revision_android file. Place it in %ANDROID_BUILD_DIR%
   set errorCode=1
   goto:error
)

set /p GLSLANG_REVISION= < glslang_revision_android
set /p SPIRV_TOOLS_REVISION= < spirv-tools_revision_android
set /p SHADERC_REVISION= < shaderc_revision_android
echo GLSLANG_REVISION=%GLSLANG_REVISION%
echo SPIRV_TOOLS_REVISION=%SPIRV_TOOLS_REVISION%
echo SHADERC_REVISION=%SHADERC_REVISION%

echo Creating and/or updating glslang, spirv-tools, shaderc in %BASE_DIR%

set sync-glslang=1
set sync-spirv-tools=1
set sync-shaderc=1
set build-shaderc=1

if %sync-glslang% equ 1 (
   if exist %GLSLANG_DIR% (
      rd /S /Q %GLSLANG_DIR%
   )
   if not exist %GLSLANG_DIR% (
      call:create_glslang
   )
   if %errorCode% neq 0 (goto:error)
   call:update_glslang
   if %errorCode% neq 0 (goto:error)
)

if %sync-spirv-tools% equ 1 (
   if exist %SPIRV_TOOLS_DIR% (
      rd /S /Q %SPIRV_TOOLS_DIR%
   )
   if %ERRORLEVEL% neq 0 (goto:error)
   if not exist %SPIRV_TOOLS_DIR% (
      call:create_spirv-tools
   )
   if %errorCode% neq 0 (goto:error)
   call:update_spirv-tools
   if %errorCode% neq 0 (goto:error)
)

if %sync-shaderc% equ 1 (
   if exist %SHADERC_DIR% (
      rd /S /Q %SHADERC_DIR%
   )
   if not exist %SHADERC_DIR% (
      call:create_shaderc
   )
   if %errorCode% neq 0 (goto:error)
   call:update_shaderc
   if %errorCode% neq 0 (goto:error)
)

if %build-shaderc% equ 1 (
   call:build_shaderc
   if %errorCode% neq 0 (goto:error)
)

echo.
echo Exiting
goto:finish

:error
echo.
echo Halting due to error
goto:finish

:finish
if not "%cd%\" == "%BUILD_DIR%" ( cd %BUILD_DIR% )
endlocal
goto:eof

REM // ======== Functions ======== //

:create_glslang
   echo.
   echo Creating local glslang repository %GLSLANG_DIR%
   mkdir %GLSLANG_DIR%
   cd %GLSLANG_DIR%
   git clone https://github.com/KhronosGroup/glslang.git .
   git checkout %GLSLANG_REVISION%
   if not exist %GLSLANG_DIR%\SPIRV (
      echo glslang source download failed!
      set errorCode=1
   )
goto:eof

:update_glslang
   echo.
   echo Updating %GLSLANG_DIR%
   cd %GLSLANG_DIR%
   git fetch --all
   git checkout %GLSLANG_REVISION%
   if not exist %GLSLANG_DIR%\SPIRV (
      echo glslang source update failed!
      set errorCode=1
   )
goto:eof

:create_spirv-tools
   echo.
   echo Creating local spirv-tools repository %SPIRV_TOOLS_DIR%
   mkdir %SPIRV_TOOLS_DIR%
   cd %SPIRV_TOOLS_DIR%
   git clone https://github.com/KhronosGroup/SPIRV-Tools.git .
   git checkout %SPIRV_TOOLS_REVISION%
   if not exist %SPIRV_TOOLS_DIR%\source (
      echo spirv-tools source download failed!
      set errorCode=1
   )
goto:eof

:update_spirv-tools
   echo.
   echo Updating %SPIRV_TOOLS_DIR%
   cd %SPIRV_TOOLS_DIR%
   git fetch --all
   git checkout %SPIRV_TOOLS_REVISION%
   if not exist %SPIRV_TOOLS_DIR%\source (
      echo spirv-tools source update failed!
      set errorCode=1
   )
goto:eof

:create_shaderc
   echo.
   echo Creating local shaderc repository %SHADERC_DIR%
   mkdir %SHADERC_DIR%
   cd %SHADERC_DIR%
   git clone https://github.com/google/shaderc.git .
   git checkout %SHADERC_REVISION%
   if not exist %SHADERC_DIR%\libshaderc (
      echo shaderc source download failed!
      set errorCode=1
   )
goto:eof

:update_shaderc
   echo.
   echo Updating %SHADERC_DIR%
   cd %SHADERC_DIR%
   git fetch --all
   git checkout %SHADERC_REVISION%
   if not exist %SHADERC_DIR%\libshaderc (
      echo shaderc source update failed!
      set errorCode=1
   )
goto:eof

:build_shaderc
   echo.
   echo Building %SHADERC_DIR%
   cd %SHADERC_DIR%\android_test
   echo Building shaderc with Android NDK
   call ndk-build THIRD_PARTY_PATH=../.. -j 4
   REM Check for existence of one lib, even though we should check for all results
   if not exist %SHADERC_DIR%\android_test\obj\local\x86\libshaderc.a (
      echo.
      echo shaderc build failed!
      set errorCode=1
   )
goto:eof

toolchain: Simplify shaderc setup for Windows too, per dc0ac6bc