| OLD | NEW |
| 1 ECHO OFF | 1 ECHO OFF |
| 2 | 2 |
| 3 REM Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 REM Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 REM Use of this source code is governed by a BSD-style license that can be | 4 REM Use of this source code is governed by a BSD-style license that can be |
| 5 REM found in the LICENSE file. | 5 REM found in the LICENSE file. |
| 6 | 6 |
| 7 REM Copies an installer and symbols from a build directory on a network share | 7 REM Copies an installer and symbols from a build directory on a network share |
| 8 REM into the directory \[out|build]\[Debug|Release] on the current drive. | 8 REM into the directory \[out|build]\[Debug|Release] on the current drive. |
| 9 REM | 9 REM |
| 10 REM Usage: | 10 REM Usage: |
| 11 REM \\build.share\<path_to_checkout>\src\tools\win\copy-installer.bat | 11 REM \\build.share\<path_to_checkout>\src\tools\win\copy-installer.bat |
| 12 REM | 12 REM |
| 13 REM By default, the script will copy the Debug build in the tree, falling back | 13 REM By default, the script will copy the Debug build in the tree, falling back |
| 14 REM to the Release build if one is not found. Similarly, the ninja output | 14 REM to the Release build if one is not found. Similarly, the ninja output |
| 15 REM directory is preferred over the devenv output directory. Specify | 15 REM directory is preferred over the devenv output directory. Specify |
| 16 REM "out|build" and/or "Debug|Release" (case matters) on the command line in | 16 REM "out|build" and/or "Debug|Release" (case matters) on the command line in |
| 17 REM any order to influence selection. The defaults for location and build type | 17 REM any order to influence selection. The defaults for location and build type |
| 18 REM can also be overridden in a given build tree by creating a | 18 REM can also be overridden in a given build tree by creating a |
| 19 REM "copy-installer.cfg" file alongside the .gclient file that sets the OUTPUT | 19 REM "copy-installer.cfg" file alongside the .gclient file that sets the OUTPUT |
| 20 REM and/or BUILDTYPE variables. | 20 REM and/or BUILDTYPE variables. |
| 21 REM | 21 REM |
| 22 REM Install Robocopy for superior performance on Windows XP if desired (it is | 22 REM Install Robocopy for superior performance on Windows XP if desired (it is |
| (...skipping 20 matching lines...) Expand all Loading... |
| 43 IF "%OUTPUT%%BUILDTYPE%"=="" ( | 43 IF "%OUTPUT%%BUILDTYPE%"=="" ( |
| 44 ECHO No build found to copy. | 44 ECHO No build found to copy. |
| 45 EXIT 1 | 45 EXIT 1 |
| 46 ) | 46 ) |
| 47 | 47 |
| 48 SET FROM=%FROM%\%OUTPUT%\%BUILDTYPE% | 48 SET FROM=%FROM%\%OUTPUT%\%BUILDTYPE% |
| 49 SET TO=\%OUTPUT%\%BUILDTYPE% | 49 SET TO=\%OUTPUT%\%BUILDTYPE% |
| 50 | 50 |
| 51 REM Figure out what files to copy based on the component type (shared/static). | 51 REM Figure out what files to copy based on the component type (shared/static). |
| 52 IF EXIST "%FROM%\base.dll" ( | 52 IF EXIST "%FROM%\base.dll" ( |
| 53 SET TOCOPY=*.pdb setup.exe setup.exe.manifest chrome.packed.7z *.dll | 53 SET TOCOPY=*.pdb setup.exe setup.exe.manifest chrome.7z *.dll |
| 54 SET ARCHIVETODELETE=chrome.packed.7z |
| 54 SET INSTALLER=setup.exe | 55 SET INSTALLER=setup.exe |
| 55 ) ELSE ( | 56 ) ELSE ( |
| 56 SET TOCOPY=*.pdb mini_installer.exe | 57 SET TOCOPY=*.pdb mini_installer.exe |
| 57 SET INSTALLER=mini_installer.exe | 58 SET INSTALLER=mini_installer.exe |
| 58 ) | 59 ) |
| 59 | 60 |
| 60 CALL :_copyfiles | 61 CALL :_copyfiles |
| 61 | 62 |
| 62 REM incremental_chrome_dll=1 puts chrome_dll.pdb into the "initial" dir. | 63 REM incremental_chrome_dll=1 puts chrome_dll.pdb into the "initial" dir. |
| 63 IF EXIST "%FROM%\initial" ( | 64 IF EXIST "%FROM%\initial" ( |
| 64 SET FROM=%FROM%\initial | 65 SET FROM=%FROM%\initial |
| 65 SET TOCOPY=*.pdb | 66 SET TOCOPY=*.pdb |
| 66 CALL :_copyfiles | 67 CALL :_copyfiles |
| 67 ) | 68 ) |
| 68 | 69 |
| 70 REM Keeping the old chrome.packed.7z around could cause the new setup.exe to |
| 71 REM use it instead of the new chrome.7z, delete it to save developers from |
| 72 REM debugging nightmares! |
| 73 IF NOT "%ARCHIVETODELETE%"=="" ( |
| 74 IF EXIST "%TO%\%ARCHIVETODELETE%" ( |
| 75 ECHO Deleting old/deprecated %ARCHIVETODELETE% |
| 76 del /Q "%TO%\%ARCHIVETODELETE%" |
| 77 ) |
| 78 ) |
| 79 |
| 69 ECHO Ready to run/debug %TO%\%INSTALLER%. | 80 ECHO Ready to run/debug %TO%\%INSTALLER%. |
| 70 GOTO :EOF | 81 GOTO :EOF |
| 71 | 82 |
| 72 REM All labels henceforth are subroutines intended to be invoked by CALL. | 83 REM All labels henceforth are subroutines intended to be invoked by CALL. |
| 73 | 84 |
| 74 REM Canonicalize the first argument, returning it in RET. | 85 REM Canonicalize the first argument, returning it in RET. |
| 75 :_canonicalize | 86 :_canonicalize |
| 76 SET RET=%~f1 | 87 SET RET=%~f1 |
| 77 GOTO :EOF | 88 GOTO :EOF |
| 78 | 89 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 ) | 125 ) |
| 115 GOTO :EOF | 126 GOTO :EOF |
| 116 | 127 |
| 117 REM We can't use a for..in..do loop since we have wildcards, so we make a call | 128 REM We can't use a for..in..do loop since we have wildcards, so we make a call |
| 118 REM to this with the files to copy. | 129 REM to this with the files to copy. |
| 119 :_xcopy_hack | 130 :_xcopy_hack |
| 120 SHIFT | 131 SHIFT |
| 121 IF "%0"=="" GOTO :EOF | 132 IF "%0"=="" GOTO :EOF |
| 122 xcopy "%FROM%\%0" "%TO%" /d /y | 133 xcopy "%FROM%\%0" "%TO%" /d /y |
| 123 GOTO _xcopy_hack | 134 GOTO _xcopy_hack |
| OLD | NEW |