Skip to content

Conversation

@sorayuki
Copy link
Contributor

Description

Fix the wrong default value in cmake script.

Motivation and Context

The default installation for Windows in cmake script is wrong. OBS won't load plugin from there.

from

https://github.com/obsproject/obs-studio/blob/31.0.1/UI/window-basic-main.cpp#L201
int ret = GetProgramDataPath(base_module_dir, sizeof(base_module_dir), "obs-studio/plugins/%module%");
https://github.com/obsproject/obs-studio/blob/31.0.1/UI/window-basic-main.cpp#L211
string path = base_module_dir;
https://github.com/obsproject/obs-studio/blob/31.0.1/UI/window-basic-main.cpp#L231
obs_add_module_path((path + "/bin/64bit").c_str(), (path + "/data").c_str());

How Has This Been Tested?

My plugin works.

Types of changes

Bug fix

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.

@RytoEX RytoEX requested a review from PatTheMav February 26, 2025 17:52
Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

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

Nit: please capitalize "Fix" in your commit message and PR title.

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 change is correct insofar as the directories are mapped as follows:

APPDATA         <-> CSIDL_APPDATA
ALLUSERSAPPDATA <-> CSIDL_COMMON_APPDATA

OBS Studio uses CSIDL_COMMON_APPDATA as the "program path", so CMake code has to use the corresponding environment variable.

@sorayuki sorayuki requested a review from RytoEX February 27, 2025 17:11
@sorayuki sorayuki changed the title cmake: fix default installation directory for Windows cmake: Fix default installation directory for Windows Feb 27, 2025
@RytoEX RytoEX merged commit 013ffca into obsproject:master Mar 4, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants