Posted 06 August 2015 - 11:15 PM
cheetOS
Version 1.0
Spoiler
- Multitasking
- Custom modular drive-based file system
- A registry
- Sane library loading (no global table magic)
- Some neat shell features
The system's features are better demonstrated in screenshots:
The shell as it is presented on first boot.
Here, you can see the shell's shell scripts (*.ss extension). These are currently just a list of commands to run, but I'm planning on making them more sophisticated.
Followed by that you can see a task listing and the mounting of a new drive. The operating system tries to avoid the default file system as much as possible. A drive is essentially a virtual file system that redirects fs calls. This means that network drives are possible! Currently, the OS only supports regular directories to be mounted as drives.
Here you can see the registry being used to modify shell settings. I am setting the TextColour key, which is a child of the Shell key to "orange", which the shell will pick up on reboot…
Et voilà! The text colour is now orange.
Installation
Run this in the root directory:
pastebin run EcWBg9x8
HTTP has to be enabled, of course. The installer will delete all of your data, so please make sure to back up any important files.
Bugs and feature requests
Please report any bugs or suggestions as a comment on this thread.
I am still working hard on this, so do expect there to be lots of bugs.
The operating system overrides a lot of the default ComputerCraft functionality, so if you are using cheetOS, it might be better to post any bugs related to the default APIs/programs here rather than the bugs section.
cheetOS Quickstart
The shell that cheetOS uses, called Basic Shell, is usage-wise the same as the default CraftOS shell. If you know how to use the default shell, you know how to use this one.
So let's go over some cheetOS commands that you'll need to exploit the system in its entirety:
Spoiler
cdrvMuch like cd, except it changes the drive that you are in.
Example:
cdrv S:/
The above command will set the current drive to S:/, which is the system drive.
tasks
Displays a list of running tasks. This is useful if you need to find out a certain tasks' ID in order to perform other operations on it.
There are no arguments.
kill
Kills a task. You can either specify its ID or a task name in order to kill all tasks that have that name.
Example:
kill shell.lua
Kills all tasks that are called shell.lua.
mount
Mounts a directory as a drive. The path of the directory must be a path in the real file system.
Example:
mount F:/ /
The above command will mount the root directory as F:/.
Note that by naming your drive K, it will not persist. That means that it will be gone on reboot, unlike normal mounts.
unmount
The opposite of mount.
Example:
unmount F:/
The above command will remove the F:/ drive.
registry/reg
This command allows you to modify the registry. Type 'registry help' for an explanation on how to use the command.
Examples:
reg set Shell/StartupFile mystartup.ss -- Sets Shell/StartupFile (the file that is run when the shell starts) to mystartup.ss
reg get Shell/StartupFile -- Outputs 'mystartup.ss' because we just set it to that value.
reg get Shell -- Outputs all children of the 'Shell' key.
reg del Shell -- Deletes the 'Shell' key and all its sub-keys. In this case, you could use this to reset the shell config.
API Documentation
I'm in the process of making a wiki, so you're going to have to wait.
If you want to make a regular program, the default CraftOS API will do.
The Source
You can look at the source and contribute via the GitHub repo here.
Edited on 07 August 2015 - 11:15 AM