]> git.ipfire.org Git - thirdparty/git.git/blob - compat/vcbuild/vcpkg_copy_dlls.bat
Merge branch 'ma/asciidoctor-refmiscinfo'
[thirdparty/git.git] / compat / vcbuild / vcpkg_copy_dlls.bat
1 @ECHO OFF
2 REM ================================================================
3 REM This script is an optional step. It copies the *.dll and *.pdb
4 REM files (created by vcpkg_install.bat) into the top-level directory
5 REM of the repo so that you can type "./git.exe" and find them without
6 REM having to fixup your PATH.
7 REM
8 REM NOTE: Because the names of some DLL files change between DEBUG and
9 REM NOTE: RELEASE builds when built using "vcpkg.exe", you will need
10 REM NOTE: to copy up the corresponding version.
11 REM ================================================================
12
13 SETLOCAL EnableDelayedExpansion
14
15 @FOR /F "delims=" %%D IN ("%~dp0") DO @SET cwd=%%~fD
16 cd %cwd%
17
18 SET arch=x64-windows
19 SET inst=%cwd%vcpkg\installed\%arch%
20
21 IF [%1]==[release] (
22 echo Copying RELEASE mode DLLs to repo root...
23 ) ELSE IF [%1]==[debug] (
24 SET inst=%inst%\debug
25 echo Copying DEBUG mode DLLs to repo root...
26 ) ELSE (
27 echo ERROR: Invalid argument.
28 echo Usage: %~0 release
29 echo Usage: %~0 debug
30 EXIT /B 1
31 )
32
33 xcopy /e/s/v/y %inst%\bin\*.dll ..\..\
34 xcopy /e/s/v/y %inst%\bin\*.pdb ..\..\
35
36 xcopy /e/s/v/y %inst%\bin\*.dll ..\..\t\helper\
37 xcopy /e/s/v/y %inst%\bin\*.pdb ..\..\t\helper\
38
39 EXIT /B 0