simplify config.json and metadata.json names
This commit is contained in:
parent
abffdc2dab
commit
c15785a68d
|
@ -118,8 +118,8 @@
|
|||
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFolder="$(GamePath)" />
|
||||
<Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)" />
|
||||
<Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)" />
|
||||
<Copy SourceFiles="$(TargetDir)\$(TargetName).config.json" DestinationFolder="$(GamePath)\smapi-internal" />
|
||||
<Copy SourceFiles="$(TargetDir)\$(TargetName).metadata.json" DestinationFolder="$(GamePath)\smapi-internal" />
|
||||
<Copy SourceFiles="$(TargetDir)\SMAPI.config.json" DestinationFiles="$(GamePath)\smapi-internal\config.json" />
|
||||
<Copy SourceFiles="$(TargetDir)\SMAPI.metadata.json" DestinationFiles="$(GamePath)\smapi-internal\metadata.json" />
|
||||
<Copy SourceFiles="$(TargetDir)\0Harmony.dll" DestinationFolder="$(GamePath)\smapi-internal" />
|
||||
<Copy SourceFiles="$(TargetDir)\Newtonsoft.Json.dll" DestinationFolder="$(GamePath)\smapi-internal" />
|
||||
<Copy SourceFiles="$(TargetDir)\Mono.Cecil.dll" DestinationFolder="$(GamePath)\smapi-internal" />
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
<Copy SourceFiles="$(CompiledSmapiPath)\0Harmony.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
|
||||
<Copy SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
|
||||
<Copy SourceFiles="$(CompiledSmapiPath)\Newtonsoft.Json.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
|
||||
<Copy SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.config.json" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
|
||||
<Copy SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.metadata.json" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
|
||||
<Copy SourceFiles="$(CompiledSmapiPath)\SMAPI.config.json" DestinationFiles="$(PackagePath)\bundle\smapi-internal\config.json" />
|
||||
<Copy SourceFiles="$(CompiledSmapiPath)\SMAPI.metadata.json" DestinationFiles="$(PackagePath)\bundle\smapi-internal\metadata.json" />
|
||||
<Copy SourceFiles="$(CompiledToolkitPath)\SMAPI.Toolkit.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
|
||||
<Copy SourceFiles="$(CompiledToolkitPath)\SMAPI.Toolkit.pdb" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
|
||||
<Copy SourceFiles="$(CompiledToolkitPath)\SMAPI.Toolkit.xml" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
|
||||
|
@ -76,7 +76,7 @@
|
|||
<RemoveDir Directories="$(PackageDevPath)\bundle" />
|
||||
|
||||
<!-- finalise normal installer -->
|
||||
<ReplaceFileText FilePath="$(PackagePath)\bundle\smapi-internal\StardewModdingAPI.config.json" Search=""DeveloperMode": true" Replace=""DeveloperMode": false" />
|
||||
<ReplaceFileText FilePath="$(PackagePath)\bundle\smapi-internal\config.json" Search=""DeveloperMode": true" Replace=""DeveloperMode": false" />
|
||||
<ZipDirectory FromDirPath="$(PackagePath)\bundle" ToFilePath="$(PackagePath)\internal\$(PlatformName)-install.dat" />
|
||||
<RemoveDir Directories="$(PackagePath)\bundle" />
|
||||
</Target>
|
||||
|
|
|
@ -70,8 +70,8 @@ on the wiki for the first-time setup.
|
|||
|
||||
## Customisation
|
||||
### Configuration file
|
||||
You can customise the SMAPI behaviour by editing the `smapi-internal/StardewModdingAPI.config.json`
|
||||
file in your game folder.
|
||||
You can customise the SMAPI behaviour by editing the `smapi-internal/config.json` file in your game
|
||||
folder.
|
||||
|
||||
Basic fields:
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace StardewModdingAPI.Installer.Framework
|
|||
this.UnixLauncherPath = Path.Combine(gameDir.FullName, "StardewValley");
|
||||
this.UnixSmapiLauncherPath = Path.Combine(gameDir.FullName, "StardewModdingAPI");
|
||||
this.UnixBackupLauncherPath = Path.Combine(gameDir.FullName, "StardewValley-original");
|
||||
this.ApiConfigPath = Path.Combine(gameDir.FullName, "smapi-internal", "StardewModdingAPI.config.json");
|
||||
this.ApiConfigPath = Path.Combine(gameDir.FullName, "smapi-internal", "config.json");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ namespace StardewModdingApi.Installer
|
|||
yield return GetInstallPath("StardewModdingAPI.pdb"); // Windows only
|
||||
yield return GetInstallPath("StardewModdingAPI.xml");
|
||||
yield return GetInstallPath("smapi-internal");
|
||||
yield return GetInstallPath("steam_appid.txt");
|
||||
|
||||
// obsolete
|
||||
yield return GetInstallPath(Path.Combine("Mods", ".cache")); // 1.3-1.4
|
||||
|
@ -133,11 +134,9 @@ namespace StardewModdingApi.Installer
|
|||
yield return GetInstallPath("StardewModdingAPI.Toolkit.CoreInterfaces.dll"); // moved in 2.8
|
||||
yield return GetInstallPath("StardewModdingAPI.Toolkit.CoreInterfaces.pdb"); // moved in 2.8
|
||||
yield return GetInstallPath("StardewModdingAPI.Toolkit.CoreInterfaces.xml"); // moved in 2.8
|
||||
yield return GetInstallPath("StardewModdingAPI.xml"); // moved in 2.8
|
||||
yield return GetInstallPath("System.Numerics.dll"); // moved in 2.8
|
||||
yield return GetInstallPath("System.Runtime.Caching.dll"); // moved in 2.8
|
||||
yield return GetInstallPath("System.ValueTuple.dll"); // moved in 2.8
|
||||
yield return GetInstallPath("steam_appid.txt"); // moved in 2.8
|
||||
|
||||
if (modsDir.Exists)
|
||||
{
|
||||
|
|
|
@ -40,5 +40,5 @@ When installing on Linux or Mac:
|
|||
- Make sure Mono is installed (normally the installer checks for you). While it's not required,
|
||||
many mods won't work correctly without it. (Specifically, mods which load PNG images may crash or
|
||||
freeze the game.)
|
||||
- To configure the color scheme, edit the `smapi-internal/StardewModdingAPI.config.json` file and
|
||||
see instructions there for the 'ColorScheme' setting.
|
||||
- To configure the color scheme, edit the `smapi-internal/config.json` file and see instructions
|
||||
there for the 'ColorScheme' setting.
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace StardewModdingAPI.Web.Controllers
|
|||
/// <param name="nexus">The Nexus API client.</param>
|
||||
public ModsApiController(IHostingEnvironment environment, IMemoryCache cache, IOptions<ModUpdateCheckConfig> configProvider, IChucklefishClient chucklefish, IGitHubClient github, IModDropClient modDrop, INexusClient nexus)
|
||||
{
|
||||
this.ModDatabase = new ModToolkit().GetModDatabase(Path.Combine(environment.WebRootPath, "StardewModdingAPI.metadata.json"));
|
||||
this.ModDatabase = new ModToolkit().GetModDatabase(Path.Combine(environment.WebRootPath, "SMAPI.metadata.json"));
|
||||
ModUpdateCheckConfig config = configProvider.Value;
|
||||
this.CompatibilityPageUrl = config.CompatibilityPageUrl;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<Content Update="Views\Mods\Index.cshtml">
|
||||
<Pack>$(IncludeRazorContentInPack)</Pack>
|
||||
</Content>
|
||||
<Content Update="wwwroot\StardewModdingAPI.metadata.json">
|
||||
<Content Update="wwwroot\SMAPI.metadata.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<p>You can disable update checks, and no information will be transmitted to the web API. To do so:</p>
|
||||
<ol>
|
||||
<li><a href="https://stardewvalleywiki.com/Modding:Game_folder">find your game folder</a>;</li>
|
||||
<li>open the <code>smapi-internal/StardewModdingAPI.config.json</code> file in a text editor;</li>
|
||||
<li>open the <code>smapi-internal/config.json</code> file in a text editor;</li>
|
||||
<li>change <code>"CheckForUpdates": true</code> to <code>"CheckForUpdates": false</code>.</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
@ -59,10 +59,10 @@ namespace StardewModdingAPI
|
|||
internal static readonly string InternalFilesPath = Program.DllSearchPath;
|
||||
|
||||
/// <summary>The file path for the SMAPI configuration file.</summary>
|
||||
internal static string ApiConfigPath => Path.Combine(Constants.InternalFilesPath, "StardewModdingAPI.config.json");
|
||||
internal static string ApiConfigPath => Path.Combine(Constants.InternalFilesPath, "config.json");
|
||||
|
||||
/// <summary>The file path for the SMAPI metadata file.</summary>
|
||||
internal static string ApiMetadataPath => Path.Combine(Constants.InternalFilesPath, "StardewModdingAPI.metadata.json");
|
||||
internal static string ApiMetadataPath => Path.Combine(Constants.InternalFilesPath, "metadata.json");
|
||||
|
||||
/// <summary>The filename prefix used for all SMAPI logs.</summary>
|
||||
internal static string LogNamePrefix { get; } = "SMAPI-";
|
||||
|
|
|
@ -42,11 +42,11 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="StardewModdingAPI.config.json">
|
||||
<Content Include="SMAPI.config.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\SMAPI.Web\wwwroot\StardewModdingAPI.metadata.json">
|
||||
<Link>StardewModdingAPI.metadata.json</Link>
|
||||
<Content Include="..\SMAPI.Web\wwwroot\SMAPI.metadata.json">
|
||||
<Link>SMAPI.metadata.json</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Update="steam_appid.txt">
|
||||
|
|
Loading…
Reference in New Issue