download-manager/README.md: Update driver info

This commit is contained in:
Xavier Del Campo Romero 2024-12-31 10:42:07 +01:00
parent bd2880e37b
commit a0c31c8a1c
Signed by: xavi
GPG key ID: 84FF3612A9BF43F2
2 changed files with 23 additions and 11 deletions

View file

@ -105,6 +105,8 @@ Where:
- `karting`
- `road`
- `speedway`
- For drivers, it must be one of the available robots, such as
`simplix` or `usr`.
- `author`: defines the author(s) for an asset. Speed Dreams shall not
perform any specific actions based on the value of this string.
- `license`: defines the license covering the asset. Speed Dreams shall not
@ -129,14 +131,24 @@ the download manager. The URL must point to an image file with an extension
known to the `GfTexReadImageFromFile` function. The URL does not have to point
to the same web server hosting the asset database.
- `directory`: defines the directory where the asset shall be stored.
- Cars are stored into `data/cars/models/<directory>`.
- Tracks are stored into `data/tracks/<category>/<directory>`.
- Drivers are stored into `data/drivers/<directory>`.
`datadir` depends on how Speed Dreams is configured during build and
installation and matches the value returned by the `GfDataDir` function,
whereas the `localdir` directory is calculated at run-time by Speed Dreams
and matches the value returned by the `GfLocalDir` function.
- Cars are stored into `<datadir>/cars/models/<directory>`.
- Tracks are stored into `<datadir>/tracks/<category>/<directory>`.
- Drivers are stored into `<localdir>/drivers/<category>/<index>`.
Since Speed Dreams refers to drivers by their indexes, once extracted
it will rename `directory` to the next integer `index` available in the
directory.
- `revision`: an integer that defines the revision of an asset. This value is
used as a basic mechanism to inform users about updates. The download manager
shall write the currently downloaded revision into a file called `.revision`
inside the asset directory.
> **TODO:** future releases will also store cars and tracks into `localdir`
> instead of `datadir`.
## Asset file structure
An asset must be defined as a [ZIP file](https://en.wikipedia.org/wiki/.zip)

View file

@ -70,17 +70,17 @@
],
"drivers": [
{
"name": "dandroid 36gp",
"category": "36gp",
"name": "Ren Suzuki",
"category": "dandroid",
"author": "?",
"license": "Free Art License",
"url": "http://localhost:8000/dandroid_36GP.zip",
"hash": "8484a548efbcf8c081a14c76f9a12ba7e7220909146452fdde223f9f8f951372",
"url": "http://localhost:8000/ren-suzuki.zip",
"hash": "458128211a8f7215060b54b8ebf953ed8692181aed69a47c9280f20730f67665",
"hashtype": "sha256",
"size": "22333413",
"thumbnail": "http://localhost:8000/dandroid_36GP.png",
"directory": "dandroid_36GP",
"revision": "0"
"size": "668",
"thumbnail": "http://localhost:8000/logo.png",
"directory": "ren-suzuki",
"revision": "3"
}
]
}