-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathlaunch.ps1
More file actions
112 lines (102 loc) · 3.51 KB
/
launch.ps1
File metadata and controls
112 lines (102 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Adobe MCP Server Launcher for PowerShell
Write-Host "Adobe MCP Server Launcher" -ForegroundColor Cyan
Write-Host "========================" -ForegroundColor Cyan
Write-Host ""
# Check Python
try {
python --version | Out-Null
} catch {
Write-Host "ERROR: Python is not installed or not in PATH" -ForegroundColor Red
exit 1
}
# Detect Adobe installations
Write-Host "Detecting Adobe installations..." -ForegroundColor Yellow
python -m adobe_mcp.shared.adobe_detector 2>$null
if ($LASTEXITCODE -ne 0) {
Write-Host "WARNING: Could not auto-detect Adobe applications" -ForegroundColor Yellow
Write-Host "Please check config.windows.json manually" -ForegroundColor Yellow
}
# Check and activate virtual environment
if (-not (Test-Path ".venv")) {
Write-Host "Virtual environment not found. Running install.ps1..." -ForegroundColor Yellow
& .\install.ps1
exit
}
# Activate virtual environment
$activateScript = ".\.venv\Scripts\Activate.ps1"
if (Test-Path $activateScript) {
& $activateScript
} else {
Write-Host "ERROR: Virtual environment not found. Please run install.ps1 first." -ForegroundColor Red
Read-Host "Press Enter to exit"
exit 1
}
# Verify activation
$pythonPath = (Get-Command python).Source
Write-Host "Using Python: $pythonPath" -ForegroundColor Gray
# Check Node.js
try {
node --version | Out-Null
} catch {
Write-Host "ERROR: Node.js is not installed or not in PATH" -ForegroundColor Red
exit 1
}
# Install proxy dependencies if needed
if (-not (Test-Path "proxy-server\node_modules")) {
Write-Host "Installing proxy server dependencies..." -ForegroundColor Yellow
Push-Location proxy-server
npm install
Pop-Location
}
# Menu function
function Show-Menu {
Write-Host ""
Write-Host "Select Adobe application:" -ForegroundColor Cyan
Write-Host "1. Photoshop" -ForegroundColor White
Write-Host "2. Premiere Pro" -ForegroundColor White
Write-Host "3. Illustrator" -ForegroundColor White
Write-Host "4. InDesign" -ForegroundColor White
Write-Host "5. Proxy Server (run this first)" -ForegroundColor Yellow
Write-Host "6. Run Tests" -ForegroundColor White
Write-Host "0. Exit" -ForegroundColor White
Write-Host ""
}
# Main loop
while ($true) {
Show-Menu
$choice = Read-Host "Enter your choice"
switch ($choice) {
"1" {
Write-Host "Starting Photoshop MCP Server..." -ForegroundColor Green
python -m adobe_mcp.photoshop
}
"2" {
Write-Host "Starting Premiere Pro MCP Server..." -ForegroundColor Green
python -m adobe_mcp.premiere
}
"3" {
Write-Host "Starting Illustrator MCP Server..." -ForegroundColor Green
python -m adobe_mcp.illustrator
}
"4" {
Write-Host "Starting InDesign MCP Server..." -ForegroundColor Green
python -m adobe_mcp.indesign
}
"5" {
Write-Host "Starting Proxy Server..." -ForegroundColor Green
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd proxy-server; node proxy.js"
Write-Host "Proxy server started in new window on port 3001" -ForegroundColor Green
}
"6" {
Write-Host "Running tests..." -ForegroundColor Green
python -m pytest tests/
}
"0" {
Write-Host "Exiting..." -ForegroundColor Yellow
exit
}
default {
Write-Host "Invalid choice. Please try again." -ForegroundColor Red
}
}
}