-
Notifications
You must be signed in to change notification settings - Fork 4
/
source_index_pdb.bat
46 lines (35 loc) · 1.21 KB
/
source_index_pdb.bat
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
40
41
42
43
44
45
46
@echo off
setlocal
pushd %~dp0
::
:: Generate the script section file for pdbstr.exe
::
echo:
echo Writing source_index.txt header...
echo SRCSRV: ini ------------------------------------------------ > source_index.txt
echo VERSION=2 >> source_index.txt
echo VERCTRL=http >> source_index.txt
echo SRCSRV: variables ------------------------------------------ >> source_index.txt
echo HTTP_ALIAS=https://raw.githubusercontent.com >> source_index.txt
echo HTTP_EXTRACT_TARGET=%%HTTP_ALIAS%%%%var2%% >> source_index.txt
echo SRCSRVTRG=%%HTTP_EXTRACT_TARGET%% >> source_index.txt
echo SRCSRV: source files --------------------------------------- >> source_index.txt
echo:
echo List Root
call source_index_repo.bat
echo:
echo List Submodules
git submodule foreach --recursive cmd //c "%~dp0source_index_repo.bat"
echo:
echo Writing footer...
echo SRCSRV: end ------------------------------------------------ >> source_index.txt
::
:: Update the pdb file with the script section
::
echo:
echo Adding srcsrv section to %1...
"%ProgramFiles(x86)%\Windows Kits\10\Debuggers\x64\srcsrv\pdbstr.exe" -w -p:%1 -s:srcsrv -i:source_index.txt
popd
endlocal
if %ERRORLEVEL% neq 0 exit /b 1
exit /b 0