hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.03k stars 172 forks source link

Properly fail on missing data folder #1831

Closed theGreatWhiteShark closed 1 year ago

theGreatWhiteShark commented 1 year ago

In case neither data folder at system nor at user level is present, Hydrogen is pretty useless. However, there is no indication (apart from log messages) what is going wrong. Especially for first-day users requiring to inspect the logs is a little bit much.

Instead, Hydrogen does check now whether the hydrogen.conf file exists on system and user level and returns with code 1 instead of starting up in case none of the two could be found. It also shows a critical pop dialogs stating "No [hydrogen.conf] file found. Hydrogen was not installed properly. Aborting...".

On the other hand, I also do not want to restrict usage too much. In addition to aborting, Hydrogen writes a new preferences file at user level too. This way the popup + exit will just occur once.

In case no drumkits are present (e.g. a first run of Hydrogen with its data folder not properly installed on system level) Song does not contain any components. The InstrumentEditor needs to take this into account. Previously it segfaulted.