Forum: Ruby Problem using 'AllInOneRuby' with Tk-Program (Windows 2000 a

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A131b672fdbd2a58dce12031ad78b121?d=identicon&s=25 Wolfgang Nádasi-Donner (wonado)
on 2007-01-22 20:17
(Received via mailing list)
Hi!

We found a problem using 'AllInOneRuby' with Tk-Program on Windows 2000
and XP.

'Tcl/Tk' does work, a generated 'allinoneruby.exe' works well with a
console
program, but gives an error using a small Tk example.

 >>>>> Code >>>>>

require 'tk'
root = TkRoot.new{title "My Hello"}
TkLabel.new(root) do
   text 'Hier kommt Otto!'
   pack{padx 15; pady 15; side 'left'}
end
Tk.mainloop

 >>>>> Console Protocol >>>>>

E:\AllInOneRuby>allinoneruby tktest.rb
C:/DOKUME~1/wolfgang/LOKALE~1/Temp/eee.allinoneruby.exe.3/lib/lib4/tk.rb:1102:in
`initiali
ze': Can't find a usable init.tcl in the following directories:
(RuntimeError)
     C:/DOKUME~1/wolfgang/LOKALE~1/Temp/eee.allinoneruby.exe.3/lib/tcl8.4
C:/DOKUME~1/wolfg
ang/LOKALE~1/Temp/eee.allinoneruby.exe.3/lib/tcl8.4
C:/DOKUME~1/wolfgang/LOKALE~1/Temp/lib
/tcl8.4
C:/DOKUME~1/wolfgang/LOKALE~1/Temp/eee.allinoneruby.exe.3/library
C:/DOKUME~1/wolf
gang/LOKALE~1/Temp/library
C:/DOKUME~1/wolfgang/LOKALE~1/Temp/tcl8.4.13/library
C:/DOKUME~
1/wolfgang/LOKALE~1/tcl8.4.13/library



This probably means that Tcl wasn't installed prop      from
C:/DOKUME~1/wolfgang/LOKALE~1
/Temp/eee.allinoneruby.exe.3/lib/lib4/tk.rb:1102:in `new'
         from
C:/DOKUME~1/wolfgang/LOKALE~1/Temp/eee.allinoneruby.exe.3/lib/lib4/tk.rb:1102

         from E:/AllInOneRuby/tktest.rb:1:in `require'
         from E:/AllInOneRuby/tktest.rb:1
         from
C:\DOKUME~1\wolfgang\LOKALE~1\Temp\eee.allinoneruby.exe.3\bootstrap.rb:50:in
`load'
         from
C:\DOKUME~1\wolfgang\LOKALE~1\Temp\eee.allinoneruby.exe.3\bootstrap.rb:50

 >>>>> End of Console Protocol >>>>>

On my Windows 2000 installation the error is the same when
'allinoneruby.exe'was
generated with '--site'. An other person has a different error message
when
using '--site' with the contents, that 'GetModuleHandleExA' is not found
in
'Kernel32.dll'

The programs work well when together with 'RubyScript2Exe', but on my
environment (Windows 2000) it is always necessary to use
'--rubyscript2exe-tk'
otherwise the same error will occur.

What happens there?

Wolfgang Nádasi-Donner (WoNáDo)
6b0967f63d03e99b6c07a3f5ed224c77?d=identicon&s=25 Erik Veenstra (Guest)
on 2007-01-22 22:50
(Received via mailing list)
> the contents, that 'GetModuleHandleExA' is not found in
> 'Kernel32.dll'
>
> The programs work well when together with 'RubyScript2Exe',
> but on my environment (Windows 2000) it is always necessary
> to use '--rubyscript2exe-tk' otherwise the same error will
> occur.
>
> What happens there?

Plain RubyScript2Exe is only able to detect and embed the
Ruby-TK bindings, not TK itself. By using the
--rubyscript2exe-tk option, it's forced to include TK itself as
well. AllInOneRuby has no --tk option. Therefore, the resulting
executable still depends on a manually installed version of TK.

In this case, --site is not relevant.

I'll consider including a --tk option in AllInOneRuby. It's
probably just copy & paste from RubyScript2Exe... ;]

gegroet,
Erik V. - http://www.erikveen.dds.nl/
A131b672fdbd2a58dce12031ad78b121?d=identicon&s=25 Wolfgang Nádasi-Donner (wonado)
on 2007-01-22 23:48
(Received via mailing list)
Erik Veenstra schrieb:
> I'll consider including a --tk option in AllInOneRuby. It's
> probably just copy & paste from RubyScript2Exe... ;]

Thank you - I will copy this message to the german Ruby-Forum, where the
problem
occured.

Wolfgang Nádasi-Donner
This topic is locked and can not be replied to.