阅读:9005回复:16

为知笔记linux版的奇怪问题

楼主#
更多 发布于:2018-01-19 05:16
用为知笔记十多年了,Linux上的客户端是一个QT5程序,跟其它的QT5程序一样,需要对输入法额外编译动态链接库。

Fcitx如果编译一下对应的动态链接库,默认也是无法输入的,官方的介绍如下:





为知笔记官方的编译介绍:

http://www.wiz.cn/compile-client.html

0:安了QT 5.9,并按它的指导,把小小的QT5插件放到了


『/opt/Qt5.9.0/5.9/gcc_64/plugins/platforminputcontexts』

https://download.qt.io/official_releases/qt/5.9/5.9.0/qt-opensource-linux-x64-5.9.0.run

1:下载了它的较新的源码包:

https://github.com/WizTeam/WizQTClient/tree/2.5.8

以及一些依赖

zlib1g-dev & build-essential & libssl1.0-dev

libjasper1 & libjasper-dev libmng2 & qt5-image-formats-plugins

2:拆包看了一下源码,修正了 linux-package.sh 几个地方:


mkdir ../WizQTClient-Release-Linuxrm -rf ../WizQTClient-Release-Linux/*
cd ../WizQTClient-Release-Linuxcmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/opt/Qt5.9.0/5.9/gcc_64  ../WizQTClient && \
make -j2

cd ..rm -rf Package
mkdir Packagecd Package
mkdir WizNotecd WizNote
mkdir bincd bin
cp ../../../WizQTClient-Release-Linux/src/WizNote ./cd ..
cp -R ../../WizQTClient-Release-Linux/share ./cd ..
mkdir logocd logo
mkdir hicolorcd hicolor
mkdir 16x16mkdir 32x32
mkdir 64x64mkdir 128x128
mkdir 256x256mkdir 512x512

cp ../../../WizQTClient/build/common/logo/wiznote16.png 16x16/wiznote.png
cp ../../../WizQTClient/build/common/logo/wiznote32.png 32x32/wiznote.pngcp ../../../WizQTClient/build/common/logo/wiznote64.png 64x64/wiznote.png
cp ../../../WizQTClient/build/common/logo/wiznote128.png 128x128/wiznote.pngcp ../../../WizQTClient/build/common/logo/wiznote256.png 256x256/wiznote.png
cp ../../../WizQTClient/build/common/logo/wiznote512.png 512x512/wiznote.pngcd ..
cd ..cp ../WizQTClient/build/common/wiznote2.desktop ./wiznote.desktop
cd ./WizNotemkdir plugins
cd ./plugins/mkdir platforminputcontexts
cd ../..cp /opt/Qt5.9.0/5.9/gcc_64/plugins/platforminputcontexts/lib*so ./WizNote/plugins/platforminputcontexts
cd .../WizQTClient/linuxdeployqt ./Package/wiznote.desktop -verbose=1 -appimage -qmake=/opt/Qt5.9.0/5.9/gcc_64/bin/qmake




在源码根目录里,调用默认的这个『linux-package.sh』,自动编译、并打包:




./linux-package.sh



全程无报错,顺利打包,对应的目录里,确实也有 yong 的QT插件。

最新喜欢:

yanqianyanqia... dgoddgod
沙发#
发布于:2018-01-19 06:07
0 :系统环境变量没有问题



~$ echo $QT_IM_MODULEyong


2:打包的目录里面,有小小的QT插件



$ ls WizTeam/Package/WizNote/plugins/platforminputcontexts
libcomposeplatforminputcontextplugin.so  libibusplatforminputcontextplugin.so  
libuimplatforminputcontextplugin.so libfcitxplatforminputcontextplugin.so    
libqtvirtualkeyboardplugin.so         libyongplatforminputcontextplugin.so

3:$ ./WizNote-x86_64.AppImage  来启动,终端里没有报错信息


4:cat /proc/%pid%/maps 显示没有加载QT插件
地板#
发布于:2018-01-19 10:51
设一下qt的调试用环境变量再看看有没有报错吧
4楼#
发布于:2018-01-19 12:04
dgod:设一下qt的调试用环境变量再看看有没有报错吧回到原帖
用QT客户端 打开cmakelist.txt ,似乎yong 的环境变量没有问题:


不过是什么原因

5楼#
发布于:2018-01-19 12:07
不是指输入法用的环境变量,是调试qt和qt插件的环境变量
6楼#
发布于:2018-01-19 13:44
dgod:不是指输入法用的环境变量,是调试qt和qt插件的环境变量回到原帖
搞不定了……等您有空的话,给个示范吧,我太笨。
7楼#
发布于:2018-01-19 20:42
fcitx可以用,但是小小的不能。
太奇怪了
8楼#
发布于:2018-01-20 14:19
Running "/usr/bin/cmake -E server --pipe=/tmp/cmake-VQi0qn/socket --experimental" in /home/i5/Documents/wiz/Debug.
The C compiler identification is GNU 6.4.0
The CXX compiler identification is GNU 6.4.0
Check for working C compiler: /usr/bin/gcc
Check for working C compiler: /usr/bin/gcc -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Check for working CXX compiler: /usr/bin/g++
Check for working CXX compiler: /usr/bin/g++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Performing Test COMPILER_SUPPORTS_CXX11
Performing Test COMPILER_SUPPORTS_CXX11 - Success
Performing Test COMPILER_SUPPORTS_CXX0X
Performing Test COMPILER_SUPPORTS_CXX0X - Success
Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
/home/i5/Documents/wiz/WizQTClient/resources/wiznote.qrc
WizNote whill compiling as Debug, use Qt: 5.9.0
Configuring done
Generating done
CMake Warning:
Manually-specified variables were not used by the project:
QT_QMAKE_EXECUTABLE





查了一圈这个警告信息……
还是没办法消除
9楼#
发布于:2018-01-20 14:22
我没那么多功夫去编译测试一个别人的软件,你是自己编译QT的话注意
QT库必须编译进GLIB支持,运行的时候也不能设置QT_NO_GLIB环境变量。
上一页
游客

返回顶部