www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - vibe / how to use the Win32EventDriver ?

reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
When I build for Windows, it seems that the "libevent" driver is used. 
I can see that there is a "Win32EventDriver" which setups a GUI message 
loop as well. How can I use this driver instead of the "libevent" one?

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
Jan 07 2016
next sibling parent reply Daniel Kozak via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
V Thu, 7 Jan 2016 16:35:24 +0100
"Robert M. Münch via Digitalmars-d-learn"
<digitalmars-d-learn puremagic.com> napsáno:

 When I build for Windows, it seems that the "libevent" driver is
 used. I can see that there is a "Win32EventDriver" which setups a GUI
 message loop as well. How can I use this driver instead of the
 "libevent" one?
 
use subConfigurations in your dub file "dependencies": { "vibe-d": "version" }, "subConfigurations": { "vibe-d": "win32" }
Jan 07 2016
parent reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
On 2016-01-07 16:23:53 +0000, Daniel Kozak via Digitalmars-d-learn said:

 use subConfigurations in your dub file
 
 "dependencies": {
 		"vibe-d": "version"
 },
 "subConfigurations": {
 	"vibe-d": "win32"
 }
Well, that's what I do: "dependencies": { "vibe-d": "~>0.7.26" }, "versions": ["VibeCustomMain"], "subConfigurations": { "vide-d": "win32" } But this uses "libevent". -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Jan 07 2016
parent reply Daniel Kozak via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
I remember e few days I have same issue but with libasync. I have to 
remove .dub from my home directory (I do not know where is it in 
windows) and after making new project I was able to make it works

Dne 7.1.2016 v 19:23 Robert M. Münch via Digitalmars-d-learn napsal(a):
 On 2016-01-07 16:23:53 +0000, Daniel Kozak via Digitalmars-d-learn said:

 use subConfigurations in your dub file

 "dependencies": {
         "vibe-d": "version"
 },
 "subConfigurations": {
     "vibe-d": "win32"
 }
Well, that's what I do: "dependencies": { "vibe-d": "~>0.7.26" }, "versions": ["VibeCustomMain"], "subConfigurations": { "vide-d": "win32" } But this uses "libevent".
Jan 07 2016
parent =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
On 2016-01-07 20:14:15 +0000, Daniel Kozak via Digitalmars-d-learn said:

 I remember e few days I have same issue but with libasync. I have to 
 remove .dub from my home directory (I do not know where is it in 
 windows) and after making new project I was able to make it works
Just to be sure I understand you correctly. You have created a vibe project using DUB in directory different to your home directory and hat a .dub file in your home directory? Removing this helped? -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Jan 08 2016
prev sibling parent =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
On 2016-01-07 15:35:24 +0000, Robert M. Münch said:

 When I build for Windows, it seems that the "libevent" driver is used. 
 I can see that there is a "Win32EventDriver" which setups a GUI message 
 loop as well. How can I use this driver instead of the "libevent" one?
Ok, after fiddling around for quite some while, here is the workaround: 1. I made a copy of vibe to manually build the "win32" version using: dub -verison=win32 2. To compile it without errors, I had to comment quite some conflicting declarations and had to remove one ".ptr" 3. Spotting "By default, the first configuration that matches the target type and build platform is selected automatically..." in the DUB json docs i moved the "win32" configuration to the top. 4. Then building my actual project the my wanted configuration "win32" was used. So, I think DUB has a bug as the above rule can't be overwritten with: "subConfigurations": { "vide-d": "win32" } -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Jan 08 2016