From 3f9d830294dc3f501b8effb5449d47cf91f56bc4 Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Mon, 8 May 2017 17:54:25 +0000 Subject: [PATCH] Added appdata metainfo file. --- gsmartcontrol/TODO | 7 ---- gsmartcontrol/configure.ac | 2 +- gsmartcontrol/data/Makefile.am | 4 +++ .../data/gsmartcontrol.appdata.xml.in | 34 +++++++++++++++++++ gsmartcontrol/gsmartcontrol.spec.in | 1 + gsmartcontrol/src/applib/storage_detector.cpp | 3 +- .../src/applib/storage_detector_other.cpp | 1 + 7 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 gsmartcontrol/data/gsmartcontrol.appdata.xml.in diff --git a/gsmartcontrol/TODO b/gsmartcontrol/TODO index c3ffe2e..375e11c 100644 --- a/gsmartcontrol/TODO +++ b/gsmartcontrol/TODO @@ -28,18 +28,11 @@ Bugs / patches: TODO: -Fix using multiple -d options (e.g. -d scsi) when there are -d options (e.g. --d sat) in Preferences. This affects the program only before restart. - Don't rely on smartctl return code (2), parse the output instead. This will allow us to show the Info page. -Don't sort drives like this: Pd0,pd1,pd10,pd11,pd2,pd3,pd4,pd5,pd6,pd8,pd9 - Update to latest drivedb. -Write and install appdata file - http://people.freedesktop.org/~hughsient/appdata/ - Test Areca windows detection by installing CLI, then replacing it with a dummy program that prints something (with enclosures and without). diff --git a/gsmartcontrol/configure.ac b/gsmartcontrol/configure.ac index cae5472..a23bec5 100644 --- a/gsmartcontrol/configure.ac +++ b/gsmartcontrol/configure.ac @@ -529,7 +529,7 @@ AC_SUBST(AUTODIRS) # ------------------------------------------------------------------------------------- -AC_CONFIG_FILES([ data/gsmartcontrol.desktop \ +AC_CONFIG_FILES([ data/gsmartcontrol.desktop data/gsmartcontrol.appdata.xml \ data/nsis/distribution.txt data/nsis/distribution-nogtk.txt data/nsis/gsmartcontrol.nsi \ debian.dist/changelog \ src/gsc_winres.rc src/gsmartcontrol.exe.manifest \ diff --git a/gsmartcontrol/data/Makefile.am b/gsmartcontrol/data/Makefile.am index de23ce6..5fa727f 100644 --- a/gsmartcontrol/data/Makefile.am +++ b/gsmartcontrol/data/Makefile.am @@ -40,6 +40,10 @@ appdata_DATA = icon_cddvd.png icon_hdd.png desktopdir = $(datadir)/applications desktop_DATA = gsmartcontrol.desktop +# Appdata files +metainfodir = $(datadir)/metainfo +metainfo_DATA = gsmartcontrol.appdata.xml + # Application pixmap (fallback icon for desktop files). # Same as 48/gsmartcontrol.png. diff --git a/gsmartcontrol/data/gsmartcontrol.appdata.xml.in b/gsmartcontrol/data/gsmartcontrol.appdata.xml.in new file mode 100644 index 0000000..b0e8b88 --- /dev/null +++ b/gsmartcontrol/data/gsmartcontrol.appdata.xml.in @@ -0,0 +1,34 @@ + + + + gsmartcontrol + CC0-1.0 + GPL-2.0 and GPL-3.0 + GSmartControl + Hard Disk and SSD Health Inspection + +

+ GSmartControl is a graphical user interface for smartctl, which is a tool for + querying and controlling SMART (Self-Monitoring, Analysis, and Reporting + Technology) data in hard disk and solid-state drives. It allows you to inspect + the drive's SMART data to determine its health, as well as run various tests + on it. +

+
+ gsmartcontrol.desktop + http://gsmartcontrol.sourceforge.net + + + Main window + http://gsmartcontrol.sourceforge.net/home/images/main_ok.png + + + Drive identity information + http://gsmartcontrol.sourceforge.net/home/images/info_identity.png + + + Attribute list of a failing drive + http://gsmartcontrol.sourceforge.net/home/images/info_failing.png + + +
diff --git a/gsmartcontrol/gsmartcontrol.spec.in b/gsmartcontrol/gsmartcontrol.spec.in index 15247aa..7263d16 100644 --- a/gsmartcontrol/gsmartcontrol.spec.in +++ b/gsmartcontrol/gsmartcontrol.spec.in @@ -204,6 +204,7 @@ rm -rf %buildroot %{_datadir}/gsmartcontrol # %%{_datadir}/gsmartcontrol/* %{_datadir}/applications/*.desktop +%{_datadir}/metainfo/*.appdata.xml %{_datadir}/icons/* %{_datadir}/pixmaps/* diff --git a/gsmartcontrol/src/applib/storage_detector.cpp b/gsmartcontrol/src/applib/storage_detector.cpp index bf032dc..b0d76cb 100644 --- a/gsmartcontrol/src/applib/storage_detector.cpp +++ b/gsmartcontrol/src/applib/storage_detector.cpp @@ -86,7 +86,8 @@ std::string StorageDetector::detect(std::vector& drives, Ex // } } - // Sort the drives, because their order is not quite defined + // Sort the drives, because their order is not quite defined. + // TODO Sort using natural sort std::sort(drives.begin(), drives.end()); debug_out_info("app", DBG_FUNC_MSG << "Drive detection finished.\n"); diff --git a/gsmartcontrol/src/applib/storage_detector_other.cpp b/gsmartcontrol/src/applib/storage_detector_other.cpp index b2e2a14..d1e312c 100644 --- a/gsmartcontrol/src/applib/storage_detector_other.cpp +++ b/gsmartcontrol/src/applib/storage_detector_other.cpp @@ -263,6 +263,7 @@ std::string detect_drives_other(std::vector& drives, Execut #endif + // TODO Sort using natural sort std::sort(devices.begin(), devices.end()); for (std::size_t i = 0; i < devices.size(); ++i) {