gtkd-developers / GtkD

GtkD is a D binding and OO wrapper of GTK+ originally created by Antonio Monteiro
http://gtkd.org
Other
322 stars 71 forks source link

Provide GTK Windows runtime in .zip format for automated builds #268

Closed yatima1460 closed 5 years ago

yatima1460 commented 5 years ago

My big project using GtkD:

https://github.com/yatima1460/Drill

Build Status GitHub issues GitHub forks GitHub stars GitHub license

now works on Linux and it's almost working on OSX too.

I would like to build a Windows version on Travis too and dump the necessary GTK .dlls inside a portable zip with the executable and then maybe create an installer too.

The GTK runtime you provide on the website is the best one I've tried, can you provide a .zip version instead of the .exe installer? And if you built that GTK yourself, how did you do it?

Thanks

MikeWey commented 5 years ago

The current installer uses the binaries from msys2.

I'll see about creating the zip file, but i'll have to check if GtkD handles a GTK that is not in the PATH properly.

yatima1460 commented 5 years ago

I can confirm it works

I just dumped the 32-bit .dlls inside my executable folder that uses GtkD and the application started on Windows 10

(need to try the 64-bit)

The only bug is that some icons didn't appear, but that's normal because there is no theme installed

yatima1460 commented 5 years ago

Also if your website is not hosted on Github Pages I recommend to add the zip binaries here on GitHub Releases so me and other devs will not destroy your bandwidth

yatima1460 commented 5 years ago

Or we could setup a repository using Travis Windows to create them daily. (does Travis even support MSYS2)?

I am trying with vcpkg but Travis just crashes It seems MSBuild is badly installed/not installed even when they claim it's installed

https://github.com/yatima1460/GTK3-Windows-x64/blob/master/.travis.yml

yatima1460 commented 5 years ago

@MikeWey I found the best solution, forget your MSYS .dlls, vcpkg can build fresh GTK dlls now on Windows but you need to add support for it

yatima1460 commented 5 years ago

The current problem is that Loader.d can't find the .dlls even when they are renamed and put in the same folder of my executable

First it can't find libgdk-3-0.dll because vcpkg generates a different name, after renaming it, it loads the .dll but it needs libgtk-3-0.dll too but after renaming that too it doesn't work and continues to whine that libgtk-3-0.dll is missing even when it's in the same folder

yatima1460 commented 5 years ago

built them if you need them

https://github.com/yatima1460/GTK3-Windows-Binaries/releases/tag/3.22.19-2

MikeWey commented 5 years ago

Nice, did you sort out the naming issue with the dll's. It looks like that compared to the other platforms vcpkg doesn't include the so version in the dll name?

yatima1460 commented 5 years ago

Nope, can't understand why, I renamed both libraries but it can't find libgtk-3-0.dll even when it's in the same folder but can find libgdk-3-0.dll

object.Exception@GtkD-3.8.5\generated\gtkd\gtkd\Loader.d(125): Library load failed (libgtk-3-0.dll): The specified module could not be found.

The only reason I can think of is that vcpkg adds the name gtk-3.dll (original name coming out from vcpkg) as a #define somewhere inside the .dll too

Maybe I can try to rename these and if it works add a version(Windows) {}

https://github.com/gtkd-developers/GtkD/blob/5d99cc2062a1cd6e5112d77eb32c6546dc9a9eb0/src/gtkd/paths.d#L72

MikeWey commented 5 years ago

That would be because libgtk-3-0.dll depends on the other libraries which it can no longer find because they have been renamed.

For renaming the libraries you will need to change these:

https://github.com/gtkd-developers/GtkD/blob/master/generated/gtkd/gobject/c/functions.d#L32

They are in the same place for the other packages.

MikeWey commented 5 years ago

Does Travis support 7zip?

https://github.com/gtkd-developers/Gtk-Installer/releases/tag/v3.24.8

yatima1460 commented 5 years ago

Yes, Travis on Windows is Git Bash with 7zip already installed

And even if it wasn't there you could wget it! Or use choco to install it too

yatima1460 commented 5 years ago

Thanks

I will check if I can find a way to fix the vcpkg gtk

MikeWey commented 5 years ago

wingtk (#270) also uses different names for the gtk dll's so i'll update the generator to generate the different possibilities for Windows.