fix(macos): statically link liblzma so the app launches (#56)
vtkio (via truck-meshalgo → xz2 → lzma-sys) linked the system liblzma dynamically, baking a Homebrew path (/opt/homebrew/.../liblzma.5.dylib) into the macOS binary. The .app then crashed on launch on any Mac without that exact library. Enable lzma-sys's `static` feature so liblzma is compiled from the bundled source into the binary, making it self-contained on every platform (verified: no dynamic liblzma link). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
1b20d7d781
commit
e708f90517
2 changed files with 8 additions and 0 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
|
@ -23,6 +23,7 @@ dependencies = [
|
||||||
"iced",
|
"iced",
|
||||||
"image",
|
"image",
|
||||||
"inventory",
|
"inventory",
|
||||||
|
"lzma-sys",
|
||||||
"open",
|
"open",
|
||||||
"printpdf",
|
"printpdf",
|
||||||
"rayon",
|
"rayon",
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,13 @@ edition = "2021"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
# vtkio (pulled in transitively via truck-meshalgo) depends on xz2 → lzma-sys,
|
||||||
|
# which by default links the system liblzma dynamically. On macOS that bakes a
|
||||||
|
# Homebrew dylib path (/opt/homebrew/.../liblzma.5.dylib) into the binary, so
|
||||||
|
# the .app crashes on launch on machines without that exact library (#56).
|
||||||
|
# Forcing the `static` feature builds liblzma from the bundled source, making
|
||||||
|
# the binary self-contained on every platform.
|
||||||
|
lzma-sys = { version = "0.1", features = ["static"] }
|
||||||
iced = { version = "0.14", features = ["debug", "image", "svg", "advanced", "canvas", "smol"] }
|
iced = { version = "0.14", features = ["debug", "image", "svg", "advanced", "canvas", "smol"] }
|
||||||
bytemuck = { version = "1.25", features = ["derive"] }
|
bytemuck = { version = "1.25", features = ["derive"] }
|
||||||
glam = { version = "0.33", features = ["bytemuck"] }
|
glam = { version = "0.33", features = ["bytemuck"] }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue