add how to build vnote on linux (Arch Linux) (#2183)

This commit is contained in:
Leilei Chui 2022-07-12 05:12:33 +08:00 committed by GitHub
parent 7c66f32609
commit 65e049fda6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 80 additions and 0 deletions

Binary file not shown.

View File

@ -30,6 +30,16 @@
"signature": "177750503775", "signature": "177750503775",
"tags": [ "tags": [
] ]
},
{
"attachment_folder": "577590000268982",
"created_time": "2022-07-10T14:55:17Z",
"id": "59",
"modified_time": "2022-07-10T16:08:14Z",
"name": "如何构建VNote_Linux详细版.md",
"signature": "207324023810133",
"tags": [
]
} }
], ],
"folders": [ "folders": [

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

View File

@ -0,0 +1,70 @@
# 如何构建VNote_Linux详细版
本文是对构建VNote 文章中的 Linux (Arch Linux) 系统中构建 VNote 详细图文描述。
## 开发环境
```
OS: Arch Linux Rolling
IDE: Qt Creator 7.0.2-4
Framework: Qt 5.15.5
Tool Chain: qmake-qt5, make 4.3, gcc 12.1.0, gdb 12.1
```
VNote 依赖
- qt5-svg
- qt5-webengine
- qt5-x11extras
- git
VNote依赖树Qt部分
```
vnote
├─qt5-webengine
│ ├─qt5-webchannel
│ │ └─qt5-declarative
│ │ └─qt5-base
│ ├─qt5-location
│ │ └─qt5-declarative
├─qt5-svg
│ └─qt5-base
└─qt5-x11extras
└─qt5-base
```
安装依赖
```shell
sudo pacman -S qt5-svg qt5-webengine qt5-x11extras git gcc gdb qtcreator
```
## 构建并运行
### 下载源码
```shell
git clone https://github.com/vnotex/vnote.git vnote.git
cd vnote.git
git submodule update --init --recursive
```
### 使用 Qt Creator
#### 打开项目
打开 Qt Creator 设置确认Qt Kits配置无误以上操作正确的话Qt Creator会自动识别出已安装的Qt Kits
![](vx_images/153432805826504.png)
打开 VNote项目 `vnote.pro` 文件选择要使用的Qt Kits
![](vx_images/184742523268981.png)
![](vx_images/112693223268981.png)
#### 编译运行
开始构建VNote
![](vx_images/445403805826504.png)
点击按钮即可编译运行
![](vx_images/569684023268981.png)
### 使用命令行
```shell
# 假设当前目录为VNote源码目录
# 创建编译目录并切换路径
mkdir ../build && cd ../build
# 生成 Makefile
qmake-qt5 ../vnote/vnote.pro
# 编译
make -j$(nproc)
# 启动 VNote
./src/vnote
# 安装 VNote
sudo make install
# 卸载 VNote
sudo make uninstall
```