Community

Hi ,I am going to compiling DWT2 +tango 0998+rake.I have done below steps:
1.Download Tango0998+DMD1.041
2.Download dmc from:
http://www.digitalmars.com/d/2.0/dmd-windows.html
Up to now the D folder is as below:
c:\
----dmd\
----dm
3.Download and install ruby to C:\ from http://www.ruby-lang.org/en/downloads/
The version I chose is Ruby 1.8.6-one-click-installer
Now I have C:\ruby
4.Install rake:
In folder C:\ruby\bin:
>gem install --remote rake
Now in C:\ruby\bin I have rake.bat and rake.cmd;
5.Install TortoiseHg0.72 to c:\program files\ from below link:
http://bitbucket.org/tortoisehg/stable/wiki/Home
6.In c:\dmd\import there are two subfolders:C:\dmd\std and c:\dmd\tango. Create a new folder c:\dmd\import\dwt2;
7.Right from c:\dmd\import right click mouse tortoiseHG->Clone a Respository:
Source Path:http://hg.dsource.org/projects/dwt2
Destination Path:c:\dmd\import\dwt2
Leave the other options default.
OK.All above have been done without any error and HG proceeded completed and successfully.
What should I do in next step?Please guide me.Thanks.
Regards,
Sam

1.I also noticed that in C:\dm\lib there are 18 lib files where there are only 12 lib files in C:\dmd\lib.
2.Update:there is a typo regarding folder C:\dmd\import.All the D files in C drive is as below:
c:\
----dm\
----dmd\
----dmd\bin\
----dmd\lib\
----dmd\example\
----dmd\import\
----dmd\import\std\
----dmd\import\tango\
----dmd\import\dwt2--------Created by myself where dwt2 was downloaded to.

Hi Frank,
I compiled DWT2 successfuly base on your path/folders.But I have a couple of questions:
1.How do I compile my own d program which is not in the swtsnippets folder,say in anohter drive,D:\dprogram\ex?How is the command look like--rake ???
2.Is jface and other packages such as draw2d,core.job,core.runtime,jface.text,osgi,ui.forms,text,and tools compilable and workable at this moment,if yes,how to compile?
3.Is dssss still workable to compile DWT2 program?
Thanks and best regards,
Sam

Sam Hu schrieb:
> Hi Frank,
>
> I compiled DWT2 successfuly base on your path/folders.But I have a couple of questions:
> 1.How do I compile my own d program which is not in the swtsnippets folder,say in anohter drive,D:\dprogram\ex?How is the command look like--rake ???
If you compile your own app, you can use whatever build system you want.
> 2.Is jface and other packages such as draw2d,core.job,core.runtime,jface.text,osgi,ui.forms,text,and tools compilable and workable at this moment,if yes,how to compile?
Yes, you can show the other rake build targets with
> rake -T
> 3.Is dssss still workable to compile DWT2 program?
Yes, you can just put all those -I and -J and -L into the dsss.conf
But dwt2 is not to be build itself by dsss. And it is not installed into
dsss.

Hi Frank,
I re-built DWT2 with rake clean all and everything went smoothly and successfully;But when I tried to build a my own pragram (testDWT2.d)which is placed in the C:\TangoD\dwt2\org.eclipse.jface.snippets\EclipseJfaceSnippets\org\eclipse\jface\snippets\viewers folder with the command:rake jfacesnippets,it failed with below error:
C:\TangoD\dwt2>rake jfacesnippets
(in C:/TangoD/dwt2)
Building jfacesnippets[Snippet001TableViewer]
dmd.exe @C:\TangoD\dwt2\rsp
......
Building jfacesnippets[testDWT2]
dmd.exe @C:\TangoD\dwt2\rsp
ppets\testDWT2.d: module testDWT2 cannot read file 'ppets\testDWT2.d'
rake aborted!
compile error
C:/TangoD/dwt2/rakefile:274:in `buildApp'
(See full trace by running task with --trace)
I just have no idea how to compile my own program,although you have memtioned above,forgive me !
C:\TangoD\dwt2>
> > 3.Is dssss still workable to compile DWT2 program?
>
> Yes, you can just put all those -I and -J and -L into the dsss.conf
> But dwt2 is not to be build itself by dsss. And it is not installed into
> dsss.
>
I read the dsss document and referred to the dwt-sample dssss.conf file in the previous DWT,and then tried below:
My d folder now:
c:\tangoD
--------\dmd
--------\dwt2
--------\dsss
--------\dsss\bin
--------\dsss\lib
--------\dsss\include
1.Copy all dwt2 lib files into dsss\lib;
2.copy all dwt2 res files into dsss\lib\res;
3.copy all dwt2 imp files (that's \java folder and \org folder under dwt2\imp into dsss\include\d,dsss\include folder now looks like below:
--------\dsss\include\d\java
--------\dsss\include\d\org
4.In d:\dex where is my own d program files.Say,here is a d program name testDWT2.d;
5.write a dsss.conf and save in d:\dex,the content of d:\dex\dsss.conf is as below:
# DWT dwt-samples top-level dsss.conf
[*]
buildflags+=-g -gc
buildflags+=-J$LIB_PREFIX/res -Jres
version(Windows) {
# if no console window is wanted/needed use -version=gui
version(gui) {
buildflags+= -L/SUBSYSTEM:windows:5
} else {
buildflags+= -L/SUBSYSTEM:console:5
}
buildflags+= -L/rc:java
buildflags+= -L/rc:org
buildflags += -L"zlib;libbz2"
}
[testDWT2.d]
version(DwtAddons){
[jface]
type=subdir
}
6.when I compile with dsss build testDWT2.d,dozens of error msg :
D:\Laguage\Dex>dsss build testDWT2.d
testDWT2.d => testDWT2
+ c:\tangoD\dsss\bin\rebuild.exe -Idsss_imports\ -I. -S.\ -Ic:\tangoD\dsss\inclu
de\d -Sc:\tangoD\dsss\lib\ -Ic:\tangoD\dsss\include\d -Sc:\tangoD\dsss\lib -oq
dsss_objs\D testDWT2.d -oftestDWT2
c:/tangoD/dsss/bin\..\include\d\java\lang\util.di(296): Error: need -Jpath switc
h to import text file org.eclipse.swt.internal.SWTMessages.properties
c:/tangoD/dsss/bin\..\include\d\java\lang\util.di(296): Error: cannot evaluate o
pCall("","org.eclipse.swt.internal.SWTMessages.properties") at compile time
c:/tangoD/dsss/bin\..\include\d\java\lang\util.di(206): template instance java.l
ang.util.getImportData!("org.eclipse.swt.internal.SWTMessages.properties") error
instantiating
c:/tangoD/dsss/bin\..\include\d\org\eclipse\swt\internal\Compatibility.di(206):
Error: cannot evaluate opCall("","org.eclipse.swt.internal.SWTMessages.propertie
s") at compile time
Command c:\tangoD\dsss\bin\rebuild.exe returned with code 1, aborting.
Error: Command failed, aborting.
D:\Laguage\Dex>
This is all what I have done with dsss+tango+dwt2 but it seems just what a mess.So it would be grateful if you would like to write a simple step by step guideline the newbies like me to set up a working environment as quickly as possible.
Thanks and best regards,
Sam