mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2025-06-20 09:47:45 +02:00
remove some useless
This commit is contained in:
parent
c6c1be8072
commit
edb09bc500
@ -1,452 +0,0 @@
|
|||||||
---
|
|
||||||
title: ARMhf
|
|
||||||
weight: 24
|
|
||||||
---
|
|
||||||
|
|
||||||
# 本教材由[@wwjabc](https://github.com/wwjabc)贡献提供
|
|
||||||
|
|
||||||
https://github.com/rustdesk/rustdesk/issues/175#issuecomment-1129516367
|
|
||||||
|
|
||||||
# 基本构建步骤
|
|
||||||
- 下载[ubuntu18.04_rootfs.tar.gz](https://pan.baidu.com/s/1pmjw7OBn5NbiCvM6GGaEgQ) 提取码:xlnx (我试了好几个版本的ubuntu系统,只有在这个上面成功了,编译好的可执行文件是可以在其他armhf系统下面用的。PS:如果你不放心系统来源,你也可以基于本教程在你的系统中编译,如果成功了记得提交方案来取代本教程。)
|
|
||||||
- [PYNQ官方资源](http://www.pynq.io)|[PYNQ-github](https://github.com/Xilinx/PYNQ)|[ubuntu](https://ubuntu.com/blog/microk8s-memory-optimisation)
|
|
||||||
- 下载编译[cmake-3.14.5](https://cmake.org/files/v3.14/cmake-3.14.5.tar.gz) 编译[参考教程](https://blog.csdn.net/weixin_43793181/article/details/118157012) 系统自带的cmake版本为3.10.2,编译[vcpkg-2020.11](https://github.com/microsoft/vcpkg/archive/refs/tags/2020.11.tar.gz)时会报版本过低
|
|
||||||
- 在板编译(qemu虚拟机我没搭建成功)
|
|
||||||
|
|
||||||
- 安装[vcpkg](https://github.com/microsoft/vcpkg), 正确设置`VCPKG_ROOT`环境变量。建议下载[vcpkg-2020.11](https://github.com/microsoft/vcpkg/archive/refs/tags/2020.11.tar.gz),我暂时用的是这个版本
|
|
||||||
|
|
||||||
- Linux: vcpkg install libyuv
|
|
||||||
- [libvpx](https://pan.baidu.com/s/1fgi0PzOrT4VpL6p3MY-IVA) 提取码:xlnx (手动安装,至于为什么指定该文件,我想表达的是我基于该文件成功编译了,你也可以下载其他文件来代替本文件。)
|
|
||||||
- [opus](https://pan.baidu.com/s/1fxQayZ7FGq-Z0bn_pjBVfQ) 提取码:xlnx (手动安装,原因同上。)
|
|
||||||
|
|
||||||
- 编译 `cargo build --release`
|
|
||||||
|
|
||||||
# 在 armhf 上编译
|
|
||||||
|
|
||||||
## 安装Ubuntu 18.04到SD卡
|
|
||||||
|
|
||||||
```sh
|
|
||||||
sudo tar zxmf ./ubuntu18.04_rootfs.tar.gz -C /your sd path/rootfs/
|
|
||||||
#用户名(usrname):xilinx
|
|
||||||
#密码(passwd):xilinx
|
|
||||||
```
|
|
||||||
|
|
||||||
## 安装cmake
|
|
||||||
```sh
|
|
||||||
tar -xzvf cmake-3.14.5.tar.gz
|
|
||||||
cd cmake-3.14.5/
|
|
||||||
#这两步可能需要很长时间,依次输入
|
|
||||||
./bootstrap
|
|
||||||
make -j4
|
|
||||||
sudo make install
|
|
||||||
```
|
|
||||||
```sh
|
|
||||||
root@pynq:~/cmake-3.14.5# ./bootstrap
|
|
||||||
---------------------------------------------
|
|
||||||
CMake 3.14.5, Copyright 2000-2019 Kitware, Inc. and Contributors
|
|
||||||
Found GNU toolchain
|
|
||||||
C compiler on this system is: gcc
|
|
||||||
C++ compiler on this system is: g++
|
|
||||||
Makefile processor on this system is: make
|
|
||||||
g++ has setenv
|
|
||||||
g++ has unsetenv
|
|
||||||
g++ does not have environ in stdlib.h
|
|
||||||
g++ has stl wstring
|
|
||||||
g++ has <ext/stdio_filebuf.h>
|
|
||||||
---------------------------------------------
|
|
||||||
```
|
|
||||||
```sh
|
|
||||||
root@pynq:~/cmake-3.14.5# cmake --version
|
|
||||||
cmake version 3.14.5
|
|
||||||
|
|
||||||
CMake suite maintained and supported by Kitware (kitware.com/cmake).
|
|
||||||
```
|
|
||||||
## 安装依赖项
|
|
||||||
|
|
||||||
```sh
|
|
||||||
sudo apt install -y g++ gcc git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev ninja-build
|
|
||||||
```
|
|
||||||
|
|
||||||
## 安装 vcpkg
|
|
||||||
|
|
||||||
```sh
|
|
||||||
tar zxmf vcpkg-2020.11.tar.gz
|
|
||||||
mv vcpkg-2020.11 vcpkg
|
|
||||||
vcpkg/bootstrap-vcpkg.sh
|
|
||||||
export VCPKG_ROOT=$HOME/vcpkg
|
|
||||||
export VCPKG_FORCE_SYSTEM_BINARIES=1
|
|
||||||
vcpkg/vcpkg install libyuv
|
|
||||||
```
|
|
||||||
|
|
||||||
```sh
|
|
||||||
root@pynq:~# export VCPKG_ROOT=$HOME/vcpkg
|
|
||||||
root@pynq:~# export VCPKG_FORCE_SYSTEM_BINARIES=1
|
|
||||||
root@pynq:~# vcpkg/vcpkg install libyuv
|
|
||||||
Computing installation plan...
|
|
||||||
The following packages will be built and installed:
|
|
||||||
* libjpeg-turbo[core]:arm-linux
|
|
||||||
libyuv[core]:arm-linux
|
|
||||||
Additional packages (*) will be modified to complete this operation.
|
|
||||||
Detecting compiler hash for triplet arm-linux...
|
|
||||||
Starting package 1/2: libjpeg-turbo:arm-linux
|
|
||||||
Building package libjpeg-turbo[core]:arm-linux...
|
|
||||||
Could not locate cached archive: /root/.cache/vcpkg/archives/62/629c73ee8920588cb446128f15cbfa66dfec1528.zip
|
|
||||||
-- Using community triplet arm-linux. This triplet configuration is not guaranteed to succeed.
|
|
||||||
-- [COMMUNITY] Loading triplet configuration from: /root/vcpkg/triplets/community/arm-linux.cmake
|
|
||||||
-- Downloading https://github.com/libjpeg-turbo/libjpeg-turbo/archive/ae87a958613b69628b92088b313ded0d4f59a716.tar.gz...
|
|
||||||
-- Extracting source /root/vcpkg/downloads/libjpeg-turbo-libjpeg-turbo-ae87a958613b69628b92088b313ded0d4f59a716.tar.gz
|
|
||||||
-- Applying patch add-options-for-exes-docs-headers.patch
|
|
||||||
-- Applying patch workaround_cmake_system_processor.patch
|
|
||||||
-- Using source at /root/vcpkg/buildtrees/libjpeg-turbo/src/0d4f59a716-5f2e7bc00b.clean
|
|
||||||
-- Configuring arm-linux-dbg
|
|
||||||
-- Configuring arm-linux-rel
|
|
||||||
-- Building arm-linux-dbg
|
|
||||||
-- Building arm-linux-rel
|
|
||||||
-- Performing post-build validation
|
|
||||||
-- Performing post-build validation done
|
|
||||||
Stored binary cache: /root/.cache/vcpkg/archives/62/629c73ee8920588cb446128f15cbfa66dfec1528.zip
|
|
||||||
Building package libjpeg-turbo[core]:arm-linux... done
|
|
||||||
Installing package libjpeg-turbo[core]:arm-linux...
|
|
||||||
Installing package libjpeg-turbo[core]:arm-linux... done
|
|
||||||
Elapsed time for package libjpeg-turbo:arm-linux: 5.475 min
|
|
||||||
Starting package 2/2: libyuv:arm-linux
|
|
||||||
Building package libyuv[core]:arm-linux...
|
|
||||||
Could not locate cached archive: /root/.cache/vcpkg/archives/36/3683c357e53932d95a037b4eb8cb74fe71c15f80.zip
|
|
||||||
-- Using community triplet arm-linux. This triplet configuration is not guaranteed to succeed.
|
|
||||||
-- [COMMUNITY] Loading triplet configuration from: /root/vcpkg/triplets/community/arm-linux.cmake
|
|
||||||
-- Fetching https://chromium.googlesource.com/libyuv/libyuv...
|
|
||||||
#这里有时候会卡很久,甚至失败,可以ctrl+c后重新执行vcpkg/vcpkg install libyuv
|
|
||||||
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:106 (message):
|
|
||||||
Command failed: /usr/bin/git fetch https://chromium.googlesource.com/libyuv/libyuv fec9121b676eccd9acea2460aec7d6ae219701b9 --depth 1 -n
|
|
||||||
Working Directory: /root/vcpkg/downloads/git-tmp
|
|
||||||
Error code: 128
|
|
||||||
See logs for more information:
|
|
||||||
/root/vcpkg/buildtrees/libyuv/git-fetch-arm-linux-err.log
|
|
||||||
|
|
||||||
Call Stack (most recent call first):
|
|
||||||
scripts/cmake/vcpkg_from_git.cmake:78 (vcpkg_execute_required_process)
|
|
||||||
ports/libyuv/portfile.cmake:3 (vcpkg_from_git)
|
|
||||||
scripts/ports.cmake:135 (include)
|
|
||||||
|
|
||||||
|
|
||||||
Error: Building package libyuv:arm-linux failed with: BUILD_FAILED
|
|
||||||
Please ensure you are using the latest portfiles with `./vcpkg update`, then
|
|
||||||
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
|
|
||||||
Package: libyuv:arm-linux
|
|
||||||
Vcpkg version: 2020.06.15-unknownhash
|
|
||||||
|
|
||||||
Additionally, attach any relevant sections from the log files above.
|
|
||||||
```
|
|
||||||
- 或者直接下载离线包[libyuv](https://pan.baidu.com/s/1NmlvsXFh2Ivc36XEyb-BIw) 提取码:xlnx 复制到vcpkg/downloads/文件夹下 (该选项是可选项,对于网络不好的情况可能会用到)继续执行
|
|
||||||
```sh
|
|
||||||
mv ./libyuv-fec9121b676eccd9acea2460aec7d6ae219701b9.tar.gz vcpkg/downloads/
|
|
||||||
vcpkg/vcpkg install libyuv
|
|
||||||
```
|
|
||||||
```sh
|
|
||||||
root@pynq:~# mv libyuv-fec9121b676eccd9acea2460aec7d6ae219701b9.tar.gz vcpkg/downloads/
|
|
||||||
root@pynq:~# vcpkg/vcpkg install libyuv
|
|
||||||
Computing installation plan...
|
|
||||||
The following packages will be built and installed:
|
|
||||||
libyuv[core]:arm-linux
|
|
||||||
Detecting compiler hash for triplet arm-linux...
|
|
||||||
Starting package 1/1: libyuv:arm-linux
|
|
||||||
Building package libyuv[core]:arm-linux...
|
|
||||||
Could not locate cached archive: /root/.cache/vcpkg/archives/36/3683c357e53932d95a037b4eb8cb74fe71c15f80.zip
|
|
||||||
-- Using community triplet arm-linux. This triplet configuration is not guaranteed to succeed.
|
|
||||||
-- [COMMUNITY] Loading triplet configuration from: /root/vcpkg/triplets/community/arm-linux.cmake
|
|
||||||
-- Using cached /root/vcpkg/downloads/libyuv-fec9121b676eccd9acea2460aec7d6ae219701b9.tar.gz
|
|
||||||
-- Extracting source /root/vcpkg/downloads/libyuv-fec9121b676eccd9acea2460aec7d6ae219701b9.tar.gz
|
|
||||||
-- Applying patch fix_cmakelists.patch
|
|
||||||
-- Applying patch fix-build-type.patch
|
|
||||||
-- Using source at /root/vcpkg/buildtrees/libyuv/src/ae219701b9-6b491b90af.clean
|
|
||||||
-- Configuring arm-linux-dbg
|
|
||||||
-- Configuring arm-linux-rel
|
|
||||||
-- Building arm-linux-dbg
|
|
||||||
-- Building arm-linux-rel
|
|
||||||
-- Installing: /root/vcpkg/packages/libyuv_arm-linux/share/libyuv/copyright
|
|
||||||
-- Performing post-build validation
|
|
||||||
-- Performing post-build validation done
|
|
||||||
Stored binary cache: /root/.cache/vcpkg/archives/36/3683c357e53932d95a037b4eb8cb74fe71c15f80.zip
|
|
||||||
Building package libyuv[core]:arm-linux... done
|
|
||||||
Installing package libyuv[core]:arm-linux...
|
|
||||||
Installing package libyuv[core]:arm-linux... done
|
|
||||||
Elapsed time for package libyuv:arm-linux: 2.266 min
|
|
||||||
|
|
||||||
Total elapsed time: 2.59 min
|
|
||||||
|
|
||||||
The package libyuv:arm-linux provides CMake targets:
|
|
||||||
|
|
||||||
find_package(libyuv CONFIG REQUIRED)
|
|
||||||
target_link_libraries(main PRIVATE yuv)
|
|
||||||
```
|
|
||||||
|
|
||||||
## 安装 libvpx
|
|
||||||
|
|
||||||
```sh
|
|
||||||
mv webmproject-libvpx-v1.9.0.tar.gz vcpkg/downloads/
|
|
||||||
cd vcpkg/downloads/
|
|
||||||
tar zxmf webmproject-libvpx-v1.9.0.tar.gz
|
|
||||||
cd libvpx-1.9.0
|
|
||||||
#prefix根据自己的vcpkg路径情况来定
|
|
||||||
./configure --prefix="/root/vcpkg/installed/arm-linux/" --disable-examples
|
|
||||||
#又是漫长等待
|
|
||||||
make -j4
|
|
||||||
make install
|
|
||||||
cd
|
|
||||||
```
|
|
||||||
|
|
||||||
```sh
|
|
||||||
root@pynq:~/vcpkg/downloads/libvpx-1.9.0# ./configure --prefix="/root/vcpkg/installed/arm-linux/" --disable-examples
|
|
||||||
disabling examples
|
|
||||||
enabling vp8_encoder
|
|
||||||
enabling vp8_decoder
|
|
||||||
enabling vp9_encoder
|
|
||||||
enabling vp9_decoder
|
|
||||||
Configuring for target 'armv7-linux-gcc'
|
|
||||||
enabling armv7
|
|
||||||
enabling neon
|
|
||||||
enabling neon_asm
|
|
||||||
enabling unit_tests
|
|
||||||
enabling webm_io
|
|
||||||
enabling libyuv
|
|
||||||
Creating makefiles for armv7-linux-gcc libs
|
|
||||||
Creating makefiles for armv7-linux-gcc tools
|
|
||||||
Creating makefiles for armv7-linux-gcc docs
|
|
||||||
```
|
|
||||||
```sh
|
|
||||||
root@pynq:~/vcpkg/downloads/libvpx-1.9.0# make install
|
|
||||||
[INSTALL] /root/vcpkg/installed/arm-linux/include/vpx/vp8.h
|
|
||||||
[INSTALL] /root/vcpkg/installed/arm-linux/include/vpx/vp8cx.h
|
|
||||||
[INSTALL] /root/vcpkg/installed/arm-linux/include/vpx/vp8dx.h
|
|
||||||
[INSTALL] /root/vcpkg/installed/arm-linux/include/vpx/vpx_codec.h
|
|
||||||
[INSTALL] /root/vcpkg/installed/arm-linux/include/vpx/vpx_frame_buffer.h
|
|
||||||
[INSTALL] /root/vcpkg/installed/arm-linux/include/vpx/vpx_image.h
|
|
||||||
[INSTALL] /root/vcpkg/installed/arm-linux/include/vpx/vpx_integer.h
|
|
||||||
[INSTALL] /root/vcpkg/installed/arm-linux/include/vpx/vpx_decoder.h
|
|
||||||
[INSTALL] /root/vcpkg/installed/arm-linux/include/vpx/vpx_encoder.h
|
|
||||||
[INSTALL] /root/vcpkg/installed/arm-linux/lib/libvpx.a
|
|
||||||
[INSTALL] /root/vcpkg/installed/arm-linux/lib/pkgconfig/vpx.pc
|
|
||||||
make[1]: Nothing to be done for 'install'.
|
|
||||||
make[1]: Nothing to be done for 'install'.
|
|
||||||
```
|
|
||||||
|
|
||||||
## 安装 opus
|
|
||||||
|
|
||||||
```sh
|
|
||||||
mv xiph-opus-5c94ec3205c30171ffd01056f5b4622b7c0ab54c.tar.gz vcpkg/downloads/
|
|
||||||
cd vcpkg/downloads/
|
|
||||||
tar zxmf xiph-opus-5c94ec3205c30171ffd01056f5b4622b7c0ab54c.tar.gz
|
|
||||||
cd opus-5c94ec3205c30171ffd01056f5b4622b7c0ab54c
|
|
||||||
./autogen.sh
|
|
||||||
#prefix根据自己的vcpkg路径情况来定
|
|
||||||
./configure --prefix="/root/vcpkg/installed/arm-linux/" CFLAGS="-Os" --enable-fixed-point --enable-intrinsics --host=arm-linux
|
|
||||||
make -j4
|
|
||||||
make install
|
|
||||||
cd
|
|
||||||
```
|
|
||||||
|
|
||||||
```sh
|
|
||||||
root@pynq:~/vcpkg/downloads/opus-5c94ec3205c30171ffd01056f5b4622b7c0ab54c# ./autogen.sh
|
|
||||||
Updating build configuration files, please wait....
|
|
||||||
libtoolize: putting auxiliary files in '.'.
|
|
||||||
libtoolize: linking file './ltmain.sh'
|
|
||||||
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
|
|
||||||
libtoolize: linking file 'm4/libtool.m4'
|
|
||||||
libtoolize: linking file 'm4/ltoptions.m4'
|
|
||||||
libtoolize: linking file 'm4/ltsugar.m4'
|
|
||||||
libtoolize: linking file 'm4/ltversion.m4'
|
|
||||||
libtoolize: linking file 'm4/lt~obsolete.m4'
|
|
||||||
configure.ac:38: installing './compile'
|
|
||||||
configure.ac:36: installing './config.guess'
|
|
||||||
configure.ac:36: installing './config.sub'
|
|
||||||
configure.ac:33: installing './install-sh'
|
|
||||||
configure.ac:33: installing './missing'
|
|
||||||
Makefile.am:319: warning: '%'-style pattern rules are a GNU make extension
|
|
||||||
Makefile.am:322: warning: '%'-style pattern rules are a GNU make extension
|
|
||||||
Makefile.am: installing './INSTALL'
|
|
||||||
Makefile.am: installing './depcomp'
|
|
||||||
parallel-tests: installing './test-driver'
|
|
||||||
```
|
|
||||||
|
|
||||||
```sh
|
|
||||||
configure:
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
opus unknown: Automatic configuration OK.
|
|
||||||
|
|
||||||
Compiler support:
|
|
||||||
|
|
||||||
C99 var arrays: ................ yes
|
|
||||||
C99 lrintf: .................... yes
|
|
||||||
Use alloca: .................... no (using var arrays)
|
|
||||||
|
|
||||||
General configuration:
|
|
||||||
|
|
||||||
Floating point support: ........ no
|
|
||||||
Fast float approximations: ..... no
|
|
||||||
Fixed point debugging: ......... no
|
|
||||||
Inline Assembly Optimizations: . ARM (EDSP) (Media)
|
|
||||||
External Assembly Optimizations: ARM (EDSP) (Media)
|
|
||||||
Intrinsics Optimizations: ...... ARM (NEON)
|
|
||||||
Run-time CPU detection: ........ ARM (NEON) (NEON Intrinsics)
|
|
||||||
Custom modes: .................. no
|
|
||||||
Assertion checking: ............ no
|
|
||||||
Hardening: ..................... yes
|
|
||||||
Fuzzing: ....................... no
|
|
||||||
Check ASM: ..................... no
|
|
||||||
|
|
||||||
API documentation: ............. yes
|
|
||||||
Extra programs: ................ yes
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Type "make; make install" to compile and install
|
|
||||||
Type "make check" to run the test suite
|
|
||||||
```
|
|
||||||
|
|
||||||
## 构建
|
|
||||||
|
|
||||||
```sh
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
||||||
source $HOME/.cargo/env
|
|
||||||
#git clone https://github.com/rustdesk/rustdesk
|
|
||||||
#目前只测试过rustdesk-1.1.8版本
|
|
||||||
#https://github.com/rustdesk/rustdesk/archive/refs/tags/1.1.8.zip
|
|
||||||
tar zxmf rustdesk-1.1.8.tar.gz
|
|
||||||
mv rustdesk-1.1.8 rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
#需要修改rustdesk/Cargo.toml两个地方:
|
|
||||||
#第3行:version = "1.1.6"-> version = "1.1.8"
|
|
||||||
#第20行:whoami = "1.1" -> whoami = "1.2"
|
|
||||||
#需要修改rustdesk/libs/hbb_common/Cargo.toml一个地方:
|
|
||||||
#第27行:confy = { git = "https://github.com/open-trade/confy" } -> confy = "0.4"
|
|
||||||
cargo build --release
|
|
||||||
#接下来漫长等待
|
|
||||||
#如果是下载阶段感觉不顺畅的,可以ctrl+c结束后重试,直到成功为止
|
|
||||||
```
|
|
||||||
|
|
||||||
```sh
|
|
||||||
root@pynq:~/rustdesk# cargo build --release
|
|
||||||
Updating crates.io index
|
|
||||||
error: failed to get `block` as a dependency of package `scrap v0.5.0 (/root/rustdesk/libs/scrap)`
|
|
||||||
|
|
||||||
Caused by:
|
|
||||||
failed to fetch `https://github.com/rust-lang/crates.io-index`
|
|
||||||
|
|
||||||
Caused by:
|
|
||||||
network failure seems to have happened
|
|
||||||
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
|
|
||||||
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
|
|
||||||
|
|
||||||
Caused by:
|
|
||||||
SSL error: received early EOF; class=Ssl (16); code=Eof (-20)
|
|
||||||
|
|
||||||
#遇到这种情况不要惊慌,重试即可,整个过程可能会出现数次。如果有什么好的方法也可以告诉我^_^
|
|
||||||
```
|
|
||||||
|
|
||||||
```sh
|
|
||||||
root@pynq:~/rustdesk# cargo build --release
|
|
||||||
Updating crates.io index
|
|
||||||
Updating git repository `https://github.com/open-trade/confy`
|
|
||||||
warning: spurious network error (2 tries remaining): SSL error: syscall failure: Broken pipe; class=Os (2)
|
|
||||||
error: failed to get `confy` as a dependency of package `hbb_common v0.1.0 (/root/rustdesk/libs/hbb_common)`
|
|
||||||
|
|
||||||
Caused by:
|
|
||||||
failed to load source for dependency `confy`
|
|
||||||
|
|
||||||
Caused by:
|
|
||||||
Unable to update https://github.com/open-trade/confy#27fa1294
|
|
||||||
|
|
||||||
Caused by:
|
|
||||||
failed to clone into: /root/.cargo/git/db/confy-90047e480c044d79
|
|
||||||
|
|
||||||
Caused by:
|
|
||||||
network failure seems to have happened
|
|
||||||
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
|
|
||||||
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
|
|
||||||
|
|
||||||
Caused by:
|
|
||||||
SSL error: received early EOF; class=Ssl (16); code=Eof (-20)
|
|
||||||
|
|
||||||
#需要修改rustdesk/libs/hbb_common/Cargo.toml一个地方:
|
|
||||||
#第27行:confy = { git = "https://github.com/open-trade/confy" } -> confy = "0.4"
|
|
||||||
```
|
|
||||||
如果你到了这一步,恭喜你,你已经离成功不远了!
|
|
||||||
```sh
|
|
||||||
Compiling rustdesk v1.1.8 (/root/rustdesk)
|
|
||||||
warning: `hbb_common` (lib) generated 1 warning
|
|
||||||
Finished release [optimized] target(s) in 141m 20s
|
|
||||||
```
|
|
||||||
## 测试
|
|
||||||
- 查看版本号
|
|
||||||
```sh
|
|
||||||
root@pynq:~/rustdesk# ./target/release/rustdesk --version
|
|
||||||
1.1.8
|
|
||||||
```
|
|
||||||
- 运行服务
|
|
||||||
```sh
|
|
||||||
root@pynq:~/rustdesk# ./target/release/rustdesk --service
|
|
||||||
[2022-05-19T06:48:44Z INFO rustdesk] start --service
|
|
||||||
[2022-05-19T06:48:46Z INFO rustdesk] start --server
|
|
||||||
[2022-05-19T06:48:46Z INFO rustdesk::server] DISPLAY=Err(NotPresent)
|
|
||||||
[2022-05-19T06:48:46Z INFO rustdesk::server] XAUTHORITY=Err(NotPresent)
|
|
||||||
[2022-05-19T06:48:46Z INFO rustdesk::ipc] Started ipc server at path: /tmp/RustDesk/ipc
|
|
||||||
[2022-05-19T06:48:46Z ERROR rustdesk::server::clipboard_service] Failed to start clipboard: Unknown error while interacting with the clipboard: Display parsing error
|
|
||||||
[2022-05-19T06:48:46Z INFO rustdesk::common] Testing nat ...
|
|
||||||
[2022-05-19T06:48:46Z INFO rustdesk::rendezvous_mediator] start rendezvous mediator of rs-ny.rustdesk.com
|
|
||||||
[2022-05-19T06:48:46Z INFO rustdesk::rendezvous_mediator] start rendezvous mediator of rs-sg.rustdesk.com
|
|
||||||
[2022-05-19T06:48:51Z INFO rustdesk::rendezvous_mediator] start rendezvous mediator of rs-cn.rustdesk.com
|
|
||||||
[2022-05-19T06:48:51Z INFO rustdesk::rendezvous_mediator] register_pk of rs-sg due to key not confirmed
|
|
||||||
[2022-05-19T06:48:51Z INFO rustdesk::rendezvous_mediator] register_pk of rs-ny due to key not confirmed
|
|
||||||
[2022-05-19T06:48:51Z INFO rustdesk::rendezvous_mediator] machine uid: 1bb53cb1093f458aa5d68063d06aa39f
|
|
||||||
[2022-05-19T06:48:51Z INFO rustdesk::rendezvous_mediator] machine uid: 1bb53cb1093f458aa5d68063d06aa39f
|
|
||||||
[2022-05-19T06:48:51Z INFO rustdesk::rendezvous_mediator] register_pk of rs-cn due to key not confirmed
|
|
||||||
[2022-05-19T06:48:51Z INFO rustdesk::rendezvous_mediator] machine uid: 1bb53cb1093f458aa5d68063d06aa39f
|
|
||||||
[2022-05-19T06:48:51Z INFO rustdesk::rendezvous_mediator] UUID_MISMATCH received from rs-cn.rustdesk.com
|
|
||||||
[2022-05-19T06:48:51Z INFO hbb_common::config] id updated from xxxxxx to xxxxxxx (hide id)
|
|
||||||
[2022-05-19T06:48:51Z INFO rustdesk::rendezvous_mediator] machine uid: 1bb53cb1093f458aa5d68063d06aa39f
|
|
||||||
[2022-05-19T06:48:52Z INFO rustdesk::common] Tested nat type: ASYMMETRIC in 6.084360199s
|
|
||||||
[2022-05-19T06:49:04Z INFO rustdesk::rendezvous_mediator] register_pk of rs-sg due to key not confirmed
|
|
||||||
[2022-05-19T06:49:04Z INFO rustdesk::rendezvous_mediator] machine uid: 1bb53cb1093f458aa5d68063d06aa39f
|
|
||||||
[2022-05-19T06:49:04Z INFO rustdesk::rendezvous_mediator] register_pk of rs-ny due to key not confirmed
|
|
||||||
[2022-05-19T06:49:04Z INFO rustdesk::rendezvous_mediator] machine uid: 1bb53cb1093f458aa5d68063d06aa39f
|
|
||||||
[2022-05-19T06:49:05Z INFO rustdesk::rendezvous_mediator] register_pk of rs-sg due to key not confirmed
|
|
||||||
[2022-05-19T06:49:05Z INFO rustdesk::rendezvous_mediator] machine uid: 1bb53cb1093f458aa5d68063d06aa39f
|
|
||||||
```
|
|
||||||
别高兴太早,启动服务只是获取了ID,你需要设置密码才能被其他终端访问。
|
|
||||||
- 设置密码
|
|
||||||
```sh
|
|
||||||
root@pynq:~/rustdesk# ./target/release/rustdesk --password qwertyuiop123123 #密码请随意,这只是个例子
|
|
||||||
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Connection refused (os error 111)', src/main.rs:106:55
|
|
||||||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
|
||||||
#虽然有错误提示,但不影响设置密码
|
|
||||||
```
|
|
||||||
- 重启服务,等待连接
|
|
||||||
```sh
|
|
||||||
root@pynq:~/rustdesk# ./target/release/rustdesk --service &
|
|
||||||
[1] 20186
|
|
||||||
```
|
|
||||||
你可能会立刻打开PC版的rustdesk直接连接,不过连接之后你会发现
|
|
||||||
```sh
|
|
||||||
Unsupported display server type tty,x11 expected
|
|
||||||
```
|
|
||||||
如果你想要看到桌面,可能需要得到[sciter](https://sciter.com/)的支持,接下来我给出一种命令行连接的方式,这基于你在Windows PC或者Linux PC上安装了rustdesk。下面以Windows 7为例,测试目标机的SSH功能:
|
|
||||||
```sh
|
|
||||||
#找到你安装RustDesk的位置
|
|
||||||
C:\Users\Administrator\Desktop>cd C:\Program Files\RustDesk
|
|
||||||
C:\Program Files\RustDesk>RustDesk.exe --port-forward ur_dev_id 11000 127.0.0.1 22
|
|
||||||
```
|
|
||||||
然后用SSH客户端去连接本地IP和端口
|
|
||||||
```sh
|
|
||||||
Connecting to 127.0.0.1:11000...
|
|
||||||
Connection established.
|
|
||||||
To escape to local shell, press 'Ctrl+Alt+]'.
|
|
||||||
|
|
||||||
Welcome to PYNQ Linux, based on Ubuntu 18.04 (GNU/Linux 4.14.0-xilinx armv7l)
|
|
||||||
|
|
||||||
* Super-optimized for small spaces - read how we shrank the memory
|
|
||||||
footprint of MicroK8s to make it the smallest full K8s around.
|
|
||||||
|
|
||||||
https://ubuntu.com/blog/microk8s-memory-optimisation
|
|
||||||
Last login: Thu May 19 07:33:22 2022 from 127.0.0.1
|
|
||||||
root@pynq:~#
|
|
||||||
```
|
|
||||||
连接的过程会弹出输入远程机密码,建议选上记住密码,这样下次你就可以直接在rustdesk APP上看到连接记录,并直接用APP上的TCP隧道功能连接而非命令行方式。当然,最好建议[@rustdesk](https://github.com/rustdesk)在APP界面上的[传输文件]()按钮左边再加一个[TCP隧道]()按钮,这样就不用命令行就可以连接目标设备了。
|
|
@ -1,35 +0,0 @@
|
|||||||
---
|
|
||||||
title: Docker
|
|
||||||
weight: 30
|
|
||||||
---
|
|
||||||
|
|
||||||
## Mit Docker erstellen
|
|
||||||
### Funktioniert nicht unter Windows
|
|
||||||
|
|
||||||
Beginnen Sie mit dem Klonen des Repositorys und der Erstellung des Docker-Containers:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
docker build -t "rustdesk-builder" .
|
|
||||||
```
|
|
||||||
|
|
||||||
Führen Sie dann jedes Mal, wenn Sie die Anwendung erstellen müssen, den folgenden Befehl aus:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git -v rustdesk-registry-cache:/home/user/.cargo/registry -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder
|
|
||||||
```
|
|
||||||
|
|
||||||
Beachten Sie, dass die erste Erstellung länger dauern kann, bis die Abhängigkeiten zwischengespeichert sind. Nachfolgende Erstellungen werden schneller sein. Wenn Sie zusätzlich andere Argumente für den Build-Befehl angeben müssen, können Sie dies am Ende des Befehls an der Position `<OPTIONAL-ARGS>` tun. Wenn Sie zum Beispiel eine optimierte Release-Version bauen wollen, würden Sie den obigen Befehl gefolgt von `--release` ausführen. Die resultierende ausführbare Datei wird im Zielordner auf Ihrem System verfügbar sein und kann ausgeführt werden mit:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/debug/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
Oder, wenn Sie eine Release-Version ausführen:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/release/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
Bitte stellen Sie sicher, dass Sie diese Befehle aus dem Stammverzeichnis des RustDesk-Repositorys ausführen, da die Anwendung sonst möglicherweise nicht in der Lage ist, die erforderlichen Ressourcen zu finden. Beachten Sie auch, dass andere Cargo-Unterbefehle wie `install` oder `run` derzeit nicht über diese Methode unterstützt werden, da sie das Programm innerhalb des Containers anstatt des Hosts installieren oder ausführen würden.
|
|
@ -1,35 +0,0 @@
|
|||||||
---
|
|
||||||
title: Docker
|
|
||||||
weight: 30
|
|
||||||
---
|
|
||||||
|
|
||||||
## How to build with Docker
|
|
||||||
### This won't work on Windows
|
|
||||||
|
|
||||||
Begin by cloning the repository and building the Docker container:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --depth=1 https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
docker build -t "rustdesk-builder" .
|
|
||||||
```
|
|
||||||
|
|
||||||
Then, each time you need to build the application, run the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git -v rustdesk-registry-cache:/home/user/.cargo/registry -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder
|
|
||||||
```
|
|
||||||
|
|
||||||
Note that the first build may take longer before dependencies are cached, subsequent builds will be faster. Additionally, if you need to specify different arguments to the build command, you may do so at the end of the command in the `<OPTIONAL-ARGS>` position. For instance, if you wanted to build an optimized release version, you would run the command above followed by `--release`. The resulting executable will be available in the target folder on your system, and can be run with:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/debug/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
Or, if you're running a release executable:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/release/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
Please ensure that you are running these commands from the root of the RustDesk repository, otherwise the application may be unable to find the required resources. Also note that other cargo subcommands such as `install` or `run` are not currently supported via this method as they would install or run the program inside the container instead of the host.
|
|
@ -1,36 +0,0 @@
|
|||||||
---
|
|
||||||
title: Docker
|
|
||||||
weight: 30
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
## Cómo compilar con Docker
|
|
||||||
### Esto no funcionará en Windows
|
|
||||||
|
|
||||||
Comience clonando el repositorio y construyendo el contenedor docker:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
docker build -t "rustdesk-builder" .
|
|
||||||
```
|
|
||||||
|
|
||||||
Luego, cada vez que necesite compilar la aplicación, ejecute el siguiente comando:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git -v rustdesk-registry-cache:/home/user/.cargo/registry -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder
|
|
||||||
```
|
|
||||||
|
|
||||||
Tenga en cuenta que la primera compilación puede demorar más antes de que las dependencias se almacenen en caché, las compilaciones posteriores serán más rápidas. Además, si necesita especificar diferentes argumentos para el comando de compilación, puede hacerlo al final del comando en el `<OPTIONAL-ARGS>` posición. Por ejemplo, si quisiera crear una versión de lanzamiento optimizada, ejecutaría el comando anterior seguido de `--release`. El ejecutable resultante estará disponible en la carpeta de destino de su sistema y se puede ejecutar con:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/debug/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
O, si está ejecutando un ejecutable de versión:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/release/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
Asegúrese de ejecutar estos comandos desde la raíz del repositorio de RustDesk; de lo contrario, es posible que la aplicación no pueda encontrar los recursos necesarios. También tenga en cuenta que otros subcomandos de carga como `install` o `run` actualmente no se admiten a través de este método, ya que instalarían o ejecutarían el programa dentro del contenedor en lugar del host.
|
|
@ -1,35 +0,0 @@
|
|||||||
---
|
|
||||||
title: Docker
|
|
||||||
weight: 30
|
|
||||||
---
|
|
||||||
|
|
||||||
## Comment construire avec Docker
|
|
||||||
### Cela ne fonctionnera pas sous Windows
|
|
||||||
|
|
||||||
Commencez par cloner le dépôt et construire le conteneur Docker :
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
docker build -t "rustdesk-builder" .
|
|
||||||
```
|
|
||||||
|
|
||||||
Ensuite, chaque fois que vous devez compiler le logiciel, exécutez la commande suivante :
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git -v rustdesk-registry-cache:/home/user/.cargo/registry -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder
|
|
||||||
```
|
|
||||||
|
|
||||||
Notez que la première compilation peut prendre plus de temps avant que les dépendances ne soient mises en cache, les compilations suivantes seront plus rapides. De plus, si vous devez spécifier différents arguments à la commande de compilation, vous pouvez le faire à la fin de la commande à la position "<OPTIONAL-ARGS>". Par exemple, si vous voulez compiler une version de release optimisée, vous devez exécuter la commande ci-dessus suivie de `--release`. L'exécutable résultant sera disponible dans le dossier cible sur votre système, et peut être lancé avec :
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/debug/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
Ou, si vous exécutez un exécutable provenant d'une release :
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/release/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
Veuillez vous assurer que vous exécutez ces commandes à partir de la racine du dépôt RustDesk, sinon l'application ne pourra pas trouver les ressources requises. Notez également que les autres sous-commandes de cargo telles que "install" ou "run" ne sont pas actuellement supportées par cette méthode car elles installeraient ou exécuteraient le programme à l'intérieur du conteneur au lieu de l'hôte.
|
|
@ -1,35 +0,0 @@
|
|||||||
---
|
|
||||||
title: Docker
|
|
||||||
weight: 30
|
|
||||||
---
|
|
||||||
|
|
||||||
## Come compilare con Docker
|
|
||||||
### Questo non funzionerà su Windows
|
|
||||||
|
|
||||||
Cominciare clonando il repository e compilare i container docker:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
docker build -t "rustdesk-builder" .
|
|
||||||
```
|
|
||||||
|
|
||||||
Quindi, ogni volta che devi compilare l'applicazione, esegui il comando seguente:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git -v rustdesk-registry-cache:/home/user/.cargo/registry -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder
|
|
||||||
```
|
|
||||||
|
|
||||||
Tieni presente che la prima build potrebbe richiedere più tempo prima che le dipendenze vengano memorizzate nella cache, le build successive saranno più veloci. Inoltre, se hai bisogno di specificare argomenti diversi per il comando build, puoi farlo alla fine del comando nella posizione `<OPTIONAL-ARGS>`. Ad esempio, se si desidera creare una versione di rilascio ottimizzata, eseguire il comando sopra seguito da `--release`. L'eseguibile generato sarà creato nella cartella di destinazione del proprio sistema e può essere eseguito con:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/debug/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
Oppure, se si sta eseguendo un eseguibile di rilascio:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/release/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
Assicurati di eseguire questi comandi dalla radice del repository RustDesk, altrimenti l'applicazione potrebbe non essere in grado di trovare le risorse richieste. Notare inoltre che altri sottocomandi cargo come `install` o `run` non sono attualmente supportati tramite questo metodo poiché installerebbero o eseguirebbero il programma all'interno del container anziché nell'host.
|
|
@ -1,35 +0,0 @@
|
|||||||
---
|
|
||||||
title: Docker
|
|
||||||
weight: 30
|
|
||||||
---
|
|
||||||
|
|
||||||
# Dockerでビルドする方法
|
|
||||||
|
|
||||||
リポジトリのクローンを作成し、Dockerコンテナを構築することから始めます。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
docker build -t "rustdesk-builder" .
|
|
||||||
```
|
|
||||||
|
|
||||||
その後、アプリケーションをビルドする必要があるたびに、以下のコマンドを実行します。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git -v rustdesk-registry-cache:/home/user/.cargo/registry -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder
|
|
||||||
```
|
|
||||||
|
|
||||||
なお、最初のビルドでは、依存関係がキャッシュされるまで時間がかかることがありますが、その後のビルドではより速くなります。さらに、ビルドコマンドに別の引数を指定する必要がある場合は、コマンドの最後にある `<OPTIONAL-ARGS>` の位置で指定することができます。例えば、最適化されたリリースバージョンをビルドしたい場合は、上記のコマンドの後に
|
|
||||||
`--release` を実行します。できあがった実行ファイルは、システムのターゲット・フォルダに格納され、次のコマンドで実行できます。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/debug/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
あるいは、リリース用の実行ファイルを実行している場合:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/release/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
これらのコマンドをRustDeskリポジトリのルートから実行していることを確認してください。そうしないと、アプリケーションが必要なリソースを見つけられない可能性があります。また、 `install` や `run` などの他の cargo サブコマンドは、ホストではなくコンテナ内にプログラムをインストールまたは実行するため、現在この方法ではサポートされていないことに注意してください。
|
|
@ -1,35 +0,0 @@
|
|||||||
---
|
|
||||||
title: Docker
|
|
||||||
weight: 30
|
|
||||||
---
|
|
||||||
|
|
||||||
## Como compilar com Docker
|
|
||||||
### Isto não funcionará no Windows
|
|
||||||
|
|
||||||
Comece clonando o repositório e compilando o container Docker:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --depth=1 https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
docker build -t "rustdesk-builder" .
|
|
||||||
```
|
|
||||||
|
|
||||||
Em seguida, sempre que precisar compilar a aplicação, execute o seguinte comando:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git -v rustdesk-registry-cache:/home/user/.cargo/registry -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder
|
|
||||||
```
|
|
||||||
|
|
||||||
Note que a primeira compilação pode demorar mais antes das dependências serem armazenadas em cache, compilações subsequentes serão mais rápidas. Além disso, se precisar especificar argumentos diferentes para o comando de compilação, pode fazê-lo no final do comando na posição `<OPTIONAL-ARGS>`. Por exemplo, se quiser compilar uma versão de lançamento otimizada, executaria o comando acima seguido de `--release`. O executável resultante estará disponível na pasta target do seu sistema e pode ser executado com:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/debug/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
Ou, se estiver executando um executável de lançamento:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/release/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
Certifique-se de que está executando estes comandos a partir da raiz do repositório RustDesk, caso contrário a aplicação pode não conseguir encontrar os recursos necessários. Note também que outros subcomandos do cargo como `install` ou `run` não são atualmente suportados através deste método, pois instalariam ou executariam o programa dentro do container em vez do host.
|
|
@ -1,86 +0,0 @@
|
|||||||
---
|
|
||||||
title: Docker
|
|
||||||
weight: 30
|
|
||||||
---
|
|
||||||
|
|
||||||
# 使用 Docker 编译
|
|
||||||
|
|
||||||
首先克隆存储库并构建 docker 容器:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
docker build -t "rustdesk-builder" .
|
|
||||||
```
|
|
||||||
|
|
||||||
针对国内网络访问问题,可以做以下几点优化:
|
|
||||||
|
|
||||||
1. Dockerfile 中修改系统的源到国内镜像
|
|
||||||
|
|
||||||
```
|
|
||||||
在Dockerfile的RUN apt update之前插入两行:
|
|
||||||
|
|
||||||
RUN sed -i "s/deb.debian.org/mirrors.163.com/g" /etc/apt/sources.list
|
|
||||||
RUN sed -i "s/security.debian.org/mirrors.163.com/g" /etc/apt/sources.list
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 修改容器系统中的 cargo 源,在`RUN ./rustup.sh -y`后插入下面代码:
|
|
||||||
|
|
||||||
```
|
|
||||||
RUN echo '[source.crates-io]' > ~/.cargo/config \
|
|
||||||
&& echo 'registry = "https://github.com/rust-lang/crates.io-index"' >> ~/.cargo/config \
|
|
||||||
&& echo '# 替换成你偏好的镜像源' >> ~/.cargo/config \
|
|
||||||
&& echo "replace-with = 'sjtu'" >> ~/.cargo/config \
|
|
||||||
&& echo '# 上海交通大学' >> ~/.cargo/config \
|
|
||||||
&& echo '[source.sjtu]' >> ~/.cargo/config \
|
|
||||||
&& echo 'registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index"' >> ~/.cargo/config \
|
|
||||||
&& echo '' >> ~/.cargo/config
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Dockerfile 中加入代理的 env
|
|
||||||
|
|
||||||
```
|
|
||||||
在User root后插入两行
|
|
||||||
|
|
||||||
ENV http_proxy=http://host:port
|
|
||||||
ENV https_proxy=http://host:port
|
|
||||||
```
|
|
||||||
|
|
||||||
4. docker build 命令后面加上 proxy 参数
|
|
||||||
|
|
||||||
```
|
|
||||||
docker build -t "rustdesk-builder" . --build-arg http_proxy=http://host:port --build-arg https_proxy=http://host:port
|
|
||||||
```
|
|
||||||
|
|
||||||
然后,每次需要构建应用程序时,运行以下命令:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git -v rustdesk-registry-cache:/home/user/.cargo/registry -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder
|
|
||||||
```
|
|
||||||
|
|
||||||
运行若遇到无权限问题,出现以下提示:
|
|
||||||
|
|
||||||
```
|
|
||||||
usermod: user user is currently used by process 1
|
|
||||||
groupmod: Permission denied.
|
|
||||||
groupmod: cannot lock /etc/group; try again later.
|
|
||||||
```
|
|
||||||
|
|
||||||
可以尝试把`-e PUID="$(id -u)" -e PGID="$(id -g)"`参数去掉。(出现这一问题的原因是容器中的 entrypoint 脚本中判定 uid 和 gid 与给定的环境变量不一致时会修改 user 的 uid 和 gid 重新运行,但是重新运行时取不到环境变量中的 uid 和 gid 了,会再次进入 uid 与 gid 与给定值不一致的逻辑分支)
|
|
||||||
|
|
||||||
请注意,第一次构建可能需要比较长的时间,因为需要缓存依赖项(国内网络经常出现拉取失败,可多尝试几次),后续构建会更快。此外,如果您需要为构建命令指定不同的参数,
|
|
||||||
您可以在命令末尾的 `<OPTIONAL-ARGS>` 位置执行此操作。例如,如果你想构建一个优化的发布版本,你可以在命令后跟 `--release`。
|
|
||||||
将在 target 下产生可执行程序,请通过以下方式运行调试版本:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/debug/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
或者运行发布版本:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/release/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
请确保您从 RustDesk 存储库的根目录运行这些命令,否则应用程序可能无法找到所需的资源。另请注意,此方法当前不支持其他`Cargo`子命令,
|
|
||||||
例如 `install` 或 `run`,因为运行在容器里,而不是宿主机上。
|
|
@ -1,47 +0,0 @@
|
|||||||
---
|
|
||||||
title: Docker
|
|
||||||
weight: 30
|
|
||||||
---
|
|
||||||
|
|
||||||
# 使用 Docker 編譯
|
|
||||||
|
|
||||||
首先克隆存儲庫並構建 docker 容器:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
docker build -t "rustdesk-builder" .
|
|
||||||
```
|
|
||||||
|
|
||||||
然後,每次需要構建應用程序時,運行以下命令:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git -v rustdesk-registry-cache:/home/user/.cargo/registry -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder
|
|
||||||
```
|
|
||||||
|
|
||||||
運行若遇到無權限問題,出現以下提示:
|
|
||||||
|
|
||||||
```
|
|
||||||
usermod: user user is currently used by process 1
|
|
||||||
groupmod: Permission denied.
|
|
||||||
groupmod: cannot lock /etc/group; try again later.
|
|
||||||
```
|
|
||||||
|
|
||||||
可以嘗試把`-e PUID="$(id -u)" -e PGID="$(id -g)"`參數去掉。 (出現這一問題的原因是容器中的 entrypoint 腳本中判定 uid 和 gid 與給定的環境變量不一致時會修改 user 的 uid 和 gid 重新運行,但是重新運行時取不到環境變量中的 uid 和 gid 了,會再次進入 uid 與 gid 與給定值不一致的邏輯分支)
|
|
||||||
|
|
||||||
請注意,第一次構建可能需要比較長的時間,因為需要緩存依賴項(國內網絡經常出現拉取失敗,可多嘗試幾次),後續構建會更快。此外,如果您需要為構建命令指定不同的參數,
|
|
||||||
您可以在命令末尾的 `<OPTIONAL-ARGS>` 位置執行此操作。例如,如果你想構建一個優化的發布版本,你可以在命令後跟 `--release`。
|
|
||||||
將在 target 下產生可執行程序,請通過以下方式運行調試版本:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/debug/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
或者運行發布版本:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
target/release/rustdesk
|
|
||||||
```
|
|
||||||
|
|
||||||
請確保您從 RustDesk 存儲庫的根目錄運行這些命令,否則應用程序可能無法找到所需的資源。另請注意,此方法當前不支持其他`Cargo`子命令,
|
|
||||||
例如 `install` 或 `run`,因為運行在容器裡,而不是宿主機上。
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: iOS
|
|
||||||
weight: 23
|
|
||||||
---
|
|
||||||
|
|
||||||
```
|
|
||||||
cd
|
|
||||||
# Um Ihre und unsere Zeit zu sparen, haben wir abhängige Dateien für Sie vorbereitet.
|
|
||||||
https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/ios_dep.tar.gz
|
|
||||||
tar xzf ios_dep.tar.gz
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
# Für den Simulator: VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_x64.sh
|
|
||||||
VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh
|
|
||||||
cd flutter
|
|
||||||
dart pub global activate ffigen
|
|
||||||
# Viel Glück!
|
|
||||||
# Für den Simulator: sed 's/aarch64/x86_64/g' ios/Runner.xcodeproj/project.pbxproj
|
|
||||||
# Bei Bedarf vergessen: cd ios; pod install; cd -;
|
|
||||||
flutter run
|
|
||||||
```
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: iOS
|
|
||||||
weight: 23
|
|
||||||
---
|
|
||||||
|
|
||||||
```
|
|
||||||
cd
|
|
||||||
# For saving your time and our time, we prepared dependent files for you.
|
|
||||||
https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/ios_dep.tar.gz
|
|
||||||
tar xzf ios_dep.tar.gz
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
# For simulator: VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_x64.sh
|
|
||||||
VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh
|
|
||||||
cd flutter
|
|
||||||
dart pub global activate ffigen
|
|
||||||
# Good Luck!
|
|
||||||
# For simulator: sed 's/aarch64/x86_64/g' ios/Runner.xcodeproj/project.pbxproj
|
|
||||||
# Forget if need: cd ios; pod install; cd -;
|
|
||||||
flutter run
|
|
||||||
```
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: iOS
|
|
||||||
weight: 23
|
|
||||||
---
|
|
||||||
|
|
||||||
```
|
|
||||||
cd
|
|
||||||
# Para ahorrar su tiempo y el nuestro, preparamos archivos dependientes para usted.
|
|
||||||
https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/ios_dep.tar.gz
|
|
||||||
tar xzf ios_dep.tar.gz
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
# Para simulador: VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_x64.sh
|
|
||||||
VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh
|
|
||||||
cd flutter
|
|
||||||
dart pub global activate ffigen
|
|
||||||
# Buena suerte!
|
|
||||||
# Para simulador: sed 's/aarch64/x86_64/g' ios/Runner.xcodeproj/project.pbxproj
|
|
||||||
# Olvídese si es necesario: cd ios; pod install; cd -;
|
|
||||||
flutter run
|
|
||||||
```
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: iOS
|
|
||||||
weight: 23
|
|
||||||
---
|
|
||||||
|
|
||||||
```
|
|
||||||
cd
|
|
||||||
# Pour économiser votre temps et le nôtre, nous avons préparé pour vous les dépendances.
|
|
||||||
https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/ios_dep.tar.gz
|
|
||||||
tar xzf ios_dep.tar.gz
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
# Pour la simulation: VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_x64.sh
|
|
||||||
VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh
|
|
||||||
cd flutter
|
|
||||||
dart pub global activate ffigen
|
|
||||||
# Bonne chance!
|
|
||||||
# Pour la simulation: sed 's/aarch64/x86_64/g' ios/Runner.xcodeproj/project.pbxproj
|
|
||||||
# Si besoin: cd ios; pod install; cd -;
|
|
||||||
flutter run
|
|
||||||
```
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: iOS
|
|
||||||
weight: 23
|
|
||||||
---
|
|
||||||
|
|
||||||
```
|
|
||||||
cd
|
|
||||||
# Per risparmiare il tuo tempo e il nostro tempo, abbiamo preparato file dipendenti per te.
|
|
||||||
https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/ios_dep.tar.gz
|
|
||||||
tar xzf ios_dep.tar.gz
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
# Per il simulatore: VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_x64.sh
|
|
||||||
VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh
|
|
||||||
cd flutter
|
|
||||||
dart pub global activate ffigen
|
|
||||||
# Buona fortuna!
|
|
||||||
# Per il simulatore: sed 's/aarch64/x86_64/g' ios/Runner.xcodeproj/project.pbxproj
|
|
||||||
# Dimentica se necessario: cd ios; pod install; cd -;
|
|
||||||
flutter run
|
|
||||||
```
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: iOS
|
|
||||||
weight: 23
|
|
||||||
---
|
|
||||||
|
|
||||||
```
|
|
||||||
cd
|
|
||||||
# あなたと私たちの時間を節約するため、依存ファイルを準備しました。
|
|
||||||
https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/ios_dep.tar.gz
|
|
||||||
tar xzf ios_dep.tar.gz
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
# シミュレーター用: VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_x64.sh
|
|
||||||
VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh
|
|
||||||
cd flutter
|
|
||||||
dart pub global activate ffigen
|
|
||||||
# 幸運を!
|
|
||||||
# シミュレーター用: sed 's/aarch64/x86_64/g' ios/Runner.xcodeproj/project.pbxproj
|
|
||||||
# 必要な場合は忘れずに: cd ios; pod install; cd -;
|
|
||||||
flutter run
|
|
||||||
```
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: iOS
|
|
||||||
weight: 23
|
|
||||||
---
|
|
||||||
|
|
||||||
```
|
|
||||||
cd
|
|
||||||
# Para poupar seu tempo e nosso tempo, preparamos arquivos de dependência para você.
|
|
||||||
https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/ios_dep.tar.gz
|
|
||||||
tar xzf ios_dep.tar.gz
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
# Para simulador: VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_x64.sh
|
|
||||||
VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh
|
|
||||||
cd flutter
|
|
||||||
dart pub global activate ffigen
|
|
||||||
# Boa sorte!
|
|
||||||
# Para simulador: sed 's/aarch64/x86_64/g' ios/Runner.xcodeproj/project.pbxproj
|
|
||||||
# Esqueça se precisar: cd ios; pod install; cd -;
|
|
||||||
flutter run
|
|
||||||
```
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: iOS
|
|
||||||
weight: 23
|
|
||||||
---
|
|
||||||
|
|
||||||
```
|
|
||||||
cd
|
|
||||||
# 为了节省您和我们的时间,我们为您准备了依赖文件。
|
|
||||||
https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/ios_dep.tar.gz
|
|
||||||
tar xzf ios_dep.tar.gz
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
# 对于模拟器:VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_x64.sh
|
|
||||||
VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh
|
|
||||||
cd flutter
|
|
||||||
dart pub global activate ffigen
|
|
||||||
# 祝您好运!
|
|
||||||
# 对于模拟器:sed 's/aarch64/x86_64/g' ios/Runner.xcodeproj/project.pbxproj
|
|
||||||
# 如需要可忽略:cd ios; pod install; cd -;
|
|
||||||
flutter run
|
|
||||||
```
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: iOS
|
|
||||||
weight: 23
|
|
||||||
---
|
|
||||||
|
|
||||||
```
|
|
||||||
cd
|
|
||||||
# 為節省你我的時間,我們已經準備好依賴檔案了。
|
|
||||||
https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/ios_dep.tar.gz
|
|
||||||
tar xzf ios_dep.tar.gz
|
|
||||||
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
|
|
||||||
cd rustdesk
|
|
||||||
# 模擬器:VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_x64.sh
|
|
||||||
VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh
|
|
||||||
cd flutter
|
|
||||||
dart pub global activate ffigen
|
|
||||||
# 祝你好運!
|
|
||||||
# 模擬器:sed 's/aarch64/x86_64/g' ios/Runner.xcodeproj/project.pbxproj
|
|
||||||
# 如果你忘記的話:cd ios; pod install; cd -;
|
|
||||||
flutter run
|
|
||||||
```
|
|
@ -3,10 +3,10 @@ title: 宝塔面板
|
|||||||
weight: 40
|
weight: 40
|
||||||
---
|
---
|
||||||
本手册基于宝塔面板正式版 9.2.0
|
本手册基于宝塔面板正式版 9.2.0
|
||||||
# 前提
|
## 前提
|
||||||
已安装宝塔面板正式版,前往[宝塔面板](https://www.bt.cn/new/index.html)官网,选择对应的脚本下载安装
|
已安装宝塔面板正式版,前往[宝塔面板](https://www.bt.cn/new/index.html)官网,选择对应的脚本下载安装
|
||||||
|
|
||||||
# 部署
|
## 部署
|
||||||
步骤一:登录宝塔面板,在菜单栏中点击 `Docker`
|
步骤一:登录宝塔面板,在菜单栏中点击 `Docker`
|
||||||
|
|
||||||
步骤二:首次会提示安装`Docker`和`Docker Compose`服务,点击立即安装,若已安装请忽略。
|
步骤二:首次会提示安装`Docker`和`Docker Compose`服务,点击立即安装,若已安装请忽略。
|
||||||
|
@ -3,6 +3,14 @@ title: WINDOWS & PM2 或者 NSSM
|
|||||||
weight: 20
|
weight: 20
|
||||||
---
|
---
|
||||||
|
|
||||||
|
{{% notice note %}}
|
||||||
|
Windows 的安全策略很复杂,如果本教程对您不起作用,或者您遇到连接不稳定的问题,请迁移到 Linux 服务器。
|
||||||
|
{{% /notice %}}
|
||||||
|
|
||||||
|
{{% notice note %}}
|
||||||
|
GUI 版本 `RustDeskServer.setup.exe` 已不再维护,不推荐使用。
|
||||||
|
{{% /notice %}}
|
||||||
|
|
||||||
## 选择哪个?
|
## 选择哪个?
|
||||||
现在您有两种选择,可以使用 PM2(更简单)或 NSSM(更难)来启动 RustDesk 服务器
|
现在您有两种选择,可以使用 PM2(更简单)或 NSSM(更难)来启动 RustDesk 服务器
|
||||||
使用 NSSM 有一些好处:
|
使用 NSSM 有一些好处:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user