shoes / shoes3

a tiny graphical app kit for ruby
http://walkabout.mvmanila.com
Other
181 stars 19 forks source link

Gtk3 Windows crashes for ask_color #209

Closed ccoupe closed 8 years ago

ccoupe commented 8 years ago

Found an error on Shoes/Windows/Gtk3 with gtk_color_chooser_dialog_new. It crashes. I strongly suspect this is a gtk bug - we aren't using a very current one on Windows. This affects Shoes 3.3.0 too so that tells us something about how many people use ask_color or run the samples/simple-dialog.rb

passenger94 commented 8 years ago

i confirm this (win7) looks like a bug in gtk_color_chooser_dialog_new, it crashes straight with no helpful backtrace, even in it's simplest form gtk_color_chooser_dialog_new(NULL, NULL) and nothing more in shoes_dialog_color ! Maybe a gtk upgrade (ouch !!!) ? (alternative would be a custom chooser dialog, hoping color chooser widget is not the faulty ....)

Works on Linux

ccoupe commented 8 years ago

I'm trying to build a newer gtk3 for Windows. The newer ones like 3.10.9 have a well known but never fixed issue https://bugzilla.gnome.org/show_bug.cgi?id=700445. I was never any good at applying patch files and that one is a problem (for me). I can do it by hand.

Because you asked once , the .pc files that reference ~/Projects/shoesdeps/mingw are used to build all those dependencies. So if they came from cross compiling (they did) then when building something like a new gtk, it has to be cross compiled.

passenger94 commented 8 years ago

ok, thanks :-) Let's hope it'll be as boisterous as a smooth sunny sunday afternoon lazy stroll

ccoupe commented 8 years ago

That patch file actually worked for 3.10.9 (but not for 3.12.2) which allowed me to get to the next problem - it creates an extract-string app on the build system but of course it uses windows libs so that fails. There appear to be env variables that should work for this but they don't. If you think Shoes rakefiles are confusing, take a look at gtk3.

I also considered building all dependencies on Windows natively. I learned (or relearned) that the msys included in devkit is different from a normal msys install and comes with some interesting problems of it's own. It's a newer gcc 4.9.x, we'd have to build Ruby from source - not too big an issue plus all the dependencies for it and all those dlls for Shoes. It's something that needs to be done just to show/document how to do it. It's also pretty low on the fun list.

passenger94 commented 8 years ago

It's also pretty low on the fun list

:-D !!! You still find enough resources for some persiflage, all is possible !!! Damn, pretty Homeric for a stroll !

ccoupe commented 8 years ago

With some hacking, I managed to get Gtk 3.10.9 cross compiled, built Shoes and ..... win7-color

I'm not going to close the issue just yet because there one of the hacks is a hack and I'd like to do better. Perhaps apply them to gtk 3.1.4.9 and give that a try. Or may 3.16 or 3.18 which would put windows well ahead most linux distro's Gtk versions. And then create and upload a modified mingw.tar.gz

ccoupe commented 8 years ago

100MB of dependencies at http://shoes.mvmanila.com/public/shoesdeps/mingw/ming-Shoes-3.3.1.gz BE CAREFUL - the top dir inside is 'mingw'

passenger94 commented 8 years ago

:+1: Do i need 7 zip to open the internal ming-Shoes-3.3.1 file ?

ccoupe commented 8 years ago

Probably. It's tar.gz .

more correctly it came from tar zcf ming-Shoes.3.3.1.gz ming

passenger94 commented 8 years ago

ok downloaded it again, (the link above is wrong now), it's http://shoes.mvmanila.com/public/shoesdeps/mingw/ming-Shoes-3.3.1.tar.gz compiled and works fine now ! congrats

Btw i had to change libpng to libpng16 again in cairo.pc, can't compile on my system otherwise

Is there a way to make gtk prettier on windows ?

ccoupe commented 8 years ago

That png.pc error might be a good reason to see what happens with a new set of deps.

Check if there is a gtk-demo.exe in minw/bin - interesting program I wish It was installed on linux. There's some other exe's in their that might be worth exploring too.

ccoupe commented 8 years ago

Is there a way to make gtk prettier on windows ?

The Shoes download includes a theme (or maybe two) so there is a lot that could be done, either to the default - we had to fix a font setting already. There are many things that could be done.

Of course, Cobbler should have buttons to download and switch themes. Damn thing will be larger than the manual if we add the missing features to Cobbler.