6d0ac3626d
Use local adb in portable builds
...
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 >
2024-12-02 18:23:18 +01:00
beee42fb06
Load ADB value using sc_get_env()
...
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 >
2024-12-02 18:23:18 +01:00
131372d2c4
Expose sc_get_env() to read environment variable
...
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 >
2024-12-02 18:23:18 +01:00
0fd7534bd5
Add method to get executable path on MacOS
...
PR #5560 <https://github.com/Genymobile/scrcpy/pull/5560 >
Signed-off-by: Romain Vimont <rom@rom1v.com >
2024-12-02 18:23:18 +01:00
36574d2ee7
Fix .tar.gz compression
...
The generated .tar.gz releases were in fact non-gzipped tarballs.
Fixes #5581 <https://github.com/Genymobile/scrcpy/issues/5581 >
2024-12-02 08:54:57 +01:00
3b2b3625e4
Accept positional control events without display
...
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 >
2024-12-01 17:22:47 +01:00
b2cdaa4bdc
Factorize position mapper resolution
...
The code was duplicated for touch and scroll events. Extract it to a
private function.
Refs #5542 <https://github.com/Genymobile/scrcpy/issues/5542 >
2024-12-01 17:22:47 +01:00
d01373c03c
Enable close-on-interrupt for macOS
...
This behavior is also necessary on macOS.
Fixes #5536 <https://github.com/Genymobile/scrcpy/issues/5536 >
2024-11-28 21:02:51 +01:00
ff06b6dcc1
Split network macro conditions
...
On Windows, interrupting a socket with shutdown() does not wake up
accept() or read() calls, the socket must be closed.
Introduce a new macro constant SC_SOCKET_CLOSE_ON_INTERRUPT, distinct of
_WIN32, because Windows will not be the only platform exhibiting this
behavior.
Refs #5536 <https://github.com/Genymobile/scrcpy/issues/5536 >
2024-11-28 21:02:31 +01:00
017a3672a4
Check GitHub runner architecture
...
Make sure that the releases are built for the expected target arch.
2024-11-28 20:09:21 +01:00
c1351b250e
Build macOS x86_64 release
...
Add actions to build a release for macOS x86_64 in addition to the
aarch64 version.
PR #5526 <https://github.com/Genymobile/scrcpy/pull/5526 >
Signed-off-by: Romain Vimont <rom@rom1v.com >
2024-11-28 20:09:21 +01:00
618a978f5b
Specify architecture for Linux and macOS releases
...
PR #5526 <https://github.com/Genymobile/scrcpy/pull/5526 >
Co-authored-by: Genxster1998 <ck.2229.ck@gmail.com >
2024-11-28 20:09:18 +01:00
acddd811bf
Rename TARGET to TARGET_DIRNAME
...
This avoids confusion with "$1", which is also documented as "<target>".
If "$1" (the target) is "linux", then TARGET_DIRNAME is
"scrcpy-linux-v3.0".
2024-11-28 19:59:06 +01:00
ee9f7126ff
Use FORMAT variable name in package_client.sh
...
The format is used several times, avoid using "$2" directly.
2024-11-28 19:58:41 +01:00
a18ed1ee7a
Simplify GitHub actions step descriptions
...
Each step is executed within the context of an action, so mentioning the
name of the action is unnecessary.
2024-11-28 19:58:08 +01:00
678025b316
Remove apt update on GitHub Actions
...
Assume the image is up-to-date.
2024-11-28 19:40:47 +01:00
3e689020ba
Fix null return value in DisplayManager.toString()
...
Ensure DisplayListener.toString() returns a non-null value to prevent a
NullPointerException on certain devices.
Fixes #5537 <https://github.com/Genymobile/scrcpy/issues/5537 >
2024-11-27 07:45:35 +01:00
3d1f036c04
Rollback to old --turn-screen-off for Android 15
...
When the screen is turned off with the new display power method
introduced in Android 15, video mirroring freezes.
Use the Android 14 method for Android 15.
Refs 58ba00fa06
Refs #5418 <https://github.com/Genymobile/scrcpy/pull/5418 >
Fixes #5530 <https://github.com/Genymobile/scrcpy/issues/5530 >
2024-11-26 15:55:16 +01:00
3d5294c1e5
Set main display power for virtual display
...
Change the display power of the main display when mirroring a virtual
display, to make it possible to turn off the screen.
Fixes #5522 <https://github.com/Genymobile/scrcpy/issues/5522 >
Refs #5530 <https://github.com/Genymobile/scrcpy/issues/5530 >
2024-11-26 15:43:41 +01:00
1d2f16dbb5
Fix documentation about default mouse mode
...
When video playback is turned off, the default mouse mode has changed
from "uhid" to "disabled" in 2c25fd7a80
.
Update the documentation accordingly.
Refs #5410 <https://github.com/Genymobile/scrcpy/issues/5410 >
Refs #5542 <https://github.com/Genymobile/scrcpy/issues/5542 >
2024-11-26 14:10:11 +01:00
7fef051976
Add BlueSky link
...
Scrcpy now has a BlueSky account.
2024-11-25 20:06:32 +01:00
da8ade88fd
Fix link to virtual display doc in README
...
PR #5525 <https://github.com/Genymobile/scrcpy/pull/5525 >
Signed-off-by: Romain Vimont <rom@rom1v.com >
2024-11-25 08:21:06 +01:00
74aecc00b5
Update links to 3.0
v3.0
2024-11-24 18:30:01 +01:00
5e05f2a25b
Bump version to 3.0
2024-11-24 17:52:54 +01:00
3d478d7d5b
Build FFmpeg with v4l2 support for Linux
...
So that --v4l2-sink works with Linux static builds.
2024-11-24 17:52:53 +01:00
54e1f8e060
Include scrcpy manpage in Linux and macOS releases
2024-11-24 16:50:47 +01:00
d40224f299
Fix alphabetic order of cli args
2024-11-24 16:37:32 +01:00
0628ffcb0b
Merge branch 'master' into release
2024-11-24 16:01:05 +01:00
6f9520f3e2
Test build_without_gradle.sh in GitHub Actions
...
Build the server without gradle to make sure that the script works.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:46:37 +01:00
a7efb180b9
Add script to release macOS static binary
...
Provide a prebuilt binary for macOS.
Fixes #1733 <https://github.com/Genymobile/scrcpy/issues/1733 >
Fixes #3235 <https://github.com/Genymobile/scrcpy/issues/3235 >
Fixes #4489 <https://github.com/Genymobile/scrcpy/issues/4489 >
Fixes #5327 <https://github.com/Genymobile/scrcpy/issues/5327 >
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
Co-authored-by: Muvaffak Onus <me@muvaf.com >
2024-11-24 15:46:23 +01:00
28c372e838
Use generic command for SHA-256
...
The command sha256sum does not exist on macOS, but `shasum -a256` works
both on Linux and macOS.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
Co-authored-by: Romain Vimont <rom@rom1v.com >
Signed-off-by: Romain Vimont <rom@rom1v.com >
2024-11-24 15:41:13 +01:00
cb19686d79
Add script to release Linux static binary
...
Provide a prebuilt binary for Linux.
Fixes #5327 <https://github.com/Genymobile/scrcpy/issues/5327 >
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
93da693e8c
Add support for .tar.gz packaging
...
Make package_client.sh accept an archive format.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
179c664e2b
Add static build option
...
Use static dependencies if the option is set.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
360936248c
Add support for build and link types for deps
...
Make dependencies build scripts more flexible, to accept a build type
(native or cross) and a link type (static or shared).
This lays the groundwork for building binaries for Linux and macOS.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
98d2065d6d
Make the ADB dependency script Windows-specific
...
This will allow adding similar scripts for other platforms.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
6a81fc438b
Extract args processing in deps scripts
...
Extract the code that processes arguments into a function.
This will make it optional, so the script that only downloads the
official ADB binaries will not use arguments.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
cf0098abf0
Store dependencies configure args in bash arrays
...
This will make it easy to conditionally add items.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
73b595c806
Disable VDPAU and VAAPI for FFmpeg build
...
They are not used, and this prevents Linux builds from working if the
dependencies are unavailable.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
d74f564f56
Reorder FFmpeg configure args
...
All --disable, then all --enable.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
7fc6943284
Preserve file permissions in GitHub Actions
...
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 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
a57180047c
Split packaging for each target on CI
...
Create separate jobs for packaging win32 and win64 releases.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
5df218d8f9
Test scrcpy-server in a separate CI job
...
Use a separate GitHub Action job to build and test the server.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:41:13 +01:00
26bf209617
Replace release.mk by release scripts
...
Since commit 2687d20280
, 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 <https://github.com/Genymobile/scrcpy/pull/5306 >
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515 >
2024-11-24 15:40:34 +01:00
dc82425769
Add debugging method for Android >= 11
...
Fixes #5346 <https://github.com/Genymobile/scrcpy/issues/5346 >
PR #5466 <https://github.com/Genymobile/scrcpy/pull/5466 >
Signed-off-by: Romain Vimont <rom@rom1v.com >
2024-11-24 12:24:32 +01:00
9f39a5f2d6
Determine debugger command at runtime
...
When server_debugger is enabled, retrieve the device SDK version to
execute the correct command.
PR #5466 <https://github.com/Genymobile/scrcpy/pull/5466 >
2024-11-22 11:04:32 +01:00
24588cb637
Add missing aidl in build_without_gradle.sh
...
Refs 39d51ff2cc
Fixes #5512 <https://github.com/Genymobile/scrcpy/issues/5512 >
2024-11-22 07:48:48 +01:00
0e50d1e7db
Extract PLATFORM_TOOLS in build_without_gradle.sh
...
Refs #5512 <https://github.com/Genymobile/scrcpy/issues/5512 >
2024-11-22 07:47:24 +01:00
264110fd70
Dissociate virtual display size and capture size
...
Allow capturing virtual displays at a lower resolution using
-m/--max-size.
In the original implementation in #5370 , the virtual display size was
necessarily the same as the capture size. The --max-size value was only
allowed to determine the virtual display size when no explicit size was
provided.
Since the dpi was scaled down accordingly, it is often better to create
a virtual display at the target capture size directly. However, not
everything is rendered according to the virtual display DPI. For
example, a page in Firefox is rendered too big on small virtual
displays. Thus, it makes sense to be able create a virtual display at a
given size, and capture it at a lower resolution with --max-size. This
is now possible using OpenGL filters.
Therefore, change the behavior of --max-size for virtual displays:
- --max-size does not impact --new-display without size argument
anymore (the virtual display size is the main display size);
- it is used to limit the capture size (whether an explicit size is
provided or not).
This new behavior is consistent with main display capture.
Refs #5370 comment <https://github.com/Genymobile/scrcpy/pull/5370#issuecomment-2438944401 >
Refs #5370 <https://github.com/Genymobile/scrcpy/pull/5370 >
PR #5506 <https://github.com/Genymobile/scrcpy/pull/5506 >
2024-11-21 18:36:23 +01:00
4608a19a13
Upgrade platform-tools (35.0.2) for Windows
...
Since 35.0.1, the filename has changed on the server from -windows.zip
to -win.zip
The links are referenced from this file:
<https://dl.google.com/android/repository/repository2-2.xml >
Refs <https://www.reddit.com/r/Android/comments/1fhbs7w/download_links_to_platformtoolsadb/ >
2024-11-20 08:14:04 +01:00