Install the Custom Races V2 client

The client update now takes ilusixn/CustomRacesCoa coa-custom-2.0: nine client archives plus the server
archive's client addons (subclass interface, dev menu, teleports, spell activation overlay), 76 race
archives and 7220 verified files in all, among them CoACustomRace.exe and its Vulkan renderer.

- The game starts CoACustomRace.exe when it is there; Ascension.exe is left alone, and a disabled V2
  falls back to it.
- Updating from 1.9.2 retires its patched Ascension.exe and puts the player's own back (1.9.2 replaced
  it; V2 does not ship one). Earlier installs keep their own hash lists, 1.9.2's included.
- Four V2 archives are byte-identical to 1.9.2's: a verified 1.9.2 copy in the cache or in Downloads
  is used instead of downloading it again.

Verified: unit tests (800 passed); against the real archives, every bundled hash, a full install,
disable, enable and uninstall in a disposable client, and an update of a client that Manager 0.9.12
had put 1.9.2 on (its own Ascension.exe comes back, and again after uninstalling).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Opus 5.5 committed 2026-11-15 01:59:43 +05:00
1 parent 6f8ed793a7
commit a0545286ee
5 files changed
+7679 -137

No files matched your search

@@ -0,0 +1,7 @@
---
area: manager
type: changed
audience: players
title: The custom races client is updated to Custom Races V2
---
The client update installs V2 and starts its own CoACustomRace.exe; Ascension.exe is left as it was. Four archives are the same as in 1.9.2, so a game folder that already had 1.9.2 downloads only the rest.
+2 -1
View File
@@ -15,7 +15,8 @@ use crate::fsx;
pub use crate::glue_config;
pub const ADDON_NAME: &str = "CoABotUI";
const EXECUTABLES: [&str; 3] = ["Ascension.exe", "Wow.exe", "WoW.exe"];
// CoA Custom Races V2 ships its own client (CoACustomRace.exe) next to Ascension.exe and must be started instead.
const EXECUTABLES: [&str; 4] = ["CoACustomRace.exe", "Ascension.exe", "Wow.exe", "WoW.exe"];
pub fn is_running(client: &Path) -> bool {
if crate::platform::flavor() == crate::platform::Flavor::Docker {
+334 -22
View File
@@ -14,14 +14,24 @@ use crate::download::Cancel;
use crate::error::{Error, Result};
use crate::fsx;
pub const CLIENT_VERSION: &str = "1.9.2";
pub const CLIENT_VERSION: &str = "2.0";
pub const MANIFEST_FILENAME: &str = "custom_races_patch_manifest.txt";
/// Files earlier releases installed that the current release no longer ships (removed on update).
#[cfg(test)]
const RETIRED_FILES: &[&str] = &["Ascension.exe"];
/// The client archives of the coa-custom-2.0 release. The server archive is read only for its client
/// addons (files/addons: subclass interface, dev menu, teleports, spell activation overlay).
pub const ARCHIVES: &[(&str, &str)] = &[
("CoA-Custom-1.9.2-Client-1.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.9.2/CoA-Custom-1.9.2-Client-1.zip"),
("CoA-Custom-1.9.2-Client-2.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.9.2/CoA-Custom-1.9.2-Client-2.zip"),
("CoA-Custom-1.9.2-Client-3.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.9.2/CoA-Custom-1.9.2-Client-3.zip"),
("CoA-Custom-1.9.2-Client-4.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.9.2/CoA-Custom-1.9.2-Client-4.zip"),
("CoA-Custom-1.9.2-Client-5.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.9.2/CoA-Custom-1.9.2-Client-5.zip"),
("CoA-Custom-V2-Client-1.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-1.zip"),
("CoA-Custom-V2-Client-2.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-2.zip"),
("CoA-Custom-V2-Client-3.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-3.zip"),
("CoA-Custom-V2-Client-4.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-4.zip"),
("CoA-Custom-V2-Client-5.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-5.zip"),
("CoA-Custom-V2-Client-6.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-6.zip"),
("CoA-Custom-V2-Client-7.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-7.zip"),
("CoA-Custom-V2-Client-8.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-8.zip"),
("CoA-Custom-V2-Client-9.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-9.zip"),
("CoA-Custom-V2-Server.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Server.zip"),
];
pub const RACE_MPQS: &[&str] = &[
@@ -35,14 +45,29 @@ pub const RACE_MPQS: &[&str] = &[
"patch-ZE8.MPQ",
"patch-ZE9.MPQ",
"patch-ZEA.MPQ",
"patch-ZES.MPQ",
"patch-ZEZV.MPQ",
"patch-ZEZW.MPQ",
"patch-ZEZX.MPQ",
"patch-ZEZY.MPQ",
"patch-ZEZZ.MPQ",
"patch-ZEZZA.MPQ",
"patch-ZEZZB.MPQ",
"patch-ZEZZC.MPQ",
"patch-ZEZZD.MPQ",
"patch-ZEZZE.MPQ",
"patch-ZEZZF.MPQ",
"patch-ZEZZG.MPQ",
"patch-ZEZZH.MPQ",
"patch-ZEZZI.MPQ",
"patch-ZG.MPQ",
"patch-ZH.MPQ",
"patch-ZHA.MPQ",
"patch-ZHM.MPQ",
"patch-ZJ.MPQ",
"patch-ZK.MPQ",
"patch-ZM.MPQ",
"patch-ZVU.MPQ",
"patch-ZES.MPQ",
"patch-ZJ.MPQ",
"patch-ZZE.MPQ",
"patch-ZZR.MPQ",
"patch-ZZS.MPQ",
@@ -50,26 +75,187 @@ pub const RACE_MPQS: &[&str] = &[
"patch-ZZU.MPQ",
"patch-ZZV.MPQ",
"patch-ZZW.MPQ",
"patch-ZZZ.MPQ",
"patch-ZK.MPQ",
"patch-ZZX.MPQ",
"patch-ZZZ.MPQ",
"patch-ZZZA.MPQ",
"patch-ZZZC.MPQ",
"patch-ZZZD.MPQ",
"patch-ZZZA.MPQ",
"patch-ZZZE.MPQ",
"patch-ZZZF.MPQ",
"patch-ZZZG.MPQ",
"patch-ZZZZ.MPQ",
"patch-ZZZZA.MPQ",
"patch-ZZZZB.MPQ",
"patch-ZZZZC.MPQ",
"patch-ZZZZD.MPQ",
"patch-ZZZZE.MPQ",
"patch-ZZZZS.MPQ",
"patch-ZZZZT.MPQ",
"patch-ZZZZW.MPQ",
"patch-ZZZZX.MPQ",
"patch-ZZZZY.MPQ",
"patch-ZZZZZ.MPQ",
"patch-ZZZZZA.MPQ",
"patch-ZZZZZB.MPQ",
"patch-ZZZZZC.MPQ",
"patch-ZZZZZM.MPQ",
"patch-ZZZZZN.MPQ",
"patch-ZZZZZO.MPQ",
"patch-ZZZZZP.MPQ",
"patch-ZZZZZQ.MPQ",
"patch-ZZZZZR.MPQ",
"patch-ZZZZZS.MPQ",
"patch-ZZZZZT.MPQ",
"patch-ZZZZZU.MPQ",
"patch-ZZZZZV.MPQ",
"patch-ZZZZZW.MPQ",
"patch-ZZZZZX.MPQ",
"patch-ZZZZZY.MPQ",
];
pub const RACE_ADDONS: &[&str] = &[
"Ascension_Subclass/Ascension_Subclass.lua",
"Ascension_Subclass/Ascension_Subclass.toc",
"Ascension_Subclass/Bindings.xml",
"Ascension_Subclass/SubclassBar.lua",
"Ascension_Subclass/SubclassCastBar.lua",
"Ascension_Subclass/SubclassChoices.lua",
"Ascension_Subclass/SubclassGlow.lua",
"Ascension_Subclass/SubclassNodes.lua",
"Ascension_Subclass/SubclassOrbs.lua",
"Ascension_Subclass/SubclassPowerBar.lua",
"Ascension_Subclass/SubclassRaceBackground.lua",
"CoAHideArmor/CoAHideArmor.lua",
"CoAHideArmor/CoAHideArmor.toc",
"CoAQuestSafe/CoAQuestSafe.lua",
"CoAQuestSafe/CoAQuestSafe.toc",
"CoAWC2Cursor/CoAWC2Cursor.lua",
"CoAWC2Cursor/CoAWC2Cursor.toc",
"CoAHideArmor/CoAHideArmor.lua",
"CoAHideArmor/CoAHideArmor.toc",
"CoA_DevMenu/CoA_DevMenu.lua",
"CoA_DevMenu/CoA_DevMenu.lua.before_v2",
"CoA_DevMenu/CoA_DevMenu.lua.before_v3",
"CoA_DevMenu/CoA_DevMenu.toc",
"CoA_DevMenu/CoA_DevMenu_CoA.lua",
"CoA_DevMenu/CoA_DevMenu_Combat.lua",
"CoA_DevMenu/CoA_DevMenu_Create.lua",
"CoA_DevMenu/CoA_DevMenu_Create.lua.before_v4",
"CoA_DevMenu/CoA_DevMenu_Create.lua.before_v5",
"CoA_DevMenu/CoA_DevMenu_Ext.lua",
"CoA_DevMenu/CoA_DevMenu_Ext.lua.before_v3",
"CoA_DevMenu/CoA_DevMenu_Ext.lua.before_v4",
"CoA_DevMenu/CoA_DevMenu_Help.lua",
"CoA_DevMenu/CoA_DevMenu_Items.lua",
"CoA_DevMenu/CoA_DevMenu_Me.lua",
"CoA_DevMenu/CoA_DevMenu_Server.lua",
"CoA_DevMenu/CoA_DevMenu_Share.lua",
"CoA_DevMenu/EmoteData.lua",
"CoA_TalentReset/CoA_TalentReset.lua",
"CoA_TalentReset/CoA_TalentReset.toc",
"CoA_Teleports/CoA_Teleports.lua",
"CoA_Teleports/CoA_Teleports.toc",
"CoA_Teleports/TeleportData.lua",
"SpellActivationOverlay-for-CoA/LICENSE",
"SpellActivationOverlay-for-CoA/SpellActivationOverlay-for-CoA.toc",
"SpellActivationOverlay-for-CoA/SpellActivationOverlay.lua",
"SpellActivationOverlay-for-CoA/SpellActivationOverlay.xml",
"SpellActivationOverlay-for-CoA/changelog.md",
"SpellActivationOverlay-for-CoA/classes/barbarian.lua",
"SpellActivationOverlay-for-CoA/classes/bloodmage.lua",
"SpellActivationOverlay-for-CoA/classes/chronomancer.lua",
"SpellActivationOverlay-for-CoA/classes/common.lua",
"SpellActivationOverlay-for-CoA/classes/cultist.lua",
"SpellActivationOverlay-for-CoA/classes/deathknight.lua",
"SpellActivationOverlay-for-CoA/classes/druid.lua",
"SpellActivationOverlay-for-CoA/classes/felsworn.lua",
"SpellActivationOverlay-for-CoA/classes/guardian.lua",
"SpellActivationOverlay-for-CoA/classes/hunter.lua",
"SpellActivationOverlay-for-CoA/classes/knightofxoroth.lua",
"SpellActivationOverlay-for-CoA/classes/mage.lua",
"SpellActivationOverlay-for-CoA/classes/monk.lua",
"SpellActivationOverlay-for-CoA/classes/necromancer.lua",
"SpellActivationOverlay-for-CoA/classes/paladin.lua",
"SpellActivationOverlay-for-CoA/classes/priest.lua",
"SpellActivationOverlay-for-CoA/classes/primalist.lua",
"SpellActivationOverlay-for-CoA/classes/pyromancer.lua",
"SpellActivationOverlay-for-CoA/classes/ranger.lua",
"SpellActivationOverlay-for-CoA/classes/reaper.lua",
"SpellActivationOverlay-for-CoA/classes/rogue.lua",
"SpellActivationOverlay-for-CoA/classes/runemaster.lua",
"SpellActivationOverlay-for-CoA/classes/shaman.lua",
"SpellActivationOverlay-for-CoA/classes/starcaller.lua",
"SpellActivationOverlay-for-CoA/classes/stormbringer.lua",
"SpellActivationOverlay-for-CoA/classes/suncleric.lua",
"SpellActivationOverlay-for-CoA/classes/templar.lua",
"SpellActivationOverlay-for-CoA/classes/tinker.lua",
"SpellActivationOverlay-for-CoA/classes/venomancer.lua",
"SpellActivationOverlay-for-CoA/classes/warlock.lua",
"SpellActivationOverlay-for-CoA/classes/warrior.lua",
"SpellActivationOverlay-for-CoA/classes/witchdoctor.lua",
"SpellActivationOverlay-for-CoA/classes/witchhunter.lua",
"SpellActivationOverlay-for-CoA/components/aura.lua",
"SpellActivationOverlay-for-CoA/components/bucket.lua",
"SpellActivationOverlay-for-CoA/components/display.lua",
"SpellActivationOverlay-for-CoA/components/effect.lua",
"SpellActivationOverlay-for-CoA/components/events.lua",
"SpellActivationOverlay-for-CoA/components/external.lua",
"SpellActivationOverlay-for-CoA/components/glow.lua",
"SpellActivationOverlay-for-CoA/components/hash.lua",
"SpellActivationOverlay-for-CoA/components/item.lua",
"SpellActivationOverlay-for-CoA/components/overlay.lua",
"SpellActivationOverlay-for-CoA/components/project.lua",
"SpellActivationOverlay-for-CoA/components/rune.lua",
"SpellActivationOverlay-for-CoA/components/shutdown.lua",
"SpellActivationOverlay-for-CoA/components/sound.lua",
"SpellActivationOverlay-for-CoA/components/spell.lua",
"SpellActivationOverlay-for-CoA/components/targetspells.lua",
"SpellActivationOverlay-for-CoA/components/targetwatch.lua",
"SpellActivationOverlay-for-CoA/components/tr.lua",
"SpellActivationOverlay-for-CoA/components/trigger.lua",
"SpellActivationOverlay-for-CoA/components/util.lua",
"SpellActivationOverlay-for-CoA/components/variable.lua",
"SpellActivationOverlay-for-CoA/libs/LibActionButton-1.0/LibActionButton-1.0.lua",
"SpellActivationOverlay-for-CoA/libs/LibActionButton-1.0/LibActionButton-1.0.toc",
"SpellActivationOverlay-for-CoA/libs/LibButtonGlow-1.0/LibButtonGlow-1.0.lua",
"SpellActivationOverlay-for-CoA/libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc",
"SpellActivationOverlay-for-CoA/libs/LibStub/LibStub.lua",
"SpellActivationOverlay-for-CoA/libs/LibStub/LibStub.toc",
"SpellActivationOverlay-for-CoA/options/InterfaceOptionsPanels.lua",
"SpellActivationOverlay-for-CoA/options/InterfaceOptionsPanels.xml",
"SpellActivationOverlay-for-CoA/options/classoptions.lua",
"SpellActivationOverlay-for-CoA/options/db.lua",
"SpellActivationOverlay-for-CoA/options/defaults.lua",
"SpellActivationOverlay-for-CoA/options/glowoptions.lua",
"SpellActivationOverlay-for-CoA/options/overlayoptions.lua",
"SpellActivationOverlay-for-CoA/options/questions.lua",
"SpellActivationOverlay-for-CoA/options/variables.lua",
"SpellActivationOverlay-for-CoA/options/variants.lua",
"SpellActivationOverlay-for-CoA/textures/bandits_guile.blp",
"SpellActivationOverlay-for-CoA/textures/eclipse_moon.blp",
"SpellActivationOverlay-for-CoA/textures/eclipse_sun.blp",
"SpellActivationOverlay-for-CoA/textures/fury_of_stormrage_yellow.blp",
"SpellActivationOverlay-for-CoA/textures/high_tide.blp",
"SpellActivationOverlay-for-CoA/textures/icon64.blp",
"SpellActivationOverlay-for-CoA/textures/maelstrom_weapon_1.blp",
"SpellActivationOverlay-for-CoA/textures/maelstrom_weapon_2.blp",
"SpellActivationOverlay-for-CoA/textures/maelstrom_weapon_3.blp",
"SpellActivationOverlay-for-CoA/textures/maelstrom_weapon_4.blp",
"SpellActivationOverlay-for-CoA/textures/mask.blp",
"SpellActivationOverlay-for-CoA/textures/maskzero.blp",
"SpellActivationOverlay-for-CoA/textures/rkm128.blp",
"SpellActivationOverlay-for-CoA/textures/texname.lua",
"SpellActivationOverlay-for-CoA/textures/thrill_of_the_hunt_1.blp",
"SpellActivationOverlay-for-CoA/textures/thrill_of_the_hunt_2.blp",
"SpellActivationOverlay-for-CoA/textures/thrill_of_the_hunt_3.blp",
"SpellActivationOverlay-for-CoA/variables/actionusable.lua",
"SpellActivationOverlay-for-CoA/variables/aurastacks.lua",
"SpellActivationOverlay-for-CoA/variables/custom.lua",
"SpellActivationOverlay-for-CoA/variables/execute.lua",
"SpellActivationOverlay-for-CoA/variables/holypower.lua",
"SpellActivationOverlay-for-CoA/variables/itemset.lua",
"SpellActivationOverlay-for-CoA/variables/nativesao.lua",
"SpellActivationOverlay-for-CoA/variables/stance.lua",
"SpellActivationOverlay-for-CoA/variables/talent.lua",
"UnBot/OnlineFrame.xml",
];
pub const EXCLUDED_BOT_RACES_RECOMMENDED: &str =
@@ -217,6 +403,8 @@ fn patch_files(client: &Path) -> Result<Vec<PatchFile>> {
include_str!("custom_races_hashes_1_8_3.json")
} else if manifest.lines().any(|line| line == "# CoA Custom 1.9.1") {
include_str!("custom_races_hashes_1_9_1.json")
} else if manifest.lines().any(|line| line == "# CoA Custom 1.9.2") {
include_str!("custom_races_hashes_1_9_2.json")
} else {
include_str!("custom_races_hashes.json")
};
@@ -541,6 +729,31 @@ fn preserve_original(tx: &mut PatchTransaction<'_>, active: &Path) -> Result<()>
tx.copy(active, &original)
}
/// A file the previous release installed and the new one no longer ships (1.9.2's Ascension.exe, which V2
/// replaced with its own CoACustomRace.exe) is removed if it is still ours, and the player's original comes back.
fn retire_dropped_files(
tx: &mut PatchTransaction<'_>,
client: &Path,
previous: &[PatchFile],
payload: &std::collections::BTreeSet<String>,
) -> Result<()> {
for old in previous.iter().filter(|old| !payload.contains(&old.path)) {
let active = fsx::safe_join(client, &old.path)?;
if matches_patch(&active, old) {
tx.save(&active)?;
let original = suffix(&active, "original");
if original.is_file() {
tx.copy(&original, &active)?;
}
}
let disabled = suffix(&active, "disabled");
if matches_patch(&disabled, old) {
tx.save(&disabled)?;
}
}
Ok(())
}
/// Preserve launcher replacements, and switch every file owned by the package.
pub fn set_client_patch_enabled(client: &Path, enabled: bool) -> Result<()> {
if !client.is_dir() {
@@ -667,26 +880,46 @@ fn stage_root_asset(staging: &Path, relative: &str, reader: &mut impl Read) -> R
fn archive_job(filename: &str, url: &str, cache: &Path) -> Result<crate::download::Job> {
let (size, sha256) = match filename {
"CoA-Custom-1.9.2-Client-1.zip" => (
"CoA-Custom-V2-Client-1.zip" => (
1_513_021_586,
"a9dd51ed2d90fb048d549602f40f5429d56e2df0df5606a38781b358fa369568",
),
"CoA-Custom-1.9.2-Client-2.zip" => (
"CoA-Custom-V2-Client-2.zip" => (
1_198_283_005,
"ab084a55509ccbcc2977a06dd0c01fa879973a1892baaacaeb3ff52f3dfc750e",
),
"CoA-Custom-1.9.2-Client-3.zip" => (
1_678_829_573,
"907e267f0ee7038807e626c3c1eca5e12db6c88b747137a23c5fb52eaa1a358e",
"CoA-Custom-V2-Client-3.zip" => (
1_671_130_705,
"0af34199f0739ce086adb0371d3de7c1a0f5ca9c62ecde6b0efe9286e33874a8",
),
"CoA-Custom-1.9.2-Client-4.zip" => (
"CoA-Custom-V2-Client-4.zip" => (
502_385_128,
"e0bd87172af989fa50a8e2b08ba4321c72b6265047482f051a1db3b80d55bcaa",
),
"CoA-Custom-1.9.2-Client-5.zip" => (
"CoA-Custom-V2-Client-5.zip" => (
168_079_711,
"73364ad1b58c6342641a848a3b20a835472834f600416606be1470386774ca78",
),
"CoA-Custom-V2-Client-6.zip" => (
1_881_526_537,
"91db79b7b451856fa9e45daea52e0fe1c04676653dd8a88e6627f04ee7b47759",
),
"CoA-Custom-V2-Client-7.zip" => (
734_725_114,
"4c5532d775d206a3b913a6111040bb96b95c683b74c08a6131ed9f38db8e2b39",
),
"CoA-Custom-V2-Client-8.zip" => (
734_216_670,
"bdaa1d047e8767bd5715f1e8465d116220597d9c135a43e2dda02e12ce2e5526",
),
"CoA-Custom-V2-Client-9.zip" => (
195_235_400,
"0764893543084a12d15578fe734f66ba4519740794a6b3b3a38a08594c38c640",
),
"CoA-Custom-V2-Server.zip" => (
63_983_587,
"8970d61eea40f53cea4c27481edd85d2b2647cd32eb88932e0077da3b4a77d23",
),
_ => return Err(Error::Invalid("Unknown custom races archive.".into())),
};
Ok(crate::download::Job {
@@ -781,6 +1014,17 @@ fn resolve_archive_with(
Ok(job.dest.clone())
}
/// The 1.9.2 file name of a V2 archive with the same bytes (same size and SHA-256 in both releases).
fn earlier_name(filename: &str) -> Option<&'static str> {
match filename {
"CoA-Custom-V2-Client-1.zip" => Some("CoA-Custom-1.9.2-Client-1.zip"),
"CoA-Custom-V2-Client-2.zip" => Some("CoA-Custom-1.9.2-Client-2.zip"),
"CoA-Custom-V2-Client-4.zip" => Some("CoA-Custom-1.9.2-Client-4.zip"),
"CoA-Custom-V2-Client-5.zip" => Some("CoA-Custom-1.9.2-Client-5.zip"),
_ => None,
}
}
/// Locate a verified archive or resume downloading it into the Manager's cache.
fn resolve_or_download_archive(
filename: &str,
@@ -796,6 +1040,16 @@ fn resolve_or_download_archive(
let cache = std::env::temp_dir().join("coa-client-races");
let downloads = std::env::var_os("USERPROFILE").map(|p| PathBuf::from(p).join("Downloads"));
let job = archive_job(filename, url, &cache)?;
// V2 republished four 1.9.2 archives byte for byte under new names: reuse a verified 1.9.2 copy.
if let Some(previous) = earlier_name(filename) {
for folder in [Some(cache.as_path()), downloads.as_deref()].into_iter().flatten() {
let candidate = folder.join(previous);
if archive_matches(&candidate, &job) {
tracing::info!(path = %candidate.display(), "using the identical 1.9.2 archive");
return Ok(candidate);
}
}
}
resolve_archive_with(transport, &job, downloads.as_deref(), cancel, &|p| {
let ratio = p.downloaded as f32 / p.total.max(1) as f32;
report(
@@ -985,6 +1239,8 @@ pub fn install_client_patches(
"Custom races archives are missing required runtime files.".into(),
));
}
let payload_paths: std::collections::BTreeSet<String> =
payload.iter().map(|file| file.path.clone()).collect();
let previous = patch_files(client_path)?;
let mut tx = PatchTransaction::new(client_path)?;
for file in payload {
@@ -1017,6 +1273,7 @@ pub fn install_client_patches(
}
}
}
retire_dropped_files(&mut tx, client_path, &previous, &payload_paths)?;
tx.save(&manifest_path)?;
fsx::atomic_write(&manifest_path, manifest_body.as_bytes())?;
tx.finish()?;
@@ -1175,6 +1432,25 @@ mod tests {
fs::write(root.join(MANIFEST_FILENAME), manifest).unwrap();
}
#[test]
fn an_update_retires_files_the_new_release_no_longer_ships() {
let temp = tempfile::tempdir().unwrap();
let root = temp.path();
fs::write(root.join("Ascension.exe"), b"1.9.2 client").unwrap();
fs::write(root.join("Ascension.exe.original"), b"player's own client").unwrap();
fs::write(root.join("Wow.exe"), b"changed by the player").unwrap();
let ours = |path: &str, bytes: &[u8]| PatchFile {
path: path.into(),
sha256: hex::encode(<sha2::Sha256 as sha2::Digest>::digest(bytes)),
};
let previous = vec![ours("Ascension.exe", b"1.9.2 client"), ours("Wow.exe", b"old package bytes")];
let mut tx = PatchTransaction::new(root).unwrap();
retire_dropped_files(&mut tx, root, &previous, &Default::default()).unwrap();
tx.finish().unwrap();
assert_eq!(fs::read(root.join("Ascension.exe")).unwrap(), b"player's own client");
assert_eq!(fs::read(root.join("Wow.exe")).unwrap(), b"changed by the player");
}
#[test]
#[ignore = "Requires the downloaded release archives"]
fn bundled_hashes_match_verified_release_archives() {
@@ -1226,6 +1502,28 @@ mod tests {
assert_eq!(actual, expected);
}
#[test]
#[ignore = "Requires COA_UPGRADE_CLIENT: a disposable client with 1.9.2 installed by Manager 0.9.12"]
fn an_installed_1_9_2_client_updates_to_v2_and_gets_its_own_executable_back() {
let root = PathBuf::from(std::env::var_os("COA_UPGRADE_CLIENT").expect("COA_UPGRADE_CLIENT"));
assert_eq!(client_patch_status(&root).version.as_deref(), Some("1.9.2"));
let patched = fs::read(root.join("Ascension.exe")).unwrap();
let original = fs::read(root.join("Ascension.exe.original")).unwrap();
assert_ne!(patched, original);
install_client_patches(&root, &Cancel::default(), &|_, _| {}).unwrap();
let status = client_patch_status(&root);
assert_eq!(status.version.as_deref(), Some(CLIENT_VERSION));
assert_eq!(status.state, ClientPatchState::Enabled);
assert!(root.join("CoACustomRace.exe").is_file());
assert!(root.join("Data/patch-ZZZZZY.MPQ").is_file());
// 1.9.2's patched Ascension.exe is retired and the player's own executable is back.
assert_eq!(fs::read(root.join("Ascension.exe")).unwrap(), original);
uninstall_client_patches(&root).unwrap();
assert_eq!(client_patch_status(&root).state, ClientPatchState::NotInstalled);
assert_eq!(fs::read(root.join("Ascension.exe")).unwrap(), original);
assert!(!root.join("CoACustomRace.exe").exists());
}
#[test]
#[ignore = "Requires the downloaded release archives in the normal download cache"]
fn release_archives_install_toggle_and_uninstall_in_a_disposable_client() {
@@ -1243,6 +1541,13 @@ mod tests {
assert!(root
.join("Interface/AddOns/CoAHideArmor/CoAHideArmor.lua")
.is_file());
// V2: its own client next to the untouched game executable, and the server package's addons.
assert!(root.join("CoACustomRace.exe").is_file());
assert!(root.join("Vulkan/d3d9.dll").is_file());
assert_eq!(fs::read(root.join("Ascension.exe")).unwrap(), b"original game executable");
assert!(root
.join("Interface/AddOns/Ascension_Subclass")
.is_dir());
set_client_patch_enabled(root, false).unwrap();
assert_eq!(client_patch_status(root).state, ClientPatchState::Disabled);
assert_eq!(
@@ -1273,6 +1578,7 @@ mod tests {
b"unrelated user patch"
);
assert!(!root.join("Data/patch-ZZZD.MPQ").exists());
assert!(!root.join("CoACustomRace.exe").exists());
}
#[test]
@@ -1317,7 +1623,10 @@ mod tests {
);
assert_ne!(legacy["Data/patch-T.MPQ"], current["Data/patch-T.MPQ"]);
assert!(!files.iter().any(|file| file.path == "Data/patch-ZZW.MPQ"));
assert!(legacy.keys().all(|key| current.contains_key(key)));
assert!(legacy
.keys()
.filter(|key| !RETIRED_FILES.contains(&key.as_str()))
.all(|key| current.contains_key(key)));
}
#[test]
@@ -1333,7 +1642,10 @@ mod tests {
for file in files {
assert_eq!(file.sha256, legacy[&file.path]);
}
assert!(legacy.keys().all(|path| current.contains_key(path)));
assert!(legacy
.keys()
.filter(|key| !RETIRED_FILES.contains(&key.as_str()))
.all(|key| current.contains_key(key)));
assert!(!legacy.contains_key("Data/patch-ZZZD.MPQ"));
assert!(current.contains_key("Data/patch-ZZZD.MPQ"));
let status = client_patch_status(temp.path());
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,116 @@
{
"Ascension.exe": "e2c347019d554a59639e5978fd68e50e906973ab313c6573cc56ca82e8e3c547",
"Data/Retail/Assets/EquipmentFitting/1068-1.bin": "332d2c38b037a118f262bbb3096a01ebfb33c5347e96bbfb64157437b300281b",
"Data/Retail/Assets/EquipmentFitting/60-0.bin": "ffbf6efc9ea09b0c442f048c5bc7b4c5975258045cfddedd9a77a93363312b5e",
"Data/Retail/Assets/EquipmentFitting/60-1.bin": "36ceed2a55756f3322e018938809acea5124351161405058ef27d100173778da",
"Data/Retail/Assets/EquipmentFitting/61-0.bin": "3b302a4055d1e795c451b02e38dfe8007527ee1bc5f926ebcd6ef17f433cd232",
"Data/Retail/Assets/EquipmentFitting/61-1.bin": "c42df399ed99be3c7ce1b5fdb95a873711011713a4cd867bc226a14b1ce0e8ca",
"Data/Retail/Assets/EquipmentFitting/65-0.bin": "8ce3f884ae197d14dff0f955c2cf05abb716742c8aff79f7af1cec5cf7225f04",
"Data/Retail/Assets/EquipmentFitting/68-0.bin": "f1d878f0f943cbdb8025af8daac4a38c1d1e159bd961d9d76f225931c11648ac",
"Data/Retail/Assets/EquipmentFitting/68-1.bin": "2ccbae634384200340c0cc3dca36a7a014a8ddad110598e4470ff1b266576465",
"Data/Retail/Assets/EquipmentFitting/73-0.bin": "5530882678f677ad47987ce906e851338a35f7d9737e3f9d829938027b8af67f",
"Data/Retail/Assets/EquipmentFitting/74-0.bin": "53a7be86b3bfdd6995406c706df3ca091484206d8141cebb39113c714500384a",
"Data/Retail/Assets/EquipmentFitting/74-1.bin": "e688c55a355231978d42480a003c26d379460f5931c2469c119ecb073ea153e1",
"Data/Retail/Assets/EquipmentFitting/75-0.bin": "289abc71c6df0e031a64d62a40e658eaefd37e45373a062ca52f08fbe803500c",
"Data/Retail/Assets/EquipmentFitting/76-0.bin": "63a493e70b91f59ff49f1942d959df986062bd267fe2ba589f344963df771021",
"Data/Retail/Assets/EquipmentFitting/77-0.bin": "b1366ce0dc4f31cb8c8c9705be2da565df4b905224af04b6b88f8c8e9c87e3c9",
"Data/Retail/Assets/EquipmentFitting/78-0.bin": "7b0031fb12ab19020005bdccacca2dd3991349c36949a58b035992585b4134db",
"Data/patch-T.MPQ": "fe597138ab7f56881b5f4f27d6dc9d81bb278b483ca0d91b7207ffd4a5ae7bfd",
"Data/patch-ZE1.MPQ": "69d79dbbea54ec0312c37770debc79c7bc9ce2e21eedef99c03cd8d911955283",
"Data/patch-ZE2.MPQ": "1a41cae77ad730e9cf69e8d63fd12ae3a579418bb550d351fff469573a97ac3c",
"Data/patch-ZE3.MPQ": "b587202c21b6f580682b601b7c2e905fbfa766276e74733db55c1bddbffb7f87",
"Data/patch-ZE5.MPQ": "476b5a1fcf69f64fdb281e3b445362b936d016066ccd12f897acfcf200d6c0cf",
"Data/patch-ZE6.MPQ": "762592c9ed950b4a7b6c7d85d45050b30fa3f35d53e348ee1e1516fdbb7e5484",
"Data/patch-ZE7.MPQ": "de54b0189d242763d2872223419a259b6b8a4b380c24b50a2ef9c6fa44466248",
"Data/patch-ZE8.MPQ": "1bc5691fb84a84f3e7a0a70baaa9192a97b4ec5906ee37c85838ffe08adef934",
"Data/patch-ZE9.MPQ": "d49c94463e9548e76378ce2c0454d8f204f0745c8c0de32b6dce7f0b0fd67c4a",
"Data/patch-ZEA.MPQ": "78fd10ec5262ae2417eba9700d2172553bbc1e5cfb0b597aada8f1753ca46d9d",
"Data/patch-ZES.MPQ": "a2d9348f917f745c7aa25b2eed96efa312f7b2d2f62cb86a4f2eaabc2dfa895f",
"Data/patch-ZG.MPQ": "48979e1fda775f8deb47bffa48e0a468595d4c71286fee518f51dc5801c5ca39",
"Data/patch-ZH.MPQ": "5e1d2fe287053abba703d7af381e10096c6525ba477ffed3971c2fc4f93e919c",
"Data/patch-ZHA.MPQ": "0fc6ebeafe1d14192dc64bafc90bde3c49230df1297f98bf65900a3bcf953617",
"Data/patch-ZHM.MPQ": "317d3ae00f0bd674b358af07544976acb7804aa6d8b19d1788ad96030e8c9bf0",
"Data/patch-ZJ.MPQ": "f821e99add86ef68d108c5ec466328c97677d3ed52f7944e200f3fe38c13b4de",
"Data/patch-ZK.MPQ": "444d0ecb72c1e990509d53e3cfa5b7634c816733533e8a97e5d7f5653ee32cce",
"Data/patch-ZM.MPQ": "424ab1978986e854551633983a94bd15beba6328aabea8c02f98eaa32f6f0b61",
"Data/patch-ZVU.MPQ": "c679b85a2e97344395756b54d2cf6abefe4e80e74944cb55b6e573ad17b7d020",
"Data/patch-ZZE.MPQ": "4b1e289e12c82644cb78f50170e6b5fd53918eb2de834f9e0cebddd81873a8bb",
"Data/patch-ZZR.MPQ": "5a7575e592dc0c8a6913e0d946bbe06fa0ca2e4d817ef1f8548d3d13142bcbd3",
"Data/patch-ZZS.MPQ": "533fd69d5784d83e872a5a28d27301dc9ab5d0cb925f8b2116926854e4a0a5b8",
"Data/patch-ZZT.MPQ": "e60dab63fe5650fdf5f0846ea6d4136219293bcfdad46d9b796697faeff9ab4c",
"Data/patch-ZZU.MPQ": "0311de8f034eae7dec1bd2c92b1fe6c741cbaf53da62c7609cd12b6c37908e47",
"Data/patch-ZZV.MPQ": "3b04008905e7185d165827d68f7ca228dda8272816364f7d71874ecc83b64f0e",
"Data/patch-ZZW.MPQ": "3bbbc72901fd2d662113036485c380701e693f5a39ba9479af306bf2fa2030bd",
"Data/patch-ZZX.MPQ": "4c12608089cfe356f7c8882d66db90239ed3ec8ddd980d91d7a3a488680f3c88",
"Data/patch-ZZZ.MPQ": "566aaadf501af42e29a828b1bc2edbd36d436288fb309fe423bd74b9619bf593",
"Data/patch-ZZZA.MPQ": "57ccbdc0a66000767554ffd194088df6d602ddd8341a141bca8201e7d5435889",
"Data/patch-ZZZC.MPQ": "691a53f6325c2615a64ced0802f18bc4d96e99c62aaa606fc930f9406ee74cdf",
"Data/patch-ZZZD.MPQ": "ca893cf8129f6fd442a63f0697a8ddea88546e3ce71bde713be2cc832b892bc9",
"Data/patch-ZZZE.MPQ": "2e245ee0fe3b913087eed399062fda5843d98b04afac38024f7c64ac3bf43e18",
"Data/patch-ZZZF.MPQ": "40eac695cfcafb598b8376f3b9a61ecc037e4d445b87279cfe387a91edad32c3",
"Data/patch-ZZZZ.MPQ": "860c990db3b4185fdc36e1a001d3ca3507a68253a4506793a115f86eb0892a15",
"EsteriaAppearance.bin": "90d9cfaeaf6de10f014f1d1610ea10453ec9b240255759aea99513cac488a3ec",
"EsteriaAppearance.dll": "88e268d3be9eca3b0644f543d823f4bdcc04a9700a6e8ed73fd2a1260ad191af",
"EsteriaAppearanceGeometry.bin": "19de5b4b4f79778ea5316659efc2f66c6edb6b5149c46efa47c46bfa4ec6904c",
"EsteriaAppearanceMaterials.bin": "f72f027f54a55c05aa0f76b457b97b484fe0e1aedc0e068cc0e0ca53e1878cba",
"EsteriaBanshee.bin": "d3fe66caa6a0ecba96bddb07ac1cbdb915694e87fc1608da0fdabecdf9ffea4d",
"EsteriaBansheeTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaCentaur.bin": "d63f0b7d21cee67d234d134e832fe6d55c398f2b63f9f6c191dcfa9671637185",
"EsteriaCentaurTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaCosmeticWings.bin": "57352c28459d073a29b3014d33b70f3b3756afa37fa9583ef6b30d503422ac3f",
"EsteriaDrakonid.bin": "95440ee9c065ef20bb7fed6158d20623d68745291cedc2726fc746ff54601f95",
"EsteriaDrakonidCoverage.bin": "9cdc227f08329e1245d2b864a996e7a772c96ecdbe5d81925f4d60cdbe4fa11e",
"EsteriaDrakonidTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaEarthen.bin": "8a0db93ba2d5c756b44ed84f2f7bc7c15eef13be6a7d87baf1383c6c0c624e02",
"EsteriaEthereal.bin": "ada3b7588511a847dd5154d91e3041e9f7f193998b06bfede5e0afc32570b48c",
"EsteriaEtherealTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaFaceless.bin": "1c5a1d7a6b1db6984a8e41bc4804e9f7c50d65dcdbb8c0a9d1a9e8af8c91bd8f",
"EsteriaFacelessTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaGnoll.bin": "cfacc8e681bb8e54a4f01ee9c12a91bf0bd23a23527bb548d4dc21ec1b33eea2",
"EsteriaGnollTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaHaranir.bin": "59f31d00e372fd2646e1cf0d9d3d5d671b31edd60ff7b862f8d1ce7e53ba1f2f",
"EsteriaHaranirTextures.bin": "99948ca570be2d376f0c67e3b8088739b6fa9f9d2c73985e19f68df77689a229",
"EsteriaHighmountain.bin": "e83349252ad2687ac23fcfc5623db7401cf32e5faf47a5a7be20c2f94b014938",
"EsteriaHozen.bin": "739bc3775388976f5c09bcbf3a98b62d804dff78d545e25a41d07dd99b5fddc5",
"EsteriaHozenTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaKvItems.bin": "fc5f9d86114234b38dbb0e14a6a5ec16249eaa92a73411a7fc371a950549dcce",
"EsteriaKvSkins.bin": "60b2b899f5f83137368514928f92f3b04c0fae058f534c487ddbe913ee4bec18",
"EsteriaKyrian.bin": "9329147f08805ff4003f9e062fea7c6ea8fdd8c4d6a40de63a6d228ebe1b7c9a",
"EsteriaKyrianTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaMantid.bin": "71536dee6c2abd0b0e13f33bc73cad7e6fb1b0fc1f6912a95c55d57bc7ee1787",
"EsteriaMantidTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaNaga.bin": "e87547cff5d09500c294f8b06935d134cdd0bbb962e294a72de09404505bd8b3",
"EsteriaNagaTextures.bin": "57ec560f99c1d48ac1e8f6a797c156513b99e7d349e3071afe405f812d159ae3",
"EsteriaSaberon.bin": "7735c9325c807c5125760d87f323d6b7d4162fb542c1d8b5f435ea2d6b9a4daa",
"EsteriaSaberonCoverage.bin": "9cdc227f08329e1245d2b864a996e7a772c96ecdbe5d81925f4d60cdbe4fa11e",
"EsteriaSaberonTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaSethrak.bin": "bd14857a8c11fdf8027128763293701586b2102f9a6539d33a727014789fd606",
"EsteriaSethrakTextures.bin": "d2b2cf58087a391f00198008fe871edd400ddf28d54a3a05674df74c5198528a",
"EsteriaSlime.bin": "491e942ceb6abda83c0249afebae7c9c43af3897b35e45fa33d6f9177ecbc177",
"EsteriaSlimeTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaTarasek.bin": "f718444d5ec36f7aff018883486ae1981151fe6e01f5b7781d68d74e9fadfa47",
"EsteriaTarasekTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaThinHuman.bin": "bc12e5ca2c087ca0a8642ff6cd8e78fe2e1f85928518b12c19b4245a8320585d",
"EsteriaThinHumanTextures.bin": "27488a7494fa9733b53118d1d0f4acef50a9e19004f81f9c8a614b10f4c3fd5e",
"EsteriaTuskarr.bin": "ecbe7ef490ba67eca029a57639192db61238522618491549766fe38529914387",
"EsteriaTuskarrTextures.bin": "e2116c2c83adea079126fd5da765d20da24f044d4f161c4124e4368cb3d6bc71",
"EsteriaVenthyr.bin": "5bcf7804363e59b3c922830d06de17bbd348b9967307f39b7d72bc09f58814eb",
"EsteriaVenthyrTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaVorkai.bin": "d6d2088c7e867b5db437e9afc2d323c22d830c6f84a3598415eedcaa27e2461f",
"EsteriaVorkaiTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaVrykul.bin": "39e2b7b4c67997dbbd34bae840bd606a59290f7f2fc82565a0ba00090335415c",
"EsteriaVrykulTextures.bin": "46098750a0e235724c6e9cc8d9d4e26550aa47bef95fd5f0f82efe5e945bf296",
"EsteriaVulpera.bin": "c5434993b9af4a17d881965e4735cd2ac379e39c7142aac9844adff9528562d4",
"EsteriaVulperaTextures.bin": "1ab844e74684aced2b069f1b91cd563aade45e05bd5e23f866a6c0c301cb098e",
"Interface/AddOns/CoAHideArmor/CoAHideArmor.lua": "8c1c7403524fc9bd56c0809b4101b141da700ba163701209bf1420f2ef106aa7",
"Interface/AddOns/CoAHideArmor/CoAHideArmor.toc": "123580d92fd5ceee258e96296f42c359b7e83cdff151af49c50c6c4e2059677c",
"Interface/AddOns/CoAQuestSafe/CoAQuestSafe.lua": "062de55c91228971553f482fd2c8753f4752993b4e8e49d4ded04fa18b98bde7",
"Interface/AddOns/CoAQuestSafe/CoAQuestSafe.toc": "890bb9d1087e236f4823603f5df3ab0e316dbb65c28feebbda08fb0ab53a408f",
"Interface/AddOns/CoAWC2Cursor/CoAWC2Cursor.lua": "1cf9537ff5f10b77250fea4407aea1008da690afe102ed6ed2dac21f79638cfa",
"Interface/AddOns/CoAWC2Cursor/CoAWC2Cursor.toc": "48ce695dce712b3643ebe13a77e318d623c964acc69479b8fc8cc675099801bf",
"Interface/AddOns/CoA_TalentReset/CoA_TalentReset.lua": "827d756d5948ef918fafaf8b869290b3a1faa4e4cc21b19b512a00d4509f3d41",
"Interface/AddOns/CoA_TalentReset/CoA_TalentReset.toc": "16298c04af68e68d6445e7a11f42aee525dd4145f85d2771ff434fb7c6e95a85",
"dinput8.dll": "f8de78606c241fb3911dce22faf68f5b9f9885b142b183c1e2c09ddc8f7e380c",
"wc2_human.cur": "f609736e29596bb386ef1597b157d211e01a86d32c2a929e256c581c37d71791",
"wc2_orc.cur": "baa512c9b9045762ba35b6e0d35b8f79c54b7649f35cc9c0e0cc8c168a1e5a97"
}