Skip to content

Fix macOS .app bundle support for game launch#259

Open
cantunborn wants to merge 1 commit into
WillyJL:mainfrom
cantunborn:fix/macos-app-bundle-launch
Open

Fix macOS .app bundle support for game launch#259
cantunborn wants to merge 1 commit into
WillyJL:mainfrom
cantunborn:fix/macos-app-bundle-launch

Conversation

@cantunborn
Copy link
Copy Markdown

Fixes #245

Problem

On macOS, game applications are distributed as .app bundles which are
directories on the filesystem, not files. This caused three failures:

  1. File picker.app dirs appeared as folders; double-clicking
    navigated into them instead of selecting them as an executable
  2. Validationvalidate_executables() uses is_file(), which
    always returns False for .app bundles, so games were never marked
    as installed
  3. Launch_launch_exe() raised FileNotFoundError because of
    the same is_file() check

Fix

  • external/filepicker.py.app dirs display with a file icon on
    macOS, making them selectable
  • modules/callbacks.py_launch_exe() launches .app dirs via the
    open command on macOS
  • common/structs.pyvalidate_executables() accepts .app dirs as
    valid in all three code paths

No changes to Linux or Windows behavior.

.app bundles are directories on macOS and could not be selected in the
file picker or validated/launched as executables. Treat .app dirs as
files in the picker, accept them in validate_executables(), and launch
them via the macOS `open` command in _launch_exe().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

In mac choose ".app" in "add exe" window of a game

1 participant