Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving the resource file into another dll #1367

Merged
merged 7 commits into from
Jun 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/Directory.Build.props @andy840119
/appveyor.yml @andy840119
/cake.config @andy840119
/crowdin.yml @andy840119

# Resource related
/assets/ @andy840119
Expand Down
12 changes: 0 additions & 12 deletions crowdin.yml

This file was deleted.

1 change: 1 addition & 0 deletions osu.Game.Rulesets.Karaoke/ILRepack.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<Target Name="ILRepacker" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
<ItemGroup>
<InputAssemblies Include="$(OutputPath)\osu.Game.Rulesets.Karaoke.dll"/>
<InputAssemblies Include="$(OutputPath)\osu.Game.Rulesets.Karaoke.Resources.dll"/>
<InputAssemblies Include="$(OutputPath)\LanguageDetection.dll"/>
<InputAssemblies Include="$(OutputPath)\LrcParser.dll"/>
<InputAssemblies Include="$(OutputPath)\Octokit.dll"/>
Expand Down
19 changes: 6 additions & 13 deletions osu.Game.Rulesets.Karaoke/KaraokeRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
Expand All @@ -25,6 +24,7 @@
using osu.Game.Rulesets.Karaoke.Edit.Setup;
using osu.Game.Rulesets.Karaoke.Mods;
using osu.Game.Rulesets.Karaoke.Replays;
using osu.Game.Rulesets.Karaoke.Resources;
using osu.Game.Rulesets.Karaoke.Scoring;
using osu.Game.Rulesets.Karaoke.Skinning.Legacy;
using osu.Game.Rulesets.Karaoke.Statistics;
Expand Down Expand Up @@ -182,23 +182,16 @@ public override IResourceStore<byte[]> CreateResourceStore()
{
var store = new ResourceStore<byte[]>();

// add ruleset store
store.AddStore(getRulesetStore());
// add resource in the current dll.
store.AddStore(base.CreateResourceStore());

// add resource dll, it only works in the local because the resource will be packed into main dll in the resource build.
store.AddStore(new DllResourceStore(KaraokeResources.ResourceAssembly));

// add shader resource from font package.
store.AddStore(new NamespacedResourceStore<byte[]>(new ShaderResourceStore(), "Resources"));

return store;

IResourceStore<byte[]> getRulesetStore()
{
var rulesetStore = base.CreateResourceStore();
if (rulesetStore.GetAvailableResources().Any())
return rulesetStore;

// IRMerge might change the assembly name, which will cause resource not found.
return new NamespacedResourceStore<byte[]>(new DllResourceStore("osu.Game.Rulesets.Karaoke.dll"), @"Resources");
}
}

public override DifficultyCalculator CreateDifficultyCalculator(IWorkingBeatmap beatmap) => new KaraokeDifficultyCalculator(RulesetInfo, beatmap);
Expand Down
64 changes: 0 additions & 64 deletions osu.Game.Rulesets.Karaoke/Localisation/ChangelogSection.ja.resx

This file was deleted.

64 changes: 0 additions & 64 deletions osu.Game.Rulesets.Karaoke/Localisation/ChangelogSection.resx

This file was deleted.

This file was deleted.

64 changes: 0 additions & 64 deletions osu.Game.Rulesets.Karaoke/Localisation/ChangelogSection.zh.resx

This file was deleted.

2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Karaoke/Localisation/ChangelogStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace osu.Game.Rulesets.Karaoke.Localisation
{
public static class ChangelogStrings
{
private const string prefix = @"osu.Game.Rulesets.Karaoke.Localisation.ChangelogSection";
private const string prefix = @"osu.Game.Rulesets.Karaoke.Resources.Localisation.ChangelogSection";

/// <summary>
/// "View current changelog"
Expand Down
Loading