- Move core libraries to Core/ directory (PeekabooCore, AXorcist) - Move applications to Apps/ directory (Mac, CLI) - Move TypeScript server to Server/ directory - Move scripts to Scripts/ directory - Archive deprecated PeekabooInspector (now integrated into Mac app) - Update all build configurations and paths - Update CI/CD workflows for new structure - Fix build scripts to use new paths This reorganization provides: - Clear separation between core libraries, apps, and server - Flattened Mac app structure (removed double nesting) - Consistent naming conventions - Better code sharing through PeekabooCore - Easier maintenance and development
51 lines
1.4 KiB
Bash
Executable File
51 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Build the Peekaboo Swift CLI as a standalone binary
|
|
# This script builds the CLI independently of the Node.js MCP server
|
|
|
|
set -e
|
|
|
|
# Colors for output
|
|
GREEN='\033[0;32m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${BLUE}Building Peekaboo Swift CLI...${NC}"
|
|
|
|
# Change to the CLI directory
|
|
cd "$(dirname "$0")/../Apps/CLI"
|
|
|
|
# Build for release with optimizations
|
|
echo -e "${BLUE}Building release version...${NC}"
|
|
swift build -c release
|
|
|
|
# Get the build output path
|
|
BUILD_PATH=".build/release/peekaboo"
|
|
|
|
if [ -f "$BUILD_PATH" ]; then
|
|
echo -e "${GREEN}✅ Build successful!${NC}"
|
|
echo -e "${BLUE}Binary location: $(pwd)/$BUILD_PATH${NC}"
|
|
|
|
# Show binary info
|
|
echo -e "\n${BLUE}Binary info:${NC}"
|
|
file "$BUILD_PATH"
|
|
echo "Size: $(du -h "$BUILD_PATH" | cut -f1)"
|
|
|
|
# Optionally copy to a more convenient location
|
|
if [ "$1" == "--install" ]; then
|
|
echo -e "\n${BLUE}Installing to /usr/local/bin...${NC}"
|
|
sudo cp "$BUILD_PATH" /usr/local/bin/peekaboo
|
|
echo -e "${GREEN}✅ Installed to /usr/local/bin/peekaboo${NC}"
|
|
else
|
|
echo -e "\n${BLUE}To install system-wide, run:${NC}"
|
|
echo " $0 --install"
|
|
echo -e "\n${BLUE}Or copy manually:${NC}"
|
|
echo " sudo cp $BUILD_PATH /usr/local/bin/peekaboo"
|
|
fi
|
|
|
|
echo -e "\n${BLUE}To see usage:${NC}"
|
|
echo " $BUILD_PATH --help"
|
|
else
|
|
echo -e "${RED}❌ Build failed!${NC}"
|
|
exit 1
|
|
fi |