Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
github_28344065
scrcpy
提交
8476b4aa
S
scrcpy
项目概览
github_28344065
/
scrcpy
与 Fork 源项目一致
从无法访问的项目Fork
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
scrcpy
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
8476b4aa
编写于
3月 10, 2018
作者:
S
Siddharth Dushantha
提交者:
GitHub
3月 10, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
removed "$" and changed Mac OS ---> MacOS
上级
a1491862
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
33 addition
and
33 deletion
+33
-33
README.md
README.md
+33
-33
未找到文件。
README.md
浏览文件 @
8476b4aa
...
...
@@ -2,7 +2,7 @@
This application provides display and control of Android devices connected on
USB. It does not require any _root_ access. It works on _GNU/Linux_, _Windows_
and _Mac
OS_.
and _MacOS_.
![
screenshot
](
assets/screenshot-debian-600.jpg
)
...
...
@@ -40,12 +40,12 @@ The client requires _FFmpeg_ and _LibSDL2_.
Install the required packages from your package manager (here, for Debian):
```
bash
# runtime dependencies
$
sudo
apt
install
ffmpeg libsdl2-2.0.0
sudo
apt
install
ffmpeg libsdl2-2.0.0
# build dependencies
$
sudo
apt
install
make gcc openjdk-8-jdk pkg-config meson zip
\
libavcodec-dev libavformat-dev libavutil-dev
\
libsdl2-dev
sudo
apt
install
make gcc openjdk-8-jdk pkg-config meson zip
\
libavcodec-dev libavformat-dev libavutil-dev
\
libsdl2-dev
```
#### Windows
...
...
@@ -66,20 +66,20 @@ project. From an MSYS2 terminal, install the required packages:
[
MSYS2
]:
http://www.msys2.org/
```
bash
# runtime dependencies
$
pacman
-S
mingw-w64-x86_64-SDL2
\
mingw-w64-x86_64-ffmpeg
pacman
-S
mingw-w64-x86_64-SDL2
\
mingw-w64-x86_64-ffmpeg
# build dependencies
$
pacman
-S
mingw-w64-x86_64-make
\
mingw-w64-x86_64-gcc
\
mingw-w64-x86_64-pkg-config
\
mingw-w64-x86_64-meson
\
zip
pacman
-S
mingw-w64-x86_64-make
\
mingw-w64-x86_64-gcc
\
mingw-w64-x86_64-pkg-config
\
mingw-w64-x86_64-meson
\
zip
```
Java (>= 7) is not available in MSYS2, so if you plan to build the server,
install it manually and make it available from the
`PATH`
:
```
bash
$
export
PATH
=
"
$JAVA_HOME
/bin:
$PATH
"
export
PATH
=
"
$JAVA_HOME
/bin:
$PATH
"
```
#### Mac OS
...
...
@@ -89,15 +89,15 @@ Use [Homebrew] to install the packages:
[
Homebrew
]:
https://brew.sh/
```
bash
# runtime dependencies
$
brew
install
sdl2 ffmpeg
brew
install
sdl2 ffmpeg
# build dependencies
$
brew
install
gcc pkg-config meson zip
brew
install
gcc pkg-config meson zip
```
Java (>= 7) is not available in Homebrew, so if you plan to build the server,
install it manually and make it available from the
`PATH`
:
```
bash
$
export
PATH
=
"
$JAVA_HOME
/bin:
$PATH
"
export
PATH
=
"
$JAVA_HOME
/bin:
$PATH
"
```
### Common steps
...
...
@@ -107,21 +107,21 @@ its directory. For example:
[
Android SDK
]:
https://developer.android.com/studio/index.html
```
bash
$
export
ANDROID_HOME
=
~/android/sdk
export
ANDROID_HOME
=
~/android/sdk
```
Then, build
`scrcpy`
:
```
bash
$
meson x
--buildtype
release
--strip
-Db_lto
=
true
$
cd
x
$
ninja
meson x
--buildtype
release
--strip
-Db_lto
=
true
cd
x
ninja
```
You can test it from here:
```
bash
$
ninja run
ninja run
```
Or you can install it on the system:
```
bash
$
sudo
ninja
install
# without sudo on Windows
sudo
ninja
install
# without sudo on Windows
```
This installs two files:
...
...
@@ -147,11 +147,11 @@ In that case, the build does not require Java or the Android SDK.
Download the prebuilt server somewhere, and specify its path during the Meson
configuration:
```
bash
$
meson x
--buildtype
release
--strip
-Db_lto
=
true
\
-Dprebuilt_server
=
/path/to/scrcpy-server.jar
$
cd
x
$
ninja
$
sudo
ninja
install
meson x
--buildtype
release
--strip
-Db_lto
=
true
\
-Dprebuilt_server
=
/path/to/scrcpy-server.jar
cd
x
ninja
sudo
ninja
install
```
## Run
...
...
@@ -160,28 +160,28 @@ _At runtime, `adb` must be accessible from your `PATH`._
If everything is ok, just plug an Android device, and execute:
```
bash
$
scrcpy
scrcpy
```
It accepts command-line arguments, listed by:
```
bash
$
scrcpy
--help
scrcpy
--help
```
For example, to decrease video bitrate to 2Mbps (default is 8Mbps):
```
bash
$
scrcpy
-b
2M
scrcpy
-b
2M
```
To limit the video dimensions (e.g. if the device is 2540×1440, but the host
screen is smaller, or cannot decode such a high definition):
```
bash
$
scrcpy
-m
1024
scrcpy
-m
1024
```
If several devices are listed in
`adb devices`
, you must specify the _serial_:
```
bash
$
scrcpy
-s
0123456789abcdef
scrcpy
-s
0123456789abcdef
```
To run without installing:
```
bash
$
./run x
[
options]
./run x
[
options]
```
(where
`x`
is your build directory).
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录