40 lines
1.9 KiB
Markdown
40 lines
1.9 KiB
Markdown
Comes from:
|
|
https://discord.com/channels/273534239310479360/273539705595756544/1117313483067904081
|
|
|
|
|
|
# What is an app?
|
|
an app is considered installed if it is
|
|
an hbvm binary with a app named in the following format
|
|
<app-name>_<version>.hb is in a directory matching the same name (<app-name>_<version>)
|
|
this is called the app_root
|
|
the app_root can be located in a users Apps/ directory (all programs are apps, yes even drivers)
|
|
the /System/Apps/ directory (used for things like graphics drivers)
|
|
or the /Shared/Apps/ directory
|
|
|
|
every app must have one of the following in the app_root as well
|
|
|
|
cli.jerma
|
|
config.toml # subject to change
|
|
metadata.toml
|
|
version_table.SOME_FORMAT_HERE #used to try and help translate older IPC calls to newer versions and vice-versa
|
|
|
|
|
|
metadata.toml contains the fields. This is not writable by the app without proper permissions (Basically only the app manager should do that)
|
|
name app name
|
|
authors an array of strings representing authors (Git)
|
|
version the program version (MUST match the program version in the directory name)
|
|
hash the hash of the binary
|
|
|
|
|
|
cli.jerma
|
|
the cli specification that is used to validate against when any command is run
|
|
if you specify that you accept one argument file and it is Optional you can run app with or without the argument. If your cli command doesn't match the spec the shell app throws an error and helps you fix it
|
|
(It shouldn't actually be possible for a userr in a shell to type an invalid command)
|
|
tab completion & a system similar to Minecraft bedrock mobile will prompt you where you can navigate back and forth the cursor position and up or down the command suggestions
|
|
|
|
assume we have the apps
|
|
ls_1.0 and ls_2.0
|
|
when we type ls the shell checks if there is a user specified default version of a program and if so it silently uses that version
|
|
otherwise when the user presses space or enter it prompts for which ls version to use via the lil popup and tosses in the argument app_version=<verison>
|
|
|