Skip to content

Commit

Permalink
Add AppData file for Linux installs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Nov 18, 2020
1 parent 4c260ab commit 84458df
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 8 deletions.
12 changes: 8 additions & 4 deletions scripts/package-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ mkdir -p $APP_DIR

# Application binary
mkdir -p $APP_DIR/usr/bin
cp "build/gui/Grabber" $APP_DIR/usr/bin
cp "build/gui/Grabber" $APP_DIR/usr/bin/grabber

# Desktop file
mkdir -p $APP_DIR/usr/share/applications
cp "src/dist/linux/Grabber.desktop" $APP_DIR/usr/share/applications
cp "src/dist/linux/grabber.desktop" $APP_DIR/usr/share/applications

# AppData file
mkdir -p $APP_DIR/usr/share/metainfo
cp "src/dist/linux/grabber.appdata.xml" $APP_DIR/usr/share/metainfo

# Icon
mkdir -p $APP_DIR/usr/share/icons/hicolor
cp "src/gui/resources/images/icon.png" $APP_DIR/usr/share/icons/hicolor/Grabber.png
cp "src/dist/linux/grabber.png" $APP_DIR/usr/share/icons/hicolor

# Copy other files in $PREFIX/share/Grabber where they can be found
mkdir -p $APP_DIR/usr/share/Grabber
Expand All @@ -27,7 +31,7 @@ touch "$APP_DIR/usr/share/Grabber/settings.ini"

# See https://github.com/probonopd/linuxdeployqt
export VERSION=$GRABBER_VERSION
./vendor/linuxdeployqt.AppImage "$APP_DIR/usr/share/applications/Grabber.desktop" -appimage
./vendor/linuxdeployqt.AppImage "$APP_DIR/usr/share/applications/grabber.desktop" -appimage
mv "Grabber-$VERSION-x86_64.AppImage" "Grabber_$VERSION-x86_64.AppImage"

# Cleanup
Expand Down
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ add_subdirectory(languages)
add_custom_target(translations DEPENDS General_translations CrashReporter_translations)
install(DIRECTORY "dist/common" DESTINATION share/Grabber)
install(DIRECTORY "sites" DESTINATION share/Grabber/sites)
install(FILES "dist/linux/Grabber.desktop" DESTINATION share/applications)
install(FILES "dist/linux/grabber.desktop" DESTINATION share/applications)
install(FILES "dist/linux/grabber.png" DESTINATION share/icons/hicolor)
install(FILES "dist/linux/grabber.appdata.xml" DESTINATION share/metainfo)

add_subdirectory(sites)
add_dependencies(gui sites)
Expand Down
56 changes: 56 additions & 0 deletions src/dist/linux/grabber.appdata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2020 Bionus <bio.nus@hotmail.fr> -->
<component type="desktop-application">
<id>grabber</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>Apache-2.0</project_license>
<name>Grabber</name>
<summary>Very customizable imageboard/booru downloader with powerful filenaming features</summary>

<description>
<p>Very customizable imageboard/booru downloader with powerful filenaming features.</p>
</description>

<launchable type="desktop-id">grabber.desktop</launchable>

<screenshots>
<screenshot type="default">
<caption>Search results</caption>
<image>https://bionus.github.io/imgbrd-grabber/assets/img/screenshots/search-basic.png</image>
</screenshot>
<screenshot>
<caption>Batch download window</caption>
<image>https://bionus.github.io/imgbrd-grabber/assets/img/screenshots/download.png</image>
</screenshot>
<screenshot>
<caption>Source settings</caption>
<image>https://bionus.github.io/imgbrd-grabber/assets/img/screenshots/sources.png</image>
</screenshot>
<screenshot>
<caption>Filename settings</caption>
<image>https://bionus.github.io/imgbrd-grabber/assets/img/screenshots/filename.png</image>
</screenshot>
</screenshots>

<url type="homepage">https://bionus.github.io/imgbrd-grabber/</url>
<url type="bugtracker">https://github.com/Bionus/imgbrd-grabber/issues</url>
<url type="faq">https://bionus.github.io/imgbrd-grabber/docs/faq.html</url>
<url type="help">https://bionus.github.io/imgbrd-grabber/docs/</url>
<url type="translate">https://crowdin.com/project/imgbrd-grabber</url>

<provides>
<id>grabber.desktop</id>
</provides>

<categories>
<category>Network</category>
</categories>

<developer_name>Bionus</developer_name>
<update_contact>bio.nus@hotmail.fr</update_contact>

<content_rating type="oars-1.0">
<content_attribute id="sex-nudity">intense</content_attribute>
<content_attribute id="sex-themes">intense</content_attribute>
</content_rating>
</component>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Name=Grabber
Comment=Very customizable imageboard/booru downloader with powerful filenaming features
Exec=Grabber
Icon=Grabber
Type=Application
Exec=grabber
Icon=grabber
Categories=Network;
Binary file added src/dist/linux/grabber.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 84458df

Please sign in to comment.