diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-10 22:33:45 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-10 22:33:45 -0400 |
commit | 1c7dfb519dd4238336a9a29d677219563e898dc7 (patch) | |
tree | 0982adfd4788fb3bf15505029954ceae8536e1ca /src/SMAPI.ModBuildConfig/build/smapi.targets | |
parent | 1c0d22e82c4690069754d211179d8aef636a3e7a (diff) | |
download | SMAPI-1c7dfb519dd4238336a9a29d677219563e898dc7.tar.gz SMAPI-1c7dfb519dd4238336a9a29d677219563e898dc7.tar.bz2 SMAPI-1c7dfb519dd4238336a9a29d677219563e898dc7.zip |
move validation back into .targets for MonoDevelop compatibility
Diffstat (limited to 'src/SMAPI.ModBuildConfig/build/smapi.targets')
-rw-r--r-- | src/SMAPI.ModBuildConfig/build/smapi.targets | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index 9f3f13f5..f7e75e23 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -118,9 +118,17 @@ <!--********************************************* ** Deploy mod files & create release zip after build **********************************************--> + <!-- if game path or OS is invalid, show one user-friendly error instead of a slew of reference errors --> <Target Name="BeforeBuild"> - <ValidateInstallTask GameDir="$(GamePath)" Platform="$(OS)" /> + <Error Condition="'$(OS)' != 'OSX' AND '$(OS)' != 'Unix' AND '$(OS)' != 'Windows_NT'" Text="The mod build package doesn't recognise OS type '$(OS)'." /> + + <Error Condition="!Exists('$(GamePath)')" Text="The mod build package can't find your game folder. You can specify where to find it; see details at https://github.com/Pathoschild/SMAPI/blob/develop/docs/mod-build-config.md#game-path." /> + <Error Condition="'$(OS)' == 'Windows_NT' AND !Exists('$(GamePath)\Stardew Valley.exe')" Text="The mod build package found a a game folder at $(GamePath), but it doesn't contain the Stardew Valley.exe file. If this folder is invalid, delete it and the package will autodetect another game install path." /> + <Error Condition="'$(OS)' != 'Windows_NT' AND !Exists('$(GamePath)\StardewValley.exe')" Text="The mod build package found a a game folder at $(GamePath), but it doesn't contain the StardewValley.exe file. If this folder is invalid, delete it and the package will autodetect another game install path." /> + <Error Condition="!Exists('$(GamePath)\StardewModdingAPI.exe')" Text="The mod build package found a game folder at $(GamePath), but it doesn't contain SMAPI. You need to install SMAPI before building the mod." /> </Target> + + <!-- deploy mod files & create release zip --> <Target Name="AfterBuild"> <DeployModTask ModFolderName="$(ModFolderName)" |