Skip to content

For Developers

Hyacinthe edited this page Jun 11, 2026 · 2 revisions

For Developers

For contributors, translators, and anyone who wants to run or build the project from source.


Prerequisites

Tool Version Purpose
Python 3.11 or 3.13 recommended Runtime
pip Latest Package manager
Git Any recent Cloning the repo
PyInstaller 6.x Building the .exe

Python 3.13 is what the project is currently compiled against. Avoid very recent versions, not all libraries may support them yet.


Clone & Install

git clone https://github.com/Hyacinthe-primus/File_Converter_Pro.git
cd File_Converter_Pro
pip install -r requirements.txt
python main.py

Key Python Dependencies

Installed automatically via requirements.txt:

Package Role
PySide6 UI framework (Qt6 bindings)
pdf2docx PDF → DOCX layout-preserving pipeline
pymupdf (fitz) PDF rendering and HTML export
reportlab Native PDF generation fallback
pypandoc Pandoc bridge (TXT/RTF/EPUB → PDF/DOCX)
python-docx DOCX creation and editing
python-pptx PPTX reading and rendering
openpyxl XLSX reading and conversion
Pillow Image conversion engine
pillow-heif HEIC format support
striprtf RTF text extraction fallback
matplotlib Statistics dashboard charts
cryptography Fernet-encrypted config storage
comtypes Windows COM automation (Office/PowerPoint/Excel)

comtypes is Windows-only. It gracefully no-ops on machines without Office installed.


Optional External Binaries

Auto-detected at runtime. No path configuration needed.

Binary Used for Install
ffmpeg All audio and video conversions Bundled in the compiled exe. For dev: ffmpeg.org or winget install ffmpeg
pandoc High-quality TXT/RTF/EPUB → PDF/DOCX Download
MiKTeX / pdflatex LaTeX-based PDF rendering via Pandoc Download
wkhtmltopdf HTML → PDF (pdfkit Strategy 1) Download
soffice (LibreOffice) PPTX/XLSX → PDF fallback Download

Running in Dev Mode

python main.py --help

This prints all available flags (language, theme, context menu, achievement commands, etc.).


CLI mode — achievement commands in terminal


CLI output is only visible when running from source. The compiled .exe does not expose a console window.


Building the Exe

The project uses PyInstaller + UPX for compression. Build scripts are PowerShell-based.

1. Install build tools

pip install pyinstaller
winget install UPX.UPX

2. Build the main application

.\build.ps1

Runs PyInstaller with build.spec and produces dist/File Converter Pro/ (onedir output).

3. Build the Quick Check utility

.\build_quick_check.ps1

4. Package into an installer

.\build_installer.ps1

Calls Inno Setup with setup.iss and produces Output/FileConverterPro_Setup_v1.0.5.exe.

Make sure Inno Setup is installed and on your PATH. Download: jrsoftware.org/isinfo.php

Full pipeline at once

.\build_all.ps1

Project Structure

File Converter Pro/
│
├── main.py                       # Entry point — splash, single instance, CLI, drag & drop
├── config.py                     # Encrypted config manager, Windows dark mode detection
├── translations.py               # i18n engine (FR/EN built-in + .lang file support)
├── conversion_worker.py          # Background QThread conversion worker
├── advanced_conversions.py       # Extra conversion routines
├── dashboard.py                  # Statistics dashboard (Matplotlib animated charts)
├── database.py                   # SQLite abstraction layer
├── donate.py                     # Donation dialog — kofi, animated UI, donor flag
├── history.py                    # Conversion history panel
├── widgets.py                    # Shared custom Qt widgets (AnimatedCheckBox, etc.)
├── special_events_manager.py     # Date-aware special events (birthday, new year…)
├── system_notifier.py            # Native Windows desktop notifications
├── quick_check.py                # Companion build-verification tool (Tkinter)
├── daemon.py                     # Silent background daemon — runs watcher/scheduler tasks
├── qss_helpers.py                # Shared QSS utilities
│
├── app/
│   ├── __init__.py               # FadingMainWindow, FileConverterApp
│   ├── ui.py                     # AppUIMixin — all UI construction
│   └── logic.py                  # AppLogicMixin — all business logic
│
├── context_menu/
│   ├── __init__.py
│   ├── formats.py                # Context menu formats
│   └── window.py                 # Quick Convert popup — Windows Shell Integration
│
├── converter/
│   ├── converters.py             # AdvancedConverterEngine — all format pipelines
│   └── advanced_db.py            # SQLite DB for conversion stats
│
├── achievements/
│   ├── achievements_system.py    # Achievement definitions and unlock logic
│   ├── achievements_manager.py   # Persistence and state management
│   ├── achievements_ui.py        # Full achievements panel UI
│   ├── achievements_popup.py     # Animated real-time unlock pop-up
│   └── rank_popup.py             # Rank-up celebration dialog
│
├── dialogs/
│   ├── dialogs.py                # General-purpose dialogs
│   ├── terms_dialog.py           # Terms & Privacy acceptance dialog
│   └── word_to_pdf_dialog.py     # Word → PDF options dialog
│
├── tasks/
│   ├── __init__.py               # Automation engine: Watch Folders and Scheduled Tasks
│   ├── watcher.py                # Folder watcher — monitors paths for new files
│   └── scheduler.py              # Task scheduler — triggers conversions on interval/time
│
├── automation/
│   └── *.toml                    # TOML rule configs for watcher & scheduler tasks
│
├── styles/
│   └── themes/
│       ├── dark/
│       ├── light/
│       ├── buttons.qss           # Shared — BtnOK, BtnCancel, BtnCancelRed
│       └── *.qss / *.css
│
└── templates/
    ├── templates.py              # Conversion template definitions
    └── template_manager.py       # Save / load / apply templates

Main window inheritance chain:

QMainWindow
  └── AppLogicMixin        (app/logic.py)
        └── AppUIMixin           (app/ui.py)
              └── FileConverterApp
                    └── FadingMainWindow    ← instantiated at runtime

Clone this wiki locally