Skip to content

Conversation

@cg2121
Copy link
Contributor

@cg2121 cg2121 commented Jun 14, 2025

Description

This makes modules with same name load once.

Motivation and Context

With the new plugin template, plugins are now loaded from %PROGRAMDATA%. If the plugin is still in the old location, the plugin will be loaded twice.

How Has This Been Tested?

Had plugin in two different folders, and made sure it only showed up once in OBS.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

This makes modules with same name load once.
@cg2121 cg2121 added the Bug Fix Non-breaking change which fixes an issue label Jun 14, 2025
@cg2121 cg2121 requested a review from PatTheMav June 14, 2025 22:23
cg2121 added a commit to cg2121/obs-studio that referenced this pull request Jun 16, 2025
Plugins are now required to be installed in %PROGRAMDATA%. Since
its module path is added after the default module paths, the
plugins in there will be loaded last. With the load modules once
PR (obsproject#12285), the module added in the default path will be the only one
loaded. We want the one in %PROGRAMDATA% to be the one loaded instead.
cg2121 added a commit to cg2121/obs-studio that referenced this pull request Jun 16, 2025
Plugins are now required to be installed in %PROGRAMDATA%. Since its
module path is added after the default module paths, the plugins in there
will be loaded last. With the load modules once PR (obsproject#12285), the module
added in the default path will be the only one loaded. We want the one
in %PROGRAMDATA% to be the one loaded instead.
cg2121 added a commit to cg2121/obs-studio that referenced this pull request Jun 16, 2025
Plugins are now required to be installed in %PROGRAMDATA%. Since its
module path is added after the default module paths, the plugins in there
will be loaded last. With the load modules once PR (obsproject#12285), the module
added in the default path will be the only one loaded. We want the one
in %PROGRAMDATA% to be the one loaded instead.
@WizardCM
Copy link
Member

WizardCM commented Jun 21, 2025

It's worth noting we don't currently read from %PROGRAMDATA% in portable mode on Windows, so portable users are unlikely to run into this issue.

Copy link
Member

@PatTheMav PatTheMav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine in isolation, however I'd like this PR and #12046 to be coordinated so that they could be both merged more or less at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix Non-breaking change which fixes an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants