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

@REM ----------------------------------------------------------------------------
@REM Maven2 Bootstrap Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM M2_HOME - location of maven2's installed home dir
@REM
@REM Optional ENV vars
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven2 bootstrap
@REM     e.g. to run in offline mode, use
@REM set MAVEN_OPTS=-Dmaven.online=false
@REM ----------------------------------------------------------------------------

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

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

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

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

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

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

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

echo.
echo ERROR: M2_HOME not found in your environment.
echo Please set the M2_HOME variable in your environment to match the
echo location of the Maven installation
echo.
goto end
@REM ==== END VALIDATION ====

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

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

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

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

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

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

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

@REM Build MBoot2
cd maven-mboot2

call .\build

@REM Build Maven2
cd ..

%MAVEN_JAVA_EXE% %MAVEN_OPTS% -jar mboot.jar %MAVEN_CMD_LINE_ARGS%

echo Rebuilding maven2 plugins
cd maven-plugins
call m2 --no-plugin-updates --batch-mode -DupdateReleaseInfo=true -e %MAVEN_CMD_LINE_ARGS% clean:clean install
cd ..

echo Running integration tests
cd maven-core-it
call maven-core-it
cd ..

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

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

:endNT
@endlocal

:postExec
@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause

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

@REM ----------------------------------------------------------------------------
@REM Maven2 Bootstrap Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM M2_HOME - location of maven2's installed home dir
@REM
@REM Optional ENV vars
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven2 bootstrap
@REM     e.g. to run in offline mode, use
@REM set MAVEN_OPTS=-Dmaven.online=false
@REM ----------------------------------------------------------------------------

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

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

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

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

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

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

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

echo.
echo ERROR: M2_HOME not found in your environment.
echo Please set the M2_HOME variable in your environment to match the
echo location of the Maven installation
echo.
goto end
@REM ==== END VALIDATION ====

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

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

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

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

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

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

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

@REM Build MBoot2
cd maven-mboot2

call .\build

@REM Build Maven2
cd ..

%MAVEN_JAVA_EXE% %MAVEN_OPTS% -jar mboot.jar %MAVEN_CMD_LINE_ARGS%

@REM I Really Don't want to be rebuilding these (Especially the reports) every time, but
@REM until we regularly push them to the repository and the integration tests rely on
@REM some of these plugins, there is no choice
echo Rebuilding maven2 plugins
cd maven-plugins
@REM update the release info to ensure these versions get used in the integration tests
call m2 --no-plugin-updates --batch-mode -DupdateReleaseInfo=true -e %MAVEN_CMD_LINE_ARGS% clean:clean install
cd ..

echo Rebuilding maven2 reports
cd maven-reports
@REM update the release info to ensure these versions get used in the integration tests
call m2 --no-plugin-updates --batch-mode -DupdateReleaseInfo=true -e %MAVEN_CMD_LINE_ARGS% clean:clean install
cd ..

echo Running integration tests
cd maven-core-it
call maven-core-it
cd ..

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

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

:endNT
@endlocal

:postExec
@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause

synchronize with m2-bootstrap-all.sh

synchronize with m2-bootstrap-all.sh

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


@echo off

:: Pick your architecture, 32 or 64 bits
rem set COMPILER="NMake Makefiles"
rem set COMPILER="Visual Studio 10 Win64"
set COMPILER="Visual Studio 10"

:: Pick your build type
rem set BUILD_TYPE=Release
set BUILD_TYPE=Debug

:: Set some useful path variables
::    "utils" is where you might have libraries installed, like Boost
::    "dev" is where you build things yourself, like PDAL and laszip
set UTILS_DIR=d:\utils
set DEV_DIR=d:\dev

:: Where is your OSGeo4W installed?
set OSGEO4W_DIR=C:\OSGeo4W

:: Where is boost installed?
set BOOST_DIR=%UTILS_DIR%\boost_1_47

:: Where are the GLUT libs installed?
::  (only needed if you want to build pcview)
set FREEGLUT_DIR=%DEV_DIR%\freeglut-2.6.0-3.mp
set GLUT_DIR=%DEV_DIR%\freeglut-2.6.0-3.mp

:: Where is LASZIP?  (can be either from OSGeo4W or your own build tree)
rem  set LASZIP_LIBRARY=%OSGEO4W_DIR%\laszip\laszip.lib
rem  set LASZIP_INCLUDE_DIR=%OSGEO4W_DIR%\laszip\include
set LASZIP_LIBRARY=%DEV_DIR%\laszip\bin\Debug\Debug\laszip.lib
set LASZIP_INCLUDE_DIR=%DEV_DIR%\laszip\include

:: Where is LIBLAS?  (can be either from OSGeo4W or your own build tree)
rem  set LIBLAS_LIBRARY=%OSGEO4W_DIR%\lib\liblas.lib
rem  set LIBLAS_INCLUDE_DIR=%OSGEO4W_DIR%\include
rem set LIBLAS_LIBRARY=%DEV_DIR%\liblas\bin\Debug\Debug\liblas.lib
rem set LIBLAS_INCLUDE_DIR=%DEV_DIR%\liblas\include

:: Where is your PDAL build tree?
set PDAL_DIR=%DEV_DIR%\pdal

:: Where are the OCI libraries installed?
set ORACLE_HOME=%OSGEO4W_DIR%

:: Set this if you are building SWIG bindings for C#.  Visual Studio
:: needs to use this env var to find where boost lives.
set PDAL_SWIG_BOOST_HOME=%BOOST_DIR%

:: If you set the above stuff correctly, then you should only need to
:: modify the "WITH" (on/off) settings in the following CMAKE invocation.
::
:: For most people, you should have these turned ON:
::    GDAL
::    GEOTIFF
::    ORACLE
::    LASZIP
::    LIBXML2
:: and these turned OFF:
::    LIBLAS
::    FREEGLUT
::    SWIG_CSHARP
cmake -G %COMPILER% ^
    -DBOOST_INCLUDEDIR=%BOOST_DIR% ^
    -DWITH_GDAL=ON ^
    -DWITH_GEOTIFF=ON ^
    -DWITH_ORACLE=ON ^
    -DWITH_LASZIP=ON ^
    -DWITH_LIBLAS=OFF ^
    -DWITH_FREEGLUT=ON ^
    -DWITH_LIBXML2=ON ^
    -DWITH_SWIG_CSHARP=ON ^
    -DFREEGLUT_LIBRARY=%FREEGLUT_DIR%\lib\freeglut.lib ^
    -DFREEGLUT_INCLUDE_DIR=%FREEGLUT_DIR%\include ^
    -DGLUT_LIBRARY=%FREEGLUT_DIR%\lib ^
    -DGLUT_INCLUDE_DIR=%FREEGLUT_DIR%\include ^
    -DTIFF_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
    -DTIFF_LIBRARY=%OSGEO4W_DIR%\lib\libtiff_i.lib ^
    -DGEOTIFF_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
    -DGEOTIFF_LIBRARY=%OSGEO4W_DIR%\lib\geotiff_i.lib ^
    -DGDAL_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
    -DGDAL_LIBRARY=%OSGEO4W_DIR%\lib\gdal_i.lib ^
    -DORACLE_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
    -DORACLE_OCI_LIBRARY=%OSGEO4W_DIR%\lib\oci.lib ^
    -DLASZIP_INCLUDE_DIR=%LASZIP_INCLUDE_DIR% ^
    -DLASZIP_LIBRARY=%LASZIP_LIBRARY% ^
    -DLIBXML2_LIBRARIES=%OSGEO4W_DIR%\lib\libxml2.lib ^
    -DLIBXML2_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
	-DICONV_LIBRARY=%OSGEO4W_DIR%\lib\iconv.lib ^
	-DICONV_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
    -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
    -DCMAKE_VERBOSE_MAKEFILE=OFF ^
    %PDAL_DIR%

rem     -DLIBLAS_INCLUDE_DIR=%LIBLAS_INCLUDE_DIR% ^
rem     -DLIBLAS_LIBRARY=%LIBLAS_LIBRARY% ^

@echo off

:: Pick your architecture, 32 or 64 bits
rem set COMPILER="NMake Makefiles"
rem set COMPILER="Visual Studio 10 Win64"
set COMPILER="Visual Studio 10"

:: Pick your build type
rem set BUILD_TYPE=Release
set BUILD_TYPE=Debug

:: Set some useful path variables
::    "utils" is where you might have libraries installed, like Boost
::    "dev" is where you build things yourself, like PDAL and laszip
set UTILS_DIR=d:\utils
set DEV_DIR=d:\dev

:: Where is your OSGeo4W installed?
set OSGEO4W_DIR=C:\OSGeo4W

:: Where is boost installed?
set BOOST_DIR=%UTILS_DIR%\boost_1_47

:: Where are the GLUT libs installed?
::  (only needed if you want to build pcview)
set FREEGLUT_DIR=%DEV_DIR%\freeglut-2.6.0-3.mp
set GLUT_DIR=%DEV_DIR%\freeglut-2.6.0-3.mp

:: Where is LASZIP?  (can be either from OSGeo4W or your own build tree)
rem  set LASZIP_LIBRARY=%OSGEO4W_DIR%\laszip\laszip.lib
rem  set LASZIP_INCLUDE_DIR=%OSGEO4W_DIR%\laszip\include
set LASZIP_LIBRARY=%DEV_DIR%\laszip\bin\Debug\Debug\laszip.lib
set LASZIP_INCLUDE_DIR=%DEV_DIR%\laszip\include

:: Where is LIBLAS?  (can be either from OSGeo4W or your own build tree)
rem  set LIBLAS_LIBRARY=%OSGEO4W_DIR%\lib\liblas.lib
rem  set LIBLAS_INCLUDE_DIR=%OSGEO4W_DIR%\include
rem set LIBLAS_LIBRARY=%DEV_DIR%\liblas\bin\Debug\Debug\liblas.lib
rem set LIBLAS_INCLUDE_DIR=%DEV_DIR%\liblas\include

:: Where is your PDAL build tree?
set PDAL_DIR=%DEV_DIR%\pdal

:: Where are the OCI libraries installed?
set ORACLE_HOME=%OSGEO4W_DIR%

:: Set this if you are building SWIG bindings for C#.  Visual Studio
:: needs to use this env var to find where boost lives.
set PDAL_SWIG_BOOST_HOME=%BOOST_DIR%

:: If you set the above stuff correctly, then you should only need to
:: modify the "WITH" (on/off) settings in the following CMAKE invocation.
::
:: For most people, you should have these turned ON:
::    GDAL
::    GEOTIFF
::    ORACLE
::    LASZIP
::    LIBXML2
:: and these turned OFF:
::    LIBLAS
::    FREEGLUT
::    SWIG_CSHARP
cmake -G %COMPILER% ^
    -DBOOST_INCLUDEDIR=%BOOST_DIR% ^
    -DWITH_GDAL=ON ^
    -DWITH_GEOTIFF=ON ^
    -DWITH_ORACLE=ON ^
    -DWITH_LASZIP=ON ^
    -DWITH_LIBLAS=OFF ^
    -DWITH_FREEGLUT=ON ^
    -DWITH_LIBXML2=ON ^
    -DWITH_SWIG_CSHARP=ON ^
	-DWITH_PLANG=ON ^
    -DFREEGLUT_LIBRARY=%FREEGLUT_DIR%\lib\freeglut.lib ^
    -DFREEGLUT_INCLUDE_DIR=%FREEGLUT_DIR%\include ^
    -DGLUT_LIBRARY=%FREEGLUT_DIR%\lib ^
    -DGLUT_INCLUDE_DIR=%FREEGLUT_DIR%\include ^
    -DTIFF_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
    -DTIFF_LIBRARY=%OSGEO4W_DIR%\lib\libtiff_i.lib ^
    -DGEOTIFF_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
    -DGEOTIFF_LIBRARY=%OSGEO4W_DIR%\lib\geotiff_i.lib ^
    -DGDAL_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
    -DGDAL_LIBRARY=%OSGEO4W_DIR%\lib\gdal_i.lib ^
    -DORACLE_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
    -DORACLE_OCI_LIBRARY=%OSGEO4W_DIR%\lib\oci.lib ^
    -DLASZIP_INCLUDE_DIR=%LASZIP_INCLUDE_DIR% ^
    -DLASZIP_LIBRARY=%LASZIP_LIBRARY% ^
    -DLIBXML2_LIBRARIES=%OSGEO4W_DIR%\lib\libxml2.lib ^
    -DLIBXML2_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
	-DICONV_LIBRARY=%OSGEO4W_DIR%\lib\iconv.lib ^
	-DICONV_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
    -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
    -DCMAKE_VERBOSE_MAKEFILE=OFF ^
    %PDAL_DIR%

rem     -DLIBLAS_INCLUDE_DIR=%LIBLAS_INCLUDE_DIR% ^
rem     -DLIBLAS_LIBRARY=%LIBLAS_LIBRARY% ^

use PLANG by default

use PLANG by default


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

:: This script will try to find if svn and python are accessible and it not,
:: it will try to download it and 'install' it in depot_tools.

:: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly
:: returned.

set WIN_TOOLS_ROOT_URL=https://src.chromium.org/svn/trunk/tools
:: It used to be %~dp0 but ADODB.Stream may fail to write to this directory if
:: the directory DACL is set to elevated integrity level.
set ZIP_DIR=%TEMP%

:: Get absolute root directory (.js scripts don't handle relative paths well).
pushd %~dp0..\..
set WIN_TOOLS_ROOT_DIR=%CD%
popd

if "%1" == "force" (
  set WIN_TOOLS_FORCE=1
  shift /1
)

:PYTHON_CHECK
if not exist "%WIN_TOOLS_ROOT_DIR%\python276_bin" goto :PY27_INSTALL
if not exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :PY27_INSTALL
set ERRORLEVEL=0
goto :GIT_CHECK

:PY27_INSTALL
echo Installing python 2.7.6...
:: Cleanup python directory if it was existing.
if exist "%WIN_TOOLS_ROOT_DIR%\python276_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\python276_bin"
if exist "%ZIP_DIR%\python276.zip" del "%ZIP_DIR%\python276.zip"
echo Fetching from %WIN_TOOLS_ROOT_URL%/third_party/python276_bin.zip
cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party/python276_bin.zip "%ZIP_DIR%\python276_bin.zip"
if errorlevel 1 goto :PYTHON_FAIL
:: Will create python276_bin\...
cscript //nologo //e:jscript "%~dp0unzip.js" "%ZIP_DIR%\python276_bin.zip" "%WIN_TOOLS_ROOT_DIR%"
:: Create the batch files.
call copy /y "%~dp0python276.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul
call copy /y "%~dp0pylint.new.bat" "%WIN_TOOLS_ROOT_DIR%\pylint.bat" 1>nul
del "%ZIP_DIR%\python276_bin.zip"
set ERRORLEVEL=0
goto :GIT_CHECK

:PYTHON_FAIL
echo ... Failed to checkout python automatically.
echo You should get the "prebaked" version at %WIN_TOOLS_ROOT_URL%/third_party/
set ERRORLEVEL=1
goto :END

:GIT_CHECK

:: See if we're on XP
for /f "tokens=2 delims=[]" %%i in ('ver') do set VERSTR=%%i
for /f "tokens=2,3 delims=. " %%i in ("%VERSTR%") do (set VERMAJOR=%%i & set VERMINOR=%%j)
if %VERMAJOR% lss 5 set GIT_VERSION=%GIT_VERSION%-xp
if %VERMAJOR% equ 5 if %VERMINOR% lss 2 set XP_SUFFIX=-xp

:: must explicitly use FIND_EXE to prevent this from grabbing e.g. gnuwin32 or
:: msys versions.
set FIND_EXE=%SYSTEMROOT%\System32\find.exe

:: Check to see if we're on a 32 or 64 bit system
:: (parens) are necessary, otherwise batch puts an extra space after 32.
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | %FIND_EXE% /i "x86" > NUL && (set OS_BITS=32) || (set OS_BITS=64)

if not exist "%WIN_TOOLS_ROOT_DIR%\.git_bleeding_edge" goto :GIT_OLD_FLOW
set GIT_PORTABLE_FLOW=1
set GIT_VERSION=2.7.4-%OS_BITS%
set GIT_FETCH_URL=https://commondatastorage.googleapis.com/chrome-infra/PortableGit-%GIT_VERSION%-bit.7z.exe
set GIT_DOWNLOAD_PATH=%ZIP_DIR%\git.7z.exe
set GIT_BIN_DIR=git-%GIT_VERSION%_bin
set GIT_INST_DIR=%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%
set GIT_EXE_PATH=%GIT_INST_DIR%\bin\git.exe
goto :GIT_CLEANUP

:GIT_OLD_FLOW
set GIT_VERSION=1.9.5.chromium.6%XP_SUFFIX%
set GIT_BIN_DIR=git-%GIT_VERSION%_bin
set GIT_FETCH_URL=https://commondatastorage.googleapis.com/chrome-infra/%GIT_BIN_DIR%.zip
set GIT_DOWNLOAD_PATH=%ZIP_DIR%\git.zip
set GIT_INST_DIR=%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%
set GIT_EXE_PATH=%GIT_INST_DIR%\cmd\git.cmd

:GIT_CLEANUP
:: Clean up any release which doesn't match the one we want.
for /d %%i in ("%WIN_TOOLS_ROOT_DIR%\git-*_bin") do (
  if not "%%i" == "%WIN_TOOLS_ROOT_DIR%\git-%GIT_VERSION%_bin" (
    echo Cleaning old git installation %%i
    rmdir /s /q "%%i"
  )
)

if "%WIN_TOOLS_FORCE%" == "1" goto :GIT_INSTALL

if exist "%GIT_EXE_PATH%" (
  call "%GIT_EXE_PATH%" --version 2>nul 1>nul
  if errorlevel 1 goto :GIT_INSTALL
  rem Several git versions can live side-by-side; check the top-level
  rem batch script to make sure it points to the desired version.
  find "%GIT_BIN_DIR%" "%WIN_TOOLS_ROOT_DIR%\git.bat" 2>nul 1>nul
  if errorlevel 1 goto :GIT_MAKE_BATCH_FILES
  goto :SYNC_GIT_HELP_FILES
)
goto :GIT_INSTALL

:GIT_INSTALL
echo Installing git %GIT_VERSION% (avg 1-2 min download) ...
echo Detected: %OS_BITS% bits
if defined XP_SUFFIX         echo ... Windows XP
if defined GIT_PORTABLE_FLOW echo ... Portable installation flow

:: git is not accessible; check it out and create 'proxy' files.
if exist "%GIT_DOWNLOAD_PATH%" del "%GIT_DOWNLOAD_PATH%"
echo Fetching from %GIT_FETCH_URL%
cscript //nologo //e:jscript "%~dp0get_file.js" %GIT_FETCH_URL% "%GIT_DOWNLOAD_PATH%"
if errorlevel 1 goto :GIT_FAIL
:: Cleanup git directory if it already exists.
if exist "%GIT_INST_DIR%\." rd /q /s "%GIT_INST_DIR%"

if defined GIT_PORTABLE_FLOW (
  rem run PortableGit self-extractor
  rem -y : Be Quiet ("yes")
  rem -sd1 : Self delete SFX archive
  rem -InstallPath : Where to put the files
  rem -Directory : Run the post-extract program with this current-working-directory
  call "%GIT_DOWNLOAD_PATH%" -y -sd1 -InstallPath="%GIT_INST_DIR%" -Directory="%GIT_INST_DIR%"
) else (
  rem Will create %GIT_INST_DIR%\...
  cscript //nologo //e:jscript "%~dp0unzip.js" "%GIT_DOWNLOAD_PATH%" "%WIN_TOOLS_ROOT_DIR%"
)

if errorlevel 1 goto :GIT_FAIL
del "%GIT_DOWNLOAD_PATH%"
if not exist "%GIT_INST_DIR%\." goto :GIT_FAIL

:GIT_MAKE_BATCH_FILES
:: Create the batch files.
set GIT_TEMPL=%~dp0git.template.bat
set SED=%GIT_INST_DIR%\usr\bin\sed.exe
if defined GIT_PORTABLE_FLOW (
  rem turns out we just installed sed :)
  call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/cmd\\\\git.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\git.bat"
  call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/cmd\\\\gitk.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\gitk.bat"
  call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh.bat"
  call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh-keygen.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh-keygen.bat"
) else (
  call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\git.bat" "%WIN_TOOLS_ROOT_DIR%\git.bat" 1>nul
  call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\gitk.bat" "%WIN_TOOLS_ROOT_DIR%\gitk.bat" 1>nul
  call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\ssh.bat" "%WIN_TOOLS_ROOT_DIR%\ssh.bat" 1>nul
  call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\ssh-keygen.bat" "%WIN_TOOLS_ROOT_DIR%\ssh-keygen.bat" 1>nul
)

:: Ensure autocrlf and filemode are set correctly.
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.autocrlf false
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.filemode false
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.preloadindex true
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.fscache true

:SYNC_GIT_HELP_FILES
:: Copy all the depot_tools docs into the mingw64 git docs root.
:: /i : Make sure xcopy knows that the destination names a folder, not a file
:: /q : Make xcopy quiet (though it still prints a `X File(s) copied` message
::      which is why we have the > NUL)
:: /d : Copy source files that are newer than the corresponding destination
::      files only. This prevents excessive copying when none of the docs
::      actually changed.
:: /y : Don't prompt for overwrites (yes)
if defined GIT_PORTABLE_FLOW (
  xcopy /i /q /d /y "%WIN_TOOLS_ROOT_DIR%\man\html\*" "%GIT_INST_DIR%\mingw64\share\doc\git-doc" > NUL
)
goto :SVN_CHECK

:GIT_FAIL
echo ... Failed to checkout git automatically.
echo You should get the "prebaked" version used at %GIT_FETCH_URL%
set ERRORLEVEL=1
goto :END

:SVN_CHECK
:: If the batch file exists, skip the svn check.
if exist "%WIN_TOOLS_ROOT_DIR%\svn.bat" goto :END
if "%WIN_TOOLS_FORCE%" == "1" goto :SVN_INSTALL
call svn --version 2>nul 1>nul
if errorlevel 1 goto :SVN_INSTALL
goto :END

:SVN_INSTALL
echo Installing subversion ...
:: svn is not accessible; check it out and create 'proxy' files.
if exist "%ZIP_DIR%\svn.zip" del "%ZIP_DIR%\svn.zip"
echo Fetching from %WIN_TOOLS_ROOT_URL%/third_party/svn_bin.zip
cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party/svn_bin.zip "%ZIP_DIR%\svn.zip"
if errorlevel 1 goto :SVN_FAIL
:: Cleanup svn directory if it was existing.
if exist "%WIN_TOOLS_ROOT_DIR%\svn\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\svn"
if exist "%WIN_TOOLS_ROOT_DIR%\svn_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\svn_bin"
:: Will create svn_bin\...
cscript //nologo //e:jscript "%~dp0unzip.js" "%ZIP_DIR%\svn.zip" "%WIN_TOOLS_ROOT_DIR%"
if errorlevel 1 goto :SVN_FAIL
if not exist "%WIN_TOOLS_ROOT_DIR%\svn_bin\." goto :SVN_FAIL
del "%ZIP_DIR%\svn.zip"
:: Create the batch file.
call copy /y "%~dp0svn.new.bat" "%WIN_TOOLS_ROOT_DIR%\svn.bat" 1>nul
call copy /y "%~dp0svnversion.new.bat" "%WIN_TOOLS_ROOT_DIR%\svnversion.bat" 1>nul
goto :END

:SVN_FAIL
echo ... Failed to checkout svn automatically.
echo You should get the "prebaked" version at %WIN_TOOLS_ROOT_URL%/third_party/
set ERRORLEVEL=1
goto :END

:returncode
set WIN_TOOLS_ROOT_URL=
set WIN_TOOLS_ROOT_DIR=
exit /b %ERRORLEVEL%

:END
call :returncode %ERRORLEVEL%

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

:: This script will try to find if svn and python are accessible and it not,
:: it will try to download it and 'install' it in depot_tools.

:: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly
:: returned.

set WIN_TOOLS_ROOT_URL=https://src.chromium.org/svn/trunk/tools
:: It used to be %~dp0 but ADODB.Stream may fail to write to this directory if
:: the directory DACL is set to elevated integrity level.
set ZIP_DIR=%TEMP%

:: Get absolute root directory (.js scripts don't handle relative paths well).
pushd %~dp0..\..
set WIN_TOOLS_ROOT_DIR=%CD%
popd

if "%1" == "force" (
  set WIN_TOOLS_FORCE=1
  shift /1
)

:PYTHON_CHECK
if not exist "%WIN_TOOLS_ROOT_DIR%\python276_bin" goto :PY27_INSTALL
if not exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :PY27_INSTALL
set ERRORLEVEL=0
goto :GIT_CHECK

:PY27_INSTALL
echo Installing python 2.7.6...
:: Cleanup python directory if it was existing.
if exist "%WIN_TOOLS_ROOT_DIR%\python276_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\python276_bin"
if exist "%ZIP_DIR%\python276.zip" del "%ZIP_DIR%\python276.zip"
echo Fetching from %WIN_TOOLS_ROOT_URL%/third_party/python276_bin.zip
cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party/python276_bin.zip "%ZIP_DIR%\python276_bin.zip"
if errorlevel 1 goto :PYTHON_FAIL
:: Will create python276_bin\...
cscript //nologo //e:jscript "%~dp0unzip.js" "%ZIP_DIR%\python276_bin.zip" "%WIN_TOOLS_ROOT_DIR%"
:: Create the batch files.
call copy /y "%~dp0python276.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul
call copy /y "%~dp0pylint.new.bat" "%WIN_TOOLS_ROOT_DIR%\pylint.bat" 1>nul
del "%ZIP_DIR%\python276_bin.zip"
set ERRORLEVEL=0
goto :GIT_CHECK

:PYTHON_FAIL
echo ... Failed to checkout python automatically.
echo You should get the "prebaked" version at %WIN_TOOLS_ROOT_URL%/third_party/
set ERRORLEVEL=1
goto :END

:GIT_CHECK

:: must explicitly use FIND_EXE to prevent this from grabbing e.g. gnuwin32 or
:: msys versions.
set FIND_EXE=%SYSTEMROOT%\System32\find.exe

:: Check to see if we're on a 32 or 64 bit system
:: (parens) are necessary, otherwise batch puts an extra space after 32.
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | %FIND_EXE% /i "x86" > NUL && (set OS_BITS=32) || (set OS_BITS=64)

if not exist "%WIN_TOOLS_ROOT_DIR%\.git_bleeding_edge" (
  set GIT_VERSION=2.7.4
) else (
  set GIT_VERSION=2.7.4
)
set GIT_VERSION=%GIT_VERSION%-%OS_BITS%

set GIT_FETCH_URL=https://commondatastorage.googleapis.com/chrome-infra/PortableGit-%GIT_VERSION%-bit.7z.exe
set GIT_DOWNLOAD_PATH=%ZIP_DIR%\git.7z.exe
set GIT_BIN_DIR=git-%GIT_VERSION%_bin
set GIT_INST_DIR=%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%
set GIT_EXE_PATH=%GIT_INST_DIR%\bin\git.exe

:: Clean up any release which doesn't match the one we want.
for /d %%i in ("%WIN_TOOLS_ROOT_DIR%\git-*_bin") do (
  if not "%%i" == "%WIN_TOOLS_ROOT_DIR%\git-%GIT_VERSION%_bin" (
    echo Cleaning old git installation %%i
    rmdir /s /q "%%i"
  )
)

if "%WIN_TOOLS_FORCE%" == "1" goto :GIT_INSTALL

if exist "%GIT_EXE_PATH%" (
  call "%GIT_EXE_PATH%" --version 2>nul 1>nul
  if errorlevel 1 goto :GIT_INSTALL
  rem Several git versions can live side-by-side; check the top-level
  rem batch script to make sure it points to the desired version.
  find "%GIT_BIN_DIR%" "%WIN_TOOLS_ROOT_DIR%\git.bat" 2>nul 1>nul
  if errorlevel 1 goto :GIT_MAKE_BATCH_FILES
  goto :SYNC_GIT_HELP_FILES
)

:GIT_INSTALL
echo Installing git %GIT_VERSION% (avg 1-2 min download) ...

if exist "%GIT_DOWNLOAD_PATH%" del "%GIT_DOWNLOAD_PATH%"
echo Fetching from %GIT_FETCH_URL%
cscript //nologo //e:jscript "%~dp0get_file.js" %GIT_FETCH_URL% "%GIT_DOWNLOAD_PATH%"
if errorlevel 1 goto :GIT_FAIL
:: Cleanup git directory if it already exists.
if exist "%GIT_INST_DIR%\." rd /q /s "%GIT_INST_DIR%"

:: run PortableGit self-extractor
:: -y : Be Quiet ("yes")
:: -sd1 : Self delete SFX archive
:: -InstallPath : Where to put the files
:: -Directory : Run the post-extract program with this current-working-directory
call "%GIT_DOWNLOAD_PATH%" -y -sd1 -InstallPath="%GIT_INST_DIR%" -Directory="%GIT_INST_DIR%"
if errorlevel 1 goto :GIT_FAIL

del "%GIT_DOWNLOAD_PATH%"
if not exist "%GIT_INST_DIR%\." goto :GIT_FAIL

:GIT_MAKE_BATCH_FILES
:: Create the batch files.
set GIT_TEMPL=%~dp0git.template.bat
set SED=%GIT_INST_DIR%\usr\bin\sed.exe
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/cmd\\\\git.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\git.bat"
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/cmd\\\\gitk.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\gitk.bat"
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh.bat"
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh-keygen.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh-keygen.bat"

:: Ensure various git configurations are set correctly at they system level.
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.autocrlf false
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.filemode false
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.preloadindex true
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.fscache true

:SYNC_GIT_HELP_FILES
:: Copy all the depot_tools docs into the mingw64 git docs root.
:: /i : Make sure xcopy knows that the destination names a folder, not a file
:: /q : Make xcopy quiet (though it still prints a `X File(s) copied` message
::      which is why we have the > NUL)
:: /d : Copy source files that are newer than the corresponding destination
::      files only. This prevents excessive copying when none of the docs
::      actually changed.
:: /y : Don't prompt for overwrites (yes)
xcopy /i /q /d /y "%WIN_TOOLS_ROOT_DIR%\man\html\*" "%GIT_INST_DIR%\mingw64\share\doc\git-doc" > NUL

goto :SVN_CHECK

:GIT_FAIL
echo ... Failed to checkout git automatically.
echo You should get the "prebaked" version used at %GIT_FETCH_URL%
set ERRORLEVEL=1
goto :END

:SVN_CHECK
:: If the batch file exists, skip the svn check.
if exist "%WIN_TOOLS_ROOT_DIR%\svn.bat" goto :END
if "%WIN_TOOLS_FORCE%" == "1" goto :SVN_INSTALL
call svn --version 2>nul 1>nul
if errorlevel 1 goto :SVN_INSTALL
goto :END

:SVN_INSTALL
echo Installing subversion ...
:: svn is not accessible; check it out and create 'proxy' files.
if exist "%ZIP_DIR%\svn.zip" del "%ZIP_DIR%\svn.zip"
echo Fetching from %WIN_TOOLS_ROOT_URL%/third_party/svn_bin.zip
cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party/svn_bin.zip "%ZIP_DIR%\svn.zip"
if errorlevel 1 goto :SVN_FAIL
:: Cleanup svn directory if it was existing.
if exist "%WIN_TOOLS_ROOT_DIR%\svn\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\svn"
if exist "%WIN_TOOLS_ROOT_DIR%\svn_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\svn_bin"
:: Will create svn_bin\...
cscript //nologo //e:jscript "%~dp0unzip.js" "%ZIP_DIR%\svn.zip" "%WIN_TOOLS_ROOT_DIR%"
if errorlevel 1 goto :SVN_FAIL
if not exist "%WIN_TOOLS_ROOT_DIR%\svn_bin\." goto :SVN_FAIL
del "%ZIP_DIR%\svn.zip"
:: Create the batch file.
call copy /y "%~dp0svn.new.bat" "%WIN_TOOLS_ROOT_DIR%\svn.bat" 1>nul
call copy /y "%~dp0svnversion.new.bat" "%WIN_TOOLS_ROOT_DIR%\svnversion.bat" 1>nul
goto :END

:SVN_FAIL
echo ... Failed to checkout svn automatically.
echo You should get the "prebaked" version at %WIN_TOOLS_ROOT_URL%/third_party/
set ERRORLEVEL=1
goto :END

:returncode
set WIN_TOOLS_ROOT_URL=
set WIN_TOOLS_ROOT_DIR=
exit /b %ERRORLEVEL%

:END
call :returncode %ERRORLEVEL%

Make git 2.7.4 the default version

Make git 2.7.4 the default version

R=mmoss@chromium.org, dnj@chromium.org
BUG=595883

Review URL: https://codereview.chromium.org/1843363002 .

git-svn-id: fd409f4bdeea2bb50a5d34bb4d4bfc2046a5a3dd@299580 0039d316-1c4b-4281-b951-d872f2087c98


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

:: This batch file will try to sync the root directory.

setlocal

:: Windows freaks out if a file is overwritten while it's being executed.  Copy
:: this script off to a temporary location and reinvoke from there before
:: running any svn or git commands.
IF %~nx0==update_depot_tools.bat (
  COPY /Y %~dp0update_depot_tools.bat %TEMP%\update_depot_tools_tmp.bat >nul
  if errorlevel 1 goto :EOF
  %TEMP%\update_depot_tools_tmp.bat %~dp0 %*
)

set DEPOT_TOOLS_DIR=%1
SHIFT

set GIT_URL=https://chromium.googlesource.com/chromium/tools/depot_tools.git

:: Will download svn and python.
:: If you don't want to install the depot_tools version of these tools, remove
:: the 'force' option on the next command. The tools will be installed only if
:: not already in the PATH environment variable.
call "%DEPOT_TOOLS_DIR%bootstrap\win\win_tools.bat" force
if errorlevel 1 goto :EOF
:: Now clear errorlevel so it can be set by other programs later.
set errorlevel=

:: Opt-in for now.
IF "%DEPOT_TOOLS_WIN_TOOLCHAIN%" == "" GOTO :NOTOOLCHAIN
call python %~dp0win_toolchain\get_toolchain_if_necessary.py
if errorlevel 1 goto :EOF
set errorlevel=
:NOTOOLCHAIN

:: Shall skip automatic update?
IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :EOF

:: We need either .\.svn\. or .\.git\. to be able to sync.
IF EXIST "%DEPOT_TOOLS_DIR%.svn\." GOTO :SVN_UPDATE
IF EXIST "%DEPOT_TOOLS_DIR%.git\." GOTO :GIT_UPDATE
echo Error updating depot_tools, no revision tool found.
goto :EOF

:SVN_UPDATE
call svn up -q "%DEPOT_TOOLS_DIR%."
goto :EOF

:GIT_UPDATE
cd /d "%DEPOT_TOOLS_DIR%."
call git config remote.origin.fetch > NUL
if errorlevel 1 goto :GIT_SVN_UPDATE
for /F %%x in ('git config --get remote.origin.url') DO (
  IF not "%%x" == "%GIT_URL%" (
    echo Your depot_tools checkout is configured to fetch from an obsolete URL
    choice /N /T 60 /D N /M "Would you like to update it? [y/N]: "
    IF not errorlevel 2 (
      call git config remote.origin.url "%GIT_URL%"
    )
  )
)
call git fetch -q origin > NUL
call git rebase -q origin/master > NUL
if errorlevel 1 echo Failed to update depot_tools.

goto :EOF

:GIT_SVN_UPDATE
cd /d "%DEPOT_TOOLS_DIR%."
call git svn rebase -q -q
goto :EOF

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

:: This batch file will try to sync the root directory.

setlocal

:: Windows freaks out if a file is overwritten while it's being executed.  Copy
:: this script off to a temporary location and reinvoke from there before
:: running any svn or git commands.
IF %~nx0==update_depot_tools.bat (
  COPY /Y %~dp0update_depot_tools.bat %TEMP%\update_depot_tools_tmp.bat >nul
  if errorlevel 1 goto :EOF
  %TEMP%\update_depot_tools_tmp.bat %~dp0 %*
)

set DEPOT_TOOLS_DIR=%1
SHIFT

set GIT_URL=https://chromium.googlesource.com/chromium/tools/depot_tools.git

:: Will download svn and python.
:: If you don't want to install the depot_tools version of these tools, remove
:: the 'force' option on the next command. The tools will be installed only if
:: not already in the PATH environment variable.
call "%DEPOT_TOOLS_DIR%bootstrap\win\win_tools.bat" force
if errorlevel 1 goto :EOF
:: Now clear errorlevel so it can be set by other programs later.
set errorlevel=

IF "%DEPOT_TOOLS_WIN_TOOLCHAIN%" == "0" GOTO :NOTOOLCHAIN
call python %~dp0win_toolchain\get_toolchain_if_necessary.py
if errorlevel 1 goto :EOF
set errorlevel=
:NOTOOLCHAIN

:: Shall skip automatic update?
IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :EOF

:: We need either .\.svn\. or .\.git\. to be able to sync.
IF EXIST "%DEPOT_TOOLS_DIR%.svn\." GOTO :SVN_UPDATE
IF EXIST "%DEPOT_TOOLS_DIR%.git\." GOTO :GIT_UPDATE
echo Error updating depot_tools, no revision tool found.
goto :EOF

:SVN_UPDATE
call svn up -q "%DEPOT_TOOLS_DIR%."
goto :EOF

:GIT_UPDATE
cd /d "%DEPOT_TOOLS_DIR%."
call git config remote.origin.fetch > NUL
if errorlevel 1 goto :GIT_SVN_UPDATE
for /F %%x in ('git config --get remote.origin.url') DO (
  IF not "%%x" == "%GIT_URL%" (
    echo Your depot_tools checkout is configured to fetch from an obsolete URL
    choice /N /T 60 /D N /M "Would you like to update it? [y/N]: "
    IF not errorlevel 2 (
      call git config remote.origin.url "%GIT_URL%"
    )
  )
)
call git fetch -q origin > NUL
call git rebase -q origin/master > NUL
if errorlevel 1 echo Failed to update depot_tools.

goto :EOF

:GIT_SVN_UPDATE
cd /d "%DEPOT_TOOLS_DIR%."
call git svn rebase -q -q
goto :EOF

Switch to opt-out for toolchain

Switch to opt-out for toolchain

R=maruel@chromium.org
BUG=323300

Review URL: https://codereview.chromium.org/174663005

git-svn-id: fd409f4bdeea2bb50a5d34bb4d4bfc2046a5a3dd@252633 0039d316-1c4b-4281-b951-d872f2087c98


@ECHO OFF
SETLOCAL

SET release=%1
ECHO Installing Npm NuGet Package

SET nuGetFolder=%CD%\..\src\packages\
ECHO Configured packages folder: %nuGetFolder%
ECHO Current folder: %CD%

%CD%\..\src\.nuget\NuGet.exe install Npm.js -OutputDirectory %nuGetFolder%  -Verbosity quiet

for /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\"
for /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\"

ECHO Adding Npm and Node to path
REM SETLOCAL is on, so changes to the path not persist to the actual user's path
PATH=%npmPath%;%nodePath%;%PATH%

SET buildFolder=%CD%

ECHO Change directory to %CD%\..\src\Umbraco.Web.UI.Client\
CD %CD%\..\src\Umbraco.Web.UI.Client\

ECHO Do npm install and the grunt build of Belle
call npm cache clean --quiet
call npm install --quiet
call npm install -g grunt-cli --quiet
call npm install -g bower --quiet
call grunt build --buildversion=%release%

ECHO Move back to the build folder
CD %buildFolder%

@ECHO OFF
SETLOCAL

SET release=%1
ECHO Installing Npm NuGet Package

SET nuGetFolder=%CD%\..\src\packages\
ECHO Configured packages folder: %nuGetFolder%
ECHO Current folder: %CD%

%CD%\..\src\.nuget\NuGet.exe install Npm.js -OutputDirectory %nuGetFolder%  -Verbosity quiet

for /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\"
for /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\"

ECHO Adding Npm and Node to path
REM SETLOCAL is on, so changes to the path not persist to the actual user's path
PATH=%npmPath%;%nodePath%;%PATH%

SET buildFolder=%CD%

ECHO Change directory to %CD%\..\src\Umbraco.Web.UI.Client\
CD %CD%\..\src\Umbraco.Web.UI.Client\

ECHO Do npm install and the grunt build of Belle
call npm cache clean --quiet
call npm install --quiet
call npm install -g gulp-cli --quiet
call gulp --buildversion=%release%

ECHO Move back to the build folder
CD %buildFolder%

update buildbell.bat file to use gulp

update buildbell.bat file to use gulp


@echo off
goto :main

======================================================================
Performs a clean build and create NuGet packages for this solution
Note that this also modifies the following files, replacing
placeholder version numbers with actual version numbers:
    src\common\GlobalAssemblyInfo.cs

(see the SetVersionNumber task in xunit.performance.msbuild)

These files will, therefore, show up as modified after the build.
Be careful NOT to check them in that way!

If you publish these packages to Nuget, then please remember to
bump the build number on BuildSemanticVersion below.
======================================================================

:main
setlocal

set BuildAssemblyVersion=1.0.0.8
set BuildSemanticVersion=1.0.0-alpha-build0008

echo Building version %BuildSemanticVersion% NuGet packages.
echo WARNING: Some source files will be modified during this build.
echo WARNING: Please be careful not to check in those modifications.

msbuild.exe /m /nologo /t:CI /v:m /fl xunit.performance.msbuild

goto :eof

@echo off
goto :main

======================================================================
Performs a clean build and create NuGet packages for this solution
Note that this also modifies the following files, replacing
placeholder version numbers with actual version numbers:
    src\common\GlobalAssemblyInfo.cs

(see the SetVersionNumber task in xunit.performance.msbuild)

These files will, therefore, show up as modified after the build.
Be careful NOT to check them in that way!

If you publish these packages to Nuget, then please remember to
bump the build number on BuildSemanticVersion below.
======================================================================

:main
setlocal

set BuildAssemblyVersion=1.0.0.9
set BuildSemanticVersion=1.0.0-alpha-build0009

echo Building version %BuildSemanticVersion% NuGet packages.
echo WARNING: Some source files will be modified during this build.
echo WARNING: Please be careful not to check in those modifications.

msbuild.exe /m /nologo /t:CI /v:m /fl xunit.performance.msbuild

goto :eof

Bump build to 0009

Bump build to 0009


@echo off
setlocal
if not "%~1"=="" set GIT_HOME=%~f1
if "%GIT_HOME%"=="" call :FindGitHome "git.cmd"

if exist "%GIT_HOME%" goto :GitHomeOK

echo MsysGit installation directory not found.>&2
echo Try to give the directory name on the command line:>&2
echo   %0 "%ProgramFiles%\Git"
endlocal
exit /B 1

:GitHomeOK
set ERR=0

echo Installing git-le into "%GIT_HOME%"...

call :ChkGetopt getopt.exe || set ERR=1
if %ERR%==1 goto :End
echo getopt.exe... Found

if not exist "%GIT_HOME%\usr\bin\git-le" goto :Install
echo GitFlow is already installed.>&2
set /p mychoice="Do you want to replace it [y/n]"
if "%mychoice%"=="y" goto :DeleteOldFiles
goto :Abort

:DeleteOldFiles
echo Deleting old files...
for /F %%i in ("%GIT_HOME%\git-le*") do if exist "%%~fi" del /F /Q "%%~fi"

:Install
echo Copying files...
::goto :EOF
xcopy "%~dp0\..\git-le"            "%GIT_HOME%\usr\bin"                 /Y /R /F
if errorlevel 4 if not errorlevel 5 goto :AccessDenied
if errorlevel 1 set ERR=1
xcopy "%~dp0\..\git-le*"           "%GIT_HOME%\usr\bin"                 /Y /R /F || set ERR=1

if %ERR%==1 choice /T 30 /C Y /D Y /M "Some unexpected errors happened. Sorry, you'll have to fix them by yourself."

:End
endlocal & exit /B %ERR%
goto :EOF

:AccessDenied
set ERR=1
echo.
echo You should run this script with "Full Administrator" rights:>&2
echo - Right-click with Shift on the script from the Explorer>&2
echo - Select "Run as administrator">&2
choice /T 30 /C YN /D Y /N >nul
goto :End

:Abort
echo Installation canceled.>&2
set ERR=1
goto :End

:ChkGetopt
:: %1 is getopt.exe
if exist "%GIT_HOME%\usr\bin\%1" goto :EOF
if exist "%USERPROFILE%\usr\bin\%1" goto :EOF
if exist "%~f$PATH:1" goto :EOF
echo %GIT_HOME%\usr\bin\%1 not found.>&2
echo You have to install this file manually. See the GitFlow README.
exit /B 1

:FindGitHome
setlocal
set GIT_CMD_DIR=%~dp$PATH:1
if "%GIT_CMD_DIR%"=="" endlocal & goto :EOF
endlocal & set GIT_HOME=%GIT_CMD_DIR:~0,-5%
goto :EOF

@echo off
setlocal
if not "%~1"=="" set GIT_HOME=%~f1
if "%GIT_HOME%"=="" call :FindGitHome "git.cmd"

if exist "%GIT_HOME%" goto :GitHomeOK

echo MsysGit installation directory not found.>&2
echo Try to give the directory name on the command line:>&2
echo   %0 "%ProgramFiles%\Git"
endlocal
exit /B 1

:GitHomeOK
set ERR=0

echo Installing git-le into "%GIT_HOME%"...

if not exist "%GIT_HOME%\usr\bin\git-le" goto :Install
echo GitFlow is already installed.>&2
set /p mychoice="Do you want to replace it [y/n]"
if "%mychoice%"=="y" goto :DeleteOldFiles
goto :Abort

:DeleteOldFiles
echo Deleting old files...
for /F %%i in ("%GIT_HOME%\git-le*") do if exist "%%~fi" del /F /Q "%%~fi"

:Install
echo Copying files...
::goto :EOF
xcopy "%~dp0\..\git-le"            "%GIT_HOME%\usr\bin"                 /Y /R /F
if errorlevel 4 if not errorlevel 5 goto :AccessDenied
if errorlevel 1 set ERR=1
xcopy "%~dp0\..\git-le*"           "%GIT_HOME%\usr\bin"                 /Y /R /F || set ERR=1

if %ERR%==1 choice /T 30 /C Y /D Y /M "Some unexpected errors happened. Sorry, you'll have to fix them by yourself."

:End
endlocal & exit /B %ERR%
goto :EOF

:AccessDenied
set ERR=1
echo.
echo You should run this script with "Full Administrator" rights:>&2
echo - Right-click with Shift on the script from the Explorer>&2
echo - Select "Run as administrator">&2
choice /T 30 /C YN /D Y /N >nul
goto :End

:Abort
echo Installation canceled.>&2
set ERR=1
goto :End

:FindGitHome
setlocal
set GIT_CMD_DIR=%~dp$PATH:1
if "%GIT_CMD_DIR%"=="" endlocal & goto :EOF
endlocal & set GIT_HOME=%GIT_CMD_DIR:~0,-5%
goto :EOF

remove getopt dep, no need for now

remove getopt dep, no need for now


SET SDK=%CD%\..\..\argos-sdk
SET VERSION=%~1
SET BUNDLE_NAME=ICRM Mobile v%VERSION% for 8.0 and later VFS.zip

call grunt clean:css clean:js less
call npm run build

rmdir /S /Q deploy
rmdir /S /Q %SDK%\deploy

mkdir deploy
mkdir %SDK%\deploy
mkdir %SDK%\deploy\temp
mkdir deploy\bundle
mkdir deploy\bundle\model
xcopy bundle\model\*.* deploy\bundle\model /E /Y

mkdir deploy\bundle\model\Portal\SlxMobile\SourceFiles
mkdir deploy\bundle\model\Portal\SlxMobile\SourceFiles\argos-sdk
mkdir deploy\bundle\model\Portal\SlxMobile\SourceFiles\products
mkdir deploy\bundle\model\Portal\SlxMobile\SourceFiles\products\argos-saleslogix

pushd %SDK%
call grunt clean:css clean:js less
call npm run build
popd

xcopy %SDK%\*.* deploy\bundle\model\Portal\SlxMobile\SourceFiles\argos-sdk /E /Y /exclude:build\bundleExcludes.txt
xcopy *.* %SDK%\deploy\temp /E /Y /exclude:build\bundleExcludes.txt
xcopy %SDK%\deploy\temp\*.* deploy\bundle\model\Portal\SlxMobile\SourceFiles\products\argos-saleslogix /E /Y
rmdir %SDK%\deploy\temp /S /Q

%SDK%\tools\bundler\Bundler.exe /ProjectPath:"%CD%\deploy\bundle\model" /BundleFileName:"%CD%\deploy\%BUNDLE_NAME%" /BundleMethod:All /ConfigFileName:"%CD%\build\bundle.config"

SET SDK=%CD%\..\..\argos-sdk
SET VERSION=%~1
REM :: Mobile supports the current platform + one prior
SET BUNDLE_NAME=ICRM Mobile v%VERSION% for 8.2 and later VFS.zip

call grunt clean:css clean:js less
call npm run build

rmdir /S /Q deploy
rmdir /S /Q %SDK%\deploy

mkdir deploy
mkdir %SDK%\deploy
mkdir %SDK%\deploy\temp
mkdir deploy\bundle
mkdir deploy\bundle\model
xcopy bundle\model\*.* deploy\bundle\model /E /Y

mkdir deploy\bundle\model\Portal\SlxMobile\SourceFiles
mkdir deploy\bundle\model\Portal\SlxMobile\SourceFiles\argos-sdk
mkdir deploy\bundle\model\Portal\SlxMobile\SourceFiles\products
mkdir deploy\bundle\model\Portal\SlxMobile\SourceFiles\products\argos-saleslogix

pushd %SDK%
call grunt clean:css clean:js less
call npm run build
popd

xcopy %SDK%\*.* deploy\bundle\model\Portal\SlxMobile\SourceFiles\argos-sdk /E /Y /exclude:build\bundleExcludes.txt
xcopy *.* %SDK%\deploy\temp /E /Y /exclude:build\bundleExcludes.txt
xcopy %SDK%\deploy\temp\*.* deploy\bundle\model\Portal\SlxMobile\SourceFiles\products\argos-saleslogix /E /Y
rmdir %SDK%\deploy\temp /S /Q

%SDK%\tools\bundler\Bundler.exe /ProjectPath:"%CD%\deploy\bundle\model" /BundleFileName:"%CD%\deploy\%BUNDLE_NAME%" /BundleMethod:All /ConfigFileName:"%CD%\build\bundle.config"

Update VFS bundle filename.

INFORCRM-12697: Update VFS bundle filename.


call npm install
IF "%ERRORLEVEL%" NEQ "0" goto error

call npm run build
IF "%ERRORLEVEL%" NEQ "0" goto error

del /q %DEPLOYMENT_TARGET%\*
for /d %%x in (%DEPLOYMENT_TARGET%\*) do @rd /s /q "%%x"
IF "%ERRORLEVEL%" NEQ "0" goto error

:: xcopy %DEPLOYMENT_SOURCE%\* %DEPLOYMENT_TARGET% /Y /E
%DEPLOYMENT_SOURCE%\build\7za.exe %DEPLOYMENT_SOURCE%\*  %DEPLOYMENT_TARGET%\deploy.zip
IF "%ERRORLEVEL%" NEQ "0" goto error

goto end

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

call npm install
IF "%ERRORLEVEL%" NEQ "0" goto error

call npm run build
IF "%ERRORLEVEL%" NEQ "0" goto error

del /q %DEPLOYMENT_TARGET%\*
for /d %%x in (%DEPLOYMENT_TARGET%\*) do @rd /s /q "%%x"
IF "%ERRORLEVEL%" NEQ "0" goto error

:: xcopy %DEPLOYMENT_SOURCE%\* %DEPLOYMENT_TARGET% /Y /E
%DEPLOYMENT_SOURCE%\build\7za.exe a %DEPLOYMENT_SOURCE%\*  %DEPLOYMENT_SOURCE%\deploy.zip
IF "%ERRORLEVEL%" NEQ "0" goto error

%DEPLOYMENT_SOURCE%\build\7za.exe e %DEPLOYMENT_SOURCE%\deploy.zip %DEPLOYMENT_TARGET%
IF "%ERRORLEVEL%" NEQ "0" goto error

del /q %DEPLOYMENT_SOURCE%\deploy.zip
IF "%ERRORLEVEL%" NEQ "0" goto error

goto end

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

speed up deployment with 7za

speed up deployment with 7za


call git stash
call git pull origin master
call git stash apply
call npm update
pause

@echo off
If Not Exist updater.hashfile call certUtil -hashfile config.js md5 > updater.hashfile
call certUtil -hashfile config.js md5 > updater_temp.hashfile
call FC updater.hashfile updater_temp.hashfile >NUL && set stash=0 || set stash=1
if "%stash%" == "1" (call git stash)
pause
call git pull origin master
if "%stash%" == "1" (call git stash apply)
call npm update
del /f updater_temp.hashfile
pause

update s3 bat

update s3 bat


@setlocal

@set node_name={{nodeid}}

@rem Get the absolute path to the parent directory,
@rem which is assumed to be the node root.
@for /F "delims=" %%I in ("%~dp0..") do @set node_root=%%~fI

@set releases_dir=%node_root%\releases

@rem Parse ERTS version and release version from start_erl.data
@for /F "tokens=1,2" %%I in (%releases_dir%\start_erl.data) do @(
    @call :set_trim erts_version %%I
    @call :set_trim release_version %%J
)

@rem extract erlang cookie from vm.args
@set vm_args=%releases_dir%\%release_version%\vm.args
@for /f "usebackq tokens=1-2" %%I in (`findstr /b \-setcookie %vm_args%`) do @set erlang_cookie=%%J

@set erts_bin=%node_root%\erts-%erts_version%\bin

@set service_name=%node_name%_%release_version%

@if "%1"=="usage" @goto usage
@if "%1"=="install" @goto install
@if "%1"=="uninstall" @goto uninstall
@if "%1"=="start" @goto start
@if "%1"=="stop" @goto stop
@if "%1"=="restart" @call :stop && @goto start
@if "%1"=="console" @goto console
@if "%1"=="query" @goto query
@if "%1"=="attach" @goto attach
@if "%1"=="upgrade" @goto upgrade
@echo Unknown command: "%1"

:usage
@echo Usage: %~n0 {install,uninstall,start,stop,restart,console,query,attach,upgrade}
@goto :EOF

:install
@%erts_bin%\erlsrv.exe add %service_name% -c "Erlang node %node_name% in %node_root%" -sname %node_name% -w %node_root% -m %node_root%\bin\start_erl.cmd -args " ++ %node_name% ++ %node_root%" -stopaction "init:stop()."
@goto :EOF

:uninstall
@%erts_bin%\erlsrv.exe remove %service_name%
@%erts_bin%\epmd.exe -kill
@goto :EOF

:start
@%erts_bin%\erlsrv.exe start %service_name%
@goto :EOF

:stop
@%erts_bin%\erlsrv.exe stop %service_name%
@goto :EOF

:console
@start %erts_bin%\werl.exe -boot %releases_dir%\%release_version%\%node_name% -config %releases_dir%\%release_version%\sys.config -args_file %vm_args% -sname %node_name%
@goto :EOF

:query
@%erts_bin%\erlsrv.exe list %service_name%
@exit /b %ERRORLEVEL%
@goto :EOF

:attach
@for /f "usebackq" %%I in (`hostname`) do @set hostname=%%I
start %erts_bin%\werl.exe -boot %releases_dir%\%release_version%\start_clean -remsh %node_name%@%hostname% -sname console -setcookie %erlang_cookie%
@goto :EOF

:upgrade
@if "%2"=="" (
    @echo Missing upgrade package argument
    @echo Usage: %~n0 upgrade {package base name}
    @echo NOTE {package base name} MUST NOT include the .tar.gz suffix
    @goto :EOF
)
@%erts_bin%\escript.exe %node_root%\bin\install_upgrade.escript %node_name% %erlang_cookie% %2
@goto :EOF

:set_trim
@set %1=%2
@goto :EOF

@setlocal

@set node_name={{nodeid}}

@rem Get the absolute path to the parent directory,
@rem which is assumed to be the node root.
@for /F "delims=" %%I in ("%~dp0..") do @set node_root=%%~fI

@set releases_dir=%node_root%\releases

@rem Parse ERTS version and release version from start_erl.data
@for /F "tokens=1,2" %%I in (%releases_dir%\start_erl.data) do @(
    @call :set_trim erts_version %%I
    @call :set_trim release_version %%J
)

@rem extract erlang cookie from vm.args
@set vm_args=%releases_dir%\%release_version%\vm.args
@for /f "usebackq tokens=1-2" %%I in (`findstr /b \-setcookie %vm_args%`) do @set erlang_cookie=%%J

@set erts_bin=%node_root%\erts-%erts_version%\bin

@set service_name=%node_name%_%release_version%

@if "%1"=="usage" @goto usage
@if "%1"=="install" @goto install
@if "%1"=="uninstall" @goto uninstall
@if "%1"=="start" @goto start
@if "%1"=="stop" @goto stop
@if "%1"=="restart" @call :stop && @goto start
@if "%1"=="console" @goto console
@if "%1"=="query" @goto query
@if "%1"=="attach" @goto attach
@if "%1"=="upgrade" @goto upgrade
@echo Unknown command: "%1"

:usage
@echo Usage: %~n0 [install^|uninstall^|start^|stop^|restart^|console^|query^|attach^|upgrade]
@goto :EOF

:install
@%erts_bin%\erlsrv.exe add %service_name% -c "Erlang node %node_name% in %node_root%" -sname %node_name% -w %node_root% -m %node_root%\bin\start_erl.cmd -args " ++ %node_name% ++ %node_root%" -stopaction "init:stop()."
@goto :EOF

:uninstall
@%erts_bin%\erlsrv.exe remove %service_name%
@%erts_bin%\epmd.exe -kill
@goto :EOF

:start
@%erts_bin%\erlsrv.exe start %service_name%
@goto :EOF

:stop
@%erts_bin%\erlsrv.exe stop %service_name%
@goto :EOF

:console
@start %erts_bin%\werl.exe -boot %releases_dir%\%release_version%\%node_name% -config %releases_dir%\%release_version%\sys.config -args_file %vm_args% -sname %node_name%
@goto :EOF

:query
@%erts_bin%\erlsrv.exe list %service_name%
@exit /b %ERRORLEVEL%
@goto :EOF

:attach
@for /f "usebackq" %%I in (`hostname`) do @set hostname=%%I
start %erts_bin%\werl.exe -boot %releases_dir%\%release_version%\start_clean -remsh %node_name%@%hostname% -sname console -setcookie %erlang_cookie%
@goto :EOF

:upgrade
@if "%2"=="" (
    @echo Missing upgrade package argument
    @echo Usage: %~n0 upgrade {package base name}
    @echo NOTE {package base name} MUST NOT include the .tar.gz suffix
    @goto :EOF
)
@%erts_bin%\escript.exe %node_root%\bin\install_upgrade.escript %node_name% %erlang_cookie% %2
@goto :EOF

:set_trim
@set %1=%2
@goto :EOF

Use correctly escaped pipes in usage message


:: Compile clapack
"%PYTHON%" "%RECIPE_DIR%\get_clapack_src.py"
if errorlevel 1 exit 1

mkdir build_clapack
if errorlevel 1 exit 1
cd build_clapack
if errorlevel 1 exit 1

cmake ^
    -G "%CMAKE_GENERATOR%" ^
    -DCMAKE_INSTALL_PREFIX="%SRC_DIR%\ext" ^
    -DBoost_ROOT_DIR="%LIBRARY_INC%" ^
    ../clapack
if errorlevel 1 exit 1

cmake --build . --config Release -- /verbosity:minimal
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1

:: Start actual ALPS build
cd %SRC_DIR%
if errorlevel 1 exit 1

mkdir build
if errorlevel 1 exit 1

cd build
if errorlevel 1 exit 1

set PYTHON_LIBRARY=%PREFIX%\libs\python%PY_VER:~0,1%%PY_VER:~2,1%.lib

cmake ^
      -Wno-dev ^
      -G "%CMAKE_GENERATOR%" ^
      -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
      -DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
      -DBUILD_STATIC_LIBS=1 ^
      -DBUILD_SHARED_LIBS=1 ^
      -DALPS_ENABLE_MPI=OFF ^
      -DALPS_BUILD_TESTS=ON ^
      -DALPS_BUILD_APPLICATIONS=ON ^
      -DALPS_BUILD_EXAMPLES=OFF ^
      -DBOOST_ROOT="%PREFIX%" ^
      -DBoost_NO_SYSTEM_PATHS=ON ^
      -DBOOST_INCLUDEDIR="%LIBRARY_INC%" ^
      -DBOOST_LIBRARYDIR="%LIBRARY_LIB%" ^
      -DLAPACK_FOUND=TRUE ^
      -DBLAS_LIBRARY="%SRC_DIR%\ext\lib\blas.lib" ^
      -DLAPACK_LIBRARY="%SRC_DIR%\ext\lib\lapack.lib" ^
      -DPYTHON_EXECUTABLE="%PYTHON%" ^
      -DPYTHON_INCLUDE_DIR:PATH="%PREFIX%/include" ^
      -DPYTHON_LIBRARY:FILEPATH="%PYTHON_LIBRARY%" ^
      -DPYTHON_NUMPY_INCLUDE_DIR:PATH="%SP_DIR%/numpy/core/include" ^
      -DALPS_HAS_CMAKE_PI_MACROS=OFF ^
      ..
if errorlevel 1 exit 1

type CMakeCache.txt

cmake --build . --config Release
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1

ctest --output-on-failure  -E "python_|lattice_example1"
if errorlevel 1 exit 1

:: Move pyalps to site packages
move %LIBRARY_LIB%\pyalps "%SP_DIR%"

:: Enviroment variables for relocation
mkdir "%PREFIX%\etc\conda\activate.d"
mkdir "%PREFIX%\etc\conda\deactivate.d"
@echo SET ALPS_XML_PATH="%PREFIX%/lib/xml" > "%PREFIX%\etc\conda\activate.d\alps_vars.bat"
@echo SET ALPS_XML_PATH= > "%PREFIX%\etc\conda\deactivate.d\alps_vars.bat"

:: Compile clapack
"%PYTHON%" "%RECIPE_DIR%\get_clapack_src.py"
if errorlevel 1 exit 1

mkdir build_clapack
if errorlevel 1 exit 1
cd build_clapack
if errorlevel 1 exit 1

cmake ^
    -G "%CMAKE_GENERATOR%" ^
    -DCMAKE_INSTALL_PREFIX="%SRC_DIR%\ext" ^
    -DBoost_ROOT_DIR="%LIBRARY_INC%" ^
    ../clapack
if errorlevel 1 exit 1

cmake --build . --config Release -- /verbosity:minimal
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1

:: Start actual ALPS build
cd %SRC_DIR%
if errorlevel 1 exit 1

mkdir build
if errorlevel 1 exit 1

cd build
if errorlevel 1 exit 1

set PYTHON_LIBRARY=%PREFIX%\libs\python%PY_VER:~0,1%%PY_VER:~2,1%.lib

cmake ^
      -Wno-dev ^
      -G "%CMAKE_GENERATOR%" ^
      -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
      -DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
      -DBUILD_STATIC_LIBS=1 ^
      -DBUILD_SHARED_LIBS=1 ^
      -DALPS_ENABLE_MPI=OFF ^
      -DALPS_BUILD_TESTS=ON ^
      -DALPS_BUILD_APPLICATIONS=ON ^
      -DALPS_BUILD_EXAMPLES=OFF ^
      -DBOOST_ROOT="%PREFIX%" ^
      -DBoost_NO_SYSTEM_PATHS=ON ^
      -DBOOST_INCLUDEDIR="%LIBRARY_INC%" ^
      -DBOOST_LIBRARYDIR="%LIBRARY_LIB%" ^
      -DLAPACK_FOUND=TRUE ^
      -DBLAS_LIBRARY="%SRC_DIR%\ext\lib\blas.lib" ^
      -DLAPACK_LIBRARY="%SRC_DIR%\ext\lib\lapack.lib" ^
      -DPYTHON_EXECUTABLE="%PYTHON%" ^
      -DPYTHON_INCLUDE_DIR:PATH="%PREFIX%/include" ^
      -DPYTHON_LIBRARY:FILEPATH="%PYTHON_LIBRARY%" ^
      -DPYTHON_NUMPY_INCLUDE_DIR:PATH="%SP_DIR%/numpy/core/include" ^
      -DALPS_HAS_CMAKE_PI_MACROS=OFF ^
      ..
if errorlevel 1 exit 1

type CMakeCache.txt

cmake --build . --config Release
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1

ctest --output-on-failure  -E "python_|lattice_example1"
if errorlevel 1 exit 1

:: Move pyalps to site packages
move %LIBRARY_LIB%\pyalps "%SP_DIR%"

:: Enviroment variables for relocation
mkdir "%PREFIX%\etc\conda\activate.d"
mkdir "%PREFIX%\etc\conda\deactivate.d"
@echo SET ALPS_XML_PATH=%PREFIX%/Library/lib/xml> "%PREFIX%\etc\conda\activate.d\alps_vars.bat"
@echo SET ALPS_XML_PATH= > "%PREFIX%\etc\conda\deactivate.d\alps_vars.bat"

fix path in env

fix path in env


@rem Used by the buildbot "test" step.
cd PC\VS7.1
call rt.bat -d -q -uall -rw

@rem Used by the buildbot "test" step.
cd PCbuild
call rt.bat -d -q -uall -rw

Test in PCbuild directory.

Test in PCbuild directory.


@echo off
rem -------------------------------------------------------------------------
rem Vault tool script for Windows
rem -------------------------------------------------------------------------
rem
rem A tool for management securing sensitive strings

@if not "%ECHO%" == ""  echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal

if "%OS%" == "Windows_NT" (
  set "DIRNAME=%~dp0%"
) else (
  set DIRNAME=.\
)

pushd "%DIRNAME%.."
set "VAULT_HOME=%CD%"
popd

rem Setup Tomcat specific properties
if "x%JAVA_HOME%" == "x" (
  set  JAVA=java
  echo JAVA_HOME is not set. Unexpected results may occur.
  echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
) else (
  set "JAVA=%JAVA_HOME%\bin\java"
)

rem Find jboss-modules.jar, or we can't continue
set "VAULT_RUNJAR=%VAULT_HOME%\lib\tomcat-vault.jar"
if not exist "%VAULT_RUNJAR%" (
  echo Could not locate "%VAULT_RUNJAR%".
  echo Please check that you are in the bin directory when running this script.
  goto END
)

rem Set classpath with tomcat jars
if "x%VAULT_CLASSPATH%" == "x" (
  set "VAULT_CLASSPATH=%VAULT_RUNJAR%;%VAULT_HOME%\lib\tomcat-util.jar;%VAULT_HOME%\bin\tomcat-juli.jar"
)

rem Display our environment
set help=F
if "%*" == "-h" set help=T
if "%*" == "--help" set help=T
if "%help%" == "F" (
echo =========================================================================
echo.
echo   Tomcat Vault Tool
echo.
echo   VAULT_HOME: "%VAULT_HOME%"
echo.
echo   JAVA: "%JAVA%"
echo.
echo   JAVA_OPTS: "%JAVA_OPTS%"
echo.
echo =========================================================================
echo.
)

"%JAVA%" %JAVA_OPTS% ^
    -cp "%VAULT_CLASSPATH%" ^
     org.apache.tomcat.vault.VaultTool ^
     %*

:END

@echo off
rem -------------------------------------------------------------------------
rem Vault tool script for Windows
rem -------------------------------------------------------------------------
rem
rem A tool for management securing sensitive strings

@if not "%ECHO%" == ""  echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal

if "%OS%" == "Windows_NT" (
  set "DIRNAME=%~dp0%"
) else (
  set DIRNAME=.\
)

pushd "%DIRNAME%.."
set "VAULT_HOME=%CD%"
popd

rem Setup Tomcat specific properties
if "x%JAVA_HOME%" == "x" (
  set  JAVA=java
  echo JAVA_HOME is not set. Unexpected results may occur.
  echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
) else (
  set "JAVA=%JAVA_HOME%\bin\java"
)

rem Find tomcat-vault.jar, or we can't continue
set "VAULT_RUNJAR=%VAULT_HOME%\lib\tomcat-vault.jar"
if not exist "%VAULT_RUNJAR%" (
  echo Could not locate "%VAULT_RUNJAR%".
  echo Please check that you are in the bin directory when running this script.
  goto END
)

rem Set classpath with Tomcat jars
if "x%VAULT_CLASSPATH%" == "x" (
  set "VAULT_CLASSPATH=%VAULT_RUNJAR%;%VAULT_HOME%\lib\tomcat-util.jar;%VAULT_HOME%\lib\tomcat-juli.jar"
)

rem Display our environment
set help=F
if "%*" == "-h" set help=T
if "%*" == "--help" set help=T
if "%help%" == "F" (
echo =========================================================================
echo.
echo   Tomcat Vault Tool
echo.
echo   VAULT_HOME: "%VAULT_HOME%"
echo.
echo   JAVA: "%JAVA%"
echo.
echo   JAVA_OPTS: "%JAVA_OPTS%"
echo.
echo =========================================================================
echo.
)

"%JAVA%" %JAVA_OPTS% ^
    -cp "%VAULT_CLASSPATH%" ^
     org.apache.tomcat.vault.VaultTool ^
     %*

:END

Fix the tomcat-juli.jar location in the bat script to prevent a CNFE for JULI logging.


@ECHO OFF

:: Run unit tests
cd test\Steeltoe.Extensions.Configuration.CloudFoundry.Test
dotnet test
if not "%errorlevel%"=="0" goto failure
cd ..\..
cd test\Steeltoe.Extensions.Configuration.ConfigServer.Test
if not "%errorlevel%"=="0" goto failure
dotnet test
cd ..\..
echo Unit Tests Pass
goto success
:failure
echo Unit Tests Failure
exit -1
:success

@ECHO OFF

:: Run unit tests
cd test\Steeltoe.Extensions.Configuration.CloudFoundry.Test
dotnet test
if not "%errorlevel%"=="0" goto failure
cd ..\..
cd test\Steeltoe.Extensions.Configuration.ConfigServer.Test
dotnet test
if not "%errorlevel%"=="0" goto failure
cd ..\..
echo Unit Tests Pass
goto success
:failure
echo Unit Tests Failure
exit -1
:success

Fix test script for appveyor

Fix test script for appveyor


:: This file is for Windows only.

java -cp .\bin;.\lib\graph.jar;.\lib\gral-core-0.11.jar tsp_plot.MainRandomCoordinates
pause;

:: This file is for Windows only.

java -cp bin;lib\graph.jar;lib\gral-core-0.11.jar tsp_plot.MainRandomCoordinates
pause

Update runMainRandomCoordinates.bat

Update runMainRandomCoordinates.bat

Minor changes. Remove unneeded "\", "." and ";" characters.


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

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

SET EXE=%2
SET FINISHED=0
start %1%EXE% && %FINISHED%=1

FOR /L %%I in (1,1,%3) DO (timeout /t 1 && IF %%I EQU %3 goto :timeout && IF FINISHED EQU 1 goto :taskFinished)
:taskFinished
exit /b %errorlevel%
:timeout
FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% taskkill /im %EXE% /f & exit /b 1

Make Tests in Appveyor Exit when Test is finished


@echo off
rem *********************************************************************************
rem * dev-shell Bootstrap v1.0-beta.4                                                      *
rem *                                                                               *
rem * This command script will bootstrap the checked out git source into a complete *
rem * development system for MinGW / MSYS.                                          *
rem *                                                                               *
rem * Usage : double-click or run from the command line, runs fully automatically.  *
rem *********************************************************************************

rem note that there is limited error checking or idiot-proofing in the file at this time.

echo dev-shell bootstrap v1.0-beta.3 (c) seapagan 2015
echo.
echo Stage 1 : Download and unpack some required packages ...
rem tinyperl ...
if NOT EXIST %~dp0support\packages\tinyperl-2.0-580-win32.zip (
  %~dp0support\bootstrap\wget -q --show-progress -c --trust-server-names --directory-prefix=%~dp0support\packages http://sourceforge.net/projects/tinyperl/files/tinyperl/2.0/tinyperl-2.0-580-win32.zip/download
) ELSE (
	ECHO TinyPerl package already exists, skipping download.
)
rem md5deep ...
if NOT EXIST %~dp0support\packages\md5deep-4.4.zip (
  %~dp0support\bootstrap\wget  -q --no-check-certificate --show-progress -c --directory-prefix=%~dp0support\packages https://github.com/jessek/hashdeep/releases/download/release-4.4/md5deep-4.4.zip
) ELSE (
	ECHO MD5Deep package already exists, skipping download.
)

echo.
rem erase TinyPerl directory first if exists ...
if EXIST "%~dp0support\tinyperl\" (
RD /S /Q %~dp0support\tinyperl
)
%~dp0support\bootstrap\unzip.exe -q %~dp0support\packages\tinyperl-2.0-580-win32.zip -d %~dp0support
move %~dp0support\tinyperl* %~dp0support\tinyperl > NUL
if NOT EXIST "%~dp0support\tinyperl\" (
	echo Failure to unpack the TinyPerl distribution, please report any error messages, thanks.
	pause
	exit /b 254
)

rem unpack the md5deep.exe ...
%~dp0support\bootstrap\unzip.exe -j -q -o %~dp0support\packages\md5deep-4.4.zip "md5deep-4.4\md5deep.exe" -d %~dp0support
if NOT EXIST "%~dp0support\md5deep.exe" (
	echo Failure to unpack the MD5Deep distribution, please report any error messages, thanks.
	pause
	exit /b 253
)

rem now run the perl script to continue...
cd %~dp0support\bootstrap
%~dp0support\tinyperl\tinyperl bootstrap.pl

pause

@echo off
rem *********************************************************************************
rem * dev-shell Bootstrap v1.0-beta.4                                                      *
rem *                                                                               *
rem * This command script will bootstrap the checked out git source into a complete *
rem * development system for MinGW / MSYS.                                          *
rem *                                                                               *
rem * Usage : double-click or run from the command line, runs fully automatically.  *
rem *********************************************************************************

rem note that there is limited error checking or idiot-proofing in the file at this time.

echo dev-shell bootstrap v1.0-beta.3 (c) seapagan 2015
echo.
echo Stage 1 : Download and unpack some required packages ...
rem tinyperl ...
if NOT EXIST %~dp0support\packages\tinyperl-2.0-580-win32.zip (
  %~dp0support\bootstrap\wget -q --show-progress -c --no-check-certificate --trust-server-names --directory-prefix=%~dp0support\packages http://sourceforge.net/projects/tinyperl/files/tinyperl/2.0/tinyperl-2.0-580-win32.zip/download
) ELSE (
	ECHO TinyPerl package already exists, skipping download.
)
rem md5deep ...
if NOT EXIST %~dp0support\packages\md5deep-4.4.zip (
  %~dp0support\bootstrap\wget  -q --no-check-certificate --show-progress -c --directory-prefix=%~dp0support\packages https://github.com/jessek/hashdeep/releases/download/release-4.4/md5deep-4.4.zip
) ELSE (
	ECHO MD5Deep package already exists, skipping download.
)

echo.
rem erase TinyPerl directory first if exists ...
if EXIST "%~dp0support\tinyperl\" (
RD /S /Q %~dp0support\tinyperl
)
%~dp0support\bootstrap\unzip.exe -q %~dp0support\packages\tinyperl-2.0-580-win32.zip -d %~dp0support
move %~dp0support\tinyperl* %~dp0support\tinyperl > NUL
if NOT EXIST "%~dp0support\tinyperl\" (
	echo Failure to unpack the TinyPerl distribution, please report any error messages, thanks.
	pause
	exit /b 254
)

rem unpack the md5deep.exe ...
%~dp0support\bootstrap\unzip.exe -j -q -o %~dp0support\packages\md5deep-4.4.zip "md5deep-4.4\md5deep.exe" -d %~dp0support
if NOT EXIST "%~dp0support\md5deep.exe" (
	echo Failure to unpack the MD5Deep distribution, please report any error messages, thanks.
	pause
	exit /b 253
)

rem now run the perl script to continue...
cd %~dp0support\bootstrap
%~dp0support\tinyperl\tinyperl bootstrap.pl

pause

Fix failure to download tinyPerl from Sourceforge

Signed-off-by: Grant Ramsay <4ab1b2fdb7784a8f9b55e81e3261617f44fd0585@gmail.com>


Add a missing newline.

Add a missing newline.


@echo off
rem
rem Locates a command, whether it is a executable or a batch file.
rem

rem
rem Implementation notes.
rem The original incarnation of this batch file used the % ~$PATH:i
rem syntax of the FOR command.  This works as long as you know the file
rem extension that you are looking for.  But PATHEXT loop must be
rem inside the PATH loop, so that syntax doesn't work.
rem

setlocal

set _ALL_=False
if "%1"=="" goto :usage
if "%1"=="-a" (shift && set _ALL_=True)
if "%1"=="/a" (shift && set _ALL_=True)
if not "%2"=="" (call :usage && goto :end_main)
set _ARG_=%1

goto :main

:usage
    echo USAGE: which FILENAME
    echo        Searches the directories listed in the PATH environment
    echo        variable for FILENAME.
goto :eof

:check_file
    if not exist "%*" goto :eof
    if "%_ALL_%"=="False" if "%_FOUND_%"=="True" goto :eof
    echo %*
    set _FOUND_=True
goto :eof

:check_pathext
    set _BASENAME_=%*
    set _PATHEXT_=%PATHEXT%
    :check_pathext_loop
        for /f "delims=; tokens=1*" %%i in ("%_PATHEXT_%") do (set _EXT_=%%i&set _PATHEXT_=%%j)
        call :check_file %_BASENAME_%%_EXT_%
        if "%_ALL_%"=="False" if "%_FOUND_%"=="True" goto :eof
    if not "%_PATHEXT_%"=="" goto :check_pathext_loop
goto :eof

:check_path
    set _PATH_=%PATH%
    :check_path_loop
        for /f "delims=; tokens=1*" %%i in ("%_PATH_%") do (set _DIR_=%%i&set _PATH_=%%j)
        call :check_pathext %_DIR_%\%_ARG_%
        if "%_ALL_%"=="False" if "%_FOUND_%"=="True" goto :eof
    if not "%_PATH_%"=="" goto :check_path_loop
goto :eof

:main
    set _FOUND_=False
    rem Determine if the argument includes a directory.
    if "%_ARG_%"=="%_ARG_:\=/%" goto :nodir
        rem Check the arg directly, but do not process the PATH.
        call :check_pathext %_ARG_%
        goto :endif_nodir
    :nodir
        rem Check the current directory.
        call :check_pathext %_ARG_%
        rem Check all directories in the path.
        call :check_path
    :endif_nodir
:end_main

@echo off
rem
rem Locates a command, whether it is a executable or a batch file.
rem

rem
rem Implementation notes.
rem The original incarnation of this batch file used the % ~$PATH:i
rem syntax of the FOR command.  This works as long as you know the file
rem extension that you are looking for.  But PATHEXT loop must be
rem inside the PATH loop, so that syntax doesn't work.
rem

setlocal

set _ALL_=False
if "%1"=="" goto :usage
if "%1"=="-a" (shift && set _ALL_=True)
if "%1"=="/a" (shift && set _ALL_=True)
if not "%2"=="" (call :usage && goto :end_main)
set _ARG_=%1

goto :main

:usage
    echo USAGE: which [-a] FILENAME
    echo        Searches the directories listed in the PATH environment
    echo        variable for FILENAME.
    echo   -a = Print all located files, not just the first
goto :eof

:check_file
    if not exist "%*" goto :eof
    if "%_ALL_%"=="False" if "%_FOUND_%"=="True" goto :eof
    echo %*
    set _FOUND_=True
goto :eof

:check_pathext
    set _BASENAME_=%*

    rem If extension already given, such as .dll.
    call :check_file %_BASENAME_%
    if "%_ALL_%"=="False" if "%_FOUND_%"=="True" goto :eof

    set _PATHEXT_=%PATHEXT%
    :check_pathext_loop
        for /f "delims=; tokens=1*" %%i in ("%_PATHEXT_%") do (set _EXT_=%%i&set _PATHEXT_=%%j)
        call :check_file %_BASENAME_%%_EXT_%
        if "%_ALL_%"=="False" if "%_FOUND_%"=="True" goto :eof
    if not "%_PATHEXT_%"=="" goto :check_pathext_loop
goto :eof

:check_path
    set _PATH_=%PATH%
    :check_path_loop
        for /f "delims=; tokens=1*" %%i in ("%_PATH_%") do (set _DIR_=%%i&set _PATH_=%%j)
        call :check_pathext %_DIR_%\%_ARG_%
        if "%_ALL_%"=="False" if "%_FOUND_%"=="True" goto :eof
    if not "%_PATH_%"=="" goto :check_path_loop
goto :eof

:main
    set _FOUND_=False
    rem Determine if the argument includes a directory.
    if "%_ARG_%"=="%_ARG_:\=/%" goto :nodir
        rem Check the arg directly, but do not process the PATH.
        call :check_pathext %_ARG_%
        goto :endif_nodir
    :nodir
        rem Check the current directory.
        call :check_pathext %_ARG_%
        rem Check all directories in the path.
        call :check_path
    :endif_nodir
:end_main

improve dll check

which.bat: improve dll check


cd ..
START java -Xmx4G -Xms1G -server -XX:+AggressiveOpts -XX:NewSize=512M -cp "classes;build/classes/main;lib/*" org.loklak.LoklakServer >> data/loklak.log 2>&1 & echo $! > data/loklak.pid
echo "loklak server started at port 9000, open your browser at http://localhost:9000"

cd ..
START java -Xmx4G -Xms1G -server -XX:+AggressiveOpts -XX:NewSize=512M -cp "build/libs/loklak_server-all.jar" org.loklak.LoklakServer >> data/loklak.log 2>&1 & echo $! > data/loklak.pid
echo "loklak server started at port 9000, open your browser at http://localhost:9000"

Fix Windows batch scripts

Fix Windows batch scripts


ECHO OFF

ECHO.

ECHO ----------------------------------------
ECHO svn update
ECHO ----------------------------------------

TortoiseProc.exe /command:update /path:"%~dp0" /closeonend:1
TortoiseProc.exe /command:update /path:"%~dp0\..\OfficeWeb" /closeonend:1
TortoiseProc.exe /command:update /path:"%~dp0\..\ServerComponents\SDK\lib\win_32" /closeonend:1
TortoiseProc.exe /command:update /path:"%~dp0\..\ServerComponents\SDK\lib\DoctRenderer.config" /closeonend:1
TortoiseProc.exe /command:update /path:"%~dp0\..\ServerComponents\SDK\bin\windows" /closeonend:1
TortoiseProc.exe /command:update /path:"%~dp0\..\ServerComponents\SDK\bin\AllFontsGen" /closeonend:1
TortoiseProc.exe /command:update /path:"%~dp0\..\ServerComponents\UnicodeConverter\icubuilds\win32\bin" /closeonend:1
TortoiseProc.exe /command:update /path:"%~dp0\..\ServerComponents\DesktopEditor\ChromiumBasedEditors\app\cefbuilds\win32" /closeonend:1
TortoiseProc.exe /command:update /path:"%~dp0\..\AsyncServerComponents\Bin\Windows" /closeonend:1

ECHO ----------------------------------------
ECHO copy file to converter
ECHO ----------------------------------------

mkdir "%~dp0\App_Data"
mkdir "%~dp0\FileConverter\Bin"
mkdir "%~dp0\FileConverter\Bin\HtmlFileInternal"

cd /D "%~dp0\FileConverter\Bin" || goto ERROR
copy "..\..\..\ServerComponents\SDK\bin\windows\icudt.dll" "."
copy "..\..\..\ServerComponents\UnicodeConverter\icubuilds\win32\bin\icudt55.dll" "."
copy "..\..\..\ServerComponents\UnicodeConverter\icubuilds\win32\bin\icuuc55.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\DoctRenderer.config" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\doctrenderer.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\HtmlRenderer.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\DjVuFile.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\XpsFile.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\PdfReader.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\PdfWriter.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\HtmlFile.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\UnicodeConverter.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\HtmlFileInternal.exe" ".\HtmlFileInternal"
xcopy /s/h/e/k/c/y/q "..\..\..\ServerComponents\DesktopEditor\ChromiumBasedEditors\app\cefbuilds\win32" ".\HtmlFileInternal"
copy "..\..\..\AsyncServerComponents\Bin\Windows\x2t32.exe" "."

powershell -Command "(gc ./DoctRenderer.config) -replace '../../OfficeWeb', '../../../OfficeWeb' | sc ./DoctRenderer.config"
"..\..\..\ServerComponents\SDK\bin\AllFontsGen\windows_32.exe" "%~dp0\..\OfficeWeb\Fonts\native" "" "" "%~dp0\FileConverter\Bin\font_selection.bin"

:ERROR
:SUCCESS

exit /b 0

ECHO OFF

ECHO.
ECHO ----------------------------------------
ECHO copy file to converter
ECHO ----------------------------------------

mkdir "%~dp0\App_Data"
mkdir "%~dp0\FileConverter\Bin"
mkdir "%~dp0\FileConverter\Bin\HtmlFileInternal"

cd /D "%~dp0\FileConverter\Bin" || goto ERROR
copy "..\..\..\ServerComponents\SDK\bin\windows\icudt.dll" "."
copy "..\..\..\ServerComponents\UnicodeConverter\icubuilds\win32\bin\icudt55.dll" "."
copy "..\..\..\ServerComponents\UnicodeConverter\icubuilds\win32\bin\icuuc55.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\DoctRenderer.config" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\doctrenderer.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\HtmlRenderer.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\DjVuFile.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\XpsFile.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\PdfReader.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\PdfWriter.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\HtmlFile.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\UnicodeConverter.dll" "."
copy "..\..\..\ServerComponents\SDK\lib\win_32\HtmlFileInternal.exe" ".\HtmlFileInternal"
xcopy /s/h/e/k/c/y/q "..\..\..\ServerComponents\DesktopEditor\ChromiumBasedEditors\app\cefbuilds\win32" ".\HtmlFileInternal"
copy "..\..\..\AsyncServerComponents\Bin\Windows\x2t32.exe" "."

powershell -Command "(gc ./DoctRenderer.config) -replace '../../OfficeWeb', '../../../OfficeWeb' | sc ./DoctRenderer.config"
"..\..\..\ServerComponents\SDK\bin\AllFontsGen\windows_32.exe" "%~dp0\..\OfficeWeb\Fonts\native" "" "" "%~dp0\FileConverter\Bin\font_selection.bin"

:ERROR
:SUCCESS

exit /b 0

remove svn update

remove svn update

git-svn-id: 8e6dadeb865701f38789a88d039ad73f285cd5d0@65980 954022d7-b5bf-4e40-9824-e11837661b57


ECHO --- Uploading Artifacts

call buildkite-agent artifact upload "fixtures/**/*"

ECHO --- Uploading Artifacts

call buildkite-agent artifact upload "fixtures\**\*"

Switch to windows slashes in the artifact upload test


;= echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here

clear=cls
cmderr=cd /d "%CMDER_ROOT%"
e.=explorer .
gvim="C:\Program Files (x86)\Vim\vim80\gvim.exe" $*
history=cat "%CMDER_ROOT%\config\.history"
ll=ls -l -h --show-control-chars -F --color $*
ls=ls --show-control-chars -F --color $*
nuget="C:\workspace\nuget\nuget.exe" $*
pip2="C:\Program Files\Anaconda2\Scripts\pip.exe" $*
pip3="C:\Program Files\Anaconda3\Scripts\pip.exe" $*
pwd=cd
unalias=alias /d $1
vi=vim $*
vim="C:\Program Files (x86)\Vim\vim80\vim.exe" $*
vimdiff="C:\Program Files (x86)\Vim\vim80\vim.exe" -d $*
vsdevcmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat"
vsmsbuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"

;= Git
g=git $*

;= Git Add
ga=git add --verbose $*
gae=git add --verbose --edit $*
gai=git add --verbose --interactive $*
gap=git add --verbose --patch $*
gau=git add --verbose --update $*

;= Git Branch
gb=git branch -vv $*
gba=git branch -vv --all $*
gbc=git checkout -b $*
gbd=git branch --delete $*
gbm=git branch --move $*
gbs=git show-branch $*

;= Git Commit
gc=git commit -v $*
gca=git commit -v --all $*
gcF=git commit -v --amend $*
gcm=git commit --message $*
gcp=git cherry-pick --ff $*
gcS=git commit --gpg-sign $*
gcSF=git commit --amend --gpg-sign $*
gco=git checkout $*
gcs=git show $*

;= Git Diff
gd=git diff $*
gdc=git diff --cached $*

;= Git Fetch
gf=git fetch --all --tags --prune $*
gfc=git clone $*
gfcr=git clone --recurse-submodules $*
gfm=git pull
gfr=git pull --rebase
gfx="C:\workspace\aliases\gfx.cmd" $*
gfu=git remote --verbose update --prune $*

;= Git Grep
gg=git grep $*
ggi=git grep --interactive $*
ggl=git grep --files-with-matches $*
ggv=git grep --invert-match $*
ggw=git grep --word-regexp $*

;= Git Index
gia=git add $*
gid=git diff --cached $*
gir=git reset $*

;= Git Log
gl=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" $*
gla=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all $*
glag=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all --graph $*
gld=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent $*
gldp=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent --patch $*
glg=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --graph $*

;= Git Merge
gm=git merge $*
gma=git merge --abort $*
gmt=git mergetool $*

;= Git Push
gp=git push $*
gpt=git push --tags $*

;= Git Rebase
gr=git rebase $*
gra=git rebase --abort $*
grc=git rebase --continue $*
gri=git rebase --interactive $*

;= Git Remote

;= Git Stash
gs=git stash $*
gsa=git stash apply $*
gsd=git stash show --patch --stat $*
gsx=git stash drop $*
gsl=git stash list $*
gsp=git stash pop $*
gss=git stash save --include-untracked $*

;= Git Working Copy
gwa=git add --verbose $*
gws=git status $*
gwd=git diff $*
gwr=git reset --soft $*
gwc=git clean $*

;= echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here

clear=cls
cmderr=cd /d "%CMDER_ROOT%"
e.=explorer .
gvim="C:\Program Files (x86)\Vim\vim80\gvim.exe" $*
history=cat "%CMDER_ROOT%\config\.history"
ll=ls -l -h --show-control-chars -F --color $*
ls=ls --show-control-chars -F --color $*
nuget="C:\workspace\nuget\nuget.exe" $*
pip2="C:\Program Files\Anaconda2\Scripts\pip.exe" $*
pip3="C:\Program Files\Anaconda3\Scripts\pip.exe" $*
pwd=cd
unalias=alias /d $1
vi=vim $*
vim="C:\Program Files (x86)\Vim\vim80\vim.exe" $*
vimdiff="C:\Program Files (x86)\Vim\vim80\vim.exe" -d $*
vsdevcmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat"
vsmsbuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"

;= Git
g=git $*

;= Git Add
ga=git add --verbose $*
gae=git add --verbose --edit $*
gai=git add --verbose --interactive $*
gap=git add --verbose --patch $*
gau=git add --verbose --update $*

;= Git Branch
gb=git branch -vv $*
gba=git branch -vv --all $*
gbc=git checkout -b $*
gbd=git branch --delete $*
gbm=git branch --move $*
gbs=git show-branch $*

;= Git Commit
gc=git commit -v $*
gca=git commit -v --all $*
gcF=git commit -v --amend $*
gcm=git commit --message $*
gcp=git cherry-pick --ff $*
gcS=git commit --gpg-sign $*
gcSF=git commit --amend --gpg-sign $*
gco=git checkout $*
gcs=git show $*

;= Git Diff
gd=git diff $*
gdc=git diff --cached $*

;= Git Fetch
gf=git fetch --all --tags --prune $*
gfc=git clone $*
gfcr=git clone --recurse-submodules $*
gfm=git pull
gfr=git pull --rebase
gfx="C:\workspace\aliases\gfx.cmd" $*
gfu=git remote --verbose update --prune $*

;= Git Grep
gg=git grep $*
ggi=git grep --interactive $*
ggl=git grep --files-with-matches $*
ggv=git grep --invert-match $*
ggw=git grep --word-regexp $*

;= Git Index
gia=git add $*
gid=git diff --cached $*
gir=git reset $*

;= Git Log
gl=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%cr %C(3)%ci %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" $*
gla=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%cr %C(3)%ci %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all $*
glag=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%cr %C(3)%ci %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all --graph $*
gld=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%cr %C(3)%ci %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent $*
gldp=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%cr %C(3)%ci %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent --patch $*
glg=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%cr %C(3)%ci %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --graph $*
gls=git log --topo-order --stat --pretty=format:"${_git_log_medium_format}" $*

;= Git Merge
gm=git merge $*
gma=git merge --abort $*
gmt=git mergetool $*

;= Git Push
gp=git push $*
gpt=git push --tags $*

;= Git Rebase
gr=git rebase $*
gra=git rebase --abort $*
grc=git rebase --continue $*
gri=git rebase --interactive $*

;= Git Remote

;= Git Stash
gs=git stash $*
gsa=git stash apply $*
gsd=git stash show --patch --stat $*
gsx=git stash drop $*
gsl=git stash list $*
gsp=git stash pop $*
gss=git stash save --include-untracked $*

;= Git Working Copy
gwa=git add --verbose $*
gws=git status $*
gwd=git diff $*
gwr=git reset --soft $*
gwc=git clean $*

Update windows aliases

Update windows aliases