From 1a06f2d5d3da3da30065973510b53d147631f9a3 Mon Sep 17 00:00:00 2001 From: xSlendiX Date: Wed, 14 Dec 2022 11:05:24 +0200 Subject: [PATCH] Add README. --- README.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..23b5778 --- /dev/null +++ b/README.md @@ -0,0 +1,76 @@ +# TBuild + +TBuild is a build system for TempleOS and ZealOS. It features automatic code +conversion for ZealOS and dependency management. + +## Building and installing + +To build and install, simply run `./build.sh`. After it has finished compiling, +you can put the built `tbuild` binary anywhere in your PATH. Make sure you also +put in the same directory the corresponding RedSeaGen binary for your system. + +## Usage + +``` +Usage: tbuild [command] + +Commands: + * init|i [path=.] - Setup a new project. + * build|. [--zeal|-z|-Z] - Build project in current working directory. + * clean - Clean output code in current working directory. + +To see manifest file usage, check out man tbuild(1) +``` + +## Manifest file + +The manifest file is a file in the TOML format which contains metadata about +your project. There are two main sections: `General` and `Dependencies`. + +### The General section + + - Name: str - The name of the project. + - Author: str - The name of the author. + - Version: str - The project's version. + +### The Dependencies section + +This section follows a format for each dependency: + +``` + = "" +``` + +So, for example, if you wish to add the ac97 loadable driver into your project, +you can add an entry like such: + +``` +[Dependencies] +ac97 = "https://git.checksum.fail/slendi/ac97.git" +``` + +And if you wish to be in a `AC97` directory instead: + +``` +[Dependencies] +AC97 = "https://git.checksum.fail/slendi/ac97.git" +``` + +The dependencies get pulled in and updated at build time. + +## Scripts + +You can run Python scripts after your files are placed inside the `build` +directory by creating a `scripts` folder in the root of your project. + +It's important to note that scripts DO NOT respect the project's path. As such, +it is highly recommended to use something like this: + +```python +import os +dir_path = os.path.dirname(os.path.realpath(__file__)) + '/..' +``` + +It is also important to note that you can have as many subdirectories as you +wish. +