Skip to content

Commit aa90c04

Browse files
committed
setup
1 parent cd282cd commit aa90c04

File tree

10 files changed

+313
-1
lines changed

10 files changed

+313
-1
lines changed

.github/workflows/publish.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish package
2+
3+
on:
4+
push
5+
6+
jobs:
7+
build-nodejs-deb:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
13+
- name: Install Dependencies
14+
run: |
15+
sudo apt update
16+
sudo apt install dpkg ffmpeg libsdl2-2.0-0 adb wget \
17+
gcc git pkg-config meson ninja-build libsdl2-dev \
18+
libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \
19+
libswresample-dev libusb-1.0-0 libusb-1.0-0-dev
20+
21+
- name: Build Deb File
22+
run: |
23+
bash build.sh
24+
25+
- name: Automatic Release
26+
uses: marvinpinto/action-automatic-releases@latest
27+
with:
28+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
29+
automatic_release_tag: "2.7"
30+
prerelease: false
31+
title: "Latest Build 2.7"
32+
files: |
33+
*.deb

DEBIAN/control

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Package: scrcpy
2+
Source: scrcpy
3+
Version: 2.7
4+
Architecture: amd64
5+
Maintainer: [email protected]
6+
Installed-Size: 203
7+
Depends: libavcodec60 (>= 7:6.0), libavdevice60 (>= 7:6.0), libavformat60 (>= 7:6.0), libavutil58 (>= 7:6.0), libc6 (>= 2.34), libsdl2-2.0-0 (>= 2.0.12), libusb-1.0-0 (>= 2:1.0.16)
8+
Recommends: adb
9+
Section: net
10+
Priority: optional
11+
Homepage: https://github.com/Genymobile/scrcpy
12+
Description: Display and control your Android device
13+
This application provides display and control of Android devices connected on
14+
USB (or over TCP/IP). It does not require any root access.
15+
.
16+
This package contains the client (desktop) binary.

DEBIAN/md5sums

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
141fab94056e5bcbdd5fecdd6622efa4 usr/bin/scrcpy
2+
bcb1a9711594fb345fb6e63c90dd9591 usr/share/applications/scrcpy-console.desktop
3+
236aae66e805c99cbde850339d97ecb5 usr/share/applications/scrcpy.desktop
4+
8707652b2649f3799ae4be1318c9ead8 usr/share/bash-completion/completions/scrcpy
5+
3eb37f2adf4f01091b422f9906f6daed usr/share/doc/scrcpy/changelog.Debian.amd64.gz
6+
f83fde543210c8cb6dd310113cd67c33 usr/share/doc/scrcpy/changelog.Debian.gz
7+
62fa2452695f764645adda5bf180ff00 usr/share/doc/scrcpy/copyright
8+
9e1ffbd6d2630c3b89be2b9c19c29e8f usr/share/icons/hicolor/256x256/apps/scrcpy.png
9+
7980db345a5089ecfdd6aac626eb5890 usr/share/lintian/overrides/scrcpy
10+
2eee0beff15c7c1acc59a56fb285bb19 usr/share/man/man1/scrcpy.1.gz
11+
51d4bbc4f3ee6950ce6a4bfb58bb1ef7 usr/share/zsh/site-functions/_scrcpy

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# scrcpy-deb
2-
deb file scrcpy tool
2+
3+
[![All Downloads](https://img.shields.io/github/downloads/jakbin/scrcpy-deb/total.svg)](https://github.com/jakbin/scrcpy-deb)
4+
5+
deb files scrcpy tool

build.sh

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
git clone https://github.com/Genymobile/scrcpy scrcpy-git
4+
cd scrcpy-git
5+
sed -i '21d' install_release.sh
6+
./install_release.sh
7+
8+
cd ..
9+
10+
# copy control file
11+
mkdir scrcpy
12+
cp -r DEBIAN scrcpy/
13+
14+
# copy share folder
15+
mkdir scrcpy/usr
16+
cp -r share scrcpy/usr/
17+
18+
# copy scrcpy binary
19+
mkdir scrcpy/bin
20+
cp scrcpy-git/build-auto/app/scrcpy scrcpy/bin/
21+
22+
# copy scrcpy server file
23+
mkdir -p scrcpy/usr/local/share/scrcpy/
24+
cp scrcpy-git/scrcpy-server scrcpy/usr/local/share/scrcpy/
25+
26+
# build deb file
27+
dpkg -b scrcpy
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Desktop Entry]
2+
Name=scrcpy (console)
3+
GenericName=Android Remote Control
4+
Comment=Display and control your Android device
5+
# For some users, the PATH or ADB environment variables are set from the shell
6+
# startup file, like .bashrc or .zshrc… Run an interactive shell to get
7+
# environment correctly initialized.
8+
Exec=/bin/bash --norc --noprofile -i -c '"$SHELL" -i -c scrcpy || read -p "Press any key to quit..."'
9+
Icon=scrcpy
10+
Terminal=true
11+
Type=Application
12+
Categories=Utility;RemoteAccess;
13+
StartupNotify=false

share/applications/scrcpy.desktop

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Desktop Entry]
2+
Name=scrcpy
3+
GenericName=Android Remote Control
4+
Comment=Display and control your Android device
5+
# For some users, the PATH or ADB environment variables are set from the shell
6+
# startup file, like .bashrc or .zshrc… Run an interactive shell to get
7+
# environment correctly initialized.
8+
Exec=/bin/sh -c '"$SHELL" -i -c scrcpy'
9+
Icon=scrcpy
10+
Terminal=false
11+
Type=Application
12+
Categories=Utility;RemoteAccess;
13+
StartupNotify=false
+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
_scrcpy() {
2+
local cur prev words cword
3+
local opts="
4+
--always-on-top
5+
-b --bit-rate=
6+
--codec-options=
7+
--crop=
8+
-d --select-usb
9+
--disable-screensaver
10+
--display=
11+
--display-buffer=
12+
-e --select-tcpip
13+
--encoder=
14+
--force-adb-forward
15+
--forward-all-clicks
16+
-f --fullscreen
17+
-K --hid-keyboard
18+
-h --help
19+
--legacy-paste
20+
--lock-video-orientation
21+
--lock-video-orientation=
22+
--max-fps=
23+
-M --hid-mouse
24+
-m --max-size=
25+
--no-cleanup
26+
--no-clipboard-on-error
27+
--no-downsize-on-error
28+
-n --no-control
29+
-N --no-display
30+
--no-key-repeat
31+
--no-mipmaps
32+
--no-power-on
33+
--otg
34+
-p --port=
35+
--power-off-on-close
36+
--prefer-text
37+
--print-fps
38+
--push-target=
39+
--raw-key-events
40+
-r --record=
41+
--record-format=
42+
--render-driver=
43+
--rotation=
44+
-s --serial=
45+
--shortcut-mod=
46+
-S --turn-screen-off
47+
-t --show-touches
48+
--tcpip
49+
--tcpip=
50+
--tunnel-host=
51+
--tunnel-port=
52+
--v4l2-buffer=
53+
--v4l2-sink=
54+
-V --verbosity=
55+
-v --version
56+
-w --stay-awake
57+
--window-borderless
58+
--window-title=
59+
--window-x=
60+
--window-y=
61+
--window-width=
62+
--window-height="
63+
64+
_init_completion -s || return
65+
66+
case "$prev" in
67+
--lock-video-orientation)
68+
COMPREPLY=($(compgen -W 'unlocked initial 0 1 2 3' -- "$cur"))
69+
return
70+
;;
71+
-r|--record)
72+
COMPREPLY=($(compgen -f -- "$cur"))
73+
return
74+
;;
75+
--record-format)
76+
COMPREPLY=($(compgen -W 'mkv mp4' -- "$cur"))
77+
return
78+
;;
79+
--render-driver)
80+
COMPREPLY=($(compgen -W 'direct3d opengl opengles2 opengles metal software' -- "$cur"))
81+
return
82+
;;
83+
--rotation)
84+
COMPREPLY=($(compgen -W '0 1 2 3' -- "$cur"))
85+
return
86+
;;
87+
--shortcut-mod)
88+
# Only auto-complete a single key
89+
COMPREPLY=($(compgen -W 'lctrl rctrl lalt ralt lsuper rsuper' -- "$cur"))
90+
return
91+
;;
92+
-V|--verbosity)
93+
COMPREPLY=($(compgen -W 'verbose debug info warn error' -- "$cur"))
94+
return
95+
;;
96+
-s|--serial)
97+
# Use 'adb devices' to list serial numbers
98+
COMPREPLY=($(compgen -W "$("${ADB:-adb}" devices | awk '$2 == "device" {print $1}')" -- ${cur}))
99+
return
100+
;;
101+
-b|--bitrate \
102+
|--codec-options \
103+
|--crop \
104+
|--display \
105+
|--display-buffer \
106+
|--encoder \
107+
|--max-fps \
108+
|-m|--max-size \
109+
|-p|--port \
110+
|--push-target \
111+
|--tunnel-host \
112+
|--tunnel-port \
113+
|--v4l2-buffer \
114+
|--v4l2-sink \
115+
|--tcpip \
116+
|--window-*)
117+
# Option accepting an argument, but nothing to auto-complete
118+
return
119+
;;
120+
esac
121+
122+
COMPREPLY=($(compgen -W "$opts" -- "$cur"))
123+
[[ $COMPREPLY == *= ]] && compopt -o nospace
124+
}
125+
126+
complete -F _scrcpy scrcpy
6.38 KB
Loading

share/zsh/site-functions/_scrcpy

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#compdef -N scrcpy -N scrcpy.exe
2+
#
3+
# name: scrcpy
4+
# auth: hltdev [[email protected]]
5+
# desc: completion file for scrcpy (all OSes)
6+
#
7+
8+
local arguments
9+
10+
arguments=(
11+
'--always-on-top[Make scrcpy window always on top \(above other windows\)]'
12+
{-b,--bit-rate=}'[Encode the video at the given bit-rate]'
13+
'--codec-options=[Set a list of comma-separated key\:type=value options for the device encoder]'
14+
'--crop=[\[width\:height\:x\:y\] Crop the device screen on the server]'
15+
{-d,--select-usb}'[Use USB device]'
16+
'--disable-screensaver[Disable screensaver while scrcpy is running]'
17+
'--display=[Specify the display id to mirror]'
18+
'--display-buffer=[Add a buffering delay \(in milliseconds\) before displaying]'
19+
{-e,--select-tcpip}'[Use TCP/IP device]'
20+
'--encoder=[Use a specific MediaCodec encoder \(must be a H.264 encoder\)]'
21+
'--force-adb-forward[Do not attempt to use \"adb reverse\" to connect to the device]'
22+
'--forward-all-clicks[Forward clicks to device]'
23+
{-f,--fullscreen}'[Start in fullscreen]'
24+
{-K,--hid-keyboard}'[Simulate a physical keyboard by using HID over AOAv2]'
25+
{-h,--help}'[Print the help]'
26+
'--legacy-paste[Inject computer clipboard text as a sequence of key events on Ctrl+v]'
27+
'--lock-video-orientation=[Lock video orientation]:orientation:(unlocked initial 0 1 2 3)'
28+
'--max-fps=[Limit the frame rate of screen capture]'
29+
{-M,--hid-mouse}'[Simulate a physical mouse by using HID over AOAv2]'
30+
{-m,--max-size=}'[Limit both the width and height of the video to value]'
31+
'--no-cleanup[Disable device cleanup actions on exit]'
32+
'--no-clipboard-autosync[Disable automatic clipboard synchronization]'
33+
'--no-downsize-on-error[Disable lowering definition on MediaCodec error]'
34+
{-n,--no-control}'[Disable device control \(mirror the device in read only\)]'
35+
{-N,--no-display}'[Do not display device \(during screen recording or when V4L2 sink is enabled\)]'
36+
'--no-key-repeat[Do not forward repeated key events when a key is held down]'
37+
'--no-mipmaps[Disable the generation of mipmaps]'
38+
'--no-power-on[Do not power on the device on start]'
39+
'--otg[Run in OTG mode \(simulating physical keyboard and mouse\)]'
40+
{-p,--port=}'[\[port\[\:port\]\] Set the TCP port \(range\) used by the client to listen]'
41+
'--power-off-on-close[Turn the device screen off when closing scrcpy]'
42+
'--prefer-text[Inject alpha characters and space as text events instead of key events]'
43+
'--print-fps[Start FPS counter, to print frame logs to the console]'
44+
'--push-target=[Set the target directory for pushing files to the device by drag and drop]'
45+
'--raw-key-events[Inject key events for all input keys, and ignore text events]'
46+
{-r,--record=}'[Record screen to file]:record file:_files'
47+
'--record-format=[Force recording format]:format:(mp4 mkv)'
48+
'--render-driver=[Request SDL to use the given render driver]:driver name:(direct3d opengl opengles2 opengles metal software)'
49+
'--rotation=[Set the initial display rotation]:rotation values:(0 1 2 3)'
50+
{-s,--serial=}'[The device serial number \(mandatory for multiple devices only\)]:serial:($("${ADB-adb}" devices | awk '\''$2 == "device" {print $1}'\''))'
51+
'--shortcut-mod=[\[key1,key2+key3,...\] Specify the modifiers to use for scrcpy shortcuts]:shortcut mod:(lctrl rctrl lalt ralt lsuper rsuper)'
52+
{-S,--turn-screen-off}'[Turn the device screen off immediately]'
53+
{-t,--show-touches}'[Show physical touches]'
54+
'--tcpip[\(optional \[ip\:port\]\) Configure and connect the device over TCP/IP]'
55+
'--tunnel-host=[Set the IP address of the adb tunnel to reach the scrcpy server]'
56+
'--tunnel-port=[Set the TCP port of the adb tunnel to reach the scrcpy server]'
57+
'--v4l2-buffer=[Add a buffering delay \(in milliseconds\) before pushing frames]'
58+
'--v4l2-sink=[\[\/dev\/videoN\] Output to v4l2loopback device]'
59+
{-V,--verbosity=}'[Set the log level]:verbosity:(verbose debug info warn error)'
60+
{-v,--version}'[Print the version of scrcpy]'
61+
{-w,--stay-awake}'[Keep the device on while scrcpy is running, when the device is plugged in]'
62+
'--window-borderless[Disable window decorations \(display borderless window\)]'
63+
'--window-title=[Set a custom window title]'
64+
'--window-x=[Set the initial window horizontal position]'
65+
'--window-y=[Set the initial window vertical position]'
66+
'--window-width=[Set the initial window width]'
67+
'--window-height=[Set the initial window height]'
68+
)
69+
70+
_arguments -s $arguments

0 commit comments

Comments
 (0)