Nitrokey / nitrokey-app

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

Compile and link resources to final executable #346

Closed comio closed 6 years ago

comio commented 6 years ago

The resources must be manually added to final executable in order to be built and liked.

ciao

luigi

comio commented 6 years ago

why failed?

comio commented 6 years ago

From the manual:

Should the target be processed with autorcc (for Qt projects).

AUTORCC is a boolean specifying whether CMake will handle the Qt rcc code generator automatically, i.e. without having to use the QT4_ADD_RESOURCES() or QT5_ADD_RESOURCES() macro. Currently Qt4 and Qt5 are supported.

When this property is ON, CMake will handle .qrc files added as target sources at build time and invoke rcc accordingly. This property is initialized by the value of the CMAKE_AUTORCC variable if it is set when a target is created.

I suppose that qt5_add_resources should be not used when autorcc is used because probably both touch some internal variable. On my system (gentoo based, qt 5.9.4, gcc 7.3, cmake 3.11.0) the effect is to haven't resources into final executable. Removing qt5_add_resources solved my issue.

ciao

luigi

szszszsz commented 6 years ago

Hi! Thank you for the PR! I will check and merge it until tomorrow's noon. Let me know if you would need that earlier. Diff and rationale looks valid.

comio commented 6 years ago

Hi @szszszsz (strange username lol)

I haven't the Pro key yet (out of stock) and I already sent a patch to gentoo in order to patch the sources on the fly. Said that... I can wait and you can merge tomorrow.

Of course, I tested the application on Gentoo only and I cannot give you any feedback on other platform (even if travis said that all is ok).

ciao

luigi

techge commented 6 years ago

This is indeed fixing the problem (which I had on Arch Linux as well). Thanks @comio ! EDIT: "The problem" is not having the new icons...

szszszsz commented 6 years ago

Sorry for delay. Merged, thank you!