i-nex / I-Nex

System information tool written in gambas3, python, bash
http://i-nex.linux.pl/
174 stars 24 forks source link

No distribution detection or logo for CentOS #16

Closed alphastar868 closed 8 years ago

alphastar868 commented 8 years ago

There is no logo at /etc/i-nex/Database/Distlogos/centos.png Also, the code for detection of CentOS is not included.

This image matches the required format for the Database: /etc/i-nex/Database/Distlogos/centos.png centos

i-nex-7.4.0-centos-logo.patch This patch will allow loading of an image from the above path:

--- I-Nex-master/I-Nex/i-nex/.src/Distribution_Detect.module    2015-10-04 09:44:40.218720490 -0400
+++ I-Nex-7.4.0/I-Nex/i-nex/.src/Distribution_Detect.module     2015-10-04 09:48:23.559982806 -0400
@@ -65,6 +65,10 @@
   Case Like "*netrunner*"
    Finfosys.PictureBox2.Picture = Picture["/etc/i-nex/Database/Distlogos/netrunner.png"]
    Finfosys.PictureBox2.Name = "netrunner.png"
+' CentOS
+  Case Like "*centos*"
+   Finfosys.PictureBox2.Picture = Picture["/etc/i-nex/Database/Distlogos/centos.png"]
+   Finfosys.PictureBox2.Name = "centos.png"
  End Select

  If Finfosys.SCREENFETCH["Distro"] Like "*Ubuntu*" And Finfosys.SCREENFETCH["DE"] Like "*KDE*" Then
@@ -110,7 +114,6 @@
 ' Viperr
 ' LinuxDeepin
 ' Chakra
-' CentOS
 ' Mac OS X
 ' Fuduntu
 End

This patch can also be added to #13 by saving the above patch as ~/rpmbuild/SOURCES/i-nex-7.4.0-centos-logo.patch and adding the following lines to ~/rpmbuild/SPECS/i-nex.spec (don't forget to copy the image above to /etc/i-nex/Database/Distlogos/ before building the new RPMs):

Release: 5.20150919+git%{?gittag}%{?dist}         <-- Edit the first digit to update the build version --
Patch4: i-nex-7.4.0-centos-logo.patch
%patch4 -p1
eloaders commented 8 years ago

Fixed: https://github.com/eloaders/I-Nex/commit/5813d16340787a2287513f65755b3caa9599ef86