Compiling Anki on Windows environment?

No matter what I try to do, I’m stuck on compiling Anki. Specifically on this stage

FAILED: out/qt/_aqt/data/qt/icons/anki.png out/qt/_aqt/data/qt/icons/card-state.svg out/qt/_aqt/data/qt/icons/clock.svg out/qt/_aqt/data/qt/icons/collection.svg out/qt/_aqt/data/qt/icons/deck.svg out/qt/_aqt/data/qt/icons/heart.svg out/qt/_aqt/data/qt/icons/media-record.png out/qt/_aqt/data/qt/icons/notetype.svg out/qt/_aqt/data/qt/icons/tag.svg
out/rust/release/runner.exe run cp -fr qt\aqt\data\qt\icons\anki.png qt\aqt\data\qt\icons\card-state.svg qt\aqt\data\qt\icons\clock.svg qt\aqt\data\qt\icons\collection.svg qt\aqt\data\qt\icons\deck.svg qt\aqt\data\qt\icons\heart.svg qt\aqt\data\qt\icons\media-record.png qt\aqt\data\qt\icons\notetype.svg qt\aqt\data\qt\icons\tag.svg out/qt/_aqt/data/qt/icons
Failed to execute: cp -fr qt\aqt\data\qt\icons\anki.png qt\aqt\data\qt\icons\card-state.svg qt\aqt\data\qt\icons\clock.svg qt\aqt\data\qt\icons\collection.svg qt\aqt\data\qt\icons\deck.svg qt\aqt\data\qt\icons\heart.svg qt\aqt\data\qt\icons\media-record.png qt\aqt\data\qt\icons\notetype.svg qt\aqt\data\qt\icons\tag.svg out/qt/_aqt/data/qt/icons
[2/52; 9 active; 0.447s] ts:generated:src
FAILED: out/ts/lib/generated/ftl-helpers.ts out/ts/lib/generated/post.ts
out/rust/release/runner.exe run cp -fr ts\lib\generated\ftl-helpers.ts ts\lib\generated\post.ts out/ts/lib/generated
Failed to execute: cp -fr ts\lib\generated\ftl-helpers.ts ts\lib\generated\post.ts out/ts/lib/generated
[3/52; 8 active; 0.450s] qt:aqt:py.typed
FAILED: out/qt/_aqt/py.typed

Basically this is because windows doesn’t have cp command. (on cmd.exe) So build/runner.exe fails.

Related source code: anki/build/runner/src/run.rs at 59969f62f57e10918b0a864d7da3a2cdc0bc6775 · ankitects/anki · GitHub
Reference: Command in std::process - Rust

Is this a known issue? Is there a workaround?

Thanks.

Maybe

3 Likes