RonenNess / GeonBit.UI

UI system for MonoGame projects.
MIT License
467 stars 63 forks source link

Fix issues with building Content #122

Closed DavidFidge closed 2 years ago

DavidFidge commented 2 years ago

Move Content to GeonBit.UI.Examples and delete xcopy command in the csproj file which is broken when compiled with a fresh repository clone

Move exe icon to GeonBit.UI.Examples

Add GeonBit.UI.DataTypes.dll alongside the Content.mgcb file in GeonBit.UI.Examples. This is a workaround for MonoGame issue #6509: https://github.com/MonoGame/MonoGame/issues/6509

Delete unnecessary content and icon files in GeonBit.UI.DataTypes project

DavidFidge commented 2 years ago

@RonenNess if I clone your repo with your latest changes and try to build I get build errors. This pull request is an idea for you - feel free to reject and come up with your own. With the changes I've done here you are now able to clone the repo, set the Example project as the startup project, build and start without doing anything else.

I've moved Content from the GeonBit.UI project folder into GeonBit.UI.Examples. I feel that Content is really for the game's Content build, not the GeonBit.UI.dll project. You'd need to change your Manual instructions in the readme to change where to copy Content from. One future idea could be supplying it in a separate nuget package. Other third party themes could be created and supplied the same way.

MonoGame 3.8 currently has a bug in the content builder where it can only have references to .dlls that are underneath the folder that the .mgcb file lives in (refer to link in the pull request). Thus I've copied a Release build of GeonBit.UI.DataTypes into the Content folder to work around it. Once they fix the bug this workaround could be reverted.

I've done a few other minor cleanups like fix up the exe icon and delete unnecessary files.

RonenNess commented 2 years ago

Thanks @DireAussie