Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
neogeographica committed Feb 7, 2017
2 parents 79d8a57 + e0e73db commit 4c68481
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
**** v1.4 (Feb 2017)

- Fixed issues in the pak-finder script affecting multi-disk systems and older Steam installs.


**** v1.3 (Feb 2017)

- Unified the batch files under an "uber-installer" so you only need to run one script.
Expand Down
4 changes: 2 additions & 2 deletions README_FIRST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You might want to keep an eye out in the future for a newer release of Mark V. Y

The included version of Mark V is build 1036 from January 2017.

As for this whole package of stuff, it's version 1.3. If you want to see what has changed since the previous releases, see CHANGELOG.txt. If you've been using a previous version of this package, you can overwrite those files with the ones from this new release; that won't hurt whatever Quake configuration you've set up.
As for this whole package of stuff, it's version 1.4. If you want to see what has changed since the previous releases, see CHANGELOG.txt. If you've been using a previous version of this package, you can overwrite those files with the ones from this new release; that won't hurt whatever Quake configuration you've set up.


*** How to use this
Expand Down Expand Up @@ -47,4 +47,4 @@ The tools included in this package are for Windows users, but much of the info w

The other files in the "readmes\other_stuff" folder are a little more specialized and you might not need to bother with them. You'll see that they're referenced from other readmes in a few spots, or you can just have a look at them if you're curious.

Have fun!
Have fun!
29 changes: 24 additions & 5 deletions installers/install_pakfiles.bat
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,17 @@ if exist "%target_pakfile%" goto :eof
call :reg_query_and_copy "HKLM\SOFTWARE\WOW6432Node\GOG.com\Games\1435828198" PATH
if exist "%target_pakfile%" goto :eof

REM handle older Steam installs
call :reg_query_path_root_and_copy "HKCU\SOFTWARE\Valve\Steam" SteamPath "steamapps\common\Quake"
if exist "%target_pakfile%" goto :eof

REM no luck there, so let's look in the usual locations

setlocal EnableDelayedExpansion
set drives=
for /f "delims=: tokens=1,*" %%a in ('fsutil fsinfo drives') do (
for %%c in (%%b) do (
if exist "%%c" set drives=%drives% %%c
if exist "%%c" set drives=!drives! %%c
)
)
call :find_and_copy_from "Quake"
Expand All @@ -127,6 +132,7 @@ call :find_and_copy_from "Steam\steamapps\common\Quake"
if exist "%target_pakfile%" goto :eof
call :find_and_copy_from "GOG Games\Quake"
if exist "%target_pakfile%" goto :eof
endlocal

if "%found_file%"=="false" (
echo Couldn't find "%gamedir%\%pak_file%" in the usual locations.
Expand All @@ -141,14 +147,27 @@ REM subroutines used by find_pakfile
reg query "%~1" /v "%~2" > nul 2>&1
if %errorlevel% equ 0 (
for /f "tokens=2,* skip=2" %%a in ('reg query "%~1" /v "%~2"') do (
set dirs_checked=%dirs_checked% "%%b"
if exist "%%b\%gamedir%\%pak_file%" (
call :copy_to_target "%%b\%gamedir%\%pak_file%"
)
call :handle_reg_query_copy "%%b"
)
)
goto :eof

:reg_query_path_root_and_copy
reg query "%~1" /v "%~2" > nul 2>&1
if %errorlevel% equ 0 (
for /f "tokens=2,* skip=2" %%a in ('reg query "%~1" /v "%~2"') do (
call :handle_reg_query_copy "%%b\%~3"
)
)
goto :eof

:handle_reg_query_copy
set fullpath=%~1
set backslashed=%fullpath:/=\%
call :conditional_copy "%backslashed%"
set dirs_checked=%dirs_checked% "%backslashed%"
goto :eof

:find_and_copy_from
for /f %%a in ("%drives%") do (
call :conditional_copy "%%a%~1"
Expand Down

0 comments on commit 4c68481

Please sign in to comment.