mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 04:37:22 -05:00
launch anki embeddedly(?), fallback to usual launch
This commit is contained in:
parent
e31c8b4586
commit
c22e38f4a8
1 changed files with 6 additions and 3 deletions
|
|
@ -28,6 +28,7 @@ use crate::platform::get_exe_and_resources_dirs;
|
|||
use crate::platform::get_uv_binary_name;
|
||||
use crate::platform::launch_anki_normally;
|
||||
use crate::platform::respawn_launcher;
|
||||
use crate::platform::run_anki_normally;
|
||||
|
||||
mod platform;
|
||||
|
||||
|
|
@ -158,9 +159,11 @@ fn run() -> Result<()> {
|
|||
|
||||
if !launcher_requested && !pyproject_has_changed && !different_launcher {
|
||||
// If no launcher request and venv is already up to date, launch Anki normally
|
||||
let args: Vec<String> = std::env::args().skip(1).collect();
|
||||
let cmd = build_python_command(&state, &args)?;
|
||||
launch_anki_normally(cmd)?;
|
||||
if std::env::var("ANKI_LAUNCHER_NO_EMBED").is_ok() || !run_anki_normally(&state) {
|
||||
let args: Vec<String> = std::env::args().skip(1).collect();
|
||||
let cmd = build_python_command(&state, &args)?;
|
||||
launch_anki_normally(cmd)?;
|
||||
}
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue