Problem using 'AllInOneRuby' with Tk-Program (Windows 2000 and XP)

  • Thread starter Wolfgang Nádasi-Donner
  • Start date
W

Wolfgang Nádasi-Donner

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.

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

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

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)
 
E

Erik Veenstra

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.

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?

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/
 
W

Wolfgang Nádasi-Donner

Erik said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top