Commit 587bf4ce authored by Lisa's avatar Lisa

refactor: remove package-hermes-node-agent and update windows config UI

parent a3a00221
This diff is collapsed.
This diff is collapsed.
MIT License
Copyright (c) 2026 Lisa (Hermes AI) / OpenClaw Project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This diff is collapsed.
<!-- Copyright (C) 2026 Stefy Lanza <stefy@nexlab.net> -->
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
<!-- Copyleft: GNU GPLv3 or later applies to this file. -->
# Hermes Node Agent
**Version:** 2.0
**Repository:** `git@git.nexlab.net:lisa/hermes-node-agent.git`
Cross-platform node agent for the Hermes Node Protocol. Connects to a central gateway via WebSocket and executes commands with permission enforcement.
---
## Features
- **Cross-platform**: Linux and Windows support
- **Reverse connection**: Nodes connect to gateway (firewall-friendly)
- **Token authentication**: Secure per-node tokens
- **Permission system**: sexec-based allow/deny/ask rules
- **Auto-reconnect**: Exponential backoff on disconnect
- **Heartbeat**: Keep-alive mechanism
- **Optional capabilities**: Browser control, computer control
---
## Platforms
### Linux
- Bash installer with SysV init service
- CLI-based configuration
- Runs as daemon
### Windows
- Graphical installer (.exe via Inno Setup)
- System tray GUI manager
- Windows Service integration (NSSM)
- Configuration editor (no manual JSON editing)
- Log viewer with auto-refresh
---
## Installation
### Linux
```bash
sudo ./install.sh
sudo nano /etc/hermes-node/config.json # Edit gateway_url and token
sudo /etc/init.d/hermes-node-agent start
```
### Windows
1. Build installer (on Windows dev machine):
```cmd
python windows\build.py
```
2. Run `windows\Output\hermes-node-agent-installer.exe` as Administrator
3. Configure via system tray: Right-click icon → Configuration
---
## Configuration
**Linux:** `/etc/hermes-node/config.json`
**Windows:** `C:\ProgramData\hermes-node\config.json`
```json
{
"gateway_url": "wss://gateway-host:8765",
"node_name": "my-node",
"token": "your-token-here",
"sexec_path": "/path/to/sexec.sh",
"reconnect_interval": 5,
"heartbeat_interval": 30
}
```
---
### Browser Control Capability
For browser automation support, the bot control capability uses the **Hermes Node Chrome Extension**:
**Repository:** `git@git.nexlab.net:lisa/hermes-node-chrome.git`
The extension enables DOM manipulation, screenshots, and click/type automation.
---
## Files
```
node-agent/
├── hermes_node_agent.py # Main agent (cross-platform)
├── browser_controller.py # Browser control capability
├── install.sh # Linux installer
├── install-windows.ps1 # Windows PowerShell installer (legacy)
├── hermes-node-agent.init.d # SysV init script
├── hermes-node-agent.service # systemd unit (alternative)
├── requirements.txt # Python dependencies
└── windows/ # Windows-specific components
├── agent-manager.py # System tray GUI
├── installer.iss # Inno Setup script
├── build.py # Build automation
└── README.md # Build instructions
```
---
## Documentation
- **DEPLOYMENT.md** — Full deployment guide
- **WINDOWS_DEPLOYMENT.md** — Windows-specific guide
- **PROTOCOL.md** — WebSocket protocol specification
- **windows/README.md** — Windows build instructions
---
## Related Repositories
- **Gateway Plugin:** `~/.hermes/plugins/hermes-node-gateway/` (loaded by Hermes Agent)
- **Node Agent:** `git@git.nexlab.net:lisa/hermes-node-agent.git`
- **Chrome Extension:** `git@git.nexlab.net:lisa/hermes-node-chrome.git`
---
## License
MIT License — See the [LICENSE](LICENSE) file in this repository.
---
## Support
For issues, check:
- Agent logs: `/var/log/hermes-node-agent.log` (Linux) or `C:\ProgramData\hermes-node\hermes-node-agent.log` (Windows)
- Gateway logs on gateway host
- Configuration files for token/URL mismatches
## Donate
If you find this project useful, consider supporting its continued development:
**Bitcoin (BTC)**: `bc1ql5klyv78t0a5g59y3tczv8ejy9l740x3zg0cge`
**Ethereum (ETH)**: `0x3f707d3543A6C301B3Bf47eBc4B469e017a119B4`
**Solana (SOL)**: `G7iZQ3iQ7k5t9E9g8Y7u6i5t4r3e2w1q0P9O8I7U6Y5`
---
*Copyright (c) 2026 Stefy (nextime) Lanza <stefy@nexlab.net>. All rights reserved.*
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
# /etc/init.d/hermes-node-agent
# SysVinit script for Hermes Node Agent
#
# chkconfig: 2345 95 05
# description: Hermes Node Agent reverse-connected WebSocket client
### BEGIN INIT INFO
# Provides: hermes-node-agent
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Hermes Node Agent
# Description: Reverse-connected WebSocket node agent.
### END INIT INFO
NAME="hermes-node-agent"
DAEMON="/usr/bin/python3"
SCRIPT_DIR="/usr/local/bin"
DAEMON_SCRIPT="${SCRIPT_DIR}/hermes_node_agent.py"
PIDFILE="/var/run/${NAME}.pid"
LOGFILE="/var/log/${NAME}.log"
USER="root"
GROUP="root"
# Check daemon exists
if [ ! -x "$DAEMON" ]; then
echo "$DAEMON not found or not executable."
exit 5
fi
if [ ! -f "$DAEMON_SCRIPT" ]; then
echo "$DAEMON_SCRIPT not found."
exit 5
fi
# Ensure config exists
if [ ! -f "/etc/hermes-node/config.json" ]; then
echo "/etc/hermes-node/config.json not found."
exit 6
fi
. /lib/lsb/init-functions 2>/dev/null || true
start() {
echo "Starting $NAME..."
if [ -f "$PIDFILE" ]; then
PID=$(cat "$PIDFILE")
if kill -0 "$PID" 2>/dev/null; then
echo "$NAME is already running (PID $PID)."
return 0
else
rm -f "$PIDFILE"
fi
fi
touch "$LOGFILE"
chown "$USER:$GROUP" "$LOGFILE" 2>/dev/null || chmod 644 "$LOGFILE"
$DAEMON $DAEMON_SCRIPT >> "$LOGFILE" 2>&1 &
echo $! > "$PIDFILE"
sleep 1
if kill -0 $(cat "$PIDFILE") 2>/dev/null; then
echo "$NAME started (PID $(cat $PIDFILE))."
else
echo "$NAME failed to start. Check $LOGFILE"
exit 1
fi
}
stop() {
echo "Stopping $NAME..."
if [ -f "$PIDFILE" ]; then
PID=$(cat "$PIDFILE")
if kill -0 "$PID" 2>/dev/null; then
kill "$PID" 2>/dev/null
for i in $(seq 1 30); do
if ! kill -0 "$PID" 2>/dev/null; then
break
fi
sleep 0.5
done
if kill -0 "$PID" 2>/dev/null; then
echo "Force killing..."
kill -9 "$PID" 2>/dev/null
sleep 1
fi
fi
rm -f "$PIDFILE"
echo "$NAME stopped."
else
echo "$NAME is not running."
fi
pkill -f "hermes_node_agent.py" 2>/dev/null || true
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 1
start
;;
reload|force-reload)
echo "Reload not supported, restarting..."
stop
sleep 1
start
;;
status)
RUNNING=0
if [ -f "$PIDFILE" ]; then
PID=$(cat "$PIDFILE")
if kill -0 "$PID" 2>/dev/null; then
echo "$NAME is running (PID $PID)."
RUNNING=1
else
echo "$NAME is not running (stale PID file)."
RUNNING=0
fi
else
PID=$(pgrep -f "hermes_node_agent.py" | head -1)
if [ -n "$PID" ]; then
echo "$NAME is running (PID $PID) but no PID file."
RUNNING=1
else
echo "$NAME is not running."
RUNNING=0
fi
fi
exit $(( 1 - RUNNING ))
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit 0
# Copyright (C) 2026 Stefy Lanza <stefy@nexlab.net>
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyleft: this program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Hermes Node Protocol
# Copyright (c) 2026 Stefy (nextime) Lanza <stefy@nexlab.net>
# All rights reserved.
#
# This software is released under the MIT License with a copyleft clause.
# See the LICENSE file for full terms.
[Unit]
Description=Hermes Node Agent
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /usr/local/bin/hermes-node-agent
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
# Security hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=read-only
ReadWritePaths=/tmp
[Install]
WantedBy=default.target
This diff is collapsed.
# Copyright (C) 2026 Stefy Lanza <stefy@nexlab.net>
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyleft: this program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Hermes Node Protocol
# Copyright (c) 2026 Stefy (nextime) Lanza <stefy@nexlab.net>
# All rights reserved.
#
# This software is released under the MIT License with a copyleft clause.
# See the LICENSE file for full terms.
# Hermes Node Agent — Windows Installer (PowerShell)
# Installs the Hermes Node Agent as a Windows service using NSSM
# Requires: PowerShell 5+, Python 3.7+, Administrator rights
$ErrorActionPreference = "Stop"
Write-Host "=== Hermes Node Agent Windows Installer ===" -ForegroundColor Cyan
Write-Host ""
# ── 1. Verify running as Administrator ───────────────────────────────────────
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Host "ERROR: This installer must be run as Administrator." -ForegroundColor Red
Write-Host "Right-click PowerShell → 'Run as Administrator'" -ForegroundColor Yellow
exit 1
}
# ── 2. Locate or install Python ───────────────────────────────────────────────
Write-Host "[1/7] Checking Python installation..." -ForegroundColor Green
$pythonCmd = Get-Command python -ErrorAction SilentlyContinue
if (-not $pythonCmd) {
Write-Host "Python not found in PATH. Attempting to locate..." -ForegroundColor Yellow
$possiblePaths = @(
"$env:ProgramFiles\Python39\python.exe",
"$env:ProgramFiles\Python310\python.exe",
"$env:ProgramFiles\Python311\python.exe",
"$env:ProgramFiles(x86)\Python39\python.exe",
"$env:USERPROFILE\AppData\Local\Programs\Python\Python39\python.exe"
)
$found = $false
foreach ($p in $possiblePaths) {
if (Test-Path $p) {
$pythonCmd = $p
$found = $true
break
}
}
if (-not $found) {
Write-Host "ERROR: Python not found. Install from https://www.python.org/downloads/" -ForegroundColor Red
exit 1
}
}
Write-Host " Found Python at: $($pythonCmd.Source ?? $pythonCmd)" -ForegroundColor Gray
# ── 3. Install websockets library ─────────────────────────────────────────────
Write-Host "[2/7] Installing Python dependencies..." -ForegroundColor Green
& $pythonCmd -m pip install --upgrade pip | Out-Null
& $pythonCmd -m pip install websockets | Out-Null
if ($LASTEXITCODE -ne 0) {
Write-Host "ERROR: Failed to install websockets. Check pip output above." -ForegroundColor Red
exit 1
}
Write-Host " websockets installed" -ForegroundColor Gray
# ── 4. Create config directory ───────────────────────────────────────────────
Write-Host "[3/7] Creating configuration directories..." -ForegroundColor Green
$configDir = "$env:ProgramData\hermes-node"
$agentDir = "C:\Program Files\Hermes Node"
New-Item -ItemType Directory -Force -Path $configDir | Out-Null
New-Item -ItemType Directory -Force -Path $agentDir | Out-Null
Write-Host " Config: $configDir" -ForegroundColor Gray
Write-Host " Agent: $agentDir" -ForegroundColor Gray
# ── 5. Deploy agent script ────────────────────────────────────────────────────
Write-Host "[4/7] Copying agent script..." -ForegroundColor Green
$sourceScript = "$PSScriptRoot\..\node-agent\hermes_node_agent.py"
if (-not (Test-Path $sourceScript)) {
Write-Host "ERROR: Agent script not found at $sourceScript" -ForegroundColor Red
Write-Host "Make sure you run this installer from the project root or adjust paths." -ForegroundColor Yellow
exit 1
}
Copy-Item $sourceScript "$agentDir\hermes-node-agent.py" -Force
Write-Host " Installed to: $agentDir\hermes-node-agent.py" -ForegroundColor Gray
# ── 6. Create config.json if missing ─────────────────────────────────────────
Write-Host "[5/7] Checking configuration..." -ForegroundColor Green
$configPath = "$configDir\config.json"
if (-not (Test-Path $configPath)) {
Write-Host " Creating example config (YOU MUST EDIT THIS!)" -ForegroundColor Yellow
# Generate a random token
$tokenBytes = New-Object byte[] 16
(New-Object System.Security.Cryptography.RNGCryptoServiceProvider).GetBytes($tokenBytes)
$token = ($tokenBytes | ForEach-Object { $_.ToString("x2") }) -join ''
$config = @{
gateway_url = "wss://YOUR-GATEWAY-HOST:8765"
node_name = $env:COMPUTERNAME
token = $token
sexec_path = "$env:USERPROFILE\.openclaw\skills\sexec\sexec.ps1"
reconnect_interval = 5
heartbeat_interval = 30
} | ConvertTo-Json -Depth 3
$config | Out-File -FilePath $configPath -Encoding UTF8
Write-Host " Config written to: $configPath" -ForegroundColor Yellow
Write-Host " ⚠️ EDIT THIS FILE: Set gateway_url and verify node_name/token" -ForegroundColor Yellow
} else {
Write-Host " Config already exists, skipping." -ForegroundColor Gray
}
# ── 7. Check for NSSM and offer service registration ──────────────────────────
Write-Host "[6/7] Service registration..." -ForegroundColor Green
$nssmPath = Get-Command nssm -ErrorAction SilentlyContinue
if ($nssmPath) {
Write-Host " NSSM found — installing as Windows service..." -ForegroundColor Green
& nssm install HermesNodeAgent "`"$pythonCmd`"" "`"$agentDir\hermes-node-agent.py`" --config `"$configPath`""
if ($LASTEXITCODE -ne 0) {
Write-Host " NSSM install failed, will use Task Scheduler instead" -ForegroundColor Yellow
$nssmPath = $null
} else {
nssm set HermesNodeAgent AppDirectory "`"$agentDir`""
nssm set HermesNodeAgent Start SERVICE_AUTO_START
nssm set HermesNodeAgent AppRestartDelay 5000
Write-Host " Service 'HermesNodeAgent' registered with NSSM" -ForegroundColor Green
}
}
if (-not $nssmPath) {
Write-Host " NSSM not found — registering via Task Scheduler..." -ForegroundColor Yellow
Write-Host " (Download NSSM from https://nssm.cc/ for better service management)" -ForegroundColor Gray
$action = New-ScheduledTaskAction -Execute "`"$pythonCmd`"" -Argument "`"$agentDir\hermes-node-agent.py`" --config `"$configPath`""
$trigger = New-ScheduledTaskTrigger -AtStartup
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable -ExecutionTimeLimit 0
$principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest
Register-ScheduledTask -TaskName "HermesNodeAgent" -Action $action -Trigger $trigger -Settings $settings -Principal $principal -Force | Out-Null
Write-Host " Scheduled task 'HermesNodeAgent' created" -ForegroundColor Green
}
# ── 8. Summary ────────────────────────────────────────────────────────────────
Write-Host ""
Write-Host "✅ Installation complete!" -ForegroundColor Green
Write-Host ""
Write-Host "=== Next Steps ===" -ForegroundColor Cyan
Write-Host "1. Edit config: notepad $configPath" -ForegroundColor White
Write-Host " → Set gateway_url to your gateway's address (wss://host:8765)" -ForegroundColor Gray
Write-Host " → Verify token matches the entry in gateway's config.json" -ForegroundColor Gray
Write-Host ""
Write-Host "2. Verify service:" -ForegroundColor White
if ($nssmPath) {
Write-Host " nssm status HermesNodeAgent" -ForegroundColor Gray
Write-Host " nssm start HermesNodeAgent" -ForegroundColor Gray
} else {
Write-Host " Get-ScheduledTask HermesNodeAgent" -ForegroundColor Gray
Write-Host " Start-ScheduledTask HermesNodeAgent" -ForegroundColor Gray
}
Write-Host ""
Write-Host "3. Check logs:" -ForegroundColor White
Write-Host " Get-Content $configDir\hermes-node-agent.log -Wait -Tail 50" -ForegroundColor Gray
Write-Host ""
Write-Host "=== Important ===" -ForegroundColor Yellow
Write-Host "The agent runs as SYSTEM if using Task Scheduler, or as LocalSystem if using NSSM." -ForegroundColor Gray
Write-Host "Ensure the sexec.ps1 script exists at the configured path if using permissions." -ForegroundColor Gray
Write-Host ""
This diff is collapsed.
# Hermes Node Protocol
# Copyright (c) 2026 Stefy (nextime) Lanza <stefy@nexlab.net>
# All rights reserved.
#
# This software is released under the MIT License with a copyleft clause.
# See the LICENSE file for full terms.
websockets>=16.0
playwright>=1.59.0
<!-- Copyright (C) 2026 Stefy Lanza <stefy@nexlab.net> -->
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
<!-- Copyleft: GNU GPLv3 or later applies to this file. -->
# Hermes Node Protocol
# Copyright (c) 2026 Stefy (nextime) Lanza <stefy@nexlab.net>
# All rights reserved.
#
# This software is released under the MIT License with a copyleft clause.
# See the LICENSE file for full terms.
# Hermes Node Agent — Windows Package Build Instructions
This directory contains the Windows-specific components for building a professional installer.
## Components
```
windows/
├── agent-manager.py # System tray GUI application
├── installer.iss # Inno Setup installer script
├── build.py # Automated build script
├── nssm.exe # Service wrapper (download separately)
├── icon.ico # Application icon (optional)
├── dist/ # PyInstaller output (generated)
│ ├── hermes-node-agent.exe
│ └── hermes-node-manager.exe
├── build/ # PyInstaller temp files (generated)
└── Output/ # Inno Setup output (generated)
└── hermes-node-agent-installer.exe
```
## Prerequisites
### Required Software
1. **Python 3.9+** with pip
- Download: https://www.python.org/downloads/
- Ensure "Add Python to PATH" is checked during install
2. **PyInstaller** (for creating .exe files)
```cmd
pip install pyinstaller
```
3. **Inno Setup 6** (for creating installer)
- Download: https://jrsoftware.org/isdl.php
- Install to default location: `C:\Program Files (x86)\Inno Setup 6\`
4. **NSSM** (Non-Sucking Service Manager)
- Download: https://nssm.cc/download
- Extract `nssm.exe` (64-bit version) to this `windows/` directory
### Python Dependencies
```cmd
pip install websockets pystray pillow wxpython win10toast pyinstaller
```
## Building the Installer
### Automated Build (Recommended)
Run the build script from the project root:
```cmd
cd hermes-node-protocol
python windows\build.py
```
This will:
1. Clean previous builds
2. Install Python dependencies
3. Build `hermes-node-agent.exe` with PyInstaller
4. Build `hermes-node-manager.exe` with PyInstaller
5. Verify NSSM is present
6. Compile the installer with Inno Setup
**Output:** `windows\Output\hermes-node-agent-installer.exe`
### Manual Build
If the automated script fails, build manually:
#### Step 1: Build Agent Executable
```cmd
cd hermes-node-protocol
pyinstaller --onefile --name hermes-node-agent --console node-agent\hermes_node_agent.py
```
Output: `dist\hermes-node-agent.exe`
#### Step 2: Build Manager GUI Executable
```cmd
pyinstaller --onefile --name hermes-node-manager --windowed windows\agent-manager.py
```
Output: `dist\hermes-node-manager.exe`
#### Step 3: Move Executables
```cmd
move dist\hermes-node-agent.exe windows\dist\
move dist\hermes-node-manager.exe windows\dist\
```
#### Step 4: Compile Installer
```cmd
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" windows\installer.iss
```
Output: `windows\Output\hermes-node-agent-installer.exe`
## Testing the Installer
### Test on Clean VM
1. Create a Windows 10/11 VM (VirtualBox, Hyper-V, VMware)
2. **Do not** install Python or any dependencies
3. Copy `hermes-node-agent-installer.exe` to the VM
4. Run the installer as Administrator
5. Verify:
- Service installs: `sc query HermesNodeAgent`
- Manager starts: Check system tray for "H" icon
- Config editor opens: Right-click tray → Configuration
- Logs viewer works: Right-click tray → Logs
### Test Service Management
```cmd
REM Start service
sc start HermesNodeAgent
REM Check status
sc query HermesNodeAgent
REM Stop service
sc stop HermesNodeAgent
```
### Test Uninstaller
1. Open **Settings** → **Apps** → **Apps & features**
2. Find **Hermes Node Agent**
3. Click **Uninstall**
4. Verify all files removed except config/logs
## Customization
### Change Application Icon
1. Create or download a `.ico` file (16x16, 32x32, 48x48, 256x256)
2. Save as `windows\icon.ico`
3. Rebuild with `python windows\build.py`
### Modify Installer Appearance
Edit `windows\installer.iss`:
- **App name/version**: `[Setup]` section
- **Install location**: `DefaultDirName`
- **Start menu group**: `DefaultGroupName`
- **License agreement**: Add `LicenseFile=LICENSE.txt` to `[Setup]`
- **Wizard images**: Add `WizardImageFile` and `WizardSmallImageFile`
### Add Custom Files
Edit `windows\installer.iss` → `[Files]` section:
```iss
Source: "path\to\file.txt"; DestDir: "{app}"; Flags: ignoreversion
```
## Troubleshooting
### PyInstaller: "Module not found"
Install missing module:
```cmd
pip install <module-name>
```
Then rebuild.
### PyInstaller: "Failed to execute script"
Run the .exe from command line to see error:
```cmd
cd windows\dist
hermes-node-agent.exe --config test.json
```
### Inno Setup: "Cannot find file"
Verify all `Source:` paths in `installer.iss` exist:
- `windows\nssm.exe`
- `windows\dist\hermes-node-agent.exe`
- `windows\dist\hermes-node-manager.exe`
- `node-agent\hermes_node_agent.py`
### Manager GUI: "wxPython not found"
```cmd
pip install wxpython
```
Note: wxPython can take 5-10 minutes to install (large package).
### Service won't start after install
Check Event Viewer:
1. Press `Win+R`, type `eventvwr.msc`, press Enter
2. Navigate to **Windows Logs** → **Application**
3. Look for errors from source "HermesNodeAgent"
Common causes:
- Config file missing or invalid JSON
- Python runtime not bundled correctly (use PyInstaller `--onefile`)
- Missing DLL dependencies (use `--hidden-import` in PyInstaller)
## Distribution
### Signing the Installer (Optional but Recommended)
Sign with a code signing certificate to avoid Windows SmartScreen warnings:
```cmd
signtool sign /f certificate.pfx /p password /t http://timestamp.digicert.com windows\Output\hermes-node-agent-installer.exe
```
### Creating a Portable Version
To create a portable (no-install) version:
1. Copy `windows\dist\hermes-node-agent.exe` to a folder
2. Copy `windows\dist\hermes-node-manager.exe` to the same folder
3. Create `config.json` in the same folder
4. Zip the folder
Users can run `hermes-node-agent.exe --config config.json` directly (no service).
## File Sizes (Approximate)
- `hermes-node-agent.exe`: ~15 MB (includes Python runtime)
- `hermes-node-manager.exe`: ~25 MB (includes wxPython)
- `hermes-node-agent-installer.exe`: ~45 MB (compressed)
## Build Environment
Tested on:
- Windows 10 21H2 (x64)
- Windows 11 22H2 (x64)
- Python 3.9.13, 3.10.11, 3.11.4
- PyInstaller 5.13.0
- Inno Setup 6.2.2
## Support
For build issues:
- Check PyInstaller docs: https://pyinstaller.org/
- Check Inno Setup docs: https://jrsoftware.org/ishelp/
- Review `windows\build.py` for detailed steps
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment