lan-mouse icon indicating copy to clipboard operation
lan-mouse copied to clipboard

Include libadwaita and other dependencies in the app bundle on macOS

Open mrled opened this issue 10 months ago • 7 comments

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.

mrled avatar Feb 26 '25 21:02 mrled

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?

mrled avatar Feb 27 '25 15:02 mrled

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

feschber avatar Feb 27 '25 15:02 feschber

You can rebase now ;)

feschber avatar Feb 27 '25 16:02 feschber

There we go, it's passing now

mrled avatar Feb 27 '25 17:02 mrled

Whats your status on this PR?

feschber avatar Mar 19 '25 12:03 feschber

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.

mrled avatar Mar 20 '25 12:03 mrled

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.

feschber avatar Mar 20 '25 15:03 feschber

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!

apoorvkh avatar Sep 20 '25 01:09 apoorvkh

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)

apoorvkh avatar Sep 20 '25 01:09 apoorvkh

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 avatar Sep 20 '25 18:09 apoorvkh

@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!

feschber avatar Oct 14 '25 10:10 feschber

@mrled Thank you for the update! And sorry it took this long ...

feschber avatar Oct 14 '25 11:10 feschber