mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 06:30:14 +01:00
🔨 Update build scripts
This commit is contained in:
parent
25034d5eb2
commit
dc46b478bc
5 changed files with 13 additions and 12 deletions
35
scripts/darwin-build.sh
Normal file
35
scripts/darwin-build.sh
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo 'Building UI'
|
||||
cd app
|
||||
npm install && npm run build
|
||||
cd ..
|
||||
|
||||
echo 'Cleaning Builds'
|
||||
rm -rf app/build
|
||||
rm -rf app/kernel-darwin
|
||||
rm -rf app/kernel-darwin-arm64
|
||||
|
||||
echo 'Building Kernel'
|
||||
|
||||
cd kernel
|
||||
go version
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.io
|
||||
export CGO_ENABLED=1
|
||||
|
||||
export GOOS=darwin
|
||||
export GOARCH=amd64
|
||||
go build --tags fts5 -v -o "app/kernel-darwin/SiYuan-Kernel" -ldflags "-s -w" .
|
||||
|
||||
export GOOS=darwin
|
||||
export GOARCH=arm64
|
||||
go build --tags fts5 -v -o "app/kernel-darwin-arm64/SiYuan-Kernel" -ldflags "-s -w" .
|
||||
cd ..
|
||||
|
||||
echo 'Building Electron'
|
||||
cd app
|
||||
npm run dist-darwin
|
||||
echo 'Building Electron arm64'
|
||||
npm run dist-darwin-arm64
|
||||
cd ..
|
||||
28
scripts/linux-build.sh
Normal file
28
scripts/linux-build.sh
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo 'Building UI'
|
||||
cd app
|
||||
npm install && npm run build
|
||||
cd ..
|
||||
|
||||
echo 'Cleaning Builds'
|
||||
rm -rf app/build
|
||||
rm -rf app/kernel-linux
|
||||
|
||||
echo 'Building Kernel'
|
||||
|
||||
cd kernel
|
||||
go version
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.io
|
||||
export CGO_ENABLED=1
|
||||
|
||||
export GOOS=linux
|
||||
export GOARCH=amd64
|
||||
go build --tags fts5 -v -o "app/kernel-linux/SiYuan-Kernel" -ldflags "-s -w" .
|
||||
cd ..
|
||||
|
||||
echo 'Building Electron'
|
||||
cd app
|
||||
npm run dist-linux
|
||||
cd ..
|
||||
38
scripts/win-build.bat
Normal file
38
scripts/win-build.bat
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
echo 'Building UI'
|
||||
cd app
|
||||
call npm install
|
||||
call npm run build
|
||||
cd ..
|
||||
|
||||
echo 'Cleaning Builds'
|
||||
del /S /Q /F app\build 1>nul
|
||||
del /S /Q /F app\kernel 1>nul
|
||||
del /S /Q /F app\kernel32 1>nul
|
||||
|
||||
echo 'Building Kernel'
|
||||
go version
|
||||
set GO111MODULE=on
|
||||
set GOPROXY=https://goproxy.io
|
||||
set CGO_ENABLED=1
|
||||
|
||||
cd kernel
|
||||
goversioninfo -platform-specific=true -icon=resource/icon.ico -manifest=resource/goversioninfo.exe.manifest
|
||||
|
||||
set GOOS=windows
|
||||
set GOARCH=amd64
|
||||
go build --tags fts5 -v -o "../app/kernel/SiYuan-Kernel.exe" -ldflags "-s -w -H=windowsgui" .
|
||||
|
||||
set GOOS=windows
|
||||
set GOARCH=386
|
||||
go build --tags fts5 -v -o "../app/kernel32/SiYuan-Kernel.exe" -ldflags "-s -w -H=windowsgui" .
|
||||
cd ..
|
||||
|
||||
echo 'Building Electron'
|
||||
cd app
|
||||
call npm run dist
|
||||
echo 'Building Electron win32'
|
||||
call npm run dist-win32
|
||||
cd ..
|
||||
|
||||
echo 'Building Appx'
|
||||
electron-windows-store --input-directory app\build\win-unpacked --output-directory app\build\ --package-version 1.0.0.0 --package-name SiYuan --manifest app\appx\AppxManifest.xml --assets app\appx\assets\ --make-pri true
|
||||
Loading…
Add table
Add a link
Reference in a new issue