1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 18:27:31 +08:00
Commit Graph

267 Commits

Author SHA1 Message Date
Dean Herbert
975883da5c Move all usages of client.realm filename to a single const 2022-03-30 13:34:48 +09:00
Dean Herbert
1fb3d11591 Add ability to "migrate" data to another folder which has an existing install
Until now, migrating would always attempt to move files.

There's a chance that a user is reinstalling osu! but has their data at
a custom location. We want to allow the chance for them to continue
using the external data. This seems like the easiest way to make it
work.

Would be nice if we had a `Game.Restart()` method, but maybe this is
enough for now?

Note that further down the road we will probably prompt the user to
potentially select a custom install path (including one with existing
data) before osu! gets to writing anything.
2022-03-29 18:04:31 +09:00
Dean Herbert
2938f44e6c Update PresentExternally usages in line with framework changes 2022-03-24 23:41:07 +09:00
Dean Herbert
5b30921cbf Merge branch 'master' into net6 2022-02-14 22:06:35 +09:00
Dean Herbert
908c31c687 Update stream read operations to use new helper methods 2022-02-11 16:02:25 +09:00
Dean Herbert
44f2d8a448 Allow game folder migration to fail gracefully when cleanup cannot completely succeed 2022-02-10 19:30:26 +09:00
Dean Herbert
b2ebcabdd5 Fix potential crash during stable install migration due to multiple configuration files
Apparently this can be a thing on windows.

Closes https://github.com/ppy/osu/discussions/16689.
2022-01-29 13:30:07 +09:00
Dean Herbert
6eb2c28e41 Rename RealmContextFactory to RealmAccess 2022-01-24 20:38:07 +09:00
Dean Herbert
116f35c52a Remove EF FileStore 2022-01-12 16:39:36 +09:00
Dean Herbert
670a30b64b Remove usage of .Result in ArchiveReader 2021-12-31 01:52:01 +09:00
Joseph Madamba
5082b0e63f Fix some identifiers using shortened naming 2021-12-27 20:26:28 -08:00
Bartłomiej Dach
1040590844
Add cancellation support to game-side IResourceStores 2021-12-23 10:33:17 +01:00
Dean Herbert
f9a2db5ec6 Add accessibility to realm factory via IStorageResourceProvider
We might need to rename this class..
2021-12-14 14:19:49 +09:00
Dean Herbert
8d9c37a825 Merge branch 'master' into primary-key-consistency 2021-12-08 21:34:38 +09:00
Dean Herbert
306e13fa7b Remove all usages of FileStore.QueryFiles 2021-11-25 14:06:02 +09:00
Dean Herbert
eecf6ad558 Add IsManaged helper method to EF classes to match realm implementation 2021-11-19 21:56:06 +09:00
Dean Herbert
59e763467f Move StoragePath implementation to an extension method 2021-11-19 16:08:38 +09:00
Dean Herbert
9fc4bb7055 Fix incorrect xmldoc 2021-11-12 16:17:46 +09:00
Dean Herbert
6944151486 Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
Susko3
51c5d0aec7 Update to be in line with framework changes 2021-10-24 13:21:41 +02:00
Susko3
25f172fae8 Update usages of OpenInNativeExplorer to use ShowFileInNativeExplorer
Also updates WrappedStorage to override ShowFileInNativeExplorer.
2021-10-17 12:56:29 +02:00
Bartłomiej Dach
c7db286b94
Merge branch 'master' into file-sanity-checks 2021-10-14 00:17:29 +02:00
Naxesss
d4779f06cf Rework CloseStream 2021-10-12 00:30:00 +02:00
Naxesss
8f093b9a11 Use TagLib instead of ManagedBass 2021-10-11 13:56:26 +02:00
Dean Herbert
d309636460 Update all EF based models to implement new read only interfaces 2021-10-01 16:55:50 +09:00
Dean Herbert
117d47bf7f Rename JSON key resolver to better expose what it's doing 2021-09-29 11:26:37 +09:00
Dean Herbert
d4310f5d9a Move database connection string operations local
In line with framework changes in
https://github.com/ppy/osu-framework/pull/4793.
2021-09-27 17:32:41 +09:00
Dean Herbert
c25ab6835c Remove IJsonSerializable interface
Was pretty pointless and made it hard to use the custom serialisation
terms arbitrarily in tests.
2021-08-31 14:39:20 +09:00
Dean Herbert
f3b68a4fbf Fix storage wrapping logic setting logger too early in startup sequence 2021-07-09 13:17:25 +09:00
smoogipoo
0510282dcb Add missing ctor 2021-06-23 15:10:03 +09:00
Dean Herbert
9044a20120 Merge branch 'master' into realm-key-binding-store 2021-06-10 13:58:08 +09:00
Dean Herbert
b16d10bd95 Provide game-wide resources via IStorageResourceProvider 2021-05-31 18:57:47 +09:00
Dean Herbert
df703b68ec Merge branch 'master' into realm-key-binding-store 2021-05-25 13:41:48 +09:00
Bartłomiej Dach
628e7a71ed Ignore possible nulls in Type.GetType() calls
They're mostly used in extensibility scenarios, so everything happens in
runtime. There is no better resolution than to crash with a null
reference exception.
2021-05-15 00:09:34 +02:00
Bartłomiej Dach
044770f1a2 Locally suppress warning in SerializationReader
`SerializationReader` is not written in a form that would support
turning nullability checking on for the entire class. The biggest
problem there is the inner `DynamicDeserializer` static class, whose
members are initialised via an `initialize()` method, which the compiler
knows nothing about.

For this reason, just opt to suppress the single inspection about
returning a `null` from a method with a return type of `string` (rider
expects `string?`). It would have been also viable to enable nullability
checking for this one method, but that's pretty much the same thing and
adds no safety anyways, so just disable the warning to minimise
surprise.
2021-05-14 23:29:34 +02:00
Dean Herbert
3bf462e4fa Add ignore rule for migrations for client.realm.lock 2021-04-26 15:35:26 +09:00
Dean Herbert
78f274d51a Merge branch 'master' into realm-key-binding-store 2021-04-22 12:13:23 +09:00
Dean Herbert
b5954a55ad Remove empty <returns> xmldoc 2021-04-12 17:46:14 +09:00
Dean Herbert
f8cea5cae3 Merge branch 'master' into realm-migration-operation-blocking 2021-03-26 17:07:31 +09:00
Dean Herbert
03592fa696 Merge branch 'master' into realm-migration-operation-blocking 2021-03-19 21:33:26 +09:00
Dean Herbert
4795170c60 Add back the default json converter locally to ensure it's actually used 2021-03-19 20:07:13 +09:00
Dean Herbert
b1c4ac9f42 Remove local implementation of Vector2Converter
This has been moved to framework in
https://github.com/ppy/osu-framework/pull/4285.
2021-03-19 19:01:32 +09:00
smoogipoo
7fa5fd5647 Update usages of config with framework changes 2021-03-17 16:10:16 +09:00
Dean Herbert
b1cd01ceb8 Apply ConfigureAwait changes to game side 2021-03-08 14:36:35 +09:00
Dean Herbert
8ab7d07eab Tidy up config parsing logic 2021-02-12 12:57:57 +09:00
Lucas A
f0dfa9f8f3 Use the newest config file available (where the local username matches the filename) 2021-02-08 11:12:25 +01:00
Lucas A
f6d08f54e6 Use the oldest user config file available when there happens to be multiple config files available. 2021-02-05 21:19:13 +01:00
Lucas A
383c40b992 Address remaining reviews suggestions. 2021-01-26 20:35:42 +01:00
Lucas A
2a2b6f347e Use a lazy for delegating Songs directory locating until it is actually used. 2021-01-26 19:07:05 +01:00
Lucas A
043385f919 Rename const and fix unintended tabbing. 2021-01-26 18:45:04 +01:00
Lucas A
a4a7f0c578 Address CI inspections. 2021-01-25 19:05:16 +01:00
Lucas A
f0fdad2f83 Construct a DesktopStorage pointing to the absolute path of the song directory. 2021-01-24 22:04:46 +01:00
Lucas A
9a5790cd31 Implement StableStorage class. 2021-01-24 19:18:16 +01:00
Dean Herbert
d2bf3a5805 Add ignore files to avoid copying realm management/pipes 2021-01-21 19:01:58 +09:00
Dean Herbert
a7f78d706a Merge branch 'master' into fix-legacy-skin-texture-loader-store 2020-12-22 12:09:35 +09:00
smoogipoo
e23d81bfc6 Use enum property 2020-12-21 16:56:45 +09:00
Dean Herbert
a5bcf1dc20 Expose resources to skin via interface (and share common pieces with beatmap) 2020-12-21 15:18:52 +09:00
Bartłomiej Dach
89bf7b1bd6 Resolve CA1835 inspection
"Change the `ReadAsync` method call to use the
`Stream.ReadAsync(Memory<byte>, CancellationToken)` overload"
2020-11-01 18:51:39 +01:00
Dean Herbert
31f6051db9 Add missing xmldoc 2020-10-19 15:36:27 +09:00
Dean Herbert
1989141968
Merge branch 'master' into tourney-asset-refactor 2020-10-07 21:34:07 +09:00
Dean Herbert
58e84760b9 Fix path empty string check causing regression in behaviour 2020-09-03 19:17:07 +09:00
Dean Herbert
218cc39a4c Avoid throwing exceptions when MutatePath is called with null path 2020-09-03 13:20:23 +09:00
Shivam
c167727ac6 Merge branch 'master' into tourney-asset-refactor
# Conflicts:
#	osu.Game/IO/OsuStorage.cs
2020-08-09 12:38:41 +02:00
smoogipoo
00a2fbce06 Fix test failures 2020-07-06 22:41:58 +09:00
smoogipoo
1effe71ec2 Add dialog for storage options 2020-07-06 22:03:09 +09:00
Shivam
66e61aacff Logger now shows the actual path of the destination
Forgot to change this while changing the param from string to Storage
2020-07-02 00:32:09 +02:00
Shivam
c3cd2a74f5 Move general purpose migration to MigratableStorage 2020-07-01 22:57:16 +02:00
smoogipoo
cdcad94e9f Handle exception thrown due to custom stoage on startup 2020-07-01 17:47:29 +09:00
smoogipoo
ab15b6031d Update with framework-side storage changes 2020-07-01 17:12:07 +09:00
Shivam
47a732ef60 Address review comments
Now asserting instead of an if-statement, change cast from OsuStorage to MigratableStorage and make internal virtual properties protected.
2020-06-24 23:01:56 +02:00
Shivam
af11340849 Fix nullref exceptions and redundant explicit type 2020-06-24 02:13:28 +02:00
Shivam
c32ef5e718 Address formatting issues 2020-06-24 00:37:29 +02:00
Shivam
8e8458ab8f make migrate public abstract in base and override 2020-06-23 23:58:28 +02:00
Shivam
a47d34f1db make ignore properties protected virtual get-only in base 2020-06-23 23:34:26 +02:00
Shivam
a899c754f1 Remove whitespace at the end of xmldoc line 2020-06-22 13:03:24 +02:00
Shivam
a94dcc4923 Add xmldoc to MigratableStorage 2020-06-22 12:59:38 +02:00
Shivam
6b14079c0a InspectCode changes 2020-06-22 12:43:01 +02:00
Shivam
f878388d57 Fix TestMigrationToSeeminglyNestedTarget failing 2020-06-22 11:56:14 +02:00
Shivam
21774b8967 Move static properties to parent class and inherit OsuStorage from it 2020-06-22 11:38:50 +02:00
Shivam
dd9697032c Introduce new class MigratableStorage 2020-06-16 17:39:20 +02:00
smoogipoo
092f5b6521 Fix incorrect reference + simplify 2020-06-03 17:41:05 +09:00
smoogipoo
8aa8d2c880 Resolve NREs 2020-06-03 16:59:37 +09:00
Dean Herbert
6904d5d247 Remove unnecessary override 2020-05-25 13:12:53 +09:00
Dean Herbert
1977affe7e Fix OpenInNativeExplorer not working correctly for wrapped storages 2020-05-25 09:27:11 +09:00
Dean Herbert
6ca102bc3f Attempt delete operations more than once 2020-05-15 13:19:03 +09:00
Dean Herbert
9ed0e8891b Merge branch 'fix-nested-folder-migration-endless-copy' into migration-ui 2020-05-15 13:04:16 +09:00
Dean Herbert
0690d81bbb Add protection against migrating to a nested folder 2020-05-15 10:40:26 +09:00
Dean Herbert
25bbb02999 Throw better exceptions from OsuStorage 2020-05-15 10:28:03 +09:00
Dean Herbert
364aa5aa12 Add protection against migrating to a nested folder 2020-05-14 22:45:03 +09:00
Dean Herbert
827d75b152 Revert "Add protection against migrating to a nested folder"
This reverts commit ef8375b442.
2020-05-14 22:44:27 +09:00
Dean Herbert
ef8375b442 Add protection against migrating to a nested folder 2020-05-14 22:42:42 +09:00
Dean Herbert
06f507496a Delete migration source if no files exist after completion 2020-05-14 17:41:55 +09:00
Dean Herbert
cb0b25ac55 Throw better exceptions from OsuStorage 2020-05-14 17:41:55 +09:00
Dean Herbert
ad1d050fb4 Throw exception on copy timeout 2020-05-13 20:29:15 +09:00
Dean Herbert
49e616b7e5 Also check for directory presence before migrating 2020-05-13 20:19:14 +09:00
Dean Herbert
9de216f1b4 Merge branch 'master' into migration-backend 2020-05-13 20:15:22 +09:00
Huo Yaoyuan
f07d95ac59 Use IReadOnlyList<T> for TypedListConverter. 2020-05-12 21:49:55 +08:00
Huo Yaoyuan
f7d26688f4 Merge branch 'master' into json-converter 2020-05-12 21:43:02 +08:00
Dean Herbert
e4a23b3e7d Fix ignored excluding more than top level 2020-05-12 12:39:04 +09:00
Dean Herbert
984f27c107 Add simple retry logic on file copy failure (may be in use) 2020-05-11 21:39:44 +09:00