Skip to content

fix: hide Windows TeXLive compiler console windows - #117

Merged
delibae merged 1 commit into
delibae:mainfrom
WhiskyChoy:fix/windows-texlive-console-window
Apr 1, 2026
Merged

delibae merged 1 commit into
delibae:mainfrom
WhiskyChoy:fix/windows-texlive-console-window

Conversation

@WhiskyChoy

@WhiskyChoy WhiskyChoy commented Apr 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • hide TeXLive and Tectonic child process console windows on Windows by applying CREATE_NO_WINDOW
  • cover the TeXLive subprocess chain used by xelatex/pdflatex, biber/bibtex, xdvipdfmx, version detection, and the isolated Tectonic subprocess
  • use the correct PATH separator on Windows when prepending the TeXLive bin directory

Why

On Windows, compiling with the TeXLive backend spawned visible console windows during each compile, while macOS stayed windowless. The Rust desktop app already suppresses console windows for other Windows child processes like Claude CLI and uv; this aligns the LaTeX compiler path with that behavior.

Validation

  • cargo check
  • cargo test
  • pnpm --filter @claude-prism/desktop test
  • pnpm --filter @claude-prism/desktop build
  • manual verification on Windows: TeXLive compilation no longer flashes a console window and PDF compilation still succeeds

Copilot AI review requested due to automatic review settings April 1, 2026 04:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Windows TeXLive/Tectonic compilation flow in the Tauri desktop app to avoid flashing console windows by applying the Windows CREATE_NO_WINDOW process creation flag, and fixes PATH prepending to use the correct Windows separator.

Changes:

  • Apply CREATE_NO_WINDOW to TeXLive/Tectonic-related child processes on Windows (engine passes, biber/bibtex, xdvipdfmx, version detection, and the isolated Tectonic subprocess).
  • Fix TeXLive PATH prepending on Windows to use ; instead of :.
  • Refactor several Command::new(...).args(...).output() call sites into a mut cmd pattern to allow Windows-only creation_flags(...).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/desktop/src-tauri/src/latex.rs
Comment thread apps/desktop/src-tauri/src/latex.rs
@delibae
delibae merged commit 9b6a662 into delibae:main Apr 1, 2026
4 of 5 checks passed
@WhiskyChoy

Copy link
Copy Markdown
Contributor Author

The only failed check appears to be Copilot's artifact cleanup step (403 Resource not accessible by integration) during post-run cleanup. The actual review/upload steps passed, so this looks unrelated to the code change itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants