Skip to content

Commit

Permalink
Release 0.0.5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
EoflaOE committed Dec 25, 2018
1 parent 93c00eb commit 87135a6
Show file tree
Hide file tree
Showing 199 changed files with 131,654 additions and 3,704 deletions.
Binary file added .vs/Kernel Simulator/v14/.suo
Binary file not shown.
Binary file added .vs/Kernel Simulator/v15/.suo
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 10 additions & 8 deletions Kernel Simulator.sln
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Basic Express 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 14 for Windows Desktop
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Kernel Simulator", "Kernel Simulator\Kernel Simulator.vbproj", "{C7B37899-C361-423D-9512-FE0A87A46866}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C7B37899-C361-423D-9512-FE0A87A46866}.Debug|x86.ActiveCfg = Debug|x86
{C7B37899-C361-423D-9512-FE0A87A46866}.Debug|x86.Build.0 = Debug|x86
{C7B37899-C361-423D-9512-FE0A87A46866}.Release|x86.ActiveCfg = Release|x86
{C7B37899-C361-423D-9512-FE0A87A46866}.Release|x86.Build.0 = Release|x86
{C7B37899-C361-423D-9512-FE0A87A46866}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7B37899-C361-423D-9512-FE0A87A46866}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7B37899-C361-423D-9512-FE0A87A46866}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7B37899-C361-423D-9512-FE0A87A46866}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Binary file modified Kernel Simulator.suo
Binary file not shown.
15 changes: 8 additions & 7 deletions Kernel Simulator/Arguments/ArgumentParse.vb
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ Module ArgumentParse

'Command Injector argument
If (BootArgs(i) = "cmdinject") Then
W("Available commands: {0}" + vbNewLine + "Write command: ", "input", String.Join(", ", availableCommands))
W(DoTranslation("Available commands: {0}", currentLang) + vbNewLine +
DoTranslation("Write command:", currentLang) + " ", "input", String.Join(", ", availableCommands)) 'TODO: The extra + " " will be fixed in the final release
argcmds = System.Console.ReadLine().Split({" : "}, StringSplitOptions.RemoveEmptyEntries)
argcommands = String.Join(", ", argcmds)
If (argcommands <> "q") Then
CommandFlag = True
Else
Wln("Command injection has been cancelled.", "neutralText")
Wln(DoTranslation("Command injection has been cancelled.", currentLang), "neutralText")
End If
Else
argcmds = BootArgs(i).Substring(10).Split({" : "}, StringSplitOptions.RemoveEmptyEntries)
Expand All @@ -73,9 +74,9 @@ Module ArgumentParse

ElseIf (BootArgs(i) = "help") Then

Wln("Separate boot arguments with commas without spaces, for example, 'motd,gpuprobe'" + vbNewLine + _
"Separate commands on 'cmdinject' with colons with spaces, for example, 'cmdinject setthemes Hacker : beep 1024 0.5'" + vbNewLine + _
"Note that the 'debug' argument does not fully cover the kernel.", "neutralText")
Wln(DoTranslation("Separate boot arguments with commas without spaces, for example, 'motd,gpuprobe'", currentLang) + vbNewLine +
DoTranslation("Separate commands on 'cmdinject' with colons with spaces, for example, 'cmdinject setthemes Hacker : beep 1024 0.5'", currentLang) + vbNewLine +
DoTranslation("Note that the 'debug' argument does not fully cover the kernel.", currentLang), "neutralText")
answerargs = "" : argsFlag = False : argsInjected = False
ArgumentPrompt.PromptArgs()
If (argsFlag = True) Then
Expand All @@ -84,11 +85,11 @@ Module ArgumentParse

End If
Else
Wln("bargs: The requested argument {0} is not found.", "neutralText", BootArgs(i).Substring(0, indexArg))
Wln(DoTranslation("bargs: The requested argument {0} is not found.", currentLang), "neutralText", BootArgs(i).Substring(0, indexArg))
End If
Next
Catch ex As Exception
KernelError(CChar("U"), True, 5, "bargs: Unrecoverable error in argument: " + Err.Description)
KernelError(CChar("U"), True, 5, DoTranslation("bargs: Unrecoverable error in argument: ", currentLang) + Err.Description)
End Try

End Sub
Expand Down
9 changes: 5 additions & 4 deletions Kernel Simulator/Arguments/ArgumentPrompt.vb
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ Module ArgumentPrompt
ArgumentParse.ParseArguments()
Else
'Shows available arguments and prompts for it
W("Available arguments: {0}" + vbNewLine + "Arguments ('help' for help): ", "input", String.Join(", ", AvailableArgs))
answerargs = System.Console.ReadLine()
W(DoTranslation("Available arguments: {0}", currentLang) + vbNewLine +
DoTranslation("Arguments ('help' for help): ", currentLang), "input", String.Join(", ", AvailableArgs))
answerargs = Console.ReadLine()

'Make a kernel check for arguments later if anything is entered
If (answerargs <> Nothing And InjMode = False) Then
argsFlag = True
ElseIf (answerargs <> Nothing And InjMode = True) Then
argsInjected = True
Wln("Injected arguments will be scheduled to run at next reboot.", "neutralText")
Wln(DoTranslation("Injected arguments will be scheduled to run at next reboot.", currentLang), "neutralText")
ElseIf (answerargs = "q" And InjMode = True) Then
Wln("Argument Injection has been cancelled.", "neutralText")
Wln(DoTranslation("Argument Injection has been cancelled.", currentLang), "neutralText")
End If
End If

Expand Down
26 changes: 17 additions & 9 deletions Kernel Simulator/Arguments/CommandLineArgsParse.vb
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,37 @@
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <https://www.gnu.org/licenses/>.

Imports System.Environment
Imports System.IO

Module CommandLineArgsParse

Sub parseCMDArguments(ByVal arg As String)

Try
If (GetCommandLineArgs.Length <> 0 And availableCMDLineArgs.Contains(arg) = True) Then
If (Environment.GetCommandLineArgs.Length <> 0 And availableCMDLineArgs.Contains(arg) = True) Then
Dim strArgs As String = Environment.GetCommandLineArgs.Skip(1).ToArray.Join(" ")
Dim argArgs As String = Environment.GetCommandLineArgs.Skip(2).ToArray.Join(" ")

'Parse arguments
If (arg = "createConf") Then
Config.createConfig(True)
ElseIf (arg = "promptArgs") Then
ArgumentPrompt.PromptArgs()
If (argsFlag = True) Then ArgumentParse.ParseArguments()
ElseIf (arg = "testMod") Then
ReadyPath_MOD()
StartParse(argArgs)
If (scripts.Count = 0) Then
Environment.Exit(1)
Else
Environment.Exit(0)
End If
End If
End If
Catch ex As Exception
If (DebugMode = True) Then
Wln("Error while parsing real command-line arguments: {0} " + vbNewLine + _
"{1}", "neutralText", Err.Description, ex.StackTrace) : Wdbg(ex.StackTrace, True)
Wln(DoTranslation("Error while parsing real command-line arguments: {0}", currentLang) + vbNewLine +
"{1}", "neutralText", Err.Description, ex.StackTrace)
If (arg = "testMod" Or arg = "createConf") Then
Environment.Exit(1)
End If
End Try

End Sub

End Module
4 changes: 2 additions & 2 deletions Kernel Simulator/Console/LoadBackground.vb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Public Module LoadBackground

Public Sub Load()

System.Console.BackgroundColor = backgroundColor
System.Console.Clear()
Console.BackgroundColor = backgroundColor
Console.Clear()

End Sub

Expand Down
2 changes: 1 addition & 1 deletion Kernel Simulator/Console/TemplateSet.vb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Public Module TemplateSet
MakePermanent()
ParseCurrentTheme()
Else
Wln("Invalid color template {0}", "neutralText", theme)
Wln(DoTranslation("Invalid color template {0}", currentLang), "neutralText", theme)
End If

End Sub
Expand Down
118 changes: 0 additions & 118 deletions Kernel Simulator/Console/TemplateSet.vb.bak
Original file line number Diff line number Diff line change
@@ -1,118 +0,0 @@

' Kernel Simulator Copyright (C) 2018 EoflaOE
'
' This file is part of Kernel Simulator
'
' Kernel Simulator 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.
'
' Kernel Simulator 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 <https://www.gnu.org/licenses/>.

Public Module TemplateSet

Public Sub templateSet(ByVal theme As String)

If colorTemplates.Contains(theme) = True Then
If theme = "Default" Then
ColorSet.ResetColors()
templateSetExitFlag = True
ElseIf theme = "RedConsole" Then
inputColor = CType([Enum].Parse(GetType(ConsoleColor), inputColorRC), ConsoleColor)
licenseColor = CType([Enum].Parse(GetType(ConsoleColor), licenseColorRC), ConsoleColor)
contKernelErrorColor = CType([Enum].Parse(GetType(ConsoleColor), contKernelErrorColorRC), ConsoleColor)
uncontKernelErrorColor = CType([Enum].Parse(GetType(ConsoleColor), uncontKernelErrorColorRC), ConsoleColor)
hostNameShellColor = CType([Enum].Parse(GetType(ConsoleColor), hostNameShellColorRC), ConsoleColor)
userNameShellColor = CType([Enum].Parse(GetType(ConsoleColor), userNameShellColorRC), ConsoleColor)
backgroundColor = CType([Enum].Parse(GetType(ConsoleColor), backgroundColorRC), ConsoleColor)
neutralTextColor = CType([Enum].Parse(GetType(ConsoleColor), neutralTextColorRC), ConsoleColor)
cmdListColor = CType([Enum].Parse(GetType(ConsoleColor), cmdListColorRC), ConsoleColor)
cmdDefColor = CType([Enum].Parse(GetType(ConsoleColor), cmdDefColorRC), ConsoleColor)
LoadBackground.Load()
templateSetExitFlag = True
ElseIf theme = "Bluespire" Then
inputColor = CType([Enum].Parse(GetType(ConsoleColor), inputColorBS), ConsoleColor)
licenseColor = CType([Enum].Parse(GetType(ConsoleColor), licenseColorBS), ConsoleColor)
contKernelErrorColor = CType([Enum].Parse(GetType(ConsoleColor), contKernelErrorColorBS), ConsoleColor)
uncontKernelErrorColor = CType([Enum].Parse(GetType(ConsoleColor), uncontKernelErrorColorBS), ConsoleColor)
hostNameShellColor = CType([Enum].Parse(GetType(ConsoleColor), hostNameShellColorBS), ConsoleColor)
userNameShellColor = CType([Enum].Parse(GetType(ConsoleColor), userNameShellColorBS), ConsoleColor)
backgroundColor = CType([Enum].Parse(GetType(ConsoleColor), backgroundColorBS), ConsoleColor)
neutralTextColor = CType([Enum].Parse(GetType(ConsoleColor), neutralTextColorBS), ConsoleColor)
cmdListColor = CType([Enum].Parse(GetType(ConsoleColor), cmdListColorBS), ConsoleColor)
cmdDefColor = CType([Enum].Parse(GetType(ConsoleColor), cmdDefColorBS), ConsoleColor)
LoadBackground.Load()
templateSetExitFlag = True
ElseIf theme = "Hacker" Then
inputColor = CType([Enum].Parse(GetType(ConsoleColor), inputColorHckr), ConsoleColor)
licenseColor = CType([Enum].Parse(GetType(ConsoleColor), licenseColorHckr), ConsoleColor)
contKernelErrorColor = CType([Enum].Parse(GetType(ConsoleColor), contKernelErrorColorHckr), ConsoleColor)
uncontKernelErrorColor = CType([Enum].Parse(GetType(ConsoleColor), uncontKernelErrorColorHckr), ConsoleColor)
hostNameShellColor = CType([Enum].Parse(GetType(ConsoleColor), hostNameShellColorHckr), ConsoleColor)
userNameShellColor = CType([Enum].Parse(GetType(ConsoleColor), userNameShellColorHckr), ConsoleColor)
backgroundColor = CType([Enum].Parse(GetType(ConsoleColor), backgroundColorHckr), ConsoleColor)
neutralTextColor = CType([Enum].Parse(GetType(ConsoleColor), neutralTextColorHckr), ConsoleColor)
cmdListColor = CType([Enum].Parse(GetType(ConsoleColor), cmdListColorHckr), ConsoleColor)
cmdDefColor = CType([Enum].Parse(GetType(ConsoleColor), cmdDefColorHckr), ConsoleColor)
LoadBackground.Load()
templateSetExitFlag = True
ElseIf theme = "LinuxUncolored" Then
inputColor = CType([Enum].Parse(GetType(ConsoleColor), inputColorLUnc), ConsoleColor)
licenseColor = CType([Enum].Parse(GetType(ConsoleColor), licenseColorLUnc), ConsoleColor)
contKernelErrorColor = CType([Enum].Parse(GetType(ConsoleColor), contKernelErrorColorLUnc), ConsoleColor)
uncontKernelErrorColor = CType([Enum].Parse(GetType(ConsoleColor), uncontKernelErrorColorLUnc), ConsoleColor)
hostNameShellColor = CType([Enum].Parse(GetType(ConsoleColor), hostNameShellColorLUnc), ConsoleColor)
userNameShellColor = CType([Enum].Parse(GetType(ConsoleColor), userNameShellColorLUnc), ConsoleColor)
backgroundColor = CType([Enum].Parse(GetType(ConsoleColor), backgroundColorLUnc), ConsoleColor)
neutralTextColor = CType([Enum].Parse(GetType(ConsoleColor), neutralTextColorLUnc), ConsoleColor)
cmdListColor = CType([Enum].Parse(GetType(ConsoleColor), cmdListColorLUnc), ConsoleColor)
cmdDefColor = CType([Enum].Parse(GetType(ConsoleColor), cmdDefColorLUnc), ConsoleColor)
LoadBackground.Load()
templateSetExitFlag = True
ElseIf theme = "LinuxColoredDef" Then
inputColor = CType([Enum].Parse(GetType(ConsoleColor), inputColorLcDef), ConsoleColor)
licenseColor = CType([Enum].Parse(GetType(ConsoleColor), licenseColorLcDef), ConsoleColor)
contKernelErrorColor = CType([Enum].Parse(GetType(ConsoleColor), contKernelErrorColorLcDef), ConsoleColor)
uncontKernelErrorColor = CType([Enum].Parse(GetType(ConsoleColor), uncontKernelErrorColorLcDef), ConsoleColor)
hostNameShellColor = CType([Enum].Parse(GetType(ConsoleColor), hostNameShellColorLcDef), ConsoleColor)
userNameShellColor = CType([Enum].Parse(GetType(ConsoleColor), userNameShellColorLcDef), ConsoleColor)
backgroundColor = CType([Enum].Parse(GetType(ConsoleColor), backgroundColorLcDef), ConsoleColor)
neutralTextColor = CType([Enum].Parse(GetType(ConsoleColor), neutralTextColorLcDef), ConsoleColor)
cmdListColor = CType([Enum].Parse(GetType(ConsoleColor), cmdListColorLcDef), ConsoleColor)
cmdDefColor = CType([Enum].Parse(GetType(ConsoleColor), cmdDefColorLcDef), ConsoleColor)
LoadBackground.Load()
templateSetExitFlag = True
End If
MakePermanent()
Else
Wln("Invalid color template {0}", "neutralText", theme)
End If

End Sub

Public Sub MakePermanent()

Dim ksconf As New IniFile()
ksconf.Load(Environ("USERPROFILE") + "\kernelConfig.ini")
ksconf.Sections("Colors").Keys("User Name Shell Color").Value = userNameShellColor.ToString
ksconf.Sections("Colors").Keys("Host Name Shell Color").Value = hostNameShellColor.ToString
ksconf.Sections("Colors").Keys("Continuable Kernel Error Color").Value = contKernelErrorColor.ToString
ksconf.Sections("Colors").Keys("Uncontinuable Kernel Error Color").Value = uncontKernelErrorColor.ToString
ksconf.Sections("Colors").Keys("Text Color").Value = neutralTextColor.ToString
ksconf.Sections("Colors").Keys("License Color").Value = licenseColor.ToString
ksconf.Sections("Colors").Keys("Background Color").Value = backgroundColor.ToString
ksconf.Sections("Colors").Keys("Input Color").Value = inputColor.ToString
ksconf.Sections("Colors").Keys("Listed command in Help Color").Value = cmdListColor.ToString
ksconf.Sections("Colors").Keys("Definition of command in Help Color").Value = cmdDefColor.ToString
ksconf.Save(Environ("USERPROFILE") + "\kernelConfig.ini")

End Sub

End Module
2 changes: 1 addition & 1 deletion Kernel Simulator/Console/Templates.vb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


' Kernel Simulator Copyright (C) 2018 EoflaOE
'
' This file is part of Kernel Simulator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ If some of the ideas disappeared, then it is either done or cancelled.
2. GUI Command Prompt
3. "uiprompt" real command-line argument launches GUI command prompt
4. Move every single documentation to Wiki in repository (Planned in 0.0.6)
5. Languages (Delayed to 0.0.5.9)
5. Translate mod strings using <modname>-<lang>.mlng (0.0.6)
6. Custom aliases for commands (Perm. in 0.0.6)
7. Debug everything (0.0.5.9)
8. Events and Exceptions (0.0.5.9)
9. A separate program called "Kernel Simulator Manual Studio"
7. A separate program called "Kernel Simulator Manual Studio"
8. Custom manpage (0.0.6)
9. Translated manual pages (0.0.6)

(If you have ideas, edit this section by inserting your idea.)
8 changes: 1 addition & 7 deletions Kernel Simulator/Documentation/Documentation - faq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,4 @@ A: It is handled by supressing it. It is optional that you will see this error o

Q: Why the "beep" does not produce beep sound?
A: The host system doesn't have the motherboard speaker, or the motherboard speaker isn't plugged in correctly, or it is malfunctioned.
EDIT: Some PCs might make a "beep" on the internal sound speaker inside your PC. Dell Optiplex 7040 + Windows 10 is known to have it.

- FTP

Q: Why does the "Injecting CWD..." message appear?
A: Because we use .NET Framework 4.0 as our development framework and we have to make a workaround to force FTP to use CWD before doing
transmissions. This does not indicate an error.
EDIT: Some PCs might make a "beep" on the internal sound speaker inside your PC. Dell Optiplex 7040 + Windows 10 is known to have it.
Loading

0 comments on commit 87135a6

Please sign in to comment.