Commit Graph

240 Commits

Author SHA1 Message Date
Dean Herbert
a8dee17513 Fix missing DummyRenderer in skin resources tests 2022-08-08 13:06:01 +09:00
Dan Balasescu
c4b9b2a14b Merge branch 'master' into irenderer-glwrapper 2022-08-05 20:35:06 +09:00
Dean Herbert
f743dc623f Change migration logic to ignore realm pipe files regardless of database filename 2022-08-03 17:37:30 +09:00
Dan Balasescu
b4e55f7309 Apply IRenderer changes 2022-08-02 19:50:57 +09:00
Dean Herbert
cc8a71b65d Re-query file existence before failing a recursive copy operation during migration 2022-08-01 17:01:19 +09:00
Dean Herbert
59210ecc9d Revert "Fix migration failing on single file copy failure"
This reverts commit fc8835d43a.
2022-08-01 16:57:50 +09:00
Dean Herbert
fc8835d43a Fix migration failing on single file copy failure
No longer throw if copying of single files fails during data migration.

Aiming to fix https://github.com/ppy/osu/runs/7601653833?check_suite_focus=true, which could also affect end users. I've left a limit before an exception is still thrown, to handle cases like the user running out of disk space (where we probably *do* want to bail, so they can continue to use their still-intact original storage location).

If this isn't seen as a good direction, an alternative will be to make the migration code aware of the structure of the temporary files created by `Storage` (but doesn't guarantee this will cover all cases of such temporary files – there could for isntance be metadata files created by the host operating system).

Another option would be to mark those temporary files as hidden and skip any hidden files during iteration.
2022-08-01 15:02:39 +09:00
Bartłomiej Dach
6f37487528
Replace calls to defective Humanizer methods with correct version 2022-07-18 22:34:58 +02:00
Dean Herbert
27ef7fc78e Add log output for custom storage usage
Sometimes I am not sure where my osu! is reading files from. This should
help somewhat.

```csharp
/Users/dean/Projects/osu/osu.Desktop/bin/Debug/net6.0/osu!
[runtime] 2022-07-13 07:22:03 [verbose]: Starting legacy IPC provider...
[runtime] 2022-07-13 07:22:03 [verbose]: Attempting to use custom storage location /Users/dean/Games/osu-lazer-2
[runtime] 2022-07-13 07:22:03 [verbose]: Storage successfully changed to /Users/dean/Games/osu-lazer-2.
[runtime] 2022-07-13 07:22:05 [verbose]: GL Initialized
```
2022-07-13 16:22:51 +09:00
Dean Herbert
66f314915d Fix crash on mobile releases when attempting to read any file 2022-07-09 06:01:22 +09:00
Dean Herbert
c2f1069073 Avoid usage of finally in potentially hot path 2022-07-06 19:55:51 +09:00
Dean Herbert
01bc6e5cb7 Revert old behaviour of ReadToEnd 2022-07-06 19:55:51 +09:00
Dean Herbert
12d396a513 Use -1 to specify default buffer size 2022-07-06 15:43:35 +09:00
Dean Herbert
a52ea3cabe Enable NRT and simplify LineBufferedReader 2022-07-06 14:57:56 +09:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Salman Ahmed
ee8045d507 Add failing test case 2022-06-15 07:33:21 +03:00
Dean Herbert
82a1ba1d46 Use pooled memory for memory copies performed by ZipArchiveReader 2022-05-30 20:22:26 +09:00
Dean Herbert
c587d10cc3 Revert storage workaround 2022-05-21 15:55:07 +09:00
Dean Herbert
72386d9377 Fix incorrect storage being used in CreateFileSafely implementation 2022-05-21 15:17:10 +09:00
Dean Herbert
5bf17dde9f Fix missing MutatePath calls 2022-05-21 14:43:35 +09:00
Dean Herbert
f78eb0066c Update Storage in line with new methods 2022-05-16 17:51:12 +09:00
Huo Yaoyuan
80e312dbbc Remove unused binary serialization related code. 2022-04-12 20:29:13 +08:00
Huo Yaoyuan
bf677ad0ac Remove usages of BinaryFormatter. 2022-04-12 20:28:14 +08:00
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