Use the oldest Ubuntu version currently available in GitHub Actions to
ensure maximum compatibility with older systems.
Refs 95c4f03c1bfd566b383780977b3473ebad6477ee
Refs #5689 <https://github.com/Genymobile/scrcpy/issues/5689>
On Github Actions, ubuntu-latest now points to ubuntu-24.04, which uses
a newer version of glibc (2.39). As a result, the binaries fail to work
on systems with older versions of glibc, such as Debian Bookworm.
To ensure better compatibility, continue building the static Linux
binary on Ubuntu 22.04 (with glibc 2.35).
Fixes#5689 <https://github.com/Genymobile/scrcpy/issues/5689>
This allows users to compile and run the project in a dev environment.
meson setup x
meson compile -C x
meson devenv -C x
scrcpy
This is an alternative to `./run x`.
PR #5658 <https://github.com/Genymobile/scrcpy/pull/5658>
Signed-off-by: Romain Vimont <rom@rom1v.com>
In Meson cross-files, "pkgconfig" was deprecated in favor of
"pkg-config" in meson 1.3.0.
The new name is used since 85a94dd4b563e961304b2d9082932c5c1cc2e582 to
avoid a warning, but then it fails with older versions of meson.
To avoid the problem, define both pkg-config and pkgconfig.
> For backward compatibility it is still allowed to define both with the
> same value, in that case no deprecation warning is printed.
<https://mesonbuild.com/Release-notes-for-1-3-0.html#machine-files-pkgconfig-field-deprecated-and-replaced-by-pkgconfig>
This reverts commit 678025b31672c230575fe2dbc4a0d487d5010bb1.
This avoids spurious errors on the CI:
E: Unable to fetch some archives, maybe run apt-get update or try
with --fix-missing?
Some options, such as --show-touches or --stay-awake, modify Android
settings and must be restored upon exit.
If scrcpy terminates (e.g. due to an early error) in the middle of the
clean up configuration, the device may be left in an inconsistent state
(some settings might be changed but not restored).
This issue can be reproduced with high probability by forcing scrcpy to
fail:
scrcpy --show-touches --video-encoder=fail
To prevent this problem, ensure that the clean up thread is not
interrupted until the clean up process is started.
Refs #5601 <https://github.com/Genymobile/scrcpy/issues/5601>
PR #5613 <https://github.com/Genymobile/scrcpy/pull/5613>
Add an option to disable the following flag for virtual displays:
DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL
With this option, when the virtual display is closed, the running apps
are moved to the main display rather than being destroyed.
PR #5615 <https://github.com/Genymobile/scrcpy/pull/5615>
On --no-vd-system-decoration, the boolean option must be set to false.
It was wrongly assigned from optarg (this worked because optarg is NULL
at this point, so it was converted to false).
PR #5615 <https://github.com/Genymobile/scrcpy/pull/5615>
When running scrcpy with --tcpip=xx.xx.xx.xx, to make sure a new working
connection is established, it was first disconnected by a call to:
adb disconnect <addr>
However, this caused all running instances connected to that address to
be killed. Running several instances of scrcpy on the same device is now
useful with virtual displays, so change the default behavior to NOT
disconnect.
To force a reconnection, a '+' prefix can be added:
scrcpy --tcpip=+192.168.0.x
Fixes#5562 <https://github.com/Genymobile/scrcpy/issues/5562>
For non-Windows portable builds, use the absolute path to the adb
executable located in the same directory as scrcpy.
On Windows, just use "adb", which is sufficient to use the local one.
PR #5560 <https://github.com/Genymobile/scrcpy/pull/5560>
Contrary to getenv(), the result of sc_get_env() is encoded in UTF-8 on
all platforms. Since it is allocated, it requires an explicit init() and
destroy() functions.
PR #5560 <https://github.com/Genymobile/scrcpy/pull/5560>
Contrary to getenv(), sc_get_env() returns an allocated string that is
guaranteed to be encoded in UTF-8 on all platforms (it uses _wgetenv()
internally on Windows and converts the strings).
PR #5560 <https://github.com/Genymobile/scrcpy/pull/5560>
The position of touch and scroll must normally be "resolved" with a
"position mapper" associated to the display.
But to support the injection of such events with scrcpy-server alone
without video, handle the case where there is no display.
Fixes#5542 <https://github.com/Genymobile/scrcpy/issues/5542>