A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang. (PERSONAL FORK)
at lambda-fork/main 69 lines 2.2 kB view raw view rendered
1[中文](CONTRIBUTING_zh_CN.md) 2 3## Get the source code 4 5* `git clone git@github.com:siyuan-note/siyuan.git` 6* Switch to dev branch `git checkout dev` 7 8## NPM dependencies 9 10Install pnpm: `npm install -g pnpm@10.19.0` 11 12<details> 13<summary>For China mainland</summary> 14 15Set the Electron mirror environment variable and install Electron: 16 17* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@37.7.1 -D` 18* Windows: 19 * `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/` 20 * `pnpm install electron@37.7.1 -D` 21 22NPM mirror: 23 24* Use npmmirror China mirror repository `pnpm --registry https://registry.npmmirror.com/ i` 25* Revert to using official repository `pnpm --registry https://registry.npmjs.org i` 26</details> 27 28Enter the app folder and execute: 29 30* `pnpm install electron@37.7.1 -D` 31* `pnpm run dev` 32* `pnpm run start` 33 34Note: In the development environment, the kernel process will not be automatically started, and you need to manually start the kernel process first. 35 36## Kernel 37 381. Install the latest version of [golang](https://go.dev/) 392. Open CGO support, that is, configure the environment variable `CGO_ENABLED=1` 40 41### Desktop 42 43* `cd kernel` 44* Windows: `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"` 45* Linux/macOS: `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel"` 46* `cd ../app/kernel` 47* Windows: `./SiYuan-Kernel.exe --wd=.. --mode=dev` 48* Linux/macOS: `./SiYuan-Kernel --wd=.. --mode=dev` 49 50### iOS 51 52* `cd kernel` 53* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o ./ios/iosk.xcframework -target=ios ./mobile/` 54* https://github.com/siyuan-note/siyuan-ios 55 56### Android 57 58* `cd kernel` 59* `set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8` 60* `gomobile bind --tags fts5 -ldflags "-s -w" -v -o kernel.aar -target=android/arm64 -androidapi 26 ./mobile/` 61* https://github.com/siyuan-note/siyuan-android 62 63### Harmony 64 65Only support compilation under Linux, need to install Harmony SDK, and need to modify Go source code, please refer to https://github.com/siyuan-note/siyuan/issues/13184 66 67* `cd kernel/harmony` 68* `./build.sh` (`./build-win.sh` for Windows Emulator) 69* https://github.com/siyuan-note/siyuan-harmony