Build a standalone Windows desktop with opt-in project removal

This commit is contained in:
gloamxun committed 2026-12-02 18:20:38 +08:00
1 parent 2c5b9b5f10
commit 2c99cade7d
24 files changed
+1404 -168

No files matched your search

+12 -1
View File
@@ -16,6 +16,8 @@ use texrra_engine::native::{CompileRequest, GeneratedArtifacts, ProjectSnapshot}
use texrra_tex_core::resources::ResourceVersion;
mod cache;
#[cfg(windows)]
mod windows;
const MAX_AUX_BYTES: u64 = 2 * 1024 * 1024;
const MAX_INPUT_BYTES: u64 = 32 * 1024 * 1024;
@@ -381,6 +383,10 @@ fn find_style(scratch: &Path, style: &Path, roots: &[PathBuf]) -> Result<Arc<[u8
style.display()
));
}
#[cfg(windows)]
if windows::bundled_directory().is_some() {
return windows::find_style(style, roots);
}
let result = private_environment(&mut Command::new("kpsewhich"), scratch)
.arg("--format=bst")
.arg(style)
@@ -438,7 +444,12 @@ fn run_bibtex(scratch: &Path) -> Result<(Vec<u8>, bool), String> {
};
#[cfg(not(target_os = "linux"))]
let mut command = Command::new("bibtex");
let mut child = private_environment(&mut command, scratch)
private_environment(&mut command, scratch);
#[cfg(windows)]
if let Some(directory) = windows::bundled_directory() {
command = windows::bundled_command(&directory, scratch)?;
}
let mut child = command
.env("BIBINPUTS", ".")
.env("BSTINPUTS", ".")
.arg(JOB)