diff --git a/.gitignore b/.gitignore
index 4871abe6b8d6ebf342e4bbcac02a5e2ea0744a2b..0de1dc5c3535bdd79388ce7db54e2c897429c6e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,7 @@
-.config
-InstalledFiles
-FXRuby.spec
-scripts/make-installers.rb
-*.iss
-*.iss.in
 doap.rdf
-Makefile
 *.tmproj
 doc/api
-doc/*.html
+users_guide/*.html
 ext/fox16/*_wrap.cpp
 ext/fox16/*.o
 ext/fox16/conftest.dSYM
@@ -17,5 +10,3 @@ ext/fox16/librb.c
 ext/fox16/fox16.bundle
 ext/fox16/mkmf.log
 lib/fox16/kwargs.rb
-pre-config.rb
-swig-interfaces/dependencies
diff --git a/Manifest.txt b/Manifest.txt
index 484d35cb4573b14b4096793da1626614f3017c2d..2a2775f33c84ec5b7d8e82e41e937a1e9d0125f4 100644
--- a/Manifest.txt
+++ b/Manifest.txt
@@ -1,9 +1,7 @@
-FXRuby-ruby1.8.6-i386-msvcrt.iss
 History.txt
 Manifest.txt
 README
 README.txt
-README.win32.txt
 Rakefile
 TODO
 doap.rdf
@@ -376,9 +374,7 @@ ext/fox16/text_wrap.cpp
 ext/fox16/treelist_wrap.cpp
 ext/fox16/ui_wrap.cpp
 ext/fox16/unregisterOwnedObjects.cpp
-fxruby-mswin32.gemspec
 index.html
-install.rb
 lib/fox16/accel_table.rb
 lib/fox16/aliases.rb
 lib/fox16/bitmapview.rb
@@ -408,7 +404,6 @@ lib/fox16/splashscreen.rb
 lib/fox16/timeout.rb
 lib/fox16/undolist.rb
 lib/fox16/version.rb
-pre-config.rb
 rdoc-sources/FX4Splitter.rb
 rdoc-sources/FX7Segment.rb
 rdoc-sources/FXAccelTable.rb
@@ -610,10 +605,6 @@ rdoc-sources/fxdefs.rb
 scripts/build-fox.rb
 scripts/generate_kwargs_lib.rb
 scripts/iface.rb
-scripts/make-installers.rb
-scripts/make-win32-tarball.sh
-scripts/opengl-cygwin.iss
-scripts/opengl.iss
 swig-interfaces/FX4Splitter.i
 swig-interfaces/FX7Segment.i
 swig-interfaces/FXAccelTable.i
@@ -816,12 +807,10 @@ swig-interfaces/FXXBMIcon.i
 swig-interfaces/FXXBMImage.i
 swig-interfaces/FXXPMIcon.i
 swig-interfaces/FXXPMImage.i
-swig-interfaces/Makefile
 swig-interfaces/README
 swig-interfaces/common.i
 swig-interfaces/core.i
 swig-interfaces/dcmodule.i
-swig-interfaces/dependencies
 swig-interfaces/dialogs.i
 swig-interfaces/exceptions.i
 swig-interfaces/framesmodule.i
@@ -842,7 +831,6 @@ swig-interfaces/mdi.i
 swig-interfaces/menumodule.i
 swig-interfaces/ruby-typemaps.i
 swig-interfaces/scintilla.i
-swig-interfaces/swig.sed
 swig-interfaces/table-module.i
 swig-interfaces/text-module.i
 swig-interfaces/treelist-module.i
@@ -932,18 +920,39 @@ test/stress2.rb
 test/stress3.rb
 test/testcase.rb
 users_guide/Makefile
+users_guide/apes02.html
+users_guide/apes03.html
+users_guide/book.html
 users_guide/book.xml
 users_guide/bookinfo.xml
+users_guide/build.html
 users_guide/build.xml
+users_guide/ch03s02.html
+users_guide/ch03s03.html
+users_guide/ch03s04.html
+users_guide/ch03s05.html
+users_guide/ch04s02.html
+users_guide/ch04s03.html
+users_guide/ch04s04.html
+users_guide/ch05s02.html
+users_guide/ch05s03.html
+users_guide/changes.html
 users_guide/changes.xml
+users_guide/clipboardtut.html
 users_guide/clipboardtut.xml
 users_guide/custom-fo.xsl
 users_guide/custom-html.xsl
+users_guide/differences.html
 users_guide/differences.xml
+users_guide/dragdroptut.html
 users_guide/dragdroptut.xml
+users_guide/events.html
 users_guide/events.xml
+users_guide/examples.html
 users_guide/examples.xml
+users_guide/gems.html
 users_guide/gems.xml
+users_guide/goals.html
 users_guide/goals.xml
 users_guide/images/babelfish.png
 users_guide/images/browser.png
@@ -983,17 +992,27 @@ users_guide/images/splitter.png
 users_guide/images/tabbook.png
 users_guide/images/table.png
 users_guide/images/tutorial1.png
+users_guide/implementation.html
 users_guide/implementation.xml
+users_guide/infosources.html
 users_guide/infosources.xml
 users_guide/layout.xml
+users_guide/library.html
 users_guide/library.xml
 users_guide/maintainer.xml
+users_guide/opengl.html
 users_guide/opengl.xml
 users_guide/preface.xml
+users_guide/pt01.html
+users_guide/pt02.html
+users_guide/scintilla.html
 users_guide/scintilla.xml
 users_guide/style.css
+users_guide/subversion.html
 users_guide/subversion.xml
 users_guide/template.xml
 users_guide/todo.xml
+users_guide/tutorial1.html
 users_guide/tutorial1.xml
+users_guide/unicode.html
 users_guide/unicode.xml
diff --git a/README.win32.txt b/README.win32.txt
deleted file mode 100755
index 88cdfc041b264e96bbcf36372c455a008e99279e..0000000000000000000000000000000000000000
--- a/README.win32.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-This binary distribution of FXRuby is specifically
-packaged to work with the latest One-Click Ruby
-Installer, available for download from this page:
-
-http://rubyforge.org/projects/rubyinstaller
-
-This distribution should contain just about everything
-you'd want to get started working with FXRuby; the
-documentation is installed under:
-
-C:\ruby\doc\ruby\FXRuby
-
-the sample programs are installed under:
-
-C:\ruby\samples\FXRuby
-
-and the libraries are installed under:
-
-C:\ruby\lib\ruby\site_ruby\1.8
-
-This distribution doesn't include the C++ source code
-used to build FXRuby. For that you should download the
-full source code distribution from the FXRuby home page.
diff --git a/Rakefile b/Rakefile
index d39aeaf10bbd5f477d8fd756b4e6a6fe4750e7f2..cb6c6f729280514d05d52209abc467314cd1f223 100755
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,7 @@
 require 'rubygems'
 require 'hoe'
 require 'erb'
+require 'rake/extensiontask'
 require './lib/fox16/version.rb'
 
 # Some constants we'll need
@@ -12,241 +13,183 @@ FOX_INSTALL_DIR = "e:\\src\\fox-1.6.35"
 FXSCINTILLA_INSTALL_DIR = "c:\\src\\fxscintilla"
 ISCC = "C:\\Progra~1\\InnoSe~1\\ISCC.exe"
 
-Hoe.new("FXRuby", PKG_VERSION) do |p|
+hoe = Hoe.spec "FXRuby" do
   # ... project specific data ...
-  p.blog_categories = %w{FXRuby}
-  p.clean_globs = [".config", "ext/fox16/Makefile", "ext/fox16/*.o", "ext/fox16/*.bundle", "ext/fox16/mkmf.log", "ext/fox16/conftest.dSYM"]
-  p.developer("Lyle Johnson", "lyle@lylejohnson.name")
-  p.extra_rdoc_files = ["rdoc-sources", File.join("rdoc-sources", "README.rdoc")]
-  p.remote_rdoc_dir = "doc/api"
-  p.spec_extras = {
+  self.blog_categories = %w{FXRuby}
+  self.clean_globs = [".config", "ext/fox16/Makefile", "ext/fox16/*.o", "ext/fox16/*.bundle", "ext/fox16/mkmf.log", "ext/fox16/conftest.dSYM"]
+  developer("Lyle Johnson", "lyle@lylejohnson.name")
+  self.extra_rdoc_files = ["rdoc-sources", File.join("rdoc-sources", "README.rdoc")]
+  self.remote_rdoc_dir = "doc/api"
+  self.spec_extras = {
     :description => "FXRuby is the Ruby binding to the FOX GUI toolkit.",
     :extensions => ["ext/fox16/extconf.rb"],
     :rdoc_options => ['--main', File.join('rdoc-sources', 'README.rdoc'), '--exclude', 'ext/fox16', '--exclude', %r{aliases|kwargs|missingdep|responder}],
     :require_paths => ['ext/fox16', 'lib'],
     :summary => "FXRuby is the Ruby binding to the FOX GUI toolkit."
   }
-  p.test_globs = "test/**/TC_*.rb"
+  self.test_globs = "test/**/TC_*.rb"
+  self.version = PKG_VERSION
 end
 
 # Make sure extension is built before tests are run
-task :test => [:build]
+task :test => [:compile]
+
+# The "docs" task created by Hoe assumes that we want to run RDoc
+# over everything under the "lib" and "ext" subdirectories.
+# We need to go back and tell it to skip the stuff under ext.
+# rdoc_target = Rake::Task['docs'].prerequisites.first
+# rdoc_files = Rake::Task[rdoc_target].prerequisites
+# rdoc_files.reject! {|x| x == "ext/fox16" }
+
+# Make sure that all of the package contents exist before we try to build the package
+#Rake::Task['package'].prerequisites.unshift("swig:swig", "fxruby:guide", "fxruby:setversions", "fxruby:generate_kwargs_lib")
 
 # ... project specific tasks ...
 
-def setversions(filename)
-  File.open(filename, "wb") do |out|
-    template = ERB.new(File.open(filename + ".erb", "rb").read)
-    out.write(template.result)
+Rake::ExtensionTask.new("fox16", hoe.spec) do |ext|
+  if RUBY_PLATFORM =~ /mingw/
+    ext.config_options << "--with-fox-include=c:/ruby-1.8.6-p383-preview2/devkit/msys/1.0.11/usr/local/include/fox-1.6"
+    ext.config_options << "--with-fox-lib=c:/ruby-1.8.6-p383-preview2/devkit/msys/1.0.11/usr/local/lib"
+    ext.config_options << "--with-fxscintilla-include=c:/ruby-1.8.6-p383-preview2/devkit/msys/1.0.11/usr/local/include/fxscintilla"
+    ext.config_options << "--with-fxscintilla-lib=c:/ruby-1.8.6-p383-preview2/devkit/msys/1.0.11/usr/local/lib"
   end
 end
 
-desc "Create INNO Setup installer scripts from templates"
-task :create_installer_scripts do
-  output_filenames = {
-    "FXRuby-ruby1.8.6-i386-msvcrt.iss" =>  ["1.8", "ruby186", "i386-msvcrt"]
+# Make the compile task's list of dependencies begin with the :configure task
+Rake::Task['compile'].prerequisites.unshift :configure
+
+# Set environment variable SWIG_LIB to
+# c:/ruby-1.8.6-p383-preview2/devkit/msys/1.0.11/usr/local/share/swig/1.3.22
+# before running swig on MinGW.
+namespace :swig do
+  SWIG = "swig"
+  SWIGFLAGS = "-fcompact -noruntime -c++ -ruby -no_default -I../fox-includes"
+  SWIG_LIB = `#{SWIG} -swiglib`.chomp
+  SWIG_MODULES = {
+    "core.i" => "core_wrap.cpp",
+    "dcmodule.i" => "dc_wrap.cpp",
+    "dialogs.i" => "dialogs_wrap.cpp",
+    "framesmodule.i" => "frames_wrap.cpp",
+    "iconlistmodule.i" => "iconlist_wrap.cpp",
+    "icons.i" => "icons_wrap.cpp",
+    "image.i" => "image_wrap.cpp",
+    "labelmodule.i" => "label_wrap.cpp",
+    "layout.i" => "layout_wrap.cpp",
+    "listmodule.i" => "list_wrap.cpp",
+    "mdi.i" => "mdi_wrap.cpp",
+    "menumodule.i" => "menu_wrap.cpp",
+    "fx3d.i" => "fx3d_wrap.cpp",
+    "scintilla.i" => "scintilla_wrap.cpp",
+    "table-module.i" => "table_wrap.cpp",
+    "text-module.i" => "text_wrap.cpp",
+    "treelist-module.i" => "treelist_wrap.cpp",
+    "ui.i" => "ui_wrap.cpp"
   }
-  template = ERB.new(File.open("scripts/FXRuby.iss.erb", "rb").read)
-  output_filenames.each do |output_filename, info|
-    File.open(output_filename, "wb") do |output_file|
-      output_file.write(template.result(binding))
+
+  def wrapper_src_file_path(wrapper_src_file_name)
+    File.join("..", "ext", "fox16", wrapper_src_file_name)
+  end
+  
+  def sed(wrapper_src_file_name)
+    results = []
+    IO.readlines(wrapper_src_file_name).each do |line|
+      line.gsub!(/static VALUE mCore;/, "VALUE mCore;")
+      line.gsub!(/mCore = rb_define_module\("Core"\)/, "mFox = rb_define_module(\"Fox\")")
+      line.gsub!(/mCore/, "mFox")
+      next if line =~ /static VALUE m(Dc|Dialogs|Frames|Iconlist|Icons|Image|Label|Layout|List|Mdi|Menu|Fx3d|Scintilla|Table|Text|Treelist|Ui);/
+      next if line =~ /m(Dc|Dialogs|Frames|Iconlist|Icons|Image|Label|Layout|List|Mdi|Menu|Fx3d|Scintilla|Table|Text|Treelist|Ui) = rb_define_module/
+      next if line =~ /rb_require/
+      line.gsub!(/m(Dc|Dialogs|Frames|Iconlist|Icons|Image|Label|Layout|List|Mdi|Menu|Fx3d|Scintilla|Table|Text|Treelist|Ui),/, "mFox,")
+      results << line
+    end
+    File.open(wrapper_src_file_name, "w") do |io|
+      io.write(results.join)
     end
   end
-end
-
-desc "Update the web site."
-task :website => [:doap] do
-  system %{scp -Cq doc/*.css lyle@rubyforge.org:/var/www/gforge-projects/fxruby/1.6/doc}
-  system %{scp -Cq doc/*.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby/1.6/doc}
-  system %{scp -Cq doc/images/*.png lyle@rubyforge.org:/var/www/gforge-projects/fxruby/1.6/doc/images}
-  system %{scp -Cq examples/*.rb lyle@rubyforge.org:/var/www/gforge-projects/fxruby/1.6/examples}
-  system %{scp -Cq web/index.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby}
-  system %{scp -Cq web/community.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby}
-  system %{scp -Cq web/documentation.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby}
-  system %{scp -Cq web/downloads.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby}
-  system %{scp -Cq web/images/* lyle@rubyforge.org:/var/www/gforge-projects/fxruby/images}
-  system %{scp -Cq web/css/*.css lyle@rubyforge.org:/var/www/gforge-projects/fxruby/css}
-end
-
-desc "Upload the DOAP file to the Web site"
-task :doap => [:setversions] do
-  system %{scp -Cq doap.rdf lyle@rubyforge.org:/var/www/gforge-projects/fxruby}
-end
+  
+  def swig(swig_interface_file_name, wrapper_src_file_name)
+    system "#{SWIG} #{SWIGFLAGS} -o #{wrapper_src_file_path(wrapper_src_file_name)} #{swig_interface_file_name}"
+    sed wrapper_src_file_path(wrapper_src_file_name)
+  end
 
-desc "Set versions"
-task :setversions => [ :create_installer_scripts ] do
-  setversions("pre-config.rb")
-  setversions("doap.rdf")
-  setversions("scripts/make-installers.rb")
-end
+  task :swig_librb do
+    Dir.chdir "swig-interfaces" do
+      File.open(wrapper_src_file_path("librb.c"), "w") do |io|
+        io.puts "#define SWIG_GLOBAL 1"
+        io.write(IO.read(File.join(SWIG_LIB, "ruby", "precommon.swg")))
+        io.write(IO.read(File.join(SWIG_LIB, "common.swg")))
+        io.write(IO.read(File.join(SWIG_LIB, "ruby", "rubyhead.swg")))
+        io.write(IO.read(File.join(SWIG_LIB, "ruby", "rubydef.swg")))
+      end
+    end
+  end
 
-desc "Run SWIG to generate the wrapper files."
-task :swig do
-  Dir.chdir "swig-interfaces" do
-    system %{touch dependencies}
-    system %{make depend; make}
+  desc "Run SWIG to generate the wrapper files."
+  task :swig => [:swig_librb] do
+    Dir.chdir "swig-interfaces" do
+      SWIG_MODULES.each do |key, value|
+        swig(key, value)
+      end
+    end
   end
 end
 
-DISTFILES = [
-  "ANNOUNCE",
-  "LICENSE",
-  "README",
-  "README.win32.txt",
-  "pre-config.rb",
-  "install.rb",
-  "doap.rdf",
-  "FXRuby-ruby1.8.6-i386-msvcrt.iss",
-  "Rakefile",
-  "index.html",
-  "doc/*.css",
-  "doc/*.html",
-  "doc/images/*.png",
-  "examples/README",
-  "examples/*.rb",
-  "examples/*.xml",
-  "examples/icons/*.png",
-  "examples/icons/*.ico",
-  "examples/textedit/*.rb",
-  "lib/fox16/*.rb",
-  "ext/fox16/MANIFEST",
-  "ext/fox16/extconf.rb",
-  "ext/fox16/*.c",
-  "ext/fox16/*.cpp",
-  "ext/fox16/include/*.h",
-  "swig-interfaces/README",
-  "swig-interfaces/Makefile",
-  "swig-interfaces/swig.sed",
-  "swig-interfaces/*.i",
-  "tests/README",
-  "tests/*.rb",
-  "tests/*.ps",
-  "rdoc-sources/*.rb",
-  "rdoc-sources/README.rdoc",
-  "scripts/make-installers.rb"
-]
-
-def distdir
-  "FXRuby-#{PKG_VERSION}"
-end
+namespace :fxruby do
+
+  desc "Update the web site."
+  task :website => [:doap] do
+    system %{scp -Cq doc/*.css lyle@rubyforge.org:/var/www/gforge-projects/fxruby/1.6/doc}
+    system %{scp -Cq doc/*.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby/1.6/doc}
+    system %{scp -Cq doc/images/*.png lyle@rubyforge.org:/var/www/gforge-projects/fxruby/1.6/doc/images}
+    system %{scp -Cq examples/*.rb lyle@rubyforge.org:/var/www/gforge-projects/fxruby/1.6/examples}
+    system %{scp -Cq web/index.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby}
+    system %{scp -Cq web/community.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby}
+    system %{scp -Cq web/documentation.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby}
+    system %{scp -Cq web/downloads.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby}
+    system %{scp -Cq web/images/* lyle@rubyforge.org:/var/www/gforge-projects/fxruby/images}
+    system %{scp -Cq web/css/*.css lyle@rubyforge.org:/var/www/gforge-projects/fxruby/css}
+  end
 
-task :distdir => [:swig, :docs, :setversions, :generate_kwargs_lib] do
-  rm_rf "#{distdir}"
-  mkdir "#{distdir}"
-  chmod(0777, distdir)
-  DISTFILES.each do |filespec|
-    Dir.glob(filespec) { |filename|
-      mkdir_p "#{distdir}/#{File.dirname(filename)}"
-      File.syscopy(filename, "#{distdir}/#{File.dirname(filename)}")
-    }
+  desc "Upload the DOAP file to the Web site"
+  task :doap => [:setversions] do
+    system %{scp -Cq doap.rdf lyle@rubyforge.org:/var/www/gforge-projects/fxruby}
   end
-  rm_f "#{distdir}/lib/fox16/acceltable.rb"
-  rm_f "#{distdir}/lib/fox16/canvas.rb"
-  rm_f "#{distdir}/lib/fox16/html.rb"
-  rm_f "#{distdir}/lib/fox16/sugar.rb"
-  rm_f "#{distdir}/lib/fox16/tkcompat.rb"
-  rm_f "#{distdir}/examples/canvasdemo.rb"
-  rm_f "#{distdir}/examples/examples.rb"
-  rm_f "#{distdir}/examples/gdchart.rb"
-  rm_f "#{distdir}/examples/rapt-gui.rb"
-  rm_f "#{distdir}/examples/WhatAQuietStiff.rb"
-  rm_f "#{distdir}/examples/gembrowser.rb"
-  rm_f "#{distdir}/examples/rmagick.rb"
-  rm_f "#{distdir}/examples/tablenew.rb"
-end
 
-desc "Build the source tarball."
-task :dist => [:distdir] do
-  system "chmod -R a+r #{distdir}"
-  system "tar czf #{distdir}.tar.gz #{distdir}"
-  system "rm -rf #{distdir}"
-end
+  def setversions(filename)
+    File.open(filename, "wb") do |out|
+      template = ERB.new(File.open(filename + ".erb", "rb").read)
+      out.write(template.result)
+    end
+  end
 
-desc "Generate all of the documentation files."
-task :doc do
-  Dir.chdir "doc" do
-    system %{make}
+  desc "Set versions"
+  task :setversions do
+    setversions("doap.rdf")
+  end
+  
+  desc "Generate the user's guide"
+  task :guide do
+    Dir.chdir "users_guide" do
+      system %{make}
+    end
   end
-end
 
-def make_impl
-  Dir.chdir "ext/fox16" do
-    ruby "make_impl.rb"
+  def make_impl
+    Dir.chdir "ext/fox16" do
+      ruby "make_impl.rb"
+    end
   end
-end
 
-task :configure => [:scintilla, :setversions, :generate_kwargs_lib] do
-  unless File.exist?(".config")
-#   ruby "install.rb config -- --with-fxscintilla-include=/usr/include/fxscintilla --with-fxscintilla-lib=/usr/lib"
-#   ruby "install.rb config -- --without-fxscintilla"
-#   ruby "install.rb config -- --with-fox-include=/opt/local/include/fox-1.6 --with-fox-lib=/opt/local/lib --with-fxscintilla-include=/opt/local/include/fxscintilla --with-fxscintilla-lib=/opt/local/lib"
-    ruby "install.rb config -- --with-fox-include=/usr/local/include/fox-1.6 --with-fox-lib=/usr/local/lib --with-fxscintilla-include=/usr/local/include/fxscintilla --with-fxscintilla-lib=/usr/local/lib"
+  task :configure => [:scintilla, :setversions, :generate_kwargs_lib] do
     make_impl
   end
-end
-
-desc "Build it."
-task :build => [:configure] do
-  ruby "install.rb setup"
-end
-
-desc "Install it."
-task :install => [:build] do
-  ruby "install.rb install"
-end
-
-task :scintilla do
-  ruby "scripts/iface.rb -i ~/src/fxscintilla/scintilla/include/Scintilla.iface -o lib/fox16/scintilla.rb"
-end
 
-# Given the distribution tarball, build the installer for Win32
-desc "Build Win32 installer"
-task :build_win32 do
-  if File.exist? ".config"
-    ruby "install.rb clean"
+  task :scintilla do
+  # ruby "scripts/iface.rb -i ~/src/fxscintilla/scintilla/include/Scintilla.iface -o lib/fox16/scintilla.rb"
+    ruby "scripts/iface.rb -i c:/src/fxscintilla-1.71/scintilla/include/Scintilla.iface -o lib/fox16/scintilla.rb"
   end
-  ruby "install.rb config --make-prog=nmake -- --with-fox-include=#{FOX_INSTALL_DIR}\\include --with-fox-lib=#{FOX_INSTALL_DIR}\\lib --with-fxscintilla-include=#{FXSCINTILLA_INSTALL_DIR}\\include --with-fxscintilla-lib=#{FXSCINTILLA_INSTALL_DIR}\\lib"
-# ruby "install.rb config --make-prog=nmake -- --with-fox-include=#{FOX_INSTALL_DIR}\\include --with-fox-lib=#{FOX_INSTALL_DIR}\\lib"
-  ruby "install.rb setup"
-end
 
-desc "Build Win32 installer using INNO Setup"
-task :build_win32_installer => [:build_win32] do
-  iss_script_name = nil
-  case VERSION
-    when /1.8.2/
-      iss_script_name = "FXRuby-ruby1.8.2-i386-msvcrt.iss"
-    when /1.8.4/
-      iss_script_name = "FXRuby-ruby1.8.4-i386-msvcrt.iss"
-    when /1.8.5/
-      iss_script_name = "FXRuby-ruby1.8.5-i386-msvcrt.iss"
-    when /1.8.6/
-      iss_script_name = "FXRuby-ruby1.8.6-i386-msvcrt.iss"
+  task :generate_kwargs_lib do
+    ruby 'scripts/generate_kwargs_lib.rb'
   end
-  system(ISCC, iss_script_name)
-end
-
-desc "Build Win32 binary Gem"
-task :build_win32_gem => [:build_win32] do
-  spec = create_gemspec
-  spec.platform = Gem::Platform::CURRENT
-  spec.files += ["ext/fox16/fox16.so"]
-  Gem::Builder.new(spec).build
-end
-
-desc "Build Win32 binary installer and Gem"
-task :release_win32 => [:build_win32_installer, :build_win32_gem] do
-end
-
-desc "Build Mac OS X binary Gem"
-task :build_macosx_gem do
-  raise RuntimeError, "remove libFOX*.dylib and recompile before building gem" unless Dir.glob("/usr/local/lib/libFOX*.dylib").empty?
-  spec = create_gemspec
-  spec.platform = Gem::Platform::CURRENT
-  spec.files += ["ext/fox16/fox16.bundle"]
-  Gem::Builder.new(spec).build
-end
-
-task :generate_kwargs_lib do
-  ruby 'scripts/generate_kwargs_lib.rb'
-end
+end
\ No newline at end of file
diff --git a/ext/fox16/extconf.rb b/ext/fox16/extconf.rb
index 62dfbb9eb0276a13709cfbc59a7770b3de14dd59..23f9be3b57465d020e589b7a3877c0314b02ccd8 100755
--- a/ext/fox16/extconf.rb
+++ b/ext/fox16/extconf.rb
@@ -72,118 +72,29 @@ def fxscintilla_support_suppressed?
   ARGV.include? "--without-fxscintilla"
 end
 
-def do_cygwin_setup
-  extra_libs = %w{stdc++ glu32 opengl32 wsock32 comctl32 mpr gdi32 winspool}
-  extra_libs.each do |lib|
-    $libs = append_library($libs, lib)
+def do_rake_compiler_setup
+  if RUBY_PLATFORM =~ /mingw/
+    $CFLAGS = $CFLAGS + " -I/usr/local/include"
+    $LDFLAGS = $LDFLAGS + " -I/usr/local/lib"
+    %w{stdc++ glu32 opengl32 wsock32 comctl32 mpr gdi32 winspool}.each {|lib| $libs = append_library($libs, lib) }
   end
-  have_header("sys/time.h")
-  have_header("signal.h")
-  if have_library("z", "deflate")
-    have_library("png", "png_create_read_struct")
-  end
-  have_library("jpeg", "jpeg_mem_init")
-  have_library("tiff", "TIFFSetErrorHandler")
-  $libs = append_library($libs, "FOX-1.6")
-  $CFLAGS = $CFLAGS + " -fpermissive -DWIN32 -Iinclude"
-  if is_fxscintilla_build?
-    FileUtils.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exist?('scintilla_wrap.cpp.bak')
-    $CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA -DHAVE_FOX_1_6"
-    $libs = append_library($libs, "fxscintilla")
-  else
-    FileUtils.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exist?('scintilla_wrap.cpp')
-  end
-end
-
-def do_mingw_setup
-  extra_libs = %w{stdc++ glu32 opengl32 wsock32 comctl32 mpr gdi32 winspool}
-  extra_libs.each do |lib|
-    $libs = append_library($libs, lib)
-  end
-# have_header("sys/time.h")
+  $libs = append_library($libs, "stdc++")
+  have_header("sys/time.h") unless RUBY_PLATFORM =~ /mingw/
   have_header("signal.h")
   if have_library("z", "deflate")
     have_library("png", "png_create_read_struct")
   end
   have_library("jpeg", "jpeg_mem_init")
   have_library("tiff", "TIFFSetErrorHandler")
-  $libs = append_library($libs, "FOX-1.6")
-  $CFLAGS = $CFLAGS + " -fpermissive -DWIN32 -Iinclude"
-  if is_fxscintilla_build?
-    FileUtils.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exist?('scintilla_wrap.cpp.bak')
-    $CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA -DHAVE_FOX_1_6"
-    $libs = append_library($libs, "fxscintilla")
-  else
-    FileUtils.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exist?('scintilla_wrap.cpp')
-  end
-end
-
-def do_mswin32_setup
-  extra_libs = %w{glu32 opengl32 mpr wsock32 comctl32 winspool shell32 advapi32 shell32 gdi32 user32}
-  extra_libs.each do |lib|
-    $libs = append_library($libs, lib)
-  end
-  have_header("sys/time.h")
-  have_header("signal.h")
-  have_library("zlib", "deflate")
-  have_library("libpng", "png_create_read_struct")
-  have_library("libjpeg", "jpeg_mem_init")
-  have_library("libtiff", "TIFFSetErrorHandler")
-# $CFLAGS = $CFLAGS + " /DWIN32 /GR /GX /DFOXDLL /Iinclude"
-# $LOCAL_LIBS = $LOCAL_LIBS + "foxdll.lib"
-  $CFLAGS = $CFLAGS + " /DWIN32 /DUNICODE /GR /GX /Iinclude"
-  $LOCAL_LIBS = $LOCAL_LIBS + "FOX-1.6.lib"
-  if is_fxscintilla_build?
-    FileUtils.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exist?('scintilla_wrap.cpp.bak')
-    $CFLAGS = $CFLAGS + " /DWITH_FXSCINTILLA /DHAVE_FOX_1_6"
-    $libs = append_library($libs, "fxscintilla")
-  else
-    FileUtils.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exist?('scintilla_wrap.cpp')
-  end
-end
-
-def do_unix_setup
-  $libs = append_library($libs, "stdc++")
-# $libs = append_library($libs, "supc++")
-  have_header("sys/time.h")
-  have_header("signal.h")
-  have_library("png", "png_create_read_struct")
-  have_library("z", "deflate")
-  have_library("jpeg", "jpeg_mem_init")
-  have_library("tiff", "TIFFSetErrorHandler")
-  find_library("Xext", "XShmQueryVersion", "/usr/X11R6/lib")
-  find_library("X11", "XFindContext", "/usr/X11R6/lib")
-  find_library("GL", "glXCreateContext", "/usr/X11R6/lib")
-  find_library("GLU", "gluNewQuadric", "/usr/X11R6/lib")
-  $libs = append_library($libs, "FOX-1.6")
-  $libs = append_library($libs, "Xrandr")
-  $CFLAGS = $CFLAGS + " -O0 -Iinclude"
-  if is_fxscintilla_build?
-    FileUtils.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exist?('scintilla_wrap.cpp.bak')
-    $CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA -DHAVE_FOX_1_6"
-    $libs = append_library($libs, "fxscintilla")
-  else
-    FileUtils.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exist?('scintilla_wrap.cpp')
-  end
-end
-
-def do_darwin_setup
-  $libs = append_library($libs, "stdc++")
-  have_header("sys/time.h")
-  have_header("signal.h")
-  have_library("png", "png_create_read_struct")
-  have_library("z", "deflate")
-  have_library("jpeg", "jpeg_mem_init")
-  have_library("tiff", "TIFFSetErrorHandler")
   find_library("Xext", "XShmQueryVersion", "/usr/X11R6/lib")
   find_library("X11", "XFindContext", "/usr/X11R6/lib")
   find_library("GL", "glXCreateContext", "/usr/X11R6/lib")
   find_library("GLU", "gluNewQuadric", "/usr/X11R6/lib")
   $libs = append_library($libs, "FOX-1.6")
-  $libs = append_library($libs, "Xrandr")
-  $libs = append_library($libs, "Xcursor")
+  $libs = append_library($libs, "Xrandr") unless RUBY_PLATFORM =~ /mingw/
+  $libs = append_library($libs, "Xcursor") unless RUBY_PLATFORM =~ /mingw/
   $libs = append_library($libs, "png")
-  $CFLAGS = $CFLAGS + " -O0 -Iinclude"
+  $CFLAGS = $CFLAGS + " -O0 -I#{File.join(File.dirname(__FILE__), 'include')}"
   if is_fxscintilla_build?
     FileUtils.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exist?('scintilla_wrap.cpp.bak')
     $CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA -DHAVE_FOX_1_6"
@@ -216,17 +127,7 @@ unless fxscintilla_support_suppressed?
 end
 
 # Platform-specific modifications
-if RUBY_PLATFORM =~ /cygwin/
-  do_cygwin_setup
-elsif RUBY_PLATFORM =~ /mingw/
-  do_mingw_setup
-elsif RUBY_PLATFORM =~ /mswin32/
-  do_mswin32_setup
-elsif RUBY_PLATFORM =~ /darwin/
-  do_darwin_setup
-else
-  do_unix_setup
-end
+do_rake_compiler_setup
 
 # Check for Ruby 1.9
 $CFLAGS += " -DRUBY_1_9" if RUBY_VERSION =~ /1\.9\./
diff --git a/fxruby-mswin32.gemspec b/fxruby-mswin32.gemspec
deleted file mode 100755
index 1533928219acd394082c2646736d9d1a882150f5..0000000000000000000000000000000000000000
--- a/fxruby-mswin32.gemspec
+++ /dev/null
@@ -1,72 +0,0 @@
-# Source gem spec file
-
-require 'rubygems'
-
-# These library files aren't ready for distribution yet.
-COOKER_LIBS = %w{acceltable.rb bitmapview.rb canvas.rb html.rb tkcompat.rb}
-
-# These example programs aren't ready for distribution yet.
-COOKER_EXAMPLES = %w{canvasdemo.rb WhatAQuietStiff.rb examples.rb gdchart.rb gembrowser.rb rapt-gui.rb}
-
-PKG_FILES = [
-  "ANNOUNCE",
-  "ChangeLog",
-  "LICENSE",
-  "README",
-  "index.html",
-  "doc/*.html",
-  "doc/images/*.png",
-  "examples/README",
-  "examples/*.rb",
-  "examples/*.xml",
-  "examples/icons/*.png",
-  "examples/icons/*.ico",
-  "examples/textedit/*.rb",
-  "lib/fox16/*.rb",
-  "ext/fox16/fox14.so",
-  "tests/README",
-  "tests/*.rb",
-  "tests/*.ps",
-  "web/*.html",
-  "web/*.css",
-  "web/art/*.png",
-  "web/art/*.gif",
-  "rdoc-sources/*.rb",
-  "rdoc-sources/README.rdoc"
-]
-
-spec = Gem::Specification.new do |s|
-  s.name = 'fxruby'
-  s.version = "1.6.0"
-  s.platform = Gem::Platform::WIN32
-  s.description = "FXRuby is the Ruby binding to the FOX GUI toolkit."
-  s.requirements << "FOX library version 1.6.0 or higher"
-  s.summary = "FXRuby is the Ruby binding to the FOX GUI toolkit."
-
-  s.files = []
-  PKG_FILES.each do |pat|
-    s.files += Dir.glob(pat).delete_if { |item|
-      COOKER_LIBS.include?(File.basename(item)) || COOKER_EXAMPLES.include?(File.basename(item))
-    }
-  end
-
-  s.require_paths = ['ext/fox16', 'lib']
-  s.autorequire = 'fox16'
-
-  s.has_rdoc = true
-  s.rdoc_options = [
-                    '--main', File.join('rdoc-sources', 'README.rdoc'),
-                    '--exclude', 'ext/fox16'
-                   ]
-  s.extra_rdoc_files = [
-                        'rdoc-sources',
-                        File.join('rdoc-sources', 'README.rdoc')
-                       ]
-
-  s.test_suite_file = "tests/TS_All.rb"
-
-  s.author = "Lyle Johnson"
-  s.email = "lyle@knology.net"
-  s.homepage = "http://www.fxruby.org"
-end
-
diff --git a/install.rb b/install.rb
deleted file mode 100755
index 424a5f37c6fe3a7cac54b0f85688c1cce7da9cdf..0000000000000000000000000000000000000000
--- a/install.rb
+++ /dev/null
@@ -1,1585 +0,0 @@
-#
-# setup.rb
-#
-# Copyright (c) 2000-2005 Minero Aoki
-#
-# This program is free software.
-# You can distribute/modify this program under the terms of
-# the GNU LGPL, Lesser General Public License version 2.1.
-#
-
-unless Enumerable.method_defined?(:map)   # Ruby 1.4.6
-  module Enumerable
-    alias map collect
-  end
-end
-
-unless File.respond_to?(:read)   # Ruby 1.6
-  def File.read(fname)
-    open(fname) {|f|
-      return f.read
-    }
-  end
-end
-
-unless Errno.const_defined?(:ENOTEMPTY)   # Windows?
-  module Errno
-    class ENOTEMPTY
-      # We do not raise this exception, implementation is not needed.
-    end
-  end
-end
-
-def File.binread(fname)
-  open(fname, 'rb') {|f|
-    return f.read
-  }
-end
-
-# for corrupted Windows' stat(2)
-def File.dir?(path)
-  File.directory?((path[-1,1] == '/') ? path : path + '/')
-end
-
-
-class ConfigTable
-
-  include Enumerable
-
-  def initialize(rbconfig)
-    @rbconfig = rbconfig
-    @items = []
-    @table = {}
-    # options
-    @install_prefix = nil
-    @config_opt = nil
-    @verbose = true
-    @no_harm = false
-  end
-
-  attr_accessor :install_prefix
-  attr_accessor :config_opt
-
-  attr_writer :verbose
-
-  def verbose?
-    @verbose
-  end
-
-  attr_writer :no_harm
-
-  def no_harm?
-    @no_harm
-  end
-
-  def [](key)
-    lookup(key).resolve(self)
-  end
-
-  def []=(key, val)
-    lookup(key).set val
-  end
-
-  def names
-    @items.map {|i| i.name }
-  end
-
-  def each(&block)
-    @items.each(&block)
-  end
-
-  def key?(name)
-    @table.key?(name)
-  end
-
-  def lookup(name)
-    @table[name] or setup_rb_error "no such config item: #{name}"
-  end
-
-  def add(item)
-    @items.push item
-    @table[item.name] = item
-  end
-
-  def remove(name)
-    item = lookup(name)
-    @items.delete_if {|i| i.name == name }
-    @table.delete_if {|name, i| i.name == name }
-    item
-  end
-
-  def load_script(path, inst = nil)
-    if File.file?(path)
-      MetaConfigEnvironment.new(self, inst).instance_eval File.read(path), path
-    end
-  end
-
-  def savefile
-    '.config'
-  end
-
-  def load_savefile
-    begin
-      File.foreach(savefile()) do |line|
-        k, v = *line.split(/=/, 2)
-        self[k] = v.strip
-      end
-    rescue Errno::ENOENT
-      setup_rb_error $!.message + "\n#{File.basename($0)} config first"
-    end
-  end
-
-  def save
-    @items.each {|i| i.value }
-    File.open(savefile(), 'w') {|f|
-      @items.each do |i|
-        f.printf "%s=%s\n", i.name, i.value if i.value? and i.value
-      end
-    }
-  end
-
-  def load_standard_entries
-    standard_entries(@rbconfig).each do |ent|
-      add ent
-    end
-  end
-
-  def standard_entries(rbconfig)
-    c = rbconfig
-
-    rubypath = File.join(c['bindir'], c['ruby_install_name'] + c['EXEEXT'])
-
-    major = c['MAJOR'].to_i
-    minor = c['MINOR'].to_i
-    teeny = c['TEENY'].to_i
-    version = "#{major}.#{minor}"
-
-    # ruby ver. >= 1.4.4?
-    newpath_p = ((major >= 2) or
-                 ((major == 1) and
-                  ((minor >= 5) or
-                   ((minor == 4) and (teeny >= 4)))))
-
-    if c['rubylibdir']
-      # V > 1.6.3
-      libruby         = "#{c['prefix']}/lib/ruby"
-      librubyver      = c['rubylibdir']
-      librubyverarch  = c['archdir']
-      siteruby        = c['sitedir']
-      siterubyver     = c['sitelibdir']
-      siterubyverarch = c['sitearchdir']
-    elsif newpath_p
-      # 1.4.4 <= V <= 1.6.3
-      libruby         = "#{c['prefix']}/lib/ruby"
-      librubyver      = "#{c['prefix']}/lib/ruby/#{version}"
-      librubyverarch  = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}"
-      siteruby        = c['sitedir']
-      siterubyver     = "$siteruby/#{version}"
-      siterubyverarch = "$siterubyver/#{c['arch']}"
-    else
-      # V < 1.4.4
-      libruby         = "#{c['prefix']}/lib/ruby"
-      librubyver      = "#{c['prefix']}/lib/ruby/#{version}"
-      librubyverarch  = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}"
-      siteruby        = "#{c['prefix']}/lib/ruby/#{version}/site_ruby"
-      siterubyver     = siteruby
-      siterubyverarch = "$siterubyver/#{c['arch']}"
-    end
-    parameterize = lambda {|path|
-      path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix')
-    }
-
-    if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg }
-      makeprog = arg.sub(/'/, '').split(/=/, 2)[1]
-    else
-      makeprog = 'make'
-    end
-
-    [
-      ExecItem.new('installdirs', 'std/site/home',
-                   'std: install under libruby; site: install under site_ruby; home: install under $HOME')\
-          {|val, table|
-            case val
-            when 'std'
-              table['rbdir'] = '$librubyver'
-              table['sodir'] = '$librubyverarch'
-            when 'site'
-              table['rbdir'] = '$siterubyver'
-              table['sodir'] = '$siterubyverarch'
-            when 'home'
-              setup_rb_error '$HOME was not set' unless ENV['HOME']
-              table['prefix'] = ENV['HOME']
-              table['rbdir'] = '$libdir/ruby'
-              table['sodir'] = '$libdir/ruby'
-            end
-          },
-      PathItem.new('prefix', 'path', c['prefix'],
-                   'path prefix of target environment'),
-      PathItem.new('bindir', 'path', parameterize.call(c['bindir']),
-                   'the directory for commands'),
-      PathItem.new('libdir', 'path', parameterize.call(c['libdir']),
-                   'the directory for libraries'),
-      PathItem.new('datadir', 'path', parameterize.call(c['datadir']),
-                   'the directory for shared data'),
-      PathItem.new('mandir', 'path', parameterize.call(c['mandir']),
-                   'the directory for man pages'),
-      PathItem.new('sysconfdir', 'path', parameterize.call(c['sysconfdir']),
-                   'the directory for system configuration files'),
-      PathItem.new('localstatedir', 'path', parameterize.call(c['localstatedir']),
-                   'the directory for local state data'),
-      PathItem.new('libruby', 'path', libruby,
-                   'the directory for ruby libraries'),
-      PathItem.new('librubyver', 'path', librubyver,
-                   'the directory for standard ruby libraries'),
-      PathItem.new('librubyverarch', 'path', librubyverarch,
-                   'the directory for standard ruby extensions'),
-      PathItem.new('siteruby', 'path', siteruby,
-          'the directory for version-independent aux ruby libraries'),
-      PathItem.new('siterubyver', 'path', siterubyver,
-                   'the directory for aux ruby libraries'),
-      PathItem.new('siterubyverarch', 'path', siterubyverarch,
-                   'the directory for aux ruby binaries'),
-      PathItem.new('rbdir', 'path', '$siterubyver',
-                   'the directory for ruby scripts'),
-      PathItem.new('sodir', 'path', '$siterubyverarch',
-                   'the directory for ruby extentions'),
-      PathItem.new('rubypath', 'path', rubypath,
-                   'the path to set to #! line'),
-      ProgramItem.new('rubyprog', 'name', rubypath,
-                      'the ruby program using for installation'),
-      ProgramItem.new('makeprog', 'name', makeprog,
-                      'the make program to compile ruby extentions'),
-      SelectItem.new('shebang', 'all/ruby/never', 'ruby',
-                     'shebang line (#!) editing mode'),
-      BoolItem.new('without-ext', 'yes/no', 'no',
-                   'does not compile/install ruby extentions')
-    ]
-  end
-  private :standard_entries
-
-  def load_multipackage_entries
-    multipackage_entries().each do |ent|
-      add ent
-    end
-  end
-
-  def multipackage_entries
-    [
-      PackageSelectionItem.new('with', 'name,name...', '', 'ALL',
-                               'package names that you want to install'),
-      PackageSelectionItem.new('without', 'name,name...', '', 'NONE',
-                               'package names that you do not want to install')
-    ]
-  end
-  private :multipackage_entries
-
-  ALIASES = {
-    'std-ruby'         => 'librubyver',
-    'stdruby'          => 'librubyver',
-    'rubylibdir'       => 'librubyver',
-    'archdir'          => 'librubyverarch',
-    'site-ruby-common' => 'siteruby',     # For backward compatibility
-    'site-ruby'        => 'siterubyver',  # For backward compatibility
-    'bin-dir'          => 'bindir',
-    'bin-dir'          => 'bindir',
-    'rb-dir'           => 'rbdir',
-    'so-dir'           => 'sodir',
-    'data-dir'         => 'datadir',
-    'ruby-path'        => 'rubypath',
-    'ruby-prog'        => 'rubyprog',
-    'ruby'             => 'rubyprog',
-    'make-prog'        => 'makeprog',
-    'make'             => 'makeprog'
-  }
-
-  def fixup
-    ALIASES.each do |ali, name|
-      @table[ali] = @table[name]
-    end
-    @items.freeze
-    @table.freeze
-    @options_re = /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/
-  end
-
-  def parse_opt(opt)
-    m = @options_re.match(opt) or setup_rb_error "config: unknown option #{opt}"
-    m.to_a[1,2]
-  end
-
-  def dllext
-    @rbconfig['DLEXT']
-  end
-
-  def value_config?(name)
-    lookup(name).value?
-  end
-
-  class Item
-    def initialize(name, template, default, desc)
-      @name = name.freeze
-      @template = template
-      @value = default
-      @default = default
-      @description = desc
-    end
-
-    attr_reader :name
-    attr_reader :description
-
-    attr_accessor :default
-    alias help_default default
-
-    def help_opt
-      "--#{@name}=#{@template}"
-    end
-
-    def value?
-      true
-    end
-
-    def value
-      @value
-    end
-
-    def resolve(table)
-      @value.gsub(%r<\$([^/]+)>) { table[$1] }
-    end
-
-    def set(val)
-      @value = check(val)
-    end
-
-    private
-
-    def check(val)
-      setup_rb_error "config: --#{name} requires argument" unless val
-      val
-    end
-  end
-
-  class BoolItem < Item
-    def config_type
-      'bool'
-    end
-
-    def help_opt
-      "--#{@name}"
-    end
-
-    private
-
-    def check(val)
-      return 'yes' unless val
-      case val
-      when /\Ay(es)?\z/i, /\At(rue)?\z/i then 'yes'
-      when /\An(o)?\z/i, /\Af(alse)\z/i  then 'no'
-      else
-        setup_rb_error "config: --#{@name} accepts only yes/no for argument"
-      end
-    end
-  end
-
-  class PathItem < Item
-    def config_type
-      'path'
-    end
-
-    private
-
-    def check(path)
-      setup_rb_error "config: --#{@name} requires argument"  unless path
-      path[0,1] == '$' ? path : File.expand_path(path)
-    end
-  end
-
-  class ProgramItem < Item
-    def config_type
-      'program'
-    end
-  end
-
-  class SelectItem < Item
-    def initialize(name, selection, default, desc)
-      super
-      @ok = selection.split('/')
-    end
-
-    def config_type
-      'select'
-    end
-
-    private
-
-    def check(val)
-      unless @ok.include?(val.strip)
-        setup_rb_error "config: use --#{@name}=#{@template} (#{val})"
-      end
-      val.strip
-    end
-  end
-
-  class ExecItem < Item
-    def initialize(name, selection, desc, &block)
-      super name, selection, nil, desc
-      @ok = selection.split('/')
-      @action = block
-    end
-
-    def config_type
-      'exec'
-    end
-
-    def value?
-      false
-    end
-
-    def resolve(table)
-      setup_rb_error "$#{name()} wrongly used as option value"
-    end
-
-    undef set
-
-    def evaluate(val, table)
-      v = val.strip.downcase
-      unless @ok.include?(v)
-        setup_rb_error "invalid option --#{@name}=#{val} (use #{@template})"
-      end
-      @action.call v, table
-    end
-  end
-
-  class PackageSelectionItem < Item
-    def initialize(name, template, default, help_default, desc)
-      super name, template, default, desc
-      @help_default = help_default
-    end
-
-    attr_reader :help_default
-
-    def config_type
-      'package'
-    end
-
-    private
-
-    def check(val)
-      unless File.dir?("packages/#{val}")
-        setup_rb_error "config: no such package: #{val}"
-      end
-      val
-    end
-  end
-
-  class MetaConfigEnvironment
-    def initialize(config, installer)
-      @config = config
-      @installer = installer
-    end
-
-    def config_names
-      @config.names
-    end
-
-    def config?(name)
-      @config.key?(name)
-    end
-
-    def bool_config?(name)
-      @config.lookup(name).config_type == 'bool'
-    end
-
-    def path_config?(name)
-      @config.lookup(name).config_type == 'path'
-    end
-
-    def value_config?(name)
-      @config.lookup(name).config_type != 'exec'
-    end
-
-    def add_config(item)
-      @config.add item
-    end
-
-    def add_bool_config(name, default, desc)
-      @config.add BoolItem.new(name, 'yes/no', default ? 'yes' : 'no', desc)
-    end
-
-    def add_path_config(name, default, desc)
-      @config.add PathItem.new(name, 'path', default, desc)
-    end
-
-    def set_config_default(name, default)
-      @config.lookup(name).default = default
-    end
-
-    def remove_config(name)
-      @config.remove(name)
-    end
-
-    # For only multipackage
-    def packages
-      raise '[setup.rb fatal] multi-package metaconfig API packages() called for single-package; contact application package vendor' unless @installer
-      @installer.packages
-    end
-
-    # For only multipackage
-    def declare_packages(list)
-      raise '[setup.rb fatal] multi-package metaconfig API declare_packages() called for single-package; contact application package vendor' unless @installer
-      @installer.packages = list
-    end
-  end
-
-end   # class ConfigTable
-
-
-# This module requires: #verbose?, #no_harm?
-module FileOperations
-
-  def mkdir_p(dirname, prefix = nil)
-    dirname = prefix + File.expand_path(dirname) if prefix
-    $stderr.puts "mkdir -p #{dirname}" if verbose?
-    return if no_harm?
-
-    # Does not check '/', it's too abnormal.
-    dirs = File.expand_path(dirname).split(%r<(?=/)>)
-    if /\A[a-z]:\z/i =~ dirs[0]
-      disk = dirs.shift
-      dirs[0] = disk + dirs[0]
-    end
-    dirs.each_index do |idx|
-      path = dirs[0..idx].join('')
-      Dir.mkdir path unless File.dir?(path)
-    end
-  end
-
-  def rm_f(path)
-    $stderr.puts "rm -f #{path}" if verbose?
-    return if no_harm?
-    force_remove_file path
-  end
-
-  def rm_rf(path)
-    $stderr.puts "rm -rf #{path}" if verbose?
-    return if no_harm?
-    remove_tree path
-  end
-
-  def remove_tree(path)
-    if File.symlink?(path)
-      remove_file path
-    elsif File.dir?(path)
-      remove_tree0 path
-    else
-      force_remove_file path
-    end
-  end
-
-  def remove_tree0(path)
-    Dir.foreach(path) do |ent|
-      next if ent == '.'
-      next if ent == '..'
-      entpath = "#{path}/#{ent}"
-      if File.symlink?(entpath)
-        remove_file entpath
-      elsif File.dir?(entpath)
-        remove_tree0 entpath
-      else
-        force_remove_file entpath
-      end
-    end
-    begin
-      Dir.rmdir path
-    rescue Errno::ENOTEMPTY
-      # directory may not be empty
-    end
-  end
-
-  def move_file(src, dest)
-    force_remove_file dest
-    begin
-      File.rename src, dest
-    rescue
-      File.open(dest, 'wb') {|f|
-        f.write File.binread(src)
-      }
-      File.chmod File.stat(src).mode, dest
-      File.unlink src
-    end
-  end
-
-  def force_remove_file(path)
-    begin
-      remove_file path
-    rescue
-    end
-  end
-
-  def remove_file(path)
-    File.chmod 0777, path
-    File.unlink path
-  end
-
-  def install(from, dest, mode, prefix = nil)
-    $stderr.puts "install #{from} #{dest}" if verbose?
-    return if no_harm?
-
-    realdest = prefix ? prefix + File.expand_path(dest) : dest
-    realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest)
-    str = File.binread(from)
-    if diff?(str, realdest)
-      verbose_off {
-        rm_f realdest if File.exist?(realdest)
-      }
-      File.open(realdest, 'wb') {|f|
-        f.write str
-      }
-      File.chmod mode, realdest
-
-      File.open("#{objdir_root()}/InstalledFiles", 'a') {|f|
-        if prefix
-          f.puts realdest.sub(prefix, '')
-        else
-          f.puts realdest
-        end
-      }
-    end
-  end
-
-  def diff?(new_content, path)
-    return true unless File.exist?(path)
-    new_content != File.binread(path)
-  end
-
-  def command(*args)
-    $stderr.puts args.join(' ') if verbose?
-    system(*args) or raise RuntimeError,
-        "system(#{args.map{|a| a.inspect }.join(' ')}) failed"
-  end
-
-  def ruby(*args)
-    command config('rubyprog'), *args
-  end
-  
-  def make(task = nil)
-    command(*[config('makeprog'), task].compact)
-  end
-
-  def extdir?(dir)
-    File.exist?("#{dir}/MANIFEST") or File.exist?("#{dir}/extconf.rb")
-  end
-
-  def files_of(dir)
-    Dir.open(dir) {|d|
-      return d.select {|ent| File.file?("#{dir}/#{ent}") }
-    }
-  end
-
-  DIR_REJECT = %w( . .. CVS SCCS RCS CVS.adm .svn )
-
-  def directories_of(dir)
-    Dir.open(dir) {|d|
-      return d.select {|ent| File.dir?("#{dir}/#{ent}") } - DIR_REJECT
-    }
-  end
-
-end
-
-
-# This module requires: #srcdir_root, #objdir_root, #relpath
-module HookScriptAPI
-
-  def get_config(key)
-    @config[key]
-  end
-
-  alias config get_config
-
-  # obsolete: use metaconfig to change configuration
-  def set_config(key, val)
-    @config[key] = val
-  end
-
-  #
-  # srcdir/objdir (works only in the package directory)
-  #
-
-  def curr_srcdir
-    "#{srcdir_root()}/#{relpath()}"
-  end
-
-  def curr_objdir
-    "#{objdir_root()}/#{relpath()}"
-  end
-
-  def srcfile(path)
-    "#{curr_srcdir()}/#{path}"
-  end
-
-  def srcexist?(path)
-    File.exist?(srcfile(path))
-  end
-
-  def srcdirectory?(path)
-    File.dir?(srcfile(path))
-  end
-  
-  def srcfile?(path)
-    File.file?(srcfile(path))
-  end
-
-  def srcentries(path = '.')
-    Dir.open("#{curr_srcdir()}/#{path}") {|d|
-      return d.to_a - %w(. ..)
-    }
-  end
-
-  def srcfiles(path = '.')
-    srcentries(path).select {|fname|
-      File.file?(File.join(curr_srcdir(), path, fname))
-    }
-  end
-
-  def srcdirectories(path = '.')
-    srcentries(path).select {|fname|
-      File.dir?(File.join(curr_srcdir(), path, fname))
-    }
-  end
-
-end
-
-
-class ToplevelInstaller
-
-  Version   = '3.4.1'
-  Copyright = 'Copyright (c) 2000-2005 Minero Aoki'
-
-  TASKS = [
-    [ 'all',      'do config, setup, then install' ],
-    [ 'config',   'saves your configurations' ],
-    [ 'show',     'shows current configuration' ],
-    [ 'setup',    'compiles ruby extentions and others' ],
-    [ 'install',  'installs files' ],
-    [ 'test',     'run all tests in test/' ],
-    [ 'clean',    "does `make clean' for each extention" ],
-    [ 'distclean',"does `make distclean' for each extention" ]
-  ]
-
-  def ToplevelInstaller.invoke
-    config = ConfigTable.new(load_rbconfig())
-    config.load_standard_entries
-    config.load_multipackage_entries if multipackage?
-    config.fixup
-    klass = (multipackage?() ? ToplevelInstallerMulti : ToplevelInstaller)
-    klass.new(File.dirname($0), config).invoke
-  end
-
-  def ToplevelInstaller.multipackage?
-    File.dir?(File.dirname($0) + '/packages')
-  end
-
-  def ToplevelInstaller.load_rbconfig
-    if arg = ARGV.detect {|arg| /\A--rbconfig=/ =~ arg }
-      ARGV.delete(arg)
-      load File.expand_path(arg.split(/=/, 2)[1])
-      $".push 'rbconfig.rb'
-    else
-      require 'rbconfig'
-    end
-    ::Config::CONFIG
-  end
-
-  def initialize(ardir_root, config)
-    @ardir = File.expand_path(ardir_root)
-    @config = config
-    # cache
-    @valid_task_re = nil
-  end
-
-  def config(key)
-    @config[key]
-  end
-
-  def inspect
-    "#<#{self.class} #{__id__()}>"
-  end
-
-  def invoke
-    run_metaconfigs
-    case task = parsearg_global()
-    when nil, 'all'
-      parsearg_config
-      init_installers
-      exec_config
-      exec_setup
-      exec_install
-    else
-      case task
-      when 'config', 'test'
-        ;
-      when 'clean', 'distclean'
-        @config.load_savefile if File.exist?(@config.savefile)
-      else
-        @config.load_savefile
-      end
-      __send__ "parsearg_#{task}"
-      init_installers
-      __send__ "exec_#{task}"
-    end
-  end
-  
-  def run_metaconfigs
-    @config.load_script "#{@ardir}/metaconfig"
-  end
-
-  def init_installers
-    @installer = Installer.new(@config, @ardir, File.expand_path('.'))
-  end
-
-  #
-  # Hook Script API bases
-  #
-
-  def srcdir_root
-    @ardir
-  end
-
-  def objdir_root
-    '.'
-  end
-
-  def relpath
-    '.'
-  end
-
-  #
-  # Option Parsing
-  #
-
-  def parsearg_global
-    while arg = ARGV.shift
-      case arg
-      when /\A\w+\z/
-        setup_rb_error "invalid task: #{arg}" unless valid_task?(arg)
-        return arg
-      when '-q', '--quiet'
-        @config.verbose = false
-      when '--verbose'
-        @config.verbose = true
-      when '--help'
-        print_usage $stdout
-        exit 0
-      when '--version'
-        puts "#{File.basename($0)} version #{Version}"
-        exit 0
-      when '--copyright'
-        puts Copyright
-        exit 0
-      else
-        setup_rb_error "unknown global option '#{arg}'"
-      end
-    end
-    nil
-  end
-
-  def valid_task?(t)
-    valid_task_re() =~ t
-  end
-
-  def valid_task_re
-    @valid_task_re ||= /\A(?:#{TASKS.map {|task,desc| task }.join('|')})\z/
-  end
-
-  def parsearg_no_options
-    unless ARGV.empty?
-      task = caller(0).first.slice(%r<`parsearg_(\w+)'>, 1)
-      setup_rb_error "#{task}: unknown options: #{ARGV.join(' ')}"
-    end
-  end
-
-  alias parsearg_show       parsearg_no_options
-  alias parsearg_setup      parsearg_no_options
-  alias parsearg_test       parsearg_no_options
-  alias parsearg_clean      parsearg_no_options
-  alias parsearg_distclean  parsearg_no_options
-
-  def parsearg_config
-    evalopt = []
-    set = []
-    @config.config_opt = []
-    while i = ARGV.shift
-      if /\A--?\z/ =~ i
-        @config.config_opt = ARGV.dup
-        break
-      end
-      name, value = *@config.parse_opt(i)
-      if @config.value_config?(name)
-        @config[name] = value
-      else
-        evalopt.push [name, value]
-      end
-      set.push name
-    end
-    evalopt.each do |name, value|
-      @config.lookup(name).evaluate value, @config
-    end
-    # Check if configuration is valid
-    set.each do |n|
-      @config[n] if @config.value_config?(n)
-    end
-  end
-
-  def parsearg_install
-    @config.no_harm = false
-    @config.install_prefix = ''
-    while a = ARGV.shift
-      case a
-      when '--no-harm'
-        @config.no_harm = true
-      when /\A--prefix=/
-        path = a.split(/=/, 2)[1]
-        path = File.expand_path(path) unless path[0,1] == '/'
-        @config.install_prefix = path
-      else
-        setup_rb_error "install: unknown option #{a}"
-      end
-    end
-  end
-
-  def print_usage(out)
-    out.puts 'Typical Installation Procedure:'
-    out.puts "  $ ruby #{File.basename $0} config"
-    out.puts "  $ ruby #{File.basename $0} setup"
-    out.puts "  # ruby #{File.basename $0} install (may require root privilege)"
-    out.puts
-    out.puts 'Detailed Usage:'
-    out.puts "  ruby #{File.basename $0} <global option>"
-    out.puts "  ruby #{File.basename $0} [<global options>] <task> [<task options>]"
-
-    fmt = "  %-24s %s\n"
-    out.puts
-    out.puts 'Global options:'
-    out.printf fmt, '-q,--quiet',   'suppress message outputs'
-    out.printf fmt, '   --verbose', 'output messages verbosely'
-    out.printf fmt, '   --help',    'print this message'
-    out.printf fmt, '   --version', 'print version and quit'
-    out.printf fmt, '   --copyright',  'print copyright and quit'
-    out.puts
-    out.puts 'Tasks:'
-    TASKS.each do |name, desc|
-      out.printf fmt, name, desc
-    end
-
-    fmt = "  %-24s %s [%s]\n"
-    out.puts
-    out.puts 'Options for CONFIG or ALL:'
-    @config.each do |item|
-      out.printf fmt, item.help_opt, item.description, item.help_default
-    end
-    out.printf fmt, '--rbconfig=path', 'rbconfig.rb to load',"running ruby's"
-    out.puts
-    out.puts 'Options for INSTALL:'
-    out.printf fmt, '--no-harm', 'only display what to do if given', 'off'
-    out.printf fmt, '--prefix=path',  'install path prefix', ''
-    out.puts
-  end
-
-  #
-  # Task Handlers
-  #
-
-  def exec_config
-    @installer.exec_config
-    @config.save   # must be final
-  end
-
-  def exec_setup
-    @installer.exec_setup
-  end
-
-  def exec_install
-    @installer.exec_install
-  end
-
-  def exec_test
-    @installer.exec_test
-  end
-
-  def exec_show
-    @config.each do |i|
-      printf "%-20s %s\n", i.name, i.value if i.value?
-    end
-  end
-
-  def exec_clean
-    @installer.exec_clean
-  end
-
-  def exec_distclean
-    @installer.exec_distclean
-  end
-
-end   # class ToplevelInstaller
-
-
-class ToplevelInstallerMulti < ToplevelInstaller
-
-  include FileOperations
-
-  def initialize(ardir_root, config)
-    super
-    @packages = directories_of("#{@ardir}/packages")
-    raise 'no package exists' if @packages.empty?
-    @root_installer = Installer.new(@config, @ardir, File.expand_path('.'))
-  end
-
-  def run_metaconfigs
-    @config.load_script "#{@ardir}/metaconfig", self
-    @packages.each do |name|
-      @config.load_script "#{@ardir}/packages/#{name}/metaconfig"
-    end
-  end
-
-  attr_reader :packages
-
-  def packages=(list)
-    raise 'package list is empty' if list.empty?
-    list.each do |name|
-      raise "directory packages/#{name} does not exist"\
-              unless File.dir?("#{@ardir}/packages/#{name}")
-    end
-    @packages = list
-  end
-
-  def init_installers
-    @installers = {}
-    @packages.each do |pack|
-      @installers[pack] = Installer.new(@config,
-                                       "#{@ardir}/packages/#{pack}",
-                                       "packages/#{pack}")
-    end
-    with    = extract_selection(config('with'))
-    without = extract_selection(config('without'))
-    @selected = @installers.keys.select {|name|
-                  (with.empty? or with.include?(name)) \
-                      and not without.include?(name)
-                }
-  end
-
-  def extract_selection(list)
-    a = list.split(/,/)
-    a.each do |name|
-      setup_rb_error "no such package: #{name}"  unless @installers.key?(name)
-    end
-    a
-  end
-
-  def print_usage(f)
-    super
-    f.puts 'Inluded packages:'
-    f.puts '  ' + @packages.sort.join(' ')
-    f.puts
-  end
-
-  #
-  # Task Handlers
-  #
-
-  def exec_config
-    run_hook 'pre-config'
-    each_selected_installers {|inst| inst.exec_config }
-    run_hook 'post-config'
-    @config.save   # must be final
-  end
-
-  def exec_setup
-    run_hook 'pre-setup'
-    each_selected_installers {|inst| inst.exec_setup }
-    run_hook 'post-setup'
-  end
-
-  def exec_install
-    run_hook 'pre-install'
-    each_selected_installers {|inst| inst.exec_install }
-    run_hook 'post-install'
-  end
-
-  def exec_test
-    run_hook 'pre-test'
-    each_selected_installers {|inst| inst.exec_test }
-    run_hook 'post-test'
-  end
-
-  def exec_clean
-    rm_f @config.savefile
-    run_hook 'pre-clean'
-    each_selected_installers {|inst| inst.exec_clean }
-    run_hook 'post-clean'
-  end
-
-  def exec_distclean
-    rm_f @config.savefile
-    run_hook 'pre-distclean'
-    each_selected_installers {|inst| inst.exec_distclean }
-    run_hook 'post-distclean'
-  end
-
-  #
-  # lib
-  #
-
-  def each_selected_installers
-    Dir.mkdir 'packages' unless File.dir?('packages')
-    @selected.each do |pack|
-      $stderr.puts "Processing the package `#{pack}' ..." if verbose?
-      Dir.mkdir "packages/#{pack}" unless File.dir?("packages/#{pack}")
-      Dir.chdir "packages/#{pack}"
-      yield @installers[pack]
-      Dir.chdir '../..'
-    end
-  end
-
-  def run_hook(id)
-    @root_installer.run_hook id
-  end
-
-  # module FileOperations requires this
-  def verbose?
-    @config.verbose?
-  end
-
-  # module FileOperations requires this
-  def no_harm?
-    @config.no_harm?
-  end
-
-end   # class ToplevelInstallerMulti
-
-
-class Installer
-
-  FILETYPES = %w( bin lib ext data conf man )
-
-  include FileOperations
-  include HookScriptAPI
-
-  def initialize(config, srcroot, objroot)
-    @config = config
-    @srcdir = File.expand_path(srcroot)
-    @objdir = File.expand_path(objroot)
-    @currdir = '.'
-  end
-
-  def inspect
-    "#<#{self.class} #{File.basename(@srcdir)}>"
-  end
-
-  def noop(rel)
-  end
-
-  #
-  # Hook Script API base methods
-  #
-
-  def srcdir_root
-    @srcdir
-  end
-
-  def objdir_root
-    @objdir
-  end
-
-  def relpath
-    @currdir
-  end
-
-  #
-  # Config Access
-  #
-
-  # module FileOperations requires this
-  def verbose?
-    @config.verbose?
-  end
-
-  # module FileOperations requires this
-  def no_harm?
-    @config.no_harm?
-  end
-
-  def verbose_off
-    begin
-      save, @config.verbose = @config.verbose?, false
-      yield
-    ensure
-      @config.verbose = save
-    end
-  end
-
-  #
-  # TASK config
-  #
-
-  def exec_config
-    exec_task_traverse 'config'
-  end
-
-  alias config_dir_bin noop
-  alias config_dir_lib noop
-
-  def config_dir_ext(rel)
-    extconf if extdir?(curr_srcdir())
-  end
-
-  alias config_dir_data noop
-  alias config_dir_conf noop
-  alias config_dir_man noop
-
-  def extconf
-    ruby "#{curr_srcdir()}/extconf.rb", *@config.config_opt
-  end
-
-  #
-  # TASK setup
-  #
-
-  def exec_setup
-    exec_task_traverse 'setup'
-  end
-
-  def setup_dir_bin(rel)
-    files_of(curr_srcdir()).each do |fname|
-      update_shebang_line "#{curr_srcdir()}/#{fname}"
-    end
-  end
-
-  alias setup_dir_lib noop
-
-  def setup_dir_ext(rel)
-    make if extdir?(curr_srcdir())
-  end
-
-  alias setup_dir_data noop
-  alias setup_dir_conf noop
-  alias setup_dir_man noop
-
-  def update_shebang_line(path)
-    return if no_harm?
-    return if config('shebang') == 'never'
-    old = Shebang.load(path)
-    if old
-      $stderr.puts "warning: #{path}: Shebang line includes too many args.  It is not portable and your program may not work." if old.args.size > 1
-      new = new_shebang(old)
-      return if new.to_s == old.to_s
-    else
-      return unless config('shebang') == 'all'
-      new = Shebang.new(config('rubypath'))
-    end
-    $stderr.puts "updating shebang: #{File.basename(path)}" if verbose?
-    open_atomic_writer(path) {|output|
-      File.open(path, 'rb') {|f|
-        f.gets if old   # discard
-        output.puts new.to_s
-        output.print f.read
-      }
-    }
-  end
-
-  def new_shebang(old)
-    if /\Aruby/ =~ File.basename(old.cmd)
-      Shebang.new(config('rubypath'), old.args)
-    elsif File.basename(old.cmd) == 'env' and old.args.first == 'ruby'
-      Shebang.new(config('rubypath'), old.args[1..-1])
-    else
-      return old unless config('shebang') == 'all'
-      Shebang.new(config('rubypath'))
-    end
-  end
-
-  def open_atomic_writer(path, &block)
-    tmpfile = File.basename(path) + '.tmp'
-    begin
-      File.open(tmpfile, 'wb', &block)
-      File.rename tmpfile, File.basename(path)
-    ensure
-      File.unlink tmpfile if File.exist?(tmpfile)
-    end
-  end
-
-  class Shebang
-    def Shebang.load(path)
-      line = nil
-      File.open(path) {|f|
-        line = f.gets
-      }
-      return nil unless /\A#!/ =~ line
-      parse(line)
-    end
-
-    def Shebang.parse(line)
-      cmd, *args = *line.strip.sub(/\A\#!/, '').split(' ')
-      new(cmd, args)
-    end
-
-    def initialize(cmd, args = [])
-      @cmd = cmd
-      @args = args
-    end
-
-    attr_reader :cmd
-    attr_reader :args
-
-    def to_s
-      "#! #{@cmd}" + (@args.empty? ? '' : " #{@args.join(' ')}")
-    end
-  end
-
-  #
-  # TASK install
-  #
-
-  def exec_install
-    rm_f 'InstalledFiles'
-    exec_task_traverse 'install'
-  end
-
-  def install_dir_bin(rel)
-    install_files targetfiles(), "#{config('bindir')}/#{rel}", 0755
-  end
-
-  def install_dir_lib(rel)
-    install_files libfiles(), "#{config('rbdir')}/#{rel}", 0644
-  end
-
-  def install_dir_ext(rel)
-    return unless extdir?(curr_srcdir())
-    install_files rubyextentions('.'),
-                  "#{config('sodir')}/#{File.dirname(rel)}",
-                  0555
-  end
-
-  def install_dir_data(rel)
-    install_files targetfiles(), "#{config('datadir')}/#{rel}", 0644
-  end
-
-  def install_dir_conf(rel)
-    # FIXME: should not remove current config files
-    # (rename previous file to .old/.org)
-    install_files targetfiles(), "#{config('sysconfdir')}/#{rel}", 0644
-  end
-
-  def install_dir_man(rel)
-    install_files targetfiles(), "#{config('mandir')}/#{rel}", 0644
-  end
-
-  def install_files(list, dest, mode)
-    mkdir_p dest, @config.install_prefix
-    list.each do |fname|
-      install fname, dest, mode, @config.install_prefix
-    end
-  end
-
-  def libfiles
-    glob_reject(%w(*.y *.output), targetfiles())
-  end
-
-  def rubyextentions(dir)
-    ents = glob_select("*.#{@config.dllext}", targetfiles())
-    if ents.empty?
-      setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first"
-    end
-    ents
-  end
-
-  def targetfiles
-    mapdir(existfiles() - hookfiles())
-  end
-
-  def mapdir(ents)
-    ents.map {|ent|
-      if File.exist?(ent)
-      then ent                         # objdir
-      else "#{curr_srcdir()}/#{ent}"   # srcdir
-      end
-    }
-  end
-
-  # picked up many entries from cvs-1.11.1/src/ignore.c
-  JUNK_FILES = %w( 
-    core RCSLOG tags TAGS .make.state
-    .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb
-    *~ *.old *.bak *.BAK *.orig *.rej _$* *$
-
-    *.org *.in .*
-  )
-
-  def existfiles
-    glob_reject(JUNK_FILES, (files_of(curr_srcdir()) | files_of('.')))
-  end
-
-  def hookfiles
-    %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt|
-      %w( config setup install clean ).map {|t| sprintf(fmt, t) }
-    }.flatten
-  end
-
-  def glob_select(pat, ents)
-    re = globs2re([pat])
-    ents.select {|ent| re =~ ent }
-  end
-
-  def glob_reject(pats, ents)
-    re = globs2re(pats)
-    ents.reject {|ent| re =~ ent }
-  end
-
-  GLOB2REGEX = {
-    '.' => '\.',
-    '$' => '\$',
-    '#' => '\#',
-    '*' => '.*'
-  }
-
-  def globs2re(pats)
-    /\A(?:#{
-      pats.map {|pat| pat.gsub(/[\.\$\#\*]/) {|ch| GLOB2REGEX[ch] } }.join('|')
-    })\z/
-  end
-
-  #
-  # TASK test
-  #
-
-  TESTDIR = 'test'
-
-  def exec_test
-    unless File.directory?('test')
-      $stderr.puts 'no test in this package' if verbose?
-      return
-    end
-    $stderr.puts 'Running tests...' if verbose?
-    begin
-      require 'test/unit'
-    rescue LoadError
-      setup_rb_error 'test/unit cannot loaded.  You need Ruby 1.8 or later to invoke this task.'
-    end
-    runner = Test::Unit::AutoRunner.new(true)
-    runner.to_run << TESTDIR
-    runner.run
-  end
-
-  #
-  # TASK clean
-  #
-
-  def exec_clean
-    exec_task_traverse 'clean'
-    rm_f @config.savefile
-    rm_f 'InstalledFiles'
-  end
-
-  alias clean_dir_bin noop
-  alias clean_dir_lib noop
-  alias clean_dir_data noop
-  alias clean_dir_conf noop
-  alias clean_dir_man noop
-
-  def clean_dir_ext(rel)
-    return unless extdir?(curr_srcdir())
-    make 'clean' if File.file?('Makefile')
-  end
-
-  #
-  # TASK distclean
-  #
-
-  def exec_distclean
-    exec_task_traverse 'distclean'
-    rm_f @config.savefile
-    rm_f 'InstalledFiles'
-  end
-
-  alias distclean_dir_bin noop
-  alias distclean_dir_lib noop
-
-  def distclean_dir_ext(rel)
-    return unless extdir?(curr_srcdir())
-    make 'distclean' if File.file?('Makefile')
-  end
-
-  alias distclean_dir_data noop
-  alias distclean_dir_conf noop
-  alias distclean_dir_man noop
-
-  #
-  # Traversing
-  #
-
-  def exec_task_traverse(task)
-    run_hook "pre-#{task}"
-    FILETYPES.each do |type|
-      if type == 'ext' and config('without-ext') == 'yes'
-        $stderr.puts 'skipping ext/* by user option' if verbose?
-        next
-      end
-      traverse task, type, "#{task}_dir_#{type}"
-    end
-    run_hook "post-#{task}"
-  end
-
-  def traverse(task, rel, mid)
-    dive_into(rel) {
-      run_hook "pre-#{task}"
-      __send__ mid, rel.sub(%r[\A.*?(?:/|\z)], '')
-      directories_of(curr_srcdir()).each do |d|
-        traverse task, "#{rel}/#{d}", mid
-      end
-      run_hook "post-#{task}"
-    }
-  end
-
-  def dive_into(rel)
-    return unless File.dir?("#{@srcdir}/#{rel}")
-
-    dir = File.basename(rel)
-    Dir.mkdir dir unless File.dir?(dir)
-    prevdir = Dir.pwd
-    Dir.chdir dir
-    $stderr.puts '---> ' + rel if verbose?
-    @currdir = rel
-    yield
-    Dir.chdir prevdir
-    $stderr.puts '<--- ' + rel if verbose?
-    @currdir = File.dirname(rel)
-  end
-
-  def run_hook(id)
-    path = [ "#{curr_srcdir()}/#{id}",
-             "#{curr_srcdir()}/#{id}.rb" ].detect {|cand| File.file?(cand) }
-    return unless path
-    begin
-      instance_eval File.read(path), path, 1
-    rescue
-      raise if $DEBUG
-      setup_rb_error "hook #{path} failed:\n" + $!.message
-    end
-  end
-
-end   # class Installer
-
-
-class SetupError < StandardError; end
-
-def setup_rb_error(msg)
-  raise SetupError, msg
-end
-
-if $0 == __FILE__
-  begin
-    ToplevelInstaller.invoke
-  rescue SetupError
-    raise if $DEBUG
-    $stderr.puts $!.message
-    $stderr.puts "Try 'ruby #{$0} --help' for detailed usage."
-    exit 1
-  end
-end
diff --git a/pre-config.rb.erb b/pre-config.rb.erb
deleted file mode 100755
index 0fd088b992d5ba5dea9b8d6112e1c0aaa4cf356d..0000000000000000000000000000000000000000
--- a/pre-config.rb.erb
+++ /dev/null
@@ -1,111 +0,0 @@
-# Which directories to search?
-def search_directories
-  dirs = [
-          "/usr/include/fox-1.6",
-          "/usr/local/include/fox-1.6",
-          "/sw/include/fox-1.6",
-	  "/opt/local/include/fox-1.6"
-         ]
-  ARGV.each do |arg|
-    if arg =~ /--with-fox-include/
-      option, value = arg.split('=')
-      dirs = [ value ] + dirs
-      dirs.uniq! # remove duplicates
-    end
-  end
-  dirs
-end
-
-# Return true if found in any of the search directories
-def fox_include_files_found?
-  search_directories.each do |path|
-    filename = File.join(path, "fxver.h")
-    return true if FileTest.exist?(filename)
-  end
-  false
-end
-
-# Read installed FOX version info from fxver.h include file
-def read_fox_version(filename)
-  foxMajor, foxMinor, foxLevel = nil, nil, nil
-  File.foreach(filename) do |line|
-    if    line =~ /FOX_MAJOR/
-      foxMajor = line.split()[2]
-    elsif line =~ /FOX_MINOR/
-      foxMinor = line.split()[2]
-    elsif line =~ /FOX_LEVEL/
-      foxLevel = line.split()[2]
-    end
-  end
-  [foxMajor, foxMinor, foxLevel]
-end
-
-# Returns a string (e.g. "1.0.36") indicating the installed version of FOX.
-def installed_fox_version
-  search_directories.each do |path|
-    filename = File.join(path, "fxver.h")
-    if FileTest.exist?(filename)
-      foxMajor, foxMinor, foxLevel = read_fox_version(filename)
-      return [foxMajor, foxMinor, foxLevel].join('.')
-    end
-  end
-  raise RuntimeError, "couldn't find FOX header files"
-end
-
-#
-# Confirm that FOX is installed; check for an "fxver.h"
-# include file in the directory specified via the
-# --with-fox-include command line argument (if any),
-# as well as /usr/include/fox-1.6, /usr/local/include/fox-1.6 and
-# /sw/include/fox-1.6.
-#
-unless fox_include_files_found?
-  puts ""
-  puts "   **********************************************************************"
-  puts "   *                            Hey!                                    *"
-  puts "   *                    Where is FOX installed?                         *"
-  puts "   *                                                                    *"
-  puts "   * I couldn't locate 'fxver.h' in any of the following directories:   *"
-  puts "   *                                                                    *"
-  search_directories.each { |incdir| puts "   *    #{incdir}" }
-  puts "   *                                                                    *"
-  puts "   * Please specify the locations for the FOX header files and library  *"
-  puts "   * using the --with-fox-include and --with-fox-lib options to         *"
-  puts "   * extconf.rb as described in the FXRuby installation instructions.   *"
-  puts "   **********************************************************************"
-  puts ""
-  exit
-end
-
-#
-# Stable releases of FXRuby (i.e. FXRuby-1.0.x) should go with stable releases
-# of FOX (i.e. fox-1.0.x) but it's only necessary for the major and minor version
-# numbers to match. For example, FXRuby-1.0.22 should work fine with fox-1.0.40.
-#
-# Development releases of FXRuby (e.g. FXRuby-1.1.65) must go with a specific
-# development version of FOX, usually the one with the same version number
-# (e.g. fox-1.1.65). All three version numbers must match.
-#
-
-instMajor, instMinor, instLevel = installed_fox_version().split('.')
-thisMajor, thisMinor, thisLevel = "<%= FOX_VERSION %>".split('.')
-
-expecting_stable_fox_release = ((thisMinor.to_i % 2) == 0)
-if expecting_stable_fox_release
-  if (instMinor != thisMinor)
-    puts ""
-    puts "   ********************************************************"
-    puts "   * This version of FXRuby (<%= PKG_VERSION %>) must be built against"
-    puts "   * one of the stable releases of FOX, but it appears that"
-    puts "   * you have a development version of FOX (version #{installed_fox_version})"
-    puts "   * installed instead. Please download and install one of"
-    puts "   * the stable releases of FOX first, and then try again."
-    puts "   ********************************************************"
-    puts ""
-    exit
-  end
-else
-  # Minor version number is odd, so it's a development release
-  raise RuntimeError unless ((instMajor == thisMajor) && (instMinor == thisMinor) && (instLevel == thisLevel))
-end
-
diff --git a/scripts/FXRuby.iss.erb b/scripts/FXRuby.iss.erb
deleted file mode 100755
index 2a468a17988f589c0974715d2554b14b4a03d69d..0000000000000000000000000000000000000000
--- a/scripts/FXRuby.iss.erb
+++ /dev/null
@@ -1,81 +0,0 @@
-; Script generated by the Inno Setup Script Wizard.
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-
-[Setup]
-AppName=FXRuby
-AppVerName=FXRuby <%= PKG_VERSION %>
-AppPublisherURL=<%= FXRUBY_HOME_URL %>
-AppSupportURL=<%= FXRUBY_HOME_URL %>
-AppUpdatesURL=<%= FXRUBY_HOME_URL %>
-DefaultDirName=C:\ruby
-DefaultGroupName=FXRuby
-AllowNoIcons=no
-LicenseFile=LICENSE
-InfoBeforeFile=README.win32.txt
-OutputDir=.
-OutputBaseFilename=FXRuby-<%= PKG_VERSION %>-<%= info[1] %>
-
-[Files]
-; readme files
-Source: "LICENSE"; DestDir: "{app}\doc\FXRuby"; Flags: ignoreversion
-Source: "README.win32.txt"; DestDir: "{app}\doc\FXRuby"; Flags: ignoreversion
-Source: "README"; DestDir: "{app}\doc\FXRuby"; Flags: ignoreversion
-; HTML documentation files
-Source: "doc\*.html"; DestDir: "{app}\doc\FXRuby\doc"; Flags: ignoreversion
-Source: "doc\images\*.png"; DestDir: "{app}\doc\FXRuby\doc\images"; Flags: ignoreversion
-; unit tests
-Source: "tests\README"; DestDir: "{app}\doc\FXRuby\tests"; Flags: ignoreversion
-Source: "tests\*.rb"; DestDir: "{app}\doc\FXRuby\tests"; Flags: ignoreversion
-Source: "tests\*.ps"; DestDir: "{app}\doc\FXRuby\tests"; Flags: ignoreversion
-; main extension shared library
-Source: "ext\fox16\fox16.so"; DestDir: "{app}\lib\ruby\site_ruby\<%= info[0] %>\<%= info[2] %>; Flags: ignoreversion
-; library files
-Source: "lib\fox16\*.rb"; DestDir: "{app}\lib\ruby\site_ruby\<%= info[0] %>\fox16"; Flags: ignoreversion
-; samples
-Source: "examples\README"; DestDir: "{app}\samples\FXRuby"; Flags: ignoreversion
-Source: "examples\babelfish.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "babelfish.rbw"; Flags: ignoreversion
-Source: "examples\bounce.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "bounce.rbw"; Flags: ignoreversion
-Source: "examples\browser.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "browser.rbw"; Flags: ignoreversion
-Source: "examples\button.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "button.rbw"; Flags: ignoreversion
-Source: "examples\datatarget.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "datatarget.rbw"; Flags: ignoreversion
-Source: "examples\dctest.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "dctest.rbw"; Flags: ignoreversion
-Source: "examples\dialog.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "dialog.rbw"; Flags: ignoreversion
-Source: "examples\dilbert.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "dilbert.rbw"; Flags: ignoreversion
-Source: "examples\dirlist.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "dirlist.rbw"; Flags: ignoreversion
-Source: "examples\dragdrop.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "dragdrop.rbw"; Flags: ignoreversion
-Source: "examples\dragsource.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "dragsource.rbw"; Flags: ignoreversion
-Source: "examples\dropsite.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "dropsite.rbw"; Flags: ignoreversion
-Source: "examples\foursplit.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "foursplit.rbw"; Flags: ignoreversion
-Source: "examples\gltest.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "gltest.rbw"; Flags: ignoreversion
-Source: "examples\glviewer.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "glviewer.rbw"; Flags: ignoreversion
-Source: "examples\groupbox.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "groupbox.rbw"; Flags: ignoreversion
-Source: "examples\header.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "header.rbw"; Flags: ignoreversion
-Source: "examples\hello.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "hello.rbw"; Flags: ignoreversion
-Source: "examples\hello2.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "hello2.rbw"; Flags: ignoreversion
-Source: "examples\iconlist.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "iconlist.rbw"; Flags: ignoreversion
-Source: "examples\image.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "image.rbw"; Flags: ignoreversion
-Source: "examples\imageviewer.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "imageviewer.rbw"; Flags: ignoreversion
-Source: "examples\inputs.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "inputs.rbw"; Flags: ignoreversion
-Source: "examples\mditest.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "mditest.rbw"; Flags: ignoreversion
-Source: "examples\pig.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "pig.rbw"; Flags: ignoreversion
-Source: "examples\iRAA.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "iRAA.rb"; Flags: ignoreversion
-Source: "examples\RAA.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "RAA.rb"; Flags: ignoreversion
-Source: "examples\raabrowser.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "raabrowser.rbw"; Flags: ignoreversion
-Source: "examples\ratio.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "ratio.rbw"; Flags: ignoreversion
-Source: "examples\scintilla-test.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "scintilla-test.rbw"; Flags: ignoreversion
-Source: "examples\scribble.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "scribble.rbw"; Flags: ignoreversion
-Source: "examples\scribble-orig.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "scribble-orig.rbw"; Flags: ignoreversion
-Source: "examples\shutter.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "shutter.rbw"; Flags: ignoreversion
-Source: "examples\splitter.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "splitter.rbw"; Flags: ignoreversion
-Source: "examples\styledtext.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "styledtext.rbw"; Flags: ignoreversion
-Source: "examples\tabbook.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "tabbook.rbw"; Flags: ignoreversion
-Source: "examples\table.rb"; DestDir: "{app}\samples\FXRuby"; DestName: "table.rbw"; Flags: ignoreversion
-; textedit example files
-Source: "examples\textedit\commands.rb"; DestDir: "{app}\samples\FXRuby\textedit"; Flags: ignoreversion
-Source: "examples\textedit\helpwindow.rb"; DestDir: "{app}\samples\FXRuby\textedit"; Flags: ignoreversion
-Source: "examples\textedit\prefdialog.rb"; DestDir: "{app}\samples\FXRuby\textedit"; Flags: ignoreversion
-Source: "examples\textedit\textedit.rb"; DestDir: "{app}\samples\FXRuby\textedit"; DestName: "textedit.rbw"; Flags: ignoreversion
-; icons for samples
-Source: "examples\icons\*.ico"; DestDir: "{app}\samples\FXRuby\icons"; Flags: ignoreversion
-Source: "examples\icons\*.png"; DestDir: "{app}\samples\FXRuby\icons"; Flags: ignoreversion
-
diff --git a/scripts/make-installers.rb.erb b/scripts/make-installers.rb.erb
deleted file mode 100755
index 7e7de01e2b733e018458677946999b4aee452e63..0000000000000000000000000000000000000000
--- a/scripts/make-installers.rb.erb
+++ /dev/null
@@ -1,84 +0,0 @@
-require 'ftools'
-require 'net/ftp'
-
-# Arguments passed to config stage of setup
-config_args = [
-  "--make-prog=nmake",
-  "--",
-  "--with-fox-include=c:\\src\\fox-1.6.4\\include",
-  "--with-fox-lib=c:\\src\\fox-1.6.4\\lib",
-  "--with-fxscintilla-include=c:\\src\\fxscintilla-1.63-fox1.6\\include",
-  "--with-fxscintilla-lib=c:\\src\\fxscintilla-1.63-fox1.6\\lib"
-]
-
-# Inno Setup command-line compiler
-ISCC = "C:\\Progra~1\\InnoSe~1\\ISCC.exe"
-
-def untar(fxruby_version)
-  tarfile = "../ftp/FXRuby-#{fxruby_version}.tar.gz"
-  dirname1 = "FXRuby-#{fxruby_version}"
-  dirname2 = "FXRuby-#{fxruby_version}-ruby#{VERSION}"
-  if File.exists? dirname1
-    system("rm", "-r", dirname1)
-  end
-  if File.exists? dirname2
-    system("rm", "-r", dirname2)
-  end
-  system("tar", "xzf", tarfile)
-  puts "File.mv(#{dirname1}, #{dirname2})"
-  File.mv(dirname1, dirname2)
-end
-
-def copy_installer_script(fxruby_version)
-  iss_filename = nil
-  case VERSION
-    when /1.6/
-      iss_filename = "FXRuby-ruby1.6-i586-mswin32.iss"
-    when /1.8.2/
-      iss_filename = "FXRuby-ruby1.8.2-i386-msvcrt.iss"
-    when /1.8.4/
-      iss_filename = "FXRuby-ruby1.8.4-i386-msvcrt.iss"
-  end
-  dir = "FXRuby-#{fxruby_version}-ruby#{VERSION}"
-  [iss_filename, dir]
-end
-
-def do_config(args)
-  ruby = "C:\\ruby-#{VERSION}\\bin\\ruby.exe"
-  system(ruby, "install.rb", "config", *args)
-end
-
-def do_setup
-  ruby = "C:\\ruby-#{VERSION}\\bin\\ruby.exe"
-  system(ruby, "install.rb", "setup")
-end
-
-def do_inno_setup(scriptname)
-  system(ISCC, scriptname)
-end
-
-def do_upload(fxruby_version)
-  file = nil
-  case VERSION
-    when /1.6.8/
-      file = "FXRuby-#{fxruby_version}-ruby168.exe"
-    when /1.8.2/
-      file = "FXRuby-#{fxruby_version}-ruby182.exe"
-    when /1.8.4/
-      file = "FXRuby-#{fxruby_version}-ruby184.exe"
-  end
-  ftp = Net::FTP.open('upload.sourceforge.net', 'ftp', 'lyle@rubyforge.org')
-  ftp.putbinaryfile(file, "/incoming/" + file)
-  ftp.close
-end
-
-if __FILE__ == $0
-  fxruby_version = "<%= PKG_VERSION %>"
-  untar(fxruby_version)
-  iss_filename, dir = copy_installer_script(fxruby_version)
-  Dir.chdir(dir)
-  do_config(config_args)
-  do_setup
-  do_inno_setup(iss_filename)
-# do_upload(fxruby_version)
-end
diff --git a/scripts/make-win32-tarball.sh b/scripts/make-win32-tarball.sh
deleted file mode 100755
index dd0dad7ff42ea11d389da7fd65d60b426a9e9de7..0000000000000000000000000000000000000000
--- a/scripts/make-win32-tarball.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-tar cvzf FXRuby-1.0.28-ruby1.8.1.tar.gz \
-	doc/FXRuby \
-	lib/ruby/site_ruby/1.8/i386-msvcrt/fox.so \
-	lib/ruby/site_ruby/1.8/fox \
-	samples/FXRuby
diff --git a/scripts/opengl-cygwin.iss b/scripts/opengl-cygwin.iss
deleted file mode 100755
index da508c63b6dbb2a1da1281e24e9df36f9e0a131c..0000000000000000000000000000000000000000
--- a/scripts/opengl-cygwin.iss
+++ /dev/null
@@ -1,74 +0,0 @@
-; Script generated by the Inno Setup Script Wizard.
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-
-[Setup]
-AppName=Ruby/OpenGL
-AppVerName=Ruby/OpenGL 0.32b
-AppPublisher=Yoshiyuki Kusano
-AppPublisherURL=http://www2.giganet.net/~yoshi
-AppSupportURL=http://www2.giganet.net/~yoshi
-AppUpdatesURL=http://www2.giganet.net/~yoshi
-DefaultDirName=C:\ruby
-DefaultGroupName=Ruby/OpenGL
-AllowNoIcons=no
-OutputDir=.
-OutputBaseFilename=rbogl-0.32b-cygwin32
-; uncomment the following line if you want your installation to run on NT 3.51 too.
-; MinVersion=4,3.51
-
-[Files]
-; main extension files
-Source: "opengl.so"; DestDir: "{app}\lib\ruby\site_ruby\1.6\i386-cygwin"; CopyMode: alwaysoverwrite
-Source: "glut.so"; DestDir: "{app}\lib\ruby\site_ruby\1.6\i386-cygwin"; CopyMode: alwaysoverwrite
-; documents
-Source: "ChangeLog"; DestDir: "{app}\doc\ruby\opengl"; CopyMode: alwaysoverwrite
-Source: "README.EUC"; DestDir: "{app}\doc\ruby\opengl"; CopyMode: alwaysoverwrite
-; samples
-Source: "sample\aaindex.rb"; DestDir: "{app}\samples\opengl"; DestName: "aaindex.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\aapoly.rb"; DestDir: "{app}\samples\opengl"; DestName: "aapoly.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\aargb.rb"; DestDir: "{app}\samples\opengl"; DestName: "aargb.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\accanti.rb"; DestDir: "{app}\samples\opengl"; DestName: "accanti.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\accpersp.rb"; DestDir: "{app}\samples\opengl"; DestName: "accpersp.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\alpha.rb"; DestDir: "{app}\samples\opengl"; DestName: "alpha.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\alpha3D.rb"; DestDir: "{app}\samples\opengl"; DestName: "alpha3D.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\bezcurve.rb"; DestDir: "{app}\samples\opengl"; DestName: "bezcurve.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\bezmesh.rb"; DestDir: "{app}\samples\opengl"; DestName: "bezmesh.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\checker.rb"; DestDir: "{app}\samples\opengl"; DestName: "checker.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\clip.rb"; DestDir: "{app}\samples\opengl"; DestName: "clip.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\colormat.rb"; DestDir: "{app}\samples\opengl"; DestName: "colormat.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\cube.rb"; DestDir: "{app}\samples\opengl"; DestName: "cube.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\depthcue.rb"; DestDir: "{app}\samples\opengl"; DestName: "depthcue.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\dof.rb"; DestDir: "{app}\samples\opengl"; DestName: "dof.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\double.rb"; DestDir: "{app}\samples\opengl"; DestName: "double.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\drawf.rb"; DestDir: "{app}\samples\opengl"; DestName: "drawf.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\feedback.rb"; DestDir: "{app}\samples\opengl"; DestName: "feedback.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\fog.rb"; DestDir: "{app}\samples\opengl"; DestName: "fog.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\font.rb"; DestDir: "{app}\samples\opengl"; DestName: "font.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\hello.rb"; DestDir: "{app}\samples\opengl"; DestName: "hello.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\image.rb"; DestDir: "{app}\samples\opengl"; DestName: "image.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\jitter.rb"; DestDir: "{app}\samples\opengl"; DestName: "jitter.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\lines.rb"; DestDir: "{app}\samples\opengl"; DestName: "lines.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\list.rb"; DestDir: "{app}\samples\opengl"; DestName: "list.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\material.rb"; DestDir: "{app}\samples\opengl"; DestName: "material.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\mipmap.rb"; DestDir: "{app}\samples\opengl"; DestName: "mipmap.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\model.rb"; DestDir: "{app}\samples\opengl"; DestName: "model.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\movelight.rb"; DestDir: "{app}\samples\opengl"; DestName: "movelight.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\pickdepth.rb"; DestDir: "{app}\samples\opengl"; DestName: "pickdepth.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\plane.rb"; DestDir: "{app}\samples\opengl"; DestName: "plane.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\planet.rb"; DestDir: "{app}\samples\opengl"; DestName: "planet.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\quadric.rb"; DestDir: "{app}\samples\opengl"; DestName: "quadric.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\robot.rb"; DestDir: "{app}\samples\opengl"; DestName: "robot.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\select.rb"; DestDir: "{app}\samples\opengl"; DestName: "select.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\smooth.rb"; DestDir: "{app}\samples\opengl"; DestName: "smooth.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\stencil.rb"; DestDir: "{app}\samples\opengl"; DestName: "stencil.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\stroke.rb"; DestDir: "{app}\samples\opengl"; DestName: "stroke.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\surface.rb"; DestDir: "{app}\samples\opengl"; DestName: "surface.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\teaambient.rb"; DestDir: "{app}\samples\opengl"; DestName: "teaambient.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\teapots.rb"; DestDir: "{app}\samples\opengl"; DestName: "teapots.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\tess.rb"; DestDir: "{app}\samples\opengl"; DestName: "tess.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\texbind.rb"; DestDir: "{app}\samples\opengl"; DestName: "texbind.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\texgen.rb"; DestDir: "{app}\samples\opengl"; DestName: "texgen.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\texturesurf.rb"; DestDir: "{app}\samples\opengl"; DestName: "texturesurf.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\varray.rb"; DestDir: "{app}\samples\opengl"; DestName: "varray.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\wrap.rb"; DestDir: "{app}\samples\opengl"; DestName: "wrap.rbw"; CopyMode: alwaysoverwrite
-
diff --git a/scripts/opengl.iss b/scripts/opengl.iss
deleted file mode 100755
index ff73d441dd7925ead3402aebf2488a767bc121e2..0000000000000000000000000000000000000000
--- a/scripts/opengl.iss
+++ /dev/null
@@ -1,74 +0,0 @@
-; Script generated by the Inno Setup Script Wizard.
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-
-[Setup]
-AppName=Ruby/OpenGL
-AppVerName=Ruby/OpenGL 0.32b
-AppPublisher=Yoshiyuki Kusano
-AppPublisherURL=http://www2.giganet.net/~yoshi
-AppSupportURL=http://www2.giganet.net/~yoshi
-AppUpdatesURL=http://www2.giganet.net/~yoshi
-DefaultDirName=C:\ruby
-DefaultGroupName=Ruby/OpenGL
-AllowNoIcons=no
-OutputDir=.
-OutputBaseFilename=rbogl-0.32b-mswin32
-; uncomment the following line if you want your installation to run on NT 3.51 too.
-; MinVersion=4,3.51
-
-[Files]
-; main extension files
-Source: "opengl.so"; DestDir: "{app}\lib\ruby\site_ruby\1.6\i586-mswin32"; CopyMode: alwaysoverwrite
-Source: "glut.so"; DestDir: "{app}\lib\ruby\site_ruby\1.6\i586-mswin32"; CopyMode: alwaysoverwrite
-; documents
-Source: "ChangeLog"; DestDir: "{app}\doc\ruby\opengl"; CopyMode: alwaysoverwrite
-Source: "README.EUC"; DestDir: "{app}\doc\ruby\opengl"; CopyMode: alwaysoverwrite
-; samples
-Source: "sample\aaindex.rb"; DestDir: "{app}\samples\opengl"; DestName: "aaindex.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\aapoly.rb"; DestDir: "{app}\samples\opengl"; DestName: "aapoly.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\aargb.rb"; DestDir: "{app}\samples\opengl"; DestName: "aargb.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\accanti.rb"; DestDir: "{app}\samples\opengl"; DestName: "accanti.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\accpersp.rb"; DestDir: "{app}\samples\opengl"; DestName: "accpersp.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\alpha.rb"; DestDir: "{app}\samples\opengl"; DestName: "alpha.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\alpha3D.rb"; DestDir: "{app}\samples\opengl"; DestName: "alpha3D.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\bezcurve.rb"; DestDir: "{app}\samples\opengl"; DestName: "bezcurve.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\bezmesh.rb"; DestDir: "{app}\samples\opengl"; DestName: "bezmesh.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\checker.rb"; DestDir: "{app}\samples\opengl"; DestName: "checker.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\clip.rb"; DestDir: "{app}\samples\opengl"; DestName: "clip.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\colormat.rb"; DestDir: "{app}\samples\opengl"; DestName: "colormat.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\cube.rb"; DestDir: "{app}\samples\opengl"; DestName: "cube.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\depthcue.rb"; DestDir: "{app}\samples\opengl"; DestName: "depthcue.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\dof.rb"; DestDir: "{app}\samples\opengl"; DestName: "dof.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\double.rb"; DestDir: "{app}\samples\opengl"; DestName: "double.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\drawf.rb"; DestDir: "{app}\samples\opengl"; DestName: "drawf.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\feedback.rb"; DestDir: "{app}\samples\opengl"; DestName: "feedback.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\fog.rb"; DestDir: "{app}\samples\opengl"; DestName: "fog.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\font.rb"; DestDir: "{app}\samples\opengl"; DestName: "font.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\hello.rb"; DestDir: "{app}\samples\opengl"; DestName: "hello.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\image.rb"; DestDir: "{app}\samples\opengl"; DestName: "image.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\jitter.rb"; DestDir: "{app}\samples\opengl"; DestName: "jitter.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\lines.rb"; DestDir: "{app}\samples\opengl"; DestName: "lines.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\list.rb"; DestDir: "{app}\samples\opengl"; DestName: "list.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\material.rb"; DestDir: "{app}\samples\opengl"; DestName: "material.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\mipmap.rb"; DestDir: "{app}\samples\opengl"; DestName: "mipmap.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\model.rb"; DestDir: "{app}\samples\opengl"; DestName: "model.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\movelight.rb"; DestDir: "{app}\samples\opengl"; DestName: "movelight.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\pickdepth.rb"; DestDir: "{app}\samples\opengl"; DestName: "pickdepth.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\plane.rb"; DestDir: "{app}\samples\opengl"; DestName: "plane.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\planet.rb"; DestDir: "{app}\samples\opengl"; DestName: "planet.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\quadric.rb"; DestDir: "{app}\samples\opengl"; DestName: "quadric.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\robot.rb"; DestDir: "{app}\samples\opengl"; DestName: "robot.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\select.rb"; DestDir: "{app}\samples\opengl"; DestName: "select.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\smooth.rb"; DestDir: "{app}\samples\opengl"; DestName: "smooth.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\stencil.rb"; DestDir: "{app}\samples\opengl"; DestName: "stencil.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\stroke.rb"; DestDir: "{app}\samples\opengl"; DestName: "stroke.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\surface.rb"; DestDir: "{app}\samples\opengl"; DestName: "surface.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\teaambient.rb"; DestDir: "{app}\samples\opengl"; DestName: "teaambient.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\teapots.rb"; DestDir: "{app}\samples\opengl"; DestName: "teapots.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\tess.rb"; DestDir: "{app}\samples\opengl"; DestName: "tess.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\texbind.rb"; DestDir: "{app}\samples\opengl"; DestName: "texbind.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\texgen.rb"; DestDir: "{app}\samples\opengl"; DestName: "texgen.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\texturesurf.rb"; DestDir: "{app}\samples\opengl"; DestName: "texturesurf.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\varray.rb"; DestDir: "{app}\samples\opengl"; DestName: "varray.rbw"; CopyMode: alwaysoverwrite
-Source: "sample\wrap.rb"; DestDir: "{app}\samples\opengl"; DestName: "wrap.rbw"; CopyMode: alwaysoverwrite
-
diff --git a/swig-interfaces/Makefile b/swig-interfaces/Makefile
deleted file mode 100755
index a989672c619b91b05bfe437436af2a63bf5937a9..0000000000000000000000000000000000000000
--- a/swig-interfaces/Makefile
+++ /dev/null
@@ -1,138 +0,0 @@
-#
-# This makefile is used to generate the wrapper code from the
-# SWIG interface files.
-#
-# $Id: Makefile 2827 2008-03-28 16:04:44Z lyle $
-#
-
-.PHONY: clean
-
-SWIG = /usr/local/bin/swig
-SWIGFLAGS = -fcompact -noruntime -c++ -ruby -no_default -I../fox-includes
-SRCDIR = ../ext/fox16
-SED = sed -f swig.sed
-RUBY = ruby
-SWIGLIB := $(shell /usr/local/bin/swig -swiglib)
-
-MODULES = \
-	$(SRCDIR)/core_wrap.cpp \
-	$(SRCDIR)/dc_wrap.cpp \
-	$(SRCDIR)/dialogs_wrap.cpp \
-	$(SRCDIR)/frames_wrap.cpp \
-	$(SRCDIR)/iconlist_wrap.cpp \
-	$(SRCDIR)/icons_wrap.cpp \
-	$(SRCDIR)/image_wrap.cpp \
-	$(SRCDIR)/label_wrap.cpp \
-	$(SRCDIR)/layout_wrap.cpp \
-	$(SRCDIR)/list_wrap.cpp \
-	$(SRCDIR)/mdi_wrap.cpp \
-	$(SRCDIR)/menu_wrap.cpp \
-	$(SRCDIR)/fx3d_wrap.cpp \
-	$(SRCDIR)/scintilla_wrap.cpp \
-	$(SRCDIR)/table_wrap.cpp \
-	$(SRCDIR)/text_wrap.cpp \
-	$(SRCDIR)/treelist_wrap.cpp \
-	$(SRCDIR)/ui_wrap.cpp
-
-all: $(SRCDIR)/librb.c $(MODULES)
-
-$(SRCDIR)/core_wrap.cpp: core.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/core_wrap.cpp core.i
-	$(SED) $(SRCDIR)/core_wrap.cpp > junk; mv junk $(SRCDIR)/core_wrap.cpp
-
-$(SRCDIR)/dc_wrap.cpp: dcmodule.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/dc_wrap.cpp dcmodule.i
-	$(SED) $(SRCDIR)/dc_wrap.cpp > junk; mv junk $(SRCDIR)/dc_wrap.cpp
-
-$(SRCDIR)/dialogs_wrap.cpp: dialogs.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/dialogs_wrap.cpp dialogs.i
-	$(SED) $(SRCDIR)/dialogs_wrap.cpp > junk; mv junk $(SRCDIR)/dialogs_wrap.cpp
-
-$(SRCDIR)/frames_wrap.cpp: framesmodule.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/frames_wrap.cpp framesmodule.i
-	$(SED) $(SRCDIR)/frames_wrap.cpp > junk; mv junk $(SRCDIR)/frames_wrap.cpp
-
-$(SRCDIR)/iconlist_wrap.cpp: iconlistmodule.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/iconlist_wrap.cpp iconlistmodule.i
-	$(SED) $(SRCDIR)/iconlist_wrap.cpp > junk; mv junk $(SRCDIR)/iconlist_wrap.cpp
-
-$(SRCDIR)/icons_wrap.cpp: icons.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/icons_wrap.cpp icons.i
-	$(SED) $(SRCDIR)/icons_wrap.cpp > junk; mv junk $(SRCDIR)/icons_wrap.cpp
-
-$(SRCDIR)/image_wrap.cpp: image.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/image_wrap.cpp image.i
-	$(SED) $(SRCDIR)/image_wrap.cpp > junk; mv junk $(SRCDIR)/image_wrap.cpp
-
-$(SRCDIR)/label_wrap.cpp: labelmodule.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/label_wrap.cpp labelmodule.i
-	$(SED) $(SRCDIR)/label_wrap.cpp > junk; mv junk $(SRCDIR)/label_wrap.cpp
-
-$(SRCDIR)/layout_wrap.cpp: layout.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/layout_wrap.cpp layout.i
-	$(SED) $(SRCDIR)/layout_wrap.cpp > junk; mv junk $(SRCDIR)/layout_wrap.cpp
-
-$(SRCDIR)/list_wrap.cpp: listmodule.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/list_wrap.cpp listmodule.i
-	$(SED) $(SRCDIR)/list_wrap.cpp > junk; mv junk $(SRCDIR)/list_wrap.cpp
-
-$(SRCDIR)/mdi_wrap.cpp: mdi.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/mdi_wrap.cpp mdi.i
-	$(SED) $(SRCDIR)/mdi_wrap.cpp > junk; mv junk $(SRCDIR)/mdi_wrap.cpp
-
-$(SRCDIR)/menu_wrap.cpp: menumodule.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/menu_wrap.cpp menumodule.i
-	$(SED) $(SRCDIR)/menu_wrap.cpp > junk; mv junk $(SRCDIR)/menu_wrap.cpp
-
-$(SRCDIR)/fx3d_wrap.cpp: fx3d.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/fx3d_wrap.cpp fx3d.i
-	$(SED) $(SRCDIR)/fx3d_wrap.cpp > junk; mv junk $(SRCDIR)/fx3d_wrap.cpp
-
-$(SRCDIR)/scintilla_wrap.cpp: scintilla.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/scintilla_wrap.cpp scintilla.i
-	$(SED) $(SRCDIR)/scintilla_wrap.cpp > junk; mv junk $(SRCDIR)/scintilla_wrap.cpp
-
-$(SRCDIR)/table_wrap.cpp: table-module.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/table_wrap.cpp table-module.i
-	$(SED) $(SRCDIR)/table_wrap.cpp > junk; mv junk $(SRCDIR)/table_wrap.cpp
-
-$(SRCDIR)/text_wrap.cpp: text-module.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/text_wrap.cpp text-module.i
-	$(SED) $(SRCDIR)/text_wrap.cpp > junk; mv junk $(SRCDIR)/text_wrap.cpp
-
-$(SRCDIR)/treelist_wrap.cpp: treelist-module.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/treelist_wrap.cpp treelist-module.i
-	$(SED) $(SRCDIR)/treelist_wrap.cpp > junk; mv junk $(SRCDIR)/treelist_wrap.cpp
-
-$(SRCDIR)/ui_wrap.cpp: ui.i
-	$(SWIG) $(SWIGFLAGS) -o $(SRCDIR)/ui_wrap.cpp ui.i
-	$(SED) $(SRCDIR)/ui_wrap.cpp > junk; mv junk $(SRCDIR)/ui_wrap.cpp
-
-$(SRCDIR)/librb.c: $(SWIGLIB)/ruby/precommon.swg $(SWIGLIB)/common.swg $(SWIGLIB)/ruby/rubyhead.swg $(SWIGLIB)/ruby/rubydef.swg
-	@echo "#define SWIG_GLOBAL 1" > $(SRCDIR)/librb.c
-	@cat $(SWIGLIB)/ruby/precommon.swg $(SWIGLIB)/common.swg $(SWIGLIB)/ruby/rubyhead.swg $(SWIGLIB)/ruby/rubydef.swg >> $(SRCDIR)/librb.c
-
-clean:
-	@rm -f $(SRCDIR)/librb.c $(MODULES)
-
-depend:
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/core_wrap.cpp core.i > dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/dc_wrap.cpp dcmodule.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/dialogs_wrap.cpp dialogs.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/frames_wrap.cpp framesmodule.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/iconlist_wrap.cpp iconlistmodule.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/icons_wrap.cpp icons.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/image_wrap.cpp image.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/label_wrap.cpp labelmodule.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/layout_wrap.cpp layout.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/list_wrap.cpp listmodule.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/mdi_wrap.cpp mdi.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/menu_wrap.cpp menumodule.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/fx3d_wrap.cpp fx3d.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/scintilla_wrap.cpp scintilla.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/table_wrap.cpp table-module.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/text_wrap.cpp text-module.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/treelist_wrap.cpp treelist-module.i >> dependencies
-	$(SWIG) $(SWIGFLAGS) -MM -o $(SRCDIR)/ui_wrap.cpp ui.i >> dependencies
-
-include dependencies
diff --git a/swig-interfaces/swig.sed b/swig-interfaces/swig.sed
deleted file mode 100755
index de1b3b727a1300851ef4cd3dc172b662fb65b6ee..0000000000000000000000000000000000000000
--- a/swig-interfaces/swig.sed
+++ /dev/null
@@ -1,55 +0,0 @@
-s/static VALUE mCore;/VALUE mCore;/
-s/mCore = rb_define_module("Core")/mFox = rb_define_module("Fox")/
-s/mCore/mFox/
-/static VALUE mDc;/d
-/mDc = rb_define_module/d
-/static VALUE mDialogs;/d
-/mDialogs = rb_define_module/d
-/static VALUE mFrames;/d
-/mFrames = rb_define_module/d
-/static VALUE mIconlist;/d
-/mIconlist = rb_define_module/d
-/static VALUE mIcons;/d
-/mIcons = rb_define_module/d
-/static VALUE mImage;/d
-/mImage = rb_define_module/d
-/static VALUE mLabel;/d
-/mLabel = rb_define_module/d
-/static VALUE mLayout;/d
-/mLayout = rb_define_module/d
-/static VALUE mList;/d
-/mList = rb_define_module/d
-/static VALUE mMdi;/d
-/mMdi = rb_define_module/d
-/static VALUE mMenu;/d
-/mMenu = rb_define_module/d
-/static VALUE mFx3d;/d
-/mFx3d = rb_define_module/d
-/static VALUE mScintilla;/d
-/mScintilla = rb_define_module/d
-/static VALUE mTable;/d
-/mTable = rb_define_module/d
-/static VALUE mText;/d
-/mText = rb_define_module/d
-/static VALUE mTreelist;/d
-/mTreelist = rb_define_module/d
-/static VALUE mUi;/d
-/mUi = rb_define_module/d
-/rb_require/d
-s/mDc,/mFox,/
-s/mDialogs,/mFox,/
-s/mFrames,/mFox,/
-s/mIconlist,/mFox,/
-s/mIcons,/mFox,/
-s/mImage,/mFox,/
-s/mLabel,/mFox,/
-s/mLayout,/mFox,/
-s/mList,/mFox,/
-s/mMdi,/mFox,/
-s/mMenu,/mFox,/
-s/mFx3d,/mFox,/
-s/mScintilla,/mFox,/
-s/mTable,/mFox,/
-s/mText,/mFox,/
-s/mTreelist,/mFox,/
-s/mUi,/mFox,/