-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add source indexing and update some resource strings
- Loading branch information
Showing
6 changed files
with
97 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,5 @@ | |
*.REMOTE.* | ||
.vs/* | ||
build/* | ||
install/* | ||
ipch/* | ||
install_dir.txt | ||
source_index.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@echo off | ||
|
||
setlocal | ||
|
||
:: https://github.com/gorlak/PowerMateTray | ||
for /f "delims=" %%f in ( 'git remote get-url origin' ) do set ORIGIN=%%f | ||
|
||
:: remove .git from the path if it's there (.git is the module url but not the source code url) | ||
SET ORIGIN=%ORIGIN:.git=% | ||
|
||
:: 297d3d60af11c8749ab8515eec6ab188da3df317 | ||
for /f "delims=" %%f in ( 'git rev-parse head' ) do set COMMIT=%%f | ||
|
||
:: /gorlak/PowerMateTray/297d3d60af11c8749ab8515eec6ab188da3df317/ | ||
SET URL=%ORIGIN:https://github.com=%/%COMMIT% | ||
|
||
:: C:\Users\geoff\Projects\gorlak-PowerMateTray\.gitignore*.gitignore | ||
for /f "delims=" %%f in ( 'git ls-files -- *.c *.C *.cc *.cp *.cpp *.cxx *.CPP *.h *.hh *.impl *.inl' ) do (call :PROCESS_FILE "%~dp0source_index.txt" "%%f") | ||
|
||
endlocal | ||
|
||
exit /b 0 | ||
|
||
:: | ||
:: This is necessary to do some subsitutions that aren't possible with a for /f param | ||
:: | ||
|
||
:PROCESS_FILE | ||
set TXT=%1 | ||
set FILE=%2 | ||
set FILE_NOQUOTE=%FILE:"=% | ||
echo %CD%\%FILE_NOQUOTE:/=\%*%URL%/%FILE_NOQUOTE% >> %TXT% | ||
GOTO :eof |