Starting from Source without Installer

I love all that MonoGame has to offer, but I’m surprised to see such great open source software without any mention of how to start from the source without using a pre-built/self-built installer. Certainly you might lose out on a few features, but I think this could be useful for those of us that prefer to build the entire system from scratch. Is there something like this already out there?

Pros:

  1. Ability to modify any part of the content pipeline tools (MGCB and Pipeline) and MonoGame framework
  2. Stay up to date with the latest commits or cherry-pick from other branches or forks

Cons:

  1. Can’t automatically open .mgcb files in the Pipeline app (although this can be manually set up)
  2. Templates/projects can’t reference the frameworks from their installed locations (as is true when modifying the framework source in any case)

This is the set of steps that I’ve figured out from various posts and documentation so far. Is there anything else that’s required, and are there any additional pros or cons?

  1. Set up the MonoGame source (existing documentation)
    a. git clone https://github.com/MonoGame/MonoGame.git
    b. cd MonoGame
    c. git submodule init
    d. git submodule update
    e. Run Protobuild.exe (mono Protobuild.exe on Mac/Linux)
  2. Open and build MonoGame.Framework.*.sln for each target platform AND development platform
  3. Set up the targets file for using the MonoGameContentReference build action.
    a. In MonoGame/MonoGame.Framework.Content.Pipeline, duplicate (so as to not break the version the installer uses) MonoGame.Content.Builder.targets and name it MonoGame.Content.Builder.Dev.targets
    b. Update MonoGameContentBuilderExe in MonoGame.Content.Builder.Dev.targets to point to the output of your development-platform-specific MGCB.<platform> build. For example, to use the Release build of MGCB.exe from any development platform, change the following line from:
    <MonoGameContentBuilderExe Condition="'$(MonoGameContentBuilderExe)' == ''">$(MSBuildThisFileDirectory)Tools\MGCB.exe</MonoGameContentBuilderExe>
    to:
    <MonoGameContentBuilderExe Condition="'$(MonoGameContentBuilderExe)' == ''">$(MSBuildThisFileDirectory)\..\Tools\MGCB\bin\**\Release\MGCB.exe</MonoGameContentBuilderExe>
    c. Add a reference in your platform-specific game projects to the MonoGame.Content.Builder.Dev.targets
  4. Add a reference in your platform-specific game projects to the corresponding platform-specific Framework project (or directly to the output dll)
  5. Run the Pipeline application to manage MonoGame content from MonoGame/Tools/MGCB/bin. For example on a Mac this could be MonoGame/Tools/Pipeline/bin/MacOS/AnyCPU/Release/Pipeline.app
  6. Reference the produced .mgcb file and develop your game as usual

Instructions are in the docs and in the README on the GitHub repo.

Ahh thanks. I guess really what I was looking for was that “high level breakdown” in the readme, which I must have overlooked.

Just to clarify, my frustration was that the last step of building from source in the docs was to download and use the installer.