From 498e6ae655fcd925d6e009e6592b6e6861fa269e Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 27 Aug 2025 14:22:54 +0300 Subject: [PATCH] Improve MSI build error handling and fix FFmpeg setup Replaces PowerShell try/catch with exit code checks for MSI build steps in Windows workflow for clearer error reporting. Removes the install_icon option from FFmpeg MSI setup to address potential build failures. --- .github/workflows/build-windows.yml | 16 ++++++++-------- build/windows/setup-ffmpeg.py | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 599f842..e52059d 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -88,11 +88,11 @@ jobs: # Build MSI installer with error handling Write-Host "Building standard MSI installer..." - try { - python build\windows\setup.py bdist_msi + python build\windows\setup.py bdist_msi + if ($LASTEXITCODE -eq 0) { Write-Host "Standard MSI build completed successfully" - } catch { - Write-Host "Error building standard MSI: $($_.Exception.Message)" + } else { + Write-Host "Error building standard MSI - exit code: $LASTEXITCODE" # Continue anyway to try ZIP creation } @@ -171,11 +171,11 @@ jobs: # Build MSI installer with FFmpeg and error handling Write-Host "Building FFmpeg MSI installer..." - try { - python build\windows\setup-ffmpeg.py bdist_msi + python build\windows\setup-ffmpeg.py bdist_msi + if ($LASTEXITCODE -eq 0) { Write-Host "FFmpeg MSI build completed successfully" - } catch { - Write-Host "Error building FFmpeg MSI: $($_.Exception.Message)" + } else { + Write-Host "Error building FFmpeg MSI - exit code: $LASTEXITCODE" # Continue anyway to try ZIP creation } diff --git a/build/windows/setup-ffmpeg.py b/build/windows/setup-ffmpeg.py index 137566c..47b98ec 100644 --- a/build/windows/setup-ffmpeg.py +++ b/build/windows/setup-ffmpeg.py @@ -91,7 +91,8 @@ bdist_msi_options = { "upgrade_code": "{87654321-4321-8765-CBA9-987654321CBA}", # Different GUID for FFmpeg version "add_to_path": False, "initial_target_dir": r"[ProgramFilesFolder]\YTSage", - "install_icon": "assets/branding/icons/YTSage.ico", + # Remove problematic install_icon that might be causing MSI build to fail + # "install_icon": "assets/branding/icons/YTSage.ico", "summary_data": { "author": "oop7", "comments": "YouTube Video Downloader with FFmpeg - Complete video processing solution",