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

Follow freedesktop spec for .desktop file and metainfo.xml #628

Closed
wants to merge 1 commit into from

Conversation

stefonarch
Copy link
Member

No description provided.

@stefonarch stefonarch marked this pull request as draft July 13, 2023 15:41
@stefonarch
Copy link
Member Author

stefonarch commented Jul 13, 2023

Needs fix for lxqt/lxqt-build-tools#87

@palinek
Copy link
Contributor

palinek commented Jul 14, 2023

I'm just curious, why is there the replacement of dash to underscore in lxqt-project, but not in LXimage-qt?

@stefonarch
Copy link
Member Author

stefonarch commented Jul 14, 2023

This is still to decide yet, IMO: All underscores, only in domain, no underscore. Atm I liked that more as it's a "well-known" name.

Well-known names containing the dash are allowed but not recommended, because the dash is not allowed in some related uses of reversed DNS names, such as D-Bus object paths and interface names, and Flatpak app IDs. If the author's domain name contains a dash, replacing it with an underscore is recommended: this cannot cause ambiguity, because underscores are not allowed in DNS domain names.

Looking at others there are several associations with dashes in the domain name.

@redtide
Copy link
Contributor

redtide commented Jul 15, 2023

Maybe this is more clear:
https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic

To ensures the greatest possible compatibility of an AppStream ID, it is recommended to replace any hyphens in the ID with underscores, and prefix every leading digit of a section with an underscore as well. Since the underscore is not a valid character in domain names, the uniqueness of the ID is kept. For example, the ID org.7-zip.7zip could become org._7_zip._7zip.

This means underscore everywhere, also the name (and so as prefix if also the name has a digit, not just the domain)

@redtide
Copy link
Contributor

redtide commented Jul 15, 2023

@palinek maybe it might be interesting that string(MAKE_C_IDENTIFIER <string> <output_variable>) seems to do what desktop entry spec and appstream wants:

Convert each non-alphanumeric character in the input <string> to an underscore and store the result in the <output_variable>. If the first character of the <string> is a digit, an underscore will also be prepended to the result.

here my attempt to deal with the rules on CMake,

@stefonarch stefonarch force-pushed the follow_freedesktop_spec branch from 4947ba7 to d3be0d2 Compare July 16, 2023 06:57
@stefonarch stefonarch marked this pull request as ready for review July 16, 2023 06:58
@stefonarch stefonarch force-pushed the follow_freedesktop_spec branch from d3be0d2 to 276cea5 Compare July 16, 2023 07:26
@stefonarch stefonarch closed this Jul 18, 2023
@stefonarch
Copy link
Member Author

Could break user's file associations.

@stefonarch stefonarch deleted the follow_freedesktop_spec branch July 18, 2023 14:35
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.

3 participants