Include libadwaita and other dependencies in the app bundle on macOS
Copy all the requisite homebrew libraries, including libadwaita, into the macOS bundle. This makes it a standalone app that can be executed directly on any system without installing Homebrew and libadwaita first. Also does away with the requirement that Homebrew is installed to the default location, which is otherwise required because the binary refers to dynamic libraries via their absolute paths.
Not sure what's up with that Linux failure, I didn't change any of the application code. Maybe it's using some newer version of Rust with more warnings enabled?
Not sure what's up with that Linux failure, I didn't change any of the application code. Maybe it's using some newer version of Rust with more warnings enabled?
It seems like there are some new clippy lints in the newest version. I will fix that real quick
You can rebase now ;)
There we go, it's passing now
Whats your status on this PR?
Just fixing a minor permissions thing and it's good to go if you want it :)
- Testing this on a fresh VM with no homebrew lets the app launch and work normally
- The permissions problem doesn't actually break anything, but it shows warnings when the quarantine is cleared with
xattr -rd. My most recent commit fixes this.
Awesome! I will see if I can setup a vm again to at least test it myself once. It's kind of a pain on non-macos.
Hey, I wanted to try out lan-mouse, but I don't have further need for Homebrew and so I don't want to install it on my system. I think having a standalone .app makes a lot of sense. It would be great if this can be tested/merged, thank you!
Note: I get the following build error when running the tagged release workflow from @mrled's branch.
Run cargo bundle --release
Compiling lan-mouse v0.10.0 (/Users/runner/work/lan-mouse/lan-mouse)
Finished `release` profile [optimized] target(s) in 1m 36s
Bundling Lan Mouse.app
Finished 1 bundle at:
/Users/runner/work/lan-mouse/lan-mouse/target/release/bundle/osx/Lan Mouse.app
error: /Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic: can't open file: target/debug/bundle/osx/Lan Mouse.app/Contents/MacOS/lan-mouse (No such file or directory)
Updating target/debug/bundle/osx/Lan Mouse.app/Contents/MacOS/lan-mouse to reference @rpath/...
error: /Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: target/debug/bundle/osx/Lan Mouse.app/Contents/MacOS/lan-mouse (No such file or directory)
I fixed it in https://github.com/mrled/lan-mouse/pull/1. I also bumped the macos build platform to macos-26, which I think is fine, but could be reverted if needed.
@apoorvkh I just cherry-picked this commit from your PR. I'm going to update the macos runner to macos-26 later on. Thank you!
@mrled Thank you for the update! And sorry it took this long ...