-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please provide OS X binaries #1733
Comments
It would be great if there was an option to build scrcpy statically (with relevant parts of ffmpeg and sdl included). (#1624) This would be easier to distribute a binary for other platforms. |
Anybody working on this issue? Really need it. |
I wanna work it out, but I'm not familar with the build system. how to prepare the dependencies(ffmpeg). would this be helpful? https://gitlab.freedesktop.org/gstreamer/gst-build/-/blob/master/subprojects/FFmpeg.wrap This way pkg_config knows where to find libavcodec/libavformat/.etc when building scrcpy. would that work? @rom1v |
I am not familiar with macOS but will this work https://formulae.brew.sh/formula/ffmpeg? |
@Biswa96 In this way ffmpeg linked as shared library. But here we need a static version of libavformat/libavcodec instead of dylibs. And some related header files are also necessary, with which we can declare dependencies. |
+1 , its really ridicules to install 1GB+ source setup and other system overheads to use scrcpy on MacOS using brew . I don't know how it got popular even though it pulls Gigabytes to just update its database . |
https://github.com/Genymobile/scrcpy#macos |
On macports , macports default base installation size. is 500MB.
It essentially pulled whole linux distro ,lmao around 2.05GB just installing scrcpy nothing else.
|
Could scrcpy be build with static libavcodec, libavutil, libavformat, libsdl2 and relevent headers ? |
scrcpy for macOS |
@Coool just in case the news didn't reach you: scrcpy v.1.2.5 is out 🥇 |
@LeeBinder I know. Can't keep up with all crap. Build scrcpy v1.25 release. Is it working? |
Great. We're here for fun not on the run .. ;) YES, working fine in Catalina, WELL DONE @Coool ! (can test in Ventura in a few days.) Now most libs are compiled right into the binary, just leaving libSDL2-2.0.0 and libusb-1.0.0 as external dylibs. From what I know that usually indicates speed increase. |
I will try statically integrate other two, too. But still in progress to figure out. |
@Coool just for the sake of knowing: did you also use MacPorts in any way during the process of building/ compiling your fork? |
@LeeBinder, No. Build all dependencies from original sources at compile time. |
Gotcha. Have you tried compiling v.2.0 yet? Would like to compare differences with my MacPorts build. |
@LeeBinder, scrcpy v2.0 for macOS. P.S. |
Great, thank you @Coool . Less than 9MB compressed, that's impressive. It might be until Sunday nite that I can test in Ventura, Monterey and Big Sur and will let you know then 👍 |
@LeeBinder, what your opinion do I need to create new issue suggestion which configure parameters to use for ffmpeg, SDL2 and libusb to optimize binary size? So we can squeeze more 👍. |
You can use the same as the ones used for the Windows release: https://github.com/rom1v/scrcpy-deps/ |
@rom1v, are those parameters minimal required to scrcpy functional or we can disable some more not needed libraries function to squeeze as much as we can? P.S. |
It is the very minimal FFmpeg configuration with only the features used by scrcpy. The total size of the resulting dlls for Windows is 4.7Mb. |
Why do you need on Windows?
|
Without it, it fails at runtime with missing dll |
@rom1v, check out scrcpy FFmpeg build script for macOS. P.S.
|
@Coool your build (even though compiled in the old macOS High Sierra) runs fine all the way up to the latest Ventura 13.3.1 (also tested in Monterey, Big Sur and Catalina). Apparently your FFmpeg build parameters are fine for macOS. One suggestion regarding the path to scrcpy-server: can you make it relative rather than static to Also, in a second step, if you can assign a relative path in a way that the scrcpy binary looks for scrcpy-server in In case you're curious about that, I've attached an app template zip for that purpose :) |
@Coool we need you help , come on |
@hellokuan how do people usually react when someone is being pushy on them? Right, they most likely retract.. Also it's highly unlikely that it's possible to compile for Apple Silicon in the old macOS High Sierra. Anyway, look here. |
@hellokuan, based on Stack Overflow article, you need at least Xcode version 12.2. Is it true, I don't know. Until you don't test yourself, don't trust anything what published on web. I'm using Xcode Version 10.1 (10B61) which is latest supported on macOS 10.13.6+ (High Sierra). I will check if it is feasible. |
Static genuine/ original build by Romain now also for new Macs with Apple Silicon AArch64 (M*) chip, with builds for Intel Macs still in the works here. Latest v.3.0 as of today Su. Nov. 23, 2024 at https://github.com/Genymobile/scrcpy/releases/tag/v3.0 |
Not everyone with OS X can run homebrew. For example, enterprise management software may block homebrew.
The text was updated successfully, but these errors were encountered: