-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
# Conflicts: # .github/CONTRIBUTING.md # .github/CONTRIBUTING_zh_CN.md # .github/workflows/dockerimage.yml # app/src/sync/syncGuide.ts # app/src/util/needSubscribe.ts # kernel/go.mod # kernel/go.sum # kernel/model/conf.go
- Loading branch information
Showing
299 changed files
with
16,366 additions
and
6,635 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
[中文](CONTRIBUTING_zh_CN.md) | ||
|
||
## Get the source code | ||
|
||
* `git clone --depth=1 [email protected]:siyuan-note/siyuan.git` | ||
* switch to dev branch `git checkout dev` | ||
|
||
Note: `app/stage/protyle/**` is managed by git lfs, and you don't need to pay attention to it under normal circumstances, related to [#9253](https://github.com/siyuan-note/siyuan/issues/9253). | ||
|
||
## User Interface | ||
|
||
Install pnpm: `npm install -g pnpm` | ||
|
||
<details> | ||
<summary>For China mainland</summary> | ||
|
||
Set the Electron mirror environment variable and install Electron: | ||
|
||
* macOS/Linux: `ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ pnpm install [email protected] -D` | ||
* Windows: | ||
* `SET ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/` | ||
* `pnpm install [email protected] -D` | ||
|
||
NPM mirror: | ||
|
||
* Use npmmirror China mirror repository `pnpm --registry https://r.cnpmjs.org/ i` | ||
* Revert to using official repository `pnpm --registry https://registry.npmjs.org i` | ||
|
||
</details> | ||
|
||
On the desktop, go to the app folder to run: | ||
|
||
* `pnpm install [email protected] -D` | ||
* `pnpm run dev` | ||
* `pnpm run start` | ||
|
||
Note: In the development environment, the kernel process will not be automatically started, and you need to manually start the kernel process first. | ||
|
||
## Kernel | ||
|
||
1. Install the latest version of [golang](https://go.dev/) | ||
2. Open CGO support, that is, configure the environment variable `CGO_ENABLED=1` | ||
|
||
### Desktop | ||
|
||
* `cd kernel` | ||
* `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"` | ||
* `cd ../app/kernel` | ||
* `./SiYuan-Kernel.exe --wd=.. --mode=dev` | ||
|
||
### iOS | ||
|
||
* `cd kernel` | ||
* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o ./ios/iosk.xcframework -target=ios ./mobile/` | ||
* https://github.com/siyuan-note/siyuan-ios | ||
|
||
### Android | ||
|
||
* `cd kernel` | ||
* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o kernel.aar -target='android/arm64' -androidapi 24 ./mobile/` | ||
* https://github.com/siyuan-note/siyuan-android | ||
|
||
For the mobile-end, please refer to the corresponding project repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
[English](CONTRIBUTING.md) | ||
|
||
## 获取源码 | ||
|
||
* `git clone --depth=1 [email protected]:siyuan-note/siyuan.git` | ||
* 切换到 dev 分支 `git checkout dev` | ||
|
||
备注:`app/stage/protyle/**` 使用 git lfs 管理,正常情况下无需关注,关联 [#9253](https://github.com/siyuan-note/siyuan/issues/9253)。 | ||
|
||
## NPM 依赖 | ||
|
||
安装 pnpm:`npm install -g pnpm` | ||
|
||
<details> | ||
<summary>适用于中国大陆</summary> | ||
|
||
设置 Electron 镜像环境变量并安装 Electron: | ||
|
||
* macOS/Linux: | ||
``` | ||
ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ pnpm install [email protected] -D | ||
``` | ||
* Windows: | ||
* `SET ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/` | ||
* `pnpm install [email protected] -D` | ||
|
||
NPM 镜像: | ||
|
||
* 使用 npmmirror 中国镜像仓库 `pnpm --registry https://r.cnpmjs.org/ i` | ||
* 恢复使用官方仓库 `pnpm --registry https://registry.npmjs.org i` | ||
</details> | ||
|
||
桌面端进入 app 文件夹运行: | ||
|
||
* `pnpm install [email protected] -D` | ||
* `pnpm run dev` | ||
* `pnpm run start` | ||
|
||
注意:在开发环境下不会自动拉起内核进程,需要先手动拉起内核进程。 | ||
|
||
## 内核 | ||
|
||
1. 安装最新版 [golang](https://go.dev/) | ||
2. 打开 CGO 支持,即配置环境变量 `CGO_ENABLED=1` | ||
|
||
### 桌面端 | ||
|
||
* `cd kernel` | ||
* `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"` | ||
* `cd ../app/kernel` | ||
* `./SiYuan-Kernel.exe --wd=.. --mode=dev` | ||
|
||
### iOS | ||
|
||
* `cd kernel` | ||
* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o ./ios/iosk.xcframework -target=ios ./mobile/` | ||
* https://github.com/siyuan-note/siyuan-ios | ||
|
||
### Android | ||
|
||
* `cd kernel` | ||
* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o kernel.aar -target='android/arm64' -androidapi 24 ./mobile/` | ||
* https://github.com/siyuan-note/siyuan-android | ||
|
||
移动端请参考对应项目仓库。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Release Docker Image | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
|
||
# all of these default to true, but feel free to set to | ||
# "false" if necessary for your workflow | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
docker-images: true | ||
swap-storage: true | ||
|
||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_PWD }} | ||
|
||
- name: Build the Docker image | ||
run: | | ||
docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 -t b3log/siyuan:latest -t b3log/siyuan:v2.11.2 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.