Skip to content
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

scrcpy 2.1.1 release source code install script is not completely up to date - still requesting server-2.1 and consequently fails #4191

Open
Alchemistapf opened this issue Jul 25, 2023 · 7 comments

Comments

@Alchemistapf
Copy link

Environment

  • OS: Debian 12 (but irrelevant)
  • scrcpy version: 2.1.1
  • installation method:source code / installation script
  • device model: N/A
  • Android version: N/A

Describe the bug
The latest released 2.1.1 installed via the downloaded source code is installing the 2.1 server and not the 2.1.1 due to the install_release.sh file being slightly out of date.
Manually replacing the downloaded install_release.sh with the live version from the master branch worked perfectly.

@Alchemistapf
Copy link
Author

Manually updating to the code below fixes the issue (the current install_release.sh at time of writing)

#!/usr/bin/env bash
set -e

BUILDDIR=build-auto
PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v2.1.1/scrcpy-server-v2.1.1
PREBUILT_SERVER_SHA256=9558db6c56743a1dc03b38f59801fb40e91cc891f8fc0c89e5b0b067761f148e

echo "[scrcpy] Downloading prebuilt server..."
wget "$PREBUILT_SERVER_URL" -O scrcpy-server
echo "[scrcpy] Verifying prebuilt server..."
echo "$PREBUILT_SERVER_SHA256 scrcpy-server" | sha256sum --check

echo "[scrcpy] Building client..."
rm -rf "$BUILDDIR"
meson setup "$BUILDDIR" --buildtype=release --strip -Db_lto=true
-Dprebuilt_server=scrcpy-server
cd "$BUILDDIR"
ninja

echo "[scrcpy] Installing (sudo)..."
sudo ninja install

@rom1v
Copy link
Collaborator

rom1v commented Jul 25, 2023

#4098 (comment)

@aluyama
Copy link

aluyama commented Jul 28, 2023

@Alchemistapf Do you know how to solve this problem? i think this is a small problem, so i don't try to ping rom1v
(https://github.com/Genymobile/scrcpy/blob/master/install_release.sh)

sudo sh install_release.sh
[scrcpy] Downloading prebuilt server...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 56995 (56K) [application/octet-stream]
Saving to: ‘scrcpy-server’

scrcpy-server                   100%[======================================================>]  55.66K   241KB/s    in 0.2s    

2023-07-28 09:49:48 (241 KB/s) - ‘scrcpy-server’ saved [56995/56995]

[scrcpy] Verifying prebuilt server...
scrcpy-server: OK
[scrcpy] Building client...

ERROR: Neither directory contains a build file meson.build.

Ubuntu 22.04.02
Meson 0.61.2

@aluyama
Copy link

aluyama commented Jul 28, 2023

ago i only downloaded the install script and now downloaded the repo and tried again, it worked

@Alchemistapf
Copy link
Author

I've seen several comments regarding this and it seems that this has always been the case and I'm not the only one to have this problem. It took me some time to fix it, and perhaps, in future, updating the install script so it works out of the box (zipped source) might help others. The software is amazingly good and it would be a shame if people couldn't use it as they couldn't solve this minor problem.

@rom1v
Copy link
Collaborator

rom1v commented Jul 28, 2023

@Alchemistapf Read this comment wihich explains why the install_release.sh script may not be included in the tag, but only one commit after: #4098 (comment)

It is intended to be run from master.

@user001340
Copy link

Apparently when you paste the text it leaves out the backslash in line 15 , meson setup line.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants