Ubuntu18.04下WizNote为知笔记源码编译安装

版本: WizNote 2.8.3
系统: Ubuntu18.04
说明: 源码安装是为了支持fcitx的搜狗输入法, 支持WizNote输入中文
因为官方的绿色版本AppImage没办法输入中文, 所以才需要源码编译安装为知笔记

依赖准备

先自行安装Qt5.14.1至/data/Qt5.14.1
解决为知笔记的fcitx的中文输入问题

cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so /data/Qt5.14.1/5.14.1/gcc_64/plugins/platforminputcontexts/
cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so /data/Qt5.14.1/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts/
sudo apt-get install libssl-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /lib/x86_64-linux-gnu/libssl.so.1.0.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
cd /data/github && git clone -b 2.8.3 --depth=1 https://github.com/WizTeam/WizQTClient.git

修改源码

为解决错误:
WizObject.cpp:337:20: error: conversion from ‘const qint64’ (aka ‘const long long’) to ‘Json::Value’ is ambiguous

vim /data/github/WizQTClient/src/share/WizObject.cpp
将第337行
value["pos"] = (double)nPosition;
改为
value["pos"] = nPosition;

Ubuntu18.04下WizNote为知笔记源码编译安装_第1张图片

Qt编译

用QtCreator打开/data/github/WizQTClient/CMakeLists.txt
选择左下角的build, 选中Release, 等待编译完成

打包AppImage

修改/data/github/WizQTClient/linux-package.sh
Ubuntu18.04下WizNote为知笔记源码编译安装_第2张图片
执行打包:

sh /data/github/WizQTClient/linux-package.sh

生成了/data/github/WizNote-x86_64.AppImage

mkdir /soft/WizNote
cp /data/github/WizNote-x86_64.AppImage /soft/WizNote

生成桌面快捷方式

vim ~/.local/share/applications/wiznote.desktop

[Desktop Entry]
Exec=/soft/WizNote/WizNote-x86_64.AppImage
Icon=wiznote
Type=Application
Terminal=false
Name=WizNote
GenericName=WizNote
Categories=WizNote;
Name[en_US]=WizNote
GenericName[en_US.UTF-8]=WizNote

chmod +x ~/.local/share/applications/wiznote.desktop
双击 ~/.local/share/applications/wiznote.desktop 即可运行WizNote

你可能感兴趣的:(工具)