Browse Source

Install vector program icon on Linux

The icon is copied from icons/qbittorrent-tray.svg as there is no way to
install a file and rename it in qmake.
adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
f457069881
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 11
      dist/unix/CMakeLists.txt
  2. 16
      dist/unix/menuicons/scalable/apps/qbittorrent.svg
  3. 89
      unixconf.pri

11
dist/unix/CMakeLists.txt vendored

@ -30,12 +30,6 @@ install(FILES ${MAN_FILES}
) )
if (GUI) if (GUI)
install(DIRECTORY menuicons/
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor
COMPONENT data
FILES_MATCHING PATTERN "*.png"
)
install(FILES org.qbittorrent.qBittorrent.desktop install(FILES org.qbittorrent.qBittorrent.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/
COMPONENT data COMPONENT data
@ -46,6 +40,11 @@ if (GUI)
COMPONENT data COMPONENT data
) )
install(DIRECTORY menuicons/
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor
COMPONENT data
)
install(FILES install(FILES
${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray.svg ${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray.svg
${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray-dark.svg ${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray-dark.svg

16
dist/unix/menuicons/scalable/apps/qbittorrent.svg vendored

@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
<title>
qbittorrent-new-light
</title>
<defs>
<linearGradient x1="34.012%" y1="0%" x2="76.373%" y2="76.805%" id="a">
<stop stop-color="#72B4F5" offset="0%"/>
<stop stop-color="#356EBF" offset="100%"/>
</linearGradient>
</defs>
<g fill="none" fill-rule="evenodd">
<circle stroke="#DAEFFF" stroke-width="32" fill="url(#a)" cx="512" cy="512" r="496"/>
<path d="M712.898 332.399q66.657 0 103.38 45.671 37.03 45.364 37.03 128.684t-37.34 129.61q-37.03 45.98-103.07 45.98-33.02 0-60.484-12.035-27.156-12.344-45.672-37.649h-3.703l-10.8 43.512h-36.724V196h51.227v116.65q0 39.191-2.469 70.359h2.47q35.796-50.61 106.155-50.61zm-7.406 42.894q-52.46 0-75.605 30.242-23.145 29.934-23.145 101.219t23.762 102.145q23.761 30.55 76.222 30.55 47.215 0 70.36-34.254 23.144-34.562 23.144-99.058 0-66.04-23.144-98.442-23.145-32.402-71.594-32.402z" fill="#fff"/>
<path d="M317.273 639.45q51.227 0 74.68-27.466 23.453-27.464 24.996-92.578v-11.418q0-70.976-24.07-102.144-24.07-31.168-76.223-31.168-45.055 0-69.125 35.18-23.762 34.87-23.762 98.75 0 63.879 23.454 97.515 23.761 33.328 70.05 33.328zm-7.715 42.894q-65.421 0-102.144-45.98-36.723-45.981-36.723-128.376 0-83.011 37.032-129.609 37.03-46.598 103.07-46.598 69.433 0 106.773 52.461h2.778l7.406-46.289h40.426V828h-51.227V683.27q0-30.86 3.395-52.461h-4.012q-35.488 51.535-106.774 51.535z" fill="#c8e8ff"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

89
unixconf.pri

@ -29,102 +29,35 @@ DIST_PATH = ../dist/unix
# Systemd Service file # Systemd Service file
nogui:systemd { nogui:systemd {
systemdService.files = $$DIST_PATH/systemd/qbittorrent-nox@.service systemdService.files = $$DIST_PATH/systemd/qbittorrent-nox@.service
systemdService.path = $$PREFIX/lib/systemd/system/ systemdService.path = $$PREFIX/lib/systemd/system
INSTALLS += systemdService INSTALLS += systemdService
} }
# Menu Icon # Menu Icon
!nogui { !nogui {
menuicon.files = $$DIST_PATH/org.qbittorrent.qBittorrent.desktop desktopEntry.files = $$DIST_PATH/org.qbittorrent.qBittorrent.desktop
menuicon.path = $$DATADIR/applications/ desktopEntry.path = $$DATADIR/applications
INSTALLS += menuicon INSTALLS += desktopEntry
appdata.files = $$DIST_PATH/org.qbittorrent.qBittorrent.appdata.xml appdata.files = $$DIST_PATH/org.qbittorrent.qBittorrent.appdata.xml
appdata.path = $$DATADIR/metainfo/ appdata.path = $$DATADIR/metainfo
INSTALLS += appdata INSTALLS += appdata
# Apps icons menuicons.files = $$DIST_PATH/menuicons/*
icon16.files = $$DIST_PATH/menuicons/16x16/apps/qbittorrent.png menuicons.path = $$DATADIR/icons/hicolor
icon16.path = $$DATADIR/icons/hicolor/16x16/apps/
icon22.files = $$DIST_PATH/menuicons/22x22/apps/qbittorrent.png
icon22.path = $$DATADIR/icons/hicolor/22x22/apps/
icon24.files = $$DIST_PATH/menuicons/24x24/apps/qbittorrent.png
icon24.path = $$DATADIR/icons/hicolor/24x24/apps/
icon32.files = $$DIST_PATH/menuicons/32x32/apps/qbittorrent.png
icon32.path = $$DATADIR/icons/hicolor/32x32/apps/
icon36.files = $$DIST_PATH/menuicons/36x36/apps/qbittorrent.png
icon36.path = $$DATADIR/icons/hicolor/36x36/apps/
icon48.files = $$DIST_PATH/menuicons/48x48/apps/qbittorrent.png
icon48.path = $$DATADIR/icons/hicolor/48x48/apps/
icon64.files = $$DIST_PATH/menuicons/64x64/apps/qbittorrent.png
icon64.path = $$DATADIR/icons/hicolor/64x64/apps/
icon72.files = $$DIST_PATH/menuicons/72x72/apps/qbittorrent.png
icon72.path = $$DATADIR/icons/hicolor/72x72/apps/
icon96.files = $$DIST_PATH/menuicons/96x96/apps/qbittorrent.png
icon96.path = $$DATADIR/icons/hicolor/96x96/apps/
icon128.files = $$DIST_PATH/menuicons/128x128/apps/qbittorrent.png
icon128.path = $$DATADIR/icons/hicolor/128x128/apps/
icon192.files = $$DIST_PATH/menuicons/192x192/apps/qbittorrent.png
icon192.path = $$DATADIR/icons/hicolor/192x192/apps/
# Status icons
statusIcon16.files = $$DIST_PATH/menuicons/16x16/status/qbittorrent-tray.png
statusIcon16.path = $$DATADIR/icons/hicolor/16x16/status/
statusIcon22.files = $$DIST_PATH/menuicons/22x22/status/qbittorrent-tray.png
statusIcon22.path = $$DATADIR/icons/hicolor/22x22/status/
statusIcon24.files = $$DIST_PATH/menuicons/24x24/status/qbittorrent-tray.png
statusIcon24.path = $$DATADIR/icons/hicolor/24x24/status/
statusIcon32.files = $$DIST_PATH/menuicons/32x32/status/qbittorrent-tray.png
statusIcon32.path = $$DATADIR/icons/hicolor/32x32/status/
statusIcon36.files = $$DIST_PATH/menuicons/36x36/status/qbittorrent-tray.png
statusIcon36.path = $$DATADIR/icons/hicolor/36x36/status/
statusIcon48.files = $$DIST_PATH/menuicons/48x48/status/qbittorrent-tray.png
statusIcon48.path = $$DATADIR/icons/hicolor/48x48/status/
statusIcon64.files = $$DIST_PATH/menuicons/64x64/status/qbittorrent-tray.png
statusIcon64.path = $$DATADIR/icons/hicolor/64x64/status/
statusIcon72.files = $$DIST_PATH/menuicons/72x72/status/qbittorrent-tray.png
statusIcon72.path = $$DATADIR/icons/hicolor/72x72/status/
statusIcon96.files = $$DIST_PATH/menuicons/96x96/status/qbittorrent-tray.png
statusIcon96.path = $$DATADIR/icons/hicolor/96x96/status/
statusIcon128.files = $$DIST_PATH/menuicons/128x128/status/qbittorrent-tray.png
statusIcon128.path = $$DATADIR/icons/hicolor/128x128/status/
statusIcon192.files = $$DIST_PATH/menuicons/192x192/status/qbittorrent-tray.png
statusIcon192.path = $$DATADIR/icons/hicolor/192x192/status/
statusIconScalable.files = $$PWD/src/icons/qbittorrent-tray.svg \ statusIconScalable.files = $$PWD/src/icons/qbittorrent-tray.svg \
$$PWD/src/icons/qbittorrent-tray-dark.svg \ $$PWD/src/icons/qbittorrent-tray-dark.svg \
$$PWD/src/icons/qbittorrent-tray-light.svg $$PWD/src/icons/qbittorrent-tray-light.svg
statusIconScalable.path = $$DATADIR/icons/hicolor/scalable/status/ statusIconScalable.path = $$DATADIR/icons/hicolor/scalable/status
INSTALLS += \ INSTALLS += \
icon16 \ menuicons \
icon22 \
icon24 \
icon32 \
icon36 \
icon48 \
icon64 \
icon72 \
icon96 \
icon128 \
icon192 \
statusIcon16 \
statusIcon22 \
statusIcon24 \
statusIcon32 \
statusIcon36 \
statusIcon48 \
statusIcon64 \
statusIcon72 \
statusIcon96 \
statusIcon128 \
statusIcon192 \
statusIconScalable statusIconScalable
pixmap.files = $$DIST_PATH/menuicons/128x128/apps/qbittorrent.png pixmap.files = $$DIST_PATH/menuicons/128x128/apps/qbittorrent.png
pixmap.path = $$DATADIR/pixmaps/ pixmap.path = $$DATADIR/pixmaps
INSTALLS += pixmap INSTALLS += pixmap
} }
# INSTALL # INSTALL
target.path = $$PREFIX/bin/ target.path = $$PREFIX/bin
INSTALLS += target INSTALLS += target

Loading…
Cancel
Save