Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > How do I create an RBA Ruby Archive File?

Reply
Thread Tools

How do I create an RBA Ruby Archive File?

 
 
Jayson Williams
Guest
Posts: n/a
 
      09-18-2007
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

 
Reply With Quote
 
 
 
 
Joel VanderWerf
Guest
Posts: n/a
 
      09-18-2007
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

 
Reply With Quote
 
 
 
 
Jayson Williams
Guest
Posts: n/a
 
      09-18-2007
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 <(E-Mail Removed)> 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
>
>


 
Reply With Quote
 
Joel VanderWerf
Guest
Posts: n/a
 
      09-18-2007
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

 
Reply With Quote
 
David Mullet
Guest
Posts: n/a
 
      09-19-2007
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/rubyscrip...dex.html#3.3.1

David

http://rubyonwindows.blogspot.com

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

 
Reply With Quote
 
Jayson Williams
Guest
Posts: n/a
 
      09-19-2007
Very nice...
Thanks

On 9/18/07, David Mullet <(E-Mail Removed)> 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/rubyscrip...dex.html#3.3.1
>
> David
>
> http://rubyonwindows.blogspot.com
>
> --
> Posted via http://www.ruby-forum.com/.
>
>


 
Reply With Quote
 
Jayson Williams
Guest
Posts: n/a
 
      09-19-2007
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 <(E-Mail Removed)> wrote:
> Very nice...
> Thanks
>
> On 9/18/07, David Mullet <(E-Mail Removed)> 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/rubyscrip...dex.html#3.3.1
> >
> > David
> >
> > http://rubyonwindows.blogspot.com
> >
> > --
> > Posted via http://www.ruby-forum.com/.
> >
> >

>
>


 
Reply With Quote
 
Jano Svitok
Guest
Posts: n/a
 
      09-19-2007
On 9/19/07, Jayson Williams <(E-Mail Removed)> 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

 
Reply With Quote
 
Jayson Williams
Guest
Posts: n/a
 
      09-19-2007
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 <(E-Mail Removed)> wrote:
> On 9/19/07, Jayson Williams <(E-Mail Removed)> 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
>
>


 
Reply With Quote
 
David Mullet
Guest
Posts: n/a
 
      09-20-2007

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-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Archive::Zip - how to create huge zip files ? MoshiachNow Perl Misc 2 10-04-2006 09:09 PM
Package requests for the prelim. Ruby Production Archive Mauricio Fernández Ruby 22 10-07-2004 12:37 PM
[ANN] Preliminary Ruby Production Archive -- over 100 packages available Mauricio Fernández Ruby 1 08-06-2004 10:20 AM
online archive of the missing ruby-lang => clr posts David A. Black Ruby 0 06-03-2004 04:14 PM



Advertisments