diff options
Diffstat (limited to 'src/TrainerMod/TrainerMod.csproj')
-rw-r--r-- | src/TrainerMod/TrainerMod.csproj | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/src/TrainerMod/TrainerMod.csproj b/src/TrainerMod/TrainerMod.csproj index cc195e2a..a6955c68 100644 --- a/src/TrainerMod/TrainerMod.csproj +++ b/src/TrainerMod/TrainerMod.csproj @@ -40,18 +40,18 @@ <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
- <Choose>
- <When Condition="'$(SteamInstallPath)' != ''">
- <PropertyGroup>
- <SteamPath>$(SteamInstallPath)</SteamPath>
- </PropertyGroup>
- </When>
- <Otherwise>
- <PropertyGroup>
- <SteamPath>..\</SteamPath>
- </PropertyGroup>
- </Otherwise>
- </Choose>
+ <PropertyGroup>
+ <!-- Linux paths -->
+ <GamePath Condition="!Exists('$(GamePath)')">$(HOME)/GOG Games/Stardew Valley/game</GamePath>
+ <GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.local/share/Steam/steamapps/common/Stardew Valley</GamePath>
+
+ <!-- Mac paths -->
+ <GamePath Condition="!Exists('$(GamePath)')">$(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS</GamePath>
+
+ <!-- Windows paths -->
+ <GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley</GamePath>
+ <GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley</GamePath>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
@@ -64,7 +64,7 @@ <Private>True</Private>
</Reference>
<Reference Include="Stardew Valley">
- <HintPath>..\..\..\..\Games\SteamLibrary\steamapps\common\Stardew Valley\Stardew Valley.exe</HintPath>
+ <HintPath>$(GamePath)\Stardew Valley.exe</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -75,7 +75,7 @@ <Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="xTile">
- <HintPath>..\..\..\..\Games\SteamLibrary\steamapps\common\Stardew Valley\xTile.dll</HintPath>
+ <HintPath>$(GamePath)\xTile.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -103,11 +103,8 @@ <PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
+ <!-- if game path is invalid, show one user-friendly error instead of a slew of reference errors -->
+ <Error Condition="!Exists('$(GamePath)')" Text="Failed to find the game install path automatically; edit the *.csproj file and manually add a <GamePath> setting with the full directory path containing the Stardew Valley executable." />
</Target>
- <Target Name="AfterBuild">
- </Target>
- -->
</Project>
\ No newline at end of file |