Update tutorial

pull/33/head
wh201906 3 years ago
parent ff3a43a4a6
commit a2d63b5cdc

@ -41,5 +41,26 @@
(3) You might need to change "\<port\>" to "/dev/\<port\>" in "Settings"->"Start arguments" editbox (3) You might need to change "\<port\>" to "/dev/\<port\>" in "Settings"->"Start arguments" editbox
![](args_linux.png) ![](args_linux.png)
(4) If you are using Raspbian(Raspberry OS), you might need to check "Keep the client active even the PM3 hardware is disconnected." in the "Steeings" panel (4) If you are using Raspbian(Raspberry OS), you might need to check "Keep the client active even the PM3 hardware is disconnected." in the "Settings" panel
![](keep.png) ![](keep.png)
## About preload script
The client might refer to some environment variables to load dependencies
For example, the RRG client on Windows requires these environment variables
```
QT_PLUGIN_PATH=<client path>\libs\
QT_QPA_PLATFORM_PLUGIN_PATH=<client path>\libs\
PATH=<client path>\libs\;<client path>\libs\shell\;<old PATH variable>
MSYSTEM=MINGW64
```
So the GUI will run "\<client path\>\\setup.bat" before loading the client, which will set the environment variables to the client properly. The script will not affect the system environment variables.
The contents of setup.bat are as follows
```
@echo off
set "HOME=%~dp0"
set "QT_PLUGIN_PATH=%HOME%\libs\"
set "QT_QPA_PLATFORM_PLUGIN_PATH=%QT_PLUGIN_PATH%"
set "PATH=%QT_PLUGIN_PATH%;%QT_PLUGIN_PATH%shell\;%PATH%"
set MSYSTEM=MINGW64
```
You can write your own script by referring to it if you need other client, then input the script path in the "Preload script path" editbox.

@ -46,4 +46,26 @@
![](args_linux_zh_CN.png) ![](args_linux_zh_CN.png)
(4) 若使用树莓派Raspbian系统且连接成功若干秒后PM3会自动断开则需要在“设置”面板中勾选“在PM3断开后保持客户端运行” (4) 若使用树莓派Raspbian系统且连接成功若干秒后PM3会自动断开则需要在“设置”面板中勾选“在PM3断开后保持客户端运行”
![](keep_zh_CN.png) ![](keep_zh_CN.png)
## 预加载脚本
客户端在运行时可能需要使用某些环境变量以解决依赖问题
例如Windows平台下的冰人客户端运行时需要以下环境变量
```
QT_PLUGIN_PATH=<客户端路径>\libs\
QT_QPA_PLATFORM_PLUGIN_PATH=<客户端路径>\libs\
PATH=<客户端路径>\libs\;<客户端路径>\libs\shell\;<原PATH变量>
MSYSTEM=MINGW64
```
因此GUI会在加载客户端之前先运行"\<客户端路径\>\\setup.bat",从而在加载客户端时使用正确的环境变量。这些设置不会影响系统环境变量,仅对客户端本身有效
setup.bat的内容如下
```
@echo off
set "HOME=%~dp0"
set "QT_PLUGIN_PATH=%HOME%\libs\"
set "QT_QPA_PLATFORM_PLUGIN_PATH=%QT_PLUGIN_PATH%"
set "PATH=%QT_PLUGIN_PATH%;%QT_PLUGIN_PATH%shell\;%PATH%"
set MSYSTEM=MINGW64
```
如果需要使用其它客户端,你可以参考此文件编写自己的脚本,然后将其填入“预加载脚本路径”当中
Loading…
Cancel
Save