You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling with RUSTFLAGS='-C target-cpu=native' cargo build --release the resulting binary panics with:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
ResourceNotFound("/cards.png", [
("~/games/freecell/target/release/resources", IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" })),
("~/.local/share/freecell", IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" })),
("~/.config/freecell", IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" })),
("./resources", IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" }))
])',
src/game.rs:41:61
The text was updated successfully, but these errors were encountered:
the thing is, that the binary has to be executed next to the "resources" folder. When using a cargo build the binary is not located there. Is is possible to include the resources in the binary? Copying both together works but it would just be nice to have one binary that includes all.
Unfortunately, that's how ggez works, there is a trick to add the Cargo manifest path to build and run (see here) but I haven't found a way to embed the ressources in the binary so far.
When compiling with
RUSTFLAGS='-C target-cpu=native' cargo build --release
the resulting binary panics with:The text was updated successfully, but these errors were encountered: