Skip to content

Commit

Permalink
checked in changes from the RB-1.6 branch (through r2945)
Browse files Browse the repository at this point in the history
  • Loading branch information
lylejohnson committed Feb 2, 2009
1 parent 45cf7d8 commit b6b1acb
Show file tree
Hide file tree
Showing 169 changed files with 5,013 additions and 1,856 deletions.
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.config
InstalledFiles
FXRuby.spec
scripts/make-installers.rb
*.iss
*.iss.in
doap.rdf
Makefile
*.tmproj
doc/api
doc/*.html
ext/fox16/*_wrap.cpp
ext/fox16/*.o
ext/fox16/conftest.dSYM
ext/fox16/include/inlinestubs.h
ext/fox16/librb.c
ext/fox16/extconf.rb
ext/fox16/fox16.bundle
ext/fox16/mkmf.log
lib/fox16/version.rb
lib/fox16/kwargs.rb
pre-config.rb
swig-interfaces/dependencies
146 changes: 85 additions & 61 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,46 +1,23 @@
require 'hoe'
require 'date'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/testtask'

# FXRuby version number
PKG_VERSION = "1.6.6"
PKG_VERSION = "1.6.18"

# Minimum version of FOX required for compatibility
FOX_VERSION = "1.6.0"

# Path to local installation of FOX (Windows only)
FOX_INSTALL_DIR = "c:\\src\\fox-1.6.20"
FOX_INSTALL_DIR = "e:\\src\\fox-1.6.33"

# Path to local installation of FXScintilla (Windows only)
FXSCINTILLA_INSTALL_DIR = "c:\\src\\fxscintilla"

# Path to local installation of InnoSetup command-line compiler
ISCC = "C:\\Progra~1\\InnoSe~1\\ISCC.exe"

# Generate Hoe tasks
=begin
Hoe.new('FXRuby', PKG_VERSION) do |p|
p.url = "http://www.fxruby.org/"
p.author = "Lyle Johnson"
p.email = "lyle@rubyforge.org"
p.changes = "See the change history at http://www.fxruby.org/doc/changes.html"
p.description = "FXRuby is the Ruby binding to the FOX GUI toolkit."
p.summary = "FXRuby is the Ruby binding to the FOX GUI toolkit."
p.clean_globs = %w{config.save InstalledFiles ext/**/*.o ext/**/*.bundle}
p.test_globs = ['tests/**/TC_*.rb']
p.rdoc_pattern = /^(lib|bin)|txt$/
p.extra_deps = []
p.spec_extras = {}
p.need_tar = true
p.need_zip = false
p.spec_extras = {
'require_paths' => ['ext/fox16', 'lib'],
'rdoc_options' => ['--main', File.join('rdoc-sources', 'README.rdoc'), '--exclude', 'ext/fox16'],
'extensions' => ["ext/fox16/extconf.rb"],
'extra_rdoc_files' => ['rdoc-sources', File.join('rdoc-sources', 'README.rdoc')],
'test_suite_file' => "tests/TS_All.rb"
}
end
=end

DISTFILES = [
"ANNOUNCE",
"LICENSE",
Expand All @@ -49,10 +26,7 @@ DISTFILES = [
"pre-config.rb",
"install.rb",
"doap.rdf",
"FXRuby-ruby1.6-i586-mswin32.iss",
"FXRuby-ruby1.8.2-i386-msvcrt.iss",
"FXRuby-ruby1.8.4-i386-msvcrt.iss",
"FXRuby-ruby1.8.5-i386-msvcrt.iss",
"FXRuby-ruby1.8.6-i386-msvcrt.iss",
"Rakefile",
"index.html",
"doc/*.css",
Expand All @@ -77,10 +51,6 @@ DISTFILES = [
"tests/README",
"tests/*.rb",
"tests/*.ps",
"web/*.html",
"web/*.css",
"web/art/*.png",
"web/art/*.gif",
"rdoc-sources/*.rb",
"rdoc-sources/README.rdoc",
"scripts/make-installers.rb"
Expand All @@ -90,7 +60,7 @@ def distdir
"FXRuby-#{PKG_VERSION}"
end

task :distdir => [:swig, :docs, :setversions] do
task :distdir => [:swig, :docs, :setversions, :generate_kwargs_lib] do
rm_rf "#{distdir}"
mkdir "#{distdir}"
chmod(0777, distdir)
Expand All @@ -111,6 +81,7 @@ task :distdir => [:swig, :docs, :setversions] do
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

Expand Down Expand Up @@ -141,9 +112,12 @@ task :website => [:doap] do
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 index.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby}
system %{scp -Cq web/*.html lyle@rubyforge.org:/var/www/gforge-projects/fxruby/web}
system %{scp -Cq web/art/*.gif web/art/*.png lyle@rubyforge.org:/var/www/gforge-projects/fxruby/web/art}
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"
Expand All @@ -153,7 +127,40 @@ end

desc "Upload the RDocs"
task :upload_rdoc do
system %{scp -Cqr doc/api lyle@rubyforge.org:/var/www/gforge-projects/fxruby/1.6/doc}
# system %{scp -Cqr doc/api lyle@rubyforge.org:/var/www/gforge-projects/fxruby/1.6/doc}
host = "lyle@rubyforge.org"
remote_dir = "/var/www/gforge-projects/fxruby/doc/api"
local_dir = 'doc/api'
sh %{rsync -av --delete #{local_dir}/ #{host}:#{remote_dir}}
end

desc "Upload release files to RubyForge"
task :rubyforge do
require 'rubyforge'
rubyforge = RubyForge.new
rubyforge.login
if PLATFORM =~ /mswin32/
rubyforge.userconfig['processor_id'] = 'i386'
rubyforge.add_file "fxruby", "FXRuby 1.6", PKG_VERSION, "fxruby-#{PKG_VERSION}-mswin32.gem"
rubyforge.add_file "fxruby", "FXRuby 1.6", PKG_VERSION, "FXRuby-#{PKG_VERSION}-ruby186.exe"
else
rubyforge.add_release "fxruby", "FXRuby 1.6", PKG_VERSION, "FXRuby-#{PKG_VERSION}.tar.gz"
rubyforge.add_file "fxruby", "FXRuby 1.6", PKG_VERSION, "fxruby-#{PKG_VERSION}.gem"
end
# rubyforge add_release fxruby "FXRuby 1.6" "1.6.9" FXRuby-1.6.9.tar.gz
# rubyforge add_file fxruby "FXRuby 1.6" "1.6.9" fxruby-1.6.9.gem
# rubyforge add_file -o i386 fxruby "FXRuby 1.6" "1.6.9" fxruby-1.6.9-mswin32.gem
# rubyforge add_file -o i386 fxruby "FXRuby 1.6" "1.6.9" FXRuby-1.6.9-ruby186.exe
end

desc "Tag this release in Subversion"
task :tag do
require 'rexml/document'
doc = REXML::Document.new(`svn info --xml`)
branch = doc.get_elements("/info/entry/url").first.text
root = doc.get_elements("/info/entry/repository/root").first.text
tag = root + "/tags/REL-#{PKG_VERSION}"
sh %{svn copy -m "Created tag for version #{PKG_VERSION}" #{branch} #{tag}}
end

desc "Generate all of the documentation files."
Expand All @@ -180,6 +187,7 @@ Rake::RDocTask.new do |rdoc|
"lib/fox16/glshapes.rb",
"lib/fox16/input.rb",
"lib/fox16/iterators.rb",
"lib/fox16/keys.rb",
"lib/fox16/responder2.rb",
"lib/fox16/scintilla.rb",
"lib/fox16/signal.rb",
Expand All @@ -200,6 +208,11 @@ end

desc "Clean"
task :clean do
rm_rf "ext/fox16/Makefile"
rm_rf FileList["ext/fox16/*.o"]
rm_rf FileList["ext/fox16/*.bundle"]
rm_rf "ext/fox16/mkmf.log"
rm_rf "ext/fox16/conftest.dSYM"
ruby "install.rb clean"
end

Expand All @@ -210,10 +223,11 @@ def make_impl
end

task :configure => [:scintilla, :setversions, :generate_kwargs_lib] do
unless File.exist?("config.save")
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"
# 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"
make_impl
end
end
Expand Down Expand Up @@ -253,10 +267,7 @@ task :setversions => [ :create_installer_scripts ] do
setversions("Makefile")
setversions("pre-config.rb")
setversions("ext/fox16/extconf.rb")
setversions("FXRuby-ruby1.6-i586-mswin32.iss")
setversions("FXRuby-ruby1.8.2-i386-msvcrt.iss")
setversions("FXRuby-ruby1.8.4-i386-msvcrt.iss")
setversions("FXRuby-ruby1.8.5-i386-msvcrt.iss")
setversions("FXRuby-ruby1.8.6-i386-msvcrt.iss")
setversions("lib/fox16/version.rb")
setversions("doap.rdf")
setversions("scripts/make-installers.rb")
Expand All @@ -265,10 +276,7 @@ end
desc "Create INNO Setup Installer Scripts from Template"
task :create_installer_scripts do
output_filenames = {
"FXRuby-ruby1.6-i586-mswin32.iss.in" => ["1.6", "ruby168", "i586-mswin32"],
"FXRuby-ruby1.8.2-i386-msvcrt.iss.in" => ["1.8", "ruby182", "i386-msvcrt"],
"FXRuby-ruby1.8.4-i386-msvcrt.iss.in" => ["1.8", "ruby184", "i386-msvcrt"],
"FXRuby-ruby1.8.5-i386-msvcrt.iss.in" => ["1.8", "ruby185", "i386-msvcrt"]
"FXRuby-ruby1.8.6-i386-msvcrt.iss.in" => ["1.8", "ruby186", "i386-msvcrt"]
}

output_filenames.each do |output_filename, info|
Expand All @@ -285,15 +293,15 @@ task :create_installer_scripts do
end

# These library files aren't ready for distribution yet.
COOKER_LIBS = %w{acceltable.rb bitmapview.rb canvas.rb html.rb sugar.rb tkcompat.rb}
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 tablenew.rb}
COOKER_EXAMPLES = %w{canvasdemo.rb WhatAQuietStiff.rb examples.rb gdchart.rb gembrowser.rb rapt-gui.rb rmagick.rb tablenew.rb}

# Return the Gem specification for the source Gem
def create_gemspec
pkg_files = [
"ANNOUNCE",
"ANNOUNCE",
"LICENSE",
"README",
"index.html",
Expand Down Expand Up @@ -337,7 +345,8 @@ def create_gemspec
s.has_rdoc = true
s.rdoc_options = [
'--main', File.join('rdoc-sources', 'README.rdoc'),
'--exclude', 'ext/fox16'
'--exclude', 'ext/fox16',
'--exclude', %r{acceltable|aliases|bitmapview|canvas|html|kwargs|missingdep|responder|tkcompat}
]
s.extra_rdoc_files = [
'rdoc-sources',
Expand All @@ -347,7 +356,7 @@ def create_gemspec
s.test_suite_file = "tests/TS_All.rb"

s.author = "Lyle Johnson"
s.email = "lyle@knology.net"
s.email = "lyle.johnson@gmail.com"
s.homepage = "http://www.fxruby.org"
end
end
Expand All @@ -370,7 +379,7 @@ end
# Given the distribution tarball, build the installer for Win32
desc "Build Win32 installer"
task :build_win32 do
if File.exist? "config.save"
if File.exist? ".config"
ruby "install.rb clean"
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"
Expand All @@ -382,22 +391,22 @@ desc "Build Win32 installer using INNO Setup"
task :build_win32_installer => [:build_win32] do
iss_script_name = nil
case VERSION
when /1.6/
iss_script_name = "FXRuby-ruby1.6-i586-mswin32.iss"
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"
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::WIN32
spec.platform = Gem::Platform::CURRENT
spec.files += ["ext/fox16/fox16.so"]
Gem::Builder.new(spec).build
end
Expand All @@ -406,10 +415,25 @@ 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

Rake::TestTask.new do |t|
t.libs << "tests"
t.test_files = FileList["tests/TC_*.rb"]
t.verbose = true
end

# Default task is build
task :default => [:build] do
end
Expand Down
8 changes: 5 additions & 3 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
#
########################################################################

SAXON = java -jar /Users/lyle/saxon-6.5.3/saxon.jar
#SAXON = java -jar /Users/lyle/saxon-8.9/saxon8.jar
SAXON = java -jar /Users/lyle/saxon-6.5.5/saxon.jar
HTML_STYLESHEET = custom-html.xsl
FO_STYLESHEET = custom-fo.xsl
FOP = /Users/lyle/fop-0.20.4/fop.sh
#FO_STYLESHEET = custom-fo.xsl
FO_STYLESHEET = /Users/lyle/docbook/docbook5-xsl-1.72.0/fo/docbook.xsl
FOP = /Users/lyle/fop-0.93/fop

all: html

Expand Down
8 changes: 3 additions & 5 deletions doc/book.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<!DOCTYPE book
PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"file:/Users/lyle/docbook/xml/4.4/docbookx.dtd" [
PUBLIC "-//OASIS//DTD DocBook V5.0//EN"
"file:/Users/lyle/docbook/xml/5.0/dtd/docbook.dtd" [
<!ENTITY bookinfo.xml SYSTEM "bookinfo.xml">
<!ENTITY build.xml SYSTEM "build.xml">
<!ENTITY changes.xml SYSTEM "changes.xml">
Expand All @@ -19,11 +19,10 @@
<!ENTITY library.xml SYSTEM "library.xml">
<!ENTITY opengl.xml SYSTEM "opengl.xml">
<!ENTITY scintilla.xml SYSTEM "scintilla.xml">
<!ENTITY todo.xml SYSTEM "todo.xml">
<!ENTITY tutorial1.xml SYSTEM "tutorial1.xml">
<!ENTITY unicode.xml SYSTEM "unicode.xml">
]>
<book id="book" lang="en">
<book id="book" lang="en" xmlns="http://docbook.org/ns/docbook">
&bookinfo.xml;
<part label="I">
<title>The Basics</title>
Expand All @@ -37,7 +36,6 @@
&examples.xml;
&events.xml;
<!--&layout.xml;-->
&todo.xml;
&infosources.xml;
&changes.xml;
</part>
Expand Down
Loading

0 comments on commit b6b1acb

Please sign in to comment.