I-Nex/I-Nex/i-nex/.src/MStart.module

65 lines
2.3 KiB
Plaintext

' 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 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 CPUINFO_FILE As String
Public Sub Main()
Dim PrintErr As Boolean = True
MDecode_dimms.List_EEPROM()
Finfosys.MenuButton1.Delete
Select Case Application.Args[1]
Case "--help"
Print ("\n " & Application.name & " " & Application.version & " running on:\n"
"\n Architecture: " & System.Architecture & ""
"\n"
"\n System Family: " & System.Family & ""
"\n Gambas Version: " & System.FullVersion & ""
"\n System Charset: " & System.Charset & ""
"\n Hostname: " & System.Host & ""
"\n "
"\n Usage: env VARIABLE=\"STRING\" " & Application.name & ".gambas [Options]"
"\n Options:"
"\n --help (Chow Help)"
"\n --library (Chow library)"
"\n --smbus (smbus)"
"\n"
"\n Env Variables:"
"\n"
"\n INEXCPU_VENDOR"
"\n"
"\n Example:"
"\n"
"\n env INEXCPU_VENDOR=\"Pentium(R) Dual-Core CPU T4200 \" ./i-nex.gambas")
Case "--library"
FSystemInfo.Show
PrintErr = False
Case "--conv"
MConvert.Convert(Application.Args[2], Application.Args[3], Application.Args[4])
PrintErr = False
Case "--smbus"
i2c._inits
PrintErr = False
Case ""
Finfosys.Show
PrintErr = False
End Select
If PrintErr = True Then
Print ("\nInvalid arguments\n"
"Use --help to show options\n")
Endif
End