Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra steps for Linux necessary for Windows too #125

Open
dclipca opened this issue Mar 15, 2022 · 3 comments
Open

Extra steps for Linux necessary for Windows too #125

dclipca opened this issue Mar 15, 2022 · 3 comments

Comments

@dclipca
Copy link

dclipca commented Mar 15, 2022

Is this expected for the latest version? I.e. had to perform both steps:


1. After installing the fonts from GeonBit.UI.Examples/Content/Fonts/, you also need to copy the font files into the folder where the spritefont files reside (e.g. Content/GeonBit.UI/themes/<team-name>/fonts/).
2. Since at this time MonoGame can't build effects on Linux, you need to use a pre-compiled effects. Take the built effects from Content/BuiltEffects/ and put them instead of the .fx files of your theme (e.g. Content/GeonBit.UI/themes/<team-name>/effects/). Also change their 'Build Action' from 'Build' to 'Copy'.

@DavidFidge
Copy link
Contributor

DavidFidge commented Mar 15, 2022

For fonts on Windows I've found you don't have to 'install' the font. However the .ttf MUST be in the same directory as the .spritefont file (this became a requirement in one of the latest versions of MonoGame).

For effects, I have my Content.mgcb configured to build the effect file and in Visual Studio I have the build action set to "None" and "Do not copy":

#begin GeonBit.UI/themes/mytheme/effects/disabled.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:GeonBit.UI/themes/mytheme/effects/disabled.fx

Be warned that GeonBit UI references MonoGame DesktopGL, so if you are using WindowsDX in your own project then you need to manually Git Clone GeonBit and change it to WindowsDX, then use a project reference rather than NuGet. If you don't do this then you get build errors saying that it could not compile the effect files. Refer to my answer at https://community.monogame.net/t/duplicate-solved-this-mgfx-effect-was-built-for-a-different-platform/11640.

@RonenNess
Copy link
Owner

Thanks for the info @DavidFidge , probably some things changed in latest MG versions.

@DavidFidge
Copy link
Contributor

PR #139 addresses this by building content from the ttf directly rather than relying on installed fonts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants