Skip to content

fix: enable Butteraugli and SSIMulacra support on Windows#65

Open
Adithyakp86 wants to merge 1 commit intoGooichand:masterfrom
Adithyakp86:master
Open

fix: enable Butteraugli and SSIMulacra support on Windows#65
Adithyakp86 wants to merge 1 commit intoGooichand:masterfrom
Adithyakp86:master

Conversation

@Adithyakp86
Copy link
Copy Markdown

  • Update butter_exe() and ssimul_exe() to check for bundled Windows binaries in butteraugli/windows/ and ssimulacra/windows/
  • Add shutil.which() fallback to find tools on system PATH
  • Create placeholder windows/ directories with .gitkeep
  • Add 15 unit tests for all exe helper functions

#54

Summary

Closes #2 — External Tools (Butteraugli, SSIMulacra) Not Supported on Windows.

butter_exe() and ssimul_exe() in gui/utility.py previously returned None on Windows, completely disabling these image quality metrics. This PR adds full Windows support.

Changes

gui/utility.py

  • Updated butter_exe() to check for a bundled binary at butteraugli/windows/butteraugli.exe
  • Updated ssimul_exe() to check for a bundled binary at ssimulacra/windows/ssimulacra.exe
  • Added shutil.which() fallback for both functions — if no bundled binary is found, the system PATH is searched
  • Added import shutil at the top of the file

New Directories

  • gui/butteraugli/windows/.gitkeep — placeholder for bundled butteraugli.exe
  • gui/ssimulacra/windows/.gitkeep — placeholder for bundled ssimulacra.exe

tests/unit/test_utility.py

  • Added 15 new unit tests for butter_exe(), ssimul_exe(), and exiftool_exe() covering:
    • Bundled binary detection (Linux & Windows)
    • System PATH fallback (Linux & Windows)
    • Not-found returns None
    • Unsupported platform returns None

How It Works

Resolution follows a two-step process (matching the existing exiftool_exe() pattern):

  1. Bundled binary — check for .exe in the windows/ subdirectory
  2. System PATH — fall back to shutil.which() to locate user-installed tools

Testing

All 33 tests passed (18 existing + 15 new):

- Update butter_exe() and ssimul_exe() to check for bundled Windows
  binaries in butteraugli/windows/ and ssimulacra/windows/
- Add shutil.which() fallback to find tools on system PATH
- Create placeholder windows/ directories with .gitkeep
- Add 15 unit tests for all exe helper functions
@Adithyakp86
Copy link
Copy Markdown
Author

once check this PR and merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows Quick Start references non-existent Launch-LOOK-DGC.bat

1 participant