diff --git a/build.ps1 b/build.ps1 index 1630b6d..23d832b 100644 --- a/build.ps1 +++ b/build.ps1 @@ -32,7 +32,7 @@ try { npm run build Write-Host "Frontend build completed" -ForegroundColor Green } catch { - Write-Host "Frontend build failed: $_" -ForegroundColor Red + Write-Host "Frontend build failed: $($_.Exception.Message)" -ForegroundColor Red exit 1 } @@ -88,7 +88,7 @@ try { $pythonProcesses | Stop-Process -Force -ErrorAction SilentlyContinue Write-Host "All Python processes terminated." -ForegroundColor Green } catch { - Write-Host "Warning: Some processes could not be terminated: $_" -ForegroundColor Yellow + Write-Host "Warning: Some processes could not be terminated: $($_.Exception.Message)" -ForegroundColor Yellow } Start-Sleep -Seconds 2 @@ -116,7 +116,7 @@ try { Write-Host " Invalid index: $index" -ForegroundColor Red } } catch { - Write-Host " Could not terminate process $index: $_" -ForegroundColor Red + Write-Host " Could not terminate process $index`: $($_.Exception.Message)" -ForegroundColor Red } } } else { @@ -132,7 +132,7 @@ try { } } catch { - Write-Host "PyInstaller build failed: $_" -ForegroundColor Red + Write-Host "PyInstaller build failed: $($_.Exception.Message)" -ForegroundColor Red exit 1 } @@ -192,7 +192,7 @@ try { } catch { $retryCount++ - Write-Host "Compression attempt $retryCount failed: $_" -ForegroundColor Yellow + Write-Host "Compression attempt $retryCount failed: $($_.Exception.Message)" -ForegroundColor Yellow if ($retryCount -eq $maxRetries) { # Final attempt: try creating a copy first, then compress @@ -259,7 +259,7 @@ try { } } catch { - Write-Host "Compression failed: $_" -ForegroundColor Red + Write-Host "Compression failed: $($_.Exception.Message)" -ForegroundColor Red exit 1 } diff --git a/main.py b/main.py index e368dc1..f74d648 100644 --- a/main.py +++ b/main.py @@ -3358,7 +3358,8 @@ def main(): time.sleep(2) # Setup and run the system tray icon - icon_path = project_path("frontend", "src", "assets", "logo", "record.png") + # Use the icon from public folder (included in frontend/dist build) + icon_path = resource_path(os.path.join("frontend", "dist", "record.png")) try: image = Image.open(icon_path) menu = pystray.Menu(