feat: SEO optimize README and add GLM 4.7 integration
- Add comprehensive SEO meta tags (Open Graph, Twitter Card, Schema.org JSON-LD) - Add GitHub badges (stars, forks, license, release) with CTA - Add dedicated 'Supported AI Models & Providers' section with: - GLM 4.7 spotlight with benchmarks (SWE-bench +73.8%, #1 WebDev) - Z.AI API integration with 10% discount link (R0K78RJKNW) - Complete model listings for Z.AI, Anthropic, OpenAI, Google, Qwen, Ollama - Update installers with npm primary method and ZIP fallback for OpenCode CLI - Add backup files for all installers - Update repository clone URL to new GitHub location - Update all URLs and references to roman-ryzenadvanced/NomadArch-v1.0
This commit is contained in:
312
.backup/Install-Linux.sh.backup
Normal file
312
.backup/Install-Linux.sh.backup
Normal file
@@ -0,0 +1,312 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo ""
|
||||
echo " ███╗ ██╗ ██████╗ ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗██╗ ██╗"
|
||||
echo " ████╗ ██║██╔═══██╗████╗ ████║██╔══██╗██╔══██╗██╔══██╗██╔════╝██║ ██║"
|
||||
echo " ██╔██╗ ██║██║ ██║██╔████╔██║███████║██║ ██║███████║██████╔╝██║ ███████║"
|
||||
echo " ██║╚██╗██║██║ ██║██║╚██╔╝██║██╔══██║██║ ██║██╔══██║██╔══██╗██║ ██╔══██║"
|
||||
echo " ██║ ╚████║╚██████╔╝██║ ╚═╝ ██║██║ ██║██████╔╝██║ ██║██║ ██║╚██████╗██║ ██║"
|
||||
echo " ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝"
|
||||
echo ""
|
||||
echo " INSTALLER - Enhanced with Auto-Dependency Resolution"
|
||||
echo " ═════════════════════════════════════════════════════════════════════════════"
|
||||
echo ""
|
||||
|
||||
ERRORS=0
|
||||
WARNINGS=0
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "[STEP 1/6] Detecting Linux Distribution..."
|
||||
echo ""
|
||||
|
||||
# Detect Linux distribution
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
DISTRO=$ID
|
||||
DISTRO_VERSION=$VERSION_ID
|
||||
echo "[OK] Detected: $PRETTY_NAME"
|
||||
else
|
||||
echo "[WARN] Could not detect specific distribution"
|
||||
DISTRO="unknown"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "[STEP 2/6] Checking System Requirements..."
|
||||
echo ""
|
||||
|
||||
# Check for Node.js
|
||||
echo "[INFO] Checking Node.js..."
|
||||
if ! command -v node &> /dev/null; then
|
||||
echo "[ERROR] Node.js not found!"
|
||||
echo ""
|
||||
echo "NomadArch requires Node.js to run."
|
||||
echo ""
|
||||
echo "Install using your package manager:"
|
||||
if [ "$DISTRO" = "ubuntu" ] || [ "$DISTRO" = "debian" ]; then
|
||||
echo " sudo apt update && sudo apt install -y nodejs npm"
|
||||
elif [ "$DISTRO" = "fedora" ]; then
|
||||
echo " sudo dnf install -y nodejs npm"
|
||||
elif [ "$DISTRO" = "arch" ] || [ "$DISTRO" = "manjaro" ]; then
|
||||
echo " sudo pacman -S nodejs npm"
|
||||
elif [ "$DISTRO" = "opensuse-leap" ] || [ "$DISTRO" = "opensuse-tumbleweed" ]; then
|
||||
echo " sudo zypper install -y nodejs npm"
|
||||
else
|
||||
echo " Visit https://nodejs.org/ for installation instructions"
|
||||
fi
|
||||
echo ""
|
||||
echo "Or install Node.js using NVM (Node Version Manager):"
|
||||
echo " curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash"
|
||||
echo " source ~/.bashrc"
|
||||
echo " nvm install 20"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
NODE_VERSION=$(node --version)
|
||||
echo "[OK] Node.js detected: $NODE_VERSION"
|
||||
|
||||
# Check Node.js version (require 18+)
|
||||
NODE_MAJOR=$(echo $NODE_VERSION | cut -d. -f1 | sed 's/v//')
|
||||
if [ "$NODE_MAJOR" -lt 18 ]; then
|
||||
echo "[WARN] Node.js version is too old (found v$NODE_VERSION, required 18+)"
|
||||
echo "[INFO] Please update Node.js"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
fi
|
||||
|
||||
# Check for npm
|
||||
echo "[INFO] Checking npm..."
|
||||
if ! command -v npm &> /dev/null; then
|
||||
echo "[ERROR] npm not found! This should come with Node.js."
|
||||
echo "Please reinstall Node.js"
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
NPM_VERSION=$(npm --version)
|
||||
echo "[OK] npm detected: $NPM_VERSION"
|
||||
|
||||
# Check for build-essential (required for native modules)
|
||||
echo "[INFO] Checking build tools..."
|
||||
if ! command -v make &> /dev/null || ! command -v gcc &> /dev/null || ! command -v g++ &> /dev/null; then
|
||||
echo "[WARN] Build tools not found (gcc, g++, make)"
|
||||
echo "[INFO] Installing build-essential..."
|
||||
if [ "$DISTRO" = "ubuntu" ] || [ "$DISTRO" = "debian" ]; then
|
||||
sudo apt update && sudo apt install -y build-essential
|
||||
elif [ "$DISTRO" = "fedora" ]; then
|
||||
sudo dnf install -y gcc g++ make
|
||||
elif [ "$DISTRO" = "arch" ] || [ "$DISTRO" = "manjaro" ]; then
|
||||
sudo pacman -S --noconfirm base-devel
|
||||
elif [ "$DISTRO" = "opensuse-leap" ] || [ "$DISTRO" = "opensuse-tumbleweed" ]; then
|
||||
sudo zypper install -y gcc-c++ make
|
||||
else
|
||||
echo "[WARN] Could not auto-install build tools. Please install manually."
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
fi
|
||||
else
|
||||
echo "[OK] Build tools detected"
|
||||
fi
|
||||
|
||||
# Check for Git (optional but recommended)
|
||||
echo "[INFO] Checking Git..."
|
||||
if ! command -v git &> /dev/null; then
|
||||
echo "[WARN] Git not found (optional but recommended)"
|
||||
echo "[INFO] Install: sudo apt install git (or equivalent for your distro)"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
else
|
||||
GIT_VERSION=$(git --version)
|
||||
echo "[OK] Git detected: $GIT_VERSION"
|
||||
fi
|
||||
|
||||
# Check for Python (optional, for some tools)
|
||||
echo "[INFO] Checking Python..."
|
||||
if command -v python3 &> /dev/null; then
|
||||
PY_VERSION=$(python3 --version 2>&1 | awk '{print $2}')
|
||||
echo "[OK] Python3 detected: $PY_VERSION"
|
||||
elif command -v python &> /dev/null; then
|
||||
PY_VERSION=$(python --version 2>&1 | awk '{print $2}')
|
||||
echo "[OK] Python detected: $PY_VERSION"
|
||||
else
|
||||
echo "[WARN] Python not found (optional, required for some build tools)"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
fi
|
||||
|
||||
# Check disk space (at least 2GB free)
|
||||
FREE_SPACE=$(df -BG "$PWD" | tail -1 | awk '{print int($4/1024/1024)}')
|
||||
if [ "$FREE_SPACE" -lt 2048 ]; then
|
||||
echo "[WARN] Low disk space ($FREE_SPACE MB free, recommended 2GB+)"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
else
|
||||
echo "[OK] Disk space: $FREE_SPACE MB free"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "[STEP 3/7] Downloading OpenCode Binary..."
|
||||
echo ""
|
||||
|
||||
if [ ! -d "bin" ]; then
|
||||
mkdir bin
|
||||
fi
|
||||
|
||||
if [ ! -f "bin/opencode" ]; then
|
||||
echo "[SETUP] Downloading opencode binary from GitHub releases..."
|
||||
echo "[INFO] This is required for workspace functionality."
|
||||
|
||||
# Detect architecture
|
||||
ARCH=$(uname -m)
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
FILENAME="opencode-linux"
|
||||
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
|
||||
FILENAME="opencode-linux-arm64"
|
||||
else
|
||||
echo "[WARN] Unsupported architecture: $ARCH"
|
||||
echo "[INFO] Please download opencode manually from: https://opencode.ai/"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
FILENAME=""
|
||||
fi
|
||||
|
||||
if [ -n "$FILENAME" ]; then
|
||||
curl -L -o "bin/opencode" "https://github.com/NeuralNomadsAI/NomadArch/releases/latest/download/$FILENAME"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "[WARN] Failed to download opencode automatically."
|
||||
echo "[INFO] You can install OpenCode CLI manually from: https://opencode.ai/"
|
||||
echo "[INFO] Or download opencode and place it in bin/ folder"
|
||||
echo "[INFO] Without opencode, workspace creation will fail."
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
else
|
||||
chmod +x bin/opencode
|
||||
echo "[OK] opencode downloaded successfully"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "[OK] opencode already exists"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "[STEP 5/7] Setting Permissions..."
|
||||
echo ""
|
||||
|
||||
# Make scripts executable
|
||||
chmod +x Launch-Unix.sh 2>/dev/null
|
||||
chmod +x Install-Linux.sh 2>/dev/null
|
||||
chmod +x Install-Mac.sh 2>/dev/null
|
||||
|
||||
echo "[OK] Scripts permissions set"
|
||||
|
||||
echo ""
|
||||
echo "[STEP 6/7] Cleaning Previous Installation..."
|
||||
echo ""
|
||||
|
||||
if [ -d "node_modules" ]; then
|
||||
echo "[INFO] Found existing node_modules, cleaning..."
|
||||
rm -rf node_modules
|
||||
echo "[OK] Cleaned previous installation artifacts"
|
||||
else
|
||||
echo "[OK] No previous installation found"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "[STEP 7/7] Installing Dependencies..."
|
||||
echo ""
|
||||
echo "This may take 3-10 minutes depending on your internet speed."
|
||||
echo "Please be patient and do not close this terminal."
|
||||
echo ""
|
||||
|
||||
npm install
|
||||
if [ $? -ne 0 ]; then
|
||||
echo ""
|
||||
echo "[ERROR] npm install failed!"
|
||||
echo ""
|
||||
echo "Common solutions:"
|
||||
echo " 1. Check your internet connection"
|
||||
echo " 2. Try running with sudo if permission errors occur"
|
||||
echo " 3. Clear npm cache: npm cache clean --force"
|
||||
echo " 4. Delete node_modules and try again"
|
||||
echo ""
|
||||
echo "Attempting to clear npm cache and retry..."
|
||||
npm cache clean --force
|
||||
echo "Retrying installation..."
|
||||
npm install
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "[ERROR] Installation failed after retry."
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
else
|
||||
echo "[OK] Dependencies installed successfully"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "[STEP 6/6] Building NomadArch..."
|
||||
echo ""
|
||||
echo "This may take 2-5 minutes depending on your system."
|
||||
echo ""
|
||||
|
||||
npm run build
|
||||
if [ $? -ne 0 ]; then
|
||||
echo ""
|
||||
echo "[ERROR] Build failed!"
|
||||
echo ""
|
||||
echo "Common solutions:"
|
||||
echo " 1. Check that Node.js version is 18+ (node --version)"
|
||||
echo " 2. Clear npm cache: npm cache clean --force"
|
||||
echo " 3. Delete node_modules and reinstall: rm -rf node_modules && npm install"
|
||||
echo " 4. Check for missing system dependencies (build-essential)"
|
||||
echo " 5. Check error messages above for specific issues"
|
||||
echo ""
|
||||
ERRORS=$((ERRORS + 1))
|
||||
else
|
||||
echo "[OK] Build completed successfully"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Verifying Installation"
|
||||
echo ""
|
||||
|
||||
# Check if opencode binary exists
|
||||
if [ ! -f "bin/opencode" ]; then
|
||||
echo "[WARN] opencode binary not found. Workspace creation will fail."
|
||||
echo "[INFO] Download from: https://github.com/NeuralNomadsAI/NomadArch/releases/latest/download/opencode-linux"
|
||||
echo "[INFO] Or install OpenCode CLI from: https://opencode.ai/"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
else
|
||||
echo "[OK] opencode binary verified"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Installation Summary"
|
||||
echo ""
|
||||
|
||||
if [ $ERRORS -gt 0 ]; then
|
||||
echo ""
|
||||
echo "════════════════════════════════════════════════════════════════════════════"
|
||||
echo "[FAILED] Installation encountered $ERRORS error(s)!"
|
||||
echo ""
|
||||
echo "Please review error messages above and try again."
|
||||
echo "For help, see: https://github.com/NeuralNomadsAI/NomadArch/issues"
|
||||
echo "════════════════════════════════════════════════════════════════════════════"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "════════════════════════════════════════════════════════════════════════════"
|
||||
echo "[SUCCESS] Installation Complete!"
|
||||
echo ""
|
||||
|
||||
if [ $WARNINGS -gt 0 ]; then
|
||||
echo "[WARN] There were $WARNINGS warning(s) during installation."
|
||||
echo "Review warnings above. Most warnings are non-critical."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "You can now run NomadArch using:"
|
||||
echo " ./Launch-Unix.sh"
|
||||
echo ""
|
||||
echo "For help and documentation, see: README.md"
|
||||
echo "For troubleshooting, see: TROUBLESHOOTING.md"
|
||||
echo "════════════════════════════════════════════════════════════════════════════"
|
||||
echo ""
|
||||
echo "Press Enter to start NomadArch now, or Ctrl+C to start later..."
|
||||
read
|
||||
|
||||
echo ""
|
||||
echo "[INFO] Starting NomadArch..."
|
||||
./Launch-Unix.sh
|
||||
349
.backup/Install-Mac.sh.backup
Normal file
349
.backup/Install-Mac.sh.backup
Normal file
@@ -0,0 +1,349 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo ""
|
||||
echo " ███╗ ██╗ ██████╗ ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗██╗ ██╗"
|
||||
echo " ████╗ ██║██╔═══██╗████╗ ████║██╔══██╗██╔══██╗██╔══██╗██╔════╝██║ ██║"
|
||||
echo " ██╔██╗ ██║██║ ██║██╔████╔██║███████║██║ ██║███████║██████╔╝██║ ███████║"
|
||||
echo " ██║╚██╗██║██║ ██║██║╚██╔╝██║██╔══██║██║ ██║██╔══██║██╔══██╗██║ ██╔══██║"
|
||||
echo " ██║ ╚████║╚██████╔╝██║ ╚═╝ ██║██║ ██║██████╔╝██║ ██║██║ ██║╚██████╗██║ ██║"
|
||||
echo " ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝"
|
||||
echo ""
|
||||
echo " INSTALLER - macOS Enhanced with Auto-Dependency Resolution"
|
||||
echo " ═══════════════════════════════════════════════════════════════════════════"
|
||||
echo ""
|
||||
|
||||
ERRORS=0
|
||||
WARNINGS=0
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "[STEP 1/7] Checking macOS Version..."
|
||||
echo ""
|
||||
|
||||
# Detect macOS version
|
||||
if [ -f /System/Library/CoreServices/SystemVersion.plist ]; then
|
||||
MAC_VERSION=$(defaults read /System/Library/CoreServices/SystemVersion.plist ProductVersion)
|
||||
MAC_MAJOR=$(echo $MAC_VERSION | cut -d. -f1)
|
||||
echo "[OK] macOS detected: $MAC_VERSION"
|
||||
|
||||
# Check minimum version (macOS 11+ / Big Sur+)
|
||||
if [ "$MAC_MAJOR" -lt 11 ]; then
|
||||
echo "[WARN] NomadArch requires macOS 11+ (Big Sur or later)"
|
||||
echo "[INFO] Your version is $MAC_VERSION"
|
||||
echo "[INFO] Please upgrade macOS to continue"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "[WARN] Could not detect macOS version"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
fi
|
||||
|
||||
# Check for Apple Silicon
|
||||
ARCH=$(uname -m)
|
||||
if [ "$ARCH" = "arm64" ]; then
|
||||
echo "[OK] Apple Silicon detected (M1/M2/M3 chip)"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
echo "[OK] Intel Mac detected"
|
||||
else
|
||||
echo "[WARN] Unknown architecture: $ARCH"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "[STEP 2/7] Checking System Requirements..."
|
||||
echo ""
|
||||
|
||||
# Check for Node.js
|
||||
echo "[INFO] Checking Node.js..."
|
||||
if ! command -v node &> /dev/null; then
|
||||
echo "[ERROR] Node.js not found!"
|
||||
echo ""
|
||||
echo "NomadArch requires Node.js to run."
|
||||
echo ""
|
||||
echo "Install Node.js using one of these methods:"
|
||||
echo ""
|
||||
echo " 1. Homebrew (recommended):"
|
||||
echo " brew install node"
|
||||
echo ""
|
||||
echo " 2. Download from official site:"
|
||||
echo " Visit https://nodejs.org/"
|
||||
echo " Download and install the macOS installer"
|
||||
echo ""
|
||||
echo " 3. Using NVM (Node Version Manager):"
|
||||
echo " curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash"
|
||||
echo " source ~/.zshrc (or ~/.bash_profile)"
|
||||
echo " nvm install 20"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
NODE_VERSION=$(node --version)
|
||||
echo "[OK] Node.js detected: $NODE_VERSION"
|
||||
|
||||
# Check Node.js version (require 18+)
|
||||
NODE_MAJOR=$(echo $NODE_VERSION | cut -d. -f1 | sed 's/v//')
|
||||
if [ "$NODE_MAJOR" -lt 18 ]; then
|
||||
echo "[WARN] Node.js version is too old (found v$NODE_VERSION, required 18+)"
|
||||
echo "[INFO] Please update Node.js: brew upgrade node"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
fi
|
||||
|
||||
# Check for npm
|
||||
echo "[INFO] Checking npm..."
|
||||
if ! command -v npm &> /dev/null; then
|
||||
echo "[ERROR] npm not found! This should come with Node.js."
|
||||
echo "Please reinstall Node.js"
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
NPM_VERSION=$(npm --version)
|
||||
echo "[OK] npm detected: $NPM_VERSION"
|
||||
|
||||
# Check for Xcode Command Line Tools (required for native modules)
|
||||
echo "[INFO] Checking Xcode Command Line Tools..."
|
||||
if ! command -v xcode-select &> /dev/null; then
|
||||
echo "[WARN] Xcode Command Line Tools not installed"
|
||||
echo "[INFO] Required for building native Node.js modules"
|
||||
echo ""
|
||||
echo "Install by running:"
|
||||
echo " xcode-select --install"
|
||||
echo ""
|
||||
echo "This will open a dialog to install the tools."
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
else
|
||||
XCODE_PATH=$(xcode-select -p)
|
||||
echo "[OK] Xcode Command Line Tools detected: $XCODE_PATH"
|
||||
fi
|
||||
|
||||
# Check for Homebrew (optional but recommended)
|
||||
echo "[INFO] Checking Homebrew..."
|
||||
if ! command -v brew &> /dev/null; then
|
||||
echo "[WARN] Homebrew not found (optional but recommended)"
|
||||
echo "[INFO] Install Homebrew from: https://brew.sh/"
|
||||
echo "[INFO] Then you can install dependencies with: brew install node git"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
else
|
||||
BREW_VERSION=$(brew --version | head -1)
|
||||
echo "[OK] Homebrew detected: $BREW_VERSION"
|
||||
fi
|
||||
|
||||
# Check for Git (optional but recommended)
|
||||
echo "[INFO] Checking Git..."
|
||||
if ! command -v git &> /dev/null; then
|
||||
echo "[WARN] Git not found (optional but recommended)"
|
||||
echo "[INFO] Install: brew install git"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
else
|
||||
GIT_VERSION=$(git --version)
|
||||
echo "[OK] Git detected: $GIT_VERSION"
|
||||
fi
|
||||
|
||||
# Check disk space (at least 2GB free)
|
||||
FREE_SPACE=$(df -BG "$PWD" | tail -1 | awk '{print int($4/1024/1024)}')
|
||||
if [ "$FREE_SPACE" -lt 2048 ]; then
|
||||
echo "[WARN] Low disk space ($FREE_SPACE MB free, recommended 2GB+)"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
else
|
||||
echo "[OK] Disk space: $FREE_SPACE MB free"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "[STEP 3/7] Checking Rosetta 2 (Apple Silicon)..."
|
||||
echo ""
|
||||
|
||||
# Check if Rosetta 2 is installed on Apple Silicon
|
||||
if [ "$ARCH" = "arm64" ]; then
|
||||
if ! /usr/bin/pgrep -q oahd; then
|
||||
echo "[INFO] Rosetta 2 is not running"
|
||||
echo "[INFO] Some x86_64 dependencies may need Rosetta"
|
||||
echo ""
|
||||
echo "Install Rosetta 2 if needed:"
|
||||
echo " softwareupdate --install-rosetta"
|
||||
echo ""
|
||||
else
|
||||
echo "[OK] Rosetta 2 is installed and running"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "[STEP 4/7] Checking Gatekeeper Status..."
|
||||
echo ""
|
||||
|
||||
# Check if Gatekeeper will block unsigned apps
|
||||
echo "[INFO] Gatekeeper may block unsigned applications"
|
||||
echo "[INFO] If NomadArch doesn't open, try:"
|
||||
echo " Right-click -> Open"
|
||||
echo " Or disable Gatekeeper (not recommended):"
|
||||
echo " sudo spctl --master-disable"
|
||||
echo ""
|
||||
|
||||
echo ""
|
||||
echo "[STEP 5/8] Downloading OpenCode Binary..."
|
||||
echo ""
|
||||
|
||||
if [ ! -d "bin" ]; then
|
||||
mkdir bin
|
||||
fi
|
||||
|
||||
if [ ! -f "bin/opencode" ]; then
|
||||
echo "[SETUP] Downloading opencode binary from GitHub releases..."
|
||||
echo "[INFO] This is required for workspace functionality."
|
||||
|
||||
# Detect architecture
|
||||
if [ "$ARCH" = "arm64" ]; then
|
||||
FILENAME="opencode-macos-arm64"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
FILENAME="opencode-macos"
|
||||
else
|
||||
echo "[WARN] Unsupported architecture: $ARCH"
|
||||
echo "[INFO] Please download opencode manually from: https://opencode.ai/"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
FILENAME=""
|
||||
fi
|
||||
|
||||
if [ -n "$FILENAME" ]; then
|
||||
curl -L -o "bin/opencode" "https://github.com/NeuralNomadsAI/NomadArch/releases/latest/download/$FILENAME"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "[WARN] Failed to download opencode automatically."
|
||||
echo "[INFO] You can install OpenCode CLI manually from: https://opencode.ai/"
|
||||
echo "[INFO] Or download opencode and place it in bin/ folder"
|
||||
echo "[INFO] Without opencode, workspace creation will fail."
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
else
|
||||
chmod +x bin/opencode
|
||||
echo "[OK] opencode downloaded successfully"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "[OK] opencode already exists"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "[STEP 6/8] Setting Permissions..."
|
||||
echo ""
|
||||
|
||||
# Make scripts executable
|
||||
chmod +x Launch-Unix.sh 2>/dev/null
|
||||
chmod +x Install-Linux.sh 2>/dev/null
|
||||
chmod +x Install-Mac.sh 2>/dev/null
|
||||
|
||||
echo "[OK] Scripts permissions set"
|
||||
|
||||
echo ""
|
||||
echo "[STEP 7/8] Cleaning Previous Installation..."
|
||||
echo ""
|
||||
|
||||
if [ -d "node_modules" ]; then
|
||||
echo "[INFO] Found existing node_modules, cleaning..."
|
||||
rm -rf node_modules
|
||||
echo "[OK] Cleaned previous installation artifacts"
|
||||
else
|
||||
echo "[OK] No previous installation found"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "[STEP 8/8] Installing Dependencies..."
|
||||
echo ""
|
||||
echo "This may take 3-10 minutes depending on your internet speed."
|
||||
echo "Please be patient and do not close this terminal."
|
||||
echo ""
|
||||
|
||||
npm install
|
||||
if [ $? -ne 0 ]; then
|
||||
echo ""
|
||||
echo "[ERROR] npm install failed!"
|
||||
echo ""
|
||||
echo "Common solutions:"
|
||||
echo " 1. Check your internet connection"
|
||||
echo " 2. Try clearing npm cache: npm cache clean --force"
|
||||
echo " 3. Delete node_modules and try again: rm -rf node_modules && npm install"
|
||||
echo " 4. Ensure Xcode Command Line Tools are installed"
|
||||
echo " 5. Check if Node.js version is 18+"
|
||||
echo ""
|
||||
echo "Attempting to clear npm cache and retry..."
|
||||
npm cache clean --force
|
||||
echo "Retrying installation..."
|
||||
npm install
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "[ERROR] Installation failed after retry."
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
else
|
||||
echo "[OK] Dependencies installed successfully"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Building NomadArch..."
|
||||
echo ""
|
||||
echo "This may take 2-5 minutes depending on your system."
|
||||
echo ""
|
||||
|
||||
npm run build
|
||||
if [ $? -ne 0 ]; then
|
||||
echo ""
|
||||
echo "[ERROR] Build failed!"
|
||||
echo ""
|
||||
echo "Common solutions:"
|
||||
echo " 1. Check that Node.js version is 18+ (node --version)"
|
||||
echo " 2. Ensure Xcode Command Line Tools are installed: xcode-select --install"
|
||||
echo " 3. Clear npm cache: npm cache clean --force"
|
||||
echo " 4. Delete node_modules and reinstall: rm -rf node_modules && npm install"
|
||||
echo " 5. Check error messages above for specific issues"
|
||||
echo ""
|
||||
ERRORS=$((ERRORS + 1))
|
||||
else
|
||||
echo "[OK] Build completed successfully"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Verifying Installation"
|
||||
echo ""
|
||||
|
||||
# Check if opencode binary exists
|
||||
if [ ! -f "bin/opencode" ]; then
|
||||
echo "[WARN] opencode binary not found. Workspace creation will fail."
|
||||
echo "[INFO] Download from: https://github.com/NeuralNomadsAI/NomadArch/releases/latest/download/opencode-macos"
|
||||
echo "[INFO] Or install OpenCode CLI from: https://opencode.ai/"
|
||||
WARNINGS=$((WARNINGS + 1))
|
||||
else
|
||||
echo "[OK] opencode binary verified"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Installation Summary"
|
||||
echo ""
|
||||
|
||||
if [ $ERRORS -gt 0 ]; then
|
||||
echo ""
|
||||
echo "════════════════════════════════════════════════════════════════════════════"
|
||||
echo "[FAILED] Installation encountered $ERRORS error(s)!"
|
||||
echo ""
|
||||
echo "Please review error messages above and try again."
|
||||
echo "For help, see: https://github.com/NeuralNomadsAI/NomadArch/issues"
|
||||
echo "════════════════════════════════════════════════════════════════════════════"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "══════════════════════════════════════════════════════════════════════════"
|
||||
echo "[SUCCESS] Installation Complete!"
|
||||
echo ""
|
||||
|
||||
if [ $WARNINGS -gt 0 ]; then
|
||||
echo "[WARN] There were $WARNINGS warning(s) during installation."
|
||||
echo "Review warnings above. Most warnings are non-critical."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "You can now run NomadArch using:"
|
||||
echo " ./Launch-Unix.sh"
|
||||
echo ""
|
||||
echo "For help and documentation, see: README.md"
|
||||
echo "For troubleshooting, see: TROUBLESHOOTING.md"
|
||||
echo "════════════════════════════════════════════════════════════════════════════"
|
||||
echo ""
|
||||
echo "Press Enter to start NomadArch now, or Ctrl+C to start later..."
|
||||
read
|
||||
|
||||
echo ""
|
||||
echo "[INFO] Starting NomadArch..."
|
||||
./Launch-Unix.sh
|
||||
295
.backup/Install-Windows.bat.backup
Normal file
295
.backup/Install-Windows.bat.backup
Normal file
@@ -0,0 +1,295 @@
|
||||
@echo off
|
||||
title NomadArch Installer
|
||||
color 0A
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
echo.
|
||||
echo ███╗ ██╗ ██████╗ ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗██╗ ██╗
|
||||
echo ████╗ ██║██╔═══██╗████╗ ████║██╔══██╗██╔══██╗██╔══██╗██╔════╝██║ ██║
|
||||
echo ██╔██╗ ██║██║ ██║██╔████╔██║███████║██║ ██║███████║██████╔╝██║ ███████║
|
||||
echo ██║╚██╗██║██║ ██║██║╚██╔╝██║██╔══██║██║ ██║██╔══██║██╔══██╗██║ ██╔══██║
|
||||
echo ██║ ╚████║╚██████╔╝██║ ╚═╝ ██║██║ ██║██████╔╝██║ ██║██║ ██║╚██████╗██║ ██║
|
||||
echo ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
|
||||
echo.
|
||||
echo INSTALLER - Enhanced with Auto-Dependency Resolution
|
||||
echo ═══════════════════════════════════════════════════════════════════════════════
|
||||
echo.
|
||||
|
||||
set ERRORS=0
|
||||
set WARNINGS=0
|
||||
|
||||
cd /d "%~dp0"
|
||||
|
||||
echo [STEP 1/6] Checking System Requirements...
|
||||
echo.
|
||||
|
||||
:: Check for Administrator privileges
|
||||
net session >nul 2>&1
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo [WARN] Not running as Administrator. Some operations may fail.
|
||||
set /a WARNINGS+=1
|
||||
echo.
|
||||
)
|
||||
|
||||
:: Check for Node.js
|
||||
echo [INFO] Checking Node.js...
|
||||
where node >nul 2>&1
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo [ERROR] Node.js not found!
|
||||
echo.
|
||||
echo NomadArch requires Node.js to run.
|
||||
echo.
|
||||
echo Download from: https://nodejs.org/
|
||||
echo Recommended: Node.js 18.x LTS or 20.x LTS
|
||||
echo.
|
||||
echo Opening download page...
|
||||
start "" "https://nodejs.org/"
|
||||
echo.
|
||||
echo Please install Node.js and run this installer again.
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
for /f "tokens=*" %%i in ('node --version') do set NODE_VERSION=%%i
|
||||
echo [OK] Node.js detected: %NODE_VERSION%
|
||||
|
||||
:: Check Node.js version (require 18+)
|
||||
for /f "tokens=1,2 delims=." %%a in ("%NODE_VERSION:v=%") do (
|
||||
set MAJOR=%%a
|
||||
set MINOR=%%b
|
||||
)
|
||||
if %MAJOR% lss 18 (
|
||||
echo [WARN] Node.js version is too old (found v%MAJOR%.%MINOR%, required 18+)
|
||||
echo [INFO] Please update Node.js from: https://nodejs.org/
|
||||
set /a WARNINGS+=1
|
||||
)
|
||||
|
||||
:: Check for npm
|
||||
echo [INFO] Checking npm...
|
||||
where npm >nul 2>&1
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo [ERROR] npm not found! This should come with Node.js.
|
||||
echo Please reinstall Node.js from: https://nodejs.org/
|
||||
set /a ERRORS+=1
|
||||
)
|
||||
for /f "tokens=*" %%i in ('npm --version') do set NPM_VERSION=%%i
|
||||
echo [OK] npm detected: %NPM_VERSION%
|
||||
|
||||
:: Check for Git (optional but recommended)
|
||||
echo [INFO] Checking Git...
|
||||
where git >nul 2>&1
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo [WARN] Git not found (optional but recommended)
|
||||
echo [INFO] Install from: https://git-scm.com/
|
||||
set /a WARNINGS+=1
|
||||
) else (
|
||||
for /f "tokens=*" %%i in ('git --version') do set GIT_VERSION=%%i
|
||||
echo [OK] Git detected: %GIT_VERSION%
|
||||
)
|
||||
|
||||
:: Check for Python (optional, for some tools)
|
||||
echo [INFO] Checking Python...
|
||||
where python >nul 2>&1
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
where python3 >nul 2>&1
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo [WARN] Python not found (optional, required for some build tools)
|
||||
echo [INFO] Install from: https://www.python.org/downloads/
|
||||
set /a WARNINGS+=1
|
||||
) else (
|
||||
echo [OK] Python3 detected
|
||||
)
|
||||
) else (
|
||||
for /f "tokens=2" %%i in ('python --version') do set PY_VERSION=%%i
|
||||
echo [OK] Python detected: %PY_VERSION%
|
||||
)
|
||||
|
||||
:: Check disk space (at least 2GB free)
|
||||
for /f "tokens=3" %%a in ('dir /-c "%~dp0" ^| find "bytes free"') do set FREE_SPACE=%%a
|
||||
set /a FREE_SPACE_GB=!FREE_SPACE!/1024/1024/1024
|
||||
if !FREE_SPACE_GB! lss 2 (
|
||||
echo [WARN] Low disk space (!FREE_SPACE_GB! GB free, recommended 2GB+)
|
||||
set /a WARNINGS+=1
|
||||
) else (
|
||||
echo [OK] Disk space: !FREE_SPACE_GB! GB free
|
||||
)
|
||||
|
||||
echo.
|
||||
echo [STEP 2/6] Cleaning Previous Installation...
|
||||
echo.
|
||||
|
||||
if exist "node_modules" (
|
||||
echo [INFO] Found existing node_modules, cleaning...
|
||||
if exist "node_modules\.package-lock.json" (
|
||||
del /f /q "node_modules\.package-lock.json" 2>nul
|
||||
)
|
||||
echo [OK] Cleaned previous installation artifacts
|
||||
) else (
|
||||
echo [OK] No previous installation found
|
||||
)
|
||||
|
||||
echo.
|
||||
echo [STEP 3/6] Downloading OpenCode Binary...
|
||||
echo.
|
||||
|
||||
if not exist "bin" mkdir bin
|
||||
if not exist "bin\opencode.exe" (
|
||||
echo [SETUP] Downloading opencode.exe from GitHub releases...
|
||||
echo [INFO] This is required for workspace functionality.
|
||||
curl -L -o "bin\opencode.exe" "https://github.com/NeuralNomadsAI/NomadArch/releases/latest/download/opencode.exe"
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo [WARN] Failed to download opencode.exe automatically.
|
||||
echo [INFO] You can install OpenCode CLI manually from: https://opencode.ai/
|
||||
echo [INFO] Or download opencode.exe and place it in bin/ folder
|
||||
echo [INFO] Without opencode.exe, workspace creation will fail.
|
||||
set /a WARNINGS+=1
|
||||
) else (
|
||||
echo [OK] opencode.exe downloaded successfully
|
||||
)
|
||||
) else (
|
||||
echo [OK] opencode.exe already exists
|
||||
)
|
||||
|
||||
echo.
|
||||
echo [STEP 4/6] Installing Dependencies...
|
||||
echo.
|
||||
echo This may take 3-10 minutes depending on your internet speed.
|
||||
echo Please be patient and do not close this window.
|
||||
echo.
|
||||
|
||||
call npm install
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo.
|
||||
echo [ERROR] npm install failed!
|
||||
echo.
|
||||
echo Common solutions:
|
||||
echo 1. Check your internet connection
|
||||
echo 2. Try running as Administrator
|
||||
echo 3. Clear npm cache: npm cache clean --force
|
||||
echo 4. Delete node_modules and try again
|
||||
echo.
|
||||
echo Attempting to clear npm cache and retry...
|
||||
call npm cache clean --force
|
||||
echo Retrying installation...
|
||||
call npm install
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo [ERROR] Installation failed after retry.
|
||||
set /a ERRORS+=1
|
||||
)
|
||||
) else (
|
||||
echo [OK] Dependencies installed successfully
|
||||
)
|
||||
|
||||
echo.
|
||||
echo [STEP 5/6] Building NomadArch...
|
||||
echo.
|
||||
echo This may take 2-5 minutes depending on your system.
|
||||
echo.
|
||||
|
||||
call npm run build
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo.
|
||||
echo [ERROR] Build failed!
|
||||
echo.
|
||||
echo Common solutions:
|
||||
echo 1. Check that Node.js version is 18+ (node --version)
|
||||
echo 2. Clear npm cache: npm cache clean --force
|
||||
echo 3. Delete node_modules and reinstall: rm -rf node_modules ^&^& npm install
|
||||
echo 4. Check the error messages above for specific issues
|
||||
echo.
|
||||
set /a ERRORS+=1
|
||||
) else (
|
||||
echo [OK] Build completed successfully
|
||||
)
|
||||
|
||||
echo.
|
||||
echo [STEP 6/6] Verifying Installation...
|
||||
echo.
|
||||
|
||||
:: Check UI build
|
||||
if not exist "packages\ui\dist" (
|
||||
echo [WARN] UI build not found
|
||||
set /a WARNINGS+=1
|
||||
) else (
|
||||
echo [OK] UI build verified
|
||||
)
|
||||
|
||||
:: Check Server build
|
||||
if not exist "packages\server\dist\bin.js" (
|
||||
echo [WARN] Server build not found
|
||||
set /a WARNINGS+=1
|
||||
) else (
|
||||
echo [OK] Server build verified
|
||||
)
|
||||
|
||||
:: Check Electron build
|
||||
if not exist "packages\electron-app\dist\main\main.js" (
|
||||
echo [WARN] Electron build not found
|
||||
set /a WARNINGS+=1
|
||||
) else (
|
||||
echo [OK] Electron build verified
|
||||
)
|
||||
|
||||
:: Check opencode.exe
|
||||
if not exist "bin\opencode.exe" (
|
||||
echo [WARN] opencode.exe not found. Workspace creation will fail.
|
||||
echo [INFO] Download from: https://github.com/NeuralNomadsAI/NomadArch/releases/latest/download/opencode.exe
|
||||
echo [INFO] Or install OpenCode CLI from: https://opencode.ai/
|
||||
set /a WARNINGS+=1
|
||||
) else (
|
||||
echo [OK] opencode.exe verified
|
||||
)
|
||||
|
||||
echo.
|
||||
echo [STEP 7/7] Installation Summary
|
||||
echo.
|
||||
|
||||
if %ERRORS% gtr 0 (
|
||||
echo.
|
||||
echo ═══════════════════════════════════════════════════════════════════════════════
|
||||
echo [FAILED] Installation encountered %ERRORS% error^(s^)!
|
||||
echo.
|
||||
echo Please review the error messages above and try again.
|
||||
echo For help, see: https://github.com/NeuralNomadsAI/NomadArch/issues
|
||||
echo ═══════════════════════════════════════════════════════════════════════════════
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ═══════════════════════════════════════════════════════════════════════════════
|
||||
echo [SUCCESS] Installation Complete!
|
||||
echo.
|
||||
if %WARNINGS% gtr 0 (
|
||||
echo [WARN] There were %WARNINGS% warning^(s^) during installation.
|
||||
echo Review the warnings above. Most warnings are non-critical.
|
||||
echo.
|
||||
)
|
||||
echo You can now run NomadArch using:
|
||||
echo - Launch-Windows.bat ^(Production mode^)
|
||||
echo - Launch-Dev-Windows.bat ^(Developer mode with hot reload^)
|
||||
echo - NomadArch.vbs ^(Silent mode, no console window^)
|
||||
echo.
|
||||
echo For help and documentation, see: README.md
|
||||
echo For troubleshooting, see: TROUBLESHOOTING.md
|
||||
echo ═══════════════════════════════════════════════════════════════════════════════
|
||||
echo.
|
||||
echo Press any key to start NomadArch now, or close this window to start later...
|
||||
pause >nul
|
||||
|
||||
:: Offer to start the app
|
||||
echo.
|
||||
echo [OPTION] Would you like to start NomadArch now? ^(Y/N^)
|
||||
set /p START_APP="> "
|
||||
if /i "%START_APP%"=="Y" (
|
||||
echo.
|
||||
echo [INFO] Starting NomadArch...
|
||||
call Launch-Windows.bat
|
||||
) else (
|
||||
echo.
|
||||
echo [INFO] You can start NomadArch later by running Launch-Windows.bat
|
||||
echo.
|
||||
)
|
||||
|
||||
exit /b 0
|
||||
Reference in New Issue
Block a user