vi / trafficlighticon

Simple QT application that shows traffic light icon in systray based on stdin commands
MIT License
1 stars 0 forks source link

Could you make a Windows release? #1

Open gd4c opened 3 years ago

gd4c commented 3 years ago

Also, custom colors based on user-determined stdin would be nice .

Thanks

vi commented 3 years ago

Could you make a Windows release?

How do I cross-compile Qt applications from Linux to Windows?

Is there some e.g. Docker image that just does that?

custom colors based on user-determined stdin would be nice .

Currently it just contains four crude png images. Custom colours would require actually implementing drawing things in the code.

gd4c commented 3 years ago

If I knew, I would have built it myself! 😳 However, if I understand correctly, QT is cross-platform and very easy to port.

Currently it just contains four crude png images. Custom colours would require actually implementing drawing things in the code.

It would be nice, but it is up to you.

vi commented 3 years ago

Is it in general a good idea to build Windows GUI apps and release them without having a Windows nearby to test?

(I do that for Rust-based CLI apps and it typically works. But for GUI things it may be different).

gd4c commented 3 years ago

Generally, no. It is always a good idea to test first.

But, as long as your app doesn't interface with low-level features and hardware, I think you should be fine simply testing in a VM.

vi commented 3 years ago

Found a Docker image to build Qt apps for Windows, tried it: https://github.com/vi/trafficlighticon/releases/download/v0.1.0/trafficlighticon.exe

Does it work for you?

Note that you need to bring your own Qt and Mingw dlls.

gd4c commented 3 years ago

It gives this error: The procedure entry point _Z21qRegisterResourceDataiPKhS0_S0_ could not be located in the dynamic link library <path>\trafficlighticon.exe.

All DLLs are 64-bit and recent ( > 2020-09).

vi commented 3 years ago

Are Qt dlls you used compatible with each other?

Maybe try Qt5 dlls from around 2018?

gd4c commented 3 years ago

Same thing.

I noticed it complains about something in the executable itself rather than the DLLs

vi commented 3 years ago

Another attempt: https://github.com/vi/trafficlighticon/releases/download/v0.1.0/trafficlighticon_static.exe

It starts in Wine and shows the icon. But changing the state based on stdin commands does not work for some reason (icon just disappears). I don't know whether it is because of Wine or because of the bug in the program itself.

gd4c commented 3 years ago

I can confirm the same behavior: Icon appearing (without a color) then closes immediately. Windows has a long-standing bug where if an app crashes, its tray icon won't disappear until you hover over it with the cursor. Don't depend on it to monitor app status.