From 805e6cca75ef9d6637c10497959aadabdb163a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sat, 19 Jun 2021 11:07:13 +0200 Subject: [PATCH 1/8] Add direct references to Realm from Xamarin projects Fixes crashes on launch due to missing `realm-wrapper` transitive dependency. --- osu.Android.props | 4 ++++ osu.iOS.props | 1 + 2 files changed, 5 insertions(+) diff --git a/osu.Android.props b/osu.Android.props index 3a1e6ba9a3..1dc99bb60a 100644 --- a/osu.Android.props +++ b/osu.Android.props @@ -54,4 +54,8 @@ + + + + diff --git a/osu.iOS.props b/osu.iOS.props index 01c9b27cc7..3689ce51f2 100644 --- a/osu.iOS.props +++ b/osu.iOS.props @@ -99,5 +99,6 @@ + From fa87aa6be51ec0558ea0a94522751c52dd3330c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sat, 19 Jun 2021 11:10:37 +0200 Subject: [PATCH 2/8] Add autogenerated FodyWeavers files to Xamarin projects --- osu.Android/FodyWeavers.xml | 3 +++ osu.Android/FodyWeavers.xsd | 34 ++++++++++++++++++++++++++++++++++ osu.iOS/FodyWeavers.xml | 3 +++ osu.iOS/FodyWeavers.xsd | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 osu.Android/FodyWeavers.xml create mode 100644 osu.Android/FodyWeavers.xsd create mode 100644 osu.iOS/FodyWeavers.xml create mode 100644 osu.iOS/FodyWeavers.xsd diff --git a/osu.Android/FodyWeavers.xml b/osu.Android/FodyWeavers.xml new file mode 100644 index 0000000000..cc07b89533 --- /dev/null +++ b/osu.Android/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/osu.Android/FodyWeavers.xsd b/osu.Android/FodyWeavers.xsd new file mode 100644 index 0000000000..447878c551 --- /dev/null +++ b/osu.Android/FodyWeavers.xsd @@ -0,0 +1,34 @@ + + + + + + + + + + + Disables anonymized usage information from being sent on build. Read more about what data is being collected and why here: https://github.com/realm/realm-dotnet/blob/master/Realm/Realm.Fody/Common/Analytics.cs + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/osu.iOS/FodyWeavers.xml b/osu.iOS/FodyWeavers.xml new file mode 100644 index 0000000000..cc07b89533 --- /dev/null +++ b/osu.iOS/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/osu.iOS/FodyWeavers.xsd b/osu.iOS/FodyWeavers.xsd new file mode 100644 index 0000000000..447878c551 --- /dev/null +++ b/osu.iOS/FodyWeavers.xsd @@ -0,0 +1,34 @@ + + + + + + + + + + + Disables anonymized usage information from being sent on build. Read more about what data is being collected and why here: https://github.com/realm/realm-dotnet/blob/master/Realm/Realm.Fody/Common/Analytics.cs + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file From 46b9fd9ac8a3778201586016d577db9d775524c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sun, 20 Jun 2021 09:36:18 +0200 Subject: [PATCH 3/8] Remove and ignore FodyWeavers schema files --- .gitignore | 3 +++ osu.Android/FodyWeavers.xsd | 34 ---------------------------------- osu.Game/FodyWeavers.xsd | 34 ---------------------------------- osu.iOS/FodyWeavers.xsd | 34 ---------------------------------- 4 files changed, 3 insertions(+), 102 deletions(-) delete mode 100644 osu.Android/FodyWeavers.xsd delete mode 100644 osu.Game/FodyWeavers.xsd delete mode 100644 osu.iOS/FodyWeavers.xsd diff --git a/.gitignore b/.gitignore index d122d25054..de6a3ac848 100644 --- a/.gitignore +++ b/.gitignore @@ -336,3 +336,6 @@ inspectcode /BenchmarkDotNet.Artifacts *.GeneratedMSBuildEditorConfig.editorconfig + +# Fody (pulled in by Realm) - schema file +FodyWeavers.xsd diff --git a/osu.Android/FodyWeavers.xsd b/osu.Android/FodyWeavers.xsd deleted file mode 100644 index 447878c551..0000000000 --- a/osu.Android/FodyWeavers.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - Disables anonymized usage information from being sent on build. Read more about what data is being collected and why here: https://github.com/realm/realm-dotnet/blob/master/Realm/Realm.Fody/Common/Analytics.cs - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/osu.Game/FodyWeavers.xsd b/osu.Game/FodyWeavers.xsd deleted file mode 100644 index 447878c551..0000000000 --- a/osu.Game/FodyWeavers.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - Disables anonymized usage information from being sent on build. Read more about what data is being collected and why here: https://github.com/realm/realm-dotnet/blob/master/Realm/Realm.Fody/Common/Analytics.cs - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/osu.iOS/FodyWeavers.xsd b/osu.iOS/FodyWeavers.xsd deleted file mode 100644 index 447878c551..0000000000 --- a/osu.iOS/FodyWeavers.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - Disables anonymized usage information from being sent on build. Read more about what data is being collected and why here: https://github.com/realm/realm-dotnet/blob/master/Realm/Realm.Fody/Common/Analytics.cs - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file From 1f383532f2a7bee5caa6bc496e887c8dce0979dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sun, 20 Jun 2021 09:37:23 +0200 Subject: [PATCH 4/8] Move FodyWeavers configuration to solution root --- osu.Android/FodyWeavers.xml => FodyWeavers.xml | 0 osu.Game/FodyWeavers.xml | 3 --- osu.iOS/FodyWeavers.xml | 3 --- 3 files changed, 6 deletions(-) rename osu.Android/FodyWeavers.xml => FodyWeavers.xml (100%) delete mode 100644 osu.Game/FodyWeavers.xml delete mode 100644 osu.iOS/FodyWeavers.xml diff --git a/osu.Android/FodyWeavers.xml b/FodyWeavers.xml similarity index 100% rename from osu.Android/FodyWeavers.xml rename to FodyWeavers.xml diff --git a/osu.Game/FodyWeavers.xml b/osu.Game/FodyWeavers.xml deleted file mode 100644 index cc07b89533..0000000000 --- a/osu.Game/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/osu.iOS/FodyWeavers.xml b/osu.iOS/FodyWeavers.xml deleted file mode 100644 index cc07b89533..0000000000 --- a/osu.iOS/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file From 32bd3107e1929cd8b9f1bb5f636ced0b8175da1f Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Sun, 20 Jun 2021 17:07:41 +0900 Subject: [PATCH 5/8] Remove high performance GC setting --- osu.Game/Performance/HighPerformanceSession.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/osu.Game/Performance/HighPerformanceSession.cs b/osu.Game/Performance/HighPerformanceSession.cs index 96e67669c5..661c1046f1 100644 --- a/osu.Game/Performance/HighPerformanceSession.cs +++ b/osu.Game/Performance/HighPerformanceSession.cs @@ -1,7 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -using System.Runtime; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; @@ -11,7 +10,6 @@ namespace osu.Game.Performance public class HighPerformanceSession : Component { private readonly IBindable localUserPlaying = new Bindable(); - private GCLatencyMode originalGCMode; [BackgroundDependencyLoader] private void load(OsuGame game) @@ -34,14 +32,10 @@ namespace osu.Game.Performance protected virtual void EnableHighPerformanceSession() { - originalGCMode = GCSettings.LatencyMode; - GCSettings.LatencyMode = GCLatencyMode.LowLatency; } protected virtual void DisableHighPerformanceSession() { - if (GCSettings.LatencyMode == GCLatencyMode.LowLatency) - GCSettings.LatencyMode = originalGCMode; } } } From e4705abee2bb7b2017838440cd187154e0feefbf Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Sun, 20 Jun 2021 20:07:46 -0700 Subject: [PATCH 6/8] Update custom rulesets directory link in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3054f19e79..2213b42121 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ If your platform is not listed above, there is still a chance you can manually b osu! is designed to have extensible modular gameplay modes, called "rulesets". Building one of these allows a developer to harness the power of osu! for their own game style. To get started working on a ruleset, we have some templates available [here](https://github.com/ppy/osu/tree/master/Templates). -You can see some examples of custom rulesets by visiting the [custom ruleset directory](https://github.com/ppy/osu/issues/5852). +You can see some examples of custom rulesets by visiting the [custom ruleset directory](https://github.com/ppy/osu/discussions/13096). ## Developing osu! From 8b2110c048d28a79244581e0d10fbf33ba1a578f Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Sun, 20 Jun 2021 21:36:08 -0700 Subject: [PATCH 7/8] Add failing discussion links test --- osu.Game.Tests/Chat/MessageFormatterTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osu.Game.Tests/Chat/MessageFormatterTests.cs b/osu.Game.Tests/Chat/MessageFormatterTests.cs index ecb37706b0..2c2c4dc24e 100644 --- a/osu.Game.Tests/Chat/MessageFormatterTests.cs +++ b/osu.Game.Tests/Chat/MessageFormatterTests.cs @@ -28,6 +28,8 @@ namespace osu.Game.Tests.Chat [TestCase(LinkAction.OpenBeatmapSet, "123", "https://dev.ppy.sh/beatmapsets/123")] [TestCase(LinkAction.OpenBeatmapSet, "123", "https://dev.ppy.sh/beatmapsets/123/whatever")] [TestCase(LinkAction.External, "https://dev.ppy.sh/beatmapsets/abc", "https://dev.ppy.sh/beatmapsets/abc")] + [TestCase(LinkAction.External, "https://dev.ppy.sh/beatmapsets/discussions", "https://dev.ppy.sh/beatmapsets/discussions")] + [TestCase(LinkAction.External, "https://dev.ppy.sh/beatmapsets/discussions/123", "https://dev.ppy.sh/beatmapsets/discussions/123")] public void TestBeatmapLinks(LinkAction expectedAction, string expectedArg, string link) { MessageFormatter.WebsiteRootUrl = "dev.ppy.sh"; From 6fda5e569ad5b4489aacd23c529570f870efd90e Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Sun, 20 Jun 2021 21:37:00 -0700 Subject: [PATCH 8/8] Fix beatmap discussion links wrongly leading to beatmap page --- osu.Game/Online/Chat/MessageFormatter.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game/Online/Chat/MessageFormatter.cs b/osu.Game/Online/Chat/MessageFormatter.cs index df14d7eb1c..faee08742b 100644 --- a/osu.Game/Online/Chat/MessageFormatter.cs +++ b/osu.Game/Online/Chat/MessageFormatter.cs @@ -154,6 +154,10 @@ namespace osu.Game.Online.Chat case "beatmapsets": case "d": { + if (mainArg == "discussions") + // handle discussion links externally for now + return new LinkDetails(LinkAction.External, url); + if (args.Length > 4 && int.TryParse(args[4], out var id)) // https://osu.ppy.sh/beatmapsets/1154158#osu/2768184 return new LinkDetails(LinkAction.OpenBeatmap, id.ToString());