-
-
Notifications
You must be signed in to change notification settings - Fork 419
Split configuration files between User & Global Store - OBS 31 requirement #1268
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
Conversation
This properly splits settings for this plugin into the new split configuration stores for app and user settings. All user-editable settings go into the user store, all functional, non-user facing settings go in app store (e.g. timestamp of last update check). On OBS versions prior to 31 there is no change in behaviour and all settings continue to be read from and stored to the global store only. Signed-off-by: Felix Kaechele <felix@kaechele.ca>
Signed-off-by: Felix Kaechele <felix@kaechele.ca>
… 31 config scheme
| ProcessCommandLine(); | ||
| SetDefaultsToGlobalStore(); | ||
| SetDefaultsToUserStore(); | ||
| if (obs_get_version() >= MAKE_SEMANTIC_VERSION(31, 0, 0)) |
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.
Maybe add a check/config entry when that migration is done so it does not trigger at every plugin launch
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.
Pull Request Overview
This PR removes backward compatibility for pre-OBS 31 setups by splitting configuration settings between the user and app stores and updating default values accordingly. Key changes include:
- Changing all relevant configuration references from the global store to the appropriate app or user store.
- Removing deprecated functions for backward compatibility and simplifying config accessor functions.
- Introducing configuration migration logic and updating default parameters and names.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/obs-support/shared-update.cpp | Switched InstallGUID retrieval/set from global to app config. |
| src/obs-support/obs-app.hpp | Simplified and streamlined config accessor functions. |
| src/config.h | Updated default values and added new migration function declarations. |
| src/config.cpp | Revised config store usage, added migration logic, and updated parameter handling. |
| MigrateSetting(app_config, user_config, SECTION_NAME, PARAM_TALLY_PROGRAM_ENABLED); | ||
| MigrateSetting(app_config, user_config, SECTION_NAME, PARAM_TALLY_PREVIEW_ENABLED); | ||
|
|
||
| MigrateSetting(app_config, user_config, SECTION_NAME, PARAM_SKIP_UPDATE_VERSION); |
Copilot
AI
May 9, 2025
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.
PARAM_SKIP_UPDATE_VERSION is not included in ConfigTypeMap, causing the migration for this setting to be silently skipped. Consider adding an appropriate mapping for it in ConfigTypeMap so that its migration is executed as intended.
Built on the great work by @kaechele :
This was originally dismissed as the backward support was under discussion. With DistroAV 6.1: OBS 31 is required. So that backward support is no longer required.
As to grant @kaechele the praise for this great piece (especially the migration settings) this is a revival of the PR #1152 that was originally closed.
Things to address:
Note : this PR was re-created with a branch that can be modified.