File: vcpkg_copy_dlls.bat

package info (click to toggle)
cgit 1.2.3%2Bgit20240802.70.09d24d7%2Bgit2.46.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 56,184 kB
  • sloc: ansic: 301,641; sh: 254,574; perl: 29,353; tcl: 22,151; makefile: 4,198; python: 3,594; javascript: 810; csh: 45; ruby: 43; lisp: 12
file content (39 lines) | stat: -rw-r--r-- 1,247 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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