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:
2026-10-19 18:45:01 +00:00
parent f88ba23282
commit bfaa1a287b
7 changed files with 186 additions and 34 deletions
+6 -3
View File
@@ -31,11 +31,14 @@ jobs:
run: cargo test --release
- name: Build
run: cargo build --release
- name: Check against the game data
- name: Check the binary runs without the disks
shell: bash
run: |
./target/release/${{ matrix.bin }} info --data .
./target/release/${{ matrix.bin }} bench --data . --seconds 60
mkdir -p "$RUNNER_TEMP/standalone"
cp target/release/${{ matrix.bin }} "$RUNNER_TEMP/standalone/"
cd "$RUNNER_TEMP/standalone"
./${{ matrix.bin }} info
./${{ matrix.bin }} bench --seconds 60
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}