FlashpointProject / launcher

Launcher for Flashpoint Archive
https://flashpointarchive.org
Other
941 stars 54 forks source link

Resolve absolute Flashpoint path for services/extensions #414

Closed oblivioncth closed 7 months ago

oblivioncth commented 7 months ago

Closes #413

I have a branch where I experimented with introducing ExtendedAppConfigData, which extends AppConfigData to add the property fullFlashpointPath. The type replaces AppConfigData nearly everywhere except for the extensions API (to prevent breaking) and when serializing the config back to JSON so that the value isn't written to disk (i.e. transient).

I did this since the absolute path is needed in a number of points throughout the project where it's currently cobbled together in different ways (e.g. IMainWindowExternal), but it still felt like a pretty heavy handed solution for a problem that ultimately can be solved with these two lines. Such an approach might be better long term however.