Skip to content

Commit

Permalink
Added support for locating the game in GOG library and copying music …
Browse files Browse the repository at this point in the history
…from there.
  • Loading branch information
apanteleev committed Jun 11, 2019
1 parent 362a3ad commit 50f7b94
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions setup/setup.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Section /o "Quake II Full Game" Section_FullGame

CopyFiles "$FullGameDir\baseq2\pak*.pak" "$INSTDIR\baseq2"
CopyFiles "$FullGameDir\baseq2\players" "$INSTDIR\baseq2"
CopyFiles "$FullGameDir\music" "$INSTDIR\music"

SectionEnd

Expand Down
11 changes: 11 additions & 0 deletions setup/setup_gamefiles.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,23 @@ Function FullGamePage_Pre
Abort
${EndIf}

Var /GLOBAL GogDir
Var /GLOBAL BethesdaDir
Var /GLOBAL SteamDir
Var /GLOBAL CurLine
Var /GLOBAL FileHandle
Var /GLOBAL CharIndex

; try to find Quake 2 in the GOG library - this is the most complete version
ReadRegStr $GogDir HKLM "SOFTWARE\WOW6432Node\GOG.com\Games\1441704824" "PATH"
${IfNot} ${Errors}
StrCpy $FullGameDir "$GogDir"
IfFileExists "$FullGameDir\quake2.exe" SearchDone

; not found - clear the variable
StrCpy $FullGameDir ""
${EndIf}

; try to find Quake 2 in the Bethesda library
ReadRegStr $BethesdaDir HKLM "SOFTWARE\Bethesda Softworks\Bethesda.net" "installLocation"
${IfNot} ${Errors}
Expand Down
1 change: 1 addition & 0 deletions setup/steam_setup.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Section /o "Quake II Full Game" Section_FullGame

CopyFiles "$FullGameDir\baseq2\pak*.pak" "$INSTDIR\baseq2"
CopyFiles "$FullGameDir\baseq2\players" "$INSTDIR\baseq2"
CopyFiles "$FullGameDir\music" "$INSTDIR\music"

SectionEnd

Expand Down

0 comments on commit 50f7b94

Please sign in to comment.