-
-
Notifications
You must be signed in to change notification settings - Fork 9k
frontend: Load plugins from config folder in portable mode #12046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically this looks fine, but conceptually I'm not sure I'm the right person to review this.
In my entirely personal opinion the current state of possible locations for plugins on Windows is a bit chaotic:
- Plugins can just be copied into the program installation directory, where they are required to adhere to a specific directory structure, OR
- Plugins can be copied into ProgramData, where they are required to an entirely different directory structure
- This adds yet another possible directory, and I'm not sure which directory structure is required for those to work?
So, again, I'm fine with providing a "portable" plugin location for the portable mode, but I dunno if the config directory is the correct/canonical location for this on Windows and which "plugin standard" (in-tree vs out-of-tree for ProgramData) plugins need to follow for this.
Probably better for some Windows maintainers to respond to.
|
As explained in the description, this requires the same structure as the There is currently no "canonical" install path dedicated to third party plugins for portable mode on windows, as portable mode only loads from the first party directory. I'm open to having it be another folder on windows, but I'm unsure where else in a portable install it would fit. |
Great, that makes it consistent with where plugin loading should go in the future.
Yeah I think the suggestion in the PR is a decent one, I just didn't want to be the final arbiter of that as a non-Windows user. |
|
@PatTheMav as a mutli-OS (Windows / Mac) user and especially user of the portable mode on windows, I can vouch for this approach. The suggested approach make sense to have :
Only potential drawback i can see with the code suggested is if the OBS Portable mode is expected to be available for anything else than Windows (aka Linux/MacOS - But this is officially not supported). Since moving to the new plugin location, we had to re-build some of the logic to have the correct structure for the DistroAV plugin, this is a suggested PR to the plugin-template as well.. I personally would support a unified approach straight in OBS with the same folder structure no matter if portable mode is used or not. Change Management to consider :
|
While not supported with the released executable, portable mode is available on Linux, and this PR also takes care of that, making plugins load from the config folder on portable mode Linux the same way it does on non-portable Linux, once again with the same, unified, folder structure. Portable mode is not doable on macos at all afaik. |
|
Indeed, I looked again at the code and it is as you described. Good for me. |
|
@Warchamp7 We should try to lock down the directory names here to get this over the finish line - it's already too late for 31 (due to no fault of the PR itself). Correct me if I'm wrong but on Windows, the portable structure looks something like this? Which seems wrong to me already, as it requires the user to create a "package" directory first (possibly named "obs-studio") just to house the application and the configuration in the same package. Ideally you would unzip OBS Studio somewhere, you get an In a good and just world, I'd actually suggest this outcome: OBS Studio's own modules would live in We need to pull the ripcord on this and we need to do it sooner rather than later, hence why I want to have consensus on the outcome first so I can try and put in the work to make this transition happen possibly for v32. I'd love to get rid of the |
You are mistaken, both on linux and windows, the config folder is in the same folder as bin, data and obs_plugins, the one "snag" is that the config folder gets created on launch, not on unzip.
|
Interesting, because the Oh wait, I forgot the |
Yup exactly, and that's why it's only |
Description
This makes obs look for plugins in the config folder when running in portable mode.
Plugins installed there are expected in the same individual folder structure as plugins installed to
C:\ProgramDataor~/.config.On linux, this restores previous functionality, on windows this is a new addition.
Motivation and Context
This has three purposes :
It was motivated by this feature request.
How Has This Been Tested?
Ubuntu 24.04 and Windows 11, ran obs in portable and non portable mode, checked that plugins were loaded correctly.
Types of changes
Checklist: