Split configuration files between User & Global Store - OBS 31 requirement#1268
Merged
Split configuration files between User & Global Store - OBS 31 requirement#1268
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 <[email protected]>
Signed-off-by: Felix Kaechele <[email protected]>
… 31 config scheme
Trouffman
commented
May 9, 2025
| ProcessCommandLine(); | ||
| SetDefaultsToGlobalStore(); | ||
| SetDefaultsToUserStore(); | ||
| if (obs_get_version() >= MAKE_SEMANTIC_VERSION(31, 0, 0)) |
Collaborator
Author
There was a problem hiding this comment.
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.
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); |
There was a problem hiding this comment.
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.
BitRate27
approved these changes
May 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.