-
-
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
Add release static builds for Linux (and macOS?) #5515
Conversation
For macos , macos-latest runner is arch arm64 only. |
@rom1v I can also confirm the build you attached works in Linux amd64:
|
Could you also please test with |
What other runner should we use to build a version for older macos? |
In Linux amd64,
|
🤦 Thank you, I fixed locally in |
@rom1v Worked as is! Similarly, I needed to change the script.
|
For the linux static build, I get this warning:
I think this is ok (it just requires udev to be installed at runtime). |
@rom1v What I'm not sure is that when it says |
Just
|
@rom1v This is what I see in macOS with the current
Given Homebrew reports those as system libraries, I think we're OK, this is probably as static as it gets. |
I updated the PR. Please test the following binaries generated by GitHub Actions:
|
macOS didn't run at first, asking it to be explicitly allowed in the settings, which I did, then it worked with following logs:
|
OK, it's probably a security on macOS when running a downloaded binary? Do you know why these logs:
? Do you have them if you build scrcpy yourself (dynamically)? |
This is what I see on Linux amd64:
Note that in the first archive you provided in PR description, I was seeing NVIDIA:
I haven't built scrcpy myself dynamically |
Fixed by: diff --git app/data/scrcpy_static_wrapper.sh app/data/scrcpy_static_wrapper.sh
index 4dcce9a72..56243471f 100755
--- app/data/scrcpy_static_wrapper.sh
+++ app/data/scrcpy_static_wrapper.sh
@@ -2,5 +2,5 @@
cd "$(dirname ${BASH_SOURCE[0]})"
export ADB=./adb
export SCRCPY_SERVER_PATH=./scrcpy-server
-export ICON=./icon.png
+export SCRCPY_ICON_PATH=./icon.png
./scrcpy_bin "$@" |
@rom1v I'm seeing those log lines even when I use |
In the initial version, in the build-linux job, I used:
Now, I use:
(I added I think I will revert that change, many feature will be missing I guess when building without the SDL and FFmpeg dependencies. |
Only for official releases. |
Are you planning on adding linux-arm64 and darwin-amd64 architectures as well potentially via cross-compilation? |
It would be great. However, I won't work on it soon, my goal for now is just to have at least "experimental" static linux and macos releases for "the general use case" before publishing scrcpy 3.0 (with virtual displays and opengl filters). |
Here are new binaries, with the known problems fixed:
Please test 🙂 |
Provide a prebuilt binary for macOS. PR Genymobile#5515 <Genymobile#5515> Co-authored-by: Muvaffak Onus <me@muvaf.com>
Build the server without gradle to make sure that the script works. PR Genymobile#5515 <Genymobile#5515>
Since commit 2687d20, the Makefile named release.mk stopped handling dependencies between recipes, because they have to be executed separately (from different Github Actions jobs). Using a Makefile no longer provides any real benefit. Replace it by several individual release scripts for simplicity and readability. Refs #5306 <#5306> PR #5515 <#5515>
The upload-artifact action does not preserve file permissions: <https://github.com/actions/upload-artifact?#permission-loss> Even if it is not critical for Windows releases, it will be for other platforms. Wrap everything in a tarball to keep original permissions. PR #5515 <#5515>
@rom1v I have used macos-13 here Genxster1998@db01900 |
@Genxster1998 Could you please re-implement this on top of current |
@rom1v FYI, I tested released tarballs in both Linux amd64 and macOS arm64 and they both worked just as expected. Thank you for getting the scripts to the finish line so that we get the static builds so soon! |
@rom1v I don't have much idea about cross compiling with universal binary as target. It would just need separate build config for Intel and arm64. And ofcourse renaming release because current macos release in not universal. |
I can confirm your latest Intel binary from Actions build-macos-x86_64-intermediate also running just fine in the latest macOS Monterey 12.7.6 |
@LeeBinder 👍 I am encountering you a lot , in hacintosh repos , sometime in kernelsu or zygisk stuffs.lol 🤣 😜 |
..maybe I'm your cyberspace twin brother 🤣 😜 |
@LeeBinder Can you see if https://github.com/Genxster1998/scrcpy/actions/runs/12015099730 works without a local wrapper script , just icon.png and scrcpy-server in same dir and adb installed. |
YES, you DID it! Executing scrcpy_bin has the desired result, with the icon in the dock - respect! BTW, in the info for scrcpy_bin it says "requires macOS 13", but it runs fine even in macOS 12 Monterey (maybe even below). |
Please test #5644 release builds with |
This is the continuation of my work on #5306.
This PR make it possible to build a static release for Linux (x86_64).
For that purpose:
release.mk
is replaced by individual release scriptsPlease test the binaries generated by GitHub Actions: #5515 (comment)
old
Here is a Linux binary (x86_64) built by GitHub Actions:scrcpy-linux-ga.tar.gz
SHA-256: f29f4e915f02c77ab3be4b00aaf218a359248463cc2e423c8ee692621041b62
Now, I want to do the same for macOS, but I have no mac. So I started a skeleton (the last commit of this PR), I need your help to complete it and make it work. You can read the commit which adds the static build for Linux as a base.
Thank you!