pokefirered icon indicating copy to clipboard operation
pokefirered copied to clipboard

Add Docker build script

Open rpadaki opened this issue 2 years ago • 3 comments

Description

There was a lot of overhead and package installations for macOS/Windows, but I saw that it was much simpler to build these roms on Ubuntu. So I ended up writing a Dockerfile for myself to build https://github.com/pret/pokefirered, https://github.com/pret/pokeemerald, and the like!

This PR adds a script (with the Dockerfile baked in) which can cleanly build GBA pret projects.

To use the script, you can run in this directory:

./pret_gba_build.sh

To test it, say, on pokeemerald, you can either copy it over, or you can run:

./pret_gba_build.sh /path/to/pokeemerald

For more information, just run:

./pret_gba_build.sh --help

If we want to merge this script, it would have to be replicated for each GBA project. If that's too much overhead, then maybe I can just keep the script as a Gist or another repo and it can be linked to in INSTALL.md? Let me know your thoughts!

Issues

The main downside of building with Docker, especially on macOS and Windows without WSL2, are that things will be slow.

Other than that, there's some repeated steps here -- for example, for safety, I re-install agbcc into the project directory each time. Perhaps I should just check whether it's installed and up-to-date?

Lastly, building could be a little nicer.

  • There's currently no build output at all if the build is already up-to-date, meaning that it sort of hangs there silently before exiting successfully.
  • Commands like make clean can't be run from the container; they need to be run directly in your shell.

Maybe this shouldn't be merged, but still wanted to put it out there in case people find it useful.

rpadaki avatar May 15 '22 00:05 rpadaki

Wouldn't be just pokefirered this would be useful for

rawr51919 avatar Jun 17 '22 15:06 rawr51919

I actually just use this one script for all of them. When I want to build firered I do ./pret_gba_build.sh projects/pokefirered and when I want to build emerald I do ./pret_gba_build.sh projects/pokeemerald, but it's totally fine to just include it in all the repositories.

rpadaki avatar Jun 21 '22 01:06 rpadaki

That was likely the idea you originally had anyway from what I can tell

rawr51919 avatar Jun 21 '22 01:06 rawr51919