Skip to content

Commit

Permalink
Fix intel database and AMD APU Processors detection
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Jan 25, 2014
1 parent aee0799 commit 4ce5231
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 23 deletions.
11 changes: 6 additions & 5 deletions src/i-nex/.settings
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[Bookmarks]
CFlags=[9]
FCpudb=[]

[Breakpoints]
Count=0
Expand Down Expand Up @@ -48,7 +49,7 @@ File[21]=".src/net.module:2.19"
File[22]="Data/report-ng.sh:5.3"
File[23]=".src/Distribution_Detect.module:13.1"
File[24]=".src/FFlags.module:2.19"
File[25]=".src/Finfosys.class:592.45"
File[25]=".src/Finfosys.class:542.62"
File[26]=".src/FDF.form"
File[27]=".src/FDF.class:26.6"
File[28]=".src/FNET_R_T.form"
Expand All @@ -58,9 +59,8 @@ File[31]="logo/fb.png"
File[32]=".src/FCPU.module:2.19"
File[33]=".src/FUdisks.form"
File[34]=".src/FUdisks.class:26.6"
Active=35
File[35]=".src/FCpudb.module:53.17"
File[36]=".src/JSON.module:121.31"
File[35]=".src/FCpudb.module:0.0"
File[36]=".src/JSON.module:113.37"
File[37]=".src/Settings.class:2.19"
File[38]=".src/Main.module:2.19"
File[39]=".src/_Settings_Keys.class:15.20"
Expand All @@ -80,6 +80,7 @@ File[52]=".src/Reports/MDRIVES_REPORT.module:12.40"
File[53]=".src/FInputDate.form"
File[54]=".src/MInit.module:25.23"
File[55]=".src/FEDID.form"
Active=56
File[56]=".src/FEDID.class:83.25"
File[57]=".src/Logger.class:2.19"
File[58]=".src/Formatter.module:2.19"
Expand All @@ -89,7 +90,7 @@ File[61]=".src/FInputDate.class:2.19"
File[62]=".src/FDIMM.form"
File[63]=".src/FDIMM.class:72.16"
File[64]=".src/Reports/FCPUID_REPORT.module:2.0"
File[65]=".src/MCPUSAGE.module:11.29"
File[65]=".src/MCPUSAGE.module:9.18"
Count=65

[Watches]
Expand Down
6 changes: 5 additions & 1 deletion src/i-nex/.src/FCpudb.module
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ Public Sub _inits()
database = JSON.Decode(buffer)
cpucache = Finfosys.Label14.Text
Logs("Replace CPU Strings to Null", Logger.Info)

cpucache = Replace(Replace(Replace(Replace(cpucache, "with", "*"), "APU", "*"), "Graphics", "*"), "Radeon", "*")
cpucache = Replace(Replace(Replace(Replace(Replace(Replace(Replace(cpucache, "Intel", ""), " ", "*"), "R", ""), "CPU", ""), "TM", ""), ")", ""), "(", "")
cpucache = Replace(Replace(Replace(Replace(Replace(cpucache, "AMD", ""), "Core", ""), "Dual", ""), "Processor", ""), "tm", "")
cpucache = Replace(Replace(Replace(Replace(Replace(cpucache, "AMD", "*"), "Core", "*"), "Dual", "*"), "Processor", "*"), "tm", "*")
cpucache = Replace(Replace(Replace(cpucache, "HD", "*"), "-", "*"), "Eight", "*")

For z = 0 To database["DATABASE"].Count - 1
If database["DATABASE"][z]["PROCESSOR_MODEL_NAME"] Like "*" & cpucache & "*" Then

Expand Down
4 changes: 2 additions & 2 deletions src/i-nex/.src/Finfosys.class
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ Public Sub Form_Open()
Dim MTRR As New String[]
Logs("Starting log", Logger.Info)
Button4.Visible = False

MCPUSAGE.GetUSAGE()
Object.Call(MCPUSAGE, "GetUSAGE")
''Okno na środku
If Settings["Window/X"] = Null Then
Me.Center
Expand Down Expand Up @@ -103,6 +102,7 @@ Public Sub Form_Open()
.Height = 21
.Border = Border.Raised
.Padding = 3
.Font.Size = 8
.Tooltip = DATAT["Flags"][i]["NAME"]
.Text = DATAT["Flags"][i]["DESC"]
End With
Expand Down
30 changes: 18 additions & 12 deletions src/i-nex/.src/Finfosys.form
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Text = "I-Nex"
Icon = Picture["logo/i-nex.0.4.x.png"]
Resizable = False
Spacing = True
Padding = 3
{ Orientation Menu
Text = ("Orientation")
Expand Down Expand Up @@ -80,18 +81,22 @@
}
{ TabStrip1 TabStrip
Move(0,0,476,511)
#Translate = False
Font = Font["8"]
PopupMenu = "Menu1"
Spacing = True
Margin = True
Padding = 3
Count = 12
TextFont = Font["8"]
Index = 0
Text = ("CPU")
Text = "CPU"
Picture = Picture["AppIcons/Finfosys/cpu.png"]
{ TabPanel1 TabPanel
Move(0,0,476,483)
Font = Font["Bold,8"]
Margin = True
Padding = 3
Count = 2
TextFont = Font["Bold,8"]
Orientation = Align.Bottom
Expand Down Expand Up @@ -610,7 +615,7 @@
Index = 0
}
Index = 1
Text = ("GPU")
Text = "GPU"
Picture = Picture["AppIcons/Finfosys/xorg.png"]
{ PictureBox1 PictureBox
Move(350,7,112,112)
Expand Down Expand Up @@ -754,7 +759,7 @@
Move(336,0,14,133)
}
Index = 2
Text = ("Mobo")
Text = "Mobo"
Picture = Picture["AppIcons/Finfosys/hardinfo.png"]
{ Frame1 Frame
Move(0,0,469,112)
Expand Down Expand Up @@ -885,7 +890,7 @@
}
}
Index = 3
Text = ("Audio")
Text = "Audio"
Picture = Picture["AppIcons/Finfosys/audio-card.png"]
{ HBox21 HBox
Move(6,6,156,24)
Expand Down Expand Up @@ -970,7 +975,7 @@
}
}
Index = 4
Text = ("Drives")
Text = "Drives"
Picture = Picture["AppIcons/Finfosys/drive-harddisk-system.png"]
{ !Label41 Label
Move(301,7,161,21)
Expand Down Expand Up @@ -1317,7 +1322,7 @@
Border = Border.Raised
}
Index = 5
Text = ("System")
Text = "System"
Picture = Picture["AppIcons/Finfosys/applications-system.png"]
{ Button5 Button
Move(406,434,28,28)
Expand Down Expand Up @@ -1545,7 +1550,7 @@
Border = Border.Raised
}
Index = 6
Text = ("Kernel")
Text = "Kernel"
{ Frame22 Frame
Move(0,0,469,224)
Font = Font["Bold,8"]
Expand Down Expand Up @@ -1586,7 +1591,7 @@
Text = ("Show modules")
}
Index = 7
Text = ("Memory")
Text = "Memory"
Picture = Picture["AppIcons/Finfosys/utilities-system-monitor.png"]
{ ProgressBar1 ProgressBar
Move(0,245,469,21)
Expand Down Expand Up @@ -1689,7 +1694,7 @@
Border = Border.Raised
}
Index = 8
Text = ("Network")
Text = "Network"
Picture = Picture["AppIcons/Finfosys/network-wired.png"]
{ TextArea4 TextArea
Move(6,36,456,24)
Expand Down Expand Up @@ -1870,7 +1875,7 @@
Border = Border.Raised
}
Index = 9
Text = ("Battery")
Text = "Battery"
Picture = Picture["AppIcons/Finfosys/battery.png"]
{ HPanel5 HPanel
Move(0,0,468,420)
Expand Down Expand Up @@ -2051,7 +2056,7 @@
Move(6,426,396,18)
}
Index = 10
Text = ("USB | Input")
Text = "USB | Input"
Picture = Picture["AppIcons/Finfosys/drive-harddisk-usb.png"]
{ HBox12 HBox
Move(0,0,468,24)
Expand Down Expand Up @@ -2207,7 +2212,7 @@
ReadOnly = True
}
Index = 11
Text = ("Battery ")
Text = "Battery "
Picture = Picture["AppIcons/Finfosys/battery.png"]
{ Label177 Label
Move(7,7,455,21)
Expand Down Expand Up @@ -2380,6 +2385,7 @@
#Translate = False
Font = Font["Bold,10"]
Foreground = &HFF0000&
Padding = 3
Alignment = Align.Center
Border = Border.Etched
}
Expand Down
14 changes: 14 additions & 0 deletions src/i-nex/.src/MCPUSAGE.module
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
' Gambas module file

' Copyright(C) 2011-2014, Michał Głowienka aka eloaders <eloaders@linux.pl>
'
' This program is free software; you can redistribute it and/or modify
' it under the terms of the GNU Lesser General Public License as published by
' the Free Software Foundation; either version 3 of the License, or
' (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http://www.gnu.org/licenses/>.
Public CPUusage As Process
Private CPUusageOutput As String
Public Sub GetUSAGE()
Expand Down
7 changes: 4 additions & 3 deletions src/i-nex/Database/intel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{"DATABASE": [
{"DATABASE": [
{
"PROCESSOR_MODEL_NAME": "Core i7-4790",
"PROCESSOR_SOCKET_IMAGE": "310.gif",
Expand Down Expand Up @@ -112,7 +112,7 @@
"PROCESSOR_SOCKET_IMAGE": "311.gif",
"PROCESSOR_SOCKET": "Intel Socket 1150",
"PROCESSOR_PROCESS_SIZE": "22 nm",
"PROCESSOR_TRANSISTORS": "1400 million",
"PROCESSOR_TRANSISTORS": "1400million",
"PROCESSOR_DIE_SIZE": "177 mm²",
"PROCESSOR_PACKAGE": "FC-LGA12C",
"PROCESSOR_TCASEMAX": "72°C",
Expand Down Expand Up @@ -3366,7 +3366,8 @@
"PROCESSOR_PRODUCTION_STATUS": "unknown",
"PROCESSOR_RELEASED": "May 2011",
"PROCESSOR_MEMORYSUPPORT": "DDR3",
"PROCESSOR_OFCORES": "Dual-core",,
"PROCESSOR_OFCORES": "Dual-core",
},
{
"PROCESSOR_MODEL_NAME": "Core i7-4790",
"PROCESSOR_SOCKET_IMAGE": "310.gif",
Expand Down

0 comments on commit 4ce5231

Please sign in to comment.