2009-07-12 19:08:32 -04:00
##############################################################
2005-01-25 09:31:45 -05:00
# extconf.rb for tcltklib
2010-07-29 18:54:01 -04:00
# release date: 2010-07-30
2009-07-12 19:08:32 -04:00
##############################################################
1999-08-13 01:37:52 -04:00
require 'mkmf'
2005-01-25 09:31:45 -05:00
2009-07-12 19:08:32 -04:00
TkLib_Config = { }
2011-05-15 07:55:52 -04:00
TkLib_Config [ 'search_versions' ] =
2010-05-06 17:47:37 -04:00
# %w[8.9 8.8 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6 4.2]
2010-05-31 10:50:39 -04:00
# %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0]
2013-07-19 00:43:16 -04:00
# %w[8.7 8.6 8.5 8.4 8.0] # to shorten search steps
2014-10-13 13:32:17 -04:00
%w[ 8.5 8.4 8.6 ] # Tcl/Tk8.6 support is experimental.
2005-01-25 09:31:45 -05:00
2013-11-29 10:44:25 -05:00
TkLib_Config [ 'unsupported_versions' ] =
2014-10-13 13:32:17 -04:00
%w[ 8.8 8.7 ] # Tcl/Tk8.6 support is experimental.
2013-11-29 10:44:25 -05:00
2011-05-23 18:37:44 -04:00
TkLib_Config [ 'major_nums' ] = '87'
2008-06-11 11:56:22 -04:00
2013-11-29 10:44:25 -05:00
##############################################################
TkLib_Config [ 'enable-shared' ] = enable_config ( " shared " )
2009-07-12 19:08:32 -04:00
##############################################################
# use old extconf.rb ?
##############################################################
if with_config ( 'tk-old-extconf' )
require File . join ( File . dirname ( __FILE__ ) , 'old-extconf.rb' )
exit
2005-05-23 03:27:08 -04:00
end
2009-07-12 19:08:32 -04:00
##############################################################
# check configs
##############################################################
2011-06-01 11:46:31 -04:00
( $cleanfiles || = " " ) << 'config_list'
2009-07-23 04:28:49 -04:00
config_list_file = 'config_list'
config_list_file_source = File . join ( File . dirname ( __FILE__ ) , 'config_list.in' )
2011-05-15 07:55:52 -04:00
if ! File . exist? ( config_list_file ) ||
2009-07-12 19:08:32 -04:00
File . ctime ( config_list_file_source ) > File . ctime ( config_list_file )
old_config_list_file = config_list_file_source
else
old_config_list_file = config_list_file
2005-01-25 09:31:45 -05:00
end
2009-07-12 19:08:32 -04:00
current_configs = { 'with' = > { } , 'enable' = > { } }
* ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5.
* ext/tk/lib/tkextlib/tile.rb: [incompatible] remove TileWidgets'
instate/state/identify method to avoid the conflict with standard
widget options. Those methods are renamed to ttk_instate/ttk_state/
ttk_identify (tile_instate/tile_state/tile_identify are available
too). Although I don't recommend, if you realy need old methods,
please define "Tk::USE_OBSOLETE_TILE_STATE_METHOD = true" before
"require 'tkextlib/tile'".
* ext/tk/lib/tkextlib/tile.rb: "Tk::Tile::__Import_Tile_Widgets__!"
is obsolete. It outputs warning. To control default widget set,
use "Tk.default_widget_set = :Ttk".
* ext/tk/lib/tk.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__ method and
__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method are defind
as module methods of TkConfigMethod. It may help users to wrap old
Ruby/Tk scripts (use standard widgets) to force to use Ttk widgets.
Ttk widgets don't have some options of standard widgets which are
control the view of widgets. When set ignore-mode true, configure
method tries to ignoure such unknown options with no exception.
Of course, it may raise other troubles on the GUI design.
So, those are a little danger methods.
* ext/tk/lib/tk/itemconfig.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__
method and __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method
are defind as module methods of TkItemConfigMethod as the same
purpose as TkConfigMethod's ones.
* ext/tk/sample/ttk_wrapper.rb: A new example. This is a tool for
wrapping old Ruby/Tk scripts (which use standard widgets) to use
Ttk (Tile) widgets as default.
* ext/tk/sample/tkextlib/tile/demo.rb: use ttk_instate/ttk_state
method instead of instate/state method.
* ext/tk/lib/tk/root, ext/tk/lib/tk/namespace.rb,
ext/tk/lib/tk/text.rb, ext/tk/lib/tkextlib/*: some 'instance_eval's
are replaced to "instance_exec(self)".
* ext/tk/lib/tk/event.rb: bug fix on KEY_TBL and PROC_TBL (?x is not
a character code on Ruby1.9).
* ext/tk/lib/tk/variable.rb: support new style of operation argument
on Tcl/Tk's 'trace' command for variables.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget: bug fix
* ext/tk/sammple/demos-jp/textpeer.rb,
ext/tk/sammple/demos-en/textpeer.rb: new widget demo.
* ext/tk/tcltklib.c: decrase SEGV troubles (probably)
* ext/tk/lib/tk.rb: remove Thread.critical access if Ruby1.9
* ext/tk/lib/tk/multi-tk.rb: support Ruby1.9 (probably)
* ext/tk/lib/tkextlib/tile.rb: add method to define Tcl/Tk command
to make Tcl/Tk theme sources (based on different version of Tile
extension) available.
(Tk::Tile::__define_LoadImages_proc_for_comaptibility__)
* ext/tk/lib/tk.rb, ext/tk/lib/tk/wm.rb: support dockable frames
(Tcl/Tk8.5 feature). 'wm' command can treat many kinds of widgets
as toplevel widgets.
* ext/tk/lib/tkextlib/tile/style.rb: ditto.
(Tk::Tile::Style.__define_wrapper_proc_for_compatibility__)
* ext/tk/lib/tk/font.rb: add actual_hash and metrics_hash to get
properties as a hash. metrics_hash method returns a boolean value
for 'fixed' option. But metrics method returns numeric value
(0 or 1) for 'fixed' option, because of backward compatibility.
* ext/tk/lib/tk/timer.rb: somtimes fail to set callback procedure.
* ext/tk/lib/tk.rb: add Tk.sleep and Tk.wakeup method. Tk.sleep
doesn't block the eventloop. It will be better to use the method
in event callbacks.
* ext/tk/sample/tksleep_sample.rb: sample script about Tk.sleep.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-29 01:25:12 -04:00
2009-07-12 19:08:32 -04:00
# setup keys by config_list.in
IO . foreach ( config_list_file_source ) { | line |
line . chomp!
line . lstrip!
next if line . empty? || line =~ / ^ \ # / #
mode , key , value = line . split ( / \ s+ / , 3 )
value || = " "
current_configs [ mode ] [ key ] = value rescue nil
}
2005-01-25 09:31:45 -05:00
2009-07-12 19:08:32 -04:00
# define current value of keys
IO . foreach ( old_config_list_file ) { | line |
line . chomp!
line . lstrip!
next if line . empty? || line =~ / ^ \ # / #
mode , key , value = line . split ( / \ s+ / , 3 )
value || = " "
if current_configs [ mode ] && current_configs [ mode ] . has_key? ( key )
current_configs [ mode ] [ key ] = value
end
}
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2009-07-12 19:08:32 -04:00
update_flag = false
current_configs [ 'with' ] . each_key { | key |
if ( value = with_config ( key ) . to_s ) != current_configs [ 'with' ] [ key ]
update_flag = true
current_configs [ 'with' ] [ key ] = value
end
}
current_configs [ 'enable' ] . each_key { | key |
if ( value = enable_config ( key ) . to_s ) != current_configs [ 'enable' ] [ key ]
update_flag = true
current_configs [ 'enable' ] [ key ] = value
end
}
2005-01-25 09:31:45 -05:00
2009-07-12 19:08:32 -04:00
# update current_configs
if update_flag || ! File . exist? ( config_list_file )
open ( config_list_file , 'w' ) { | fobj |
fobj . print ( " # values of current configure options (generated by extconf.rb) \n " ) ;
[ 'with' , 'enable' ] . each { | mode |
current_configs [ mode ] . each_key { | key |
fobj . print ( " #{ mode } #{ key } #{ current_configs [ mode ] [ key ] } \n " )
}
}
}
end
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2009-07-12 19:08:32 -04:00
if update_flag
puts " Configure options for Ruby/Tk may be updated. "
puts " So, delete files which depend on old configs. "
2010-05-06 17:47:37 -04:00
File . delete ( * Dir . glob ( " *. #{ CONFIG [ 'DLEXT' ] } " , File :: FNM_CASEFOLD ) )
File . delete ( * Dir . glob ( " *. #{ $OBJEXT } " , File :: FNM_CASEFOLD ) )
2009-07-23 04:28:49 -04:00
File . delete ( 'Makefile' ) rescue nil
2006-11-22 02:06:11 -05:00
2009-07-12 19:08:32 -04:00
else
2009-07-23 04:28:49 -04:00
makefile = 'Makefile'
2011-05-15 07:55:52 -04:00
if File . exist? ( makefile ) &&
2009-07-12 19:08:32 -04:00
File . ctime ( config_list_file ) > File . ctime ( makefile )
# no need to update Makefile
exit
end
end
2009-07-23 04:28:49 -04:00
2009-07-12 19:08:32 -04:00
##############################################################
# fuctions
##############################################################
def is_win32?
/ mswin|mingw|cygwin|bccwin / =~ RUBY_PLATFORM
end
def is_macosx?
/ darwin / =~ RUBY_PLATFORM
2008-10-19 19:22:10 -04:00
end
2011-05-23 18:37:44 -04:00
def maybe_64bit?
2013-06-17 01:21:16 -04:00
/ 64|universal|s390x / =~ RUBY_PLATFORM
2011-05-23 18:37:44 -04:00
end
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
def check_tcltk_version ( version )
2009-07-12 19:08:32 -04:00
return [ nil , nil ] unless version . kind_of? String
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2011-05-23 18:37:44 -04:00
tclver , tkver = version . split ( ',' )
tclver = tclver . strip
return [ tclver , tkver . strip ] if tkver
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2009-07-12 19:08:32 -04:00
dot = major = minor_dot = minor = plvl_dot = plvl = ext = nil
2011-05-23 18:37:44 -04:00
if tclver =~ / ^( \ d)( \ .?)( \ d)( \ .?)( \ d*)(.*)$ /
2009-07-12 19:08:32 -04:00
major = $1 ; minor_dot = $2 ; minor = $3 ; plvl_dot = $4 ; plvl = $5 ; ext = $6
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
dot = ! minor_dot . empty?
if plvl_dot . empty? && ! plvl . empty?
minor << plvl
end
2011-05-23 18:37:44 -04:00
elsif tclver =~ / ^( \ d)( \ .?)( \ d?)(.*)$ /
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
major = $1 ; minor_dot = $2 ; minor = $3 ; ext = $4
dot = ! minor_dot . empty?
else # unknown -> believe user
return [ tclver , tkver ]
end
# check Tcl7.6 / Tk4.2 ?
if major == " 7 " # Tcl7.6 ( not support Tclversion < 7.6 )
# Tk4.2
tkver = " 4 " + ( ( dot ) ? " . " : " " ) + ( ( minor . empty ) ? " " : " 2 " ) + ext
elsif major == " 4 " # Tk4.2 ( not support Tkversion < 4.2 )
# Tcl7.6
2011-05-23 18:37:44 -04:00
tkver = tclver
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
tclver = " 7 " + ( ( dot ) ? " . " : " " ) + ( ( minor . empty ) ? " " : " 6 " ) + ext
end
2011-05-23 18:37:44 -04:00
tkver = tclver unless tkver
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
[ tclver , tkver ]
end
2009-07-12 19:08:32 -04:00
def get_shlib_versions ( major = 8 , minor_max = 9 , minor_min = 0 , ext = " " )
if tclcfg = TkLib_Config [ " tclConfig_info " ]
major = tclcfg [ 'TCL_MAJOR_VERSION' ] . to_i
minor_min = tclcfg [ 'TCL_MINOR_VERSION' ] . to_i
elsif TkLib_Config [ " tcltkversion " ]
tclver , tkver = TkLib_Config [ " tcltkversion " ]
if tclver =~ / 8 \ .?( \ d)(.*) /
minor_min = $1 . to_i
ext = $2
else
# unsupported version
return [ " " ]
end
end
# if disable-stubs, version is fixed.
minor_max = minor_min unless TkLib_Config [ " tcltk-stubs " ]
vers = [ ]
minor_max . downto ( minor_min ) { | minor |
vers << " #{ major } . #{ minor } #{ ext } " unless ext . empty?
vers << " #{ major } . #{ minor } "
}
vers << " "
end
def get_shlib_path_head
path_head = [ ]
path_dirs = [ ]
if TkLib_Config [ " ActiveTcl " ] . kind_of? ( String ) # glob path
2010-05-31 10:50:39 -04:00
# path_head << TkLib_Config["ActiveTcl"]
path_head . concat Dir . glob ( TkLib_Config [ " ActiveTcl " ] , File :: FNM_CASEFOLD ) . sort . reverse
# path_dirs.concat Dir.glob(File.join(TkLib_Config["ActiveTcl"], 'lib'), File::FNM_CASEFOLD).sort.reverse
2009-07-12 19:08:32 -04:00
end
2010-05-06 17:47:37 -04:00
if CROSS_COMPILING
elsif is_win32?
2009-07-12 19:08:32 -04:00
if TkLib_Config [ " ActiveTcl " ]
2011-05-23 18:37:44 -04:00
path_head . concat [ " c:/ActiveTcl " , " c:/Program Files/ActiveTcl " ,
" c:/Program Files (x86)/ActiveTcl " ]
2009-07-12 19:08:32 -04:00
end
path_head . concat [
2011-05-23 18:37:44 -04:00
" c:/Tcl " , " c:/Program Files/Tcl " , " c:/Program Files (x86)/Tcl " ,
" /Tcl " , " /Program Files/Tcl " , " /Program Files (x86)/Tcl "
2009-07-12 19:08:32 -04:00
]
2011-05-23 18:37:44 -04:00
path_head . uniq!
2011-05-26 19:36:33 -04:00
#path_head.each{|dir| path_dirs << dir.dup if File.directory? dir}
path_head . each { | dir | path_dirs << File . expand_path ( dir ) if File . directory? dir }
2011-05-23 18:37:44 -04:00
2011-05-26 19:36:33 -04:00
# for MinGW
[ " /usr/local/lib64 " , " /usr/lib64 " , " /usr/local/lib " , " /usr/lib " ] . each { | dir |
#path_dirs << dir if File.directory? dir
path_dirs << File . expand_path ( dir ) if File . directory? dir
}
path_dirs |= ENV [ 'LIBRARY_PATH' ] . split ( ';' ) . find_all { | dir | File . directory? dir } . map { | dir | File . expand_path ( dir ) } if ENV [ 'LIBRARY_PATH' ]
path_dirs |= ENV [ 'PATH' ] . split ( ';' ) . find_all { | dir | File . directory? dir } . map { | dir | File . expand_path ( dir ) } if ENV [ 'PATH' ]
2009-07-12 19:08:32 -04:00
else
[
2011-05-15 07:55:52 -04:00
'/opt' , '/pkg' , '/share' ,
2009-07-12 19:08:32 -04:00
'/usr/local/opt' , '/usr/local/pkg' , '/usr/local/share' , '/usr/local' ,
'/usr/opt' , '/usr/pkg' , '/usr/share' , '/usr/contrib' , '/usr'
] . each { | dir |
next unless File . directory? ( dir )
2011-05-23 18:37:44 -04:00
path_dirs << " #{ dir } /lib64 " if maybe_64bit?
2009-07-12 19:08:32 -04:00
path_dirs << " #{ dir } /lib "
2010-05-06 17:47:37 -04:00
path_dirs << " #{ dir } " unless Dir . glob ( " #{ dir } /lib*.* " , File :: FNM_CASEFOLD ) . empty?
2009-07-12 19:08:32 -04:00
dirnames = [ ]
if TkLib_Config [ " ActiveTcl " ]
2010-05-06 17:47:37 -04:00
dirnames . concat [ " ActiveTcl " ]
2009-07-12 19:08:32 -04:00
end
2010-05-06 17:47:37 -04:00
dirnames . concat [ " TclTk " , " Tcl_Tk " , " Tcl-Tk " ]
2009-07-12 19:08:32 -04:00
dirnames . each { | name |
path_dirs << " #{ dir } / #{ name } " if File . directory? ( " #{ dir } / #{ name } " )
2010-05-06 17:47:37 -04:00
path_head << " #{ dir } / #{ name } " unless Dir . glob ( " #{ dir } / #{ name } [-89_]* " , File :: FNM_CASEFOLD ) . empty?
2009-07-12 19:08:32 -04:00
}
}
end
2009-07-16 10:34:09 -04:00
unless TkLib_Config [ " space-on-tk-libpath " ]
path_head . delete_if { | path | path =~ / / }
path_dirs . delete_if { | path | path =~ / / }
end
2009-07-12 19:08:32 -04:00
[ path_head , path_dirs ]
end
def find_macosx_framework
use_framework = is_macosx? && TkLib_Config [ " ActiveTcl " ]
use_framework || = ( tcl_hdr = with_config ( " tcl-framework-header " ) )
use_framework || = ( tk_hdr = with_config ( " tk-framework-header " ) )
tcl_hdr = nil unless tcl_hdr . kind_of? String
tk_hdr = nil unless tk_hdr . kind_of? String
TkLib_Config [ " tcl-framework-header " ] = tcl_hdr
TkLib_Config [ " tk-framework-header " ] = tk_hdr
use_framework || = ( tcl_dir = with_config ( " tcl-framework-dir " ) )
tcl_dir = nil unless tcl_dir . kind_of? String
if ! tcl_dir && tcl_hdr
# e.g. /Library/Frameworks/Tcl.framework/Headers
# ==> /Library/Frameworks/Tcl.framework
tcl_dir = File . dirname ( tcl_hdr . strip . chomp ( '/' ) )
end
TkLib_Config [ " tcl-framework-dir " ] = tcl_dir
use_framework || = ( tk_dir = with_config ( " tk-framework-dir " ) )
tk_dir = nil unless tk_dir . kind_of? String
if ! tk_dir && tk_hdr
# e.g. /Library/Frameworks/Tk.framework/Headers
# ==> /Library/Frameworks/Tk.framework
tk_dir = File . dirname ( tk_hdr . strip . chomp ( '/' ) )
end
TkLib_Config [ " tk-framework-dir " ] = tk_dir
if tcl_dir && ! tk_dir
tk_dir = File . join ( File . dirname ( tcl_dir ) , 'Tk.framework' )
TkLib_Config [ " tk-framework-dir " ] = tk_dir
elsif ! tcl_dir && tk_dir
tcl_dir = File . join ( File . dirname ( tk_dir ) , 'Tcl.framework' )
TkLib_Config [ " tcl-framework-dir " ] = tcl_dir
end
if tcl_dir && tk_dir
TkLib_Config [ " tcltk-framework " ] = File . dirname ( tcl_dir ) unless TkLib_Config [ " tcltk-framework " ]
return [ tcl_dir , tk_dir ]
end
# framework is disabled?
2011-05-15 07:55:52 -04:00
if with_config ( " tcltk-framework " ) == false ||
2009-07-12 19:08:32 -04:00
enable_config ( " tcltk-framework " ) == false
return false
end
use_framework || = ( framework_dir = with_config ( " tcltk-framework " ) )
if framework_dir . kind_of? String
TkLib_Config [ " tcltk-framework " ] = framework_dir . strip . chomp ( '/' )
2011-05-15 07:55:52 -04:00
return [ File . join ( TkLib_Config [ " tcltk-framework " ] , 'Tcl.framework' ) ,
2009-07-12 19:08:32 -04:00
File . join ( TkLib_Config [ " tcltk-framework " ] , 'Tk.framework' ) ]
end
unless enable_config ( " tcltk-framework " , use_framework ) ||
enable_config ( " mac-tcltk-framework " , use_framework )
TkLib_Config [ " tcltk-framework " ] = false
return false
end
paths = [
2011-05-15 07:55:52 -04:00
#"~/Library/Frameworks",
2009-07-12 19:08:32 -04:00
" /Library/Frameworks " ,
" /Network/Library/Frameworks " , " /System/Library/Frameworks "
]
2010-05-31 10:50:39 -04:00
paths . reverse! unless TkLib_Config [ " ActiveTcl " ] # system has higher priority
2009-07-12 19:08:32 -04:00
paths . map { | dir | dir . strip . chomp ( '/' ) } . each { | dir |
2013-06-17 01:21:16 -04:00
next unless File . exist? ( File . join ( dir , " Tcl.framework " , " Headers " ) )
2009-07-12 19:08:32 -04:00
next unless File . directory? ( tcldir = File . join ( dir , " Tcl.framework " ) )
2013-07-19 00:43:16 -04:00
next unless File . exist? ( File . join ( dir , " Tk.framework " , " Headers " ) )
2009-07-12 19:08:32 -04:00
next unless File . directory? ( tkdir = File . join ( dir , " Tk.framework " ) )
TkLib_Config [ " tcltk-framework " ] = dir
return [ tcldir , tkdir ]
}
nil
end
def collect_tcltk_defs ( tcl_defs_str , tk_defs_str )
conflicts = [
2011-05-15 07:55:52 -04:00
'PACKAGE_NAME' , 'PACKAGE_TARNAME' , 'PACKAGE_VERSION' ,
2009-07-12 19:08:32 -04:00
'PACKAGE_STRING' , 'PACKAGE_BUGREPORT'
]
begin
# Ruby 1.9.x or later
arch_config_h = RbConfig . expand ( $arch_hdrdir + " /ruby/config.h " )
if File . exist? ( arch_config_h )
keys = [ ]
IO . foreach ( arch_config_h ) { | line |
if line =~ / ^ # define +([^ ]+) /
keys << $1
end
}
conflicts = keys
end
rescue
# ignore, use default
end
if tcl_defs_str
tcl_defs = tcl_defs_str . split ( / ?-D / ) . map { | s |
s =~ / ^([^=]+)(.*)$ /
[ $1 , $2 ]
}
else
tcl_defs = [ ]
end
if tk_defs_str
tk_defs = tk_defs_str . split ( / ?-D / ) . map { | s |
s =~ / ^([^=]+)(.*)$ /
[ $1 , $2 ]
}
else
tk_defs = [ ]
end
defs = tcl_defs | tk_defs
defs . delete_if { | name , value |
conflicts . include? ( name ) ||
2011-05-15 07:55:52 -04:00
( ( vtcl = tcl_defs . assoc ( name ) ) && ( vtk = tk_defs . assoc ( name ) ) &&
2009-07-12 19:08:32 -04:00
vtcl != vtk )
}
2011-06-07 00:37:08 -04:00
defs . map { | ary | s = ary . join ( '' ) ; ( s . strip . empty? ) ? " " : " -D " << s }
2009-07-12 19:08:32 -04:00
end
def parse_tclConfig ( file )
# check tclConfig.sh/tkConfig.sh
tbl = Hash . new { | h , k | h [ k ] = " " }
return tbl unless file
IO . foreach ( file ) { | line |
line . strip!
next if line !~ / ^([^ \ # =][^=]*)=(['"]|)(.*) \ 2$ /
key , val = $1 , $3
tbl [ key ] = val . gsub ( / \ $ \ {([^}]+) \ } / ) { | s |
subst = $1
( tbl [ subst ] ) ? tbl [ subst ] : s
} rescue nil
}
tbl
end
def get_libpath ( lib_flag , lib_spec )
2011-05-23 18:37:44 -04:00
# get libpath from {TCL,Tk}_LIB_FLAG and {TCL,Tk}_LIB_SPEC
lib_spec . gsub ( / ( #{ lib_flag } |-L) / , " " ) . strip
2009-07-12 19:08:32 -04:00
end
2009-07-27 15:40:43 -04:00
def get_tclConfig_dirs
2009-07-12 19:08:32 -04:00
config_dir = [ ]
2010-05-06 17:47:37 -04:00
if CROSS_COMPILING
elsif is_win32?
2009-07-12 19:08:32 -04:00
if TkLib_Config [ " ActiveTcl " ]
dirs = [ ]
if TkLib_Config [ " ActiveTcl " ] . kind_of? ( String )
2010-05-31 10:50:39 -04:00
dirs << File . join ( TkLib_Config [ " ActiveTcl " ] , 'lib' )
2009-07-12 19:08:32 -04:00
end
dirs . concat [
2010-05-06 17:47:37 -04:00
" c:/ActiveTcl*/lib " , " c:/Tcl*/lib " ,
2011-05-23 18:37:44 -04:00
" c:/Program Files*/ActiveTcl*/lib " , " c:/Program Files*/Tcl*/lib " ,
2010-05-06 17:47:37 -04:00
" /ActiveTcl*/lib " , " /Tcl*/lib " ,
2011-05-23 18:37:44 -04:00
" /Program Files*/ActiveTcl*/lib " , " /Program Files*/Tcl*/lib "
2009-07-12 19:08:32 -04:00
]
else
dirs = [
2011-05-23 18:37:44 -04:00
" c:/Tcl*/lib " , " c:/Program Files*/Tcl*/lib " ,
" /Tcl*/lib " , " /Program Files*/Tcl*/lib "
2009-07-12 19:08:32 -04:00
]
end
2011-05-23 18:37:44 -04:00
dirs = dirs . collect { | d | Dir . glob ( d , File :: FNM_CASEFOLD ) } . flatten . uniq
dirs |= ENV [ 'LIBRARY_PATH' ] . split ( ';' ) if ENV [ 'LIBRARY_PATH' ]
dirs |= ENV [ 'PATH' ] . split ( ';' ) if ENV [ 'PATH' ]
2009-07-12 19:08:32 -04:00
2010-05-06 20:16:19 -04:00
exeext = RbConfig :: CONFIG [ 'EXEEXT' ]
2010-05-06 17:47:37 -04:00
ENV [ 'PATH' ] . split ( File :: PATH_SEPARATOR ) . each { | dir |
dir . tr! ( File :: ALT_SEPARATOR , File :: SEPARATOR ) if File :: ALT_SEPARATOR
2010-05-06 20:16:19 -04:00
next if Dir . glob ( File . join ( dir , " {tclsh,wish}* #{ exeext } " ) , File :: FNM_CASEFOLD ) . empty?
2009-07-12 19:08:32 -04:00
dirs << File . expand_path ( File . join ( dir , '..' , 'lib' ) )
dirs << dir
2010-05-06 17:47:37 -04:00
# dirs << File.expand_path(File.join(dir, '..'))
2009-07-12 19:08:32 -04:00
}
2009-07-16 10:34:09 -04:00
unless TkLib_Config [ " space-on-tk-libpath " ]
dirs . delete_if { | path | path =~ / / }
end
2009-07-12 19:08:32 -04:00
config_dir . concat ( dirs . zip ( dirs ) )
else
2010-05-31 10:50:39 -04:00
if framework = find_macosx_framework ( )
config_dir . unshift ( framework )
end
2009-07-12 19:08:32 -04:00
if activeTcl = TkLib_Config [ 'ActiveTcl' ]
# check latest version at first
2010-05-31 10:50:39 -04:00
if is_macosx?
base = File . expand_path ( activeTcl )
config_dir << [
File . join ( base , 'Tcl.framework' ) , File . join ( base , 'Tk.framework' )
]
config_dir << [
File . join ( base , 'Tcl.framework' , 'Versions' , 'Current' ) ,
File . join ( base , 'Tk.framework' , 'Versions' , 'Current' )
]
2011-05-15 07:55:52 -04:00
Dir . glob ( File . join ( base , 'Tcl.framework' ,
2010-05-31 10:50:39 -04:00
'Versions' , '*' ) ) . sort . reverse . each { | dir |
next if dir =~ / Current /
config_dir << [ dir , dir . gsub ( / Tcl / , 'Tk' ) ]
}
else
config_dir . concat ( Dir . glob ( File . join ( activeTcl , 'lib' ) , File :: FNM_CASEFOLD ) . sort . reverse )
end
2009-07-12 19:08:32 -04:00
end
2011-05-23 18:37:44 -04:00
config_dir << RbConfig :: CONFIG [ 'libdir' ]
( ( maybe_64bit? ) ? [ 'lib64' , 'lib' ] : [ 'lib' ] ) . each { | dir |
config_dir . concat [
File . join ( RbConfig :: CONFIG [ 'exec_prefix' ] , dir ) ,
File . join ( RbConfig :: CONFIG [ 'prefix' ] , dir ) ,
" /usr/local/opt/ #{ dir } " , " /usr/local/pkg/ #{ dir } " ,
" /usr/local/share/ #{ dir } " , " /usr/local/ #{ dir } " ,
" /usr/opt/ #{ dir } " , " /usr/pkg/ #{ dir } " , " /usr/share/ #{ dir } " ,
" /usr/contrib/ #{ dir } " , " /usr/ #{ dir } "
]
}
2009-07-12 19:08:32 -04:00
config_dir . concat [
2011-05-15 07:55:52 -04:00
'/opt' , '/pkg' , '/share' ,
2009-07-12 19:08:32 -04:00
'/usr/local/opt' , '/usr/local/pkg' , '/usr/local/share' , '/usr/local' ,
'/usr/opt' , '/usr/pkg' , '/usr/share' , '/usr/contrib' , '/usr'
] . map { | dir |
2011-05-23 18:37:44 -04:00
Dir . glob ( dir + " /{tcltk,tcl,tk}[ #{ TkLib_Config [ 'major_nums' ] } */lib " ,
File :: FNM_CASEFOLD )
Dir . glob ( dir + " /{tcltk,tcl,tk}[ #{ TkLib_Config [ 'major_nums' ] } * " ,
File :: FNM_CASEFOLD )
2010-05-06 17:47:37 -04:00
Dir . glob ( dir + '/{tcltk,tcl,tk}/lib' , File :: FNM_CASEFOLD )
Dir . glob ( dir + '/{tcltk,tcl,tk}' , File :: FNM_CASEFOLD )
2009-07-12 19:08:32 -04:00
} . flatten!
2010-05-06 20:16:19 -04:00
exeext = RbConfig :: CONFIG [ 'EXEEXT' ]
2010-05-06 17:47:37 -04:00
ENV [ 'PATH' ] . split ( File :: PATH_SEPARATOR ) . each { | dir |
dir . tr! ( File :: ALT_SEPARATOR , File :: SEPARATOR ) if File :: ALT_SEPARATOR
2010-05-06 20:16:19 -04:00
next if Dir . glob ( File . join ( dir , " {tclsh,wish}* #{ exeext } " ) , File :: FNM_CASEFOLD ) . empty?
2009-07-12 19:08:32 -04:00
config_dir << File . expand_path ( File . join ( dir , '..' , 'lib' ) )
}
# for MacOS X
2010-05-31 10:50:39 -04:00
paths = [
#"~/Library/Tcl",
" /Library/Tcl " , " /Network/Library/Tcl " , " /System/Library/Tcl "
]
paths . reverse! unless TkLib_Config [ " ActiveTcl " ]
paths . each { | path |
config_dir << path
config_dir . concat ( Dir . glob ( File . join ( path , '{tcl,tk}*' ) , File :: FNM_CASEFOLD ) . sort . reverse . find_all { | d | File . directory? ( d ) } )
}
paths = [
2011-05-15 07:55:52 -04:00
#"~/Library/Frameworks",
2009-07-12 19:08:32 -04:00
" /Library/Frameworks " ,
" /Network/Library/Frameworks " , " /System/Library/Frameworks "
2010-05-31 10:50:39 -04:00
]
paths . reverse! unless TkLib_Config [ " ActiveTcl " ]
2011-05-23 18:37:44 -04:00
paths . each { | frmwk |
base = File . expand_path ( frmwk )
2010-05-31 10:50:39 -04:00
config_dir << [
File . join ( base , 'Tcl.framework' ) , File . join ( base , 'Tk.framework' )
]
config_dir << [
File . join ( base , 'Tcl.framework' , 'Versions' , 'Current' ) ,
File . join ( base , 'Tk.framework' , 'Versions' , 'Current' )
]
2011-05-15 07:55:52 -04:00
Dir . glob ( File . join ( base , 'Tcl.framework' ,
2010-05-31 10:50:39 -04:00
'Versions' , '*' ) ) . sort . reverse . each { | dir |
next if dir =~ / Current /
config_dir << [ dir , dir . gsub ( / Tcl / , 'Tk' ) ]
}
2009-07-27 15:40:43 -04:00
}
end
config_dir
end
2011-05-23 18:37:44 -04:00
def get_ext_list ( )
exts = [ CONFIG [ 'DLEXT' ] ]
2013-11-29 10:44:25 -05:00
exts . concat %w( dll ) if is_win32?
2011-09-25 20:19:03 -04:00
exts . concat %w( bundle dylib ) if is_macosx?
2011-05-23 18:37:44 -04:00
2013-11-29 10:44:25 -05:00
if TkLib_Config [ " tcltk-stubs " ] || TkLib_Config [ 'enable-shared' ] == false
exts . unshift " lib " if is_win32?
exts . unshift " a "
exts . unshift CONFIG [ 'LIBEXT' ]
2011-05-23 18:37:44 -04:00
end
2011-05-26 19:36:33 -04:00
if is_win32?
exts . map! { | ext | [ ext . downcase , ext . upcase ] } . flatten!
end
exts
2011-05-23 18:37:44 -04:00
end
def libcheck_for_tclConfig ( tcldir , tkdir , tclconf , tkconf )
2010-05-31 10:50:39 -04:00
tcllib_ok = tklib_ok = false
if TkLib_Config [ " tcltk-stubs " ]
stub = " stub "
tclfunc = " Tcl_InitStubs "
tkfunc = " Tk_InitStubs "
else
stub = " "
tclfunc = " Tcl_FindExecutable "
tkfunc = " Tk_Init "
end
2011-06-01 11:46:31 -04:00
incflags = ( $INCFLAGS || = " " ) . dup
libpath = ( $LIBPATH || = [ ] ) . dup
libs_param = ( $libs || = " " ) . dup
2010-05-31 10:50:39 -04:00
tcllibs = nil
2011-05-26 19:36:33 -04:00
mkmf_param = nil
2010-05-31 10:50:39 -04:00
2011-05-23 18:37:44 -04:00
tclver , tkver = TkLib_Config [ " tcltkversion " ]
exts = " ( " + get_ext_list . join ( '|' ) + " ) "
if tclver
tcl_glob = " *tcl #{ stub } #{ tclver } .* "
2011-05-26 19:36:33 -04:00
tcl_regexp = / ^.*(tcl #{ stub } #{ tclver } .*) \ .( #{ exts } ).*$ /
2011-05-23 18:37:44 -04:00
elsif tclconf
tcl_glob = " *tcl #{ stub } #{ tclconf [ 'TCL_MAJOR_VERSION' ] } {.,} #{ tclconf [ 'TCL_MINOR_VERSION' ] } *.* "
2011-05-26 19:36:33 -04:00
tcl_regexp = / ^.*(tcl #{ stub } #{ tclconf [ 'TCL_MAJOR_VERSION' ] } (?: \ .|) #{ tclconf [ 'TCL_MINOR_VERSION' ] } .*) \ .( #{ exts } ).*$ /
2011-05-23 18:37:44 -04:00
end
if tkver
tk_glob = " *tk #{ stub } #{ tkver } .* "
2011-05-26 19:36:33 -04:00
tk_regexp = / ^.*(tk #{ stub } #{ tkver } .*) \ .( #{ exts } ).*$ /
2011-05-23 18:37:44 -04:00
elsif tkconf
tk_glob = " *tk #{ stub } #{ tkconf [ 'TK_MAJOR_VERSION' ] } {.,} #{ tkconf [ 'TK_MINOR_VERSION' ] } *.* "
2011-05-26 19:36:33 -04:00
tk_regexp = / ^.*(tk #{ stub } #{ tkconf [ 'TK_MAJOR_VERSION' ] } (?: \ .|) #{ tkconf [ 'TK_MINOR_VERSION' ] } .*) \ . #{ exts } .*$ /
2011-05-23 18:37:44 -04:00
end
tcllib_ok || = ! tclconf || Dir . glob ( File . join ( tcldir , tcl_glob ) , File :: FNM_CASEFOLD ) . find { | file |
if file =~ tcl_regexp
libname = $1
2011-05-26 19:36:33 -04:00
ext = $2 . downcase
2011-05-23 18:37:44 -04:00
begin
2011-05-26 19:36:33 -04:00
$INCFLAGS = incflags . dup << " " << tclconf [ " TCL_INCLUDE_SPEC " ]
2011-05-23 18:37:44 -04:00
#puts "check #{file} #{$1} #{tclfunc} #{tcldir}"
#find_library($1, tclfunc, tcldir)
2011-05-26 19:36:33 -04:00
if ( tclconf && tclconf [ " TCL_SHARED_BUILD " ] == " 0 " ) ||
( ext != CONFIG [ 'DLEXT' ] && ext == CONFIG [ 'LIBEXT' ] ) || ext == " a "
# static link
tcllibs = $libs + " -DSTATIC_BUILD " + file . quote
# FIX ME: avoid pathname trouble (fail to find) on MinGW.
# e.g. TCL_INCLUDE_SPEC describes "-I/usr/local/include",
# but compiler can find "-IC:/msys/1.0/local/include" only.
$INCFLAGS << " -I " << File . join ( File . dirname ( File . dirname ( file ) ) , " include " ) if is_win32?
else
tcllibs = append_library ( $libs , libname )
2014-01-09 10:47:54 -05:00
tcllibs = " #{ libpathflag ( [ tcldir ] ) } #{ tcllibs } "
2011-05-26 19:36:33 -04:00
# FIX ME: avoid pathname trouble (fail to find) on MinGW.
$INCFLAGS << " -I " << File . join ( File . dirname ( tcldir ) , " include " ) if is_win32?
end
2011-05-23 18:37:44 -04:00
$LIBPATH = libpath | [ tcldir ]
2011-05-26 19:36:33 -04:00
try_func ( tclfunc , tcllibs , [ " tcl.h " ] ) ||
( try_func ( tclfunc , tcllibs << " " << tclconf [ 'TCL_LIBS' ] , [ " tcl.h " ] ) if tclconf [ 'TCL_LIBS' ] )
2011-05-23 18:37:44 -04:00
ensure
2011-05-26 19:36:33 -04:00
mkmf_param = {
'PATH' = > file ,
'LIBNAME' = > libname ,
'libs' = > tcllibs . dup ,
'INCFLAGS' = > $INCFLAGS . dup ,
'LIBPATH' = > $LIBPATH . dup ,
}
$LIBPATH = libpath . dup
$libs = libs_param . dup
2010-05-31 10:50:39 -04:00
end
2011-05-23 18:37:44 -04:00
end
}
2011-05-26 19:36:33 -04:00
tclconf [ 'MKMF_PARAMS' ] = mkmf_param if tclconf && tcllib_ok
2011-05-23 18:37:44 -04:00
tklib_ok || = ! tkconf || Dir . glob ( File . join ( tkdir , tk_glob ) , File :: FNM_CASEFOLD ) . find { | file |
if file =~ tk_regexp
libname = $1
2011-05-26 19:36:33 -04:00
ext = $2 . downcase
2011-05-23 18:37:44 -04:00
begin
#puts "check #{file} #{$1} #{tkfunc} #{tkdir}"
# find_library($1, tkfunc, tkdir)
2011-05-26 19:36:33 -04:00
if ( tkconf && tkconf [ " TCL_SHARED_BUILD " ] == " 0 " ) ||
( ext != CONFIG [ 'DLEXT' ] && ext == CONFIG [ 'LIBEXT' ] ) || ext == " a "
# static link
tklibs = " -DSTATIC_BUILD " + file . quote
# FIX ME: avoid pathname trouble (fail to find) on MinGW.
$INCFLAGS << " -I " << File . join ( File . dirname ( File . dirname ( file ) ) , " include " ) if is_win32?
else
tklibs = append_library ( " " , libname )
#tklibs = append_library("", $1)
2014-01-09 10:47:54 -05:00
tklibs = " #{ libpathflag ( [ tkdir ] ) } #{ tklibs } "
2011-05-26 19:36:33 -04:00
# FIX ME: avoid pathname trouble (fail to find) on MinGW.
$INCFLAGS << " -I " << File . join ( File . dirname ( tcldir ) , " include " ) if is_win32?
end
2011-05-23 18:37:44 -04:00
tklibs << " " << tcllibs if tcllibs
2011-05-26 19:36:33 -04:00
tmp_tklibs = tklibs . dup
2011-05-23 18:37:44 -04:00
$LIBPATH = libpath | [ tkdir ]
try_func ( tkfunc , tklibs , [ " tcl.h " , " tk.h " ] ) ||
2011-05-26 19:36:33 -04:00
( try_func ( tkfunc , tklibs << " " << tkconf [ 'TK_LIBS' ] , [ " tcl.h " , " tk.h " ] ) if tkconf [ 'TK_LIBS' ] ) ||
( try_func ( tkfunc , ( tklibs = tmp_tklibs . dup ) << " " << tkconf [ 'TK_XLIBSW' ] , [ " tcl.h " , " tk.h " ] ) if tkconf [ 'TK_XLIBSW' ] ) ||
( try_func ( tkfunc , tklibs << " " << tkconf [ 'TK_LIBS' ] , [ " tcl.h " , " tk.h " ] ) if tkconf [ 'TK_LIBS' ] )
2011-05-23 18:37:44 -04:00
ensure
2011-05-26 19:36:33 -04:00
mkmf_param = {
'PATH' = > file ,
'LIBNAME' = > libname ,
'libs' = > tklibs . dup ,
'INCFLAGS' = > $INCFLAGS . dup ,
'LIBPATH' = > $LIBPATH . dup ,
}
$LIBPATH = libpath . dup
$libs = libs_param . dup
2010-05-31 10:50:39 -04:00
end
2011-05-23 18:37:44 -04:00
end
}
2010-05-31 10:50:39 -04:00
2011-05-26 19:36:33 -04:00
$INCFLAGS = incflags . dup
tkconf [ 'MKMF_PARAMS' ] = mkmf_param if tkconf && tklib_ok
2010-05-31 10:50:39 -04:00
[ tcllib_ok , tklib_ok ]
end
2009-07-27 15:40:43 -04:00
def search_tclConfig ( * paths ) # libdir list or [tcl-libdir|file, tk-libdir|file]
TkLib_Config [ " tclConfig_paths " ] = [ ]
paths . compact!
if paths . empty?
config_dir = get_tclConfig_dirs
2011-05-23 18:37:44 -04:00
elsif paths . length == 1 && ! paths [ 0 ] [ 0 ] && ! paths [ 0 ] [ 1 ]
config_dir = get_tclConfig_dirs . map { | dir |
if dir . kind_of? Array
[ ( paths [ 0 ] [ 0 ] == false ) ? nil : dir [ 0 ] ,
( paths [ 0 ] [ 1 ] == false ) ? nil : dir [ 1 ] ]
else
[ ( paths [ 0 ] [ 0 ] == false ) ? nil : dir ,
( paths [ 0 ] [ 1 ] == false ) ? nil : dir ]
end
}
2009-07-27 15:40:43 -04:00
else
# fixed tclConfig
config_dir = [ ]
paths . each { | path |
if path . kind_of? ( Array )
config_dir << path
else
2010-05-06 17:47:37 -04:00
dirs = Dir . glob ( path , File :: FNM_CASEFOLD )
2009-07-27 15:40:43 -04:00
config_dir . concat ( dirs . zip ( dirs ) )
end
2009-07-12 19:08:32 -04:00
}
end
tclver , tkver = TkLib_Config [ 'tcltkversion' ]
2011-05-23 18:37:44 -04:00
if tclver && tclver =~ / ^ \ D*( \ d) \ .?( \ d)? / # ignore PATCH_LEVEL
tclver_major = $1
tclver_minor = $2
else
tclver_major = nil
tclver_minor = nil
end
if tkver && tkver =~ / ^ \ D*( \ d) \ .?( \ d)? / # ignore PATCH_LEVEL
tkver_major = $1
tkver_minor = $2
else
tkver_major = nil
tkver_minor = nil
end
2009-07-12 19:08:32 -04:00
conf = nil
2013-11-29 21:46:47 -05:00
progress_flag = false
2009-07-12 19:08:32 -04:00
2010-05-06 20:16:19 -04:00
config_dir . uniq!
config_dir . map { | dir |
2009-07-12 19:08:32 -04:00
if dir . kind_of? Array
2011-05-23 18:37:44 -04:00
[ ( dir [ 0 ] ) ? dir [ 0 ] . strip . chomp ( '/' ) : nil ,
( dir [ 1 ] ) ? dir [ 1 ] . strip . chomp ( '/' ) : nil ]
2009-07-12 19:08:32 -04:00
else
dir . strip . chomp ( '/' )
end
} . each { | dir |
2013-11-29 21:46:47 -05:00
print ( " . " ) ; progress_flag = true # progress
2009-07-12 19:08:32 -04:00
# print("check #{dir} ==>");
if dir . kind_of? Array
tcldir , tkdir = dir
else
tcldir = tkdir = dir
end
2010-05-05 06:08:16 -04:00
tails = [ 'Config-shared.sh' , 'config-shared.sh' , 'Config.sh' , 'config.sh' ]
2009-07-27 15:40:43 -04:00
2011-05-23 18:37:44 -04:00
if tcldir
if File . file? ( tcldir )
tclcfg_files = [ tcldir ] * tails . length
else
tclcfg_files = tails . map { | f | File . join ( tcldir , 'tcl' << f ) }
end
2009-07-27 15:40:43 -04:00
else
2011-05-23 18:37:44 -04:00
tclcfg_files = [ nil ] * tails . length
2009-07-27 15:40:43 -04:00
end
2011-05-23 18:37:44 -04:00
if tkdir
if File . file? ( tkdir )
tkcfg_files = [ tkdir ] * tails . length
else
tkcfg_files = tails . map { | f | File . join ( tkdir , 'tk' << f ) }
end
2009-07-27 15:40:43 -04:00
else
2011-05-23 18:37:44 -04:00
tkcfg_files = [ nil ] * tails . length
2009-07-27 15:40:43 -04:00
end
2011-05-26 19:36:33 -04:00
tclcfg_files . zip ( tkcfg_files ) . map { | tclpath , tkpath |
[ ( tclpath && File . exist? ( tclpath ) ) ? File . expand_path ( tclpath ) : tclpath ,
( tkpath && File . exist? ( tkpath ) ) ? File . expand_path ( tkpath ) : tkpath ]
} . uniq . each { | tclpath , tkpath |
2011-05-23 18:37:44 -04:00
next if tclpath && ! File . exist? ( tclpath )
next if tkpath && ! File . exist? ( tkpath )
2009-07-12 19:08:32 -04:00
# parse tclConfig.sh/tkConfig.sh
2011-05-23 18:37:44 -04:00
tclconf = ( tclpath ) ? parse_tclConfig ( tclpath ) : nil
2013-11-29 10:44:25 -05:00
if tclconf
2013-11-29 21:46:47 -05:00
if tclver && ( ( tclver_major && tclver_major != tclconf [ 'TCL_MAJOR_VERSION' ] ) || ( tclver_minor && tclver_minor != tclconf [ 'TCL_MINOR_VERSION' ] ) )
print ( " \n " ) if progress_flag
puts " Ignore \" #{ tclpath } \" (unmatch with configured version). "
progress_flag = false
next
end
if TkLib_Config [ 'unsupported_versions' ] . find { | ver | ver == " #{ tclconf [ 'TCL_MAJOR_VERSION' ] } . #{ tclconf [ 'TCL_MINOR_VERSION' ] } " }
print ( " \n " ) if progress_flag
puts " Ignore \" #{ tclpath } \" (unsupported version of Tcl/Tk). "
progress_flag = false
next
end
2013-11-29 10:44:25 -05:00
end
2011-05-23 18:37:44 -04:00
tkconf = ( tkpath ) ? parse_tclConfig ( tkpath ) : nil
2013-11-29 10:44:25 -05:00
if tkconf
2013-11-29 21:46:47 -05:00
if tkver && ( ( tkver_major && tkver_major != tkconf [ 'TK_MAJOR_VERSION' ] ) || ( tkver_minor && tkver_minor != tkconf [ 'TK_MINOR_VERSION' ] ) )
print ( " \n " ) if progress_flag
puts " Ignore \" #{ tkpath } \" (unmatch with configured version). "
progress_flag = false
next
end
if TkLib_Config [ 'unsupported_versions' ] . find { | ver | ver == " #{ tkconf [ 'TK_MAJOR_VERSION' ] } . #{ tkconf [ 'TK_MINOR_VERSION' ] } " }
print ( " \n " ) if progress_flag
puts " Ignore \" #{ tkpath } \" (unsupported version of Tcl/Tk). "
progress_flag = false
next
end
2013-11-29 10:44:25 -05:00
end
2009-07-12 19:08:32 -04:00
# nativethread check
2011-05-23 18:37:44 -04:00
if ! TkLib_Config [ " ruby_with_thread " ]
if tclconf
if tclconf [ 'TCL_THREADS' ] == '1'
puts " \n WARNING: found #{ tclpath . inspect } , but it WITH nativethread-support under ruby WITHOUT nativethread-support. So, ignore it. "
TkLib_Config [ " tcl-NG-path " ] << File . dirname ( tclpath )
next
end
else
puts " \n WARNING: When not refer tclConfig.sh, cannot check native-thread support on Tcl/Tk libraries. Ruby, which is used now, does NOT support native-thread. So, if Tcl/Tk libraries support native-thread, it will NOT work properly. "
end
2009-07-12 19:08:32 -04:00
end
2009-08-09 08:24:55 -04:00
# find tclConfig.sh & tkConfig.sh
conf = [ tclconf , tkconf ] unless conf
2009-07-27 15:40:43 -04:00
# check Tcl library
2010-05-31 10:50:39 -04:00
if is_macosx? && TkLib_Config [ " tcltk-framework " ]
# if use framework, not check (believe it is installed properly)
tcllib_ok = tklib_ok = true
2009-07-27 15:40:43 -04:00
else
2011-05-23 18:37:44 -04:00
tcllib_ok , tklib_ok =
libcheck_for_tclConfig ( ( tclpath ) ? File . dirname ( tclpath ) : nil ,
( tkpath ) ? File . dirname ( tkpath ) : nil ,
tclconf , tkconf )
2009-07-27 15:40:43 -04:00
end
unless tcllib_ok && tklib_ok
2011-05-23 18:37:44 -04:00
unless tcllib_ok
puts " \n WARNING: found #{ tclpath . inspect } , but cannot find valid Tcl library for the tclConfig.sh. So, ignore it. "
TkLib_Config [ " tcl-NG-path " ] << File . dirname ( tclpath )
end
unless tklib_ok
puts " \n WARNING: found #{ tkpath . inspect } , but cannot find valid Tk library for the tkConfig.sh. So, ignore it. "
TkLib_Config [ " tk-NG-path " ] << File . dirname ( tkpath )
end
2009-07-27 15:40:43 -04:00
next
end
2009-07-12 19:08:32 -04:00
#return [tclpath, tkpath]
2009-07-27 15:40:43 -04:00
# print(" #{[tclpath, tkpath].inspect}");
2009-07-12 19:08:32 -04:00
TkLib_Config [ " tclConfig_paths " ] << [ tclpath , tkpath ]
}
# print("\n");
}
2010-05-31 10:50:39 -04:00
if is_macosx? && TkLib_Config [ " tcltk-stubs " ]
CONFIG [ 'LDSHARED' ] << " -Xlinker -bind_at_load "
if config_string ( 'LDSHAREDXX' )
config_string ( 'LDSHAREDXX' ) << " -Xlinker -bind_at_load "
end
end
2009-07-12 19:08:32 -04:00
if TkLib_Config [ " tclConfig_paths " ] . empty?
[ nil , nil ]
else
# find tclConfig.sh and tkConfig.sh
TkLib_Config [ " tclConfig_info " ] , TkLib_Config [ " tkConfig_info " ] = conf
TkLib_Config [ " tclConfig_paths " ] [ 0 ]
end
end
2009-07-27 15:40:43 -04:00
def get_tclConfig ( tclConfig_file , tkConfig_file , tclConfig_dir , tkConfig_dir )
2011-05-23 18:37:44 -04:00
use_tclConfig = tclConfig_file != false && tclConfig_dir != false
use_tkConfig = tkConfig_file != false && tkConfig_dir != false
2009-07-12 19:08:32 -04:00
2011-05-23 18:37:44 -04:00
unless use_tclConfig || use_tkConfig
2009-07-27 15:40:43 -04:00
puts ( " Don't use [tclConfig.sh, tkConfig.sh] " )
return [ nil , nil ]
end
2009-07-12 19:08:32 -04:00
tclConfig_file = nil unless tclConfig_file . kind_of? String
2009-07-27 15:40:43 -04:00
tkConfig_file = nil unless tkConfig_file . kind_of? String
2009-07-12 19:08:32 -04:00
tclConfig_dir = nil unless tclConfig_dir . kind_of? String
tkConfig_dir = nil unless tkConfig_dir . kind_of? String
2011-05-23 18:37:44 -04:00
if use_tclConfig && ! tclConfig_dir
2009-07-12 19:08:32 -04:00
if tclConfig_file
tclConfig_dir = File . dirname ( tclConfig_file )
elsif tkConfig_dir
tclConfig_dir = tkConfig_dir
end
end
2011-05-23 18:37:44 -04:00
if use_tkConfig && ! tkConfig_dir
2009-07-27 15:40:43 -04:00
if tkConfig_file
tkConfig_dir = File . dirname ( tkConfig_file )
elsif tclConfig_dir
tkConfig_dir = tclConfig_dir
end
end
2009-07-12 19:08:32 -04:00
tkConfig_dir || = tclConfig_dir
2011-05-23 18:37:44 -04:00
if use_tclConfig
TkLib_Config [ " tclConfig-file " ] = tclConfig_file
TkLib_Config [ " tclConfig-dir " ] = tclConfig_dir
else
tclConfig_file = false
tclConfig_dir = false
end
if use_tkConfig
TkLib_Config [ " tkConfig-file " ] = tkConfig_file
TkLib_Config [ " tkConfig-dir " ] = tkConfig_dir
else
tkConfig_file = false
tkConfig_dir = false
end
print ( " Don't use tclConfig.sh (specified by configure option). \n " ) unless use_tclConfig
print ( " Don't use tkConfig.sh (specified by configure option). \n " ) unless use_tkConfig
print ( " Search " )
print ( " tclConfig.sh " , ( tclConfig_dir ) ? " (in #{ tclConfig_dir } ) " : " " ) if use_tclConfig
2011-05-26 19:36:33 -04:00
print ( ( use_tclConfig ) ? " and " : " " , " tkConfig.sh " , ( tkConfig_dir ) ? " (in #{ tkConfig_dir } ) " : " " ) if use_tkConfig
2011-05-23 18:37:44 -04:00
print ( " . " )
2009-07-12 19:08:32 -04:00
2011-05-23 18:37:44 -04:00
if tclConfig_dir || tkConfig_dir || ! use_tclConfig || ! use_tkConfig
2011-05-15 07:55:52 -04:00
tclConfig , tkConfig =
search_tclConfig ( [ ( ( tclConfig_file ) ? tclConfig_file : tclConfig_dir ) ,
2009-07-27 15:40:43 -04:00
( ( tkConfig_file ) ? tkConfig_file : tkConfig_dir ) ] )
2009-07-12 19:08:32 -04:00
else
2009-07-27 15:40:43 -04:00
tclConfig , tkConfig = search_tclConfig ( )
end
print ( " \n " )
# TclConfig_Info = TkLib_Config["tclConfig_info"]
# TkConfig_Info = TkLib_Config["tkConfig_info"]
2011-05-23 18:37:44 -04:00
if tclConfig || tkConfig
2009-07-27 15:40:43 -04:00
dirs = TkLib_Config [ " tclConfig_paths " ] . map { | tclpath , tkpath |
2011-05-23 18:37:44 -04:00
[ ( tclpath ) ? File . dirname ( tclpath ) : nil ,
( tkpath ) ? File . dirname ( tkpath ) : nil ]
2009-07-27 15:40:43 -04:00
}
dirs |= dirs
2011-05-23 18:37:44 -04:00
puts ( " Valid [tclConfig.sh, tkConfig.sh] are found in #{ dirs . inspect } " )
2011-05-26 19:36:33 -04:00
puts ( " Use [tclConfig.sh, tkConfig.sh] == #{ [ tclConfig , tkConfig ] . inspect } " )
2011-06-01 11:46:31 -04:00
$LIBPATH || = [ ]
2011-05-23 18:37:44 -04:00
$LIBPATH |= [ File . dirname ( tclConfig ) ] if tclConfig
$LIBPATH |= [ File . dirname ( tkConfig ) ] if tkConfig
2009-07-27 15:40:43 -04:00
#TkLib_Config["tclConfig_paths"].each{|tclcfg, tkcfg|
# $LIBPATH |= [File.dirname(tclcfg)] | [File.dirname(tkcfg)]
#}
else
puts ( " Fail to find [tclConfig.sh, tkConfig.sh] " )
2009-07-12 19:08:32 -04:00
end
[ tclConfig , tkConfig ]
end
2011-05-23 18:37:44 -04:00
def check_tcl_NG_path ( path_list )
path_list . find_all { | path | not TkLib_Config [ " tcl-NG-path " ] . include? ( path ) }
end
def check_tk_NG_path ( path_list )
path_list . find_all { | path | not TkLib_Config [ " tk-NG-path " ] . include? ( path ) }
end
2009-07-12 19:08:32 -04:00
def check_NG_path ( path_list )
2011-05-23 18:37:44 -04:00
path_list . find_all { | path |
not ( TkLib_Config [ " tcl-NG-path " ] . include? ( path ) &&
TkLib_Config [ " tk-NG-path " ] . include? ( path ) )
}
2009-07-12 19:08:32 -04:00
end
def check_shlib_search_path ( paths )
if ! paths || paths . empty?
path_list = [ ]
#if TkLib_Config["ActiveTcl"]
2010-05-06 17:47:37 -04:00
# path_list.concat Dir.glob(TkLib_Config["ActiveTcl"], File::FNM_CASEFOLD).sort.reverse
2009-07-12 19:08:32 -04:00
#end
if TkLib_Config [ " ActiveTcl " ] . kind_of? ( String ) # glob path
2010-05-06 17:47:37 -04:00
path_list . concat Dir . glob ( TkLib_Config [ " ActiveTcl " ] , File :: FNM_CASEFOLD ) . sort . reverse
2009-07-12 19:08:32 -04:00
end
vers = get_shlib_versions
path_head , path_dirs = get_shlib_path_head
path_list . concat vers . map { | ver |
path_head . map { | head |
if ver . empty?
head + " /lib "
else
dirs = [ ]
2010-05-31 10:50:39 -04:00
if Dir . glob ( head , File :: FNM_CASEFOLD ) . find { | dir | dir == head }
dirs << head + " /lib "
end
2010-05-06 17:47:37 -04:00
if ! Dir . glob ( head + " -* " , File :: FNM_CASEFOLD ) . empty?
dirs << head + " - #{ ver } /lib " if ! Dir . glob ( head + " -[89].* " , File :: FNM_CASEFOLD ) . empty?
dirs << head + " - #{ ver . delete ( '.' ) } /lib " if ! Dir . glob ( head + " -[89][0-9]* " , File :: FNM_CASEFOLD ) . empty?
2009-07-12 19:08:32 -04:00
end
2010-05-06 17:47:37 -04:00
if ! Dir . glob ( head + " [_-]* " , File :: FNM_CASEFOLD ) . empty?
dirs << head + " _ #{ ver } /lib " if ! Dir . glob ( head + " _[89].* " , File :: FNM_CASEFOLD ) . empty?
dirs << head + " - #{ ver } /lib " if ! Dir . glob ( head + " -[89].* " , File :: FNM_CASEFOLD ) . empty?
dirs << head + " _ #{ ver . delete ( '.' ) } /lib " if ! Dir . glob ( head + " _[89][0-9]* " , File :: FNM_CASEFOLD ) . empty?
dirs << head + " - #{ ver . delete ( '.' ) } /lib " if ! Dir . glob ( head + " -[89][0-9]* " , File :: FNM_CASEFOLD ) . empty?
2009-07-12 19:08:32 -04:00
end
dirs
end
}
} . flatten!
path_list . concat path_dirs
else
# paths is a string with PATH environment style
2010-05-05 06:08:16 -04:00
path_list = paths . split ( ( is_win32? ) ? ';' : ':' )
2009-07-12 19:08:32 -04:00
end
path_list = check_NG_path ( path_list )
2010-05-06 17:47:37 -04:00
path_list . map! { | path | path . strip }
2009-07-12 19:08:32 -04:00
2010-05-31 10:50:39 -04:00
if ! CROSS_COMPILING and ( is_win32? || is_macosx? )
2009-07-16 10:34:09 -04:00
# exist-dir only
2010-05-06 17:47:37 -04:00
path_list . delete_if { | path | Dir . glob ( File . join ( path , " *.{a,so,dll,lib} " ) ) . empty? }
2009-07-16 10:34:09 -04:00
end
2010-05-06 17:47:37 -04:00
# keep paths for searching dynamic libs
2011-05-26 19:36:33 -04:00
#$LIBPATH |= path_list
path_list . uniq
2009-07-12 19:08:32 -04:00
end
2009-07-27 15:40:43 -04:00
def search_vers_on_path ( vers , path , * heads )
2011-05-23 18:37:44 -04:00
exts = get_ext_list . join ( ',' )
2010-05-06 17:47:37 -04:00
files = Dir . glob ( File . join ( path , " *{ #{ heads . join ( ',' ) } }*.{ #{ exts } } " ) , File :: FNM_CASEFOLD )
2009-07-27 15:40:43 -04:00
vers . find_all { | ver | files . find { | f | f =~ / ( #{ ver } | #{ ver . delete ( '.' ) } ) / } }
end
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
def find_tcl ( tcllib , stubs , version , * opt_paths )
2011-05-26 19:36:33 -04:00
if TclConfig_Info [ 'MKMF_PARAMS' ]
# already checked existence of tcl library based on tclConfig.sh
2011-06-01 11:46:31 -04:00
( $INCFLAGS || = " " ) << " " << TclConfig_Info [ 'MKMF_PARAMS' ] [ 'INCFLAGS' ]
$LIBPATH || = [ ] ; $LIBPATH |= TclConfig_Info [ 'MKMF_PARAMS' ] [ 'LIBPATH' ]
( $libs || = " " ) << " " << TclConfig_Info [ 'MKMF_PARAMS' ] [ 'libs' ]
2011-05-26 19:36:33 -04:00
return [ true , nil , nil , nil ]
end
# else, no available tclConfig.sh on the system
2009-07-27 15:40:43 -04:00
print " Search Tcl library "
if stubs
func = " Tcl_InitStubs "
lib = " tclstub "
else
func = " Tcl_FindExecutable "
lib = " tcl "
end
if version && ! version . empty?
versions = [ version ]
else
versions = TkLib_Config [ 'search_versions' ]
end
2009-07-12 19:08:32 -04:00
default_paths = [ ]
default_paths . concat [
RbConfig :: CONFIG [ 'libdir' ] ,
File . join ( RbConfig :: CONFIG [ 'exec_prefix' ] , 'lib' ) ,
File . join ( RbConfig :: CONFIG [ 'prefix' ] , 'lib' ) ,
" /usr/local/lib " , " /usr/pkg/lib " , " /usr/contrib/lib " , " /usr/lib "
2010-05-06 17:47:37 -04:00
] . find_all { | dir | File . directory? ( dir ) } unless CROSS_COMPILING
2009-07-12 19:08:32 -04:00
2010-05-06 17:47:37 -04:00
if TkLib_Config [ " ActiveTcl " ] . kind_of? ( String ) # glob path
default_paths . concat Dir . glob ( TkLib_Config [ " ActiveTcl " ] ) . sort . reverse . map { | d | d << " /lib " }
end
if ! CROSS_COMPILING and is_win32?
default_paths . concat [
2011-05-23 18:37:44 -04:00
" c:/Tcl/lib " , " c:/Program Files/Tcl/lib " , " c:/Program Files (x86)/Tcl/lib " ,
" /Tcl/lib " , " /Program Files/Tcl/lib " , " /Program Files (x86)/Tcl/lib "
2011-05-26 19:36:33 -04:00
] . find_all { | dir | File . directory? ( dir ) } . map { | dir | File . expand_path ( dir ) }
# for MinGW
[ " /usr/local/lib64 " , " /usr/lib64 " , " /usr/local/lib " , " /usr/lib " ] . each { | dir |
default_paths << File . expand_path ( dir ) if File . directory? dir
}
2011-05-23 18:37:44 -04:00
2011-05-26 19:36:33 -04:00
default_paths |= ENV [ 'LIBRARY_PATH' ] . split ( ';' ) . find_all { | dir | File . directory? dir } . map { | dir | File . expand_path ( dir ) } if ENV [ 'LIBRARY_PATH' ]
default_paths |= ENV [ 'PATH' ] . split ( ';' ) . find_all { | dir | File . directory? dir } . map { | dir | File . expand_path ( dir ) } if ENV [ 'PATH' ]
2010-05-06 17:47:37 -04:00
end
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2011-05-26 19:36:33 -04:00
default_paths |= TkLib_Config [ " checked_shlib_dirs " ]
2009-07-16 10:34:09 -04:00
unless TkLib_Config [ " space-on-tk-libpath " ]
default_paths . delete_if { | path | path =~ / / }
end
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
if ( paths = opt_paths . compact ) . empty?
2011-05-26 19:36:33 -04:00
paths = check_tcl_NG_path ( default_paths )
end
2009-07-27 15:40:43 -04:00
2011-06-01 11:46:31 -04:00
incflags = ( $INCFLAGS || = " " ) . dup
libpath = ( $LIBPATH || = [ ] ) . dup
libs_param = ( $libs || = " " ) . dup
2011-05-26 19:36:33 -04:00
tcllibs = nil
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2011-05-26 19:36:33 -04:00
exts = " ( " + get_ext_list . join ( '|' ) + " ) "
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2011-05-26 19:36:33 -04:00
paths . map { | path |
lib_w_sufx = lib
begin
$LIBPATH |= [ path ]
inc = [ File . join ( File . dirname ( path ) , " include " ) , File . dirname ( path ) ]
inc . each { | f | $INCFLAGS << " -I " << f }
if tcllib
print ( " . " )
if have_library ( tcllib , func , [ " tcl.h " ] )
2014-01-12 04:04:06 -05:00
return [ true , path , tcllib , nil , * inc ]
2011-05-26 19:36:33 -04:00
end
else
sufx_list = [ '' , 't' , 'g' , 's' , 'x' ]
search_vers_on_path ( versions , path , lib , 'tcl' ) . find { | ver |
dir_enum = Dir . foreach ( path )
no_dot_ver = ver . delete ( '.' )
libnames = [ " #{ lib } #{ ver } " , " #{ lib } #{ no_dot_ver } " ]
libnames << " tcl #{ ver } " << " tcl #{ no_dot_ver } " if lib != " tcl "
libnames . find { | libname |
sufx_list . find { | sufx |
print ( " . " )
dir_enum . map { | fname |
if fname =~ / ^.*( #{ libname } .* #{ sufx } ) \ .( #{ exts } ).*$ /
[ fname , $1 , $2 ]
end
} . compact . find { | fname , lib_w_sufx , ext |
ext . downcase!
if ( ext != CONFIG [ 'DLEXT' ] && ext == CONFIG [ 'LIBEXT' ] ) ||
ext == " a "
# static link
tcllibs = libs_param + " -DSTATIC_BUILD " + fname . quote
else
tcllibs = append_library ( $libs , lib_w_sufx )
2014-01-09 10:47:54 -05:00
tcllibs = " #{ libpathflag ( [ path ] ) } #{ tcllibs } "
2011-05-26 19:36:33 -04:00
end
if try_func ( func , tcllibs , [ " tcl.h " ] )
return [ true , path , nil , tcllibs , * inc ]
end
}
}
2011-05-23 18:37:44 -04:00
}
}
2011-05-26 19:36:33 -04:00
if ( ! version && ( print ( " . " ) ; try_func ( func , libs_param , [ " tcl.h " ] ) ) )
return [ true , path , lib_w_sufx , nil , * inc ]
end
end
ensure
$LIBPATH = libpath . dup
$libs = libs_param . dup
$INCFLAGS = incflags . dup
2009-07-27 15:40:43 -04:00
end
}
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2009-07-27 15:40:43 -04:00
print ( " \n " ) # progress
2011-05-26 19:36:33 -04:00
[ false , nil , nil , nil ]
2005-01-25 09:31:45 -05:00
end
2009-07-12 19:08:32 -04:00
def parse_TK_LIBS ( tklibs )
sfx = " lib|shlib|dll|so "
re = / (("|')[^"']+ \ .( #{ sfx } ) \ 2|[^"' ]+ \ .( #{ sfx } )|-l("|')[^"']+ \ 5|-l[^" ]+) / #'
tklibs . scan ( re ) . map { | lib , |
if lib =~ / ^("|')([^"]+) \ .( #{ sfx } ) \ 1 /
" \" -l #{ $2 } \" "
elsif lib =~ / ([^" ]+) \ .( #{ sfx } ) /
" -l #{ $1 } "
else
lib
end
} . join ( ' ' )
end
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
def find_tk ( tklib , stubs , version , * opt_paths )
2011-05-26 19:36:33 -04:00
if TkConfig_Info [ 'MKMF_PARAMS' ]
# already checked existence of tcl library based on tkConfig.sh
2011-06-01 11:46:31 -04:00
( $INCFLAGS || = " " ) << " " << TkConfig_Info [ 'MKMF_PARAMS' ] [ 'INCFLAGS' ]
$LIBPATH || = [ ] ; $LIBPATH |= TkConfig_Info [ 'MKMF_PARAMS' ] [ 'LIBPATH' ]
( $libs || = " " ) << " " << TkConfig_Info [ 'MKMF_PARAMS' ] [ 'libs' ]
2011-05-26 19:36:33 -04:00
return [ true , nil , nil , nil ]
end
# else, no available tkConfig.sh on the system
2009-07-27 15:40:43 -04:00
print " Search Tk library "
if stubs
func = " Tk_InitStubs "
lib = " tkstub "
else
func = " Tk_Init "
lib = " tk "
end
if version && ! version . empty?
versions = [ version ]
else
versions = TkLib_Config [ 'search_versions' ]
end
2009-07-12 19:08:32 -04:00
default_paths = [ ]
default_paths . concat [
RbConfig :: CONFIG [ 'libdir' ] ,
File . join ( RbConfig :: CONFIG [ 'exec_prefix' ] , 'lib' ) ,
File . join ( RbConfig :: CONFIG [ 'prefix' ] , 'lib' ) ,
" /usr/local/lib " , " /usr/pkg/lib " , " /usr/contrib/lib " , " /usr/lib "
2010-05-06 17:47:37 -04:00
] . find_all { | dir | File . directory? ( dir ) } unless CROSS_COMPILING
2009-07-12 19:08:32 -04:00
2010-05-06 17:47:37 -04:00
if ! CROSS_COMPILING and is_win32?
default_paths . concat [
2011-05-23 18:37:44 -04:00
" c:/Tcl/lib " , " c:/Program Files/Tcl/lib " , " c:/Program Files (x86)/Tcl/lib " ,
" /Tcl/lib " , " /Program Files/Tcl/lib " , " /Program Files (x86)/Tcl/lib "
2010-05-06 17:47:37 -04:00
] . find_all { | dir | File . directory? ( dir ) }
2011-05-23 18:37:44 -04:00
2011-05-26 19:36:33 -04:00
# for MinGW
[ " /usr/local/lib64 " , " /usr/lib64 " , " /usr/local/lib " , " /usr/lib " ] . each { | dir |
default_paths << File . expand_path ( dir ) if File . directory? dir
}
default_paths |= ENV [ 'LIBRARY_PATH' ] . split ( ';' ) . find_all { | dir | File . directory? dir } . map { | dir | File . expand_path ( dir ) } if ENV [ 'LIBRARY_PATH' ]
default_paths |= ENV [ 'PATH' ] . split ( ';' ) . find_all { | dir | File . directory? dir } . map { | dir | File . expand_path ( dir ) } if ENV [ 'PATH' ]
2010-05-06 17:47:37 -04:00
end
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2011-05-26 19:36:33 -04:00
default_paths |= TkLib_Config [ " checked_shlib_dirs " ]
2009-07-16 10:34:09 -04:00
unless TkLib_Config [ " space-on-tk-libpath " ]
default_paths . delete_if { | path | path =~ / / }
end
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
if ( paths = opt_paths . compact ) . empty?
2011-05-26 19:36:33 -04:00
paths = check_tk_NG_path ( default_paths )
end
2009-07-27 15:40:43 -04:00
2011-06-01 11:46:31 -04:00
incflags = ( $INCFLAGS || = " " ) . dup
libpath = ( $LIBPATH || = [ ] ) . dup
libs_param = ( $libs || = " " ) . dup
2011-05-26 19:36:33 -04:00
tcllibs = nil
2009-07-12 19:08:32 -04:00
2011-05-26 19:36:33 -04:00
exts = " ( " + get_ext_list . join ( '|' ) + " ) "
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2011-05-26 19:36:33 -04:00
paths . map { | path |
lib_w_sufx = lib
begin
$LIBPATH |= [ path ]
inc = [ File . join ( File . dirname ( path ) , " include " ) , File . dirname ( path ) ]
inc . each { | f | $INCFLAGS << " -I " << f }
if tklib
print ( " . " )
if have_library ( tklib , func , [ " tcl.h " , " tk.h " ] )
2014-01-12 04:04:06 -05:00
return [ true , path , tklib , nil , * inc ]
2011-05-26 19:36:33 -04:00
end
else
sufx_list = [ '' , 't' , 'g' , 's' , 'x' ]
search_vers_on_path ( versions , path , lib , 'tk' ) . find { | ver |
dir_enum = Dir . foreach ( path )
no_dot_ver = ver . delete ( '.' )
libnames = [ " #{ lib } #{ ver } " , " #{ lib } #{ no_dot_ver } " ]
libnames << " tk #{ ver } " << " tk #{ no_dot_ver } " if lib != " tk "
libnames . find { | libname |
sufx_list . find { | sufx |
print ( " . " )
dir_enum . map { | fname |
if fname =~ / ^.*( #{ libname } .* #{ sufx } ) \ .( #{ exts } ).*$ /
[ fname , $1 , $2 ]
end
} . compact . find { | fname , lib_w_sufx , ext |
if ( ext != CONFIG [ 'DLEXT' ] && ext == CONFIG [ 'LIBEXT' ] ) ||
ext == " a "
# static link
tklibs = libs_param + " -DSTATIC_BUILD " + fname . quote
else
tklibs = append_library ( $libs , lib_w_sufx )
2014-01-09 10:47:54 -05:00
tklibs = " #{ libpathflag ( [ path ] ) } #{ tklibs } "
2011-05-26 19:36:33 -04:00
end
if try_func ( func , tklibs , [ " tcl.h " , " tk.h " ] )
return [ true , path , nil , tklibs , * inc ]
end
}
}
2011-05-23 18:37:44 -04:00
}
}
2011-05-26 19:36:33 -04:00
if ( ! version && ( print ( " . " ) ; try_func ( func , libs_param , [ " tcl.h " , " tk.h " ] ) ) )
return [ true , path , lib_w_sufx , nil , * inc ]
end
end
ensure
$LIBPATH = libpath
$libs = libs_param
$INCFLAGS = incflags . dup
2009-07-27 15:40:43 -04:00
end
}
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2009-07-27 15:40:43 -04:00
print ( " \n " ) # progress
2011-05-26 19:36:33 -04:00
[ false , nil , nil , nil ]
2009-07-27 15:40:43 -04:00
end
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2011-05-15 07:55:52 -04:00
def find_tcltk_library ( tcllib , tklib , stubs , tclversion , tkversion ,
2009-07-27 15:40:43 -04:00
tcl_opt_paths , tk_opt_paths )
2011-05-26 19:36:33 -04:00
st , path , lib , libs , * inc = find_tcl ( tcllib , stubs , tclversion , * tcl_opt_paths )
2013-11-29 10:44:25 -05:00
if ! st && TkLib_Config [ 'enable-shared' ] == nil
TkLib_Config [ 'enable-shared' ] = false
st , path , lib , libs , * inc = find_tcl ( tcllib , stubs , tclversion , * tcl_opt_paths )
end
2011-05-26 19:36:33 -04:00
unless st
2011-05-23 18:37:44 -04:00
puts ( " Warning:: cannot find Tcl library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options. " )
2009-07-27 15:40:43 -04:00
return false
2011-05-26 19:36:33 -04:00
else
2011-06-01 11:46:31 -04:00
( $LIBPATH || = [ ] ; $LIBPATH |= [ path ] ) if path
2011-05-26 19:36:33 -04:00
$libs = append_library ( $libs , lib ) if lib
2011-06-01 11:46:31 -04:00
( $libs || = " " ) << " " << libs if libs
$INCFLAGS || = " "
2011-05-26 19:36:33 -04:00
inc . each { | f | $INCFLAGS << " -I " << f }
2005-01-25 09:31:45 -05:00
end
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2011-05-26 19:36:33 -04:00
st , path , lib , libs , * inc = find_tk ( tklib , stubs , tkversion , * tk_opt_paths )
2013-11-29 10:44:25 -05:00
if ! st && TkLib_Config [ 'enable-shared' ] == nil
TkLib_Config [ 'enable-shared' ] = false
st , path , lib , libs , * inc = find_tk ( tklib , stubs , tkversion , * tk_opt_paths )
end
2011-05-26 19:36:33 -04:00
unless st
2011-05-23 18:37:44 -04:00
puts ( " Warning:: cannot find Tk library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options. " )
2009-07-27 15:40:43 -04:00
return false
2011-05-26 19:36:33 -04:00
else
2011-06-01 11:46:31 -04:00
( $LIBPATH || = [ ] ; $LIBPATH |= [ path ] ) if path
2011-05-26 19:36:33 -04:00
$libs = append_library ( $libs , lib ) if lib && ! lib . empty?
2011-06-01 11:46:31 -04:00
( $libs || = " " ) << " " << libs if libs
$INCFLAGS || = " "
2011-05-26 19:36:33 -04:00
inc . each { | f | $INCFLAGS << " -I " << f }
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
end
2009-07-27 15:40:43 -04:00
true
2005-01-25 09:31:45 -05:00
end
2008-10-19 19:22:10 -04:00
def find_tcltk_header ( tclver , tkver )
2009-07-12 19:08:32 -04:00
base_dir = [ ]
base_dir . concat [
File . join ( RbConfig :: CONFIG [ 'prefix' ] , 'include' ) ,
" /usr/local/include " , " /usr/pkg/include " , " /usr/contrib/include " ,
" /usr/include "
2011-05-26 19:36:33 -04:00
] . find_all { | dir | File . directory? ( dir ) } . map { | dir | File . expand_path ( dir ) }
2008-10-19 19:22:10 -04:00
2010-05-06 17:47:37 -04:00
if ! CROSS_COMPILING && is_win32?
base_dir . concat [
2011-05-23 18:37:44 -04:00
" c:/Tcl/include " , " c:/Program Files/Tcl/include " ,
" c:/Program Files (x86)/Tcl/include " ,
" /Tcl/include " , " /Program Files/Tcl/include " ,
" /Program Files (x86)/Tcl/include "
2011-05-26 19:36:33 -04:00
] . find_all { | dir | File . directory? ( dir ) } . map { | dir | File . expand_path ( dir ) }
2011-05-23 18:37:44 -04:00
2011-05-26 19:36:33 -04:00
if ENV [ 'CPATH' ]
base_dir |= ENV [ 'CPATH' ] . split ( ';' ) . find_all { | dir | File . directory? ( dir ) } . map { | dir | File . expand_path ( dir ) }
end
2010-05-06 17:47:37 -04:00
end
2009-07-12 19:08:32 -04:00
2011-05-26 19:36:33 -04:00
base_dir |= TkLib_Config [ " checked_shlib_dirs " ]
2009-07-16 10:34:09 -04:00
unless TkLib_Config [ " space-on-tk-libpath " ]
base_dir . delete_if { | path | path =~ / / }
end
2011-05-26 19:36:33 -04:00
# tcl.h
if TclConfig_Info [ 'MKMF_PARAMS' ]
# already checked existence of tcl headers based on tclConfig.sh
have_tcl_h = true
2009-07-12 19:08:32 -04:00
else
2011-05-26 19:36:33 -04:00
print " \n Search tcl.h "
2011-05-23 18:37:44 -04:00
if enable_config ( " tcl-h-ver-check " , true ) &&
tclver && tclver =~ / ^ \ D*( \ d) \ .?( \ d) /
major = $1 ; minor = $2
2008-10-19 19:22:10 -04:00
else
2011-05-23 18:37:44 -04:00
major = minor = nil
end
2011-05-26 19:36:33 -04:00
print ( " . " ) # progress
2011-05-23 18:37:44 -04:00
if major && minor
# version check on tcl.h
2013-01-10 02:47:20 -05:00
version_check = proc { | code |
code << ( " # if TCL_MAJOR_VERSION != #{ major } || TCL_MINOR_VERSION != #{ minor } \n " \
" # error VERSION does not match \n " \
" # endif " )
}
2011-05-23 18:37:44 -04:00
else
2013-01-10 02:47:20 -05:00
version_check = nil
2011-05-23 18:37:44 -04:00
end
2013-01-10 02:47:20 -05:00
have_tcl_h = have_header ( 'tcl.h' , & version_check )
2011-05-23 18:37:44 -04:00
unless have_tcl_h
if tclver && ! tclver . empty?
versions = [ tclver ]
else
versions = TkLib_Config [ 'search_versions' ]
end
paths = base_dir . dup
2011-05-26 19:36:33 -04:00
( versions + [ " " ] ) . each { | ver |
2011-05-23 18:37:44 -04:00
paths . concat ( base_dir . map { | dir |
2011-05-26 19:36:33 -04:00
[
dir + '/tcl' + ver ,
dir + '/tcl' + ver + '/include' ,
dir + '/tcl' + ver . delete ( '.' ) ,
dir + '/tcl' + ver . delete ( '.' ) + '/include'
]
2011-05-23 18:37:44 -04:00
} . flatten )
}
2011-05-26 19:36:33 -04:00
paths = paths . map { | dir |
( File . directory? ( dir ) ) ? File . expand_path ( dir ) : nil
} . compact . uniq
2013-01-10 02:47:20 -05:00
if major || minor
version_check = proc { | code |
code << " # if TCL_MAJOR_VERSION != #{ major } \n # error MAJOR_VERSION does not match \n # endif \n " if major
code << " # if TCL_MINOR_VERSION != #{ minor } \n # error MINOR_VERSION does not match \n # endif \n " if minor
code
}
else
version_check = nil
end
2011-05-26 19:36:33 -04:00
have_tcl_h = paths . find { | path |
print ( " . " ) # progress
inc_opt = " -I #{ path . quote } "
2013-01-10 02:47:20 -05:00
if try_header ( " tcl " , inc_opt , & version_check )
2011-06-01 11:46:31 -04:00
( $INCFLAGS || = " " ) << inc_opt
2011-05-26 19:36:33 -04:00
true
else
false
end
}
2008-10-19 19:22:10 -04:00
end
end
2011-05-26 19:36:33 -04:00
# tk.h
if TkConfig_Info [ 'MKMF_PARAMS' ]
# already checked existence of tk headers based on tkConfig.sh
have_tk_h = true
2009-07-12 19:08:32 -04:00
else
2011-05-26 19:36:33 -04:00
print " \n Search tk.h "
2011-05-23 18:37:44 -04:00
if enable_config ( " tk-h-ver-check " , true ) &&
tkver && tkver =~ / ^ \ D*( \ d) \ .?( \ d) /
major = $1 ; minor = $2
2008-10-19 19:22:10 -04:00
else
2011-05-23 18:37:44 -04:00
major = minor = nil
end
2011-05-26 19:36:33 -04:00
print ( " . " ) # progress
2011-05-23 18:37:44 -04:00
if major && minor
# version check on tk.h
2013-01-10 02:47:20 -05:00
version_check = proc { | code |
code << ( " # if TK_MAJOR_VERSION != #{ major } || TK_MINOR_VERSION != #{ minor } \n " \
" # error VERSION does not match \n " \
" # endif " )
}
2011-05-23 18:37:44 -04:00
else
2013-01-10 02:47:20 -05:00
version_check = nil
2011-05-23 18:37:44 -04:00
end
2013-01-10 02:47:20 -05:00
have_tk_h = have_header ( 'tk.h' )
2011-05-23 18:37:44 -04:00
unless have_tk_h
if tkver && ! tkver . empty?
versions = [ tkver ]
else
versions = TkLib_Config [ 'search_versions' ]
end
paths = base_dir . dup
2011-05-26 19:36:33 -04:00
( versions + [ " " ] ) . each { | ver |
2011-05-23 18:37:44 -04:00
paths . concat ( base_dir . map { | dir |
2011-05-26 19:36:33 -04:00
[
dir + '/tk' + ver ,
dir + '/tk' + ver + '/include' ,
dir + '/tk' + ver . delete ( '.' ) ,
dir + '/tk' + ver . delete ( '.' ) + '/include'
]
2011-05-23 18:37:44 -04:00
} . flatten )
}
2011-05-26 19:36:33 -04:00
paths = paths . map { | dir |
( File . directory? ( dir ) ) ? File . expand_path ( dir ) : nil
} . compact . uniq
2013-01-10 02:47:20 -05:00
if major || minor
version_check = proc { | code |
code << " # if TK_MAJOR_VERSION != #{ major } \n # error MAJOR_VERSION does not match \n # endif \n " if major
code << " # if TK_MINOR_VERSION != #{ minor } \n # error MINOR_VERSION does not match \n # endif \n " if minor
code
}
else
version_check = nil
end
2011-05-26 19:36:33 -04:00
have_tk_h = paths . find { | path |
print ( " . " ) # progress
inc_opt = " -I #{ path . quote } "
2013-01-10 02:47:20 -05:00
if try_header ( %w'tcl.h tk.h' , inc_opt , & version_check )
2011-06-01 11:46:31 -04:00
( $INCFLAGS || = " " ) << inc_opt
2011-05-26 19:36:33 -04:00
true
else
false
end
}
2008-10-19 19:22:10 -04:00
end
end
2011-05-23 18:37:44 -04:00
puts " Can't find \" tcl.h \" . " unless have_tcl_h
puts " Can't find \" tk.h \" . " unless have_tk_h
2008-10-19 19:22:10 -04:00
have_tcl_h && have_tk_h
end
2010-05-31 10:50:39 -04:00
def setup_for_macosx_framework ( tclver , tkver )
# use framework, but no tclConfig.sh
2013-10-13 22:07:51 -04:00
unless $LIBS && $LIBS . include? ( '-framework' )
( $LIBS || = " " ) << ' -framework Tk -framework Tcl'
2009-07-12 19:08:32 -04:00
end
if TkLib_Config [ " tcl-framework-header " ]
2011-06-12 03:22:41 -04:00
TclConfig_Info [ 'TCL_INCLUDE_SPEC' ] [ 0 , 0 ] =
2011-06-01 11:46:31 -04:00
" -I #{ TkLib_Config [ " tcl-framework-header " ] . quote } "
2010-05-31 10:50:39 -04:00
else
tcl_base = File . join ( TkLib_Config [ " tcltk-framework " ] , 'Tcl.framework' )
if tclver
TclConfig_Info [ 'TCL_INCLUDE_SPEC' ] <<
2011-06-01 11:46:31 -04:00
" -I #{ File . join ( tcl_base , 'Versions' , tclver , 'Headers' ) . quote } "
2010-05-31 10:50:39 -04:00
end
TclConfig_Info [ 'TCL_INCLUDE_SPEC' ] << File . join ( tcl_base , 'Headers' )
unless tclver
2011-05-15 07:55:52 -04:00
dir = Dir . glob ( File . join ( tcl_base , 'Versions' , '*' , 'Headers' ) ,
2010-05-31 10:50:39 -04:00
File :: FNM_CASEFOLD ) . sort . reverse [ 0 ]
TclConfig_Info [ 'TCL_INCLUDE_SPEC' ] << " -I #{ dir . quote } " if dir
end
2009-07-12 19:08:32 -04:00
end
2010-05-31 10:50:39 -04:00
2009-07-12 19:08:32 -04:00
if TkLib_Config [ " tk-framework-header " ]
2011-06-12 03:22:41 -04:00
TkConfig_Info [ 'TK_INCLUDE_SPEC' ] [ 0 , 0 ] =
2011-06-01 11:46:31 -04:00
" -I #{ TkLib_Config [ " tk-framework-header " ] . quote } "
2010-05-31 10:50:39 -04:00
else
tk_base = File . join ( TkLib_Config [ " tcltk-framework " ] , 'Tk.framework' )
if tkver
TkConfig_Info [ 'TK_INCLUDE_SPEC' ] <<
2011-06-01 11:46:31 -04:00
" -I #{ File . join ( tk_base , 'Versions' , tkver , 'Headers' ) . quote } "
2010-05-31 10:50:39 -04:00
end
TkConfig_Info [ 'TK_INCLUDE_SPEC' ] << File . join ( tk_base , 'Headers' )
unless tkver
2011-05-15 07:55:52 -04:00
dir = Dir . glob ( File . join ( tk_base , 'Versions' , '*' , 'Headers' ) ,
2010-05-31 10:50:39 -04:00
File :: FNM_CASEFOLD ) . sort . reverse [ 0 ]
TkConfig_Info [ 'TK_INCLUDE_SPEC' ] << " -I #{ dir . quote } " if dir
end
2009-07-12 19:08:32 -04:00
end
end
* ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5.
* ext/tk/lib/tkextlib/tile.rb: [incompatible] remove TileWidgets'
instate/state/identify method to avoid the conflict with standard
widget options. Those methods are renamed to ttk_instate/ttk_state/
ttk_identify (tile_instate/tile_state/tile_identify are available
too). Although I don't recommend, if you realy need old methods,
please define "Tk::USE_OBSOLETE_TILE_STATE_METHOD = true" before
"require 'tkextlib/tile'".
* ext/tk/lib/tkextlib/tile.rb: "Tk::Tile::__Import_Tile_Widgets__!"
is obsolete. It outputs warning. To control default widget set,
use "Tk.default_widget_set = :Ttk".
* ext/tk/lib/tk.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__ method and
__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method are defind
as module methods of TkConfigMethod. It may help users to wrap old
Ruby/Tk scripts (use standard widgets) to force to use Ttk widgets.
Ttk widgets don't have some options of standard widgets which are
control the view of widgets. When set ignore-mode true, configure
method tries to ignoure such unknown options with no exception.
Of course, it may raise other troubles on the GUI design.
So, those are a little danger methods.
* ext/tk/lib/tk/itemconfig.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__
method and __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method
are defind as module methods of TkItemConfigMethod as the same
purpose as TkConfigMethod's ones.
* ext/tk/sample/ttk_wrapper.rb: A new example. This is a tool for
wrapping old Ruby/Tk scripts (which use standard widgets) to use
Ttk (Tile) widgets as default.
* ext/tk/sample/tkextlib/tile/demo.rb: use ttk_instate/ttk_state
method instead of instate/state method.
* ext/tk/lib/tk/root, ext/tk/lib/tk/namespace.rb,
ext/tk/lib/tk/text.rb, ext/tk/lib/tkextlib/*: some 'instance_eval's
are replaced to "instance_exec(self)".
* ext/tk/lib/tk/event.rb: bug fix on KEY_TBL and PROC_TBL (?x is not
a character code on Ruby1.9).
* ext/tk/lib/tk/variable.rb: support new style of operation argument
on Tcl/Tk's 'trace' command for variables.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget: bug fix
* ext/tk/sammple/demos-jp/textpeer.rb,
ext/tk/sammple/demos-en/textpeer.rb: new widget demo.
* ext/tk/tcltklib.c: decrase SEGV troubles (probably)
* ext/tk/lib/tk.rb: remove Thread.critical access if Ruby1.9
* ext/tk/lib/tk/multi-tk.rb: support Ruby1.9 (probably)
* ext/tk/lib/tkextlib/tile.rb: add method to define Tcl/Tk command
to make Tcl/Tk theme sources (based on different version of Tile
extension) available.
(Tk::Tile::__define_LoadImages_proc_for_comaptibility__)
* ext/tk/lib/tk.rb, ext/tk/lib/tk/wm.rb: support dockable frames
(Tcl/Tk8.5 feature). 'wm' command can treat many kinds of widgets
as toplevel widgets.
* ext/tk/lib/tkextlib/tile/style.rb: ditto.
(Tk::Tile::Style.__define_wrapper_proc_for_compatibility__)
* ext/tk/lib/tk/font.rb: add actual_hash and metrics_hash to get
properties as a hash. metrics_hash method returns a boolean value
for 'fixed' option. But metrics method returns numeric value
(0 or 1) for 'fixed' option, because of backward compatibility.
* ext/tk/lib/tk/timer.rb: somtimes fail to set callback procedure.
* ext/tk/lib/tk.rb: add Tk.sleep and Tk.wakeup method. Tk.sleep
doesn't block the eventloop. It will be better to use the method
in event callbacks.
* ext/tk/sample/tksleep_sample.rb: sample script about Tk.sleep.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-29 01:25:12 -04:00
def find_X11 ( * opt_paths )
2009-07-12 19:08:32 -04:00
defaults =
[ " /usr/X11*/lib " , " /usr/lib/X11* " , " /usr/local/X11* " , " /usr/openwin/lib " ]
paths = [ ]
2010-05-06 17:47:37 -04:00
opt_paths . compact . each { | path | paths . concat ( Dir . glob ( path . strip . chomp ( '/' ) , File :: FNM_CASEFOLD ) ) }
defaults . compact . each { | path | paths . concat ( Dir . glob ( path . strip . chomp ( '/' ) , File :: FNM_CASEFOLD ) ) }
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
st = find_library ( " X11 " , " XOpenDisplay " , * paths )
unless st
2011-05-23 18:37:44 -04:00
puts ( " Warning:: cannot find X11 library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options. If your Tcl/Tk don't require X11, please try --without-X11. " )
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
end
st
2009-03-05 22:56:38 -05:00
end
* ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5.
* ext/tk/lib/tkextlib/tile.rb: [incompatible] remove TileWidgets'
instate/state/identify method to avoid the conflict with standard
widget options. Those methods are renamed to ttk_instate/ttk_state/
ttk_identify (tile_instate/tile_state/tile_identify are available
too). Although I don't recommend, if you realy need old methods,
please define "Tk::USE_OBSOLETE_TILE_STATE_METHOD = true" before
"require 'tkextlib/tile'".
* ext/tk/lib/tkextlib/tile.rb: "Tk::Tile::__Import_Tile_Widgets__!"
is obsolete. It outputs warning. To control default widget set,
use "Tk.default_widget_set = :Ttk".
* ext/tk/lib/tk.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__ method and
__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method are defind
as module methods of TkConfigMethod. It may help users to wrap old
Ruby/Tk scripts (use standard widgets) to force to use Ttk widgets.
Ttk widgets don't have some options of standard widgets which are
control the view of widgets. When set ignore-mode true, configure
method tries to ignoure such unknown options with no exception.
Of course, it may raise other troubles on the GUI design.
So, those are a little danger methods.
* ext/tk/lib/tk/itemconfig.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__
method and __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method
are defind as module methods of TkItemConfigMethod as the same
purpose as TkConfigMethod's ones.
* ext/tk/sample/ttk_wrapper.rb: A new example. This is a tool for
wrapping old Ruby/Tk scripts (which use standard widgets) to use
Ttk (Tile) widgets as default.
* ext/tk/sample/tkextlib/tile/demo.rb: use ttk_instate/ttk_state
method instead of instate/state method.
* ext/tk/lib/tk/root, ext/tk/lib/tk/namespace.rb,
ext/tk/lib/tk/text.rb, ext/tk/lib/tkextlib/*: some 'instance_eval's
are replaced to "instance_exec(self)".
* ext/tk/lib/tk/event.rb: bug fix on KEY_TBL and PROC_TBL (?x is not
a character code on Ruby1.9).
* ext/tk/lib/tk/variable.rb: support new style of operation argument
on Tcl/Tk's 'trace' command for variables.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget: bug fix
* ext/tk/sammple/demos-jp/textpeer.rb,
ext/tk/sammple/demos-en/textpeer.rb: new widget demo.
* ext/tk/tcltklib.c: decrase SEGV troubles (probably)
* ext/tk/lib/tk.rb: remove Thread.critical access if Ruby1.9
* ext/tk/lib/tk/multi-tk.rb: support Ruby1.9 (probably)
* ext/tk/lib/tkextlib/tile.rb: add method to define Tcl/Tk command
to make Tcl/Tk theme sources (based on different version of Tile
extension) available.
(Tk::Tile::__define_LoadImages_proc_for_comaptibility__)
* ext/tk/lib/tk.rb, ext/tk/lib/tk/wm.rb: support dockable frames
(Tcl/Tk8.5 feature). 'wm' command can treat many kinds of widgets
as toplevel widgets.
* ext/tk/lib/tkextlib/tile/style.rb: ditto.
(Tk::Tile::Style.__define_wrapper_proc_for_compatibility__)
* ext/tk/lib/tk/font.rb: add actual_hash and metrics_hash to get
properties as a hash. metrics_hash method returns a boolean value
for 'fixed' option. But metrics method returns numeric value
(0 or 1) for 'fixed' option, because of backward compatibility.
* ext/tk/lib/tk/timer.rb: somtimes fail to set callback procedure.
* ext/tk/lib/tk.rb: add Tk.sleep and Tk.wakeup method. Tk.sleep
doesn't block the eventloop. It will be better to use the method
in event callbacks.
* ext/tk/sample/tksleep_sample.rb: sample script about Tk.sleep.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-29 01:25:12 -04:00
2009-07-12 19:08:32 -04:00
def search_X_libraries
2011-05-23 18:37:44 -04:00
use_tkConfig = false
2009-07-12 19:08:32 -04:00
if TkConfig_Info [ 'config_file_path' ]
# use definitions on tkConfig.sh
2011-05-23 18:37:44 -04:00
if ( TkConfig_Info [ 'TK_XINCLUDES' ] &&
! TkConfig_Info [ 'TK_XINCLUDES' ] . strip . empty? ) ||
( TkConfig_Info [ 'TK_XLIBSW' ] && ! TkConfig_Info [ 'TK_XLIBSW' ] . strip . empty? )
use_tkConfig = true
2009-07-27 15:40:43 -04:00
#use_X = true && with_config("X11", ! is_win32?)
use_X = with_config ( " X11 " , true )
2009-07-12 19:08:32 -04:00
else
2009-07-27 15:40:43 -04:00
#use_X = false || with_config("X11", false)
use_X = with_config ( " X11 " , false )
2009-07-12 19:08:32 -04:00
end
else
# depend on configure options
2009-07-27 15:40:43 -04:00
use_X = with_config ( " X11 " , ! ( is_win32? || TkLib_Config [ " tcltk-framework " ] ) )
2009-07-12 19:08:32 -04:00
end
2011-05-23 18:37:44 -04:00
if TkConfig_Info [ 'TK_XINCLUDES' ] &&
! TkConfig_Info [ 'TK_XINCLUDES' ] . strip . empty?
2011-06-01 11:46:31 -04:00
( $INCFLAGS || = " " ) << " " << TkConfig_Info [ 'TK_XINCLUDES' ] . strip
2011-05-23 18:37:44 -04:00
end
2009-07-12 19:08:32 -04:00
if use_X
2011-05-23 18:37:44 -04:00
puts ( " Use X11 libraries (or use TK_XINCLUDES/TK_XLIBSW information on tkConfig.sh). " )
2009-07-12 19:08:32 -04:00
x11_idir , x11_ldir = dir_config ( " X11 " )
x11_ldir2 = with_config ( " X11-lib " )
2009-07-27 15:40:43 -04:00
unless find_X11 ( x11_ldir2 , x11_ldir )
2011-05-23 18:37:44 -04:00
puts ( " Can't find X11 libraries. " )
if use_tkConfig &&
TkConfig_Info [ 'TK_XLIBSW' ] && ! TkConfig_Info [ 'TK_XLIBSW' ] . strip . empty?
puts ( " But, try to use TK_XLIBSW information (believe tkCOnfig.sh). " )
2011-06-01 11:46:31 -04:00
( $libs || = " " ) << " " << TkConfig_Info [ 'TK_XLIBSW' ] << " "
2011-05-23 18:37:44 -04:00
else
puts ( " So, can't make tcltklib.so which is required by Ruby/Tk. " )
exit
end
2009-07-27 15:40:43 -04:00
end
2010-07-29 18:54:01 -04:00
end
2010-03-25 15:55:32 -04:00
2009-07-12 19:08:32 -04:00
use_X
end
2005-01-25 09:31:45 -05:00
def pthread_check ( )
tcl_major_ver = nil
tcl_minor_ver = nil
# Is tcl-thread given by user ?
case enable_config ( " tcl-thread " )
when true
tcl_enable_thread = true
when false
tcl_enable_thread = false
else
tcl_enable_thread = nil
end
2009-07-12 19:08:32 -04:00
if TclConfig_Info [ 'config_file_path' ]
2005-01-25 09:31:45 -05:00
if tcl_enable_thread == true
2009-07-12 19:08:32 -04:00
puts ( " Warning: definiton of tclConfig.sh is ignored, because --enable-tcl-thread option is given. " )
2005-01-25 09:31:45 -05:00
elsif tcl_enable_thread == false
2009-07-12 19:08:32 -04:00
puts ( " Warning: definition of tclConfig.sh is ignored, because --disable-tcl-thread option is given. " )
2005-01-25 09:31:45 -05:00
else
# tcl-thread is unknown and tclConfig.sh is given
2009-07-12 19:08:32 -04:00
if TclConfig_Info [ 'TCL_THREADS' ]
tcl_enable_thread = ( TclConfig_Info [ 'TCL_THREADS' ] == " 1 " )
else
tcl_major_ver = TclConfig_Info [ 'TCL_MAJOR_VERSION' ] . to_i
tcl_minor_ver = TclConfig_Info [ 'TCL_MINOR_VERSION' ] . to_i
if tcl_major_ver < 8 || ( tcl_major_ver == 8 && tcl_minor_ver == 0 )
tcl_enable_thread = false
2005-01-25 09:31:45 -05:00
end
2009-07-12 19:08:32 -04:00
end
2005-01-25 09:31:45 -05:00
2009-07-12 19:08:32 -04:00
if tcl_enable_thread == nil
# cannot find definition
if tcl_major_ver
puts ( " Warning: ' #{ TclConfig_Info [ 'config_file_path' ] } ' doesn't include TCL_THREADS definition. " )
else
puts ( " Warning: ' #{ TclConfig_Info [ 'config_file_path' ] } ' may not be a tclConfig file. " )
2005-01-25 09:31:45 -05:00
end
2011-05-23 18:37:44 -04:00
#tclConfig = false
2005-01-25 09:31:45 -05:00
end
end
end
2009-07-12 19:08:32 -04:00
if tcl_enable_thread == nil && ! TclConfig_Info [ 'config_file_path' ]
2005-01-25 09:31:45 -05:00
# tcl-thread is unknown and tclConfig is unavailable
begin
2011-05-23 18:37:44 -04:00
try_run ( " int main() { exit(0); } " )
2005-01-25 09:31:45 -05:00
rescue Exception
# cannot try_run. Is CROSS-COMPILE environment?
puts ( % Q ' \
** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *
**
2009-07-12 19:08:32 -04:00
** NATIVETHREAD SUPPORT CHECK WARNING :
2005-01-25 09:31:45 -05:00
**
2011-05-15 07:55:52 -04:00
** We cannot check the consistency of nativethread support between
2009-07-12 19:08:32 -04:00
** Ruby and the Tcl / Tk library in your environment ( are you perhaps
2011-05-15 07:55:52 -04:00
** cross - compiling? ) . If nativethread support for these 2 packages
2009-07-12 19:08:32 -04:00
** is inconsistent you may find you get errors when running Ruby / Tk
* ext/tk/extconf.rb: improbe messages [ruby-core:06325].
* ext/tk/lib/tk.rb, ext/tk/lib/tk/canvas.rb, ext/tk/lib/tk/entry.rb,
ext/tk/lib/tk/frame.rb, ext/tk/lib/tk/image.rb,
ext/tk/lib/tk/itemconfig.rb, ext/tk/lib/tk/labelframe.rb,
ext/tk/lib/tk/listbox.rb, ext/tk/lib/tk/menu.rb,
ext/tk/lib/tk/radiobutton.rb, ext/tk/lib/tk/scale.rb,
ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tk/text.rb,
ext/tk/lib/tk/toplevel.rb: improve conversion of option values.
* ext/tk/lib/tkextlib/*: ditto.
* ext/tk/lib/tkextlib/*: update to support ActiveTcl8.4.11.2.
* ext/tk/lib/tkextlib/trofs/*: support Trofs 0.4.3.
* ext/tk/lib/tkextlib/tile/*: support Tile 0.7.2.
* ext/tk/lib/tkextlib/vu/*: support vu 2.3.0.
* ext/tk/lib/tkextlib/tcllib/*: support Tcllib 1.8 (Tklib 0.3).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-22 18:17:08 -04:00
** ( e . g . hangs or segmentation faults ) . We strongly recommend
** you to check the consistency manually .
2005-01-25 09:31:45 -05:00
**
** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *
' )
return true
end
end
if tcl_enable_thread == nil
# tcl-thread is unknown
if try_run ( <<EOF)
#include <tcl.h>
2009-03-05 22:56:38 -05:00
int main ( ) {
2005-01-25 09:31:45 -05:00
Tcl_Interp * ip ;
ip = Tcl_CreateInterp ( ) ;
exit ( ( Tcl_Eval ( ip , " set tcl_platform(threaded) " ) == TCL_OK ) ? 0 : 1 ) ;
}
EOF
tcl_enable_thread = true
elsif try_run ( <<EOF)
#include <tcl.h>
static Tcl_ThreadDataKey dataKey ;
int main ( ) { exit ( ( Tcl_GetThreadData ( & dataKey , 1 ) == dataKey ) ? 1 : 0 ) ; }
EOF
tcl_enable_thread = true
else
tcl_enable_thread = false
end
end
# check pthread mode
2009-07-12 19:08:32 -04:00
if ( TkLib_Config [ " ruby_with_thread " ] )
2011-06-01 11:46:31 -04:00
$CPPFLAGS || = " "
2005-01-25 09:31:45 -05:00
# ruby -> enable
unless tcl_enable_thread
# ruby -> enable && tcl -> disable
puts ( % Q ' \
** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *
**
2009-07-12 19:08:32 -04:00
** NATIVETHREAD SUPPORT MODE WARNING :
2005-01-25 09:31:45 -05:00
**
2011-05-15 07:55:52 -04:00
** Ruby is compiled with - - enable - pthread , but your Tcl / Tk library
** seems to be compiled without nativethread support . Although you can
** create the tcltklib library , this combination may cause errors ( e . g .
** hangs or segmentation faults ) . If you have no reason to keep the
** current nativethread support status , we recommend you reconfigure and
2009-07-12 19:08:32 -04:00
** recompile the libraries so that both or neither support nativethreads .
2005-01-25 09:31:45 -05:00
**
2009-07-12 19:08:32 -04:00
** If you want change the status of nativethread support , please recompile
** Ruby without " --enable-pthread " configure option ( If you use Ruby 1 . 9 . x
** or later , you cannot remove this option , because it requires native -
2011-05-15 07:55:52 -04:00
** thread support . ) or recompile Tcl / Tk with " --enable-threads " configure
2009-07-12 19:08:32 -04:00
** option ( if your Tcl / Tk is later than or equal to Tcl / Tk 8 . 1 ) .
2005-01-25 09:31:45 -05:00
**
** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *
' )
end
# ruby -> enable && tcl -> enable/disable
if tcl_enable_thread
$CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=1'
else
$CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=0'
end
return true
else
# ruby -> disable
if tcl_enable_thread
# ruby -> disable && tcl -> enable
puts ( % Q ' \
** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *
**
2009-07-12 19:08:32 -04:00
** NATIVETHREAD SUPPORT MODE ERROR :
2005-01-25 09:31:45 -05:00
**
2009-03-05 22:56:38 -05:00
** Ruby is not compiled with - - enable - pthread , but your Tcl / Tk
2009-07-12 19:08:32 -04:00
** library seems to be compiled with nativethread support . This
* ext/tk/extconf.rb: improbe messages [ruby-core:06325].
* ext/tk/lib/tk.rb, ext/tk/lib/tk/canvas.rb, ext/tk/lib/tk/entry.rb,
ext/tk/lib/tk/frame.rb, ext/tk/lib/tk/image.rb,
ext/tk/lib/tk/itemconfig.rb, ext/tk/lib/tk/labelframe.rb,
ext/tk/lib/tk/listbox.rb, ext/tk/lib/tk/menu.rb,
ext/tk/lib/tk/radiobutton.rb, ext/tk/lib/tk/scale.rb,
ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tk/text.rb,
ext/tk/lib/tk/toplevel.rb: improve conversion of option values.
* ext/tk/lib/tkextlib/*: ditto.
* ext/tk/lib/tkextlib/*: update to support ActiveTcl8.4.11.2.
* ext/tk/lib/tkextlib/trofs/*: support Trofs 0.4.3.
* ext/tk/lib/tkextlib/tile/*: support Tile 0.7.2.
* ext/tk/lib/tkextlib/vu/*: support vu 2.3.0.
* ext/tk/lib/tkextlib/tcllib/*: support Tcllib 1.8 (Tklib 0.3).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-22 18:17:08 -04:00
** combination may cause frequent hang or segmentation fault
** errors when Ruby / Tk is working . We recommend that you NEVER
2009-07-12 19:08:32 -04:00
** create the library with such a combination of nativethread support .
2005-01-25 09:31:45 -05:00
**
* ext/tk/extconf.rb: improbe messages [ruby-core:06325].
* ext/tk/lib/tk.rb, ext/tk/lib/tk/canvas.rb, ext/tk/lib/tk/entry.rb,
ext/tk/lib/tk/frame.rb, ext/tk/lib/tk/image.rb,
ext/tk/lib/tk/itemconfig.rb, ext/tk/lib/tk/labelframe.rb,
ext/tk/lib/tk/listbox.rb, ext/tk/lib/tk/menu.rb,
ext/tk/lib/tk/radiobutton.rb, ext/tk/lib/tk/scale.rb,
ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tk/text.rb,
ext/tk/lib/tk/toplevel.rb: improve conversion of option values.
* ext/tk/lib/tkextlib/*: ditto.
* ext/tk/lib/tkextlib/*: update to support ActiveTcl8.4.11.2.
* ext/tk/lib/tkextlib/trofs/*: support Trofs 0.4.3.
* ext/tk/lib/tkextlib/tile/*: support Tile 0.7.2.
* ext/tk/lib/tkextlib/vu/*: support vu 2.3.0.
* ext/tk/lib/tkextlib/tcllib/*: support Tcllib 1.8 (Tklib 0.3).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-22 18:17:08 -04:00
** Please recompile Ruby with the " --enable-pthread " configure option
** or recompile Tcl / Tk with the " --disable-threads " configure option .
2005-01-25 09:31:45 -05:00
**
** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *
' )
$CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=1'
return false
else
# ruby -> disable && tcl -> disable
$CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=0'
return true
end
end
end
2009-07-12 19:08:32 -04:00
##############################################################
# main
##############################################################
2009-07-27 15:40:43 -04:00
# check header file
print ( " check functions. " )
2013-03-28 00:50:12 -04:00
% w " ruby_native_thread_p rb_errinfo rb_safe_level rb_hash_lookup
rb_proc_new rb_obj_untrust rb_obj_taint rb_set_safe_level_force
rb_sourcefile rb_thread_alive_p rb_thread_check_trap_pending " .each do |func|
have_func ( func , " ruby.h " )
print ( " . " ) # progress
end
2009-07-27 15:40:43 -04:00
print ( " \n " ) # progress
* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.
* ext/tk/tcltklib.c: avoid error on a shared object.
* ext/tk/extconf.rb: support --with-tcltkversion
* ext/tk/README.tcltklib: add document about --with-tcltkversion
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb:
not work on $SAFE==4
* ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb,
ext/tk/lib/tk/canvas.rb: support alias names of option keys.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
parameter patterns of configure method.
* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
an invalid value.
* ext/tk/lib/tk.rb: fix memory (object) leak bug.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.
* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
bug fix.
* ext/tk/lib/tkextlib/blt/component.rb,
ext/tk/lib/tkextlib/tile/tentry.rb,
ext/tk/lib/tkextlib/tile/treeview.rb: ditto.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget,
ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb,
ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb:
bug fix.
* ext/tk/sample/ttk_wrapper.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/ttk_wrapper.rb: improve treating and control themes.
add Tk::Tile.themes and Tk::Tile.set_theme(theme).
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys.
Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g.
:widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on;
those are attributes of event object). It means that Ruby/Tk accepts
not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but
also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }".
It is potentially incompatible, when user passes symbols to the
arguments of the callback block (the block receives the symbols as
strings). I think that is very rare case (probably, used by Ruby/Tk
experts only). When causes such trouble, please give strings instead
of such symbol parameters (e.g. call Symbol#to_s method).
* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb,
ext/tk/lib/tkextlib/blt/treeview.rb,
ext/tk/lib/tkextlib/winico/winico.rb: ditto.
* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on
TkUtil::CallbackSubst class (it is useful on Ruby 1.9).
* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb,
ext/tk/lib/tkextlib/iwidgets/spinner.rb,
ext/tk/lib/tkextlib/iwidgets/entryfield.rb,
ext/tk/lib/tkextlib/iwidgets/calendar.rb,
ext/tk/lib/tkextlib/blt/dragdrop.rb,
ext/tk/lib/tkextlib/tkDND/tkdnd.rb,
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb,
ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became
unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.
* ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define
the constant WITH_ENCODING.
* ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 16:59:10 -04:00
2009-07-27 15:40:43 -04:00
print ( " check struct members. " )
2009-07-12 19:08:32 -04:00
have_struct_member ( " struct RArray " , " ptr " , " ruby.h " )
2009-07-27 15:40:43 -04:00
print ( " . " ) # progress
2009-07-12 19:08:32 -04:00
have_struct_member ( " struct RArray " , " len " , " ruby.h " )
2009-07-27 15:40:43 -04:00
print ( " \n " ) # progress
2005-01-25 09:31:45 -05:00
2009-07-12 19:08:32 -04:00
# check libraries
unless is_win32?
2009-07-27 15:40:43 -04:00
print ( " check libraries. " )
2009-07-12 19:08:32 -04:00
have_library ( " nsl " , " t_open " )
2009-07-27 15:40:43 -04:00
print ( " . " ) # progress
2009-07-12 19:08:32 -04:00
have_library ( " socket " , " socket " )
2009-07-27 15:40:43 -04:00
print ( " . " ) # progress
2009-07-12 19:08:32 -04:00
have_library ( " dl " , " dlopen " )
2009-07-27 15:40:43 -04:00
print ( " . " ) # progress
2010-03-11 16:49:02 -05:00
have_library ( " m " , " log " , " math.h " )
2009-07-27 15:40:43 -04:00
print ( " \n " ) # progress
2009-07-12 19:08:32 -04:00
end
2011-06-01 11:46:31 -04:00
$CPPFLAGS || = " "
2009-07-12 19:08:32 -04:00
$CPPFLAGS += ' -D_WIN32' if / cygwin / =~ RUBY_PLATFORM
2005-05-23 03:27:08 -04:00
2009-07-12 19:08:32 -04:00
# Does ruby have nativethread ?
2011-05-15 07:55:52 -04:00
TkLib_Config [ " ruby_with_thread " ] =
2009-07-12 19:08:32 -04:00
macro_defined? ( 'HAVE_NATIVETHREAD' , '#include "ruby.h"' )
2005-05-23 03:27:08 -04:00
2009-07-27 15:40:43 -04:00
2009-07-12 19:08:32 -04:00
#---------------------------------------------------
2011-05-23 18:37:44 -04:00
TclConfig_Info = { }
TkConfig_Info = { }
# use Tcl/Tk build dir? (has highest priority)
TkLib_Config [ " tcl-build-dir " ] = with_config ( " tcl-build-dir " )
TkLib_Config [ " tk-build-dir " ] = with_config ( " tk-build-dir " )
if TkLib_Config [ " tcl-build-dir " ]
puts ( " use Tcl build (pre-install) dir \" #{ TkLib_Config [ " tcl-build-dir " ] } \" " )
TkLib_Config [ " tcl-build-dir " ] = File . expand_path ( TkLib_Config [ " tcl-build-dir " ] )
base = File . dirname ( TkLib_Config [ " tcl-build-dir " ] )
2011-06-01 11:46:31 -04:00
( $INCFLAGS || = " " ) << " -I #{ File . join ( base , " generic " ) . quote } -I #{ TkLib_Config [ " tcl-build-dir " ] . quote } "
$LIBPATH || = [ ] ; $LIBPATH |= [ TkLib_Config [ " tcl-build-dir " ] ]
2011-05-23 18:37:44 -04:00
end
if TkLib_Config [ " tk-build-dir " ]
puts ( " use Tk build (pre-install) dir \" #{ TkLib_Config [ " tk-build-dir " ] } \" " )
TkLib_Config [ " tk-build-dir " ] = File . expand_path ( TkLib_Config [ " tk-build-dir " ] )
base = File . dirname ( TkLib_Config [ " tk-build-dir " ] )
2011-06-01 11:46:31 -04:00
( $INCFLAGS || = " " ) << " -I #{ File . join ( base , " generic " ) . quote } -I #{ TkLib_Config [ " tk-build-dir " ] . quote } "
$LIBPATH || = [ ] ; $LIBPATH |= [ TkLib_Config [ " tk-build-dir " ] ]
2011-05-23 18:37:44 -04:00
end
2009-07-12 19:08:32 -04:00
# check requirement of Tcl/tk version
tcltk_version = with_config ( " tcltkversion " )
2011-05-23 18:37:44 -04:00
TkLib_Config [ " tcltkversion " ] = check_tcltk_version ( tcltk_version )
if TkLib_Config [ " tcl-build-dir " ]
if ( cfgfile = with_config ( " tclConfig-file " , Dir . glob ( File . join ( TkLib_Config [ " tcl-build-dir " ] , " tclConfig*.sh " ) , File :: FNM_CASEFOLD ) [ 0 ] ) )
TclConfig_Info [ 'config_file_path' ] = cfgfile
TkLib_Config [ " tclConfig_info " ] = cfginfo = parse_tclConfig ( cfgfile )
if tclver = TkLib_Config [ " tcltkversion " ] [ 0 ]
TkLib_Config [ " tcltkversion " ] [ 0 ] . sub! ( / \ d( \ .?) \ d / , " #{ cfginfo [ 'TCL_MAJOR_VERSION' ] } \\ 1 #{ cfginfo [ 'TCL_MINOR_VERSION' ] } " )
else
TkLib_Config [ " tcltkversion " ] [ 0 ] = " #{ cfginfo [ 'TCL_MAJOR_VERSION' ] } . #{ cfginfo [ 'TCL_MINOR_VERSION' ] } "
end
end
end
if TkLib_Config [ " tk-build-dir " ]
if ( cfgfile = with_config ( " tkConfig-file " , Dir . glob ( File . join ( TkLib_Config [ " tk-build-dir " ] , " tkConfig*.sh " ) , File :: FNM_CASEFOLD ) [ 0 ] ) )
TkConfig_Info [ 'config_file_path' ] = cfgfile
TkLib_Config [ " tkConfig_info " ] = cfginfo = parse_tclConfig ( cfgfile )
if TkLib_Config [ " tcltkversion " ] [ 1 ]
TkLib_Config [ " tcltkversion " ] [ 1 ] . sub! ( / \ d( \ .?) \ d / , " #{ cfginfo [ 'TK_MAJOR_VERSION' ] } \\ 1 #{ cfginfo [ 'TK_MINOR_VERSION' ] } " )
else
TkLib_Config [ " tcltkversion " ] [ 1 ] = " #{ cfginfo [ 'TK_MAJOR_VERSION' ] } . #{ cfginfo [ 'TK_MINOR_VERSION' ] } "
end
end
end
tclver , tkver = TkLib_Config [ " tcltkversion " ]
puts ( " Specified Tcl/Tk version is #{ [ tclver , tkver ] . inspect } " ) if tclver || tkver
2009-07-12 19:08:32 -04:00
# use ActiveTcl ?
#if activeTcl = with_config("ActiveTcl")
2011-05-23 18:37:44 -04:00
#if activeTcl = with_config("ActiveTcl", true)
if activeTcl = with_config ( " ActiveTcl " , ! ( TkLib_Config [ " tcl-build-dir " ] && TkLib_Config [ " tk-build-dir " ] ) )
2009-07-12 19:08:32 -04:00
puts ( " Use ActiveTcl libraries (if available). " )
2010-05-31 10:50:39 -04:00
unless activeTcl . kind_of? String
# set default ActiveTcl path
if CROSS_COMPILING
elsif is_win32?
activeTcl = 'c:/Tcl*'
elsif is_macosx?
activeTcl = '/Library/Frameworks'
else
activeTcl = '/opt/ActiveTcl*'
end
end
2009-07-12 19:08:32 -04:00
end
TkLib_Config [ " ActiveTcl " ] = activeTcl
2009-07-16 10:34:09 -04:00
# allow space chars on a libpath
2011-05-15 07:55:52 -04:00
TkLib_Config [ " space-on-tk-libpath " ] =
2009-07-16 10:34:09 -04:00
enable_config ( " space-on-tk-libpath " , ! is_win32? )
2009-07-12 19:08:32 -04:00
# enable Tcl/Tk stubs?
= begin
2011-05-15 07:55:52 -04:00
if TclConfig_Info [ 'TCL_STUB_LIB_SPEC' ] && TkConfig_Info [ 'TK_STUB_LIB_SPEC' ] &&
2009-07-12 19:08:32 -04:00
! TclConfig_Info [ 'TCL_STUB_LIB_SPEC' ] . strip . empty? &&
! TkConfig_Info [ 'TK_STUB_LIB_SPEC' ] . strip . empty?
stubs = true
unless ( st = enable_config ( " tcltk-stubs " ) ) . nil?
stubs && = st
end
unless ( st = with_config ( " tcltk-stubs " ) ) . nil?
stubs && = st
2005-01-25 09:31:45 -05:00
end
2009-07-12 19:08:32 -04:00
else
stubs = enable_config ( " tcltk-stubs " ) || with_config ( " tcltk-stubs " )
end
= end
stubs = enable_config ( " tcltk-stubs " ) || with_config ( " tcltk-stubs " )
if ( TkLib_Config [ " tcltk-stubs " ] = stubs )
puts ( " Compile with Tcl/Tk stubs. " )
2011-06-01 11:46:31 -04:00
$CPPFLAGS || = " " ; $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS'
2009-07-12 19:08:32 -04:00
end
2005-01-25 09:31:45 -05:00
2009-07-27 15:40:43 -04:00
# directory configuration of Tcl/Tk libraries
2011-05-23 18:37:44 -04:00
if TkLib_Config [ " tcl-build-dir " ]
tcl_idir = File . join ( File . dirname ( TkLib_Config [ " tcl-build-dir " ] ) , " generic " )
tcl_ldir = TkLib_Config [ " tcl-build-dir " ]
else
tcl_idir , tcl_ldir = dir_config ( " tcl " )
end
if TkLib_Config [ " tk-build-dir " ]
tk_idir = File . join ( File . dirname ( TkLib_Config [ " tk-build-dir " ] ) , " generic " )
tk_ldir = TkLib_Config [ " tk-build-dir " ]
else
tk_idir , tk_ldir = dir_config ( " tk " )
end
2009-07-27 15:40:43 -04:00
tcl_idir = tk_idir unless tcl_idir
tcl_ldir = tk_ldir unless tcl_ldir
tk_idir = tcl_idir unless tk_idir
tk_ldir = tcl_ldir unless tk_ldir
2011-06-12 03:22:41 -04:00
TclConfig_Info [ 'TCL_INCLUDE_SPEC' ] || = " "
TkConfig_Info [ 'TK_INCLUDE_SPEC' ] || = " "
TclConfig_Info [ 'TCL_INCLUDE_SPEC' ] [ 0 , 0 ] = " -I #{ tcl_idir . quote } " if tcl_idir
TkConfig_Info [ 'TK_INCLUDE_SPEC' ] [ 0 , 0 ] = " -I #{ tk_idir . quote } " if tk_idir
2009-07-12 19:08:32 -04:00
# get tclConfig.sh/tkConfig.sh
2011-05-23 18:37:44 -04:00
TkLib_Config [ " tcl-NG-path " ] = [ ]
TkLib_Config [ " tk-NG-path " ] = [ ]
tclcfg , tkcfg =
get_tclConfig (
TclConfig_Info [ 'config_file_path' ] || with_config ( " tclConfig-file " , true ) ,
TkConfig_Info [ 'config_file_path' ] || with_config ( " tkConfig-file " , true ) ,
( TclConfig_Info [ 'config_file_path' ] ) ?
File . dirname ( TclConfig_Info [ 'config_file_path' ] ) :
with_config ( " tclConfig-dir " , tcl_ldir || true ) ,
( TkConfig_Info [ 'config_file_path' ] ) ?
File . dirname ( TkConfig_Info [ 'config_file_path' ] ) :
with_config ( " tkConfig-dir " , tk_ldir || true )
)
TclConfig_Info . merge! ( TkLib_Config [ " tclConfig_info " ] ) if TkLib_Config [ " tclConfig_info " ]
TkConfig_Info . merge! ( TkLib_Config [ " tkConfig_info " ] ) if TkLib_Config [ " tkConfig_info " ]
TclConfig_Info [ 'config_file_path' ] || = tclcfg
TkConfig_Info [ 'config_file_path' ] || = tkcfg
2005-01-25 09:31:45 -05:00
2009-07-27 15:40:43 -04:00
tk_cfg_dir = File . dirname ( TkConfig_Info [ 'config_file_path' ] ) rescue nil
tcl_cfg_dir = File . dirname ( TclConfig_Info [ 'config_file_path' ] ) rescue nil
2011-05-23 18:37:44 -04:00
tk_ldir_list = [ tk_ldir , tk_cfg_dir ] . uniq
tcl_ldir_list = [ tcl_ldir , tcl_cfg_dir ] . uniq
if TkConfig_Info [ 'config_file_path' ]
if TkLib_Config [ " tk-build-dir " ]
spec_dir = get_libpath ( TkConfig_Info [ 'TK_LIB_FLAG' ] , TkConfig_Info [ 'TK_BUILD_LIB_SPEC' ] )
else
spec_dir = get_libpath ( TkConfig_Info [ 'TK_LIB_FLAG' ] , TkConfig_Info [ 'TK_LIB_SPEC' ] )
end
tk_ldir_list << spec_dir if File . directory? ( spec_dir )
end
if TclConfig_Info [ 'config_file_path' ]
if TkLib_Config [ " tcl-build-dir " ]
spec_dir = get_libpath ( TclConfig_Info [ 'TCL_LIB_FLAG' ] , TclConfig_Info [ 'TCL_BUILD_LIB_SPEC' ] )
else
spec_dir = get_libpath ( TclConfig_Info [ 'TCL_LIB_FLAG' ] , TclConfig_Info [ 'TCL_LIB_SPEC' ] )
end
tcl_ldir_list << spec_dir if File . directory? ( spec_dir )
end
2009-07-27 15:40:43 -04:00
2009-07-12 19:08:32 -04:00
# check tk_shlib_search_path
2011-05-26 19:36:33 -04:00
TkLib_Config [ " checked_shlib_dirs " ] =
check_shlib_search_path ( with_config ( 'tk-shlib-search-path' ) )
2005-01-25 09:31:45 -05:00
2009-07-12 19:08:32 -04:00
# set TCL_DEFS and TK_DEFS
2011-06-01 11:46:31 -04:00
$CPPFLAGS || = " "
2009-07-12 19:08:32 -04:00
# $CPPFLAGS += " #{TclConfig_Info['TCL_DEFS']}"
# $CPPFLAGS += " #{TkConfig_Info['TK_DEFS']}"
2011-06-07 00:37:08 -04:00
$defs += collect_tcltk_defs ( TclConfig_Info [ 'TCL_DEFS' ] , TkConfig_Info [ 'TK_DEFS' ] )
2009-07-12 19:08:32 -04:00
# MacOS X Frameworks?
if TkLib_Config [ " tcltk-framework " ]
puts ( " Use MacOS X Frameworks. " )
2014-01-09 10:47:54 -05:00
( $LDFLAGS || = " " ) << " " << libpathflag ( [ TkLib_Config [ " tcl-build-dir " ] ] ) if TkLib_Config [ " tcl-build-dir " ]
2011-05-26 19:36:33 -04:00
2012-05-16 21:37:08 -04:00
libs = ''
2010-05-31 10:50:39 -04:00
if tcl_cfg_dir
2011-06-12 03:22:41 -04:00
TclConfig_Info [ 'TCL_LIBS' ] || = " "
2011-06-01 11:46:31 -04:00
( $INCFLAGS || = " " ) << ' ' << TclConfig_Info [ 'TCL_INCLUDE_SPEC' ]
2012-05-16 21:37:08 -04:00
libs << ' ' << TclConfig_Info [ 'TCL_LIBS' ]
2010-05-31 10:50:39 -04:00
if stubs
2011-05-23 18:37:44 -04:00
if TkLib_Config [ " tcl-build-dir " ] &&
TclConfig_Info [ 'TCL_BUILD_STUB_LIB_SPEC' ] &&
! TclConfig_Info [ 'TCL_BUILD_STUB_LIB_SPEC' ] . strip . empty?
2012-05-16 21:37:08 -04:00
libs << ' ' << TclConfig_Info [ 'TCL_BUILD_STUB_LIB_SPEC' ]
2011-05-23 18:37:44 -04:00
else
2012-05-16 21:37:08 -04:00
libs << ' ' << TclConfig_Info [ 'TCL_STUB_LIB_SPEC' ]
2011-05-23 18:37:44 -04:00
end
2010-05-31 10:50:39 -04:00
else
2011-05-23 18:37:44 -04:00
if TkLib_Config [ " tcl-build-dir " ] &&
TclConfig_Info [ 'TCL_BUILD_LIB_SPEC' ] &&
! TclConfig_Info [ 'TCL_BUILD_LIB_SPEC' ] . strip . empty?
2012-05-16 21:37:08 -04:00
libs << ' ' << TclConfig_Info [ 'TCL_BUILD_LIB_SPEC' ]
2011-05-23 18:37:44 -04:00
else
2012-05-16 21:37:08 -04:00
libs << ' ' << TclConfig_Info [ 'TCL_LIB_SPEC' ]
2011-05-23 18:37:44 -04:00
end
2010-05-31 10:50:39 -04:00
end
end
2011-05-23 18:37:44 -04:00
2014-01-09 10:47:54 -05:00
libs << " " << libpathflag ( [ TkLib_Config [ " tk-build-dir " ] ] ) if TkLib_Config [ " tk-build-dir " ]
2011-05-26 19:36:33 -04:00
2010-05-31 10:50:39 -04:00
if tk_cfg_dir
2011-06-12 03:22:41 -04:00
TkConfig_Info [ 'TK_LIBS' ] || = " "
2011-06-01 11:46:31 -04:00
( $INCFLAGS || = " " ) << ' ' << TkConfig_Info [ 'TK_INCLUDE_SPEC' ]
2012-05-16 21:37:08 -04:00
libs << ' ' << TkConfig_Info [ 'TK_LIBS' ]
2010-05-31 10:50:39 -04:00
if stubs
2011-05-23 18:37:44 -04:00
if TkLib_Config [ " tk-build-dir " ] &&
TclConfig_Info [ 'TK_BUILD_STUB_LIB_SPEC' ] &&
! TclConfig_Info [ 'TK_BUILD_STUB_LIB_SPEC' ] . strip . empty?
2012-05-16 21:37:08 -04:00
libs << ' ' << TkConfig_Info [ 'TK_BUILD_STUB_LIB_SPEC' ]
2011-05-23 18:37:44 -04:00
else
2012-05-16 21:37:08 -04:00
libs << ' ' << TkConfig_Info [ 'TK_STUB_LIB_SPEC' ]
2011-05-23 18:37:44 -04:00
end
2010-05-31 10:50:39 -04:00
else
2011-05-23 18:37:44 -04:00
if TkLib_Config [ " tk-build-dir " ] &&
TclConfig_Info [ 'TK_BUILD_LIB_SPEC' ] &&
! TclConfig_Info [ 'TK_BUILD_LIB_SPEC' ] . strip . empty?
2012-05-16 21:37:08 -04:00
libs << ' ' << TkConfig_Info [ 'TK_BUILD_LIB_SPEC' ]
2011-05-23 18:37:44 -04:00
else
2012-05-16 21:37:08 -04:00
libs << ' ' << TkConfig_Info [ 'TK_LIB_SPEC' ]
2011-05-23 18:37:44 -04:00
end
2010-05-31 10:50:39 -04:00
end
end
2012-09-06 12:21:57 -04:00
$LDFLAGS << ' ' << libs
2010-05-31 10:50:39 -04:00
setup_for_macosx_framework ( tclver , tkver ) if tcl_cfg_dir && tk_cfg_dir
2009-07-12 19:08:32 -04:00
end
2009-07-27 15:40:43 -04:00
# name of Tcl/Tk libraries
2009-07-12 19:08:32 -04:00
tklib = with_config ( " tklib " )
tcllib = with_config ( " tcllib " )
2009-07-27 15:40:43 -04:00
# search X libraries
use_X = search_X_libraries
2009-07-12 19:08:32 -04:00
#---------------------------------------------------
if ( TkLib_Config [ " tcltk-framework " ] ||
( find_tcltk_header ( tclver , tkver ) &&
2011-05-15 07:55:52 -04:00
find_tcltk_library ( tcllib , tklib , stubs , tclver , tkver ,
2009-07-27 15:40:43 -04:00
tcl_ldir_list , tk_ldir_list ) ) ) &&
2009-07-12 19:08:32 -04:00
( stubs || pthread_check ( ) )
# create Makefile
# for SUPPORT_STATUS
$INSTALLFILES || = [ ]
$INSTALLFILES << [ " lib/tkextlib/SUPPORT_STATUS " , " $(RUBYLIBDIR) " , " lib " ]
# create
2011-06-07 00:37:08 -04:00
$defs << %[ -DRUBY_VERSION= \\ " #{ RUBY_VERSION } \\ " ]
$defs << %[ -DRUBY_RELEASE_DATE= \\ " #{ RUBY_RELEASE_DATE } \\ " ]
2009-07-12 19:08:32 -04:00
2011-06-29 10:11:19 -04:00
# remove harmful definitions.
$defs . delete_if { | x | / ^ - Du ? intptr_t = / =~ x}
2009-07-12 19:08:32 -04:00
create_makefile ( " tcltklib " )
2011-05-26 19:36:33 -04:00
puts " \n Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk. "
2009-07-12 19:08:32 -04:00
else
2011-05-26 19:36:33 -04:00
puts " \n Can't find proper Tcl/Tk libraries. So, can't make tcltklib.so which is required by Ruby/Tk. "
2013-07-19 00:43:16 -04:00
puts " If you have Tcl/Tk libraries on your environment, you may be able to use them with configure options (see ext/tk/README.tcltklib). "
puts " At present, Tcl/Tk8.6 is not supported. Although you can try to use Tcl/Tk8.6 with configure options, it will not work correctly. I recommend you to use Tcl/Tk8.5 or 8.4. "
2005-01-25 09:31:45 -05:00
end