On 31-07-17 19:41, Fredderic U wrote:
On Thu, 27 Jul 2017 22:40:59 +0200, Mike Wey wrote:
I might be the wrong person to ask as i haven't written a sizable gtk(d)
application, and rarely use Windows. But structure it as any other project.Was wondering mostly, if there are any preferred location for additional resources for Glade and the likes. I never really used it much back in the old days, but I do recall it had some pesky resources mechanism for loading images and the likes, and was wondering if it had a preferred directory structure that would just make things simpler (going with a default path, vs. having to type the path in for every resource, type of thing).
On linux that would be /usr/share/appname/*.ui
but i don't think there
is a default on windows.
You might be able to use D's import feature in combination with addFromString
to embed the glade file in the binary.
Distributing a zip with a single exe might be troublesome as GtkD
expects to find the GTK libraries on your PATH.Well, I can include the GTK3 runtime in the zip. They can manage to double-click and install — except, the runtime seems to have vanished. (I eventually tracked it down, they installed it, and the demo works just fine.)
But, now it's all about some MSYS2 thing, that gave me a headache trying to figure out, and I'm still not sure I've got the full grasp on it. Anyone knows what that's all about, particularly in relation to GtkD/DUB? I'm just getting back into GTK after over a decade, plus a relatively new language on top. I'd rather not have to tackle a whole new build system if I can avoid it. lol
I think that 3.8 was the last GTK version that had an "official" windows
installer. After that is started building my own installer, first by
compiling GTK myself. But now i use the binaries from msys2 for the
installer.
The official way the install gtk on windows seems to be msys2 nowadays,
i don't know when that switch was made.
dub is probably the way to go, on windows you will run into a optlink
issue, https://issues.dlang.org/show_bug.cgi?id=15418 to get around that
pass--build=plain
to dub so it doesn't build a debug version, which
is the default for dub.That issue is still from 2015…? That is depressing. Otherwise, it works great. Thank You. And for the glade link, too.
And AFAIK no way to tell dub to build the plain version by default, at
least not by the project.