diff --git a/apps/artcraft-launcher/Cargo.toml b/apps/artcraft-launcher/Cargo.toml index 1355a6bf..3fc2e3e8 100644 --- a/apps/artcraft-launcher/Cargo.toml +++ b/apps/artcraft-launcher/Cargo.toml @@ -14,7 +14,7 @@ workspace = true [features] # Compatibility feature; migration now requires the saved Advanced setting. -experimental-oci-migration = ["artcraft-launcher-native/experimental-oci-migration"] +oci_migration = ["artcraft-launcher-native/oci_migration"] # Development only: install from `cargo xtask local serve` (see the README). local-mirror = ["artcraft-launcher-native/local-mirror"] diff --git a/crates/core/src/protocol.rs b/crates/core/src/protocol.rs index 6d905816..ccd37be2 100644 --- a/crates/core/src/protocol.rs +++ b/crates/core/src/protocol.rs @@ -100,7 +100,7 @@ pub struct BackendOptions { /// Offer pre-releases (`0.6.0-rc.1`) as updates. pub prereleases: bool, /// Opt in to migrating first party Flatpak bundles to the ArtCraft OCI repository. - pub experimental_oci_migration: bool, + pub oci_migration: bool, } /// The answer to "what's the latest release of this app?". diff --git a/crates/native/Cargo.toml b/crates/native/Cargo.toml index 3e6d39ae..e356dc00 100644 --- a/crates/native/Cargo.toml +++ b/crates/native/Cargo.toml @@ -12,7 +12,7 @@ workspace = true [features] # Compatibility feature; migration now requires the saved Advanced setting. -experimental-oci-migration = [] +oci_migration = [] # Lets ARTCRAFT_LAUNCHER_DOWNLOAD_BASE point the launcher at a developer's own loopback mirror # (`cargo xtask local serve`). Development only: release builds never enable it, so a shipped # launcher can't be steered away from GitHub's releases by an environment variable. diff --git a/crates/native/src/backend.rs b/crates/native/src/backend.rs index a5b7a522..e3e43782 100644 --- a/crates/native/src/backend.rs +++ b/crates/native/src/backend.rs @@ -567,7 +567,7 @@ fn run_install( return Err("the selected version isn't available yet. Check for updates before installing.".into()); } #[cfg(target_os = "linux")] - if options.experimental_oci_migration + if options.oci_migration && matches!(track, VersionTrack::Stable) && !release.prerelease && !replace diff --git a/crates/native/src/install.rs b/crates/native/src/install.rs index b034bfe3..229b7096 100644 --- a/crates/native/src/install.rs +++ b/crates/native/src/install.rs @@ -1226,7 +1226,7 @@ pub(crate) mod linux { } } - /// Experimental in-place migration; only an absent ref permits bundle fallback. + /// Opt-in OCI migration; only an absent ref permits bundle fallback. pub fn migrate_bundle_to_oci(app: &CraftApp, installed: &Installed, expected: &super::version::Version, stop: &Stop) -> Result { if installed.source != InstallSource::Flatpak || installed.externally_managed || !app.repo.starts_with("storytold/") { return Ok(false); diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index d17c2f85..f85c04d5 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -436,7 +436,7 @@ impl LauncherUi { let options = BackendOptions { kinds: self.settings.preferred_kinds.clone(), prereleases: self.settings.prereleases, - experimental_oci_migration: self.settings.experimental_oci_migration, + oci_migration: self.settings.oci_migration, versions: self.settings.versions.clone(), launcher_version: self.settings.launcher_version.clone(), install_locations: self.settings.install_locations.clone(), diff --git a/crates/ui-egui/src/settings.rs b/crates/ui-egui/src/settings.rs index 868f555f..b634dec3 100644 --- a/crates/ui-egui/src/settings.rs +++ b/crates/ui-egui/src/settings.rs @@ -109,7 +109,7 @@ pub struct Settings { pub notify: bool, pub prereleases: bool, /// Opt in to migrating first party Flatpak bundles to the ArtCraft OCI repository. - pub experimental_oci_migration: bool, + pub oci_migration: bool, /// Version track per app. Missing entries follow stable releases. pub versions: BTreeMap, pub launcher_version: artcraft_launcher_core::protocol::VersionTrack, @@ -204,7 +204,7 @@ impl Default for Settings { auto_update: false, notify: true, prereleases: false, - experimental_oci_migration: false, + oci_migration: false, versions: BTreeMap::new(), launcher_version: Default::default(), preferred_kinds: default_preferred_kinds(), @@ -226,9 +226,9 @@ mod oci_settings_tests { #[test] fn migration_requires_opt_in_and_survives_settings_roundtrip() { let old: Settings = serde_json::from_str("{}").unwrap(); - assert!(!old.experimental_oci_migration); - let enabled = Settings { experimental_oci_migration: true, ..old }; + assert!(!old.oci_migration); + let enabled = Settings { oci_migration: true, ..old }; let restored: Settings = serde_json::from_str(&serde_json::to_string(&enabled).unwrap()).unwrap(); - assert!(restored.experimental_oci_migration); + assert!(restored.oci_migration); } } diff --git a/crates/ui-egui/src/settings_dialog.rs b/crates/ui-egui/src/settings_dialog.rs index 2e9493a5..94026123 100644 --- a/crates/ui-egui/src/settings_dialog.rs +++ b/crates/ui-egui/src/settings_dialog.rs @@ -208,7 +208,7 @@ impl LauncherUi { return; } sheet::panel(ui, tl!("Advanced"), |ui| { - ui.checkbox(&mut self.settings.experimental_oci_migration, tl!("Migrate Flatpak bundles to ArtCraft OCI (experimental)")); + ui.checkbox(&mut self.settings.oci_migration, tl!("Migrate Flatpak bundles to ArtCraft OCI (experimental)")); note(ui, tl!("On update, switch first party apps when the matching package is available. Otherwise, keep using bundles.")); note(ui, tl!("The OCI repository is a preview with GPG verification disabled.")); });