Merge pull request #2497 from wj-xiao/build/split-core-builds
build(release): move Android bundle publishing into GoReleaser
This commit is contained in:
commit
2e149f44dd
18 changed files with 160 additions and 61 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
|
@ -16,5 +16,5 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
|
||||||
- name: Build
|
- name: Build core binaries
|
||||||
run: make build-all
|
run: make build-all
|
||||||
|
|
|
||||||
24
.github/workflows/create_dmg.yml
vendored
24
.github/workflows/create_dmg.yml
vendored
|
|
@ -17,29 +17,35 @@ jobs:
|
||||||
with:
|
with:
|
||||||
ref: main
|
ref: main
|
||||||
|
|
||||||
# 1. 安装指定版本的 Go (可选,但推荐)
|
# 1. Install Go from go.mod
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v6
|
uses: actions/setup-go@v6
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
|
||||||
# 2. 安装 pnpm
|
- name: Setup Node.js
|
||||||
- name: Install pnpm
|
uses: actions/setup-node@v6
|
||||||
run: brew install pnpm
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: pnpm
|
||||||
|
cache-dependency-path: web/frontend/pnpm-lock.yaml
|
||||||
|
|
||||||
# 3. 运行你的 Makefile 编译二进制文件
|
- name: Setup pnpm
|
||||||
|
run: corepack enable && corepack install
|
||||||
|
|
||||||
|
# 3. Build the application bundle
|
||||||
- name: Build with Make
|
- name: Build with Make
|
||||||
run: make build ARCH=${{ matrix.arch }} && make build-macos-app ARCH=${{ matrix.arch }}
|
run: make build ARCH=${{ matrix.arch }} && make build-macos-app ARCH=${{ matrix.arch }}
|
||||||
|
|
||||||
# 4. 签名
|
# 4. Apply ad-hoc signing
|
||||||
- name: Ad-hoc Sign
|
- name: Ad-hoc Sign
|
||||||
run: codesign --force --deep --sign - "build/PicoClaw Launcher.app"
|
run: codesign --force --deep --sign - "build/PicoClaw Launcher.app"
|
||||||
|
|
||||||
# 5. 安装打包工具
|
# 5. Install the DMG packaging tool
|
||||||
- name: Install create-dmg
|
- name: Install create-dmg
|
||||||
run: brew install create-dmg
|
run: brew install create-dmg
|
||||||
|
|
||||||
# 6. 执行打包命令
|
# 6. Create the DMG
|
||||||
- name: Create DMG
|
- name: Create DMG
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
|
|
@ -54,7 +60,7 @@ jobs:
|
||||||
"dist/picoclaw-${{ matrix.arch }}.dmg" \
|
"dist/picoclaw-${{ matrix.arch }}.dmg" \
|
||||||
"build/PicoClaw Launcher.app"
|
"build/PicoClaw Launcher.app"
|
||||||
|
|
||||||
# 7. 上传文件到 GitHub Artifacts (供你下载)
|
# 7. Upload the DMG as a GitHub artifact
|
||||||
- name: Upload DMG
|
- name: Upload DMG
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
11
.github/workflows/nightly.yml
vendored
11
.github/workflows/nightly.yml
vendored
|
|
@ -51,9 +51,11 @@ jobs:
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
|
cache: pnpm
|
||||||
|
cache-dependency-path: web/frontend/pnpm-lock.yaml
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
run: corepack enable && corepack prepare pnpm@latest --activate
|
run: corepack enable && corepack install
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v4
|
uses: docker/setup-qemu-action@v4
|
||||||
|
|
@ -75,6 +77,9 @@ jobs:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Install zip
|
||||||
|
run: sudo apt-get install -y zip
|
||||||
|
|
||||||
- name: Create local tag for GoReleaser
|
- name: Create local tag for GoReleaser
|
||||||
run: git tag "${{ steps.version.outputs.version }}"
|
run: git tag "${{ steps.version.outputs.version }}"
|
||||||
|
|
||||||
|
|
@ -90,6 +95,7 @@ jobs:
|
||||||
DOCKERHUB_IMAGE_NAME: ${{ vars.DOCKERHUB_REPOSITORY }}
|
DOCKERHUB_IMAGE_NAME: ${{ vars.DOCKERHUB_REPOSITORY }}
|
||||||
GOVERSION: ${{ steps.setup-go.outputs.go-version }}
|
GOVERSION: ${{ steps.setup-go.outputs.go-version }}
|
||||||
GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.version }}
|
GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.version }}
|
||||||
|
INCLUDE_ANDROID_BUNDLE: "true"
|
||||||
NIGHTLY_BUILD: "true"
|
NIGHTLY_BUILD: "true"
|
||||||
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
|
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
|
||||||
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
|
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
|
||||||
|
|
@ -123,7 +129,7 @@ jobs:
|
||||||
|
|
||||||
# Collect release artifacts from goreleaser dist/
|
# Collect release artifacts from goreleaser dist/
|
||||||
ASSETS=()
|
ASSETS=()
|
||||||
for f in dist/*.tar.gz dist/*.zip dist/*.deb dist/*.rpm dist/checksums.txt; do
|
for f in dist/*.tar.gz dist/*.zip dist/*.deb dist/*.rpm dist/checksums.txt build/picoclaw-android-universal.zip; do
|
||||||
[ -f "$f" ] && ASSETS+=("$f")
|
[ -f "$f" ] && ASSETS+=("$f")
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
@ -135,4 +141,3 @@ jobs:
|
||||||
--prerelease \
|
--prerelease \
|
||||||
--latest=false \
|
--latest=false \
|
||||||
"${ASSETS[@]}"
|
"${ASSETS[@]}"
|
||||||
|
|
||||||
|
|
|
||||||
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
|
|
@ -69,9 +69,11 @@ jobs:
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
|
cache: pnpm
|
||||||
|
cache-dependency-path: web/frontend/pnpm-lock.yaml
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
run: corepack enable && corepack prepare pnpm@latest --activate
|
run: corepack enable && corepack install
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v4
|
uses: docker/setup-qemu-action@v4
|
||||||
|
|
@ -93,6 +95,9 @@ jobs:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Install zip
|
||||||
|
run: sudo apt-get install -y zip
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v7
|
uses: goreleaser/goreleaser-action@v7
|
||||||
with:
|
with:
|
||||||
|
|
@ -104,23 +109,13 @@ jobs:
|
||||||
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
|
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
|
||||||
DOCKERHUB_IMAGE_NAME: ${{ vars.DOCKERHUB_REPOSITORY }}
|
DOCKERHUB_IMAGE_NAME: ${{ vars.DOCKERHUB_REPOSITORY }}
|
||||||
GOVERSION: ${{ steps.setup-go.outputs.go-version }}
|
GOVERSION: ${{ steps.setup-go.outputs.go-version }}
|
||||||
|
INCLUDE_ANDROID_BUNDLE: "true"
|
||||||
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
|
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
|
||||||
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
|
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
|
||||||
MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}
|
MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}
|
||||||
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
|
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
|
||||||
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
|
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
|
||||||
|
|
||||||
- name: Build and upload Android arm64
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y zip
|
|
||||||
make build-android-bundle
|
|
||||||
gh release upload "${{ inputs.tag }}" \
|
|
||||||
build/picoclaw-android-universal.zip \
|
|
||||||
--clobber
|
|
||||||
|
|
||||||
- name: Apply release flags
|
- name: Apply release flags
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,10 @@ git:
|
||||||
|
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- go mod tidy
|
|
||||||
- go generate ./...
|
- go generate ./...
|
||||||
- sh -c 'cd web/frontend && pnpm install && pnpm build:backend'
|
- sh -c 'cd web/frontend && CI=true pnpm install --frozen-lockfile && pnpm build:backend'
|
||||||
- go install github.com/tc-hib/go-winres@latest
|
- sh -c 'GOBIN="$(go env GOPATH)/bin"; mkdir -p "$GOBIN"; go install github.com/tc-hib/go-winres@v0.3.3 && "$GOBIN/go-winres" make --in web/backend/winres/winres.json --out web/backend/rsrc --product-version={{ .Version }} --file-version={{ .Version }}'
|
||||||
- go-winres make --in web/backend/winres/winres.json --out web/backend/rsrc --product-version={{ .Version }} --file-version={{ .Version }}
|
- sh -c 'if [ "${INCLUDE_ANDROID_BUNDLE:-}" = "true" ]; then make build-android-bundle; fi'
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
- id: picoclaw
|
- id: picoclaw
|
||||||
|
|
@ -27,7 +26,7 @@ builds:
|
||||||
- -X github.com/sipeed/picoclaw/pkg/config.Version={{ .Version }}
|
- -X github.com/sipeed/picoclaw/pkg/config.Version={{ .Version }}
|
||||||
- -X github.com/sipeed/picoclaw/pkg/config.GitCommit={{ .ShortCommit }}
|
- -X github.com/sipeed/picoclaw/pkg/config.GitCommit={{ .ShortCommit }}
|
||||||
- -X github.com/sipeed/picoclaw/pkg/config.BuildTime={{ .Date }}
|
- -X github.com/sipeed/picoclaw/pkg/config.BuildTime={{ .Date }}
|
||||||
- -X github.com/sipeed/picoclaw/pkg/config.GoVersion={{ .Env.GOVERSION }}
|
- -X github.com/sipeed/picoclaw/pkg/config.GoVersion={{ with index .Env "GOVERSION" }}{{ . }}{{ else }}unknown{{ end }}
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- windows
|
- windows
|
||||||
|
|
@ -67,6 +66,10 @@ builds:
|
||||||
- stdjson
|
- stdjson
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w
|
- -s -w
|
||||||
|
- -X github.com/sipeed/picoclaw/pkg/config.Version={{ .Version }}
|
||||||
|
- -X github.com/sipeed/picoclaw/pkg/config.GitCommit={{ .ShortCommit }}
|
||||||
|
- -X github.com/sipeed/picoclaw/pkg/config.BuildTime={{ .Date }}
|
||||||
|
- -X github.com/sipeed/picoclaw/pkg/config.GoVersion={{ with index .Env "GOVERSION" }}{{ . }}{{ else }}unknown{{ end }}
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- windows
|
- windows
|
||||||
|
|
@ -106,6 +109,10 @@ builds:
|
||||||
- stdjson
|
- stdjson
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w
|
- -s -w
|
||||||
|
- -X github.com/sipeed/picoclaw/pkg/config.Version={{ .Version }}
|
||||||
|
- -X github.com/sipeed/picoclaw/pkg/config.GitCommit={{ .ShortCommit }}
|
||||||
|
- -X github.com/sipeed/picoclaw/pkg/config.BuildTime={{ .Date }}
|
||||||
|
- -X github.com/sipeed/picoclaw/pkg/config.GoVersion={{ with index .Env "GOVERSION" }}{{ . }}{{ else }}unknown{{ end }}
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- windows
|
- windows
|
||||||
|
|
@ -245,6 +252,8 @@ changelog:
|
||||||
|
|
||||||
release:
|
release:
|
||||||
disable: '{{ isEnvSet "NIGHTLY_BUILD" }}'
|
disable: '{{ isEnvSet "NIGHTLY_BUILD" }}'
|
||||||
|
extra_files:
|
||||||
|
- glob: ./build/picoclaw-android-universal.zip
|
||||||
footer: >-
|
footer: >-
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
11
Makefile
11
Makefile
|
|
@ -1,4 +1,4 @@
|
||||||
.PHONY: all build install uninstall clean help test
|
.PHONY: all build install uninstall clean help test build-all
|
||||||
|
|
||||||
# Build variables
|
# Build variables
|
||||||
BINARY_NAME=picoclaw
|
BINARY_NAME=picoclaw
|
||||||
|
|
@ -217,7 +217,9 @@ build-launcher-android-arm64:
|
||||||
@echo "Building picoclaw-launcher for android/arm64..."
|
@echo "Building picoclaw-launcher for android/arm64..."
|
||||||
@mkdir -p $(BUILD_DIR)
|
@mkdir -p $(BUILD_DIR)
|
||||||
@$(MAKE) -C web build-android-arm64 \
|
@$(MAKE) -C web build-android-arm64 \
|
||||||
OUTPUT="$(CURDIR)/$(BUILD_DIR)/picoclaw-launcher-android-arm64"
|
OUTPUT_ANDROID_ARM64="$(CURDIR)/$(BUILD_DIR)/picoclaw-launcher-android-arm64" \
|
||||||
|
GO='$(GO)' \
|
||||||
|
LDFLAGS='$(LDFLAGS)'
|
||||||
@echo "Build complete: $(BUILD_DIR)/picoclaw-launcher-android-arm64"
|
@echo "Build complete: $(BUILD_DIR)/picoclaw-launcher-android-arm64"
|
||||||
|
|
||||||
## build-android-bundle: Build core and launcher for all Android architectures and package as universal zip
|
## build-android-bundle: Build core and launcher for all Android architectures and package as universal zip
|
||||||
|
|
@ -240,7 +242,7 @@ build-android-bundle: generate
|
||||||
build-pi-zero: build-linux-arm build-linux-arm64
|
build-pi-zero: build-linux-arm build-linux-arm64
|
||||||
@echo "Pi Zero 2 W builds: $(BUILD_DIR)/$(BINARY_NAME)-linux-arm (32-bit), $(BUILD_DIR)/$(BINARY_NAME)-linux-arm64 (64-bit)"
|
@echo "Pi Zero 2 W builds: $(BUILD_DIR)/$(BINARY_NAME)-linux-arm (32-bit), $(BUILD_DIR)/$(BINARY_NAME)-linux-arm64 (64-bit)"
|
||||||
|
|
||||||
## build-all: Build picoclaw for all platforms
|
## build-all: Build the picoclaw core binary for all Makefile-managed platforms
|
||||||
build-all: generate
|
build-all: generate
|
||||||
@echo "Building for multiple platforms..."
|
@echo "Building for multiple platforms..."
|
||||||
@mkdir -p $(BUILD_DIR)
|
@mkdir -p $(BUILD_DIR)
|
||||||
|
|
@ -257,8 +259,7 @@ build-all: generate
|
||||||
GOOS=windows GOARCH=amd64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-windows-amd64.exe ./$(CMD_DIR)
|
GOOS=windows GOARCH=amd64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-windows-amd64.exe ./$(CMD_DIR)
|
||||||
GOOS=netbsd GOARCH=amd64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-netbsd-amd64 ./$(CMD_DIR)
|
GOOS=netbsd GOARCH=amd64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-netbsd-amd64 ./$(CMD_DIR)
|
||||||
GOOS=netbsd GOARCH=arm64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-netbsd-arm64 ./$(CMD_DIR)
|
GOOS=netbsd GOARCH=arm64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-netbsd-arm64 ./$(CMD_DIR)
|
||||||
@$(MAKE) build-android-bundle
|
@echo "Core builds complete"
|
||||||
@echo "All builds complete"
|
|
||||||
|
|
||||||
## install: Install picoclaw to system and copy builtin skills
|
## install: Install picoclaw to system and copy builtin skills
|
||||||
install: build
|
install: build
|
||||||
|
|
|
||||||
12
README.fr.md
12
README.fr.md
|
|
@ -167,19 +167,27 @@ Vous pouvez aussi télécharger le binaire pour votre plateforme depuis la page
|
||||||
|
|
||||||
### Compiler depuis les sources (pour le développement)
|
### Compiler depuis les sources (pour le développement)
|
||||||
|
|
||||||
|
Prérequis :
|
||||||
|
|
||||||
|
- Go 1.25+
|
||||||
|
- Node.js 22+ avec Corepack activé pour les builds Web UI / launcher
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sipeed/picoclaw.git
|
git clone https://github.com/sipeed/picoclaw.git
|
||||||
|
|
||||||
cd picoclaw
|
cd picoclaw
|
||||||
make deps
|
make deps
|
||||||
|
|
||||||
|
# Installer le gestionnaire de paquets frontend déclaré par le dépôt
|
||||||
|
(cd web/frontend && corepack install)
|
||||||
|
|
||||||
# Compiler le binaire principal
|
# Compiler le binaire principal
|
||||||
make build
|
make build
|
||||||
|
|
||||||
# Compiler le Web UI Launcher (requis pour le mode WebUI)
|
# Compiler le Web UI Launcher (requis pour le mode WebUI)
|
||||||
make build-launcher
|
make build-launcher
|
||||||
|
|
||||||
# Compiler pour plusieurs plateformes
|
# Compiler les binaires core pour toutes les plateformes gérées par le Makefile
|
||||||
make build-all
|
make build-all
|
||||||
|
|
||||||
# Compiler pour Raspberry Pi Zero 2 W (32 bits : make build-linux-arm ; 64 bits : make build-linux-arm64)
|
# Compiler pour Raspberry Pi Zero 2 W (32 bits : make build-linux-arm ; 64 bits : make build-linux-arm64)
|
||||||
|
|
@ -620,5 +628,3 @@ Discord : <https://discord.gg/V4sAZ9XWpN>
|
||||||
WeChat :
|
WeChat :
|
||||||
<img src="assets/wechat.png" alt="WeChat group QR code" width="512">
|
<img src="assets/wechat.png" alt="WeChat group QR code" width="512">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
10
README.id.md
10
README.id.md
|
|
@ -164,19 +164,27 @@ Atau, unduh binary untuk platform Anda dari halaman [GitHub Releases](https://gi
|
||||||
|
|
||||||
### Build dari source (untuk pengembangan)
|
### Build dari source (untuk pengembangan)
|
||||||
|
|
||||||
|
Prasyarat:
|
||||||
|
|
||||||
|
- Go 1.25+
|
||||||
|
- Node.js 22+ dengan Corepack aktif untuk build Web UI / launcher
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sipeed/picoclaw.git
|
git clone https://github.com/sipeed/picoclaw.git
|
||||||
|
|
||||||
cd picoclaw
|
cd picoclaw
|
||||||
make deps
|
make deps
|
||||||
|
|
||||||
|
# Instal package manager frontend yang dideklarasikan repo
|
||||||
|
(cd web/frontend && corepack install)
|
||||||
|
|
||||||
# Build binary inti
|
# Build binary inti
|
||||||
make build
|
make build
|
||||||
|
|
||||||
# Build Web UI Launcher (diperlukan untuk mode WebUI)
|
# Build Web UI Launcher (diperlukan untuk mode WebUI)
|
||||||
make build-launcher
|
make build-launcher
|
||||||
|
|
||||||
# Build untuk berbagai platform
|
# Build binary inti untuk semua platform yang dikelola Makefile
|
||||||
make build-all
|
make build-all
|
||||||
|
|
||||||
# Build untuk Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
# Build untuk Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
||||||
|
|
|
||||||
10
README.it.md
10
README.it.md
|
|
@ -164,19 +164,27 @@ In alternativa, scarica il binario per la tua piattaforma dalla pagina delle [Gi
|
||||||
|
|
||||||
### Compila dai sorgenti (per lo sviluppo)
|
### Compila dai sorgenti (per lo sviluppo)
|
||||||
|
|
||||||
|
Prerequisiti:
|
||||||
|
|
||||||
|
- Go 1.25+
|
||||||
|
- Node.js 22+ con Corepack abilitato per le build Web UI / launcher
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sipeed/picoclaw.git
|
git clone https://github.com/sipeed/picoclaw.git
|
||||||
|
|
||||||
cd picoclaw
|
cd picoclaw
|
||||||
make deps
|
make deps
|
||||||
|
|
||||||
|
# Installa il package manager frontend dichiarato dal repository
|
||||||
|
(cd web/frontend && corepack install)
|
||||||
|
|
||||||
# Compila il binario core
|
# Compila il binario core
|
||||||
make build
|
make build
|
||||||
|
|
||||||
# Compila il Web UI Launcher (necessario per la modalità WebUI)
|
# Compila il Web UI Launcher (necessario per la modalità WebUI)
|
||||||
make build-launcher
|
make build-launcher
|
||||||
|
|
||||||
# Compila per più piattaforme
|
# Compila i binari core per tutte le piattaforme gestite dal Makefile
|
||||||
make build-all
|
make build-all
|
||||||
|
|
||||||
# Compila per Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
# Compila per Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
||||||
|
|
|
||||||
10
README.ja.md
10
README.ja.md
|
|
@ -164,19 +164,27 @@ PicoClaw はほぼすべての Linux デバイスにデプロイできます!
|
||||||
|
|
||||||
### ソースからビルド(開発用)
|
### ソースからビルド(開発用)
|
||||||
|
|
||||||
|
前提条件:
|
||||||
|
|
||||||
|
- Go 1.25+
|
||||||
|
- Web UI / launcher のビルドには Corepack を有効にした Node.js 22+
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sipeed/picoclaw.git
|
git clone https://github.com/sipeed/picoclaw.git
|
||||||
|
|
||||||
cd picoclaw
|
cd picoclaw
|
||||||
make deps
|
make deps
|
||||||
|
|
||||||
|
# リポジトリで宣言されたフロントエンド用パッケージマネージャーをインストール
|
||||||
|
(cd web/frontend && corepack install)
|
||||||
|
|
||||||
# コアバイナリをビルド
|
# コアバイナリをビルド
|
||||||
make build
|
make build
|
||||||
|
|
||||||
# Web UI Launcher をビルド(WebUI モードに必要)
|
# Web UI Launcher をビルド(WebUI モードに必要)
|
||||||
make build-launcher
|
make build-launcher
|
||||||
|
|
||||||
# 複数プラットフォーム向けビルド
|
# Makefile が管理するすべてのプラットフォーム向けにコアバイナリをビルド
|
||||||
make build-all
|
make build-all
|
||||||
|
|
||||||
# Raspberry Pi Zero 2 W 向けビルド(32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
# Raspberry Pi Zero 2 W 向けビルド(32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
||||||
|
|
|
||||||
10
README.ko.md
10
README.ko.md
|
|
@ -164,19 +164,27 @@ PicoClaw는 사실상 거의 모든 Linux 장치에 배포할 수 있습니다!
|
||||||
|
|
||||||
### 소스에서 빌드(개발용)
|
### 소스에서 빌드(개발용)
|
||||||
|
|
||||||
|
필수 사항:
|
||||||
|
|
||||||
|
- Go 1.25+
|
||||||
|
- Web UI / launcher 빌드를 위한 Corepack 활성화된 Node.js 22+
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sipeed/picoclaw.git
|
git clone https://github.com/sipeed/picoclaw.git
|
||||||
|
|
||||||
cd picoclaw
|
cd picoclaw
|
||||||
make deps
|
make deps
|
||||||
|
|
||||||
|
# 저장소에 선언된 프런트엔드 패키지 매니저 설치
|
||||||
|
(cd web/frontend && corepack install)
|
||||||
|
|
||||||
# 코어 바이너리 빌드
|
# 코어 바이너리 빌드
|
||||||
make build
|
make build
|
||||||
|
|
||||||
# WebUI 런처 빌드 (WebUI 모드에 필요)
|
# WebUI 런처 빌드 (WebUI 모드에 필요)
|
||||||
make build-launcher
|
make build-launcher
|
||||||
|
|
||||||
# 여러 플랫폼용 빌드
|
# Makefile이 관리하는 모든 플랫폼용 코어 바이너리 빌드
|
||||||
make build-all
|
make build-all
|
||||||
|
|
||||||
# Raspberry Pi Zero 2 W용 빌드 (32비트: make build-linux-arm, 64비트: make build-linux-arm64)
|
# Raspberry Pi Zero 2 W용 빌드 (32비트: make build-linux-arm, 64비트: make build-linux-arm64)
|
||||||
|
|
|
||||||
18
README.md
18
README.md
|
|
@ -164,22 +164,32 @@ Alternatively, download the binary for your platform from the [GitHub Releases](
|
||||||
|
|
||||||
### Build from source (for development)
|
### Build from source (for development)
|
||||||
|
|
||||||
|
Prerequisites:
|
||||||
|
|
||||||
|
- Go 1.25+
|
||||||
|
- Node.js 22+ with Corepack enabled for Web UI / launcher builds
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sipeed/picoclaw.git
|
git clone https://github.com/sipeed/picoclaw.git
|
||||||
|
|
||||||
cd picoclaw
|
cd picoclaw
|
||||||
make deps
|
make deps
|
||||||
|
|
||||||
# Build core binary
|
# Install frontend package manager declared by the repo
|
||||||
|
(cd web/frontend && corepack install)
|
||||||
|
|
||||||
|
# Build the core binary for the current platform
|
||||||
make build
|
make build
|
||||||
|
|
||||||
# Build Web UI Launcher (required for WebUI mode)
|
# Build the Web UI Launcher (required for WebUI mode)
|
||||||
make build-launcher
|
make build-launcher
|
||||||
|
|
||||||
# Build for multiple platforms
|
# Build core binaries for all Makefile-managed platforms
|
||||||
make build-all
|
make build-all
|
||||||
|
|
||||||
# Build for Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
# Build for Raspberry Pi Zero 2 W
|
||||||
|
# 32-bit: make build-linux-arm
|
||||||
|
# 64-bit: make build-linux-arm64
|
||||||
make build-pi-zero
|
make build-pi-zero
|
||||||
|
|
||||||
# Build and install
|
# Build and install
|
||||||
|
|
|
||||||
10
README.my.md
10
README.my.md
|
|
@ -165,18 +165,26 @@ Muat turun binari untuk platform anda dari halaman [GitHub Releases](https://git
|
||||||
|
|
||||||
### Bina dari sumber (untuk pembangunan)
|
### Bina dari sumber (untuk pembangunan)
|
||||||
|
|
||||||
|
Prasyarat:
|
||||||
|
|
||||||
|
- Go 1.25+
|
||||||
|
- Node.js 22+ dengan Corepack diaktifkan untuk binaan Web UI / launcher
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sipeed/picoclaw.git
|
git clone https://github.com/sipeed/picoclaw.git
|
||||||
cd picoclaw
|
cd picoclaw
|
||||||
make deps
|
make deps
|
||||||
|
|
||||||
|
# Pasang pengurus pakej frontend yang diisytiharkan oleh repositori
|
||||||
|
(cd web/frontend && corepack install)
|
||||||
|
|
||||||
# Bina binari teras
|
# Bina binari teras
|
||||||
make build
|
make build
|
||||||
|
|
||||||
# Bina Pelancar Web UI (diperlukan untuk mod WebUI)
|
# Bina Pelancar Web UI (diperlukan untuk mod WebUI)
|
||||||
make build-launcher
|
make build-launcher
|
||||||
|
|
||||||
# Bina untuk pelbagai platform
|
# Bina binari teras untuk semua platform yang diuruskan oleh Makefile
|
||||||
make build-all
|
make build-all
|
||||||
|
|
||||||
# Bina untuk Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
# Bina untuk Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
||||||
|
|
|
||||||
|
|
@ -164,19 +164,27 @@ Alternativamente, baixe o binário para sua plataforma na página de [GitHub Rel
|
||||||
|
|
||||||
### Compilar a partir do código-fonte (para desenvolvimento)
|
### Compilar a partir do código-fonte (para desenvolvimento)
|
||||||
|
|
||||||
|
Pré-requisitos:
|
||||||
|
|
||||||
|
- Go 1.25+
|
||||||
|
- Node.js 22+ com Corepack habilitado para builds do Web UI / launcher
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sipeed/picoclaw.git
|
git clone https://github.com/sipeed/picoclaw.git
|
||||||
|
|
||||||
cd picoclaw
|
cd picoclaw
|
||||||
make deps
|
make deps
|
||||||
|
|
||||||
|
# Instalar o gerenciador de pacotes de frontend declarado pelo repositório
|
||||||
|
(cd web/frontend && corepack install)
|
||||||
|
|
||||||
# Compilar o binário principal
|
# Compilar o binário principal
|
||||||
make build
|
make build
|
||||||
|
|
||||||
# Compilar o Web UI Launcher (necessário para o modo WebUI)
|
# Compilar o Web UI Launcher (necessário para o modo WebUI)
|
||||||
make build-launcher
|
make build-launcher
|
||||||
|
|
||||||
# Compilar para múltiplas plataformas
|
# Compilar os binários core para todas as plataformas gerenciadas pelo Makefile
|
||||||
make build-all
|
make build-all
|
||||||
|
|
||||||
# Compilar para Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
# Compilar para Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
||||||
|
|
|
||||||
14
README.vi.md
14
README.vi.md
|
|
@ -164,19 +164,27 @@ Ngoài ra, tải binary cho nền tảng của bạn từ trang [GitHub Releases
|
||||||
|
|
||||||
### Xây dựng từ mã nguồn (để phát triển)
|
### Xây dựng từ mã nguồn (để phát triển)
|
||||||
|
|
||||||
|
Yêu cầu:
|
||||||
|
|
||||||
|
- Go 1.25+
|
||||||
|
- Node.js 22+ với Corepack được bật cho các bản build Web UI / launcher
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sipeed/picoclaw.git
|
git clone https://github.com/sipeed/picoclaw.git
|
||||||
|
|
||||||
cd picoclaw
|
cd picoclaw
|
||||||
make deps
|
make deps
|
||||||
|
|
||||||
# Build core binary
|
# Cài đặt trình quản lý gói frontend được khai báo bởi repo
|
||||||
|
(cd web/frontend && corepack install)
|
||||||
|
|
||||||
|
# Build binary lõi
|
||||||
make build
|
make build
|
||||||
|
|
||||||
# Build Web UI Launcher (required for WebUI mode)
|
# Build Web UI Launcher (cần cho chế độ WebUI)
|
||||||
make build-launcher
|
make build-launcher
|
||||||
|
|
||||||
# Build for multiple platforms
|
# Build các binary lõi cho mọi nền tảng do Makefile quản lý
|
||||||
make build-all
|
make build-all
|
||||||
|
|
||||||
# Build for Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
# Build for Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
|
||||||
|
|
|
||||||
12
README.zh.md
12
README.zh.md
|
|
@ -164,19 +164,27 @@ PicoClaw 几乎可以部署在任何 Linux 设备上!
|
||||||
|
|
||||||
### 从源码构建(开发用)
|
### 从源码构建(开发用)
|
||||||
|
|
||||||
|
前置要求:
|
||||||
|
|
||||||
|
- Go 1.25+
|
||||||
|
- Node.js 22+,并启用 Corepack(用于 Web UI / launcher 构建)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/sipeed/picoclaw.git
|
git clone https://github.com/sipeed/picoclaw.git
|
||||||
|
|
||||||
cd picoclaw
|
cd picoclaw
|
||||||
make deps
|
make deps
|
||||||
|
|
||||||
|
# 安装仓库声明的前端包管理器
|
||||||
|
(cd web/frontend && corepack install)
|
||||||
|
|
||||||
# 构建核心二进制文件
|
# 构建核心二进制文件
|
||||||
make build
|
make build
|
||||||
|
|
||||||
# 构建 Web UI Launcher(WebUI 模式必需)
|
# 构建 Web UI Launcher(WebUI 模式必需)
|
||||||
make build-launcher
|
make build-launcher
|
||||||
|
|
||||||
# 为多平台构建
|
# 为 Makefile 管理的所有平台构建核心二进制文件
|
||||||
make build-all
|
make build-all
|
||||||
|
|
||||||
# 为 Raspberry Pi Zero 2 W 构建(32位: make build-linux-arm; 64位: make build-linux-arm64)
|
# 为 Raspberry Pi Zero 2 W 构建(32位: make build-linux-arm; 64位: make build-linux-arm64)
|
||||||
|
|
@ -618,5 +626,3 @@ WeChat:
|
||||||
<img src="assets/wechat.png" alt="WeChat group QR code" width="512">
|
<img src="assets/wechat.png" alt="WeChat group QR code" width="512">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
12
web/Makefile
12
web/Makefile
|
|
@ -12,6 +12,7 @@ BUILD_DIR=build
|
||||||
OUTPUT?=$(BUILD_DIR)/picoclaw-launcher
|
OUTPUT?=$(BUILD_DIR)/picoclaw-launcher
|
||||||
OUTPUT_ANDROID_ARM64?=$(BUILD_DIR)/picoclaw-launcher-android-arm64
|
OUTPUT_ANDROID_ARM64?=$(BUILD_DIR)/picoclaw-launcher-android-arm64
|
||||||
FRONTEND_DIR=frontend
|
FRONTEND_DIR=frontend
|
||||||
|
FRONTEND_INSTALL_STAMP=$(FRONTEND_DIR)/node_modules/.picoclaw-install-stamp
|
||||||
BACKEND_DIR=backend
|
BACKEND_DIR=backend
|
||||||
BACKEND_DIST=$(BACKEND_DIR)/dist
|
BACKEND_DIST=$(BACKEND_DIR)/dist
|
||||||
PICOCLAW_BINARY_NAME=picoclaw
|
PICOCLAW_BINARY_NAME=picoclaw
|
||||||
|
|
@ -105,11 +106,14 @@ build-android-bundle: build-frontend
|
||||||
@echo "All Android launcher builds complete"
|
@echo "All Android launcher builds complete"
|
||||||
|
|
||||||
build-frontend:
|
build-frontend:
|
||||||
@if [ ! -d $(FRONTEND_DIR)/node_modules ] || \
|
@expected_stamp="$$(cat $(FRONTEND_DIR)/package.json $(FRONTEND_DIR)/pnpm-lock.yaml | cksum | awk '{print $$1 ":" $$2}')"; \
|
||||||
[ $(FRONTEND_DIR)/package.json -nt $(FRONTEND_DIR)/node_modules ] || \
|
if [ ! -d $(FRONTEND_DIR)/node_modules ] || \
|
||||||
[ $(FRONTEND_DIR)/pnpm-lock.yaml -nt $(FRONTEND_DIR)/node_modules ]; then \
|
[ ! -x $(FRONTEND_DIR)/node_modules/.bin/tsc ] || \
|
||||||
|
[ ! -f $(FRONTEND_INSTALL_STAMP) ] || \
|
||||||
|
[ "$$(cat $(FRONTEND_INSTALL_STAMP) 2>/dev/null)" != "$$expected_stamp" ]; then \
|
||||||
echo "Installing frontend dependencies..."; \
|
echo "Installing frontend dependencies..."; \
|
||||||
cd $(FRONTEND_DIR) && pnpm install --frozen-lockfile; \
|
(cd $(FRONTEND_DIR) && CI=true pnpm install --frozen-lockfile) && \
|
||||||
|
printf '%s\n' "$$expected_stamp" > $(FRONTEND_INSTALL_STAMP); \
|
||||||
fi
|
fi
|
||||||
@echo "Building frontend..."
|
@echo "Building frontend..."
|
||||||
@cd $(FRONTEND_DIR) && pnpm build:backend
|
@cd $(FRONTEND_DIR) && pnpm build:backend
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"packageManager": "pnpm@10.33.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue