darthdeus / comfy

Comfy is a fun 2D game engine built in Rust. It's designed to be opinionated, productive, and easy to use.
https://comfyengine.org
Apache License 2.0
717 stars 35 forks source link

"trunk build" needs additional changes before uploading to itch.io on MacOS #90

Open Sigmoidle opened 7 months ago

Sigmoidle commented 7 months ago

OS: MacOS Processor: M2 Comfy Version: 0.3.1 from crates.io

After following the guide here: https://comfyengine.org/book/releasing/ I was unable to run my game on itch.io. It showed a blank screen. Using inspect element I found that it was reporting the error: 403 - Resource not found.

Steps to upload to itch.io on MacOS:

  1. Place the index.html file in same directory as cargo.toml: https://github.com/darthdeus/comfy-demos/blob/master/bitmob/index.html
  2. trunk build --release --features comfy/ci-release
  3. Inside the dist/ folder, edit the newly generated index.html file.
  4. Prepend all *.js and *.wasm file directories with . (dot/full-stop)
  5. Save
  6. Zip dist/ folder and upload to itch.io
image

I'm not sure if this additional step is only required for MacOS.

I'm placing this issue here so we can find out if this is an error or just something that needs to be documented.

JosePedroDias commented 5 months ago

I can relate to some of these issues for ldjam.

You can use Trunk.toml to override default behavior: https://trunkrs.dev/configuration/ https://github.com/trunk-rs/trunk/blob/main/Trunk.toml

example: https://github.com/JosePedroDias/ld55/blob/post-compo-improvements/Trunk.toml