Closed GeckoEidechse closed 1 year ago
Poking
One idea was simply renaming the plugin to the Thunderstore mod string.
So for example kyurid.dll
would become cat_or_not-kyurid-0.1.0.dll
which would instantly solve the entire thing for us cause we can just check the filename, except that a Thunderstore could contain multiple plugins and duplicate file names are not allowed x_x
Subfolders was another idea, i.e. moving R2Northstar/plugins/kyurid.dll
into R2Northstar/plugins/cat_or_not-kyurid-0.1.0.dll/kyurid.dll
but currently Northstar does not support loading plugins from subdir so we'd need to fix that upstream first.
One thing that would work would be prepending the Thunderstore mod string to the DLL, so like e.g. kyurid.dll
-> cat_or_not-kyurid-0.1.0_kyurid.dll
Alternatively we stick an entire .json
file into the plugins/
folder and treat that as a sorta database that maps dll names to Thunderstore mod string.
I think prepending the modstring would be the most compact way to do it as long as there's no risk of illegal characters. We'd have to agree on the delimiter too, and it would have to be something that wouldn't/couldn't appear in the modstring
Personally, I think at the very least having the option of subdirs would be nice. But then now you've 2 ways of doing it, largely complicating parsing the installed plugins.
And so, in my opinion it'd be best for folders to be in the Thunderstore mod string format, and everything else being treated as something the user manually installed.
I feel like the JSON database file is over complicating tbh...
And so, in my opinion it'd be best for folders to be in the Thunderstore mod string format, and everything else being treated as something the user manually installed.
Agreed. Subdirs named after Thunderstore mod string sounds like the cleanest solution ^^
ok then subdirs should be restored somehow
ok then subdirs should be restored somehow
cat said and then made an upstream PR for it https://github.com/R2Northstar/NorthstarLauncher/pull/460 :eyes:
Thinking about it, if we stick plugin into separate folder already anyway, we could also add manifest.json
to it ^^
already did that
Not gonna lie this seems like adding more spaghetti to the thunderstore package loading, we honestly need to rework a large chunk of this stuff
Not gonna lie this seems like adding more spaghetti to the thunderstore package loading, we honestly need to rework a large chunk of this stuff
This issue is about plugins specifically btw and we need some way to map a plugin back to a Thunderstore mod to allow for install detection and updating... ^^
Unless you can rewrite our whole mod loading system within a week, we will need to implement some way to allow for plugin installation on mod-managers in the meantime :P
This issue is about plugins specifically btw
At a surface level, yeah. But the root problem is the gap between thunderstore package format and how launcher reads stuff. Personally I'm a big fan of the idea of just having a separate packages
folder instead of doing all this stuff with finding mods/plugins in a package and doing all this extra stuff
Unless you can rewrite our whole mod loading system within a week
I could, but at this point I'm not gonna touch it because any PR that gets made will get stuck in PR hell. All the conflicting standards, installation methods, etc. will make any meaningful refactor impossible because of things like existing mod installs.
Imo at this point, rip it all out and start again, with the thunderstore package format being the only format that is accepted. The problem is only going to get worse, so better to do it sooner rather than later
Unless you can rewrite our whole mod loading system within a week
All the conflicting standards, installation methods, etc. will make any meaningful refactor impossible because of things like existing mod installs.
Imo at this point, rip it all out and start again, with the thunderstore package format being the only format that is accepted. The problem is only going to get worse, so better to do it sooner rather than later
Agreed, I made an issue now to discuss this: https://github.com/R2Northstar/Northstar/issues/472
However as you kinda realise it will take some time to implement a complete rewrite and we still need some way to install plugins via mod-managers in the meantime. Especially as anything done with mod-managers can be upgraded pretty simply in the future as the mod-managers can just add logic that converts an install from one format to another ^^
As a sidenote to PR hell, try to prioritise PRs on what I deem important atm (+ what is faster to review) in my limited time. I'm ofc not the only reviewer/maintainer and others might have other approaches. Overall a mod system refactor would be pretty high up on priority list :eyes:
Agreed, I made an issue now to discuss this: R2Northstar/Northstar#472
Great, thanks
anything done with mod-managers can be upgraded pretty simply in the future as the mod-managers can just add logic that converts an install from one format to another
Yeah this is like our saving grace here tbh, shame that some people love to recommend manual installation over a mod manager
To be clear, I don't disagree with defining a standard for plugin installation. I just see people talking about copying manifests over and stuff and it reminds me how much of a mess this whole system is
So this is basically covered by R2Northstar/NorthstarLauncher#505 now right?
So this is basically covered by R2Northstar/NorthstarLauncher#505 now right?
Yes. It's technically not implemented in https://github.com/R2Northstar/Northstar/issues/472 but will in time and should be treated accordingly as discussed in https://github.com/R2Northstar/NorthstarLauncher/issues/505#issuecomment-1632620304
So this is basically covered by R2Northstar/NorthstarLauncher#505 now right?
Yes.
Of course the security warning should still be implemented, but for a library like libthermite it's a non-issue, since it'd likely be best to have that implemented by whatever is using the library...
Closing this as superseded by #415
With Northstar
v1.13.0
plugins v2 released.Plugins are more powerful than Squirrel mods as they are native code that interacts with Northstar via an interface. From a file perspective, plugins are essentially just DLLs that go into the
R2Northstar/plugins/
(R2Northstar
could be replaced with any other profile ofc).For easier installation of plugin there's discussion about installing plugins via Thunderstore using mod-managers. (For security concerns in that regard, check #289)
Unlike mods, plugins don't ship a
mod.json
but rather stores information in the DLL resource.Now like with mods, we need a way to uniquely map a plugin to a Thunderstore mod post installation. We want compatibility between mod-managers again, so hence this issue to discuss how to handle the mapping.
Example plugin on Thunderstore right now: https://northstar.thunderstore.io/package/cat_or_not/kyurid/