diff --git a/.fleet/run.json b/.fleet/run.json new file mode 100644 index 0000000..42b557d --- /dev/null +++ b/.fleet/run.json @@ -0,0 +1,12 @@ +{ + "configurations": [ + { + "type": "dotnet", + "name": "Moxie", + "projectPath": "", + "exePath": "", + "args": [], + }, + + ] +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index c282be7..04a47c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ bin/ +Debug/ +net6.0/ obj/ .idea/ .vs/ .floo -.flooignore \ No newline at end of file +.flooignore +.fleet \ No newline at end of file diff --git a/LICENSE b/LICENSE index 98f970b..904983f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Kiirx +Copyright (c) 2023 Moxie Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Moxie_OS/Moxie.sln b/Moxie.sln similarity index 61% rename from Moxie_OS/Moxie.sln rename to Moxie.sln index 6e83ddc..49bd1eb 100644 --- a/Moxie_OS/Moxie.sln +++ b/Moxie.sln @@ -1,8 +1,10 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.32228.343 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Moxie", "Moxie.csproj", "{E933FA33-2311-4CB2-B224-DCC0EAC4B844}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Moxie", "Moxie_Kernel\Moxie.csproj", "{E933FA33-2311-4CB2-B224-DCC0EAC4B844}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Moxie_Plugs", "Moxie_Plugs\Moxie_Plugs.csproj", "{C94359C9-B83D-4FF5-98C7-F74EB7DE6268}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -14,6 +16,10 @@ Global {E933FA33-2311-4CB2-B224-DCC0EAC4B844}.Debug|Any CPU.Build.0 = Debug|Any CPU {E933FA33-2311-4CB2-B224-DCC0EAC4B844}.Release|Any CPU.ActiveCfg = Release|Any CPU {E933FA33-2311-4CB2-B224-DCC0EAC4B844}.Release|Any CPU.Build.0 = Release|Any CPU + {C94359C9-B83D-4FF5-98C7-F74EB7DE6268}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C94359C9-B83D-4FF5-98C7-F74EB7DE6268}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C94359C9-B83D-4FF5-98C7-F74EB7DE6268}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C94359C9-B83D-4FF5-98C7-F74EB7DE6268}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Moxie_OS/Commands/CommandRegister.cs b/MoxieOLD/Commands/CommandRegister.cs similarity index 100% rename from Moxie_OS/Commands/CommandRegister.cs rename to MoxieOLD/Commands/CommandRegister.cs diff --git a/Moxie_OS/Commands/Console/Clear.cs b/MoxieOLD/Commands/Console/Clear.cs similarity index 100% rename from Moxie_OS/Commands/Console/Clear.cs rename to MoxieOLD/Commands/Console/Clear.cs diff --git a/Moxie_OS/Commands/Console/Echo.cs b/MoxieOLD/Commands/Console/Echo.cs similarity index 100% rename from Moxie_OS/Commands/Console/Echo.cs rename to MoxieOLD/Commands/Console/Echo.cs diff --git a/Moxie_OS/Commands/Console/KeyboardMap.cs b/MoxieOLD/Commands/Console/KeyboardMap.cs similarity index 100% rename from Moxie_OS/Commands/Console/KeyboardMap.cs rename to MoxieOLD/Commands/Console/KeyboardMap.cs diff --git a/Moxie_OS/Commands/Console/WhoAmI.cs b/MoxieOLD/Commands/Console/WhoAmI.cs similarity index 100% rename from Moxie_OS/Commands/Console/WhoAmI.cs rename to MoxieOLD/Commands/Console/WhoAmI.cs diff --git a/Moxie_OS/Commands/FileSystem/CD.cs b/MoxieOLD/Commands/FileSystem/CD.cs similarity index 100% rename from Moxie_OS/Commands/FileSystem/CD.cs rename to MoxieOLD/Commands/FileSystem/CD.cs diff --git a/Moxie_OS/Commands/FileSystem/Cat.cs b/MoxieOLD/Commands/FileSystem/Cat.cs similarity index 100% rename from Moxie_OS/Commands/FileSystem/Cat.cs rename to MoxieOLD/Commands/FileSystem/Cat.cs diff --git a/Moxie_OS/Commands/FileSystem/Directory.cs b/MoxieOLD/Commands/FileSystem/Directory.cs similarity index 100% rename from Moxie_OS/Commands/FileSystem/Directory.cs rename to MoxieOLD/Commands/FileSystem/Directory.cs diff --git a/Moxie_OS/Commands/FileSystem/File.cs b/MoxieOLD/Commands/FileSystem/File.cs similarity index 100% rename from Moxie_OS/Commands/FileSystem/File.cs rename to MoxieOLD/Commands/FileSystem/File.cs diff --git a/Moxie_OS/Commands/FileSystem/LS.cs b/MoxieOLD/Commands/FileSystem/LS.cs similarity index 100% rename from Moxie_OS/Commands/FileSystem/LS.cs rename to MoxieOLD/Commands/FileSystem/LS.cs diff --git a/Moxie_OS/Commands/FileSystem/Move.cs b/MoxieOLD/Commands/FileSystem/Move.cs similarity index 100% rename from Moxie_OS/Commands/FileSystem/Move.cs rename to MoxieOLD/Commands/FileSystem/Move.cs diff --git a/Moxie_OS/Commands/Miscellaneous/System.cs b/MoxieOLD/Commands/Miscellaneous/System.cs similarity index 100% rename from Moxie_OS/Commands/Miscellaneous/System.cs rename to MoxieOLD/Commands/Miscellaneous/System.cs diff --git a/Moxie_OS/Commands/Network/FTP.cs b/MoxieOLD/Commands/Network/FTP.cs similarity index 100% rename from Moxie_OS/Commands/Network/FTP.cs rename to MoxieOLD/Commands/Network/FTP.cs diff --git a/Moxie_OS/Core/HSParser.cs b/MoxieOLD/Core/HSParser.cs similarity index 100% rename from Moxie_OS/Core/HSParser.cs rename to MoxieOLD/Core/HSParser.cs diff --git a/Moxie_OS/Core/Initializer.cs b/MoxieOLD/Core/Initializer.cs similarity index 100% rename from Moxie_OS/Core/Initializer.cs rename to MoxieOLD/Core/Initializer.cs diff --git a/Moxie_OS/Core/Network/NetworkManager.cs b/MoxieOLD/Core/Network/NetworkManager.cs similarity index 100% rename from Moxie_OS/Core/Network/NetworkManager.cs rename to MoxieOLD/Core/Network/NetworkManager.cs diff --git a/Moxie_OS/Core/UnitTests/NetworkConnection.cs b/MoxieOLD/Core/UnitTests/NetworkConnection.cs similarity index 100% rename from Moxie_OS/Core/UnitTests/NetworkConnection.cs rename to MoxieOLD/Core/UnitTests/NetworkConnection.cs diff --git a/Moxie_OS/Core/UnitTests/UnitTest.cs b/MoxieOLD/Core/UnitTests/UnitTest.cs similarity index 100% rename from Moxie_OS/Core/UnitTests/UnitTest.cs rename to MoxieOLD/Core/UnitTests/UnitTest.cs diff --git a/Moxie_OS/Core/UnitTests/vFS.cs b/MoxieOLD/Core/UnitTests/vFS.cs similarity index 100% rename from Moxie_OS/Core/UnitTests/vFS.cs rename to MoxieOLD/Core/UnitTests/vFS.cs diff --git a/Moxie_OS/Core/User/Setup.cs b/MoxieOLD/Core/User/Setup.cs similarity index 100% rename from Moxie_OS/Core/User/Setup.cs rename to MoxieOLD/Core/User/Setup.cs diff --git a/Moxie_OS/Kernel.cs b/MoxieOLD/Kernel.cs similarity index 100% rename from Moxie_OS/Kernel.cs rename to MoxieOLD/Kernel.cs diff --git a/Moxie_OS/Moxie.csproj b/MoxieOLD/Moxie.csproj similarity index 100% rename from Moxie_OS/Moxie.csproj rename to MoxieOLD/Moxie.csproj diff --git a/Moxie_OS/Properties/Info.cs b/MoxieOLD/Properties/Info.cs similarity index 100% rename from Moxie_OS/Properties/Info.cs rename to MoxieOLD/Properties/Info.cs diff --git a/Moxie_Kernel/Kernel.cs b/Moxie_Kernel/Kernel.cs new file mode 100644 index 0000000..d386c6d --- /dev/null +++ b/Moxie_Kernel/Kernel.cs @@ -0,0 +1,23 @@ +using Moxie.filesystem; +using System; +using Sys = Cosmos.System; + +namespace Moxie; + +public class Kernel : Sys.Kernel +{ + public static Bird.Bird bird; + public VFs vfs; + + protected override void BeforeRun() + { + Console.Clear(); + vfs.Init(); + bird.WriteLine("Moxie 23 booted"); + } + + protected override void Run() + { + bird.HandleConsole("user", VFs.CurrentDirectory, ConsoleColor.White, ConsoleColor.DarkGreen, '#'); + } +} \ No newline at end of file diff --git a/Moxie_Kernel/Moxie - Backup.csproj b/Moxie_Kernel/Moxie - Backup.csproj new file mode 100644 index 0000000..9f33128 --- /dev/null +++ b/Moxie_Kernel/Moxie - Backup.csproj @@ -0,0 +1,200 @@ + + + + net6.0 + cosmos + false + True + ELF + True + MethodFooters + ISO + Source + False + bin/Debug/net6.0/Moxie.iso + False + False + True + MethodFooters + Use VMware Player or Workstation to deploy and debug. + ISO + VMware + False + Source + False + Serial: COM1 + Pipe: Cosmos/Serial + 192.168.0.8 + Player + False + False + True + False + bin/Debug/net6.0/Moxie.iso + False + False + True + MethodFooters + Use Bochs emulator to deploy and debug. + ISO + Bochs + True + Source + False + Serial: COM1 + Pipe: Cosmos/Serial + 192.168.0.8 + Player + False + False + True + False + bin/Debug/net6.0/Moxie.iso + False + True + True + MethodFooters + Creates a bootable ISO image which can be burned to a DVD. After running the selected project, an explorer window will open containing the ISO file. The ISO file can then be burned to a CD or DVD and used to boot a physical or virtual system. + ISO + None + True + Source + False + Serial: COM1 + Pipe: Cosmos/Serial + 192.168.0.8 + Player + False + False + True + False + bin/Debug/net5.0/ProjectOrizonOS.iso + False + False + True + MethodFooters + Connect to Intel Edison device to deploy and debug. + BinaryImage + IntelEdison + True + Source + False + Serial: COM1 + Pipe: Cosmos/Serial + 192.168.0.8 + Player + False + False + True + False + bin/Debug/net5.0/ProjectOrizonOS.iso + False + False + True + MethodFooters + Creates a PXE setup and hosts a DCHP and TFTP server to deploy directly to physical hardware. Allows debugging with a serial cable. + PXE + None + True + Source + False + Serial: COM1 + Pipe: Cosmos/Serial + 192.168.0.8 + Player + False + False + True + False + bin/Debug/net5.0/ProjectOrizonOS.iso + False + False + True + MethodFooters + Makes a USB device such as a flash drive or external hard disk bootable. + USB + None + False + Source + False + Serial: COM1 + Pipe: Cosmos/Serial + 192.168.0.8 + Player + False + False + True + False + bin/Debug/net5.0/ProjectOrizonOS.iso + False + False + VMware User 001 + False + False + bin/Debug/net5.0/ProjectOrizonOS.iso + True + False + False + Player + 192.168.0.8 + Pipe: CosmosSerial + Serial: COM1 + False + Source + False + HyperV + ISO + Use Hyper-V to deploy and debug. + VMware User 001 + MethodFooters + True + VMware User 001 + VMware User 001 + False + true + + + + False + False + Pipe: Cosmos/Serial + Serial: COM1 + ISO + ISO + Creates a bootable ISO image which can be burned to a DVD. After running the selected project, an explorer window will open containing the ISO file. The ISO file can then be burned to a CD or DVD and used to boot a physical or virtual system. + 192.168.0.8 + False + Player + True + False + Moxie + README.md + + + + True + + + + False + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + modules/Bird1.1.2.1716.dll + + + + diff --git a/Moxie_Kernel/Moxie.csproj b/Moxie_Kernel/Moxie.csproj new file mode 100644 index 0000000..13e65a3 --- /dev/null +++ b/Moxie_Kernel/Moxie.csproj @@ -0,0 +1,201 @@ + + + + net6.0 + + cosmos + false + True + ELF + True + MethodFooters + ISO + Source + False + bin\Debug\net6.0\Moxie.iso + False + False + True + MethodFooters + Use VMware Player or Workstation to deploy and debug. + ISO + VMware + False + Source + False + Serial: COM1 + Pipe: Cosmos\Serial + 192.168.0.8 + Player + False + False + True + False + bin\Debug\net6.0\Moxie.iso + False + False + True + MethodFooters + Use Bochs emulator to deploy and debug. + ISO + Bochs + True + Source + False + Serial: COM1 + Pipe: Cosmos\Serial + 192.168.0.8 + Player + False + False + True + False + bin\Debug\net6.0\Moxie.iso + False + True + True + MethodFooters + Creates a bootable ISO image which can be burned to a DVD. After running the selected project, an explorer window will open containing the ISO file. The ISO file can then be burned to a CD or DVD and used to boot a physical or virtual system. + ISO + None + True + Source + False + Serial: COM1 + Pipe: Cosmos\Serial + 192.168.0.8 + Player + False + False + True + False + bin\Debug\net5.0\ProjectOrizonOS.iso + False + False + True + MethodFooters + Connect to Intel Edison device to deploy and debug. + BinaryImage + IntelEdison + True + Source + False + Serial: COM1 + Pipe: Cosmos\Serial + 192.168.0.8 + Player + False + False + True + False + bin\Debug\net5.0\ProjectOrizonOS.iso + False + False + True + MethodFooters + Creates a PXE setup and hosts a DCHP and TFTP server to deploy directly to physical hardware. Allows debugging with a serial cable. + PXE + None + True + Source + False + Serial: COM1 + Pipe: Cosmos\Serial + 192.168.0.8 + Player + False + False + True + False + bin\Debug\net5.0\ProjectOrizonOS.iso + False + False + True + MethodFooters + Makes a USB device such as a flash drive or external hard disk bootable. + USB + None + False + Source + False + Serial: COM1 + Pipe: Cosmos\Serial + 192.168.0.8 + Player + False + False + True + False + bin\Debug\net5.0\ProjectOrizonOS.iso + False + False + VMware User 001 + False + False + bin\Debug\net5.0\ProjectOrizonOS.iso + True + False + False + Player + 192.168.0.8 + Pipe: CosmosSerial + Serial: COM1 + False + Source + False + HyperV + ISO + Use Hyper-V to deploy and debug. + VMware User 001 + MethodFooters + True + VMware User 001 + VMware User 001 + False + true + + + + False + False + Pipe: Cosmos\Serial + Serial: COM1 + ISO + ISO + Creates a bootable ISO image which can be burned to a DVD. After running the selected project, an explorer window will open containing the ISO file. The ISO file can then be burned to a CD or DVD and used to boot a physical or virtual system. + 192.168.0.8 + False + Player + True + False + Moxie + README.md + + + + True + + + + False + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + modules\Bird1.1.2.1716.dll + + + + diff --git a/Moxie_Kernel/filesystem/File.cs b/Moxie_Kernel/filesystem/File.cs new file mode 100644 index 0000000..27d0322 --- /dev/null +++ b/Moxie_Kernel/filesystem/File.cs @@ -0,0 +1,34 @@ +using System; +using System.IO; +using Moxie.utils; + +namespace Moxie.filesystem; + +public class File +{ + public static void CreateFile(string name, string path, FileOptions fileArgs, int bufferSize = 4096) + { + System.IO.File.Create($"{StringManipulation.HandleDirectoryPath(path)}{name}", bufferSize, fileArgs); + } + + public static void DeleteFile(string name, string path) + { + var file = $"{StringManipulation.HandleDirectoryPath(path)}{name}"; + if(System.IO.File.Exists(file)) + { + System.IO.File.Delete($"{StringManipulation.HandleDirectoryPath(path)}{name}"); + } + } + + public static FileStream GetFileStream(string name, string path) + { + var file = $"{StringManipulation.HandleDirectoryPath(path)}{name}"; + + if(System.IO.File.Exists(file)) + { + return System.IO.File.Open(file, FileMode.Open); + } + + throw new FileNotFoundException(); + } +} \ No newline at end of file diff --git a/Moxie_Kernel/filesystem/VFs.cs b/Moxie_Kernel/filesystem/VFs.cs new file mode 100644 index 0000000..9460874 --- /dev/null +++ b/Moxie_Kernel/filesystem/VFs.cs @@ -0,0 +1,15 @@ +using Cosmos.System.FileSystem; + +namespace Moxie.filesystem; +public class VFs +{ + public static string CurrentDirectory = @"0:\"; + public static string CurrentVolume = @"0:\"; + + public void Init() + { + CosmosVFS fs = new CosmosVFS(); + Cosmos.System.FileSystem.VFS.VFSManager.RegisterVFS(fs); + Kernel.bird.WriteLine("VFs initialized"); + } +} diff --git a/Moxie_Kernel/modules/Bird1.1.2.1716.dll b/Moxie_Kernel/modules/Bird1.1.2.1716.dll new file mode 100644 index 0000000..1f7063e Binary files /dev/null and b/Moxie_Kernel/modules/Bird1.1.2.1716.dll differ diff --git a/Moxie_Kernel/modules/Moxie_Plugs.dll b/Moxie_Kernel/modules/Moxie_Plugs.dll new file mode 100644 index 0000000..574640b Binary files /dev/null and b/Moxie_Kernel/modules/Moxie_Plugs.dll differ diff --git a/Moxie_Kernel/utils/StringManipulation.cs b/Moxie_Kernel/utils/StringManipulation.cs new file mode 100644 index 0000000..fc32fbe --- /dev/null +++ b/Moxie_Kernel/utils/StringManipulation.cs @@ -0,0 +1,14 @@ +namespace Moxie.utils; + +public class StringManipulation +{ + public static string HandleDirectoryPath(string path) + { + string r = path; + + if(!path.StartsWith("")) r = filesystem.VFs.CurrentDirectory + path; + if(!path.EndsWith('/')) r += '/'; + + return r; + } +} \ No newline at end of file diff --git a/Moxie_Plugs/Moxie_Plugs.csproj b/Moxie_Plugs/Moxie_Plugs.csproj index 69941fa..9aa8d35 100644 --- a/Moxie_Plugs/Moxie_Plugs.csproj +++ b/Moxie_Plugs/Moxie_Plugs.csproj @@ -2,7 +2,7 @@ net6.0 - ClassLibrary1 + Moxie_Plugs true Moxie_Plugs diff --git a/Moxie_Plugs/Moxie_Plugs.sln b/Moxie_Plugs/Moxie_Plugs.sln deleted file mode 100644 index b0cb872..0000000 --- a/Moxie_Plugs/Moxie_Plugs.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.32228.343 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Moxie_Plugs", "Moxie_Plugs.csproj", "{D7EDA10D-AC04-42AB-AB09-2EFE58B1DA67}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D7EDA10D-AC04-42AB-AB09-2EFE58B1DA67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D7EDA10D-AC04-42AB-AB09-2EFE58B1DA67}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D7EDA10D-AC04-42AB-AB09-2EFE58B1DA67}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D7EDA10D-AC04-42AB-AB09-2EFE58B1DA67}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {1097CB76-C52C-4469-AAF9-D0486BA35EEC} - EndGlobalSection -EndGlobal diff --git a/README.md b/README.md index cd2e0a1..18a3d99 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,6 @@ License: MIT - - Twitter: Kiiroxtv -

> An OS made in C# with [Cosmos](https://github.com/CosmosOS/Cosmos) @@ -64,5 +61,5 @@ Give a ⭐️ if this project helped you! ## 📝 License -Copyright © 2022 [Kiirox](https://github.com/Kiirx).
+Copyright © 2023 [Kiirox](https://github.com/Kiirx).
This project is [MIT](https://github.com/Kiirx/ProjectOrizonOS/blob/main/LICENSE) licensed.