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?
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
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?
- Set up the MonoGame source (existing documentation)
git clone https://github.com/MonoGame/MonoGame.git
git submodule init
git submodule update
mono Protobuild.exe on Mac/Linux)
- Open and build MonoGame.Framework.*.sln for each target platform AND development platform
- 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>
<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
- Add a reference in your platform-specific game projects to the corresponding platform-specific Framework project (or directly to the output dll)
- 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
- Reference the produced .mgcb file and develop your game as usual