From 91dadb3ff75a446cbabb3b9c27b2e7072aceab16 Mon Sep 17 00:00:00 2001 From: "mmoss@chromium.org" Date: Mon, 10 Feb 2014 21:47:08 +0000 Subject: [PATCH] Don't install new Windows git on XP machines. The new git broke then XP bots because it relies on WinAPIs that are newer than XP. R=szager@chromium.org Review URL: https://codereview.chromium.org/137213011 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250211 0039d316-1c4b-4281-b951-d872f2087c98 --- bootstrap/win/win_tools.bat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bootstrap/win/win_tools.bat b/bootstrap/win/win_tools.bat index 9ecc84070..af7a15d73 100644 --- a/bootstrap/win/win_tools.bat +++ b/bootstrap/win/win_tools.bat @@ -26,6 +26,8 @@ if "%1" == "force" ( :GIT_CHECK +call ver | findstr "XP" 2>nul 1>nul +if errorlevel 0 goto :GIT_XP_CHECK if "%DEPOT_TOOLS_GIT_1852%" == "0" goto :GIT_180_CHECK goto :GIT_1852_CHECK @@ -38,6 +40,19 @@ set GIT_ZIP_URL=https://commondatastorage.googleapis.com/chrome-infra/%GIT_ZIP_F goto :GIT_COMMON +:: Our new build of git doesn't work on XP (uses newer APIs). +:GIT_XP_CHECK +:: If the new git was installed, remove all old git packages and reinstall the +:: correct version from scratch. +if exist "%WIN_TOOLS_ROOT_DIR%\git-1.8.5.2.chromium.1_bin" ( + rmdir /S /Q "%WIN_TOOLS_ROOT_DIR%\git-1.8.5.2.chromium.1_bin" + if exist "%WIN_TOOLS_ROOT_DIR%\git-1.8.0_bin" ( + rmdir /S /Q "%WIN_TOOLS_ROOT_DIR%\git-1.8.0_bin" + ) +) +goto :GIT_180_CHECK + + :GIT_180_CHECK set GIT_VERSION=1.8.0 set GIT_BIN_DIR=git-%GIT_VERSION%_bin