-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
OK, I gave up on scrcpy. Not computer illiterate but was expected easier install on Mac. #2256
Comments
were you able to fix it ? |
Unfortunately not and I am still waiting on instructions on how to get rid of the software. I don't know what to do at this point. |
Probably related: #2059 In particular: #2059 (comment)
|
As an alternative to Homebrew, you could try MacPorts on macOS (I don't know, I have no macOS). |
Well, I looked at MacPorts but it seems to me it's the page doesn't seem to be safe for toddlers. I need the instructions to be for a 5-years old. It's Babylon language for me as far as this is concerned. People mention the issue starting after 1.6_2? What are your thoughts if I try same steps but I try install 1.6_2 version. Can I do that somehow? But first I guess I need to clean the mess on my machine. I have CLT, Homebrew and scrcpy installed. So I guess I need to start removing scrcpy but I don't know how, what and where. I don't want to start deleting the stuff in home directory as I said I it's not like regular apps so stuff seems to be spread around like birds feed. |
Hi there 👋, I'm a project member over at MacPorts. We have a port for scrcpy maintained by @MarcelBochtler that sorts out the adb tools for you.
The views expressed here are solely my own. I agree that things can certainly be improved, and we've been doing a lot of work recently to do so (see. the desolate condition thread on our mailing lists). Any suggestions you might have are warmly welcomed. Just to help you get started, you can download MacPorts from here. Restart the terminal and then run the command I mentioned above to install scrcpy.
We provide ffmpeg binaries all the way from 11 arm 64 to 10.5 ppc, and we take support of older hardware very seriously. We've had some issues building scrcpy pre-10.11 which we'll need to deal with, but we currrently provide pre-built binaries that work out the box for 10.12 upwards which should be fine for you @itoldusoandso. If you have any questions, feel free to ask. Thanks @rom1v for maintaining this amazing project. |
harens, thank you. So I found here is info on uninstall brew and scrcpy package. https://github.com/homebrew/install#uninstall-homebrew https://osxdaily.com/2018/07/29/uninstall-packages-homebrew-mac/ Just staying in the crib and crying will not get me anywhere. I decided to mess with this stuff on my machine so I got to go with it. Once thats done I'll follow the MacPorts instructions. |
Okay back here after a while. Uninstalled and cleaned Brew directories. Installed MacPorts. So off to their forum to find out what is the matter. Followed exactly what it says here: https://ports.macports.org/port/scrcpy/ bash-3.2$ sudo port install scrcpy Should I ask there or is it question for scrcpy? |
@itoldusoandso Usually, right after running the MacPorts installer, it downloads a copy of the Portfiles that are required so that Try running After that, |
Thank you. I noticed following messages in the results: Total number of ports parsed: 30067 When it was downloading the packages, there were a couple of lines with a message... ---> "Computing dependencies for scrcpy Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option" Error: No Xcode installation was found. Error: Port gd2 requires a full Xcode installation, which was not found on your system. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. ---> Some of the ports you installed have notes:
======= When I try to run scrcpy I get following: scrcpy: command not found ========================= From what I see is it tells me I need to install full Xcode? Not enough to install Command Line Tools? Is Xcode still required after Scrcpy is installed? |
Xcode will not be required after scrcpy is installed. I am, however, a bit confused by the message you're getting, since gd2 (the port that failed to build) definitely builds without Xcode and only needs the Command Line Tools. Make sure xcode-select -print-path prints /Library/Developer/CommandLineTools. If it doesn't, try |
Isn't there a version of homebrew/macports/other package manager on MacOS which distributes binary packages, so that users don't have to build on install? |
There is, and MacPorts has precompiled binaries for scrcpy: https://packages.macports.org/scrcpy/ Those may or may not be used depending on the user's setup, e.g., installations in locations other than /opt/local will not use binaries, or systems older than macOS 10.12 (where scrcpy doesn't build according to https://ports.macports.org/port/scrcpy/details/ because it doesn't have |
The MacPorts precompiled scrcpy binaries are pretty much useless for the average user because they do require all the dependencies, too!! scrcpy simply does require tons of dependencies to run in macOS at this point. scrcpy via MacPorts via (in the Terminal app) I can share a comparison tomorrow. |
I can't report anything new here, so just for the records: macOS Catalina with Xcode Command Line Tools (2,53 GB), homebrew as non-shallow clone (1.45 GB), adb Platform Tools (33 MB) + a few dependencies scrcpy also uses already pre-installed, because for me these are standard/ default tools I use all the time, already pre-scrcpy. Right after running click to expand$ brew deps scrcpy
aom
bdw-gc
brotli
ca-certificates
cairo
cjson
cmocka
dav1d
ffmpeg
flac
fontconfig
freetype
frei0r
fribidi
gdbm
gettext
giflib
glib
gmp
gnutls
gobject-introspection
graphite2
guile
harfbuzz
icu4c
imath
jpeg
jpeg-xl
lame
leptonica
libarchive
libass
libb2
libbluray
libevent
libffi
libidn2
libnghttp2
libogg
libpng
libpthread-stubs
librist
libsamplerate
libsndfile
libsodium
libsoxr
libtasn1
libtiff
libtool
libunistring
libusb
libvidstab
libvmaf
libvorbis
libvpx
libx11
libxau
libxcb
libxdmcp
libxext
libxrender
little-cms2
lz4
lzo
m4
mbedtls
mpdecimal
nettle
opencore-amr
openexr
openjpeg
openssl@1.1
opus
p11-kit
pcre
pixman
pkg-config
python@3.9
rav1e
readline
rubberband
sdl2
snappy
speex
sqlite
srt
tesseract
theora
unbound
webp
x264
x265
xorgproto
xvid
xz
zeromq
zimg
zstd
$ brew deps scrcpy | wc -l
98
click to expandandroid-platform-tools
aom
autoconf
autoconf-archive
automake
brotli
cairo
curl-ca-bundle
dav1d
db48
ffmpeg
fontconfig
freetype
fribidi
gd2
gdbm
gdk-pixbuf2
gettext
gettext-tools-libs
giflib
glib2
gmp
gnutls
gobject-introspection
graphite2
graphviz
gts
harfbuzz
icu
jbigkit
lame
lcms2
lerc
libLASi
libass
libbluray
libde265
libheif
libidn2
libjpeg-turbo
libmodplug
libnetpbm
libogg
libopus
libpixman
libpng
librsvg
libsdl2
libtasn1
libtextstyle
libtheora
libtool
libunistring
libvorbis
libvpx
libxml2
libxslt
lz4
m4
nettle
openjpeg
ossp-uuid
p11-kit
pango
pcre
perl5.28
pkgconfig
py310-mako
py310-markdown
py310-markupsafe
py310-setuptools
python310
python3_select
rav1e
readline
shared-mime-info
soxr
speex
tiff
urw-fonts
vala
webp
x264
x265
xorg-libX11
xorg-libXau
xorg-libXaw
xorg-libXdmcp
xorg-libXext
xorg-libXmu
xorg-libXt
xorg-libice
xorg-libpthread-stubs
xorg-libsm
xorg-libxcb
xorg-xcb-proto
xorg-xcb-util
xorg-xorgproto
xpm
xrender
zimg
zstd
zvbi
Xft2
XviD so I didn't even bother (MacPorts also lists the modules which I have already installed in brew which it doesn't see, therefore the diff in # of dependencies). Sizes and numbers for 11.x Big Sur and 12.x Monterey will differ somewhat. Again, this is not Romain's @rom1v fault because he currently doesn't have macOS at his fingertips, like he stated before. Therefore any package manager will simply follow its guidelines for installing. No matter what, it's only a question of time that a nicely small stand-alone package for macOS can be created, one way or the other 👍 💯 Because looking at the Windows version, it's only a tiny number of required runtime libraries: |
You'll see that a lot of them are required by librsvg, which is a dependency of ffmpeg. Assuming scrcpy does not need SVG support in ffmpeg, one could build a copy of ffmpeg that does not use librsvg using the However, it isn't MacPorts (or Homebrew's) goal to provide a specific version of ffmpeg that works for scrcpy – both are general purpose package managers that will provide a reasonable configuration of ffmpeg when its installation is requested, and that includes librsvg and its dependencies.
Yes. These precompiled binaries are not meant to be used outside of MacPorts, which will ensure that the required dependencies are also available. They simply save compilation time. I'm not intimately familiar with Homebrew's "bottles" concept, but I think they have the same approach. What those binaries give you is avoiding local compilation, though. For example, there's no need to install & compile rust, because MacPorts has a precompiled copy of librsvg available: https://ports.macports.org/port/librsvg/details/.
You can do this using dylibbundler from the MacPorts scrcpy package:
You'd probably also have to ship a copy of Such a package will also be quite large, though:
Additionally, you'd have to comply with the licenses of all bundled binaries when re-distributing, which is also why I will not provide the one I just built anywhere. |
very nice, great info - thanks for sharing it all. So your self-compiled 103 MB package of scrcpy contains all required dependencies and is working fine for you even after removing scrcpy with all its dependencies via both, MacPorts and homebrew = is true stand-alone? |
I don't have a phone available at the machine I'm currently at, so I didn't actually test the functionality. It does start successfully (and then fails to find a phone), though. I had the MacPorts |
great, thank you, neverpanic! Installing scrcpy via MacPorts right now, then will execute your script. Will leave the house now so it'll be a while before I report back if all went well. |
one more install command was necessary here for me so
full report follows later |
The scrcpy binary links against libusb, so it should be available at runtime: | $> otool -L /opt/local/bin/scrcpy | grep libusb | /opt/local/lib/libusb-1.0.0.dylib (compatibility version 4.0.0, current version 4.0.0) | $> port provides /opt/local/lib/libusb-1.0.0.dylib | /opt/local/lib/libusb-1.0.0.dylib is provided by: libusb See Genymobile/scrcpy#2256 (comment).
The scrcpy binary links against libusb, so it should be available at runtime: | $> otool -L /opt/local/bin/scrcpy | grep libusb | /opt/local/lib/libusb-1.0.0.dylib (compatibility version 4.0.0, current version 4.0.0) | $> port provides /opt/local/lib/libusb-1.0.0.dylib | /opt/local/lib/libusb-1.0.0.dylib is provided by: libusb See Genymobile/scrcpy#2256 (comment).
Trying to compile v.2.3 via the script above, adapted to use @dur-randir @Coool Do you have any idea how to get beyond these errors during compilation? Maybe something from system-specific steps that needs to be incorporated?
|
diff --git a/app/src/cli.c b/app/src/cli.c
index f57b75efc..fd4525f55 100644
--- a/app/src/cli.c
+++ b/app/src/cli.c
@@ -2154,7 +2154,7 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
return false;
}
break;
- case OPT_ORIENTATION:
+ case OPT_ORIENTATION: {
enum sc_orientation orientation;
if (!parse_orientation(optarg, &orientation)) {
return false;
@@ -2162,6 +2162,7 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
opts->display_orientation = orientation;
opts->record_orientation = orientation;
break;
+ }
case OPT_RENDER_DRIVER:
opts->render_driver = optarg;
break; Does it fix the problem? If yes, I will push it to (On Linux, both with gcc and clang, this is just a warning with |
Fix the following warning/error: ../app/src/cli.c:2158:17: warning: a label can only be part of a statement and a declaration is not a statement [-Wpedantic] With some compilers, this is an error rather than a pedantic warning. Refs <#2256 (comment)>
@rom1v Adapted
Result:
Would maybe fixing
need to be tackled first? |
Please test the current |
|
|
neither
nor
work. Can you please share the complete command which command works for you? |
Or since you re-clone the repo, directly specify the branch:
|
Fabulous: scrcpy 2.3 RUNNING in macOS - thank you Romain🥇 So you can push that commit to master 👍 What am I missing w/o:
Should these be included, and if yes, how would the macOS (Intel) compilation script need to be updated? |
That's expected, this is not an error. On platforms where the symbol is not available, scrcpy automatically does differently. |
Oops, I put the wrong comment link in the fix: 4135c41. It should have been: #2256 (comment) rather than #2256 (comment). Too late, it's on |
apply patch from master branch referenced in Genymobile/scrcpy#2256 (comment)
apply patch from master branch referenced in Genymobile/scrcpy#2256 (comment)
You might be interested in #4713, which builds all the dependencies for Windows (32 and 64 bit). It probably does not require a lot of changes to make it work for macOS. |
@rom1v thank you for the new 2.4 with so many new awesome features 👍 In macOS, should I also compile with:
and Python: change from 3.11 to 3.12, or that doesn't matter? |
Why do you need python? |
Python: as per dur-randir original compile script for macOS. So what about the other two dependencies. v.2.4 compiled fine in macOS Monterey with FFmpeg 6.0 and libusb 1.0, and runs. Haven't had any time yet though to test functions. I'll run the build script again w/o Python and with FFmpeg 6.1.1 + libusb 1.0.27 in macOS Sonoma when I'm back and have time again (unless you advise to stick to the older v.1.0 binaries for macOS). |
"I" don't, but meson (which this MacPorts-based install script uses) does :):
-> stand-alone native Mac (Intel) APP at the bottom of this comment of mine 😉 |
so is there any mac arm binary available for downloading from somwehere? |
[...]
thank you! seems to work using rosetta |
Please check #5306, and maybe try to add a job for macOS (I think only few changes are to be made to |
ok i dont understand whats happening here.... 🍺 /usr/local/Cellar/libgit2/1.8.1: 106 files, 4.6MB, built in 54 seconds |
Followed MacOS guide, doesn't work.
|
You're supposed to read the text in between the commands, too. There it says:
I.e., you use either brew or MacPorts, not both. |
based on Genxster1998's build, see here. |
MacOS 10.13
Have done as instructed.. CLT, Homebrew and scrcpy. The install process was sluggish, took 16 hours and decided to post on XDA to check sanity of what I am doing.
Sorry guys, this just didn't work out for me. Total fail ;(
Now two more hours later, the install process stayed hanging and still showing "make"... So now after 18 hours I am pulling the plug want to quit. I want to delete scrcpy and put my machine back where it was before start. However, it gives me error when I type in the command:
bash-3.2$ brew uninstall scrcpy
Error: No available formula or cask with the name "scrcpy".
bash-3.2$
So what do I do now.
See link to XDA post with picture. I don't see how to attach picture here.
https://forum.xda-developers.com/t/installing-scrcpy-now-already-more-than-16-hours-comman-line-tools-homebrew-is-this-normal.4262295/
The text was updated successfully, but these errors were encountered: