Commit graph

34 commits

Author SHA1 Message Date
goaaats
34679d085b Extract plugin to temp directory before copying to final location, some minor cleanup 2025-04-01 18:55:27 +02:00
srkizer
8822810229
DalamudAssetManager: avoid locks and lookups (#2015)
* Made DalamudAsset-to-something tables into arrays from dictionaries.
  Number of items in the DalamudAsset enum aren't many, and the numbers
  are small enough that implementing lookup tables as arrays aren't
  wasting much memory space.
* Removed locking from asset accessors, while still guaranteeing that
  the load operation happens only once per asset.
* ISharedImmediateTexture: made it not even access assets if textures
  are available.
2024-08-25 15:06:21 +02:00
nebel
7a45fb05e3
Cache DalamudAssetAttribute lookups (#2014) 2024-08-17 11:05:15 +02:00
Soreepeong
aa99be6ccb DalamudAssetManager: suppress ignorable error 2024-07-21 18:34:31 +09:00
Kaz Wolfe
af2ec9029b
fix import issues 2024-06-28 15:52:35 -07:00
Soreepeong
8c7771bf7d Merge branch 'apiX' into feature/itextureprovider-updates 2024-05-12 22:17:32 +09:00
srkizer
bd2c9b2258
Apply most of Api10ToDo (#1782) 2024-04-20 23:25:33 -07:00
Soreepeong
7f5ef03917 Use EarlyLoadedService for anything that is not mandatory for kicking off plugin loader 2024-04-07 21:53:23 +09:00
srkizer
87b9edb448
Add IInternal/PublicDisposableService (#1696)
* Add IInternal/PublicDisposableService

Plugins are exposed interfaces that are not inherited from
`IDisposable`, but services implementing plugin interfaces often
implement `IDisposable`. Some plugins may try to call
`IDisposable.Dispose` on everything provided, and it also is possible to
use `using` clause too eagerly while working on Dalamud itself, such as
writing `using var smth = await Service<SomeService>.GetAsync();`. Such
behaviors often lead to a difficult-to-debug errors, and making those
services either not an `IDisposable` or making `IDisposable.Dispose` do
nothing if the object has been loaded would prevent such errors. As
`ServiceManager` must be the only class dealing with construction and
disposal of services, `IInternalDisposableService` has been added to
limit who can dispose the object. `IPublicDisposableService` also has
been added to classes that can be constructed and accessed directly by
plugins; for those, `Dispose` will be ignored if the instance is a
service instance, and only `DisposeService` will respond.

In addition, `DalamudPluginInterface` and `UiBuilder` also have been
changed so that their `IDisposable.Dispose` no longer respond, and
instead, internal functions have been added to only allow disposal from
Dalamud.

* Cleanup

* Postmerge fixes

* More explanation on RunOnFrameworkThread(ClearHooks)

* Mark ReliableFileStorage public ctor obsolete

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-03-16 15:58:05 +00:00
srkizer
666feede4c
Suppress DAssetM dispose exceptions (#1707)
Whether an asset being unavailable should be an error is decided on
Dalamud startup time. This suppresses assets unavailable exceptions on
Dispose.
2024-03-13 23:36:43 +01:00
Soreepeong
70eecdaaef more 2024-03-05 21:04:20 +09:00
Soreepeong
7f12e3f3da Assign debug names for textures 2024-03-05 01:22:16 +09:00
Soreepeong
858d27ab8e Fix namespace 2024-03-03 20:44:49 +09:00
Soreepeong
c04ce36b9c Add CreateFromGameScreen 2024-03-03 20:08:52 +09:00
Soreepeong
3415df5d40 Cleanup 2024-03-02 23:45:14 +09:00
Soreepeong
f8492dc06b changes 2024-02-28 19:16:14 +09:00
Soreepeong
71b84bcf40 Move all texture loading functionalities from IM to TM 2024-02-28 17:43:24 +09:00
Soreepeong
3fe2920e92 Update ITextureProvider 2024-02-28 17:29:23 +09:00
Soreepeong
da969dec5c DAssetM cleanup 2024-02-20 15:42:49 +09:00
srkizer
3283d0cc11
Turn IDalamudAssetManager public (#1638) 2024-02-13 13:09:23 -08:00
Soreepeong
d1291364e0 Fix FontHandleWrapper and some docs 2024-01-23 19:30:20 +09:00
Soreepeong
af1133f999 Determine optional assets availability on startup 2024-01-21 04:21:26 +09:00
srkizer
a0f4baf8fa
Less footguns in service dependency handling (#1560) 2023-12-06 21:29:46 -08:00
Soreepeong
d1fad70e8f Disable game symbol download for the time being 2023-11-28 22:31:46 +01:00
Soreepeong
a72f407357 Add DalamudAssetManager 2023-11-28 22:31:46 +01:00
srkizer
b66be84b93
Better Service dependency handling (#1535) 2023-11-28 22:20:16 +01:00
goat
38e4fd2673
fix: synchronize all writes to ReliableFileStorage 2023-10-04 00:10:04 +02:00
goat
4a1b220d4a
fix: register interfaces for provided services 2023-09-30 01:09:25 +02:00
goat
e9e234b340
fix: actually use the correct path when setting up vfs, fix warnings
use paramref instead of see

fix warnings
2023-09-29 18:59:01 +02:00
goat
416bb42f5b
feat: handle db load failures gracefully 2023-09-29 18:37:45 +02:00
goat
c1fd08cc93
feat: wrap writes in a transaction 2023-09-28 00:43:25 +02:00
goat
63764cb669
chore: move exception to separate file 2023-09-27 22:41:25 +02:00
goat
1d8b579b04
feat: also use reliable storage for plugin configs 2023-09-27 22:39:09 +02:00
goat
125034155b
feat: first pass at ReliableFileStorage service 2023-09-27 22:10:21 +02:00