Addon catalog in the game client card

addons/catalog.json pins SquidBots Lite, DragonUI (+Options), IncahootsCoA and CoACombat
to a commit and lists every file with its git blob SHA-1 and size. Install downloads
GitHub's archive of that commit, verifies each file (archives are not byte-stable, their
contents are), stages next to AddOns and moves the folders in; a foreign folder of the
same name goes to AddOns/.coa-addons-backup. .coa-addons.json records what the Manager
installed; update and remove touch only that. CoA_DevMenu ships with Custom Races V2, so
the separate dev menu addon is not in the catalog. Checked against the real GitHub
archives of the three small addons (ignored test).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Opus 5.5 committed 2026-11-15 20:58:29 +05:00
1 parent d64fdb51be
commit 05630ec9eb
15 files changed
+7877

No files matched your search

+38
View File
@@ -1479,6 +1479,41 @@ async fn custom_races_install(
result
}
#[tauri::command]
async fn addons_list(
state: State<'_, AppState>,
id: String,
) -> std::result::Result<Vec<coa_core::addons::AddonView>, UiError> {
let ctx = client_context(&state, &id)?;
blocking(move || coa_core::addons::list(&ctx.require()?)).await
}
/// Install or update a catalog addon in the linked game client (pinned commit, every file checked).
#[tauri::command]
async fn addons_install(
state: State<'_, AppState>,
id: String,
addon: String,
) -> std::result::Result<Vec<coa_core::addons::AddonView>, UiError> {
let ctx = client_context(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?;
let cancel = begin_client_job(&state)?;
let result = blocking(move || coa_core::addons::install(&ctx.require()?, &addon, &cancel)).await;
end_client_job(&state);
result
}
#[tauri::command]
async fn addons_remove(
state: State<'_, AppState>,
id: String,
addon: String,
) -> std::result::Result<Vec<coa_core::addons::AddonView>, UiError> {
let ctx = client_context(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?;
blocking(move || coa_core::addons::remove(&ctx.require()?, &addon)).await
}
#[tauri::command]
async fn custom_races_uninstall(
state: State<'_, AppState>,
@@ -3117,6 +3152,9 @@ pub fn run() {
restart_schedule_save,
clear_game_cache_on_play,
set_clear_game_cache_on_play,
addons_list,
addons_install,
addons_remove,
check_database,
repair_server,
module_set_enabled,