Thread overview
Building DWT on Windows...
Oct 24, 2012
Adrien Tétar
Oct 24, 2012
Jacob Carlborg
Oct 25, 2012
Adrien Tétar
October 24, 2012
Hi,

I have pulled DWT from github repo.
https://github.com/d-widget-toolkit/dwt

Then I ran
rdmd build base swt

..and got the following log
Building dwt-base
workdir=>C:\Users\Adrien\Documents\GitHub\dwt\base\src
dmd.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp
lib.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp > C:\Users\Adrien\Documents\Gi
tHub\dwt\olog.txt
Building org.eclipse.swt.win32.win32.x86
workdir=>C:\Users\Adrien\Documents\GitHub\dwt\org.eclipse.swt.win32.win32.x86\sr
c
dmd.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp
lib.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp > C:\Users\Adrien\Documents\Gi
tHub\dwt\olog.txt

..but then I have no idea of what I should do.
Import libs from lib/ folder ?
...?

Thanks in advance for your help.
October 24, 2012
On 2012-10-24 17:04, "Adrien Tétar" <adri-from-59@hotmail.fr>" wrote:
> Hi,
>
> I have pulled DWT from github repo.
> https://github.com/d-widget-toolkit/dwt
>
> Then I ran
> rdmd build base swt
>
> ..and got the following log
> Building dwt-base
> workdir=>C:\Users\Adrien\Documents\GitHub\dwt\base\src
> dmd.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp
> lib.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp >
> C:\Users\Adrien\Documents\Gi
> tHub\dwt\olog.txt
> Building org.eclipse.swt.win32.win32.x86
> workdir=>C:\Users\Adrien\Documents\GitHub\dwt\org.eclipse.swt.win32.win32.x86\sr
>
> c
> dmd.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp
> lib.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp >
> C:\Users\Adrien\Documents\Gi
> tHub\dwt\olog.txt
>
> ..but then I have no idea of what I should do.
> Import libs from lib/ folder ?
> ...?
>
> Thanks in advance for your help.

Yeah, the build will create libraries in the "lib" folder. You can build the snippets with "rdmd build base swt swtsnippets". A hello world would look something like this:

module main;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

void main ()
{
    auto display = new Display;

    scope (exit)
        display.dispose;

    auto shell = new Shell;

    shell.setText = "asd";

    shell.open;

    while (!shell.isDisposed)
        if (!display.readAndDispatch)
            display.sleep;
}

dmd main.d -Iorg.eclipse.swt.win32.win32.x86/src -Ibase/src -J org.eclipse.swt.win32.win32.x86/res <libraries>

Link with these libraries:

https://github.com/d-widget-toolkit/dwt/blob/master/build.d#L92

Located in org.eclipse.swt.win32.win32.x86/lib.

I'm not really familiar with building on Windows, it was a while ago. You can also just build your application from source.

-- 
/Jacob Carlborg
October 25, 2012
Thank you! I will see if I can get it to work.