ArthurSonzogni / rgb-tui

Create and get colors code from the terminal using a nice interface.
MIT License
80 stars 6 forks source link

App building but not working on PowerPC: GUI is “frozen” #6

Closed barracuda156 closed 1 month ago

barracuda156 commented 1 month ago

@ArthurSonzogni I built the same app (v. 1.1) on Sonoma aarch64 and Snow Leopard ppc, and in the latter case GUI is unresponsive (static, as on the screenshot below). There are no crashes or errors displayed.

Any idea what can I try to have it fixed?

rgb-tui

ArthurSonzogni commented 1 month ago

I upgraded FTXUI version: Could you please check if this improves something?

Does GDB reports a stack trace when trying to interrupt it?

barracuda156 commented 1 month ago

@ArthurSonzogni Turned out I somewhat mischaracterized the situation. GUI is not dead, it is just not responding to clicks on it (as it does on Sonoma). From keyboard I was able to move sliders, and colors change. Does not look overly usable still due to how colors are displayed, but it is not broken, as I thought initially.

rgb2

barracuda156 commented 1 month ago

P. S. I actually used FTXUI lib which we have it MacPorts: https://github.com/macports/macports-ports/blob/cf2aa331b84e43ab897c546f2e1896d13cb4c668/graphics/rgb-tui/Portfile

Could you make a new release of FTXUI, maybe v. 5.0.1? MacPorts folks do not like commit-based versions, especially when the port already used a release.

ArthurSonzogni commented 1 month ago

The terminal should advertise itself as supporting 256 colors, otherwise, FTXUI will fallback toward the "closest" color available.

This can be done with:

export TERM=xterm-256color

or

export COLORTERM=truecolor

Does this appears to be good enough for you? I can also "force" FTXUI to output the true colors, but users of incompatible terminal will see some black colors instead of the fallback ones.

Could you make a new release of FTXUI, maybe v. 5.0.1? MacPorts folks do not like commit-based versions, especially when the port already used a release.

The next version will be 6.0.0. I would like to avoid introducing a new breaking release too often. Why do you need a new version in MadcPorts?

barracuda156 commented 1 month ago

@ArthurSonzogni If 5.0.0 is good enough for all apps which use it, no need to introduce anything. I just thought that update you mentioned implied an update to FTXUI itself.

Env variables should be good, perhaps rather not force any specific setting for all users. I will try setting colors once back to the PowerMac.

Support for mouse events is something SDK-related, so it won’t work on earlier OS? No big deal, just to confirm.

barracuda156 commented 1 month ago

@ArthurSonzogni Setting either of env variables makes it looks really strange for me :)

This is with truecolor: rgb-tui_truecolor

ArthurSonzogni commented 1 month ago

Your terminal probably doesn't support true colors. That's why it doesn't set those variable. That's why FTXUi fallback toward the "closest" supported colors.

Does it make sense?

barracuda156 commented 1 month ago

Your terminal probably doesn't support true colors. That's why it doesn't set those variable. That's why FTXUi fallback toward the "closest" supported colors.

Does it make sense?

Oh okay, looks like Apple Terminal had no true color up to very recently (or maybe still does not have it): https://stackoverflow.com/questions/6403744/are-there-terminals-that-support-true-color Then no surprise, indeed.

I will look for some feasible alternative, I want to see how it works at least.

barracuda156 commented 1 month ago

@ArthurSonzogni I can confirm it works in vte:

rgb-tui_vte

Sorry for the false alarm, there is no problem on rgb-tui side at all.