1 Star 0 Fork 6

Jianf / OhScrCpy

forked from cleefun / OhScrCpy 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
MIT

OhScrCpy

介绍

适用于 OpenHarmony 操作系统的投屏工具,参考了开源项目 Scrcpy 的设计和实现。目前项目非常简陋,只能算是一个 demo,仅实现了简单的投屏功能,欢迎 fork 和 pr 优化改进。

使用

  1. 直接下载编译好的包,解压后双击运行 launch.bat 即可。
  2. 自行编译:

服务端

  • 部署好 OpenHarmony 编译环境,具体可参考官方文档;
  • 将 server 下的 scrcpy 目录拷贝到 foundation/window/window_manager/ 下;
  • 修改 foundation/window/window_manager/bundle.json,在 "base_group" 列表中增加 "//foundation/window/window_manager/scrcpy:scrcpy_server",如下:
"base_group": [
  "//foundation/window/window_manager/snapshot:snapshot_display",
  "//foundation/window/window_manager/interfaces/kits/napi/window_runtime/window_stage_napi:windowstage",
  "//foundation/window/window_manager/interfaces/kits/napi:napi_packages",
  "//foundation/window/window_manager/resources:window_resources",
  "//foundation/window/window_manager/scrcpy:scrcpy_server"
]
  • 编译命令(在 OpenHarmony 根目录下执行):
# 首次编译,或修改了 bundle.json 的配置,需要完整编译部件
./build.sh --product-name=system_arm64_default --build-target=window_manager

# 已编译过,只修改了代码,可以使用快速编译指令
./build.sh --product-name=system_arm64_default --build-target=window_manager --fast-rebuild
  • 编译产物:out/arm64/window/window_manager/scrcpy_server

客户端

  • 部署好 MinGW 编译环境,安装 xmake,vscode 安装 xmake 插件;
  • xmake 选择 mingw 平台,编译模式选择 debug(release 有问题,原因未知),编译后得到 client/build/mingw/x86_64/debug/OhScrCpy.exe

将 launch.bat、scrcpy_server 和 OhScrCpy.exe 放在同一目录下,执行 launch.bat 即可。

MIT License Copyright (c) 2023 cleefun Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

参考Scrcpy实现的适用于OpenHarmony的投屏工具 expand collapse
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/fengjf/ohscrcpy.git
git@gitee.com:fengjf/ohscrcpy.git
fengjf
ohscrcpy
OhScrCpy
master

Search