rec-wars icon indicating copy to clipboard operation
rec-wars copied to clipboard

Doesn't work if installed by `cargo install rec-wars`

Open martin-t opened this issue 4 years ago • 2 comments

  • [x] The executable should be just rec-wars, not rec-wars-macroquad
  • [x] It crashes because of missing assets.

martin-t avatar Aug 01 '21 12:08 martin-t

There seems to be no way to tell cargo to package assets into ~/.cargo/bin/. They get downloaded but only into a cache folder which can disappear at any time and the binary is copied into ~/.cargo/bin/, not even symlinked so it would have to look for them using their absolute path. An ugly solution is to include them in the binary but that means no customization by players.

My options:

  • give up on it, publish one last version that just tells players to compile or download from GH
  • make a special branch just for crates.io with included assets that encourages modders to use GH

martin-t avatar Oct 03 '21 18:10 martin-t

Option C: package assets into the game as fallback but allow overriding - this would allow both downloads from crates.io and modding.

martin-t avatar Oct 09 '21 18:10 martin-t

Fixed by option C.

martin-t avatar Jul 16 '23 14:07 martin-t