git clone [email protected]:siyuan-note/siyuan.git
- switch to dev branch
git checkout dev
Install pnpm: npm install -g [email protected]
For China mainland
Set the Electron mirror environment variable and install Electron:
- macOS/Linux:
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install [email protected] -D
- Windows:
SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
pnpm install [email protected] -D
NPM mirror:
- Use npmmirror China mirror repository
pnpm --registry https://registry.npmmirror.com/ i
- Revert to using official repository
pnpm --registry https://registry.npmjs.org i
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.
- Install the latest version of golang
- Open CGO support, that is, configure the environment variable
CGO_ENABLED=1
cd kernel
go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"
cd ../app/kernel
./SiYuan-Kernel.exe --wd=.. --mode=dev
cd kernel
gomobile bind --tags fts5 -ldflags '-s -w' -v -o ./ios/iosk.xcframework -target=ios ./mobile/
- https://github.com/siyuan-note/siyuan-ios
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
Only support compilation under Linux, need to install Harmony SDK, and need to modify Go source code, please refer to #13184
cd kernel/harmony
./build.sh
(./build-win.sh
for Windows Emulator)- https://github.com/siyuan-note/siyuan-harmony