alamminsalo / orion

Cross platform Twitch.tv client
GNU General Public License v3.0
315 stars 60 forks source link

Fail with an error message when required QML modules are missing #242

Open rakslice opened 5 years ago

rakslice commented 5 years ago

Right now, if some QML module required for the GUI isn't present, orion runs but just doesn't show the GUI window. This is confusing to people trying to get orion working from source for the first time (for instance see discussion at #236).

Instead it would be better, if there is a fatal problem displaying the GUI window, to quit with an error message indicating this, and if possible what QML module was missing.

sum01 commented 5 years ago

I'm pretty sure #236 would be avoided by using Cmake's find_package(Qt5 COMPONENTS Qml REQUIRED) (ignoring other components for sake of brevity), so maybe Qmake has something similar?

Just trying to say that it's probably solvable at build-time, and can be ignored at run-time.

ahjolinna commented 5 years ago

~A reminder that Qt6 (planned for 2020) will move to Qbs, so if both don't have that feature (if required) maybe cmake would be better~ update : The Qt Company Decides To Deprecate The Qbs Build System, Will Focus On CMake & QMake

rakslice commented 5 years ago

lol, the QML modules don't need to be present at build time, they need to be present at runtime :P

sum01 commented 5 years ago

But I'm saying the issue would've been avoided if during the build process it throws an error about "missing Qml modules" or some such thing. Then you avoid running it and getting an error about missing modules.

I guess it's not a big deal either way, but I personally think it makes more sense as a build-time error.

roadriverrail commented 5 years ago

Just built/installed Orion for myself and ran into this exact problem. I'd have likely given up if I hadn't searched the existing issues and found #236 by sheer luck (and read the whole thing). I haven't worked in QML before, but I can imagine a large number of errors that might prevent the first window from showing. Is there some way to attach a "default error handler" to the app at initialization and, I don't know, pop up a system-wide error dialog for it? I'd imagine most desktop environments have an error reporting system. If nothing else, reporting the error message at the command line would have accelerated finding the issue, since I'd typed orion many times but not orion -d. The process doesn't halt when the module isn't available, so I know there's still code running in there.