Skip to content

Install desktop file and app icons on Debian #4

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

Open
wants to merge 1 commit into
base: jason-debs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
ricochet-refresh (1.1.4-2) unstable; urgency=medium

* add desktop file and resized icons

-- Jason Rhinelander <[email protected]> Tue, 31 Mar 2020 16:36:49 -0300

ricochet-refresh (1.1.4-1) unstable; urgency=medium

* deb package
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: ricochet-refresh
Section: net
Priority: optional
Maintainer: Jason Rhinelander <[email protected]>
Build-Depends: debhelper (>= 9), pkg-config, libssl-dev, libprotobuf-dev, protobuf-compiler, qtdeclarative5-dev, qttools5-dev-tools
Build-Depends: debhelper (>= 9), pkg-config, libssl-dev, libprotobuf-dev, protobuf-compiler, qtdeclarative5-dev, qttools5-dev-tools, imagemagick
Standards-Version: 4.4.1
Homepage: https://ricochetrefresh.net/

Expand Down
13 changes: 13 additions & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
debian/ricochet-refresh.desktop usr/share/applications
debian/icons/1024x1024/ricochet-refresh.png usr/share/icons/hicolor/1024x1024/apps
debian/icons/512x512/ricochet-refresh.png usr/share/icons/hicolor/512x512/apps
debian/icons/256x256/ricochet-refresh.png usr/share/icons/hicolor/256x256/apps
debian/icons/192x192/ricochet-refresh.png usr/share/icons/hicolor/192x192/apps
debian/icons/128x128/ricochet-refresh.png usr/share/icons/hicolor/128x128/apps
debian/icons/96x96/ricochet-refresh.png usr/share/icons/hicolor/96x96/apps
debian/icons/64x64/ricochet-refresh.png usr/share/icons/hicolor/64x64/apps
debian/icons/48x48/ricochet-refresh.png usr/share/icons/hicolor/48x48/apps
debian/icons/32x32/ricochet-refresh.png usr/share/icons/hicolor/32x32/apps
debian/icons/24x24/ricochet-refresh.png usr/share/icons/hicolor/24x24/apps
debian/icons/16x16/ricochet-refresh.png usr/share/icons/hicolor/16x16/apps

10 changes: 10 additions & 0 deletions debian/make-icons.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -e
set -x

for x in 1024 512 256 192 128 96 64 48 32 24 16; do
# Generate from the PNG. The SVG is fake (it just has an embedded png inside it).
mkdir -p debian/icons/${x}x${x}
convert -verbose -filter Catrom -resize ${x}x${x} icons/ricochet_refresh.png debian/icons/${x}x${x}/ricochet-refresh.png
done
14 changes: 8 additions & 6 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ export QT_SELECT=qt5
override_dh_auto_configure:
dh_auto_configure -- DEFINES+=RICOCHET_NO_PORTABLE


# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

override_dh_auto_install:
dh_auto_install
./debian/make-icons.sh
# Remove the images that `make install` installs: the 1517x1517 png gets installed into 48x48
# is just wrong, and the "scalable" svg file is actually just the same PNG stuffed into
# an svg file because, um.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm yes I noticed this. Should we try to get a SVG of the new Ricochet Refresh icon?

rm -f debian/ricochet-refresh/usr/share/icons/hicolor/48x48/apps/ricochet_refresh.png
rm -f debian/ricochet-refresh/usr/share/icons/hicolor/scalable/apps/ricochet_refresh.svg