MayaPosch / NymphCast

Audio and video casting system with support for custom applications.
http://nyanko.ws/nymphcast.php
BSD 3-Clause "New" or "Revised" License
2.43k stars 82 forks source link

NymphCast GUI fails to start due to failing to load fonts #52

Closed PureTryOut closed 2 years ago

PureTryOut commented 3 years ago
Aug 01 11:46:32 lvl2:   Loading fonts.
Aug 01 11:46:32 lvl2:   Adding fonts...
Aug 01 11:46:32 lvl2:   Failed loading resource /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf.
Aug 01 11:46:32 lvl2:   Failed loading resource /usr/share/fonts/truetype/freefont/FreeMono.ttf.
Aug 01 11:46:32 lvl2:   Failed loading resource /usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf.
Aug 01 11:46:32 lvl2:   Try loading resource :/opensans_hebrew_condensed_regular.ttf from: /home/bart/.emulationstation/resources/opensans_hebrew_condensed_regular.ttf
Aug 01 11:46:32 lvl2:   Try loading resource :/opensans_hebrew_condensed_regular.ttf from: /usr/bin/resources/opensans_hebrew_condensed_regular.ttf
Aug 01 11:46:32 lvl2:   Try loading resource :/opensans_hebrew_condensed_regular.ttf from: /home/bart/.local/var/pmbootstrap/cache_git/pmaports/resources/opensans_hebrew_condensed_regular.ttf
Aug 01 11:46:32 lvl2:   Failed loading resource :/opensans_hebrew_condensed_regular.ttf.
Assertion failed: !err (gui/core/resources/Font.cpp: FontFace: 21)
fish: Job 1, '/usr/bin/nymphcast_server -c /e…' terminated by signal SIGABRT (Abort)

This system does have a DejaVuSans.ttf but that's installed to /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf. I believe the location differs per distro, but it's always somewhere in /usr/share/fonts. It can't be relied upon to exist in a specific place inside there though.

MayaPosch commented 3 years ago

The resources were not being loaded properly from the local file. I have added a few changes so that these local fonts (in the NymphCast project folder) are also loaded.

This probably will have to be changed for distribution again.

PureTryOut commented 3 years ago

No luck, with the last command I get the same result.

MayaPosch commented 3 years ago

I have updated the code so that it supports having the resources folder (.emulationstation) in one of three locations:

  1. As the in-project folder when executing the binary in the format ./bin//nymphcast_server (default).
  2. In the home folder (~/.emulationstation). Used automatically when exists.
  3. As the location specified using a new CLI parameter (-r/--resources) passed to the server. This expects an .emulationstation folder to exist in that location.

I have tested the first two in a Ubuntu VM, and am able to load the GUI that way.

PureTryOut commented 3 years ago

Uh but where is that .emulationstation folder supposed to come from?

MayaPosch commented 3 years ago

It exists under src/server.

PureTryOut commented 3 years ago

Ah so distributions will need to install the somewhere then?

MayaPosch commented 3 years ago

Yes, I imagine it will have to be copied somewhere, much like the wallpapers folder and other resources.

I have updated the README accordingly. Please let me know if you need more information :)

PureTryOut commented 3 years ago

It seems I misunderstood the use-case for the standalone GUI thing. I guess this has to be used in combination with some software called emulation station?

MayaPosch commented 3 years ago

EmulationStation is a GUI which is also used by e.g. RetroPie. I used it as the basis for NymphCast's GUI, and am using it for displaying media shares and playing these back from media server instances.

The resource folder contains the graphics, configuration files, etc. for this GUI.

PureTryOut commented 3 years ago

Ok so in that case something is going wrong still. I can see the GUI coming up for a second but it then shuts down:

Aug 01 18:37:14 lvl0:   No systems found! Does at least one system have a game present? (check that extensions match!)
(Also, make sure you've updated your es_systems.cfg for XML!)
Failed to start the GUI. Aborting...
MayaPosch commented 3 years ago

If this is still an issue for you, could you please describe the steps taken before launching the server? The es_systems.cfg file mentioned is found in src/server/.emulationstation, which should be the default location where the server looks in GUI mode.

The log file lists the exact location where it looks. Please have a look at it, or post the entire log/email it so that I can take a look at it.

Thank you :)

MayaPosch commented 2 years ago

Closing this issue for now. Please create a new issue if needed.