Skip to content

Commit

Permalink
Add Linux AppStream metadata (#2603)
Browse files Browse the repository at this point in the history
* Add Linux AppStream metadata

* Don't package AppStream metadata for AppImage

* Fix credits.py
  • Loading branch information
MateusRodCosta authored Nov 23, 2024
1 parent 5f92ac7 commit 6b2c36d
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

6sutters
8bitgentleman
a8252359
Expand Down Expand Up @@ -204,6 +203,7 @@ malarchymike
marbly
mario3d
masonnixon
mateusrodcosta
matthewbauer
matthewdelacruz15
max100101
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ build/hawkthorne-linux.AppImage: build/hawkthorne.love bin/love.AppImage bin/app
mv squashfs-root build/linux/
cat build/linux/squashfs-root/bin/love build/hawkthorne.love > build/linux/squashfs-root/bin/hawkthorne
chmod a+x build/linux/squashfs-root/bin/hawkthorne
cp templates/linux/* build/linux/squashfs-root/
cp templates/linux/{AppRun,hawkthorne.png,love.desktop} build/linux/squashfs-root/
rm build/linux/squashfs-root/bin/love build/linux/squashfs-root/love.svg
./bin/appimagetool.AppImage build/linux/squashfs-root build/hawkthorne-linux.AppImage
chmod a+x build/hawkthorne-linux.AppImage
Expand Down
4 changes: 3 additions & 1 deletion scripts/credits.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

with open('CONTRIBUTORS', 'w') as f:
for name in sorted(names):
f.write(name + "\n")
name = name.strip()
if name != "":
f.write(name + "\n")

template = jinja2.Template(open('templates/credits.lua').read())
print(template.render(contributors=[l.strip().replace("'", "\\'") for l in open('CONTRIBUTORS')]))
2 changes: 1 addition & 1 deletion src/credits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ end

state.credits = {
app.i18n('credits'), '',
'',
'6sutters',
'8bitgentleman',
'a8252359',
Expand Down Expand Up @@ -250,6 +249,7 @@ state.credits = {
'marbly',
'mario3d',
'masonnixon',
'mateusrodcosta',
'matthewbauer',
'matthewdelacruz15',
'max100101',
Expand Down
58 changes: 58 additions & 0 deletions templates/linux/Hawkthorne.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2024 Mateus Rodrigues Costa -->
<component type="desktop-application">
<id>com.projecthawkthorne.Hawkthorne</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT AND CC-BY-NC-3.0</project_license>

<name>Journey to the Center of Hawkthorne</name>
<summary>2D platformer based on Community's Digital Estate Planning episode</summary>
<description>
<p>
This 2d platformer is based on Community’s Digital Estate Planning episode. It’s built using the LÖVE game engine
</p>
</description>

<launchable type="desktop-id">com.projecthawkthorne.Hawkthorne.desktop</launchable>

<screenshots>
<screenshot type="default">
<image type="source">https://projecthawkthorne.com/assets/images/metatag.png</image>
</screenshot>
</screenshots>

<releases>
<release version="1.1.0" date="2024-11-22">
<url>https://github.com/hawkthorne/hawkthorne-journey/releases/tag/v1.1.0</url>
</release>
</releases>

<content_rating type="oars-1.1">
<content_attribute id="violence-cartoon">moderate</content_attribute>
<content_attribute id="violence-fantasy">moderate</content_attribute>
<content_attribute id="violence-bloodshed">mild</content_attribute>
<content_attribute id="violence-slavery">moderate</content_attribute>
<content_attribute id="drugs-alcohol">moderate</content_attribute>
<content_attribute id="drugs-narcotics">mild</content_attribute>
<content_attribute id="sex-nudity">mild</content_attribute>
<content_attribute id="sex-themes">mild</content_attribute>
<content_attribute id="language-profanity">mild</content_attribute>
<content_attribute id="language-humor">mild</content_attribute>
<content_attribute id="language-discrimination">mild</content_attribute>
<content_attribute id="money-gambling">moderate</content_attribute>
</content_rating>

<developer id="com.projecthawkthorne">
<name>Project Hawkthorne</name>
</developer>

<keywords>
<keyword translate="no">Community</keyword>
<keyword translate="no">Hawkthorne</keyword>
<keyword>fangame</keyword>
</keywords>

<url type="homepage">https://projecthawkthorne.com/</url>
<url type="contact">https://projecthawkthorne.com/</url>
<url type="vcs-browser">https://github.com/hawkthorne/hawkthorne-journey</url>
</component>

0 comments on commit 6b2c36d

Please sign in to comment.