Store network plug-in identity by AA.BB.CC series

The stored plug-in identity is now the AA.BB.CC series (matching BambuStudio)
rather than the full build version, so the meaningless 4th build digit stops
driving config, the whitelist, filenames, and the version selector. This fixes
the macOS "can't switch to an older build" bug: the cloud endpoint is
series-keyed and only ever serves a series' newest build, so downgrade-by-
download was impossible and the download silently adopted the latest.

A startup migration normalizes an existing full-version config and file name to
the series form with no re-download, the loader resolves a bare series to the
newest same-series build on disk, and user-provided custom-named plug-ins
(libbambu_networking_02.08.01_custom.*) are still enumerated and loaded.
This commit is contained in:
SoftFever
2026-07-19 00:26:05 +08:00
parent 2804e06cf2
commit afb4505ea7
7 changed files with 290 additions and 152 deletions
+4
View File
@@ -763,6 +763,10 @@ public:
void check_config_updates_from_updater() { check_updates(false); }
void show_network_plugin_download_dialog(bool is_update = false);
// One-time normalization of an older full-version identity (config 02.08.01.53 + file
// ..._02.08.01.53.dylib) to the AA.BB.CC series form, with no re-download. Runs at startup
// before the plug-in is loaded.
void migrate_network_plugin_config();
bool hot_reload_network_plugin();
bool install_network_plugin_from_ota(bool& had_cache);
std::string get_latest_network_version() const;