Add new command-line option '--system-information' for displaying system information on the standard output.

[DEVELOPMENT ENVIRONMENT]
* BUG: Debugger: Draw values that change the same way in the debug panel and in the debug windows.
* NEW: Add new command-line option '--system-information' for displaying system information on the standard output.
This commit is contained in:
gambas 2021-05-26 03:46:55 +02:00
parent f5e0934089
commit c9d0751166
4 changed files with 35 additions and 10 deletions

View file

@ -189,22 +189,40 @@ Public Sub gvwExpr_Data(Row As Integer, Column As Integer)
Endif
If Column <> 0 Then
sVal = $cVal[Row]
If Left(gvwExpr.Data.Text) <> "!" Then
If sVal Then
If Left(sVal) <> "!" Then
If $cVal.Exist(Row) And If $cOldVal.Exist(Row) And If gvwExpr.Data.Text <> $cOldVal[Row] Then
If $cOldVal.Exist(Row) And If sVal <> $cOldVal[Row] Then
gvwExpr.Data.Background = $iChangeColor 'Color.Lighter(Color.Yellow)
gvwExpr.Data.Font.Bold = True
Endif
Else
gvwExpr.Data.Text = Mid$(gvwExpr.Data.Text, 2)
gvwExpr.Data.Text = Mid$(sVal, 2)
gvwExpr.Data.Background = $iErrorColor 'Color.Lighter(Color.Red)
Endif
Endif
If Column <> 0 Then
' If Left(gvwExpr.Data.Text) <> "!" Then
'
' If $cVal.Exist(Row) And If $cOldVal.Exist(Row) And If $cVal[Row] <> $cOldVal[Row] Then
' gvwExpr.Data.Background = $iChangeColor 'Color.Lighter(Color.Yellow)
' gvwExpr.Data.Font.Bold = True
' Endif
'
' Else
'
' gvwExpr.Data.Text = Mid$(gvwExpr.Data.Text, 2)
' gvwExpr.Data.Background = $iErrorColor 'Color.Lighter(Color.Red)
'
' Endif
gvwExpr.Data.Font = txtExpr.Font
Else

View file

@ -329,6 +329,10 @@ Public Sub Main()
Else
Quit
Endif
Else If sArg = "--system-information" Or If sArg = "-i" Then
InitVersion
Print FSystemInfo.GetInfo().Join("\n")
Quit
Else If Left(sArg) = "-" Then
Error "gambas3: unknown option: " & sArg
Quit

View file

@ -197,6 +197,7 @@ Static Public Sub GetInfo() As String[]
aText.Add(sVar & "=" & Env[sVar])
Next
MakeAnonymous(aText)
Return aText
End
@ -213,7 +214,6 @@ Public Sub Form_Open()
Inc Application.Busy
aText = GetInfo()
MakeAnonymous(aText)
Project.SetEditorFont(gvwInfo)
@ -257,7 +257,7 @@ Public Sub Form_Open()
End
Sub MakeAnonymous(aText As String[])
Static Private Sub MakeAnonymous(aText As String[])
Dim I As Integer
Dim sText As String
@ -266,7 +266,6 @@ Sub MakeAnonymous(aText As String[])
sText = Replace(aText[I], System.Host, "<hostname>")
sText = Replace(sText, User.Home, "<home>")
aText[I] = Replace(sText, User.Name, "<user>")
Next
End

View file

@ -16,6 +16,10 @@ $ gambas3 --cleanup <project directory>
Clean the project directory up (i.e. remove temporary, generated, and backup files).
$ gambas3 --system-information | -i
Print system information
$ gambas3 --version | -V
Display Gambas version.