Windows and Linux build environments; check clean on both (E-01)

MuPDF builds with MSBuild on Windows (/MT, OpenSSL from vcpkg);
Git for Windows' MinGit stands in for the source build there. CEF
loads from where libcef lives and sets its API version first on
every platform. File identity on Windows compares volume and index.
The checkout and reference/ keep LF on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-10 03:53:56 -04:00
1 parent d59159cea2
commit 68b5af76e0
40 files changed
+380 -82

No files matched your search

+3 -6
View File
@@ -203,12 +203,9 @@ pub fn same_file(a: &Path, b: &Path) -> io::Result<bool> {
if resolved(a)? == resolved(b)? {
return Ok(true);
}
#[cfg(unix)]
{
use std::os::unix::fs::MetadataExt;
if let (Ok(ma), Ok(mb)) = (std::fs::metadata(a), std::fs::metadata(b)) {
return Ok((ma.dev(), ma.ino()) == (mb.dev(), mb.ino()));
}
// A missing side is another file.
if let (Ok(Some(ia)), Ok(Some(ib))) = (crate::session::file_id(a), crate::session::file_id(b)) {
return Ok(ia == ib);
}
Ok(false)
}
+2 -2
View File
@@ -462,8 +462,8 @@ fn save_as_onto_its_own_file_checks_for_outside_changes() {
let alias = dir.path().join("alias.docx");
#[cfg(unix)]
std::os::unix::fs::symlink(&own, &alias).expect("the alias");
#[cfg(not(unix))]
let alias = own.clone();
#[cfg(windows)]
std::fs::hard_link(&own, &alias).expect("the alias");
assert!(matches!(
save_as(&mut session, &alias, b"local"),
Err(SaveError::Conflict)
+1
View File
@@ -386,6 +386,7 @@ impl Session {
}
mod registry;
pub(crate) use registry::file_id;
pub use registry::{Open, Sessions};
#[cfg(test)]
+3 -3
View File
@@ -33,14 +33,14 @@ struct Key {
}
#[cfg(unix)]
fn file_id(path: &Path) -> io::Result<Option<(u64, u64)>> {
pub(crate) fn file_id(path: &Path) -> io::Result<Option<(u64, u64)>> {
use std::os::unix::fs::MetadataExt;
let meta = std::fs::metadata(path)?;
Ok(Some((meta.dev(), meta.ino())))
}
#[cfg(windows)]
fn file_id(path: &Path) -> io::Result<Option<(u64, u64)>> {
pub(crate) fn file_id(path: &Path) -> io::Result<Option<(u64, u64)>> {
use std::os::windows::ffi::OsStrExt;
use windows_sys::Win32::Foundation::{CloseHandle, INVALID_HANDLE_VALUE};
use windows_sys::Win32::Storage::FileSystem::{
@@ -75,7 +75,7 @@ fn file_id(path: &Path) -> io::Result<Option<(u64, u64)>> {
}
#[cfg(not(any(unix, windows)))]
fn file_id(_: &Path) -> io::Result<Option<(u64, u64)>> {
pub(crate) fn file_id(_: &Path) -> io::Result<Option<(u64, u64)>> {
Ok(None)
}