mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-01 20:06:53 +01:00
Rename multiple files to match the application ID
The desktop entry file, appdata file and installed icons are renamed to match the application ID for the benefit of Flatpak packaging.
This commit is contained in:
parent
dbe15e5e9f
commit
224c475b50
12
dist/CMakeLists.txt
vendored
12
dist/CMakeLists.txt
vendored
@ -22,7 +22,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/clementine.nsi.in
|
||||
|
||||
|
||||
# windows/windres.rc is done by src/CMakeLists.txt
|
||||
|
||||
set(APP_ID "org.clementine_player.Clementine")
|
||||
if(EXISTS /etc/lsb-release)
|
||||
file(READ "/etc/lsb-release" LSB_RELEASE_CONTENTS)
|
||||
string(REGEX MATCH "DISTRIB_ID=Ubuntu" IS_UBUNTU ${LSB_RELEASE_CONTENTS})
|
||||
@ -40,20 +40,20 @@ option(INSTALL_UBUNTU_ICONS "Install the Ubuntu themed monochrome panel icons" $
|
||||
if (NOT APPLE)
|
||||
install(FILES clementine_64.png
|
||||
DESTINATION share/icons/hicolor/64x64/apps/
|
||||
RENAME clementine.png
|
||||
RENAME ${APP_ID}.png
|
||||
)
|
||||
|
||||
install(FILES clementine_128.png
|
||||
DESTINATION share/icons/hicolor/128x128/apps/
|
||||
RENAME clementine.png
|
||||
RENAME ${APP_ID}.png
|
||||
)
|
||||
|
||||
install(FILES ../data/icon.svg
|
||||
DESTINATION share/icons/hicolor/scalable/apps/
|
||||
RENAME clementine.svg
|
||||
RENAME ${APP_ID}.svg
|
||||
)
|
||||
|
||||
install(FILES clementine.desktop
|
||||
install(FILES ${APP_ID}.desktop
|
||||
DESTINATION share/applications
|
||||
)
|
||||
|
||||
@ -64,7 +64,7 @@ if (NOT APPLE)
|
||||
DESTINATION share/kservices5
|
||||
)
|
||||
|
||||
install(FILES clementine.appdata.xml
|
||||
install(FILES ${APP_ID}.appdata.xml
|
||||
DESTINATION share/metainfo
|
||||
)
|
||||
|
||||
|
10
dist/clementine.spec.in
vendored
10
dist/clementine.spec.in
vendored
@ -112,16 +112,16 @@ rm -f $RPM_BUILD_ROOT/usr/share/icons/ubuntu-mono-{dark,light}/apps/24/clementin
|
||||
%{_bindir}/clementine
|
||||
%{_bindir}/clementine-tagreader
|
||||
%dir %{_datadir}/metainfo/
|
||||
%{_datadir}/metainfo/clementine.appdata.xml
|
||||
%{_datadir}/applications/clementine.desktop
|
||||
%{_datadir}/metainfo/org.clementine_player.Clementine.appdata.xml
|
||||
%{_datadir}/applications/org.clementine_player.Clementine.desktop
|
||||
%{_datadir}/clementine/projectm-presets
|
||||
%{_datadir}/kservices5/clementine-itms.protocol
|
||||
%{_datadir}/kservices5/clementine-itpc.protocol
|
||||
%{_datadir}/kservices5/clementine-feed.protocol
|
||||
%{_datadir}/kservices5/clementine-zune.protocol
|
||||
%{_datadir}/icons/hicolor/64x64/apps/clementine.png
|
||||
%{_datadir}/icons/hicolor/128x128/apps/clementine.png
|
||||
%{_datadir}/icons/hicolor/scalable/apps/clementine.svg
|
||||
%{_datadir}/icons/hicolor/64x64/apps/org.clementine_player.Clementine.png
|
||||
%{_datadir}/icons/hicolor/128x128/apps/org.clementine_player.Clementine.png
|
||||
%{_datadir}/icons/hicolor/scalable/apps/org.clementine_player.Clementine.svg
|
||||
|
||||
%changelog
|
||||
* @RPM_DATE@ David Sansome <me@davidsansome.com> - @CLEMENTINE_VERSION_RPM_V@
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!-- Copyright 2014 David Sansome <me@davidsansome.com> -->
|
||||
<application>
|
||||
<id>org.clementine_player.Clementine</id>
|
||||
<id type="desktop">clementine.desktop</id>
|
||||
<id type="desktop">org.clementine_player.Clementine.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-3.0+</project_license>
|
||||
<name>Clementine Music Player</name>
|
@ -33,7 +33,7 @@ Comment[sr@ijekavianlatin]=Reprodukuje muziku i last.fm tokove
|
||||
Comment[sr@latin]=Reprodukuje muziku i last.fm tokove
|
||||
Exec=clementine %U
|
||||
TryExec=clementine
|
||||
Icon=clementine
|
||||
Icon=org.clementine_player.Clementine
|
||||
Terminal=false
|
||||
Categories=AudioVideo;Player;Qt;Audio;
|
||||
StartupNotify=false
|
2
dist/update_desktop_languages.py
vendored
2
dist/update_desktop_languages.py
vendored
@ -7,7 +7,7 @@ import polib
|
||||
import re
|
||||
|
||||
PO_GLOB = 'src/translations/*.po'
|
||||
DESKTOP_PATH = 'dist/clementine.desktop'
|
||||
DESKTOP_PATH = 'dist/org.clementine_player.Clementine.desktop'
|
||||
|
||||
class ConfigParser(object):
|
||||
"""
|
||||
|
@ -72,8 +72,8 @@ parts:
|
||||
cmake ../src -DCMAKE_INSTALL_PREFIX=/usr
|
||||
make -j $(getconf _NPROCESSORS_ONLN)
|
||||
make DESTDIR=$SNAPCRAFT_PART_INSTALL install
|
||||
sed -i 's|Icon=clementine|Icon=/usr/share/icons/hicolor/scalable/apps/clementine\.svg|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/clementine.desktop
|
||||
sed -i 's|TryExec=.*|TryExec=/snap/bin/clementine|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/clementine.desktop
|
||||
sed -i 's|Icon=clementine|Icon=/usr/share/icons/hicolor/scalable/apps/clementine\.svg|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/org.clementine_player.Clementine.desktop
|
||||
sed -i 's|TryExec=.*|TryExec=/snap/bin/clementine|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/org.clementine_player.Clementine.desktop
|
||||
|
||||
build-packages:
|
||||
- cmake
|
||||
@ -170,7 +170,7 @@ parts:
|
||||
apps:
|
||||
clementine:
|
||||
command: desktop-launch $SNAP/usr/bin/clementine
|
||||
desktop: usr/share/applications/clementine.desktop
|
||||
desktop: usr/share/applications/org.clementine_player.Clementine.desktop
|
||||
environment:
|
||||
ALSA_CONFIG_PATH: /snap/$SNAPCRAFT_PROJECT_NAME/current/usr/share/alsa/alsa.conf
|
||||
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio
|
||||
|
@ -396,7 +396,7 @@ int main(int argc, char* argv[]) {
|
||||
// Set the name of the app desktop file as per the freedesktop specifications
|
||||
// This is needed on Wayland for the main window to show the correct icon
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||
QGuiApplication::setDesktopFileName("clementine");
|
||||
QGuiApplication::setDesktopFileName("org.clementine_player.Clementine");
|
||||
#endif
|
||||
|
||||
// Resources
|
||||
|
@ -114,7 +114,7 @@ void OSD::ShowMessageNative(const QString& summary, const QString& message,
|
||||
hints["image_data"] = QVariant(image);
|
||||
}
|
||||
|
||||
hints["desktop-entry"] = QVariant("clementine");
|
||||
hints["desktop-entry"] = QVariant("org.clementine_player.Clementine");
|
||||
hints["transient"] = QVariant(true);
|
||||
|
||||
int id = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user