[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How do I create an RBA Ruby Archive File?

Jayson Williams

9/18/2007 4:50:00 PM

I am using rubyscript2exe to wrap an application. The problem is that
the files that are external to the ruby script are not getting wrapped
into the exe file. I think I need to create a RBA file first and then
wrap it using rubyscript2exe. Any suggestions?

Thanks

11 Answers

Joel VanderWerf

9/18/2007 4:56:00 PM

0

Jayson Williams wrote:
> I am using rubyscript2exe to wrap an application. The problem is that
> the files that are external to the ruby script are not getting wrapped
> into the exe file. I think I need to create a RBA file first and then
> wrap it using rubyscript2exe. Any suggestions?

Are you certain that your program, when you run it with rubyscript2exe,
requires every library that it will eventually need?

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Jayson Williams

9/18/2007 5:33:00 PM

0

Actual my problem is a bit more simple. I replaced the default Tk icon
with one I created. But when I wrap the application into an exe, the
exe version is dependent on the external icon file. If I remove the
icon file, my exe application will no longer run. I want to be able to
wrap the icon file along with the rest of the application.


On 9/18/07, Joel VanderWerf <vjoel@path.berkeley.edu> wrote:
> Jayson Williams wrote:
> > I am using rubyscript2exe to wrap an application. The problem is that
> > the files that are external to the ruby script are not getting wrapped
> > into the exe file. I think I need to create a RBA file first and then
> > wrap it using rubyscript2exe. Any suggestions?
>
> Are you certain that your program, when you run it with rubyscript2exe,
> requires every library that it will eventually need?
>
> --
> vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
>
>

Joel VanderWerf

9/18/2007 5:54:00 PM

0

Jayson Williams wrote:
> Actual my problem is a bit more simple. I replaced the default Tk icon
> with one I created. But when I wrap the application into an exe, the
> exe version is dependent on the external icon file. If I remove the
> icon file, my exe application will no longer run. I want to be able to
> wrap the icon file along with the rest of the application.

Sorry, I assumed you were talking about .rb files.

IIRC, you can use tar2rubyscript (from the same source as
rubyscript2exe) to wrap up non-ruby files.

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

David Mullet

9/19/2007 12:54:00 AM

0

Jayson Williams wrote:

> I want to be able to wrap the icon file
> along with the rest of the application.

I use the following method...

RUBYSCRIPT2EXE.bin = ["my_logo.ico"]

...as outlined here...

http://www.erikveen.dds.nl/rubyscript2exe/index....

David

http://rubyonwindows.bl...

--
Posted via http://www.ruby-....

Jayson Williams

9/19/2007 1:44:00 AM

0

Very nice...
Thanks

On 9/18/07, David Mullet <david.mullet@gmail.com> wrote:
> Jayson Williams wrote:
>
> > I want to be able to wrap the icon file
> > along with the rest of the application.
>
> I use the following method...
>
> RUBYSCRIPT2EXE.bin = ["my_logo.ico"]
>
> ...as outlined here...
>
> http://www.erikveen.dds.nl/rubyscript2exe/index....
>
> David
>
> http://rubyonwindows.bl...
>
> --
> Posted via http://www.ruby-....
>
>

Jayson Williams

9/19/2007 1:55:00 PM

0

Hi David,
When i use this method
RUBYSCRIPT2EXE.bin = ["my_logo.ico"]

What do I use as a reference to the Icon.
root = TkRoot.new
root.iconbitmap= ?
...on a whim I tried
root.iconbitmap = RUBYSCRIPT2EXE.bin.last
which runs as a ruby script but not after I wrap it as an exe

Jayson

On 9/18/07, Jayson Williams <williams.jayson@gmail.com> wrote:
> Very nice...
> Thanks
>
> On 9/18/07, David Mullet <david.mullet@gmail.com> wrote:
> > Jayson Williams wrote:
> >
> > > I want to be able to wrap the icon file
> > > along with the rest of the application.
> >
> > I use the following method...
> >
> > RUBYSCRIPT2EXE.bin = ["my_logo.ico"]
> >
> > ...as outlined here...
> >
> > http://www.erikveen.dds.nl/rubyscript2exe/index....
> >
> > David
> >
> > http://rubyonwindows.bl...
> >
> > --
> > Posted via http://www.ruby-....
> >
> >
>
>

Jano Svitok

9/19/2007 2:17:00 PM

0

On 9/19/07, Jayson Williams <williams.jayson@gmail.com> wrote:
> Hi David,
> When i use this method
> RUBYSCRIPT2EXE.bin = ["my_logo.ico"]
>
> What do I use as a reference to the Icon.
> root = TkRoot.new
> root.iconbitmap= ?
> ...on a whim I tried
> root.iconbitmap = RUBYSCRIPT2EXE.bin.last
> which runs as a ruby script but not after I wrap it as an exe
>
> Jayson

Either use relative paths to your source file (i.e. to __FILE__) or
try stuff mentioned under g) in the erik's page.

Jano

Jayson Williams

9/19/2007 4:00:00 PM

0

I think I have figured out what the problem has been.

RUBYSCRIPT2EXE.bin=['my_icon.ico'] results in the file being placed in
the .../bin directory at execution time (makes sense).

The documentation says that RUBYSCRIPT2EXE.appdir points to the
.../bin directory.

require "rubyscript2exe"
RUBYSCRIPT2EXE.appdir ===> C:/bin
RUBYSCRIPT2EXE.appdir("README") ===> C:/bin/README
RUBYSCRIPT2EXE.appdir{Dir.pwd} ===> C:/bin

But as you might assume from the method name, RUBYSCRIPT2EXE.appdir
infact points to the .../app directory.

There is no method that I can see that references the bin directory,
but this is where all the bins and dlls go. Secondly, there is no
mehod for placing a file in the .../app folder, but this is the folder
that RUBYSCRIPT2EXE.appdir points to. The only solution I can come up
with is chopping off the app portion and adding bin

binDir = RUBYSCRIPT2EXE.appdir
3.times{binDir.chop!}
binDir += 'bin'

Am I overthinking this. Seems like there must be a better way
Jayson

On 9/19/07, Jano Svitok <jan.svitok@gmail.com> wrote:
> On 9/19/07, Jayson Williams <williams.jayson@gmail.com> wrote:
> > Hi David,
> > When i use this method
> > RUBYSCRIPT2EXE.bin = ["my_logo.ico"]
> >
> > What do I use as a reference to the Icon.
> > root = TkRoot.new
> > root.iconbitmap= ?
> > ...on a whim I tried
> > root.iconbitmap = RUBYSCRIPT2EXE.bin.last
> > which runs as a ruby script but not after I wrap it as an exe
> >
> > Jayson
>
> Either use relative paths to your source file (i.e. to __FILE__) or
> try stuff mentioned under g) in the erik's page.
>
> Jano
>
>

David Mullet

9/20/2007 2:36:00 AM

0


I work with wxRuby, not TK. In wxRuby, I set the icon with:

set_icon(Icon.new('my_icon.ico'))

No path, just the filename.

Then I include the line:

RUBYSCRIPT2EXE.bin=['my_icon.ico']

That always works for me.

David

--
Posted via http://www.ruby-....

Jayson Williams

9/20/2007 12:43:00 PM

0

Thats interesting. In Tk, I have to tell the main window where the
my_icon.ico will be at execution time. I would like to know if this is
the norm, or am I taking the long route? You mentioned earlier that
in rubyscript2exe, that wxruby was getting copied twice into the exe,
causing the larger exe file. Do you know of any workarounds?

On 9/19/07, David Mullet <david.mullet@gmail.com> wrote:
>
> I work with wxRuby, not TK. In wxRuby, I set the icon with:
>
> set_icon(Icon.new('my_icon.ico'))
>
> No path, just the filename.
>
> Then I include the line:
>
> RUBYSCRIPT2EXE.bin=['my_icon.ico']
>
> That always works for me.
>
> David
>
> --
> Posted via http://www.ruby-....
>
>