Romain Vimont
9555d3a537
Retry capture on IOException
...
If the capture fails with an IOException, retry with a lower resolution.
Fixes #5539 <https://github.com/Genymobile/scrcpy/issues/5539 >
2024-12-03 23:06:33 +01:00
Romain Vimont
aea6a371aa
Remove scrcpy wrapper script for static builds
...
All portable builds now use the files located in the same directory as
the scrcpy executable by default.
PR #5560 <https://github.com/Genymobile/scrcpy/pull/5560 >
2024-12-02 18:23:18 +01:00
Romain Vimont
dc6c279b1e
Log adb executable path
...
Log the ADB executable path (at the DEBUG level) if it is not the
default one.
PR #5560 <https://github.com/Genymobile/scrcpy/pull/5560 >
2024-12-02 18:23:18 +01:00
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Genxster1998
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Genxster1998
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
678025b316
Remove apt update on GitHub Actions
...
Assume the image is up-to-date.
2024-11-28 19:40:47 +01:00
Romain Vimont
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
Romain Vimont
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 58ba00fa060c9a1f439120f8869ed106e1c935f9
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
Romain Vimont
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
Romain Vimont
1d2f16dbb5
Fix documentation about default mouse mode
...
When video playback is turned off, the default mouse mode has changed
from "uhid" to "disabled" in 2c25fd7a8082307da19645a690c31403903fbb1e.
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
Romain Vimont
7fef051976
Add BlueSky link
...
Scrcpy now has a BlueSky account.
2024-11-25 20:06:32 +01:00
Wouter Schoot
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
Romain Vimont
74aecc00b5
Update links to 3.0
v3.0
2024-11-24 18:30:01 +01:00
Romain Vimont
5e05f2a25b
Bump version to 3.0
2024-11-24 17:52:54 +01:00
Romain Vimont
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
Romain Vimont
54e1f8e060
Include scrcpy manpage in Linux and macOS releases
2024-11-24 16:50:47 +01:00
Romain Vimont
d40224f299
Fix alphabetic order of cli args
2024-11-24 16:37:32 +01:00
Romain Vimont
0628ffcb0b
Merge branch 'master' into release
2024-11-24 16:01:05 +01:00
Romain Vimont
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
Romain Vimont
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
Muvaffak Onus
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
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
Romain Vimont
26bf209617
Replace release.mk by release scripts
...
Since commit 2687d202809dfaafe8f40f613aec131ad9501433, 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
Enno Boland
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
Romain Vimont
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
Romain Vimont
24588cb637
Add missing aidl in build_without_gradle.sh
...
Refs 39d51ff2cc2f3e201ad433d48372b548e5dd11d3
Fixes #5512 <https://github.com/Genymobile/scrcpy/issues/5512 >
2024-11-22 07:48:48 +01:00