changeset 70:1a69be0afe99

Rakefile clean up for -J
author Frank Benoit <benoit@tionex.de>
date Wed, 08 Apr 2009 22:13:21 +0200
parents bf0426bfc6e0
children a7064d39311b
files rakefile
diffstat 1 files changed, 7 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/rakefile	Wed Apr 08 22:12:37 2009 +0200
+++ b/rakefile	Wed Apr 08 22:13:21 2009 +0200
@@ -26,10 +26,10 @@
 #
 DIR_OBJ     = File.expand_path("obj")
 DIR_IMP     = File.expand_path("imp")
+DIR_RES     = File.expand_path("res")
 DIR_LIB     = File.expand_path("lib")
 DIR_BIN     = File.expand_path("bin")
 FILE_RSP    = File.expand_path("rsp")
-ALL_RESDIRS = [ "base/res", "res" ]
 
 LOG_STDOUT  = File.expand_path("olog.txt")
 LOG_STDERR  = File.expand_path("elog.txt")
@@ -52,9 +52,8 @@
 end
 PROG_DMD = "dmd#{EXEEXT}"
 
-ALL_RESDIRS << File.join(BASEDIR_SWT, "res" )
-
 if isWindows
+    #LIBNAMES_BASIC  = [ "dwt-base" ]
     LIBNAMES_BASIC  = [ "advapi32", "comctl32", "comdlg32", "gdi32", "kernel32",
                         "shell32", "ole32", "oleaut32", "olepro32", "oleacc",
                         "user32", "usp10", "msimg32", "opengl32", "shlwapi",
@@ -115,19 +114,18 @@
 
     FileUtils.mkdir_p DIR_IMP
     FileUtils.mkdir_p DIR_OBJ
+    FileUtils.mkdir_p DIR_RES
+    FileUtils.cp FileList[ File.join(resdir_abs, "*" )], DIR_RES
 
     rsp = File.new( FILE_RSP, "w+" )
     rsp.puts "-H"
     #rsp.puts "-Hd#{DIR_IMP.to_path}"
     rsp.puts "-I#{srcdir_abs.to_path}"
     rsp.puts "-I#{DIR_IMP.to_path}"
-    rsp.puts "-J#{resdir_abs.to_path}"
+    rsp.puts "-J#{DIR_RES.to_path}"
     if dcargs != nil
         rsp.puts dcargs
     end
-    ALL_RESDIRS.each do | dir |
-        rsp.puts "-J#{File.expand_path(dir).to_path}"
-    end
     rsp.puts "-c"
     rsp.puts "-op"
     if isDebug
@@ -224,6 +222,7 @@
     rsp.puts "-I#{srcdir_abs.to_path}"
     rsp.puts "-I#{DIR_IMP.to_path}"
     rsp.puts "-J#{resdir_abs.to_path}"
+    rsp.puts "-J#{DIR_RES.to_path}"
     if isDebug
         rsp.puts "-debug"
         rsp.puts "-g"
@@ -231,9 +230,6 @@
     if dflags.size > 0 then
         rsp.puts dflags
     end
-    ALL_RESDIRS.each do | dir |
-        rsp.puts "-J#{File.expand_path(dir).to_path}"
-    end
 
     rsp.puts "-op"
     rsp.puts "-od#{DIR_OBJ.to_path}"
@@ -248,8 +244,6 @@
         libnames.each do | libname |
             rsp.puts "-L+#{libname}#{LIBEXT}"
         end
-        rsp.puts "-L+dwt-base.lib"
-        rsp.puts "-L+#{BASEDIR_SWT}.lib"
         rsp.puts "-L+#{DIR_LIB.to_path}\\"
     else
         rsp.puts "-L-L#{DIR_LIB.to_path}"
@@ -291,6 +285,7 @@
     FileUtils.rm_rf DIR_OBJ
     FileUtils.rm_rf DIR_LIB
     FileUtils.rm_rf DIR_BIN
+    FileUtils.rm_rf DIR_RES
     FileUtils.rm FILE_RSP, :force => true
     FileUtils.rm LOG_STDOUT, :force => true
     FileUtils.rm LOG_STDERR, :force => true