Jump to page: 1 2
Thread overview
Which is the active fork in DFL gui library ?
Nov 02, 2019
Vinod K Chandran
Nov 03, 2019
Mike Parker
Nov 03, 2019
Mike Parker
Nov 03, 2019
Vinod K Chandran
Nov 03, 2019
Jesse Phillips
Nov 03, 2019
Vinod K Chandran
Nov 03, 2019
Jesse Phillips
Nov 04, 2019
Vinod K Chandran
Nov 04, 2019
Jacob Carlborg
Nov 04, 2019
Vinod K Chandran
Nov 12, 2019
Orfeo
November 02, 2019
Hi all,
I just found that DFL gui library very interesting. But after some searching, i can see that DFL is inactive and there is few other forks for it. So this is my question - Which fork is good for a gui development in windows platform.
BTW, i just tested the gtkD and successfully compiled a hello app. How do i avoid the console window when compiling gtkD app ?
Thanks in advance.
November 03, 2019
On Saturday, 2 November 2019 at 20:01:27 UTC, Vinod K Chandran wrote:
> Hi all,
> I just found that DFL gui library very interesting. But after some searching, i can see that DFL is inactive and there is few other forks for it. So this is my question - Which fork is good for a gui development in windows platform.

DFL is a long, long dead library. It was created with D1. I'm unaware of any active fork.


> BTW, i just tested the gtkD and successfully compiled a hello app. How do i avoid the console window when compiling gtkD app ?
> Thanks in advance.

Any Windows executable compiled with a main function is by default considered a "console subsystem" application. You can specify to the linker that it should be a "windows subsystem" application (for which a console window will not be created) with a linker command line switch.

Assuming you're using DMD, when you're using the OPTLINK linker (which is the default when invoking DMD directly or when passing -m32, or the DUB switch -ax86), the switch is /SUBSYSTEM:WINDOWS. You can pass it on the DMD command line with -L, as in:

-L/SUBSYSTEM:WINDOWS

With the Microsoft linker (-m32mscoff or -m64 on the dmd command line, -ax86mscoff or -x86_64 with dub, or the default with recent 64-bit dub versions), it's the same switch. But you also need to specify the entry point as being main and not WinMain, so:

-L/SUBSYSTEM:WINDOWS -L/ENTRY:mainCRTStartup

When using dub, you can put the appropriate flags in a "dflags" entry in your dub.json or dub.sdl.

Here's an example, winhello.d, that should work with all of the following command lines:

dub -ax86 --single winhello.d
dub -ax86_mscoff --single winhello.d
dub -ax86_64 --single winhello.d

dmd -L/SUBSYSTEM:WINDOWS winhello.d
dmd -L/SUBSYSTEM:WINDOWS -L/ENTRY:mainCRTstartup -m32mscoff winhello.d
dmd -L/SUBSYSTEM:WINDOWS -L/ENTRY:mainCRTstartup -m64 winhello.d

If you don't have the Microsoft build tools installed, -m32mscoff and -m64 will use the lld linker that ships with DMD (if you chose to install it when you installed dmd). In that case, I'm not sure if the switches are the same. I've never used it and don't have it installed.
November 03, 2019
On Sunday, 3 November 2019 at 07:06:12 UTC, Mike Parker wrote:

>
> Here's an example, winhello.d, that should work with all of the following command lines:
>

Sorry, here's the example:

== winhello.d

/+ dub.sdl:
name "entry"
dflags "-L/SUBSYSTEM:WINDOWS" "-L/ENTRY:mainCRTStartup" platform="windows-dmd"
+/

import core.sys.windows.windows;
pragma(lib, "user32");

void main() {
    MessageBoxA(null, "Hello", "Hello", MB_OK);
}


November 03, 2019
On Saturday, 2 November 2019 at 20:01:27 UTC, Vinod K Chandran wrote:
> Hi all,
> I just found that DFL gui library very interesting. But after some searching, i can see that DFL is inactive and there is few other forks for it. So this is my question - Which fork is good for a gui development in windows platform.
> BTW, i just tested the gtkD and successfully compiled a hello app. How do i avoid the console window when compiling gtkD app ?
> Thanks in advance.

The last one I used was from rayerd. But even that is behind. I switched my app to dwt.

https://github.com/Rayerd/dfl
November 03, 2019
On Sunday, 3 November 2019 at 07:07:42 UTC, Mike Parker wrote:
> On Sunday, 3 November 2019 at 07:06:12 UTC, Mike Parker wrote:
>
>>
>> Here's an example, winhello.d, that should work with all of the following command lines:
>>
>
> Sorry, here's the example:
>
> == winhello.d
>
> /+ dub.sdl:
> name "entry"
> dflags "-L/SUBSYSTEM:WINDOWS" "-L/ENTRY:mainCRTStartup" platform="windows-dmd"
> +/
>
> import core.sys.windows.windows;
> pragma(lib, "user32");
>
> void main() {
>     MessageBoxA(null, "Hello", "Hello", MB_OK);
> }

@mike Parker,
Thank you for the detailed and helpful reply. I will sure try it.
November 03, 2019
On Sunday, 3 November 2019 at 14:01:03 UTC, Jesse Phillips wrote:
> On Saturday, 2 November 2019 at 20:01:27 UTC, Vinod K Chandran wrote:
>> Hi all,
>> I just found that DFL gui library very interesting. But after some searching, i can see that DFL is inactive and there is few other forks for it. So this is my question - Which fork is good for a gui development in windows platform.
>> BTW, i just tested the gtkD and successfully compiled a hello app. How do i avoid the console window when compiling gtkD app ?
>> Thanks in advance.
>
> The last one I used was from rayerd. But even that is behind. I switched my app to dwt.
>
> https://github.com/Rayerd/dfl

@Jesse Phillips,
Thank you for the reply.  Does DWT is built upon Java's SWT ? I heard that SWT is somewhat slower in windows. Anyhow, what about the easiness of DWT ? Actually, i just want to make GUI for Windows only. I dont need a cross platform GUI.
November 03, 2019
On Sunday, 3 November 2019 at 16:48:52 UTC, Vinod K Chandran wrote:
> On Sunday, 3 November 2019 at 14:01:03 UTC, Jesse Phillips
> 
>>
>> https://github.com/Rayerd/dfl
>
> @Jesse Phillips,
> Thank you for the reply.  Does DWT is built upon Java's SWT ? I heard that SWT is somewhat slower in windows. Anyhow, what about the easiness of DWT ? Actually, i just want to make GUI for Windows only. I dont need a cross platform GUI.

DTW is a translation of swt, I can speak to speed comparisons but I don't think you could apply anything out their related to comparing dfl and dwt.

You can write windows only apps in dwt, don't compile for Linux, it uses native drawing.
November 04, 2019
On 2019-11-03 17:48, Vinod K Chandran wrote:

> @Jesse Phillips,
> Thank you for the reply.  Does DWT is built upon Java's SWT ? 

Yes. It's a full translation of the Java code to D. No JNI, JVM or Java or remains.

> I heard that SWT is somewhat slower in windows.

I don't know if that's the case. Also I don't know if that's related to Java/JVM. And I don't know how SWT and DWT compares in speed.

> Anyhow, what about the easiness of DWT ?

There's no GUI builder for DWT, if you're interested in that. In theory you could use one for SWT and translate the Java code to D, but that might be more troublesome.

> Actually, i just want to make GUI for Windows only. I dont need a cross platform GUI.

DWT works on Windows and Linux. But you don't need to compile it for Linux if you don't want to.

-- 
/Jacob Carlborg
November 04, 2019
On Monday, 4 November 2019 at 19:29:22 UTC, Jacob Carlborg wrote:
> On 2019-11-03 17:48, Vinod K Chandran wrote:
>
>> [...]
>
> Yes. It's a full translation of the Java code to D. No JNI, JVM or Java or remains.
>
>> [...]
>
> I don't know if that's the case. Also I don't know if that's related to Java/JVM. And I don't know how SWT and DWT compares in speed.
>
>> [...]
>
> There's no GUI builder for DWT, if you're interested in that. In theory you could use one for SWT and translate the Java code to D, but that might be more troublesome.
>
>> [...]
>
> DWT works on Windows and Linux. But you don't need to compile it for Linux if you don't want to.

@Jacob Carlborg,
Thanks for the detailed reply. Let me try it. :)
November 04, 2019
On Sunday, 3 November 2019 at 23:25:40 UTC, Jesse Phillips wrote:
> On Sunday, 3 November 2019 at 16:48:52 UTC, Vinod K Chandran wrote:
>> On Sunday, 3 November 2019 at 14:01:03 UTC, Jesse Phillips
>> 
>>>
>>> https://github.com/Rayerd/dfl
>>
>> @Jesse Phillips,
>> Thank you for the reply.  Does DWT is built upon Java's SWT ? I heard that SWT is somewhat slower in windows. Anyhow, what about the easiness of DWT ? Actually, i just want to make GUI for Windows only. I dont need a cross platform GUI.
>
> DTW is a translation of swt, I can speak to speed comparisons but I don't think you could apply anything out their related to comparing dfl and dwt.
>
> You can write windows only apps in dwt, don't compile for Linux, it uses native drawing.

@Jesse Phillips,
Thanks a lot. :)
« First   ‹ Prev
1 2