From 96520bf22f031ebdc8e02085254df24ddcf6df6d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 26 May 2022 11:26:05 +0800 Subject: [PATCH] =?UTF-8?q?:heart:=20=E5=AE=8C=E6=95=B4=E5=BC=80=E6=BA=90?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=92=8C=E5=86=85=E6=A0=B8=20https://github.?= =?UTF-8?q?com/siyuan-note/siyuan/issues/5013?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DEV.md | 42 ++++++++++++++++++++++++++++++++++++++++++ DEV_zh_CN.md | 42 ++++++++++++++++++++++++++++++++++++++++++ README.md | 14 ++++++++++---- README_zh_CN.md | 10 ++++++++-- 4 files changed, 102 insertions(+), 6 deletions(-) create mode 100644 DEV.md create mode 100644 DEV_zh_CN.md diff --git a/DEV.md b/DEV.md new file mode 100644 index 000000000..9f17734e0 --- /dev/null +++ b/DEV.md @@ -0,0 +1,42 @@ +## Get the source code + +* `git clone --recurse-submodules git@github.com:siyuan-note/siyuan.git` +* switch to dev branch + +## NPM dependencies + +In China, it may be necessary to set the Electron mirror environment variable: + +* macOS/Linux: ELECTRON_MIRROR="https://cnpmjs.org/mirrors/electron/" npm install electron@14.2.5 -D +* Windows: `SET ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/` + +NPM mirror: + +* May need to use mirror repository in China `npm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/` +* Revert to using official repository `npm --registry https://registry.npmjs.org i -D` + +## Kernel + +### Desktop + +* `go build --tags "fts5" -o "D:\\siyuan\\app\\kernel\\SiYuan-Kernel.exe"` +* `SiYuan-Kernel.exe --wd=D:\\siyuan\\app` + +### iOS + +* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o ./ios/iosk.xcframework -target=ios ./kernel/mobile/` +* https://github.com/siyuan-note/siyuan-ios + +### Android + +* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o kernel.aar -target='android/arm,android/arm64' ./kernel/mobile/` +* https://github.com/siyuan-note/siyuan-android + +## User Interface + +On the desktop, go to the app folder to compile and run: + +* `npm run dev` +* `npm run start` + +For the mobile-end, please refer to the corresponding project repository. \ No newline at end of file diff --git a/DEV_zh_CN.md b/DEV_zh_CN.md new file mode 100644 index 000000000..ca3fbd185 --- /dev/null +++ b/DEV_zh_CN.md @@ -0,0 +1,42 @@ +## 获取源码 + +* `git clone --recurse-submodules git@github.com:siyuan-note/siyuan.git` +* 切换到 dev 分支 + +## NPM 依赖 + +在中国可能需要设置 Electron 镜像环境变量: + +* macOS/Linux:ELECTRON_MIRROR="https://cnpmjs.org/mirrors/electron/" npm install electron@14.2.5 -D +* Windows: `SET ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/` + +NPM 镜像: + +* 在中国可能需要使用镜像仓库 `npm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/` +* 恢复使用官方仓库 `npm --registry https://registry.npmjs.org i -D` + +## 内核 + +### 桌面端 + +* `go build --tags "fts5" -o "D:\\siyuan\\app\\kernel\\SiYuan-Kernel.exe"` +* `SiYuan-Kernel.exe --wd=D:\\siyuan\\app` + +### iOS + +* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o ./ios/iosk.xcframework -target=ios ./kernel/mobile/` +* https://github.com/siyuan-note/siyuan-ios + +### Android + +* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o kernel.aar -target='android/arm,android/arm64' ./kernel/mobile/` +* https://github.com/siyuan-note/siyuan-android + +## 用户界面 + +桌面端进入 app 文件夹编译和运行: + +* `npm run dev` +* `npm run start` + +移动端请参考对应项目仓库。 diff --git a/README.md b/README.md index c7d7beb4a..8498841b2 100644 --- a/README.md +++ b/README.md @@ -164,16 +164,19 @@ The data is saved in the workspace folder (the default is in the user's home dir ### Is SiYuan open source? -It is not completely open source at present, but some components and applications have been open sourced, and contributions are welcome. +SiYuan is completely open source, and contributions are welcome: +* [User Interface and Kernel](https://github.com/siyuan-note/siyuan) * [User Guide](https://github.com/siyuan-note/user-guide-en_US) * [Appearance](https://github.com/siyuan-note/appearance) * [Data Parser](https://github.com/88250/protyle) * [Editor Engine](https://github.com/88250/lute) * [End-to-end encryption](https://github.com/siyuan-note/encryption) * [Chrome Clipping Extension](https://github.com/siyuan-note/siyuan-chrome) -* [Android App](https://github.com/siyuan-note/siyuan-android) -* [iOS App](https://github.com/siyuan-note/siyuan-ios) +* [Android](https://github.com/siyuan-note/siyuan-android) +* [iOS](https://github.com/siyuan-note/siyuan-ios) + +For more details, please refer to [Development Guide](https://github.com/siyuan-note/siyuan/blob/master/DEV.md). ### Is there any note for deleting docs? @@ -218,8 +221,9 @@ Users in non-Mainland China regions should not pay for subscriptions, because Si ## 💌 Participate in contribution -At present, some components of SiYuan are open source, and contributions are welcome. +SiYuan is completely open source, and contributions are welcome: +* [User Interface and Kernel](https://github.com/siyuan-note/siyuan) * [User Guide](https://github.com/siyuan-note/user-guide-en_US) * [Appearance](https://github.com/siyuan-note/appearance) * [Data Parser](https://github.com/88250/protyle) @@ -229,6 +233,8 @@ At present, some components of SiYuan are open source, and contributions are wel * [Android](https://github.com/siyuan-note/siyuan-android) * [iOS](https://github.com/siyuan-note/siyuan-ios) +For more details, please refer to [Development Guide](https://github.com/siyuan-note/siyuan/blob/master/DEV.md). + ## 🙏 Acknowledgement SiYuan is made possible by the following open source projects. diff --git a/README_zh_CN.md b/README_zh_CN.md index a3de87fa9..1e1f28a35 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -172,8 +172,9 @@ ### 思源是开源的吗? -目前并没有完全开源,但已开源部分组件和应用端,欢迎参与贡献。 +思源笔记是完全开源的,欢迎参与贡献: +* [界面和内核](https://github.com/siyuan-note/siyuan) * [用户指南](https://github.com/siyuan-note/user-guide-zh_CN) * [外观](https://github.com/siyuan-note/appearance) * [数据解析器](https://github.com/88250/protyle) @@ -183,6 +184,8 @@ * [Android 端](https://github.com/siyuan-note/siyuan-android) * [iOS 端](https://github.com/siyuan-note/siyuan-ios) +更多细节请参考[开发指南](https://github.com/siyuan-note/siyuan/blob/master/DEV_zh_CN.md)。 + ### 删除文档有什么注意事项吗? 文档被删除后不会出现在操作系统回收站中,而是直接删除,删除时思源会生成编辑历史。 @@ -226,8 +229,9 @@ ## 💌 参与贡献 -目前思源笔记的一些组件是开源的,欢迎参与贡献。 +思源笔记是完全开源的,欢迎参与贡献: +* [界面和内核](https://github.com/siyuan-note/siyuan) * [用户指南](https://github.com/siyuan-note/user-guide-zh_CN) * [外观](https://github.com/siyuan-note/appearance) * [数据解析器](https://github.com/88250/protyle) @@ -237,6 +241,8 @@ * [Android 端](https://github.com/siyuan-note/siyuan-android) * [iOS 端](https://github.com/siyuan-note/siyuan-ios) +更多细节请参考[开发指南](https://github.com/siyuan-note/siyuan/blob/master/DEV_zh_CN.md)。 + ## 🙏 鸣谢 思源的诞生离不开下列开源项目。