-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved all top level files to the dwt directory.
- Loading branch information
0 parents
commit 287c657
Showing
10 changed files
with
686 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
=== DWT2 === | ||
|
||
* The original Eclipse sources: | ||
http://dev.eclipse.org/viewcvs/ | ||
|
||
* Requirements for D1+Tango: | ||
DMD 1.041 | ||
Tango 0.99.8 is needed. | ||
* Requirements for D2+Phobos: | ||
DMD 2.026 | ||
* Required build tool: | ||
Rake 0.8.X ( included in Ruby 1.9 ) | ||
|
||
The sc.ini/dmd.conf of the DMD in the PATH needs to have all | ||
necessary parameters to build a application with the std lib. | ||
|
||
E.g. for Tango it can look like this: | ||
[Environment] | ||
LINKCMD=%@P%\link.exe | ||
LIB="%@P%\..\..\..\..\tango\lib" | ||
DFLAGS="-I%@P%\..\..\..\..\tango" -version=Tango -defaultlib=tango-base-dmd.lib -debuglib=tango-base-dmd.lib | ||
|
||
To show the available Rake targets use: | ||
$ rake -T | ||
|
||
To build for example the SWT you need: | ||
$ rake base swt | ||
|
||
To enable debug build (symbols for debugging): | ||
$ rake DEBUG=1 base swt | ||
Alternatively you can set the environment variable DEBUG to '1'. | ||
|
||
The example targets build a whole collection of examples. | ||
To build an indiviual snippet from swtsnippets, do: | ||
$ rake swtsnippets[Snippet107] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
require 'find' | ||
require 'fileutils' | ||
require 'set' | ||
|
||
def ProcessModule( path, modName, modList ) | ||
puts "ProcessModule #{path}" | ||
identifiers = Set.new | ||
File.open(path).each_line do |s| | ||
if s =~ /^[ \t]*\*/ then | ||
next | ||
end | ||
s.split( /[^0-9A-Za-z_]/ ).each do |tok| | ||
if tok =~ /^[_A-Z][_A-Za-z0-9]*$/ then | ||
identifiers << tok | ||
end | ||
end | ||
end | ||
lines = IO.readlines(path) | ||
w=File.new(path,"wb+") | ||
lines.each do |s| | ||
if s =~/\/\/ packageimport$/ then | ||
else | ||
w.print "#{s}" | ||
end | ||
if s =~ /^module +((([a-zA-Z0-9_]+)\.)*)([a-zA-Z0-9_]+);/ then | ||
packname = $1 | ||
(modList-modName).intersection(identifiers).each do|id| | ||
w.print "import #{packname}#{id};\n" | ||
end | ||
end | ||
end | ||
end | ||
|
||
def ProcessDirectory( path ) | ||
puts path | ||
modList = Set.new | ||
Dir.foreach(path) do |entry| | ||
filename = File.join(path,entry) | ||
if FileTest.file?(filename) && filename =~ /\.d$/ then | ||
modList << entry[ 0 .. -3 ] | ||
end | ||
end | ||
Dir.foreach(path) do |entry| | ||
filename = File.join(path,entry) | ||
if FileTest.file?(filename) && filename =~ /\.d$/ then | ||
ProcessModule( filename, entry[ 0 .. -3 ], modList ) | ||
end | ||
end | ||
end | ||
|
||
ARGV.each do|startpath| | ||
puts "processing #{startpath}" | ||
if !FileTest.directory?(startpath) then | ||
raise "Argument is not a directory" | ||
end | ||
Find.find( startpath ) do |path| | ||
if FileTest.directory?(path) then | ||
ProcessDirectory(path) | ||
end | ||
end | ||
end | ||
|
Oops, something went wrong.