added the windows build without make

This commit is contained in:
anthrodjear 2026-05-06 15:07:28 +03:00
parent 4ac0b52882
commit 03dae1301d
5 changed files with 223 additions and 1 deletions

49
AGENTS.md Normal file
View file

@ -0,0 +1,49 @@
Microsoft Windows [Version 10.0.26200.8116]
(c) Microsoft Corporation. All rights reserved.
C:\Users\user>ollama list
NAME ID SIZE MODIFIED
smollm2:1.7b cef4a1e09247 1.8 GB 5 hours ago
qwen3.5:4b 2a654d98e6fb 3.4 GB 3 days ago
deepseek-v4-pro:cloud 22bfd5026abd - 3 days ago
qwen3-coder-next:cloud aa626c11ae8d - 2 months ago
C:\Users\user>
# PicoClaw
## Build & Test Commands
```bash
make build # Build for current platform (runs generate first)
make build-all # Cross-compile for all supported platforms
make test # Run Go tests + web tests
make lint # golangci-lint with goolm,stdjson tags
make check # deps + fmt + vet + test + lint-docs
```
## Environment Setup
- Copy `.env.example` to `.env` and configure API keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.)
- Go 1.25.9+ required
- Build tags: `goolm,stdjson` (set via GO_BUILD_TAGS or Makefile)
- CGO_ENABLED=0 by default; CGO_ENABLED=1 only for macOS launcher builds
## Critical Constraints
- **Always run `make generate` before `make build`** — code generation creates required workspace symlinks
- **Never edit `cmd/picoclaw/workspace/` directly** — it's regenerated by `go generate`
- **MIPS builds require ELF e_flags patch** — handled automatically by Makefile
- **loong64 needs manual ztypes_loong64.go** — handled automatically by Makefile
- **WhatsApp native builds** add `whatsapp_native` tag but produce larger binaries
- **Workspace location**: `~/.picoclaw/workspace` (skills, memory stored here at runtime)
- **macOS launcher**: requires CGO_ENABLED=1 and minimal macOS 10.11 target
- **No hardcoded API keys in CLI** — project is migrating to OAuth 2.0 flows
- **Memory target**: core process <20MB for 64MB RAM boards; optimize data structures over storage
## Architecture Notes
- **Protocol-first**: Migrating from vendor-based to protocol-based provider classification (OpenAI-compat, Ollama-compat)
- **Multi-architecture**: x86_64, ARM64, MIPS, RISC-V, LoongArch
- **14+ chat channels** via adapter pattern in pkg/channels/
- **MCP support**: Model Context Protocol server in pkg/mcp/
- **Tools API**: See `docs/reference/tools-api.md` for complete tools documentation

View file

@ -1,3 +1,15 @@
Microsoft Windows [Version 10.0.26200.8116]
(c) Microsoft Corporation. All rights reserved.
C:\Users\user>ollama list
NAME ID SIZE MODIFIED
smollm2:1.7b cef4a1e09247 1.8 GB 5 hours ago
qwen3.5:4b 2a654d98e6fb 3.4 GB 3 days ago
deepseek-v4-pro:cloud 22bfd5026abd - 3 days ago
qwen3-coder-next:cloud aa626c11ae8d - 2 months ago
C:\Users\user>
# PicoClaw # PicoClaw
## Build & Test Commands ## Build & Test Commands

View file

@ -3,7 +3,7 @@
"defaults": { "defaults": {
"workspace": "~/.picoclaw/workspace", "workspace": "~/.picoclaw/workspace",
"restrict_to_workspace": true, "restrict_to_workspace": true,
"model_name": "gpt-5.4", "model_name": "smollm2",
"max_tokens": 8192, "max_tokens": 8192,
"context_window": 131072, "context_window": 131072,
"temperature": 0.7, "temperature": 0.7,
@ -21,6 +21,24 @@
} }
}, },
"model_list": [ "model_list": [
{
"model_name": "smollm2",
"provider": "ollama",
"model": "smollm2:1.7b",
"api_base": "http://localhost:11434/v1"
},
{
"model_name": "qwen3.5",
"provider": "ollama",
"model": "qwen3.5:4b",
"api_base": "http://localhost:11434/v1"
},
{
"model_name": "deepseek-v4-pro",
"provider": "ollama",
"model": "deepseek-v4-pro:cloud",
"api_base": "http://localhost:11434/v1"
},
{ {
"model_name": "gpt-5.4", "model_name": "gpt-5.4",
"model": "openai/gpt-5.4", "model": "openai/gpt-5.4",

View file

@ -0,0 +1,91 @@
@echo off
REM Build PicoClaw core and web launcher without using make.
REM Usage: scripts\build-without-make.bat
SETLOCAL ENABLEEXTENSIONS
SET "REPO_ROOT=%~dp0.."
SET "REPO_ROOT=%REPO_ROOT:~0,-1%"
SET "GO_TAGS=goolm,stdjson"
REM Ensure Go is available
where go >nul 2>&1
IF ERRORLEVEL 1 (
echo ERROR: go is not installed or not on PATH.
EXIT /B 1
)
REM Ensure pnpm is available
where pnpm >nul 2>&1
IF ERRORLEVEL 1 (
echo ERROR: pnpm is not installed or not on PATH.
EXIT /B 1
)
PUSHD "%REPO_ROOT%"
IF ERRORLEVEL 1 (
echo ERROR: Failed to change directory to "%REPO_ROOT%".
EXIT /B 1
)
IF NOT EXIST build (
mkdir build
)
echo === Generating Go code ===
go generate ./...
IF ERRORLEVEL 1 (
echo ERROR: go generate failed.
POPD
EXIT /B 1
)
echo.
echo === Building PicoClaw core binary ===
go build -tags "%GO_TAGS%" -o build\picoclaw.exe .\cmd\picoclaw
IF ERRORLEVEL 1 (
echo ERROR: go build failed for core binary.
POPD
EXIT /B 1
)
echo.
echo === Building PicoClaw web frontend assets ===
PUSHD "%REPO_ROOT%\web\frontend"
IF ERRORLEVEL 1 (
echo ERROR: Failed to change directory to web\frontend.
POPD
EXIT /B 1
)
pnpm install --frozen-lockfile
IF ERRORLEVEL 1 (
echo ERROR: pnpm install failed.
POPD
POPD
EXIT /B 1
)
pnpm build:backend
IF ERRORLEVEL 1 (
echo ERROR: pnpm build:backend failed.
POPD
POPD
EXIT /B 1
)
POPd
echo.
echo === Building PicoClaw web launcher ===
go build -tags "%GO_TAGS%" -o build\picoclaw-launcher.exe .\web\backend
IF ERRORLEVEL 1 (
echo ERROR: go build failed for web launcher.
POPD
EXIT /B 1
)
echo.
echo === Build complete ===
echo Core binary: %REPO_ROOT%\build\picoclaw.exe
echo Web launcher: %REPO_ROOT%\build\picoclaw-launcher.exe
POPD
EXIT /B 0

View file

@ -0,0 +1,52 @@
#!/usr/bin/env bash
# Build PicoClaw core and web launcher without using make.
# Usage: ./scripts/build-without-make.sh
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." >/dev/null 2>&1 && pwd)"
cd "${REPO_ROOT}"
GO_TAGS="goolm,stdjson"
EXE_EXT=""
UNAME_S="$(uname -s 2>/dev/null || echo unknown)"
case "${UNAME_S}" in
*MINGW*|*MSYS*|*CYGWIN*|*Windows_NT*)
EXE_EXT=".exe"
;;
esac
command -v go >/dev/null 2>&1 || {
echo "ERROR: go is not installed or not on PATH."
exit 1
}
command -v pnpm >/dev/null 2>&1 || {
echo "ERROR: pnpm is not installed or not on PATH."
exit 1
}
mkdir -p "${REPO_ROOT}/build"
echo "=== Generating Go code ==="
go generate ./...
echo ""
echo "=== Building PicoClaw core binary ==="
go build -tags "${GO_TAGS}" -o "${REPO_ROOT}/build/picoclaw${EXE_EXT}" ./cmd/picoclaw
echo ""
echo "=== Building PicoClaw web frontend assets ==="
cd "${REPO_ROOT}/web/frontend"
pnpm install --frozen-lockfile
pnpm build:backend
echo ""
echo "=== Building PicoClaw web launcher ==="
cd "${REPO_ROOT}"
go build -tags "${GO_TAGS}" -o "${REPO_ROOT}/build/picoclaw-launcher${EXE_EXT}" ./web/backend
echo ""
echo "=== Build complete ==="
echo "Core binary: ${REPO_ROOT}/build/picoclaw${EXE_EXT}"
echo "Web launcher: ${REPO_ROOT}/build/picoclaw-launcher${EXE_EXT}"