Add support for portable directory without build flag. #1071

Merged
Steveice10 merged 1 commits from main into main 2024-02-18 01:54:41 -03:00
Steveice10 commented 2024-01-18 08:30:25 -03:00 (Migrated from github.com)

Removes the need for a compile-time portable flag, instead supporting using either a portable or system directory at runtime.

The behavior is as follows:

  • First, on all platforms, check for the directory "portable" in the same directory as the executable (or app bundle on macOS, if running from an app bundle). If that directory exists, use it for all paths.
    • This is how most other emulators approach this, e.g. the Citra/Yuzu "user" directory, the Ryujinx "portable" directory, etc.
  • Otherwise, match the old behavior:
    • Windows: Use the directory the executable is in.
    • Linux: Use XDG directories where possible, plus the other directories from wxWidgets.
    • macOS: Use the standard directories from wxWidgets.
Removes the need for a compile-time portable flag, instead supporting using either a portable or system directory at runtime. The behavior is as follows: * First, on all platforms, check for the directory "portable" in the same directory as the executable (or app bundle on macOS, if running from an app bundle). If that directory exists, use it for all paths. * This is how most other emulators approach this, e.g. the Citra/Yuzu "user" directory, the Ryujinx "portable" directory, etc. * Otherwise, match the old behavior: * Windows: Use the directory the executable is in. * Linux: Use XDG directories where possible, plus the other directories from wxWidgets. * macOS: Use the standard directories from wxWidgets.
Exzap commented 2024-01-19 20:10:30 -03:00 (Migrated from github.com)

On a quick glance this looks good. I will give this a test run soon and merge it if no issues pop up. Thanks!

On a quick glance this looks good. I will give this a test run soon and merge it if no issues pop up. Thanks!
Steveice10 commented 2024-02-16 11:00:42 -03:00 (Migrated from github.com)

Any updates on this?

Any updates on this?
Exzap commented 2024-02-18 01:54:29 -03:00 (Migrated from github.com)

Sorry for the wait! LGTM

Sorry for the wait! LGTM
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cemu-project_Mirror/Cemu-2024-03-05#1071
No description provided.