feat: add install-pico target to Makefile and update uninstaller

- Add `install-pico` target to Makefile which depends on `build` and `build-launcher` to build both the backend core and the web launcher.
- Updates the install directory (`~/.local/bin/`) to include both `picoclaw` and `picoclaw-launcher`.
- Updates `scripts/uninstall.sh` to remove `picoclaw-launcher` as well as the core binary and the app configuration data.

Co-authored-by: TanLuong <28281768+TanLuong@users.noreply.github.com>
This commit is contained in:
google-labs-jules[bot] 2026-03-26 15:58:28 +00:00
parent f63ddcfae2
commit bc17dd338b
2 changed files with 27 additions and 0 deletions

View file

@ -223,6 +223,25 @@ install: build
@echo "Installed uninstaller script to $(INSTALL_BIN_DIR)/$(BINARY_NAME)-uninstall"
@echo "Installation complete!"
## install-pico: Build core, web and install picoclaw and picoclaw-launcher to system
install-pico: build build-launcher
@echo "Installing $(BINARY_NAME) and picoclaw-launcher..."
@mkdir -p $(INSTALL_BIN_DIR)
# Copy core binary with temporary suffix to ensure atomic update
@cp $(BUILD_DIR)/$(BINARY_NAME) $(INSTALL_BIN_DIR)/$(BINARY_NAME)$(INSTALL_TMP_SUFFIX)
@chmod +x $(INSTALL_BIN_DIR)/$(BINARY_NAME)$(INSTALL_TMP_SUFFIX)
@mv -f $(INSTALL_BIN_DIR)/$(BINARY_NAME)$(INSTALL_TMP_SUFFIX) $(INSTALL_BIN_DIR)/$(BINARY_NAME)
@echo "Installed binary to $(INSTALL_BIN_DIR)/$(BINARY_NAME)"
# Copy launcher binary with temporary suffix
@cp $(BUILD_DIR)/picoclaw-launcher $(INSTALL_BIN_DIR)/picoclaw-launcher$(INSTALL_TMP_SUFFIX)
@chmod +x $(INSTALL_BIN_DIR)/picoclaw-launcher$(INSTALL_TMP_SUFFIX)
@mv -f $(INSTALL_BIN_DIR)/picoclaw-launcher$(INSTALL_TMP_SUFFIX) $(INSTALL_BIN_DIR)/picoclaw-launcher
@echo "Installed launcher to $(INSTALL_BIN_DIR)/picoclaw-launcher"
@cp scripts/uninstall.sh $(INSTALL_BIN_DIR)/$(BINARY_NAME)-uninstall
@chmod +x $(INSTALL_BIN_DIR)/$(BINARY_NAME)-uninstall
@echo "Installed uninstaller script to $(INSTALL_BIN_DIR)/$(BINARY_NAME)-uninstall"
@echo "Installation complete!"
## uninstall: Remove picoclaw from system
uninstall:
@echo "Uninstalling $(BINARY_NAME)..."

View file

@ -20,6 +20,14 @@ else
echo "Executable ${INSTALL_BIN_DIR}/${BINARY_NAME} not found. Skipping."
fi
# Remove the launcher binary
if [ -f "${INSTALL_BIN_DIR}/picoclaw-launcher" ]; then
rm -f "${INSTALL_BIN_DIR}/picoclaw-launcher"
echo "Removed executable: ${INSTALL_BIN_DIR}/picoclaw-launcher"
else
echo "Executable ${INSTALL_BIN_DIR}/picoclaw-launcher not found. Skipping."
fi
# Remove the workspace and configurations
if [ -d "${PICOCLAW_HOME}" ]; then
rm -rf "${PICOCLAW_HOME}"