Repository navigation
frontend: Migrate pre-31 settings that lack LastVersion - #816
Merged
Merged
Conversation
Move the decision whether to copy the pre-31 global.ini settings to user.ini into frontend/utility/settings-migration.hpp (ShouldMigratePre31Settings), free of Qt, and add test_settings_migration. No change in behaviour. RED for obs-rust#815: the case "no LastVersion, FirstRun in global.ini, no user.ini" fails, because the helper treats it as a fresh install. Co-Authored-By: Claude Opus 5.5 <[email protected]>
5 of 6 tasks
OBS writes LastVersion only on a clean exit. A global.ini from OBS before 31.0 that was never closed cleanly has none, so its settings were not copied to user.ini. The first start then opened the auto-configuration wizard, which disables all outputs while it is open. Also migrate when LastVersion is missing, if global.ini has FirstRun (written there only by OBS before 31.0) and user.ini does not exist. A fresh install still gets the wizard. GREEN for obs-rust#815. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=47ad1a35448c74845ea870dd4b774190dda5e194 secs=1360 lanes=lint:run,rust-test:reused@241456d52183,cross:reused@b456eff62019,tier2-linux:run Ci-Attestation: {"at":1792053820,"gate":"rust/all/fmt","host":"linux-x86_64","key":"63752c72cced08d0bd05965bb758ad3c8ee6093f8ca6541091135e01e0fbf41f","lane":"lint","parents":["9a627a362327b14dbb1508c57ead2bd5d1763bc4"],"secs":52,"stamp":"e1870d61ecc347683e20e544b0d02cf4","tree":"47ad1a35448c74845ea870dd4b774190dda5e194","v":1,"via":"run"} Ci-Attestation: {"at":1792053820,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"63752c72cced08d0bd05965bb758ad3c8ee6093f8ca6541091135e01e0fbf41f","lane":"lint","parents":["9a627a362327b14dbb1508c57ead2bd5d1763bc4"],"secs":52,"stamp":"2f36802177ae41fce5dfa966e95e4dea","tree":"47ad1a35448c74845ea870dd4b774190dda5e194","v":1,"via":"run"} Ci-Attestation: {"at":1792052374,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"241456d52183502cf4b88cfa70413b65dfc08dc645f90e8d74ed72769dac7fe4","lane":"rust-test","parents":["9a627a362327b14dbb1508c57ead2bd5d1763bc4"],"secs":null,"stamp":"e229366ddf5f5fddcbc014f0de97de26","tree":"47ad1a35448c74845ea870dd4b774190dda5e194","v":1,"via":"reused"} Ci-Attestation: {"at":1792052374,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"b456eff62019370969ffb6f2fc0c955838c3003441e52044ffee254e4fee916f","lane":"cross","parents":["9a627a362327b14dbb1508c57ead2bd5d1763bc4"],"secs":null,"stamp":"dac4e9a2160301adf291a8fce753e6f1","tree":"47ad1a35448c74845ea870dd4b774190dda5e194","v":1,"via":"reused"} Ci-Attestation: {"at":1792052374,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"b456eff62019370969ffb6f2fc0c955838c3003441e52044ffee254e4fee916f","lane":"cross","parents":["9a627a362327b14dbb1508c57ead2bd5d1763bc4"],"secs":null,"stamp":"73f713cd6edb993a71ce2ed2117e8bd0","tree":"47ad1a35448c74845ea870dd4b774190dda5e194","v":1,"via":"reused"} Ci-Attestation: {"at":1792052374,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"b456eff62019370969ffb6f2fc0c955838c3003441e52044ffee254e4fee916f","lane":"cross","parents":["9a627a362327b14dbb1508c57ead2bd5d1763bc4"],"secs":null,"stamp":"e24809444f638a183f3e8dfcedab6cb9","tree":"47ad1a35448c74845ea870dd4b774190dda5e194","v":1,"via":"reused"} Ci-Attestation: {"at":1792052374,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"b456eff62019370969ffb6f2fc0c955838c3003441e52044ffee254e4fee916f","lane":"cross","parents":["9a627a362327b14dbb1508c57ead2bd5d1763bc4"],"secs":null,"stamp":"2cc3701d35d1f59132738e0a43d46e8d","tree":"47ad1a35448c74845ea870dd4b774190dda5e194","v":1,"via":"reused"} Ci-Attestation: {"at":1792052374,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"b456eff62019370969ffb6f2fc0c955838c3003441e52044ffee254e4fee916f","lane":"cross","parents":["9a627a362327b14dbb1508c57ead2bd5d1763bc4"],"secs":null,"stamp":"c4867a596da35fac2ecc68a898fc44ca","tree":"47ad1a35448c74845ea870dd4b774190dda5e194","v":1,"via":"reused"} Ci-Attestation: {"at":1792052374,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"b456eff62019370969ffb6f2fc0c955838c3003441e52044ffee254e4fee916f","lane":"cross","parents":["9a627a362327b14dbb1508c57ead2bd5d1763bc4"],"secs":null,"stamp":"e851831e46e8c8e013880d7bf81e5c37","tree":"47ad1a35448c74845ea870dd4b774190dda5e194","v":1,"via":"reused"} Ci-Attestation: {"at":1792053820,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"c1b2749474765dd45a3d350a34909b583c416ba937e8f92fafc3e36e50493b13","lane":"tier2-linux","parents":["9a627a362327b14dbb1508c57ead2bd5d1763bc4"],"secs":1308,"stamp":"c3cf3a29b073be6841168db7fd211335","tree":"47ad1a35448c74845ea870dd4b774190dda5e194","v":1,"via":"run"}
Member
|
Rebased onto master, set
|
zackees
force-pushed
the
fix/pre31-migration
branch
from
October 15, 2026 08:43
3a44350 to
9b6b51d
Compare
zackees
enabled auto-merge
October 15, 2026 08:43
5 of 6 tasks
3 of 7 tasks
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.
Fixes #815
What and why
A config from OBS before 31.0 whose
global.inihas noLastVersion(OBS never exited cleanly, for example when it runs as a service) was treated as a fresh install. Its user settings were not copied touser.ini, and the first start opened the auto-configuration wizard. While the wizard is open, all outputs are disabled (AutoConfigcallsEnableOutputs(false)), and on an unattended host nobody sees it. The fork reaches this path on its first start afterMigrateRustConfiguration()copied an upstream 30.x config.This PR also migrates when
LastVersionis missing, ifglobal.inihas[General] FirstRun(written there only by OBS before 31.0) anduser.inidoes not exist:FirstRuninglobal.ini, so it still gets the wizard.user.ini, nothing is migrated:MigrateGlobalSettings()would show an error box.LastVersionset, nothing changes.The decision is in a new Qt-free header,
frontend/utility/settings-migration.hpp(ShouldMigratePre31Settings()).OBSApp::InitGlobalConfig()uses it.RED → GREEN
test_settings_migration: 1 of 6 cases fails (missing_last_version_with_legacy_settings_migrates). The 5 guard cases pass (fresh install, existinguser.ini,LastVersion30.2.3, already migrated,LastVersion32.0).test_settings_migration6/6.End-to-end check (not part of CI), on Debian 13, headless, OBS started by a systemd unit, with a
~/.config/obs-studiofrom OBS 30.2.3 withoutLastVersion:user.inihas only defaults, the wizard window is open, and a websocketStartRecordreturns success but nothing is recorded.user.inihas the migrated settings (82 lines:[Video],[BasicWindow], plugin sections,FirstRun=true),global.inihasPre31Migrated=true, andStartRecordrecords.Checklist
master(or the description starts with a Stacked: note)-W..., ratchets): noneNotes:
./lintand the local gate were not run.#includeinfrontend/OBSApp.cppand a header line infrontend/cmake/ui-utility.cmakeat the same place. Whichever merges second needs a trivial rebase (keep both lines); I will do it.🤖 Generated with Claude Code