2021-08-20-补记Wiznote Lite开源代码阅读相关内容-1-Wiznote Lite源码下载与编译

1. 下载

git clone https://github.com/WizTeam/WizNoteLite.git

使用时当前版本如图:
image
编译后产物版本:
image

2、编译过程

注意:我的编译目录为~/project/wiznotelite/t-WiznoteLite

(1). 预备步骤: 安装npm和设置淘宝镜像源,以及github上所说的依赖。
如果网络畅通,参考如何在 Ubuntu 20.04 上安装 Node.js 和 npm 的方法四进行安装,自行解决中间问题。
淘宝镜像源设置,设置后使用npm命令时换成cnpm,例如cnpm install用于安装依赖模块。

npm install -g cnpm --registry=https://registry.npm.taobao.org
npm install -g foreman
npm install -g node-gyp

(2). 对项目进行修改: 删除package-lock.json, 在package.json中增加mime-types模块(否则编译产物运行时会报缺少该模块)。
image
否则编译产物运行结果:
image

(3). 测试运行

  1. 执行npm install或者cnpm install的命令获取依赖模块。
  2. ./node_modules/.bin/electron ./tools/build_sqlite3
  3. npm start

cnpm install结果如图bug时(RunScriptError: post install error),请按照该博客所说执行npm rebuild node-sass解决。
image

(4). 编译

  1. ./node_modules/.bin/electron ./tools/build_sqlite3
  2. ./post-install.sh
  3. npm run pack
  4. ./out/WizNote\ Lite-2.1.3.AppImage测试

编译产物在out目录下:
image

posted @ 2021-08-20 16:32  日光散林间  阅读(73)  评论(0)    收藏  举报