summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/smapi.targets27
-rw-r--r--package.nuspec8
2 files changed, 13 insertions, 22 deletions
diff --git a/build/smapi.targets b/build/smapi.targets
index b2ce5967..a544067b 100644
--- a/build/smapi.targets
+++ b/build/smapi.targets
@@ -9,41 +9,32 @@
## find platform + game path
#######-->
<Choose>
- <When Condition="$(OS) == 'Unix'">
+ <When Condition="$(OS) == 'Unix' OR $(OS) == 'OSX'">
<PropertyGroup>
- <GamePlatform>Linux</GamePlatform>
+ <!-- Linux -->
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/GOG Games/Stardew Valley/game</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.local/share/Steam/steamapps/common/Stardew Valley</GamePath>
- </PropertyGroup>
- </When>
- <When Condition="$(OS) == 'OSX'">
- <PropertyGroup>
- <GamePlatform>Mac</GamePlatform>
+
+ <!-- Mac (may be 'Unix' or 'OSX') -->
<GamePath Condition="!Exists('$(GamePath)')">/Applications/Stardew Valley.app/Contents/MacOS</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS</GamePath>
</PropertyGroup>
</When>
<When Condition="$(OS) == 'Windows_NT'">
<PropertyGroup>
- <GamePlatform>Windows</GamePlatform>
<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>
<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>
</PropertyGroup>
</When>
- <Otherwise>
- <PropertyGroup>
- <GamePlatform></GamePlatform>
- </PropertyGroup>
- </Otherwise>
</Choose>
<!--######
## configure build
#######-->
<Choose>
- <When Condition="$(GamePlatform) == 'Windows'">
+ <When Condition="$(OS) == 'Windows_NT'">
<!-- references -->
<ItemGroup>
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
@@ -106,12 +97,12 @@
#######-->
<Target Name="BeforeBuild">
<!-- show error for unknown platform -->
- <Error Condition="'$(GamePlatform)' != 'Linux' AND '$(GamePlatform)' != 'Mac' AND '$(GamePlatform)' != 'Windows'" Text="The build config package doesn't recognise OS type '$(OS)' (mapped to game platform '$(GamePlatform)')." />
+ <Error Condition="'$(OS)' != 'OSX' AND '$(OS)' != 'Unix' AND '$(OS)' != 'Windows_NT'" Text="The build config package doesn't recognise OS type '$(OS)'." />
<!-- 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. See https://github.com/Pathoschild/Stardew.ModBuildConfig#troubleshoot for help." />
- <Error Condition="'$(GamePlatform)' == 'Windows' AND !Exists('$(GamePath)\Stardew Valley.exe')" Text="Found a game folder at $(GamePath), but it doesn't contain Stardew Valley. You should delete this folder if it's empty." />
- <Error Condition="'$(GamePlatform)' != 'Windows' AND !Exists('$(GamePath)\StardewValley.exe')" Text="Found a game folder at $(GamePath), but it doesn't contain Stardew Valley. You should delete this folder if it's empty." />
+ <Error Condition="'$(OS)' == 'Windows_NT' AND !Exists('$(GamePath)\Stardew Valley.exe')" Text="Found a game folder at $(GamePath), but it doesn't contain Stardew Valley. You should delete this folder if it's empty." />
+ <Error Condition="'$(OS)' != 'Windows_NT' AND !Exists('$(GamePath)\StardewValley.exe')" Text="Found a game folder at $(GamePath), but it doesn't contain Stardew Valley. You should delete this folder if it's empty." />
<Error Condition="!Exists('$(GamePath)\StardewModdingAPI.exe')" Text="Found a game folder at $(GamePath), but it doesn't contain SMAPI." />
</Target>
@@ -139,4 +130,4 @@
<Copy SourceFiles="$(FallbackManifestPath)" DestinationFolder="$(ModDeployPath)" Condition="!Exists('$(TargetDir)\manifest.json')" />
<Copy SourceFiles="@(FallbackTranslationFiles)" DestinationFolder="$(ModDeployPath)\i18n\%(RecursiveDir)" Condition="!Exists('$(TargetDir)\i18n')" />
</Target>
-</Project> \ No newline at end of file
+</Project>
diff --git a/package.nuspec b/package.nuspec
index 900e2a5b..f216803a 100644
--- a/package.nuspec
+++ b/package.nuspec
@@ -2,16 +2,16 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Pathoschild.Stardew.ModBuildConfig</id>
- <version>1.6.1</version>
+ <version>1.6.2</version>
<title>MSBuild config for Stardew Valley mods</title>
<authors>Pathoschild</authors>
<owners>Pathoschild</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
- <licenseUrl>https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.6.1/LICENSE.txt</licenseUrl>
+ <licenseUrl>https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.6.2/LICENSE.txt</licenseUrl>
<projectUrl>https://github.com/Pathoschild/Stardew.ModBuildConfig#readme</projectUrl>
- <iconUrl>https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.6.1/assets/nuget-icon.png</iconUrl>
+ <iconUrl>https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.6.2/assets/nuget-icon.png</iconUrl>
<description>Automates the build configuration for crossplatform Stardew Valley SMAPI mods.</description>
- <releaseNotes>Improved OS and game path detection.</releaseNotes>
+ <releaseNotes>Improved OS and game path detection; removed undocumented GamePlatform variable.</releaseNotes>
</metadata>
<files>
<file src="build/smapi.targets" target="build/Pathoschild.Stardew.ModBuildConfig.targets" />