From fd598de2c48a9fcc0e13b5574c3da0b5b6edf407 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Mon, 20 Dec 2021 15:07:34 -0500 Subject: [PATCH] Add .desktop and icon file installation Add initial .desktop file and icon copied from the launcher source tree, and updated .pro files to install them. Also removed potentially confusing use of non-existent $$PREFIX variable. Bug-AGL: SPEC-4182 Signed-off-by: Scott Murray Change-Id: Ic84c43d4871002131f982c3054a9ee6f475e649d --- app/app.pro | 2 +- package/icon.svg | 283 ----------------------------------------------- package/package.pro | 31 ++---- package/settings.desktop | 11 ++ package/settings.svg | 114 +++++++++++++++++++ settings.pro | 2 +- 6 files changed, 135 insertions(+), 308 deletions(-) delete mode 100644 package/icon.svg create mode 100644 package/settings.desktop create mode 100644 package/settings.svg diff --git a/app/app.pro b/app/app.pro index 3a14c80..0b2eab7 100644 --- a/app/app.pro +++ b/app/app.pro @@ -16,7 +16,7 @@ RESOURCES += \ bluetooth/bluetooth.qrc \ version/version.qrc -target.path = $${PREFIX}/usr/bin +target.path = /usr/bin target.files += $${OUT_PWD}/$${TARGET} target.CONFIG = no_check_exist executable diff --git a/package/icon.svg b/package/icon.svg deleted file mode 100644 index 6628784..0000000 --- a/package/icon.svg +++ /dev/null @@ -1,283 +0,0 @@ - - - -image/svg+xmlSETTINGS - \ No newline at end of file diff --git a/package/package.pro b/package/package.pro index 495dc40..8214677 100644 --- a/package/package.pro +++ b/package/package.pro @@ -1,26 +1,11 @@ +TEMPLATE = aux -DISTFILES = icon.svg config.xml +icon.path = /usr/share/icons/hicolor/scalable +icon.files += $$_PRO_FILE_PWD_/settings.svg +icon.CONFIG = no_check_exist -!equals($$_PRO_FILE_PWD_, $$OUT_PWD) { - copy_icon.target = $$OUT_PWD/root/icon.svg - copy_icon.depends = $$_PRO_FILE_PWD_/icon.svg - copy_icon.commands = $(COPY_FILE) \"$$replace(copy_icon.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_icon.target, /, $$QMAKE_DIR_SEP)\" - QMAKE_EXTRA_TARGETS += copy_icon - PRE_TARGETDEPS += $$copy_icon.target +desktop.path = /usr/share/applications +desktop.files = $$_PRO_FILE_PWD_/settings.desktop +desktop.CONFIG = no_check_exist - copy_config.target = $$OUT_PWD/root/config.xml - copy_config.depends = $$_PRO_FILE_PWD_/config.xml - copy_config.commands = $(COPY_FILE) \"$$replace(copy_config.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_config.target, /, $$QMAKE_DIR_SEP)\" - QMAKE_EXTRA_TARGETS += copy_config - PRE_TARGETDEPS += $$copy_config.target -} - -WGT_TYPE = -CONFIG(debug, debug|release) { - WGT_TYPE = -debug -} - -wgt.target = package -wgt.commands = wgtpkg-pack -f -o settings$${WGT_TYPE}.wgt root - -QMAKE_EXTRA_TARGETS += wgt +INSTALLS += desktop icon diff --git a/package/settings.desktop b/package/settings.desktop new file mode 100644 index 0000000..21516d4 --- /dev/null +++ b/package/settings.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=Settings +Comment=Settings +GenericName=Settings +Exec=settings +Icon=settings +Terminal=false +Type=Application +Categories=System; +StartupNotify=true diff --git a/package/settings.svg b/package/settings.svg new file mode 100644 index 0000000..882e3c4 --- /dev/null +++ b/package/settings.svg @@ -0,0 +1,114 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/settings.pro b/settings.pro index 5cf7e78..e6d6e34 100644 --- a/settings.pro +++ b/settings.pro @@ -1,2 +1,2 @@ TEMPLATE = subdirs -SUBDIRS = app +SUBDIRS = app package -- 2.16.6