Skip to content

linux: Register file types so they can be opened through double-click - #2622

Draft
hadess wants to merge 1 commit into
ares-emulator:masterfrom
hadess:wip/hadess/add-mimetypes
Draft

hadess wants to merge 1 commit into
ares-emulator:masterfrom
hadess:wip/hadess/add-mimetypes

Conversation

@hadess

@hadess hadess commented Sep 5, 2026

Copy link
Copy Markdown

Modify Exec field in .desktop file so that the Ares application advertises that it can open files (well, a single file at a time).

Then add all the relevant ROM and disk mime-types as being supported. Systems list used to select the mime-types to add: https://flathub.org/en/apps/dev.ares.ares
All the registered mime-types:
https://gitlab.freedesktop.org/xdg/shared-mime-info/blob/master/data/freedesktop.org.xml.in

Closes: #2621

@flagrama

flagrama commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What happens when you compile without a core and try to open a file that uses that core?

@hadess
hadess force-pushed the wip/hadess/add-mimetypes branch from 54de8f2 to df27a7f Compare September 6, 2026 09:56
@hadess

hadess commented Sep 6, 2026

Copy link
Copy Markdown
Author

What happens when you compile without a core and try to open a file that uses that core?

I didn't know cores were compile-option, I used the Flatpak manifest to build ares, and that was my one and only time compiling it.

The desktop file should then be generated from a .in file, it would look something like (in pseudo-code):

mimetypes=""
if "a26" in ${ARES_CORES}
  mimetypes += "application/x-atari-2600-rom;"
endif

# Generate ares.desktop from its .in variant, replacing `@ARES_MIMETYPES@` with the mimetypes list
generate_file("ares.desktop", "ares.desktop.in", "@ARES_MIMETYPES@", mimetypes)

I suck at cmake though, so can't help with the actual implementation.

I've added the Atari 2600 mime-type to the list though.

@hadess
hadess marked this pull request as draft September 6, 2026 09:56
Modify Exec field in .desktop file so that the Ares application
advertises that it can open files (well, a single file at a time).

Then add all the relevant ROM and disk mime-types as being supported.
Systems list used to select the mime-types to add:
https://flathub.org/en/apps/dev.ares.ares
as well as the Atari 2600 and 5200.
All the registered mime-types are listed here:
https://gitlab.freedesktop.org/xdg/shared-mime-info/blob/master/data/freedesktop.org.xml.in

Closes: ares-emulator#2621
@hadess
hadess force-pushed the wip/hadess/add-mimetypes branch from df27a7f to 7c46fe3 Compare September 6, 2026 10:06
@hadess

hadess commented Sep 6, 2026

Copy link
Copy Markdown
Author

And I've now added the Atari 5200 mime-type that should get added in:
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/431

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

.desktop file doesn't advertise that Ares can open files

2 participants