Nitrokey / nitrokey-app

Nitrokey's Application (Win, Linux, Mac)
https://www.nitrokey.com/
288 stars 55 forks source link

qt.svg: Cannot open file ':/images/new/*', because: No such file or director #345

Closed comio closed 6 years ago

comio commented 6 years ago

Hi,

I know that Gentoo is not your first development platform, but I would like ask your help in order to discover and fix the following issue. I build from scratch the nitrpokey-app v1.3 using Gentoo provided ebuild (with some minor fix). The created binary doesn't show any icon and also clicking on "Licences and 3rd-party components" no window is shown.

I have the strange messages "qt.svg Cannot open...." as reported in the following.

I admit that QT is not my friend and I don't known what can be wrong in my setup. My idea is that, for some strange reason, the embedded resources are been ripped from binary, but I still haven't found any fix.

Can you give any suggestion to understand and solve this issue?

Thanks in advance,

luigi

Expected behaviour

nitrokey-app should use internal qt.svg resources to display icons and other resources.

Current behaviour

Console shows :

QSystemTrayIcon::setVisible: No Icon set
qt.svg: Cannot open file ':/images/new/icon_NK.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_NK.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_NK.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_NK.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_NK.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_NK.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_NK.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_safe.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_safe.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_harddrive.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_harddrive.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_fragezeichen.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_fragezeichen.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_quit.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/new/icon_quit.svg', because: No such file or directory
szszszsz commented 6 years ago

Hi! If it is on download site, then it is supported - no need to worry! Sometimes it is harder to get there due to the overall platform count (11 ways to use the binary on the sole download page! and I could count 2-3 more).

Back to the topic, in v1.3 we use new Qt's library, which is responsible for rendering SVG images. So make sure you have qt5svg or libqt5-svg installed (or other, similar names). Secondly, App is using (should use) internal resources (see path starting from semicolon, like :/images/new/icon_quit.svg). Lack of 3rd party window might suggest indeed some issues with the resources. Perhaps building from the source would help? It could be done with both CMake and QMake. If one would not help, maybe another? Details are in the README.md file. Please try it instead of Gentoo's way and let me know, how it went.

comio commented 6 years ago

Ok. Your CMakeList.txt must be fixed.

The resource file is not compiled. I will send a PR soon.

Solution: remove qt_add_resources() call because you are using AUTRCC flag.

comio commented 6 years ago

See PR #346

ciao

luigi

comio commented 6 years ago

solved by #346 (already merged)