diff --git a/doc/download-manager/README.md b/doc/download-manager/README.md index c13e30751..c0bac40ef 100644 --- a/doc/download-manager/README.md +++ b/doc/download-manager/README.md @@ -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/`. - - Tracks are stored into `data/tracks//`. - - Drivers are stored into `data/drivers/`. +`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 `/cars/models/`. + - Tracks are stored into `/tracks//`. + - Drivers are stored into `/drivers//`. + 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) diff --git a/doc/download-manager/assets.example.json b/doc/download-manager/assets.example.json index 2f254dec1..7c46b8ea2 100644 --- a/doc/download-manager/assets.example.json +++ b/doc/download-manager/assets.example.json @@ -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" } ] }