Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] ":" (colon) is not expanded properly in directory settings #16803

Open
DJtheMan2101 opened this issue Jul 22, 2024 · 0 comments
Open

Comments

@DJtheMan2101
Copy link

DJtheMan2101 commented Jul 22, 2024

First and foremost consider this:

  • Only RetroArch bugs should be filed here. Not core bugs or game bugs
  • This is not a forum or a help section, this is strictly developer oriented

Description

On macOS, the default settings for audio_filter_dir, bundle_assets_src_path, and video_filter_dir are as follows:

audio_filter_dir = ":/Contents/Resources/filters/audio"
bundle_assets_src_path = ":/Contents/Resources/assets.zip"
video_filter_dir = ":/Contents/Resources/filters/video"

The ":" (colon) character is supposed to resolve to the location of the RetroArch app bundle (typically /Applications/RetroArch.app, assuming the app is placed in the suggested directory and not renamed). However, any spaces in the path are interpreted as "%20", which causes the wrong directories to be loaded.

This behavior can be seen when using this Homebrew cask for the nightly build, which renames RetroArch.app to RetroArch Nightly.app to avoid conflicts with the stable build.

Expected behavior

The ":" (colon) expands to the location of the app bundle. (i.e. /Applications/RetroArch Nightly.app).

Actual behavior

The spaces (and possibly other characters) in the path to the app bundle are not escaped properly (i.e. /Applications/RetroArch%20Nightly.app).

Pure speculation, but this may be due to a conflict with other settings like core_updater_buildbot_assets_url, which expect an online URL rather than a local directory/file. Perhaps the presence of ":/" causes the string to be interpreted incorrectly?

Steps to reproduce the bug

  1. Place RetroArch.app in /Applications and run it once to generate the default retroarch.cfg.
  2. Rename RetroArch.app to RetroArch Nightly.app, which contains a space.
  3. Observe the following behavior:
  • In Settings > Video > Video Filter, no video filters are listed.
  • In Settings > Audio > DSP Plugin, no audio filters are listed.
  • A "fake app" named RetroArch%20Nightly.app is created next to RetroArch Nightly.app. (macOS treats all files with the .app extension as launch-able apps, but attempting to do so only gives the OS-standard "damaged or incomplete" message.) It contains Contents/Resources/filters/audio and Contents/Resources/filters/video. This is where RetroArch is looking for audio and video filters. These directories will be created every time RetroArch is opened.

Interestingly, if RetroArch.app is renamed before it is ran for the first time, then the aforementioned values in the generated retroarch.cfg are edited to use the full app path rather than ":" expansion. (This means the assets are always able to be extracted on the first launch.) However, if the app is renamed after that, then a similar "fake app" issue will occur, since the old app path will no longer exist. Ideally, ":" expansion should still be used in these cases, but fixed so all characters are properly escaped.

Bisect Results

The same behavior appears to occur on every version since stable 1.9.0.

Version/Commit

You can find this information under Information/System Information

  • RetroArch: 1.19.1 (nightly c208186)

Environment information

  • OS: macOS Sonoma 14.5
  • Compiler: N/A
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

No branches or pull requests

1 participant