summaryrefslogtreecommitdiff
path: root/src/SMAPI.ModBuildConfig/build
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-07-13 19:25:23 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-07-13 19:25:23 -0400
commita03a94f6f273ca71dd0a8d38bbff4714cda8d309 (patch)
treeaab6742c629e555ccbe4b3e4ef541d13ad2119c4 /src/SMAPI.ModBuildConfig/build
parent3633fa4b0946574bdc3387dd073459ac878b5e7f (diff)
downloadSMAPI-a03a94f6f273ca71dd0a8d38bbff4714cda8d309.tar.gz
SMAPI-a03a94f6f273ca71dd0a8d38bbff4714cda8d309.tar.bz2
SMAPI-a03a94f6f273ca71dd0a8d38bbff4714cda8d309.zip
fixed some game paths not detected by NuGet package
Diffstat (limited to 'src/SMAPI.ModBuildConfig/build')
-rw-r--r--src/SMAPI.ModBuildConfig/build/smapi.targets8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets
index 8ca178cc..d1c8a4eb 100644
--- a/src/SMAPI.ModBuildConfig/build/smapi.targets
+++ b/src/SMAPI.ModBuildConfig/build/smapi.targets
@@ -31,6 +31,7 @@
<PropertyGroup>
<!-- Linux -->
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/GOG Games/Stardew Valley/game</GamePath>
+ <GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.steam/steam/steamapps/common/Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.local/share/Steam/steamapps/common/Stardew Valley</GamePath>
<!-- Mac (may be 'Unix' or 'OSX') -->
@@ -40,11 +41,18 @@
</When>
<When Condition="$(OS) == 'Windows_NT'">
<PropertyGroup>
+ <!-- default paths -->
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley</GamePath>
+
+ <!-- registry paths -->
<GamePath Condition="!Exists('$(GamePath)')">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\GOG.com\Games\1453375253', 'PATH', null, RegistryView.Registry32))</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null, RegistryView.Registry64, RegistryView.Registry32))</GamePath>
+
+ <!-- derive from Steam library path -->
+ <_SteamLibraryPath>$([MSBuild]::GetRegistryValueFromView('HKEY_CURRENT_USER\SOFTWARE\Valve\Steam', 'SteamPath', null, RegistryView.Registry32))</_SteamLibraryPath>
+ <GamePath Condition="!Exists('$(GamePath)') AND '$(_SteamLibraryPath)' != ''">$(_SteamLibraryPath)\steamapps\common\Stardew Valley</GamePath>
</PropertyGroup>
</When>
</Choose>