Eine Codebasis fuer alle drei Desktop-OS. Der Agent waehlt je OS automatisch: - exec: bash -lc (Linux/macOS) bzw. PowerShell (Windows) - Root/Admin: sudo (Unix) bzw. 'als Administrator starten' (Windows, kein sudo) - Screenshot: grim/scrot (Linux) · screencapture (macOS) · PowerShell/System. Drawing (Windows) - Root-Check: _is_admin() (os.geteuid Unix / IsUserAnAdmin Windows) statt hartem os.geteuid (crashte auf Windows) - info: user aus USER|USERNAME; getloadavg bleibt guarded Build: build.sh (Linux/Docker), build-native.sh (Linux/macOS), build-native.bat (Windows). PyInstaller cross-kompiliert nicht -> je OS bauen. README-Plattform- Tabelle ergaenzt. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
29 lines
951 B
Batchfile
29 lines
951 B
Batchfile
@echo off
|
|
REM ARIA Host-Agent — Windows-Build mit PyInstaller (kein Docker).
|
|
REM Voraussetzung: Python 3 installiert und im PATH (python.org, "Add to PATH").
|
|
REM
|
|
REM build-native.bat
|
|
REM
|
|
REM Ergebnis: dist\aria-host-agent.exe (Onefile). Danach .env danebenlegen
|
|
REM (siehe .env.example) und starten. Fuer Admin-Rechte die .exe per Rechtsklick
|
|
REM "Als Administrator ausfuehren".
|
|
setlocal
|
|
cd /d "%~dp0"
|
|
|
|
python -m venv .buildenv || goto :err
|
|
call .buildenv\Scripts\activate.bat
|
|
python -m pip install --quiet --upgrade pip
|
|
python -m pip install --quiet pyinstaller -r requirements.txt || goto :err
|
|
pyinstaller --onefile --name aria-host-agent --collect-all psutil host_agent.py || goto :err
|
|
call deactivate
|
|
|
|
echo.
|
|
echo Fertig: dist\aria-host-agent.exe
|
|
echo .env danebenlegen (siehe .env.example), dann starten (ggf. als Administrator).
|
|
goto :eof
|
|
|
|
:err
|
|
echo.
|
|
echo FEHLER beim Bauen. Ist Python 3 installiert und im PATH? (python --version)
|
|
exit /b 1
|