Merge branch 'beta' of https://github.com/oop7/YTSage into beta

This commit is contained in:
Your Name
2025-08-27 02:42:12 +03:00
+130 -130
View File
@@ -1,130 +1,130 @@
""" """
cx_Freeze setup script for YTSage cx_Freeze setup script for YTSage
Supports building executables, MSI installers, and ZIP distributions Supports building executables, MSI installers, and ZIP distributions
""" """
import sys import sys
from pathlib import Path from pathlib import Path
from cx_Freeze import setup, Executable from cx_Freeze import setup, Executable
# Build options for executable # Build options for executable
build_exe_options = { build_exe_options = {
# Packages to include # Packages to include
"packages": [ "packages": [
"PySide6.QtCore", "PySide6.QtCore",
"PySide6.QtGui", "PySide6.QtGui",
"PySide6.QtWidgets", "PySide6.QtWidgets",
"src.gui.ytsage_gui_main", "src.gui.ytsage_gui_main",
"src.core.ytsage_utils", "src.core.ytsage_utils",
"src.core.ytsage_downloader", "src.core.ytsage_downloader",
"src.core.ytsage_ffmpeg", "src.core.ytsage_ffmpeg",
"src.core.ytsage_yt_dlp", "src.core.ytsage_yt_dlp",
"src.core.ytsage_style", "src.core.ytsage_style",
"src.core.ytsage_logging", "src.core.ytsage_logging",
"src.gui.ytsage_gui_format_table", "src.gui.ytsage_gui_format_table",
"src.gui.ytsage_gui_video_info", "src.gui.ytsage_gui_video_info",
"src.gui.ytsage_gui_dialogs", "src.gui.ytsage_gui_dialogs",
"src.gui.ytsage_gui_dialogs.ytsage_dialogs_base", "src.gui.ytsage_gui_dialogs.ytsage_dialogs_base",
"src.gui.ytsage_gui_dialogs.ytsage_dialogs_custom", "src.gui.ytsage_gui_dialogs.ytsage_dialogs_custom",
"src.gui.ytsage_gui_dialogs.ytsage_dialogs_ffmpeg", "src.gui.ytsage_gui_dialogs.ytsage_dialogs_ffmpeg",
"src.gui.ytsage_gui_dialogs.ytsage_dialogs_selection", "src.gui.ytsage_gui_dialogs.ytsage_dialogs_selection",
"src.gui.ytsage_gui_dialogs.ytsage_dialogs_settings", "src.gui.ytsage_gui_dialogs.ytsage_dialogs_settings",
"src.gui.ytsage_gui_dialogs.ytsage_dialogs_update", "src.gui.ytsage_gui_dialogs.ytsage_dialogs_update",
"src.utils.ytsage_constants", "src.utils.ytsage_constants",
# Additional packages that might be needed # Additional packages that might be needed
"requests", "requests",
"PIL", # Pillow is imported as PIL "PIL", # Pillow is imported as PIL
"packaging", "packaging",
"markdown", "markdown",
"playsound3", "playsound3",
"loguru", "loguru",
"setuptools" "setuptools"
], ],
# Packages to exclude (to reduce size) # Packages to exclude (to reduce size)
"excludes": [ "excludes": [
"PySide6.QtBluetooth", "PySide6.QtBluetooth",
"PySide6.QtNetwork", "PySide6.QtNetwork",
"PySide6.QtOpenGL", "PySide6.QtOpenGL",
"PySide6.QtPrintSupport", "PySide6.QtPrintSupport",
"PySide6.QtSvg", "PySide6.QtSvg",
"PySide6.QtTest", "PySide6.QtTest",
"PySide6.QtXml", "PySide6.QtXml",
"PySide6.QtSql", "PySide6.QtSql",
"PySide6.QtHelp", "PySide6.QtHelp",
"PySide6.QtMultimedia", "PySide6.QtMultimedia",
"PySide6.QtQml", "PySide6.QtQml",
"PySide6.QtQuick", "PySide6.QtQuick",
"PySide6.QtWebEngineCore", "PySide6.QtWebEngineCore",
"PIL.ImageDraw", "PIL.ImageDraw",
"PIL.ImageFont", "PIL.ImageFont",
"numpy", "numpy",
"scipy", "scipy",
"wx", "wx",
"pandas", "pandas",
"tkinter", "tkinter",
"yt_dlp", # Excluded - downloaded dynamically at runtime (all imports are conditional) "yt_dlp", # Excluded - downloaded dynamically at runtime (all imports are conditional)
"unittest", "unittest",
"test", "test",
"tests" "tests"
], ],
# Include files (assets) # Include files (assets)
"include_files": [ "include_files": [
("assets/Icon/icon.png", "assets/Icon/icon.png"), ("assets/Icon/icon.png", "assets/Icon/icon.png"),
("assets/sound/notification.mp3", "assets/sound/notification.mp3"), ("assets/sound/notification.mp3", "assets/sound/notification.mp3"),
("assets/branding/icons/YTSage.ico", "YTSage.ico") ("assets/branding/icons/YTSage.ico", "YTSage.ico")
], ],
# Zip includes (can help reduce file count) # Zip includes (can help reduce file count)
"zip_include_packages": "*", "zip_include_packages": "*",
"zip_exclude_packages": [], "zip_exclude_packages": [],
# Other options # Other options
"optimize": 2, # Optimize bytecode "optimize": 2, # Optimize bytecode
"build_exe": "dist/YTSage", # Output directory for executable "build_exe": "dist/YTSage", # Output directory for executable
} }
# MSI build options # MSI build options
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",
"install_icon": "assets/branding/icons/YTSage.ico", "install_icon": "assets/branding/icons/YTSage.ico",
"summary_data": { "summary_data": {
"author": "oop7", "author": "oop7",
"comments": "YouTube Video Downloader - Easy to use video downloading tool", "comments": "YouTube Video Downloader - Easy to use video downloading tool",
"keywords": "youtube, downloader, video, audio, converter" "keywords": "youtube, downloader, video, audio, converter"
} }
} }
# Base configuration for Windows GUI application # Base configuration for Windows GUI application
base = None base = None
if sys.platform == "win32": if sys.platform == "win32":
base = "Win32GUI" # This prevents console window from appearing base = "Win32GUI" # This prevents console window from appearing
# Executable configuration # Executable configuration
executable = Executable( 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.8.0.exe",
copyright="Copyright (c) 2024-2025 YTSage", copyright="Copyright (c) 2024-2025 YTSage",
trademarks="YTSage" trademarks="YTSage"
) )
# Setup configuration # Setup configuration
setup( setup(
name="YTSage", name="YTSage",
version="4.8.0", version="4.8.0",
description="YouTube Video Downloader", description="YouTube Video Downloader",
author="oop7", author="oop7",
author_email="oop7_support@proton.me", author_email="oop7_support@proton.me",
url="https://github.com/oop7/ytsage", url="https://github.com/oop7/ytsage",
license="MIT", license="MIT",
options={ options={
"build_exe": build_exe_options, "build_exe": build_exe_options,
"bdist_msi": bdist_msi_options "bdist_msi": bdist_msi_options
}, },
executables=[executable] executables=[executable]
) )