Skip to content

Latest commit

 

History

History
103 lines (83 loc) · 2.75 KB

File metadata and controls

103 lines (83 loc) · 2.75 KB

Building Native Windows Executable

Requirements

  • Windows 10/11 (AMD64/x86_64)
  • Python 3.8+ installed from python.org
  • Git for Windows (optional) from git-scm.com

Setup on Windows

Method 1: Using Git

  1. Clone repository:
    git clone https://github.com/yourusername/ffmpeg-gui-pyqt6.git
    cd ffmpeg-gui-pyqt6

Method 2: Download ZIP

  1. Download repository:
    • Go to GitHub repository page
    • Click "Code" > "Download ZIP"
    • Extract to desired folder
    • Open Command Prompt in extracted folder

Setup Virtual Environment

  1. Create and activate virtual environment:

    python -m venv .venv
    .venv\Scripts\activate.bat

    Note: If you see (.venv) at the start of your command prompt, the virtual environment is active.

  2. Install dependencies:

    pip install --upgrade pip
    pip install -r requirements.txt

Test Installation

  1. Test the application:
    python GUI_pyqt6_WINFF.py

Build Native Windows .exe

Method 1: Using spec file (recommended)

.venv\Scripts\activate.bat
pyinstaller FFmpeg_GUI_Windows.spec

Method 2: Direct command

.venv\Scripts\activate.bat
pyinstaller --onefile --windowed --name=FFmpeg_GUI_Windows_AMD64 ^
    --add-data="utils_safe_extract.py;." ^
    --hidden-import=PyQt6.QtCore ^
    --hidden-import=PyQt6.QtGui ^
    --hidden-import=PyQt6.QtWidgets ^
    --hidden-import=ffmpeg ^
    --hidden-import=ssl ^
    --hidden-import=urllib3 ^
    GUI_pyqt6_WINFF.py

Note: Icon line removed. To add custom icon, create icon.ico and add --icon=icon.ico to the command.

Output

  • Executable: dist\FFmpeg_GUI_Windows_AMD64.exe
  • Size: ~40-60MB (native Windows)
  • Format: PE32+ executable (Windows .exe)

Testing

dist\FFmpeg_GUI_Windows_AMD64.exe

Troubleshooting

"python is not recognized"

  • Install Python from python.org
  • Check "Add Python to PATH" during installation
  • Restart Command Prompt after installation

"No module named PyQt6"

  • Ensure virtual environment is activated: .venv\Scripts\activate.bat
  • Install requirements: pip install -r requirements.txt

"Permission denied" errors

  • Run Command Prompt as Administrator
  • Check antivirus software (may block PyInstaller)

Build fails with missing modules

  • Add missing modules to hidden-import list in spec file
  • Check PyInstaller warnings in build output

Notes

  • Creates a true Windows .exe file (PE32+ format)
  • No Wine or compatibility layer needed
  • Smaller size than cross-compiled version
  • Better Windows integration (file associations, etc.)
  • Works on Windows 10/11 AMD64 systems