summaryrefslogtreecommitdiffstats
path: root/compat/vcbuild/vcpkg_copy_dlls.bat
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:47:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:47:53 +0000
commitc8bae7493d2f2910b57f13ded012e86bdcfb0532 (patch)
tree24e09d9f84dec336720cf393e156089ca2835791 /compat/vcbuild/vcpkg_copy_dlls.bat
parentInitial commit. (diff)
downloadgit-upstream.tar.xz
git-upstream.zip
Adding upstream version 1:2.39.2.upstream/1%2.39.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compat/vcbuild/vcpkg_copy_dlls.bat')
-rw-r--r--compat/vcbuild/vcpkg_copy_dlls.bat39
1 files changed, 39 insertions, 0 deletions
diff --git a/compat/vcbuild/vcpkg_copy_dlls.bat b/compat/vcbuild/vcpkg_copy_dlls.bat
new file mode 100644
index 0000000..13661c1
--- /dev/null
+++ b/compat/vcbuild/vcpkg_copy_dlls.bat
@@ -0,0 +1,39 @@
+@ECHO OFF
+REM ================================================================
+REM This script is an optional step. It copies the *.dll and *.pdb
+REM files (created by vcpkg_install.bat) into the top-level directory
+REM of the repo so that you can type "./git.exe" and find them without
+REM having to fixup your PATH.
+REM
+REM NOTE: Because the names of some DLL files change between DEBUG and
+REM NOTE: RELEASE builds when built using "vcpkg.exe", you will need
+REM NOTE: to copy up the corresponding version.
+REM ================================================================
+
+ SETLOCAL EnableDelayedExpansion
+
+ @FOR /F "delims=" %%D IN ("%~dp0") DO @SET cwd=%%~fD
+ cd %cwd%
+
+ SET arch=x64-windows
+ SET inst=%cwd%vcpkg\installed\%arch%
+
+ IF [%1]==[release] (
+ echo Copying RELEASE mode DLLs to repo root...
+ ) ELSE IF [%1]==[debug] (
+ SET inst=%inst%\debug
+ echo Copying DEBUG mode DLLs to repo root...
+ ) ELSE (
+ echo ERROR: Invalid argument.
+ echo Usage: %~0 release
+ echo Usage: %~0 debug
+ EXIT /B 1
+ )
+
+ xcopy /e/s/v/y %inst%\bin\*.dll ..\..\
+ xcopy /e/s/v/y %inst%\bin\*.pdb ..\..\
+
+ xcopy /e/s/v/y %inst%\bin\*.dll ..\..\t\helper\
+ xcopy /e/s/v/y %inst%\bin\*.pdb ..\..\t\helper\
+
+ EXIT /B 0