diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-03 22:02:54 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-03 22:02:54 -0500 |
commit | 85ff940e6882278fe131cb15b721a09e9283b8fc (patch) | |
tree | 48c31767c2e6e184646601dab76274f62eb41692 | |
parent | 9689bb948455d06b940667753ffeb660c07889a9 (diff) | |
download | SMAPI-85ff940e6882278fe131cb15b721a09e9283b8fc.tar.gz SMAPI-85ff940e6882278fe131cb15b721a09e9283b8fc.tar.bz2 SMAPI-85ff940e6882278fe131cb15b721a09e9283b8fc.zip |
move install package's Mono/Windows folders out of root
This will hopefully reduce confusion among players who go into "Windows" instead of running install.exe.
-rw-r--r-- | README.md | 63 | ||||
-rw-r--r-- | release-notes.md | 3 | ||||
-rw-r--r-- | src/StardewModdingAPI.Installer/InteractiveInstaller.cs | 6 | ||||
-rw-r--r-- | src/prepare-install-package.targets | 59 |
4 files changed, 67 insertions, 64 deletions
@@ -70,46 +70,47 @@ folder containing `src`). 2. In Linux or Mac: 1. Rebuild the solution in _Release_ mode. - 2. Copy `bin/Packaged/Mono` into the `SMAPI <version>` folder. + 2. Copy `bin/internal/Packaged/Mono` into the `SMAPI <version>` folder. 3. If you did everything right so far, you should have a folder like this: ``` SMAPI-1.x/ - Mono/ - Mods/* - Mono.Cecil.dll - Mono.Cecil.Rocks.dll - Newtonsoft.Json.dll - StardewModdingAPI - StardewModdingAPI.config.json - StardewModdingAPI.data.json - StardewModdingAPI.exe - StardewModdingAPI.exe.mdb - StardewModdingAPI.AssemblyRewriters.dll - System.Numerics.dll - System.Runtime.Caching.dll - steam_appid.txt - Windows/ - Mods/* - Mono.Cecil.dll - Mono.Cecil.Rocks.dll - Newtonsoft.Json.dll - StardewModdingAPI.config.json - StardewModdingAPI.data.json - StardewModdingAPI.exe - StardewModdingAPI.pdb - StardewModdingAPI.xml - StardewModdingAPI.AssemblyRewriters.dll - steam_appid.txt install.exe readme.txt + internal/ + Mono/ + Mods/* + Mono.Cecil.dll + Mono.Cecil.Rocks.dll + Newtonsoft.Json.dll + StardewModdingAPI + StardewModdingAPI.AssemblyRewriters.dll + StardewModdingAPI.config.json + StardewModdingAPI.data.json + StardewModdingAPI.exe + StardewModdingAPI.exe.mdb + steam_appid.txt + System.Numerics.dll + System.Runtime.Caching.dll + Windows/ + Mods/* + Mono.Cecil.dll + Mono.Cecil.Rocks.dll + Newtonsoft.Json.dll + StardewModdingAPI.AssemblyRewriters.dll + StardewModdingAPI.config.json + StardewModdingAPI.data.json + StardewModdingAPI.exe + StardewModdingAPI.pdb + StardewModdingAPI.xml + steam_appid.txt ``` - 4. Open a terminal in the `SMAPI <version>` folder and run `chmod 755 Mono/StardewModdingAPI`. + 4. Open a terminal in the `SMAPI <version>` folder and run `chmod 755 internal/Mono/StardewModdingAPI`. 5. Copy & paste the `SMAPI <version>` folder as `SMAPI <version> for developers`. 6. In the `SMAPI <version>` folder, delete the following files: - * `Mono/StardewModdingAPI.config.json` - * `Windows/StardewModdingAPI.config.json` - * `Windows/StardewModdingAPI.xml` + * `internal/Mono/StardewModdingAPI.config.json` + * `internal/Windows/StardewModdingAPI.config.json` + * `internal/Windows/StardewModdingAPI.xml` 7. Compress the two folders into `SMAPI <version>.zip` and `SMAPI <version> for developers.zip`. ## Advanced usage diff --git a/release-notes.md b/release-notes.md index f9c7add0..1c994b97 100644 --- a/release-notes.md +++ b/release-notes.md @@ -4,8 +4,9 @@ See [log](https://github.com/Pathoschild/SMAPI/compare/1.7...1.8). For players: -* Mods will no longer have generated `.cache` subfolders. +* Mods will no longer generate `.cache` subfolders. * Fixed multiple issues where mods failed during assembly loading. +* Tweaked install package to reduce confusion. For mod developers: * You can now create a `SemanticVersion` from a version string. diff --git a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs index c024b128..306225a7 100644 --- a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs +++ b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs @@ -27,7 +27,7 @@ namespace StardewModdingApi.Installer yield return $"{Environment.GetEnvironmentVariable("HOME")}/.local/share/Steam/steamapps/common/Stardew Valley"; // Mac - yield return $"/Applications/Stardew Valley.app/Contents/MacOS"; + yield return "/Applications/Stardew Valley.app/Contents/MacOS"; yield return $"{Environment.GetEnvironmentVariable("HOME")}/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS"; // Windows @@ -110,7 +110,7 @@ namespace StardewModdingApi.Installer ** collect details ****/ Platform platform = this.DetectPlatform(); - DirectoryInfo packageDir = new DirectoryInfo(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), platform.ToString())); + DirectoryInfo packageDir = new DirectoryInfo(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "internal", platform.ToString())); DirectoryInfo installDir = this.InteractivelyGetInstallPath(platform); var paths = new { @@ -126,7 +126,7 @@ namespace StardewModdingApi.Installer ****/ if (!packageDir.Exists) { - this.ExitError($"The '{platform}' package directory is missing (should be at {packageDir})."); + this.ExitError($"The 'internal/{platform}' package folder is missing (should be at {packageDir})."); return; } if (!File.Exists(paths.executable)) diff --git a/src/prepare-install-package.targets b/src/prepare-install-package.targets index e903e153..f411b909 100644 --- a/src/prepare-install-package.targets +++ b/src/prepare-install-package.targets @@ -7,45 +7,46 @@ --> <Target Name="AfterBuild"> <PropertyGroup> - <CompiledInstallerPath>$(SolutionDir)\..\bin\Packaged</CompiledInstallerPath> <CompiledSmapiPath>$(SolutionDir)\..\bin\$(Configuration)\SMAPI</CompiledSmapiPath> + <PackagePath>$(SolutionDir)\..\bin\Packaged</PackagePath> + <PackageInternalPath>$(PackagePath)\internal</PackageInternalPath> </PropertyGroup> <ItemGroup> <CompiledMods Include="$(SolutionDir)\..\bin\$(Configuration)\Mods\**\*.*" /> </ItemGroup> <!-- reset package directory --> - <RemoveDir Directories="$(CompiledInstallerPath)" /> + <RemoveDir Directories="$(PackagePath)" /> <!-- copy installer files --> - <Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFiles="$(CompiledInstallerPath)\install.exe" /> - <Copy SourceFiles="$(TargetDir)\readme.txt" DestinationFiles="$(CompiledInstallerPath)\readme.txt" /> + <Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFiles="$(PackagePath)\install.exe" /> + <Copy SourceFiles="$(TargetDir)\readme.txt" DestinationFiles="$(PackagePath)\README.txt" /> <!-- copy SMAPI files for Mono --> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.dll" DestinationFolder="$(CompiledInstallerPath)\Mono" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.Rocks.dll" DestinationFolder="$(CompiledInstallerPath)\Mono" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Newtonsoft.Json.dll" DestinationFolder="$(CompiledInstallerPath)\Mono" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.exe" DestinationFolder="$(CompiledInstallerPath)\Mono" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.exe.mdb" DestinationFolder="$(CompiledInstallerPath)\Mono" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.AssemblyRewriters.dll" DestinationFolder="$(CompiledInstallerPath)\Mono" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.config.json" DestinationFolder="$(CompiledInstallerPath)\Mono" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.data.json" DestinationFolder="$(CompiledInstallerPath)\Mono" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Numerics.dll" DestinationFolder="$(CompiledInstallerPath)\Mono" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Runtime.Caching.dll" DestinationFolder="$(CompiledInstallerPath)\Mono" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\unix-launcher.sh" DestinationFiles="$(CompiledInstallerPath)\Mono\StardewModdingAPI" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\steam_appid.txt" DestinationFolder="$(CompiledInstallerPath)\Mono" /> - <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="@(CompiledMods)" DestinationFolder="$(CompiledInstallerPath)\Mono\Mods\%(RecursiveDir)" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.dll" DestinationFolder="$(PackageInternalPath)\Mono" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.Rocks.dll" DestinationFolder="$(PackageInternalPath)\Mono" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Newtonsoft.Json.dll" DestinationFolder="$(PackageInternalPath)\Mono" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.exe" DestinationFolder="$(PackageInternalPath)\Mono" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.exe.mdb" DestinationFolder="$(PackageInternalPath)\Mono" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.AssemblyRewriters.dll" DestinationFolder="$(PackageInternalPath)\Mono" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.config.json" DestinationFolder="$(PackageInternalPath)\Mono" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.data.json" DestinationFolder="$(PackageInternalPath)\Mono" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Numerics.dll" DestinationFolder="$(PackageInternalPath)\Mono" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Runtime.Caching.dll" DestinationFolder="$(PackageInternalPath)\Mono" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\unix-launcher.sh" DestinationFiles="$(PackageInternalPath)\Mono\StardewModdingAPI" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\steam_appid.txt" DestinationFolder="$(PackageInternalPath)\Mono" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="@(CompiledMods)" DestinationFolder="$(PackageInternalPath)\Mono\Mods\%(RecursiveDir)" /> <!-- copy SMAPI files for Windows --> - <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.dll" DestinationFolder="$(CompiledInstallerPath)\Windows" /> - <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.Rocks.dll" DestinationFolder="$(CompiledInstallerPath)\Windows" /> - <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Newtonsoft.Json.dll" DestinationFolder="$(CompiledInstallerPath)\Windows" /> - <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.exe" DestinationFolder="$(CompiledInstallerPath)\Windows" /> - <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.pdb" DestinationFolder="$(CompiledInstallerPath)\Windows" /> - <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.xml" DestinationFolder="$(CompiledInstallerPath)\Windows" /> - <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.AssemblyRewriters.dll" DestinationFolder="$(CompiledInstallerPath)\Windows" /> - <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.config.json" DestinationFolder="$(CompiledInstallerPath)\Windows" /> - <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.data.json" DestinationFolder="$(CompiledInstallerPath)\Windows" /> - <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\steam_appid.txt" DestinationFolder="$(CompiledInstallerPath)\Windows" /> - <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="@(CompiledMods)" DestinationFolder="$(CompiledInstallerPath)\Windows\Mods\%(RecursiveDir)" /> + <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.dll" DestinationFolder="$(PackageInternalPath)\Windows" /> + <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.Rocks.dll" DestinationFolder="$(PackageInternalPath)\Windows" /> + <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Newtonsoft.Json.dll" DestinationFolder="$(PackageInternalPath)\Windows" /> + <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.exe" DestinationFolder="$(PackageInternalPath)\Windows" /> + <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.pdb" DestinationFolder="$(PackageInternalPath)\Windows" /> + <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.xml" DestinationFolder="$(PackageInternalPath)\Windows" /> + <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.AssemblyRewriters.dll" DestinationFolder="$(PackageInternalPath)\Windows" /> + <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.config.json" DestinationFolder="$(PackageInternalPath)\Windows" /> + <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.data.json" DestinationFolder="$(PackageInternalPath)\Windows" /> + <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\steam_appid.txt" DestinationFolder="$(PackageInternalPath)\Windows" /> + <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="@(CompiledMods)" DestinationFolder="$(PackageInternalPath)\Windows\Mods\%(RecursiveDir)" /> </Target> -</Project>
\ No newline at end of file +</Project> |