Skip to content

Document how to build rgbds 1.0.2 from source on each OS #90

Description

@Rangi42

https://rgbds.gbdev.io/install has links for how to acquire our pre-built releases on Linux, macOS, and Windows. https://rgbds.gbdev.io/install/source has instructions to build from source, but assumes a Unix environment (since that's necessary for make and sudo make install to work) and doesn't explain how to install dependencies.

As of 1.0.2, we'll have better CMake support for all OSes, even Windows. Running cmake -S . -B build and then cmake --build build should Just Work, after you've installed the dependencies. I'd like if we provided separate instructions for each OS which provide better guidance on how to install those dependencies.

Note

On Windows, the dependencies are:

  • Visual Studio: Download and run the installer. When it asks which "workloads" you want to install, check the "Desktop development with C++" one.
  • Git for Windows: Download and run the installer. (This is necessary even if you're not acquiring the RGBDS source code with Git, since it comes bundled with bash and some other utilities that our install scripts need.)
  • CMake: Download and run the installer.
  • WinFlexBison: Download and extract the zip. Add the unzipped directory to the system PATH. (We already explain how to do that in the RGBDS Windows "None of these" install instructions (for if you're not using WSL or Cygwin/MSYS2). So we'd probably want to move those PATH instructions to their own separate page, which would be linked both for WinFlexBison and for RGBDS after building it.)

This has been tested to work even on Windows 7. (Although you then have to use some old versions: Visual Studio 2019, Git 2.45.2, and CMake 3.28.6.) You don't need a "Visual Studio developer command prompt", or a "Git Bash" terminal, an ordinary Windows command prompt will do.

Note that our current "build from source" instructions have separate tabs for "CMake 3.13 and later" and "CMake 3.12.4 and earlier", but the earliest CMake version that RGBDS 1.0.2 will support is CMake 3.241, so we'll be able to simplify that.

Footnotes

  1. CMake 3.24 was released in August 2022. That was to late for it to be included in Ubuntu 22.04 LTS, which ships with CMake 3.22.1. However, Ubuntu 24.04 LTS and 26.04 LTS are both available, and we don't need to worry about supporting three LTSes ago -- certainly we at least don't need our meant-for-beginners install instructions to have extra verbiage explaining how to deal with versions of CMake from 2019 and earlier.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions