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

Linux: Add and install app metadata file #119

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

guihkx
Copy link
Contributor

@guihkx guihkx commented Dec 14, 2024

This metadata file dictates how your app will be presented to users on Linux app stores.

Here's an example of a random app on Flathub, and here's the app metainfo file for reference.

Documentation: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html


This is (hopefully) the last missing piece for horsicq/Detect-It-Easy#189!

Comment on lines +11 to +22
<description>
<p>Detect It Easy, or abbreviated "DIE" is a program to analyze files you load into the application.</p>
<p>It detects, among other things, the compiler and linker used, signatures, and other information about files.</p>
<p>The program has been designed specifically to reveal file signatures and how they are packed.</p>
<p>Some of the binary formats supported:</p>
<ul>
<li>MS-DOS: DOS MZ</li>
<li>Windows: Portable Executable (PE)</li>
<li>*Nix: Executable and Linkable Format (ELF)</li>
<li>macOS: Mach Object (Mach-O)</li>
</ul>
</description>
Copy link
Contributor Author

@guihkx guihkx Dec 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if this description does your app justice.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description is awesome. Thanks! :)

<launchable type="desktop-id">io.github.horsicq.detect-it-easy.desktop</launchable>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/guihkx/flatpak-app-detect-it-easy/ef62b241881138f43ce7004b5a6760d5f6c24deb/screenshots/main_window_basic_view.png</image>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This screenshot, and the one below this one, are currently being hosted on my repository, which is not ideal, but should be fine for now.

In any case, let me know if you have a better place to host them right now (or if you just want take different screenshots yourself).

Here's the recommended guidelines for them.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is Ok! :)

Comment on lines +38 to +40
<release version="3.10" date="2024-11-03">
<url>https://raw.githubusercontent.com/horsicq/Detect-It-Easy/refs/heads/master/changelog.txt</url>
</release>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is arguably the most important tag here.

Before releasing a new version, you must always update this section.

You can achieve that in two ways:

1. Add a new <release> tag at the top, for example:

<releases>
  <release version="3.11" date="2025-01-03">
    <url>https://raw.githubusercontent.com/horsicq/Detect-It-Easy/refs/heads/master/changelog.txt</url>
  </release>
  <release version="3.10" date="2024-11-03">
    <url>https://raw.githubusercontent.com/horsicq/Detect-It-Easy/refs/heads/master/changelog.txt</url>
  </release>
</releases>

2. Keep just a single <release> tag, for example:

<releases>
  <release version="3.11" date="2025-01-03">
    <url>https://raw.githubusercontent.com/horsicq/Detect-It-Easy/refs/heads/master/changelog.txt</url>
  </release>
</releases>

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok!

@@ -47,6 +47,7 @@ if [ -z "$X_ERROR" ]; then
cp -f $X_SOURCE_PATH/build/release/diel $X_SOURCE_PATH/release/$X_BUILD_NAME/usr/bin/
cp -f $X_SOURCE_PATH/LINUX/io.github.horsicq.detect-it-easy.desktop $X_SOURCE_PATH/release/$X_BUILD_NAME/usr/share/applications/
cp -Rf $X_SOURCE_PATH/LINUX/hicolor/ $X_SOURCE_PATH/release/$X_BUILD_NAME/usr/share/icons/
cp -f $X_SOURCE_PATH/LINUX/io.github.horsicq.detect-it-easy.metainfo.xml $X_SOURCE_PATH/release/$X_BUILD_NAME/usr/share/metainfo/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change messes up the indentation of this section...

If you think that doesn't look good, let me know and I'll add extra whitespaces to the lines above to align the two columns.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is good!

create_appimage.sh Show resolved Hide resolved
@@ -18,6 +19,7 @@ cp -f $X_SOURCE_PATH/build/release/diec $X_PREFIX/bi
cp -f $X_SOURCE_PATH/build/release/diel $X_PREFIX/bin/
cp -f $X_SOURCE_PATH/LINUX/io.github.horsicq.detect-it-easy.desktop $X_PREFIX/share/applications/
cp -Rf $X_SOURCE_PATH/LINUX/hicolor/ $X_PREFIX/share/icons/
cp -f $X_SOURCE_PATH/LINUX/io.github.horsicq.detect-it-easy.metainfo.xml $X_PREFIX/share/metainfo/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change messes up the indentation of this section...

If you think that doesn't look good, let me know and I'll add extra whitespaces to the lines above to align the two columns.

@horsicq horsicq merged commit 6899db3 into horsicq:master Dec 14, 2024
@guihkx guihkx deleted the linux-metainfo branch December 14, 2024 20:18
@guihkx
Copy link
Contributor Author

guihkx commented Dec 14, 2024

Thanks for merging!

Please note that these changes also depend on horsicq/build_tools@895f03f (at least for some packaging formats).

But I notice you update all submodules frequently so that should be taken care of soon. :)

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.

2 participants