August 07, 2013
On 08.08.2013 00:03, JohnnyK wrote:>
> It looks to be unable to find the static libs now.  How do people use
> this library?  Do they work in the dwt folder and just use that build.d
> file to compile with?  Again I would like to know the layout of a
> typical programmers workstation that uses DWT for the GUI parts of their
> application?  Is anyone using DWT today?
> I appreciate all your help Jacob but I didn't think it would be this
> hard or take this long just to build and compile a program that just
> shows a window.  Has anyone ever tried to install D and DWT on a virgin
> machine then start a clean project to build a simple application like
> this before?  Maybe there is something I need to add to my PATH
> environment variable or something like that which would make this
> easier?  The command line is longer than the code I am trying to compile
> at this point.

DWT works fine for me at least.
Try the following:
cd /path/to/dwt
dmd build.d

build base

del .\imp\java\lang\util.di

copy  .\base\src\java\lang\util.d .\imp\java\lang\

build swt

del .\imp\org\eclipse\swt\internal\Library.di

copy .\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\Library.d .\imp\org\eclipse\swt\internal

then build your app using (win32):

dmd
-Ipath\to\dwt\imp
-Jpath\to\dwt\org.eclipse.swt.win32.win32.x86\res
path\to\dwt\lib\org.eclipse.swt.win32.win32.x86.lib
path\to\dwt\lib\olepro32.lib
path\to\dwt\lib\oleacc.lib
path\to\dwt\lib\usp10.lib
path\to\dwt\lib\msimg32.lib
path\to\dwt\lib\opengl32.lib
path\to\dwt\lib\shlwapi.lib
path\to\dwt\lib\dwt-base.lib
yourapp.d

may be you'll need to fix the paths I wrote - I think it won't be hard
August 08, 2013
On Wednesday, 7 August 2013 at 18:55:53 UTC, Druzhinin Alexandr wrote:
> On 08.08.2013 00:03, JohnnyK wrote:>
> > It looks to be unable to find the static libs now.  How do
> people use
> > this library?  Do they work in the dwt folder and just use
> that build.d
> > file to compile with?  Again I would like to know the layout
> of a
> > typical programmers workstation that uses DWT for the GUI
> parts of their
> > application?  Is anyone using DWT today?
> > I appreciate all your help Jacob but I didn't think it would
> be this
> > hard or take this long just to build and compile a program
> that just
> > shows a window.  Has anyone ever tried to install D and DWT
> on a virgin
> > machine then start a clean project to build a simple
> application like
> > this before?  Maybe there is something I need to add to my
> PATH
> > environment variable or something like that which would make
> this
> > easier?  The command line is longer than the code I am trying
> to compile
> > at this point.
>
> DWT works fine for me at least.
> Try the following:
> cd /path/to/dwt
> dmd build.d
>
> build base
>
> del .\imp\java\lang\util.di
>
> copy  .\base\src\java\lang\util.d .\imp\java\lang\
>
> build swt
>
> del .\imp\org\eclipse\swt\internal\Library.di
>
> copy .\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\Library.d .\imp\org\eclipse\swt\internal
>
> then build your app using (win32):
>
> dmd
> -Ipath\to\dwt\imp
> -Jpath\to\dwt\org.eclipse.swt.win32.win32.x86\res
> path\to\dwt\lib\org.eclipse.swt.win32.win32.x86.lib
> path\to\dwt\lib\olepro32.lib
> path\to\dwt\lib\oleacc.lib
> path\to\dwt\lib\usp10.lib
> path\to\dwt\lib\msimg32.lib
> path\to\dwt\lib\opengl32.lib
> path\to\dwt\lib\shlwapi.lib
> path\to\dwt\lib\dwt-base.lib
> yourapp.d
>
> may be you'll need to fix the paths I wrote - I think it won't be hard

I know DWT works because I am able to compile the base and I am able to compile the snippets as specified by the DWT Author's instructions.  Anyway thanks for the information but these are no where close to the instructions that the author of DWT said to follow.  I am a bit concerned about deleting and copying files around because I would like to be able to perform painless upgrades of DWT without trying to remember "Oh yeah I copied utils.d over here."  Or worse I go to perform these copies and those files are no longer called this or are just missing then what would I do?  Because I could not get the authors instructions to work tells me the author needs to be aware and needs to either fix the instructions or fix the layout of the distribution.  Maybe some part of the Base did not compile or something like that.  I have no idea it could be anything when you are trying to compile code on another machine from the one that the code was developed on.  I wish DWT was offered as a binary distro instead of source code.  Either way I would rather to always follow the instructions given to me by the author.  Now what I may do is try compiling with dmd directly instead of using rdmd, I was just not sure what libraries are required is all.
August 08, 2013
On Thursday, 8 August 2013 at 13:07:15 UTC, JohnnyK wrote:
Ok problem resolved.  I can now compile DWT applications from another directory structure outside of the dwt distribution directories.  Below is the commandline that I used and I did not have to delete or copy or follow any other compile instructions other than what the Author has in his Readme file.

dmd -IC:\GITClones\dwt\imp\ -JC:\GITClones\dwt\org.eclipse.swt.win32.win32.x86\res\ -m32 -op -od.\obj\ -of.\bin\hello.exe .\hello.d -L/SUBSYSTEM:WINDOWS:4.0 -L+advapi32.lib -L+comctl32.lib -L+comdlg32.lib -L+gdi32.lib -L+kernel32.lib -L+shell32.lib -L+ole32.lib -L+oleaut32.lib -L+olepro32.lib -L+oleacc.lib -L+user32.lib -L+usp10.lib -L+msimg32.lib -L+opengl32.lib -L+shlwapi.lib -L+dwt-base.lib -L+org.eclipse.swt.win32.win32.x86.lib -L+C:\GITClones\dwt\lib\

I copied most of that command line from the rsp file that is generated by build.d when compiling snippets.  I don't know if I need all these libs in here.

hello.d is as follows.

/* A Simple DWT window */
module main;

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

void main ()
{
    auto display = new Display;
    auto shell = new Shell;
    shell.open();

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

    display.dispose();
}

You will need to place hello.d in a directory of your choice and create a org and bin directory in the directory that hello.d is located.

Also if you wanted to use rdmd below is the commandline I was able to get working.

rdmd --build-only -IC:\GITClones\dwt\imp\ -JC:\GITClones\dwt\org.eclipse.swt.win32.win32.x86\res\ -L/SUBSYSTEM:WINDOWS:4.0 -L+advapi32.lib -L+comctl32.lib -L+comdlg32.lib -L+gdi32.lib -L+kernel32.lib -L+shell32.lib -L+ole32.lib -L+oleaut32.lib -L+olepro32.lib -L+oleacc.lib -L+user32.lib -L+usp10.lib -L+msimg32.lib -L+opengl32.lib -L+shlwapi.lib -L+dwt-base.lib -L+org.eclipse.swt.win32.win32.x86.lib -L+C:\GITClones\dwt\lib\ hello.d

Anyway I would like to determine just what libs are required and which ones are not needed unless dmd's linker is only going to link in the required libs?  Not sure how it's linker works maybe I will do some more reading on it now.

Again I want to thank everyone for their help on this and I think I am on my way to building some GUI's with DWT :)
August 08, 2013
On 2013-08-08 16:06, JohnnyK wrote:
> On Thursday, 8 August 2013 at 13:07:15 UTC, JohnnyK wrote:
> Ok problem resolved.  I can now compile DWT applications from another
> directory structure outside of the dwt distribution directories.  Below
> is the commandline that I used and I did not have to delete or copy or
> follow any other compile instructions other than what the Author has in
> his Readme file.

I have updated the readme file with instructions to build a Hello World application. It's actually just as easy to use DMD as RDMD. Sorry for all the confusion and inconvenience.

https://github.com/d-widget-toolkit/dwt#readme

-- 
/Jacob Carlborg
August 08, 2013
On Thursday, 8 August 2013 at 15:01:29 UTC, Jacob Carlborg wrote:
> On 2013-08-08 16:06, JohnnyK wrote:
>> On Thursday, 8 August 2013 at 13:07:15 UTC, JohnnyK wrote:
>> Ok problem resolved.  I can now compile DWT applications from another
>> directory structure outside of the dwt distribution directories.  Below
>> is the commandline that I used and I did not have to delete or copy or
>> follow any other compile instructions other than what the Author has in
>> his Readme file.
>
> I have updated the readme file with instructions to build a Hello World application. It's actually just as easy to use DMD as RDMD. Sorry for all the confusion and inconvenience.
>
> https://github.com/d-widget-toolkit/dwt#readme

That is so awesome thank you sir.  The commandline worked the first try.  I know most of the back and forth was due to my ignorance of D and DWT but with this little piece of information makes things so much quicker and easier to get started for us NOOB's.
August 19, 2013
What's the executable size?
August 20, 2013
On Monday, 19 August 2013 at 13:44:32 UTC, Kagamin wrote:
> What's the executable size?

This particular executable compiled to 2.7MB.  Most DWT Executables are between 2.3MB and 3MB.  I will say this the executables compress pretty good with the latest UPX exe compressor for windows.  With UPX the executable became 766KB in size so in the end it is below 1MB.
August 20, 2013
On 2013-08-20 15:31, JohnnyK wrote:

> This particular executable compiled to 2.7MB.  Most DWT Executables are
> between 2.3MB and 3MB.  I will say this the executables compress pretty
> good with the latest UPX exe compressor for windows.  With UPX the
> executable became 766KB in size so in the end it is below 1MB.

I'm guessing that most of DWT will always be pulled in when compiling. Hopefully that means that the executable won't grow that much when adding new code from DWT.

-- 
/Jacob Carlborg
August 21, 2013
On Tuesday, 20 August 2013 at 17:31:30 UTC, Jacob Carlborg wrote:
> On 2013-08-20 15:31, JohnnyK wrote:
>
>> This particular executable compiled to 2.7MB.  Most DWT Executables are
>> between 2.3MB and 3MB.  I will say this the executables compress pretty
>> good with the latest UPX exe compressor for windows.  With UPX the
>> executable became 766KB in size so in the end it is below 1MB.
>
> I'm guessing that most of DWT will always be pulled in when compiling. Hopefully that means that the executable won't grow that much when adding new code from DWT.

So far I have tried different things and I don't see the executables growing much.  Still this is by far less than having to deploy the GTK or some other GUI shared library.  Also you don't have to worry about updates to externals.  So when you compile an app with DWT that app will be the same today, tomorrow and forever.  You don't have to worry about a user upgrading their copy of the GTK or some other library and bang your app fails.  This is why I worked so hard and wanted to use DWT over GTKd or any of the others.  It's self contained.  Now I can build an app and send the executable and the user need only copy it to a directory and execute it.  Everything for the app can be in that one directory no externals beyond OS specific stuff.
  BTW I have tried several of the GUI libraries for D and I have only gotten GTKd and DWT to work successfully.  Out of the 2 I like DWT better because of the above mentioned reasons.  The GTK is just too big and complex to require people to install for a simple utility with a couple of controls to do some simple little thing.  Don't get me wrong GTKd works and very well once you get the correct GTK library installed properly.  Now this is specific to Windows.  Many Linux distros have GTK and most automatically install it when you install the OS.  I know nothing about MAC as that OS is not a target for me.
  The only other thing I am having issues with as far as DWT goes is these darn Layout things.  I understand what they are there for but I don't know if I like software moving my controls all over the window without me knowing that they are showing properly.  My only advice is when using the layout things once you put the control on the window don't move it or re-size it let the layout thing do that.  I have several times now made it where you could not see any controls on the screen because I messed up the layout things.  Sometimes the controls would be showing until the user maximizes or re-sizes the screen the window and then the controls would either change size hiding data or other controls messing up the display or totally disappear.  Anyway I suggest don't use them until you get more comfortable with DWT.  IMHO DWT gives you too much candy to choose from and you could end up with a belly ache if not careful.  I say keep things really simple to start.  At least that is what I am trying to do for now.  Anyway I am a happy DWT user for now.  Jacob thank you so much for all your hard work this library does the trick for me.
August 21, 2013
On 2013-08-21 18:39, JohnnyK wrote:

> Many Linux distros have GTK  and most automatically install it when
> you install the OS.  I know nothing about MAC as that OS is not a target for me.

Mac OS X uses it's on GUI system, it's not even using X. It was a while since I installed GTK on Windows but it has some problems on Mac OS X. Until quite recently you where forced to install X11 to have GTK work. Thankfully that's not required anymore. One thing I don't like with GTK and even more on Mac OS X is that it's not native. GTK applications look even more alien on Mac OS X because it has a couple of widgets and human interface guide lines that no other GUI system have. Unified toolbar, sheet dialogs, a fixed menu and so on.

But I'm working on porting DWT to Mac OS X, since it's my primary platform. I've been working on it for a couple of years now, that's how I started contributing to DWT. Everything compiles but not everything work. It's a time consuming work to try and find all things that don't work.

> The only other thing I am having issues with as far as DWT goes is
> these darn Layout things.  I understand what they are there for but I
> don't know if I like software moving my controls all over the window
> without me knowing that they are showing properly.  My only advice is
> when using the layout things once you put the control on the window
> don't move it or re-size it let the layout thing do that.  I have
> several times now made it where you could not see any controls on the
> screen because I messed up the layout things.  Sometimes the controls
> would be showing until the user maximizes or re-sizes the screen the
> window and then the controls would either change size hiding data or
> other controls messing up the display or totally disappear.  Anyway I
> suggest don't use them until you get more comfortable with DWT.  IMHO
> DWT gives you too much candy to choose from and you could end up with a
> belly ache if not careful.  I say keep things really simple to start.
> At least that is what I am trying to do for now.

I have to admit it was quite a while since I used DWT or SWT. But I have really started to like the layout system used on Mac OS X. There you just place the widget where you want it using the GUI builder. Then you tell it to how to resize it in relation to its super view. It works out quite nicely. I don't remember if it's possible to do in DWT.

> Anyway I am a happy
> DWT user for now.  Jacob thank you so much for all your hard work this
> library does the trick for me.

Thank you, I'm glad that someone is using it.

-- 
/Jacob Carlborg
1 2
Next ›   Last »