mark-text开发环境搭建启动

简介: mark-text开发环境搭建启动

没有目的,就做不成任何事情;目的渺小,就做不成任何大事——狄德罗

IDEA的安装就不多赘述了

achaodeMacBook-Pro:~ achao$ brew install --cask intellij-idea
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/api/cask.jws.json
#=#=#                                                                          
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/2b3de06
Already downloaded: /Users/achao/Library/Caches/Homebrew/downloads/03208b267695d41517fe798d19f1a1d3f0ecc722ebac64499965e6529b228d13--intellij-idea.rb
==> Downloading https://download.jetbrains.com/idea/ideaIU-2023.1.3-aarch64.dmg
==> Downloading from https://download.jetbrains.com.cn/idea/ideaIU-2023.1.3-aarc
######################################################################### 100.0%
==> Installing Cask intellij-idea
==> Moving App 'IntelliJ IDEA.app' to '/Applications/IntelliJ IDEA.app'
🍺  intellij-idea was successfully installed!
achaodeMacBook-Pro:~ achao$ 

我们打开idea,clone项目

https://github.com/VampireAchao/marktext.git

来到项目目录终端下执行

按照说明里我们进行安装对应版本的node以及yarn以及node-gyp

chaodeMacBook-Pro:~ achao$ nvm install 16
Downloading and installing node v16.20.1...
Downloading http://mirrors.cloud.tencent.com/nodejs-release//v16.20.1/node-v16.20.1-darwin-arm64.tar.xz...
######################################################################### 100.0%
Computing checksum with shasum -a 256
Checksums matched!
Now using node v16.20.1 (npm v8.19.4)
achaodeMacBook-Pro:~ achao$ npm i yarn -g
added 1 package, and audited 2 packages in 4s
found 0 vulnerabilities
achaodeMacBook-Pro:~ achao$ yarn -v
1.22.19
192:~ achao$ npm install -g node-gyp
added 126 packages, and audited 127 packages in 17s
17 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
192:~ achao$ node-gyp -v
v9.4.0

然后是python,我们安装pyenv

192:~ achao$ brew install pyenv
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/api/formula.jws.jso
######################################################################### 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/api/cask.jws.json
######################################################################### 100.0%
==> Fetching dependencies for pyenv: m4, autoconf, ca-certificates, openssl@3, pkg-config and readline
==> Fetching m4
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/m4-1.4.19.a
######################################################################### 100.0%
==> Fetching autoconf
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/autoconf-2.
######################################################################### 100.0%
==> Fetching ca-certificates
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/ca-certific
######################################################################### 100.0%
==> Fetching openssl@3
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/openssl%403
######################################################################### 100.0%
==> Fetching pkg-config
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/pkg-config-
######################################################################### 100.0%
==> Fetching readline
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/readline-8.
######################################################################### 100.0%
==> Fetching pyenv
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/pyenv-2.3.2
######################################################################### 100.0%
==> Installing dependencies for pyenv: m4, autoconf, ca-certificates, openssl@3, pkg-config and readline
==> Installing pyenv dependency: m4
==> Pouring m4-1.4.19.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/m4/1.4.19: 13 files, 742.2KB
==> Installing pyenv dependency: autoconf
==> Pouring autoconf-2.71.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/autoconf/2.71: 71 files, 3.2MB
==> Installing pyenv dependency: ca-certificates
==> Pouring ca-certificates-2023-05-30.arm64_ventura.bottle.tar.gz
==> Regenerating CA certificate bundle from keychain, this may take a while...
🍺  /opt/homebrew/Cellar/ca-certificates/2023-05-30: 3 files, 216.1KB
==> Installing pyenv dependency: openssl@3
==> Pouring openssl@3-3.1.1_1.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/openssl@3/3.1.1_1: 6,495 files, 28.4MB
==> Installing pyenv dependency: pkg-config
==> Pouring pkg-config-0.29.2_3.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/pkg-config/0.29.2_3: 11 files, 676KB
==> Installing pyenv dependency: readline
==> Pouring readline-8.2.1.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/readline/8.2.1: 50 files, 1.7MB
==> Installing pyenv
==> Pouring pyenv-2.3.21.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/pyenv/2.3.21: 1,083 files, 3.3MB
==> Running `brew cleanup pyenv`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
192:~ achao$ pyenv -v
pyenv 2.3.21

初始化pyenv

添加到 ~/.bash_profile :

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile

然后配置镜像

echo 'export PYTHON_BUILD_MIRROR_URL="https://mirrors.huaweicloud.com/python/"' >> ~/.bash_profile

然后安装python,这里不知道镜像生效没有,虽然确实设置了

achaodeMacBook-Pro:~ achao$ echo $PYTHON_BUILD_MIRROR_URL
https://mirrors.huaweicloud.com/python/
achaodeMacBook-Pro:~ achao$ pyenv install 3.10.4
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.10.4.tar.xz...
-> https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tar.xz
Installing Python-3.10.4...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/achao/.pyenv/versions/3.10.4/lib/python3.10/lzma.py", line 27, in <module>
    from _lzma import *
ModuleNotFoundError: No module named '_lzma'
WARNING: The Python lzma extension was not compiled. Missing the lzma lib?
Installed Python-3.10.4 to /Users/achao/.pyenv/versions/3.10.4
achaodeMacBook-Pro:~ achao$ pyenv global 3.10
achaodeMacBook-Pro:~ achao$ python -V
Python 3.10.4

然后是C++编译器xcode

这里安装太慢了,我们停止一下,配置一下镜像

192:~ achao$ yarn config set -g registry http://mirrors.cloud.tencent.com/npm/
yarn config v1.22.19
success Set "http://mirrors.cloud.tencent.com/npm/" to true.
✨  Done in 0.01s.

然后点击右下角Run 'yarn install'发现没有识别到

我们配置下idea的yarn环境点击ok

此时依赖开始安装,结果报错

说找不到vscode。。。

我们打开代理再试试

achaodeMacBook-Pro:marktext achao$ yarn install
yarn install v1.22.19
$ node .electron-vue/preinstall.js
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
warning file-icons@2.1.47: The engine "atom" appears to be invalid.
warning atom-fs@0.2.1: The engine "atom" appears to be invalid.
warning mapped-disposable@1.0.3: The engine "atom" appears to be invalid.
[3/4] 🔗  Linking dependencies...
warning " > eslint-config-standard@16.0.3" has incorrect peer dependency "eslint@^7.12.1".
warning " > eslint-config-standard@16.0.3" has incorrect peer dependency "eslint-plugin-promise@^4.2.1 || ^5.0.0".
[4/4] 🔨  Building fresh packages...
$ node .electron-vue/postinstall.js && yarn run rebuild && yarn run lint:fix
yarn run v1.22.19
$ electron-rebuild -f
⠇ Building module: ced, Completed: 0  CXX(target) Release/obj.target/compact_enc_det/vendor/compact_enc_det/compact_enc_det/compact_enc_det.o
⠦ Building module: ced, Completed: 0  CXX(target) Release/obj.target/compact_enc_det/vendor/compact_enc_det/compact_enc_det/compact_enc_det_hint_code.o
⠇ Building module: ced, Completed: 0  CXX(target) Release/obj.target/compact_enc_det/vendor/compact_enc_det/util/encodings/encodings.o
⠹ Building module: ced, Completed: 0  CXX(target) Release/obj.target/compact_enc_det/vendor/compact_enc_det/util/languages/languages.o
  LIBTOOL-STATIC Release/compact_enc_det.a
⠏ Building module: ced, Completed: 0  CXX(target) Release/obj.target/ced/ced.o
⠋ Building module: ced, Completed: 0  SOLINK_MODULE(target) Release/ced.node
⠹ Building module: fontmanager-redux, Completed: 1  CXX(target) Release/obj.target/fontmanager/src/FontManager.o
⠧ Building module: fontmanager-redux, Completed: 1  CXX(target) Release/obj.target/fontmanager/src/FontManagerMac.o
⠹ Building module: fontmanager-redux, Completed: 1  SOLINK_MODULE(target) Release/fontmanager.node
⠴ Building module: native-keymap, Completed: 3  CXX(target) Release/obj.target/keymapping/src/string_conversion.o
⠧ Building module: native-keymap, Completed: 3  CXX(target) Release/obj.target/keymapping/src/keymapping.o
⠋ Building module: native-keymap, Completed: 3  CXX(target) Release/obj.target/keymapping/src/keyboard_mac.o
⠦ Building module: native-keymap, Completed: 3  SOLINK_MODULE(target) Release/keymapping.node
✔ Rebuild Complete
✨  Done in 50.71s.
yarn run v1.22.19
$ eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix src test
✨  Done in 5.94s.
✨  Done in 108.28s.

成功执行!咱们启动下项目

yarn dev

20230630203110.png

相关文章
关于 QtCreator中写Qt程序遇到printf不输出问题 的解决方法
关于 QtCreator中写Qt程序遇到printf不输出问题 的解决方法
|
JSON BI API
全网最全面介绍闲鱼API接口指南
闲鱼是阿里巴巴旗下的二手交易平台,提供RESTful API支持商品管理、订单处理、用户操作与数据统计。开发者可通过OAuth 2.0认证,使用App Key和access_token调用接口,实现自动化运营与第三方集成。本指南详解API核心功能、接入步骤、代码示例及最佳实践,助您高效开发。
12998 1
|
前端开发 JavaScript Android开发
移动端点击事件:原理、问题与解决方案
前端技术在移动端点击事件上的应用,涉及触屏交互、响应速度优化及用户体验提升,确保网页或应用在手机等移动设备上流畅运行。
|
开发框架 移动开发 前端开发
【Uniapp 专栏】Uniapp 与 React Native 的对比分析
【5月更文挑战第14天】Uniapp和React Native是热门的跨平台移动开发框架。Uniapp以其一套代码多端运行、丰富的组件生态和较低的学习曲线受到青睐,适合快速开发简单应用。React Native基于React,拥有活跃社区和优秀性能,适合复杂应用。React Native在性能上略胜一筹,尤其在需要接近原生体验的场景。Uniapp的官方组件弥补了社区资源不足。选择时需考虑开发效率、性能需求、团队技术栈和社区支持。
3689 1
【Uniapp 专栏】Uniapp 与 React Native 的对比分析
|
数据采集 小程序 网络安全
云擎技术---分析工信部APP备案的“传闻”
APP备案并非新事物,自2005年起已有非经营性互联网信息服务备案制度。备案针对的是网站主办者,而非用户,不涉及个人用户网络访问。网络接入服务提供者包括ISP和IDC,不限于三大运营商。通知要求不为未备案网站提供接入,但不影响国外软件使用。个人开发者不能涉及经营性内容,备案审核时长1-20个工作日。境内服务器和国内应用商店需备案,境外则无需。手机厂商不会开启白名单制,仅实行黑名单制。APP备案与民营经济发展壮大意见不冲突,工信部有权颁布相关规定。该政策不存在逐步试探底线情况,所有解读均有法律依据。
1075 3
云擎技术---分析工信部APP备案的“传闻”
|
存储 弹性计算 运维
深度解读:阿里云服务器ECS经济型e实例配置整理和性能参数表
阿里云推出经济型ECS e系列服务器,适用于个人开发者、学生和小微企业。该系列采用Intel Xeon Platinum处理器,支持多种CPU内存配比,性价比高,2核2G3M配置只需99元/年,新老用户不限量购买且续费不涨价。提供相同可用性SLA和安全标准,具备ESSD Entry云盘等企业级特性。适合中小型网站、开发测试和轻量级应用
|
缓存 资源调度 算法
yarn的安装和使用(全网最详细)
yarn的安装和使用(全网最详细)
13789 1
|
API 开发者
百度翻译接口API的获取与授权方法
本文介绍获取百度翻译官方接口及其密钥,并将接口授权给自己或他人开发的软件或插件的方法~
3395 1
百度翻译接口API的获取与授权方法
|
开发工具 Android开发
Android studio历史版本下载
Android studio历史版本下载
10947 0
|
前端开发 JavaScript Java
SSM+jsp实现医院住院管理系统(已开源)
🍅程序员小王的博客:程序员小王的博客 🍅 欢迎点赞 👍 收藏 ⭐留言 📝 🍅 如有编辑错误联系作者,如果有比较好的文章欢迎分享给我,我会取其精华去其糟粕 😊 扫描主页左侧二维码,加我微信 一起学习、一起进步 🍅java自学的学习路线:java自学的学习路线
2322 1
SSM+jsp实现医院住院管理系统(已开源)