www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - GtkD 2.0 released, Gtk+ 3 with D.

reply Mike Wey <mike-wey example.com> writes:
GtkD is a D binding and OO wrapper of Gtk+ and is released on the LGPL
license.

With 2.0 GtkD will wrap Gtk+ version 3, if you need Gtk+ 2 you can use 
the latest version from the Gtk2 branch, version 1.6.

GtkD 2.0 and 1.6 are now available on GitHub:
https://github.com/gtkd-developers/GtkD/downloads

-- 
Mike Wey
Sep 09 2012
next sibling parent Jordi Sayol <g.sayol yahoo.es> writes:
Al 09/09/12 22:09, En/na Mike Wey ha escrit:
 GtkD is a D binding and OO wrapper of Gtk+ and is released on the LGPL
 license.
 
 With 2.0 GtkD will wrap Gtk+ version 3, if you need Gtk+ 2 you can use the
latest version from the Gtk2 branch, version 1.6.
 
 GtkD 2.0 and 1.6 are now available on GitHub:
 https://github.com/gtkd-developers/GtkD/downloads
 
Congratulations for this new GtkD release! -- Jordi Sayol
Sep 09 2012
prev sibling next sibling parent reply "nazriel" <spam dzfl.pl> writes:
On Sunday, 9 September 2012 at 20:08:05 UTC, Mike Wey wrote:
 GtkD is a D binding and OO wrapper of Gtk+ and is released on 
 the LGPL
 license.

 With 2.0 GtkD will wrap Gtk+ version 3, if you need Gtk+ 2 you 
 can use the latest version from the Gtk2 branch, version 1.6.

 GtkD 2.0 and 1.6 are now available on GitHub:
 https://github.com/gtkd-developers/GtkD/downloads
Very nice. Also big kudos for you Mike, for maintaining this project, that is the only one, fully working solution for GUI applications with D Anyways, for those who wonder how will Gtk3 apps look at Windows: http://blogs.gnome.org/alexl/2012/03/27/moar-windows-themes/ Also Windows binaries: http://www.tarnyko.net/?q=node/1 Best regards, Damian Ziemba
Sep 09 2012
next sibling parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Sun, 09 Sep 2012 22:56:08 +0200
"nazriel" <spam dzfl.pl> wrote:
 Anyways, for those who wonder how will Gtk3 apps look at Windows:
 http://blogs.gnome.org/alexl/2012/03/27/moar-windows-themes/
=20
Looks promising, but a couple comments from Alex have me concerned: "Classic mode is unfortunately not supported yet. It will need another CSS file." "Also, =E2=80=9Cnot really like windows=E2=80=9D is not really a good descr= iption. In the course of tweaking the theme I looked at a lot of apps and widgets in win32, and I there really is no singular =E2=80=9Cwindows=E2=80=9D look.= Even among the standard apps that ships with windows there are multiple looks for almost all widgets except the trivial ones (buttons, etc). Its really busted." Sounds like they're still merely trying to imitate the proper look & feel? I thought I had heard that GTK was finally going native with v3?
Sep 09 2012
parent reply Mike Wey <mike-wey example.com> writes:
On 09/09/2012 11:16 PM, Nick Sabalausky wrote:
 On Sun, 09 Sep 2012 22:56:08 +0200
 "nazriel" <spam dzfl.pl> wrote:
 Anyways, for those who wonder how will Gtk3 apps look at Windows:
 http://blogs.gnome.org/alexl/2012/03/27/moar-windows-themes/
Looks promising, but a couple comments from Alex have me concerned: "Classic mode is unfortunately not supported yet. It will need another CSS file." "Also, “not really like windows” is not really a good description. In the course of tweaking the theme I looked at a lot of apps and widgets in win32, and I there really is no singular “windows” look. Even among the standard apps that ships with windows there are multiple looks for almost all widgets except the trivial ones (buttons, etc). Its really busted." Sounds like they're still merely trying to imitate the proper look & feel? I thought I had heard that GTK was finally going native with v3?
As far as i know the custom windows theming engine is deprecated in favor of the css solution. -- Mike Wey
Sep 09 2012
parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Sun, 09 Sep 2012 23:34:26 +0200
Mike Wey <mike-wey example.com> wrote:
 
 As far as i know the custom windows theming engine is deprecated in 
 favor of the css solution.
 
Is that css solution still *a* theming engine, or am I misunderstanding it? Or I guess what I really mean is, does GTK3 at least have some way to say "just use native"? Because I had thought I heard GTK3 was supposed to be able to do that. I may have misunderstood though, I don't know.
Sep 09 2012
parent Mike Wey <mike-wey example.com> writes:
On 09/10/2012 12:14 AM, Nick Sabalausky wrote:
 Is that css solution still *a* theming engine, or am I misunderstanding
 it? Or I guess what I really mean is, does GTK3 at least have some way
 to say "just use native"? Because I had thought I heard GTK3 was
 supposed to be able to do that. I may have misunderstood though, I
 don't know.
There are some css extensions to access the windows theming API, but i don't know how far that go's. -- Mike Wey
Sep 10 2012
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 9/9/12, nazriel <spam dzfl.pl> wrote:
 Also Windows binaries:
 http://www.tarnyko.net/?q=node/1
For non-Frenchies: http://www.tarnyko.net/en/?q=node/1
Sep 09 2012
prev sibling next sibling parent Jacob Carlborg <doob me.com> writes:
On 2012-09-09 22:56, nazriel wrote:

 Also big kudos for you Mike, for maintaining this project, that is the
 only one, fully working solution for GUI applications with D
What about DWT? -- /Jacob Carlborg
Sep 09 2012
prev sibling next sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 9/10/12, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:
 http://www.tarnyko.net/en/?q=node/1
Btw for win32 users, GTK_BASEPATH needs to be set to wherever you've installed the runtime bundle (e.g. C:\Program Files\GTKRuntime-3.4.2). Don't let it install with the +- in the path because of an optlink bug: http://d.puremagic.com/issues/show_bug.cgi?id=8791 Also, this C:\Program Files\%gtkdir%\bin needs to be in PATH before everything else, because apparently the wrong DLLs get loaded otherwise. I don't understand what GTK_BASEPATH is for if it's not used properly.
Oct 12 2012
parent Mike Wey <mike-wey example.com> writes:
On 10/12/2012 03:24 PM, Andrej Mitrovic wrote:
 On 9/10/12, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:
 http://www.tarnyko.net/en/?q=node/1
Btw for win32 users, GTK_BASEPATH needs to be set to wherever you've installed the runtime bundle (e.g. C:\Program Files\GTKRuntime-3.4.2). Don't let it install with the +- in the path because of an optlink bug: http://d.puremagic.com/issues/show_bug.cgi?id=8791 Also, this C:\Program Files\%gtkdir%\bin needs to be in PATH before everything else, because apparently the wrong DLLs get loaded otherwise. I don't understand what GTK_BASEPATH is for if it's not used properly.
Normally GtkD searches for the dll in the default locations ( See Also: http://msdn.microsoft.com/en-us/library/ms682586(VS.85).aspx ), witch includes any directory listed in the PATH environment variable. The GTK_BASEPATH environment variable can be used to override this, when set GtkD searches for the dlls in that directory, and only that directory. So GTK_BASEPATH doesn't need to be set but when is it set, it does need to point to the correct location, some old Gtk+ 2.x installers used to set the GTK_BASEPATH variable. -- Mike Wey
Oct 12 2012
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 9/9/12, nazriel <spam dzfl.pl> wrote:
 Anyways, for those who wonder how will Gtk3 apps look at Windows:
 http://blogs.gnome.org/alexl/2012/03/27/moar-windows-themes/
Only with theming though, classic mode is not supported (yet). It does have some visual bugs. Text overflows buttons, the menu text isn't displayed properly (it needs to have inverted foreground when selected), checkboxes flash blue in the background when selected, spinbuttons aren't properly themed (they say it's on purpose), the file chooser is still GTK and the text input boxes don't seem to follow system settings when it comes to blink rate. Most of these are fixable I guess. Except the file picker which probably won't be replaced, but might be replaceable with system calls in custom user classes. Anyway it's not too shabby. It's great that we have a multiplatform library that's up to date. Thanks GtkD devs!
Oct 12 2012
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 10/12/12, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:
 Most of these are fixable I guess.
FWIW I've filed these to the GTK bugzilla.
Oct 12 2012
prev sibling next sibling parent reply Jordi Sayol <g.sayol yahoo.es> writes:
Al 12/10/12 15:38, En/na Andrej Mitrovic ha escrit:
 
 Anyway it's not too shabby. It's great that we have a multiplatform
 library that's up to date. Thanks GtkD devs!
 
You can say it in singular. There is only one active dev in GtkD project. Mike Wey. Many many thanks to him. -- Jordi Sayol
Oct 12 2012
parent reply Mike Wey <mike-wey example.com> writes:
On 10/12/2012 04:15 PM, Jordi Sayol wrote:
 Al 12/10/12 15:38, En/na Andrej Mitrovic ha escrit:
 Anyway it's not too shabby. It's great that we have a multiplatform
 library that's up to date. Thanks GtkD devs!
You can say it in singular. There is only one active dev in GtkD project. Mike Wey. Many many thanks to him.
I do seem to be getting more pull requests lately :) -- Mike Wey
Oct 12 2012
parent Russel Winder <russel winder.org.uk> writes:
Mike,

On Fri, 2012-10-12 at 22:25 +0200, Mike Wey wrote:
[=E2=80=A6]
 I do seem to be getting more pull requests lately :)
The GtkD README gives the distinct impression that DSSS is the only way of building GtkD and any projects using it. However, according to its own webpage, DSSS is a Dv1 system that cannot work with Dv2, which I guess indicates either a system with little future or a lack of maintenance of webpages. Certainly it ought to be feasible to create a C, C++, Fortran, D build system using D that could be far superior to Make, CMake, Autotools. As noted on the DSSS page integration with a unified package management system is a USP. Go has shown that this works very well by integrating GitHub, BitBucket and Launchpad as repositories, rather than using a special one a la CTAN, CPAN, Gems. Current I tend to build C, C++, Fortran, D using SCons or Waf, but if a reinvigorated and Dv2 compatible DSSS can compete and work with repositories on GitHub, BitBucket and Launchpad rather than just it's own repository, I am happy to make use of it. Alternatively if there is a description of how to build GtkD that doesn't involve installing DSSS I am happy to write a SCons build.=20 Thanks. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Oct 12 2012
prev sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 10/12/12, Jordi Sayol <g.sayol yahoo.es> wrote:
 You can say it in singular. There is only one active dev in GtkD project.
 Mike Wey. Many many thanks to him.
Wow, really? That's both amazing and worrying. We seem to have a lot of 1-man projects in D. Our bus factor is pretty low :p http://en.wikipedia.org/wiki/Bus_factor
Oct 12 2012
prev sibling next sibling parent reply "Andrea Fontana" <nospam example.com> writes:
On Sunday, 9 September 2012 at 20:08:05 UTC, Mike Wey wrote:
 GtkD is a D binding and OO wrapper of Gtk+ and is released on 
 the LGPL
 license.

 With 2.0 GtkD will wrap Gtk+ version 3, if you need Gtk+ 2 you 
 can use the latest version from the Gtk2 branch, version 1.6.

 GtkD 2.0 and 1.6 are now available on GitHub:
 https://github.com/gtkd-developers/GtkD/downloads
Maybe this wikipedia page is out of date: http://en.wikipedia.org/wiki/GTK%2B
Sep 10 2012
parent reply Mike Wey <mike-wey example.com> writes:
On 09/10/2012 09:28 AM, Andrea Fontana wrote:
 Maybe this wikipedia page is out of date:
 http://en.wikipedia.org/wiki/GTK%2B
Yes, it is. -- Mike Wey
Sep 10 2012
parent Andrea Fontana <nospam example.com> writes:
Let's update! Wikipedia is a good entry point :)

Il giorno lun, 10/09/2012 alle 19.26 +0200, Mike Wey ha scritto:

 On 09/10/2012 09:28 AM, Andrea Fontana wrote:
 Maybe this wikipedia page is out of date:
 http://en.wikipedia.org/wiki/GTK%2B
=20 Yes, it is. =20
Sep 11 2012
prev sibling next sibling parent reply Johannes Pfau <nospam example.com> writes:
Am Sun, 09 Sep 2012 22:09:33 +0200
schrieb Mike Wey <mike-wey example.com>:

 GtkD is a D binding and OO wrapper of Gtk+ and is released on the LGPL
 license.
 
 With 2.0 GtkD will wrap Gtk+ version 3, if you need Gtk+ 2 you can
 use the latest version from the Gtk2 branch, version 1.6.
 
 GtkD 2.0 and 1.6 are now available on GitHub:
 https://github.com/gtkd-developers/GtkD/downloads
 
Nice to see a GTK3 gtkd release! Also nice to see GTK Builder support. Is there a gtk builder example which shows how to connect signals? I guess connectSignalsFull should work, but it's a little cumbersome. Will connectSignals work? (I'd check this, but the github download isn't working) BTW: Will we get nicer documentation?
Sep 10 2012
parent reply Mike Wey <mike-wey example.com> writes:
On 09/10/2012 04:56 PM, Johannes Pfau wrote:
 Nice to see a GTK3 gtkd release!
 Also nice to see GTK Builder support. Is there a gtk builder example
 which shows how to connect signals? I guess connectSignalsFull should
 work, but it's a little cumbersome. Will connectSignals work?
connectSignals should work, one problem with both connectSignals and connectSignalsFull is that the functions need to be extern(C) and the parameters are the bare C Gtk structs and not the GtkD classes.
 (I'd check this, but the github download isn't working)
I've reuploaded the file, it seems to be working now.
 BTW: Will we get nicer documentation?
Not any time soon. -- Mike Wey
Sep 10 2012
parent Jacob Carlborg <doob me.com> writes:
On 2012-09-10 19:38, Mike Wey wrote:

 connectSignals should work, one problem with both connectSignals and
 connectSignalsFull is that the functions need to be extern(C) and the
 parameters are the bare C Gtk structs and not the GtkD classes.
I have no idea how these signals work in Gtk but should it be possible to create a template mixin that wraps a D method. The template would mixin an static extern(C) method that converts the Gtk structs to GtkD classes. I assume there's some way to pass an extra data parameter to a signal, this could contain an instance of a class. -- /Jacob Carlborg
Sep 10 2012
prev sibling parent reply "Mike James" <foo bar.com> writes:
 "Mike Wey"  wrote in message news:k2isv4$2r67$1 digitalmars.com...
 GtkD is a D binding and OO wrapper of Gtk+ and is released on the LGPL
 license.

 With 2.0 GtkD will wrap Gtk+ version 3, if you need Gtk+ 2 you can use the 
 latest version from the Gtk2 branch, version 1.6.

 GtkD 2.0 and 1.6 are now available on GitHub:
 https://github.com/gtkd-developers/GtkD/downloads

 -- 
 Mike Wey
Hi, I tried the install detailed on the github page and got the following error: C:\D\dmd2\gtkD2\src>dgen build\gtkD.d(612): Error: module SourceBuffer is in file 'gsv\SourceBuffer.d' wh ich cannot be read import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import Any clues as to the problem/solution? Regards, Mike.
Sep 26 2012
next sibling parent Mike Wey <mike-wey example.com> writes:
On 09/26/2012 08:49 PM, Mike James wrote:
 "Mike Wey"  wrote in message news:k2isv4$2r67$1 digitalmars.com...
 GtkD is a D binding and OO wrapper of Gtk+ and is released on the LGPL
 license.

 With 2.0 GtkD will wrap Gtk+ version 3, if you need Gtk+ 2 you can use
 the latest version from the Gtk2 branch, version 1.6.

 GtkD 2.0 and 1.6 are now available on GitHub:
 https://github.com/gtkd-developers/GtkD/downloads

 --
 Mike Wey
Hi, I tried the install detailed on the github page and got the following error: C:\D\dmd2\gtkD2\src>dgen build\gtkD.d(612): Error: module SourceBuffer is in file 'gsv\SourceBuffer.d' wh ich cannot be read import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import Any clues as to the problem/solution? Regards, Mike.
It looks like the dgen script posted on the wiki was never properly tested. for now you can remove src/build/GtkD.d it's only there for compiling with build/bud. -- Mike Wey
Sep 27 2012
prev sibling parent reply "Tommi" <tommitissari hotmail.com> writes:
On Wednesday, 26 September 2012 at 18:48:41 UTC, Mike James wrote:
 I tried the install detailed on the github page and got the 
 following error:


 C:\D\dmd2\gtkD2\src>dgen
 build\gtkD.d(612): Error: module SourceBuffer is in file 
 'gsv\SourceBuffer.d' wh
 ich cannot be read
 import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos
 import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
Using those same instructions... https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows ...I only manage to get this error (after ~10 seconds): D:\Documents\GitHub\GtkD\src>dgen.exe Fatal Error: Out of memory Even though Task Manager shows only negligible increase in memory.
Oct 03 2012
next sibling parent reply "JN" <666total wp.pl> writes:
Why does a Windows version require building anyway? Building 
stuff is for Linux people, because they love to hunt dependencies 
and stuff. On Windows you should be able to unzip an archive or 
use an installer and have two directories - include files and 
compiled .lib/.a/.dll libraries ready to include into your 
project. Trying to avoid it is just trouble, it takes a lot of 
time to compile any D library and even GDC has no binary 
releases, so that's another time spent on hunting libs.
Oct 04 2012
parent reply Mike Wey <mike-wey example.com> writes:
On 10/04/2012 01:05 PM, JN wrote:
 Why does a Windows version require building anyway? Building stuff is
 for Linux people, because they love to hunt dependencies and stuff. On
 Windows you should be able to unzip an archive or use an installer and
 have two directories - include files and compiled .lib/.a/.dll libraries
 ready to include into your project. Trying to avoid it is just trouble,
 it takes a lot of time to compile any D library and even GDC has no
 binary releases, so that's another time spent on hunting libs.
The library usually needs to be rebuild when there is e new conpiler release, And a library build with one D compiler cant be used with any of the other compilers. -- Mike Wey
Oct 04 2012
parent "nazriel" <spam dzfl.pl> writes:
On Thursday, 4 October 2012 at 21:25:09 UTC, Mike Wey wrote:
 On 10/04/2012 01:05 PM, JN wrote:
 Why does a Windows version require building anyway? Building 
 stuff is
 for Linux people, because they love to hunt dependencies and 
 stuff. On
 Windows you should be able to unzip an archive or use an 
 installer and
 have two directories - include files and compiled .lib/.a/.dll 
 libraries
 ready to include into your project. Trying to avoid it is just 
 trouble,
 it takes a lot of time to compile any D library and even GDC 
 has no
 binary releases, so that's another time spent on hunting libs.
The library usually needs to be rebuild when there is e new conpiler release, And a library build with one D compiler cant be used with any of the other compilers.
Yea it's damn PITA
Oct 06 2012
prev sibling next sibling parent Mike Wey <mike-wey example.com> writes:
On 10/04/2012 02:32 AM, Tommi wrote:
 On Wednesday, 26 September 2012 at 18:48:41 UTC, Mike James wrote:
 I tried the install detailed on the github page and got the following
 error:


 C:\D\dmd2\gtkD2\src>dgen
 build\gtkD.d(612): Error: module SourceBuffer is in file
 'gsv\SourceBuffer.d' wh
 ich cannot be read
 import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos
 import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
Using those same instructions... https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows ...I only manage to get this error (after ~10 seconds): D:\Documents\GitHub\GtkD\src>dgen.exe Fatal Error: Out of memory Even though Task Manager shows only negligible increase in memory.
I'll check and see if i can find out whats going on here in the weekend. -- Mike Wey
Oct 04 2012
prev sibling next sibling parent reply Mike Wey <mike-wey example.com> writes:
On 10/04/2012 02:32 AM, Tommi wrote:
 On Wednesday, 26 September 2012 at 18:48:41 UTC, Mike James wrote:
 I tried the install detailed on the github page and got the following
 error:


 C:\D\dmd2\gtkD2\src>dgen
 build\gtkD.d(612): Error: module SourceBuffer is in file
 'gsv\SourceBuffer.d' wh
 ich cannot be read
 import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos
 import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
Using those same instructions... https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows ...I only manage to get this error (after ~10 seconds): D:\Documents\GitHub\GtkD\src>dgen.exe Fatal Error: Out of memory Even though Task Manager shows only negligible increase in memory.
I seems that dmd runs out of memory when using the -lib switch with GtkD. I've updated the script posted on the wiki. -- Mike Wey
Oct 06 2012
parent "Tommi" <tommitissari hotmail.com> writes:
On Saturday, 6 October 2012 at 13:48:02 UTC, Mike Wey wrote:
 Using those same instructions...
 https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows
 ...I only manage to get this error (after ~10 seconds):

 D:\Documents\GitHub\GtkD\src>dgen.exe
 Fatal Error: Out of memory

 Even though Task Manager shows only negligible increase in 
 memory.
I seems that dmd runs out of memory when using the -lib switch with GtkD. I've updated the script posted on the wiki.
Works great, thanks!
Oct 07 2012
prev sibling next sibling parent Jordi Sayol <g.sayol yahoo.es> writes:
Al 04/10/12 02:32, En/na Tommi ha escrit:
 On Wednesday, 26 September 2012 at 18:48:41 UTC, Mike James wrote:
 I tried the install detailed on the github page and got the following error:


 C:\D\dmd2\gtkD2\src>dgen
 build\gtkD.d(612): Error: module SourceBuffer is in file 'gsv\SourceBuffer.d'
wh
 ich cannot be read
 import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos
 import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
Using those same instructions... https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows ...I only manage to get this error (after ~10 seconds): D:\Documents\GitHub\GtkD\src>dgen.exe Fatal Error: Out of memory Even though Task Manager shows only negligible increase in memory.
I got the same error in wine: "Fatal Error: Out of memory" I override it by compiling first to object files and then building the library: dgen.d: ---- import std.path; import std.file; import std.process; void main() { std.file.write("build.rf", listFiles(".d")); system("dmd -c -op build.rf"); std.file.write("build.rf", listFiles(".obj")); system("dmd -lib -ofGtkD build.rf"); std.file.remove("build.rf"); } string listFiles(string file_ext) { string files; auto entries = dirEntries("src", SpanMode.breadth); foreach(DirEntry entry; entries) { if(entry.isDir == false && entry.name.extension == file_ext) { files ~= entry.name ~ " "; } } return files; } ---- Compiling and executing from GtkD root directory. Now "GtkD.lib" is generated, and properly compiles gtkd programs: $ wine dmd.exe -L C:/D/dmd2/windows/lib/GtkD.lib HelloWorld.d BTW. What's the right way to add "-L C:/D/dmd2/windows/lib/GtkD.lib" to "sc.ini" file? Regards, -- Jordi Sayol
Oct 06 2012
prev sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 10/6/12, Jordi Sayol <g.sayol yahoo.es> wrote:
 BTW. What's the right way to add "-L C:/D/dmd2/windows/lib/GtkD.lib" to
 "sc.ini" file?
If you put that library in that folder there's a good change it will end up missing when installing/reinstalling DMD. Put it somewhere outside and use the -L+ switch when invoking DMD: dmd -L+C:\path\to\gtkdlib\ GtkD.lib app.d
Oct 06 2012