mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Add support for custom launcher venv locations
Closes #4305 when https://github.com/ankitects/anki-manual/pull/444 is merged, and makes it easier to maintain multiple Anki versions at once.
This commit is contained in:
parent
db1d04f622
commit
6a985c9fb0
1 changed files with 7 additions and 3 deletions
|
@ -88,9 +88,13 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run() -> Result<()> {
|
fn run() -> Result<()> {
|
||||||
let uv_install_root = dirs::data_local_dir()
|
let uv_install_root = if let Ok(custom_root) = std::env::var("ANKI_LAUNCHER_VENV_ROOT") {
|
||||||
.context("Unable to determine data_dir")?
|
std::path::PathBuf::from(custom_root)
|
||||||
.join("AnkiProgramFiles");
|
} else {
|
||||||
|
dirs::data_local_dir()
|
||||||
|
.context("Unable to determine data_dir")?
|
||||||
|
.join("AnkiProgramFiles")
|
||||||
|
};
|
||||||
|
|
||||||
let (exe_dir, resources_dir) = get_exe_and_resources_dirs()?;
|
let (exe_dir, resources_dir) = get_exe_and_resources_dirs()?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue