Mercurial > projects > dwt2
comparison rakefile @ 30:93b0e7382fd5
SWT Snippets build on windows
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 23 Mar 2009 10:17:19 +0100 |
parents | 4e5843b771cc |
children | 712f3c7f7660 |
comparison
equal
deleted
inserted
replaced
29:4e5843b771cc | 30:93b0e7382fd5 |
---|---|
201 desc "Clean, then build ALL" | 201 desc "Clean, then build ALL" |
202 task :default => [ :clean, :all ] | 202 task :default => [ :clean, :all ] |
203 | 203 |
204 | 204 |
205 desc "Build SWT Snippet Collection" | 205 desc "Build SWT Snippet Collection" |
206 task :swtsnippets do | 206 task :swtsnippets, :explicit_snp do | t, args | |
207 | 207 |
208 snps_browser = [ "Snippet128", "Snippet136" ] | 208 snps_browser = [ "Snippet128", "Snippet136" ] |
209 snps_opengl = [ "Snippet174", "Snippet195" ] | 209 snps_opengl = [ "Snippet174", "Snippet195" ] |
210 | 210 |
211 snps_exclude = snps_browser + snps_opengl | 211 snps_exclude = snps_browser + snps_opengl |
212 allsnippets = FileList[ File.join("org.eclipse.swt.snippets", "src", "**/Snippet*.d" )] | 212 allsnippets = FileList[ File.join("org.eclipse.swt.snippets", "src", "**/Snippet*.d" )] |
213 allsnippets.each do | snp | | 213 if args.explicit_snp != nil |
214 puts "Building #{snp}" | 214 puts "Building #{args.explicit_snp}" |
215 if snp =~ /.*(Snippet\w+)\.d$/ | 215 buildApp( "org.eclipse.swt.snippets", "src", "res", "", args.explicit_snp ) |
216 snpname = $1 | 216 else |
217 if !snps_exclude.include? snpname | 217 allsnippets.each do | snp | |
218 buildApp( "org.eclipse.swt.snippets", "src", "res", "", snpname ) | 218 puts "Building #{snp}" |
219 if snp =~ /.*(Snippet\w+)\.d$/ | |
220 snpname = $1 | |
221 if !snps_exclude.include? snpname | |
222 buildApp( "org.eclipse.swt.snippets", "src", "res", "", snpname ) | |
223 end | |
224 else | |
225 puts snp | |
226 raise "Name does not match" | |
219 end | 227 end |
220 else | |
221 puts snp | |
222 raise "Name does not match" | |
223 end | 228 end |
224 end | 229 end |
225 end | 230 end |
226 | 231 |
227 def buildApp( basedir, srcdir, resdir, dflags, appname, filelist=nil ) | 232 def buildApp( basedir, srcdir, resdir, dflags, appname, filelist=nil ) |
240 rsp.puts dflags | 245 rsp.puts dflags |
241 end | 246 end |
242 ALL_RESDIRS.each do | dir | | 247 ALL_RESDIRS.each do | dir | |
243 rsp.puts "-J#{File.expand_path(dir).to_path}" | 248 rsp.puts "-J#{File.expand_path(dir).to_path}" |
244 end | 249 end |
245 rsp.print "-L" | 250 #rsp.puts "-L/NOMAP" |
246 rsp.print "+advapi32" | 251 #rsp.print "-L" |
247 rsp.print "+comctl32" | 252 #rsp.print "+advapi32" |
248 rsp.print "+comdlg32" | 253 #rsp.print "+comctl32" |
249 rsp.print "+gdi32" | 254 #rsp.print "+comdlg32" |
250 rsp.print "+kernel32" | 255 #rsp.print "+gdi32" |
251 rsp.print "+shell32" | 256 #rsp.print "+kernel32" |
252 rsp.print "+ole32" | 257 #rsp.print "+shell32" |
253 rsp.print "+oleaut32" | 258 #rsp.print "+ole32" |
254 rsp.print "+olepro32" | 259 #rsp.print "+oleaut32" |
255 rsp.print "+oleacc" | 260 #rsp.print "+olepro32" |
256 rsp.print "+user32" | 261 #rsp.print "+oleacc" |
257 rsp.print "+usp10" | 262 #rsp.print "+user32" |
258 rsp.print "+msimg32" | 263 #rsp.print "+usp10" |
259 rsp.print "+opengl32" | 264 #rsp.print "+msimg32" |
260 rsp.print "+shlwapi" | 265 #rsp.print "+opengl32" |
261 rsp.print "+tango-user-dmd.lib" | 266 #rsp.print "+shlwapi" |
262 rsp.print "+zlib.lib" | 267 #rsp.print "+tango-user-dmd.lib" |
263 rsp.print "+dwt-base.lib" | 268 #rsp.print "+zlib.lib" |
264 rsp.print "+org.eclipse.swt.win32.win32.x86.lib" | 269 #rsp.print "+dwt-base.lib" |
265 rsp.print "+#{LIBDIR.to_path}\\" | 270 #rsp.print "+org.eclipse.swt.win32.win32.x86.lib" |
266 rsp.puts | 271 #rsp.print "+#{LIBDIR.to_path}\\" |
272 #rsp.puts | |
273 | |
274 rsp.puts "-L/NOM" | |
275 rsp.puts "-L+advapi32" | |
276 rsp.puts "-L+comctl32" | |
277 rsp.puts "-L+comdlg32" | |
278 rsp.puts "-L+gdi32" | |
279 rsp.puts "-L+kernel32" | |
280 rsp.puts "-L+shell32" | |
281 rsp.puts "-L+ole32" | |
282 rsp.puts "-L+oleaut32" | |
283 rsp.puts "-L+olepro32" | |
284 rsp.puts "-L+oleacc" | |
285 rsp.puts "-L+user32" | |
286 rsp.puts "-L+usp10" | |
287 rsp.puts "-L+msimg32" | |
288 rsp.puts "-L+opengl32" | |
289 rsp.puts "-L+shlwapi" | |
290 rsp.puts "-L+tango-user-dmd.lib" | |
291 rsp.puts "-L+zlib.lib" | |
292 rsp.puts "-L+dwt-base.lib" | |
293 rsp.puts "-L+org.eclipse.swt.win32.win32.x86.lib" | |
294 rsp.puts "-L+#{LIBDIR.to_path}\\" | |
267 | 295 |
268 rsp.puts "-op" | 296 rsp.puts "-op" |
269 rsp.puts "-od#{OBJDIR.to_path}" | 297 rsp.puts "-od#{OBJDIR.to_path}" |
270 applfile = File.join(BINDIR,appname+EXEEXT) | 298 applfile = File.join(BINDIR,appname+EXEEXT) |
271 rsp.puts "-of#{applfile.to_path}" | 299 rsp.puts "-of#{applfile.to_path}" |