View mode: basic / threaded / horizontal-split · Log in · Help
April 01, 2009
Need Help on Compiling DWT2 in XP
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
April 01, 2009
Re: Need Help on Compiling DWT2 in XP
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.
April 01, 2009
Re: Need Help on Compiling DWT2 in XP
Sam Hu schrieb:
> 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
> 

Hi

I have made changes to dwt2 to work it like the following receipt.

Download the tango release and dwt2 to
c:\Project\tango-0.99.8-bin-win32-dmd.1.041
c:\Project\dwt2

Then add dmd to the PATH
C:\Project> set PATH=%PATH%;c:\Project\tango-0.99.8-bin-win32-dmd.1.041\bin

Verify the dmd version
C:\Project> dmd
Digital Mars D Compiler v1.041
...

Then build the libs and snippets

C:\Project\dwt2> rake clean base swt
(in C:/Project/dwt2)
Cleaning
Building dwt-base
Building org.eclipse.swt.win32.win32.x86

C:\Project\dwt2> rake swtsnippets
Building swtsnippets[Snippet10]
Building swtsnippets[Snippet107]
Building swtsnippets[Snippet108]
Building swtsnippets[Snippet109]
Building swtsnippets[Snippet111]
...
(Cancel with Ctrl+C)
C:\Project\dwt2> bin\SwtSnippet10.exe

To build your own application...
Add the 'imp' dir to your import search path:
-IC:\Project\dwt2\imp
Add the 'lib' dir to your library search path:
-L+C:\Project\dwt2\lib\
Add all needed libraries to the commandline:
-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+zlib.lib
-L+dwt-base.lib
-L+org.eclipse.swt.win32.win32.x86.lib

Frank
April 01, 2009
Re: Need Help on Compiling DWT2 in XP
Add the 'imp' dir to your import search path:
> -IC:\Project\dwt2\imp
> Add the 'lib' dir to your library search path:
> -L+C:\Project\dwt2\lib\
> Add all needed libraries to the commandline:
> -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+zlib.lib
> -L+dwt-base.lib
> -L+org.eclipse.swt.win32.win32.x86.lib
> 
Any shorthand that can save this so long -I and -L everytime?Thanks.
April 01, 2009
Re: Need Help on Compiling DWT2 in XP
Sam Hu schrieb:
> Add the 'imp' dir to your import search path:
>> -IC:\Project\dwt2\imp
>> Add the 'lib' dir to your library search path:
>> -L+C:\Project\dwt2\lib\
>> Add all needed libraries to the commandline:
>> -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+zlib.lib
>> -L+dwt-base.lib
>> -L+org.eclipse.swt.win32.win32.x86.lib
>>
> Any shorthand that can save this so long -I and -L everytime?Thanks.

Yeah, it should be possible. I tried the pragma(lib, ..) but
unfortunately it seems to me, there is a dmd bug.

http://d.puremagic.com/issues/show_bug.cgi?id=2776

Frank
April 02, 2009
Re: Need Help on Compiling DWT2 in XP
Hi Frank,

Doe it work if we add these -I and -L into the sc.ini file?

Sam
April 02, 2009
Re: Need Help on Compiling DWT2 in XP
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
April 02, 2009
Re: Need Help on Compiling DWT2 in XP
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.
April 06, 2009
Re: Need Help on Compiling DWT2 in XP
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
April 07, 2009
****Resent**** Need Help on Compiling DWT2 in XP
Sam Hu Wrote:

> 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
> 
>
« First   ‹ Prev
1 2
Top | Discussion index | About this forum | D home