Embed the game data so the disks are not needed at run time
build.rs unpacks the ADF images next to Cargo.toml (or in SKIDS_EMBED_DIR) with the same ADF/LHA readers the game uses and packs the files into the executable. At run time the built-in data loads first and anything given with --data, or found next to the executable, overrides it. The embed feature is on by default; builds without it behave as before and ask for --data. CI now runs the binary from an empty directory.
This commit is contained in:
+4
-1
@@ -8,10 +8,13 @@ readme = "README.md"
|
||||
repository = "https://github.com/andydixon/skids"
|
||||
|
||||
[features]
|
||||
default = ["audio"]
|
||||
default = ["audio", "embed"]
|
||||
# Procedural engine/skid sound via cpal. Disable with --no-default-features
|
||||
# on Linux machines without the ALSA development headers.
|
||||
audio = ["dep:cpal"]
|
||||
# Build the game data from the ADF images next to Cargo.toml (or in
|
||||
# SKIDS_EMBED_DIR) into the executable, so it runs without the disks.
|
||||
embed = []
|
||||
|
||||
[dependencies]
|
||||
minifb = "0.28"
|
||||
|
||||
Reference in New Issue
Block a user