Simplify MSI build options and update version to 4.7.4
Removed problematic summary_data and install_icon from MSI build options in setup.py and setup-ffmpeg.py to address cx_Freeze build issues. Updated target_name and version fields to 4.7.4. Enhanced build-windows.yml with improved artifact cleanup and error handling for MSI creation.
This commit is contained in:
@@ -64,11 +64,13 @@ jobs:
|
|||||||
# Update setup.py
|
# Update setup.py
|
||||||
$setupContent = Get-Content "build/windows/setup.py" -Raw
|
$setupContent = Get-Content "build/windows/setup.py" -Raw
|
||||||
$setupContent = $setupContent -replace 'version="[^"]*"', "version=`"$version`""
|
$setupContent = $setupContent -replace 'version="[^"]*"', "version=`"$version`""
|
||||||
|
$setupContent = $setupContent -replace 'target_name="[^"]*"', "target_name=`"YTSage-v$version.exe`""
|
||||||
Set-Content "build/windows/setup.py" -Value $setupContent
|
Set-Content "build/windows/setup.py" -Value $setupContent
|
||||||
|
|
||||||
# Update setup-ffmpeg.py
|
# Update setup-ffmpeg.py
|
||||||
$setupFFmpegContent = Get-Content "build/windows/setup-ffmpeg.py" -Raw
|
$setupFFmpegContent = Get-Content "build/windows/setup-ffmpeg.py" -Raw
|
||||||
$setupFFmpegContent = $setupFFmpegContent -replace 'version="[^"]*"', "version=`"$version`""
|
$setupFFmpegContent = $setupFFmpegContent -replace 'version="[^"]*"', "version=`"$version`""
|
||||||
|
$setupFFmpegContent = $setupFFmpegContent -replace 'target_name="[^"]*"', "target_name=`"YTSage-v$version-ffmpeg.exe`""
|
||||||
Set-Content "build/windows/setup-ffmpeg.py" -Value $setupFFmpegContent
|
Set-Content "build/windows/setup-ffmpeg.py" -Value $setupFFmpegContent
|
||||||
|
|
||||||
Write-Host "Version updated in setup files (build script auto-detects version)"
|
Write-Host "Version updated in setup files (build script auto-detects version)"
|
||||||
@@ -81,6 +83,7 @@ jobs:
|
|||||||
|
|
||||||
# Clean previous build artifacts
|
# Clean previous build artifacts
|
||||||
if (Test-Path "build\exe.*") { Remove-Item "build\exe.*" -Recurse -Force }
|
if (Test-Path "build\exe.*") { Remove-Item "build\exe.*" -Recurse -Force }
|
||||||
|
if (Test-Path "build\bdist.*") { Remove-Item "build\bdist.*" -Recurse -Force }
|
||||||
if (Test-Path "dist") { Remove-Item "dist" -Recurse -Force }
|
if (Test-Path "dist") { Remove-Item "dist" -Recurse -Force }
|
||||||
|
|
||||||
# Build executable
|
# Build executable
|
||||||
@@ -88,13 +91,38 @@ jobs:
|
|||||||
|
|
||||||
# Build MSI installer with error handling
|
# Build MSI installer with error handling
|
||||||
Write-Host "Building standard MSI installer..."
|
Write-Host "Building standard MSI installer..."
|
||||||
python build\windows\setup.py bdist_msi
|
Write-Host "Current working directory: $(Get-Location)"
|
||||||
|
Write-Host "Setup.py path: $(Resolve-Path 'build\windows\setup.py')"
|
||||||
|
|
||||||
|
# Run with maximum verbosity to capture any hidden errors
|
||||||
|
python build\windows\setup.py bdist_msi --verbose
|
||||||
if ($LASTEXITCODE -eq 0) {
|
if ($LASTEXITCODE -eq 0) {
|
||||||
Write-Host "Standard MSI build completed successfully"
|
Write-Host "Standard MSI build completed successfully"
|
||||||
# List MSI files created
|
# List MSI files created
|
||||||
Write-Host "MSI files in dist directory after standard build:"
|
Write-Host "MSI files in dist directory after standard build:"
|
||||||
if (Test-Path "dist") {
|
if (Test-Path "dist") {
|
||||||
|
$msiFiles = Get-ChildItem -Path "dist" -Filter "*.msi"
|
||||||
|
if ($msiFiles) {
|
||||||
|
$msiFiles | ForEach-Object { Write-Host " $($_.Name)" }
|
||||||
|
} else {
|
||||||
|
Write-Host " No MSI files found! Attempting alternative build method..."
|
||||||
|
# Alternative approach: try building without excludes that might cause issues
|
||||||
|
Write-Host "Retrying MSI build with simplified configuration..."
|
||||||
|
python build\windows\setup.py bdist_msi --skip-build
|
||||||
|
if (Test-Path "dist/*.msi") {
|
||||||
|
Write-Host "Alternative MSI build succeeded!"
|
||||||
Get-ChildItem -Path "dist" -Filter "*.msi" | ForEach-Object { Write-Host " $($_.Name)" }
|
Get-ChildItem -Path "dist" -Filter "*.msi" | ForEach-Object { Write-Host " $($_.Name)" }
|
||||||
|
} else {
|
||||||
|
Write-Host "ERROR: MSI creation failed completely. Build directory contents:"
|
||||||
|
if (Test-Path "build") {
|
||||||
|
Get-ChildItem -Path "build" -Recurse | ForEach-Object { Write-Host " $($_.FullName)" }
|
||||||
|
}
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host " No dist directory found!"
|
||||||
|
exit 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Error building standard MSI - exit code: $LASTEXITCODE"
|
Write-Host "Error building standard MSI - exit code: $LASTEXITCODE"
|
||||||
@@ -159,6 +187,7 @@ jobs:
|
|||||||
|
|
||||||
# Clean previous build artifacts
|
# Clean previous build artifacts
|
||||||
if (Test-Path "build\exe.*") { Remove-Item "build\exe.*" -Recurse -Force }
|
if (Test-Path "build\exe.*") { Remove-Item "build\exe.*" -Recurse -Force }
|
||||||
|
if (Test-Path "build\bdist.*") { Remove-Item "build\bdist.*" -Recurse -Force }
|
||||||
if (Test-Path "dist\*.msi") { Remove-Item "dist\*.msi" -Force }
|
if (Test-Path "dist\*.msi") { Remove-Item "dist\*.msi" -Force }
|
||||||
|
|
||||||
# Build executable with FFmpeg
|
# Build executable with FFmpeg
|
||||||
|
|||||||
@@ -86,18 +86,12 @@ build_exe_options = {
|
|||||||
"build_exe": "dist/YTSage-FFmpeg", # Output directory for executable
|
"build_exe": "dist/YTSage-FFmpeg", # Output directory for executable
|
||||||
}
|
}
|
||||||
|
|
||||||
# MSI build options
|
# MSI build options - simplified to avoid cx_Freeze issues
|
||||||
bdist_msi_options = {
|
bdist_msi_options = {
|
||||||
"upgrade_code": "{87654321-4321-8765-CBA9-987654321CBA}", # Different GUID for FFmpeg version
|
"upgrade_code": "{87654321-4321-8765-CBA9-987654321CBA}", # Different GUID for FFmpeg version
|
||||||
"add_to_path": False,
|
"add_to_path": False,
|
||||||
"initial_target_dir": r"[ProgramFilesFolder]\YTSage",
|
"initial_target_dir": r"[ProgramFilesFolder]\YTSage"
|
||||||
# Remove problematic install_icon that might be causing MSI build to fail
|
# Removed summary_data that might cause silent failures
|
||||||
# "install_icon": "assets/branding/icons/YTSage.ico",
|
|
||||||
"summary_data": {
|
|
||||||
"author": "oop7",
|
|
||||||
"comments": "YouTube Video Downloader with FFmpeg - Complete video processing solution",
|
|
||||||
"keywords": "youtube, downloader, video, audio, converter, ffmpeg"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Base configuration for Windows GUI application
|
# Base configuration for Windows GUI application
|
||||||
@@ -110,7 +104,7 @@ executable = Executable(
|
|||||||
"main.py",
|
"main.py",
|
||||||
base=base,
|
base=base,
|
||||||
icon="assets/branding/icons/YTSage.ico",
|
icon="assets/branding/icons/YTSage.ico",
|
||||||
target_name="YTSage-v4.8.0-ffmpeg.exe",
|
target_name="YTSage-v4.7.4-ffmpeg.exe",
|
||||||
copyright="Copyright (c) 2024-2025 YTSage",
|
copyright="Copyright (c) 2024-2025 YTSage",
|
||||||
trademarks="YTSage"
|
trademarks="YTSage"
|
||||||
)
|
)
|
||||||
@@ -118,7 +112,7 @@ executable = Executable(
|
|||||||
# Setup configuration
|
# Setup configuration
|
||||||
setup(
|
setup(
|
||||||
name="YTSage-FFmpeg",
|
name="YTSage-FFmpeg",
|
||||||
version="4.8.0",
|
version="4.7.4", # Updated to match expected version
|
||||||
description="YouTube Video Downloader with FFmpeg",
|
description="YouTube Video Downloader with FFmpeg",
|
||||||
author="oop7",
|
author="oop7",
|
||||||
author_email="oop7_support@proton.me",
|
author_email="oop7_support@proton.me",
|
||||||
|
|||||||
+5
-11
@@ -69,18 +69,12 @@ build_exe_options = {
|
|||||||
"build_exe": "dist/YTSage", # Output directory for executable
|
"build_exe": "dist/YTSage", # Output directory for executable
|
||||||
}
|
}
|
||||||
|
|
||||||
# MSI build options
|
# MSI build options - simplified to avoid cx_Freeze issues
|
||||||
bdist_msi_options = {
|
bdist_msi_options = {
|
||||||
"upgrade_code": "{12345678-1234-5678-9ABC-123456789ABC}", # Generate unique GUID
|
"upgrade_code": "{12345678-1234-5678-9ABC-123456789ABC}", # Generate unique GUID
|
||||||
"add_to_path": False,
|
"add_to_path": False,
|
||||||
"initial_target_dir": r"[ProgramFilesFolder]\YTSage",
|
"initial_target_dir": r"[ProgramFilesFolder]\YTSage"
|
||||||
# Remove problematic install_icon that might be causing MSI build to fail
|
# Removed target_name and summary_data that might cause silent failures
|
||||||
# "install_icon": "assets/branding/icons/YTSage.ico",
|
|
||||||
"summary_data": {
|
|
||||||
"author": "oop7",
|
|
||||||
"comments": "YouTube Video Downloader - Easy to use video downloading tool",
|
|
||||||
"keywords": "youtube, downloader, video, audio, converter"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Base configuration for Windows GUI application
|
# Base configuration for Windows GUI application
|
||||||
@@ -93,7 +87,7 @@ executable = Executable(
|
|||||||
"main.py",
|
"main.py",
|
||||||
base=base,
|
base=base,
|
||||||
icon="assets/branding/icons/YTSage.ico",
|
icon="assets/branding/icons/YTSage.ico",
|
||||||
target_name="YTSage-v4.8.0.exe",
|
target_name="YTSage-v4.7.4.exe",
|
||||||
copyright="Copyright (c) 2024-2025 YTSage",
|
copyright="Copyright (c) 2024-2025 YTSage",
|
||||||
trademarks="YTSage"
|
trademarks="YTSage"
|
||||||
)
|
)
|
||||||
@@ -101,7 +95,7 @@ executable = Executable(
|
|||||||
# Setup configuration
|
# Setup configuration
|
||||||
setup(
|
setup(
|
||||||
name="YTSage",
|
name="YTSage",
|
||||||
version="4.8.0",
|
version="4.7.4", # Updated to match expected version
|
||||||
description="YouTube Video Downloader",
|
description="YouTube Video Downloader",
|
||||||
author="oop7",
|
author="oop7",
|
||||||
author_email="oop7_support@proton.me",
|
author_email="oop7_support@proton.me",
|
||||||
|
|||||||
Reference in New Issue
Block a user