feat: GeViScope SDK integration with C# Bridge and Flutter app
- Add GeViScope Bridge (C# .NET 8.0) on port 7720 - Full SDK wrapper for camera control, PTZ, actions/events - 17 REST API endpoints for GeViScope server interaction - Support for MCS (Media Channel Simulator) with 16 test channels - Real-time action/event streaming via PLC callbacks - Add GeViServer Bridge (C# .NET 8.0) on port 7710 - Integration with GeViSoft orchestration layer - Input/output control and event management - Update Python API with new routers - /api/geviscope/* - Proxy to GeViScope Bridge - /api/geviserver/* - Proxy to GeViServer Bridge - /api/excel/* - Excel import functionality - Add Flutter app GeViScope integration - GeViScopeRemoteDataSource with 17 API methods - GeViScopeBloc for state management - GeViScopeScreen with PTZ controls - App drawer navigation to GeViScope - Add SDK documentation (extracted from PDFs) - GeViScope SDK docs (7 parts + action reference) - GeViSoft SDK docs (12 chunks) - Add .mcp.json for Claude Code MCP server config Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
92
geutebruck-api/rebuild-flutter.ps1
Normal file
92
geutebruck-api/rebuild-flutter.ps1
Normal file
@@ -0,0 +1,92 @@
|
||||
# Rebuild Flutter Web App and Restart Server
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host "Rebuilding Flutter Web App" -ForegroundColor Cyan
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
|
||||
# Kill Flutter web server on port 8081
|
||||
Write-Host "[1/3] Stopping Flutter web server..." -ForegroundColor Yellow
|
||||
$flutterPid = Get-NetTCPConnection -LocalPort 8081 -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty OwningProcess
|
||||
if ($flutterPid) {
|
||||
Stop-Process -Id $flutterPid -Force
|
||||
Start-Sleep -Seconds 2
|
||||
Write-Host " [OK] Flutter web server stopped" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host " [SKIP] No Flutter web server running" -ForegroundColor Gray
|
||||
}
|
||||
|
||||
# Rebuild Flutter web app
|
||||
Write-Host "[2/3] Rebuilding Flutter web app..." -ForegroundColor Yellow
|
||||
cd C:\DEV\COPILOT\geutebruck_app
|
||||
|
||||
# Refresh PATH to find flutter
|
||||
$env:Path = [System.Environment]::GetEnvironmentVariable('Path', 'Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path', 'User')
|
||||
|
||||
# Find flutter executable
|
||||
$flutterExe = Get-Command flutter -ErrorAction SilentlyContinue
|
||||
|
||||
if (-not $flutterExe) {
|
||||
Write-Host " [ERROR] Flutter not found in PATH!" -ForegroundColor Red
|
||||
Write-Host " Looking for Flutter in common locations..." -ForegroundColor Yellow
|
||||
|
||||
# Common Flutter locations on Windows
|
||||
$possiblePaths = @(
|
||||
"$env:USERPROFILE\flutter\bin\flutter.bat",
|
||||
"C:\flutter\bin\flutter.bat",
|
||||
"C:\src\flutter\bin\flutter.bat"
|
||||
)
|
||||
|
||||
foreach ($path in $possiblePaths) {
|
||||
if (Test-Path $path) {
|
||||
Write-Host " [FOUND] Flutter at: $path" -ForegroundColor Green
|
||||
$flutterExe = $path
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $flutterExe) {
|
||||
Write-Host " [ERROR] Could not find Flutter! Please install Flutter or add it to PATH." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host " Using Flutter: $($flutterExe.Source)" -ForegroundColor Cyan
|
||||
|
||||
# Run flutter build
|
||||
& $flutterExe build web --release
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host " [OK] Flutter web app built successfully" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host " [ERROR] Flutter build failed with exit code $LASTEXITCODE" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Start Flutter web server
|
||||
Write-Host "[3/3] Starting Flutter web server..." -ForegroundColor Yellow
|
||||
Start-Process -FilePath "python" `
|
||||
-ArgumentList "-m", "http.server", "8081", "--bind", "0.0.0.0" `
|
||||
-WorkingDirectory "C:\DEV\COPILOT\geutebruck_app\build\web" `
|
||||
-WindowStyle Hidden
|
||||
|
||||
Start-Sleep -Seconds 3
|
||||
|
||||
$newPid = Get-NetTCPConnection -LocalPort 8081 -State Listen -ErrorAction SilentlyContinue |
|
||||
Select-Object -First 1 -ExpandProperty OwningProcess
|
||||
|
||||
if ($newPid) {
|
||||
Write-Host " [OK] Flutter web server started (PID: $newPid)" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host " [ERROR] Failed to start Flutter web server" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "========================================" -ForegroundColor Green
|
||||
Write-Host "Rebuild Complete!" -ForegroundColor Green
|
||||
Write-Host "========================================" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "Flutter Web: http://localhost:8081" -ForegroundColor Cyan
|
||||
Write-Host "Please refresh your browser (Ctrl+Shift+R) to see changes" -ForegroundColor Yellow
|
||||
Write-Host ""
|
||||
Reference in New Issue
Block a user