librelist archives

« back to archive

Packaging applications

Packaging applications

From:
spiralofhope
Date:
2011-02-24 @ 08:56
Earlier on this list I read that there was no solution to package a
shoes application in a simple redistributable form.  Is this still the
case?  If so, is there a roadmap with this sort of feature on it?[1]

Has anyone had experience packaging Shoes and Ruby together with an
existing solution like OCRA[2] or Crate[3]?  (RubyScript2Exe is
abandoned[4])  Are there other solutions?

If an application were developed in Shoes, how would it be distributed
to non-technical users?  So on Windows, would it work something like
this? :

- install Ruby (with rubygems) - the one-click installer probably
- install Shoes - the .exe
- use gems to install the application - not even sure how that can be
  done in a simple way.  I'm used to using gem at the commandline but
  some sort of batch file or gui method would need to be found/made.

===

[1] I'd expect something on https://github.com/shoes/shoes/issues/
or https://github.com/shoes/shoes/wiki/Shoes-roadmap
(btw, Shoes builds fine on 1.9.2)
maybe even https://github.com/shoes/shoes/wiki/The-Future-of-Shoes

[2] http://rubyforge.org/projects/ocra/

[3] http://copiousfreetime.rubyforge.org/crate/

[4] http://www.erikveen.dds.nl/rubyscript2exe/index.html
Not updated since 2007.  Another maintainer is here:
http://github.com/ryanbooker/rubyscript2exe
Not updated since 2009.  I do believe Ruby 1.8.6+ has critical issues.

Re: [shoes] Packaging applications

From:
Steve Klabnik
Date:
2011-02-24 @ 14:26
>
> Earlier on this list I read that there was no solution to package a
> shoes application in a simple redistributable form.  Is this still the
> case?  If so, is there a roadmap with this sort of feature on it?[1]
>

The problem is that the term 'packaging' is confused.

If you'd like to compile your own application yourself, it'll totally work.
No problems there. This is how I distribute Hackety.

If you'd like to let people package stuff through a binary shoes, ie, I have
a copy of shoes, i write a script, I choose 'package' from a menu, then
_that_ is what's broken.

Fixing this is absolutely on the roadmap. I even want to pull it out of
Shoes, to be used by other applications, like Crate. I've been doing a bunch
of research in this area, but there are a bunch of things that need fixed
first.


> Has anyone had experience packaging Shoes and Ruby together with an
> existing solution like OCRA[2] or Crate[3]?  (RubyScript2Exe is
> abandoned[4])  Are there other solutions?
>

I don't know a ton about OCRA, but I emailed the guy who made Crate once and
he said it's basically dead. I looked into ocra before.... the problem is
that this takes care of the case that works, not the case that doesn't.

There is also exerb, which luis recommended to me:
http://exerb.sourceforge.jp/index.en.html

MacRuby does something like Shoes does, but is a lot cleaner. We could
theoretically ape their process to take care of case 1, but not case 2.

If an application were developed in Shoes, how would it be distributed
> to non-technical users?  So on Windows, would it work something like
> this? :
>

http://hackety-hack.com/ for an example. ;)


> - install Ruby (with rubygems) - the one-click installer probably
> - install Shoes - the .exe
> - use gems to install the application - not even sure how that can be
>  done in a simple way.  I'm used to using gem at the commandline but
>  some sort of batch file or gui method would need to be found/made.
>

Oh, or that. If you wanted them to do Shoes and whatever separately, that'd
work too. Here's what you'd do:

- Install Shoes (no Ruby needed)
- Download your .shy.
- They'd pick 'open an app' from the shoes menu, and select your .shy
- It'd all work. Shoes will install the gems if it doesn't have them.

Re: [shoes] Packaging applications

From:
Cecil Coupe
Date:
2011-02-24 @ 09:59
It's a bit more confused than that. 

In the case of Windows users/downloaders, there are two options for the
developer - package the script with Ruby (7+MB) or package the script to
download Shoes if needed which is much smaller for the script
developer. 

The 'install if needed' for Windows only works if the shoes
developer/script-writer creates that download file on Windows with MingW
installed. However, Linux (and probably OSX) developers can create a
"include Shoes" Windows exe of their script.  It's rumored that neither
if-needed/included choice will work for OSX downloaders (or Win/Linux
attempts to create either (last I looked), For Linux downloader, you can
package a .run (include Shoes) It might work for Ubuntu 32bit. Download
if needed worked once but with all the Win/OSX errors to fix first...

If OCRA or Crate require binary gems to be compiled on the downloaders
system, it is most likely going to fail. Shoes does not include a C
compiler and it manages gems locally and funkily - if you can get them
built cross platform, which you probably can't.

Contact me off list if you have one particular script/gem-set in mind
and are willing to dive deep.

Regards,
Cecil


On Thu, 2011-02-24 at 00:56 -0800, spiralofhope wrote:
> Earlier on this list I read that there was no solution to package a
> shoes application in a simple redistributable form.  Is this still the
> case?  If so, is there a roadmap with this sort of feature on it?[1]
> 
> Has anyone had experience packaging Shoes and Ruby together with an
> existing solution like OCRA[2] or Crate[3]?  (RubyScript2Exe is
> abandoned[4])  Are there other solutions?
> 
> If an application were developed in Shoes, how would it be distributed
> to non-technical users?  So on Windows, would it work something like
> this? :
> 
> - install Ruby (with rubygems) - the one-click installer probably
> - install Shoes - the .exe
> - use gems to install the application - not even sure how that can be
>   done in a simple way.  I'm used to using gem at the commandline but
>   some sort of batch file or gui method would need to be found/made.
> 
> ===
> 
> [1] I'd expect something on https://github.com/shoes/shoes/issues/
> or https://github.com/shoes/shoes/wiki/Shoes-roadmap
> (btw, Shoes builds fine on 1.9.2)
> maybe even https://github.com/shoes/shoes/wiki/The-Future-of-Shoes
> 
> [2] http://rubyforge.org/projects/ocra/
> 
> [3] http://copiousfreetime.rubyforge.org/crate/
> 
> [4] http://www.erikveen.dds.nl/rubyscript2exe/index.html
> Not updated since 2007.  Another maintainer is here:
> http://github.com/ryanbooker/rubyscript2exe
> Not updated since 2009.  I do believe Ruby 1.8.6+ has critical issues.
> 

Re: [shoes] Packaging applications

From:
spiralofhope
Date:
2011-02-25 @ 00:39
On Thu, 24 Feb 2011 02:59:26 -0700
Cecil Coupe <ccoupe@cableone.net> wrote:

> In the case of Windows users/downloaders, there are two options for
> the developer - package the script with Ruby (7+MB) or package the
> script to download Shoes if needed which is much smaller for the
> script developer. 

I'd prefer to have everything packaged together.


> Contact me off list if you have one particular script/gem-set in mind
> and are willing to dive deep.

Not a chance.  =)  The whole idea is to keep things very simple for a
straightforward learning experience.

The reason I brought this topic up was my mentee/paired programming
partner likes to think about the "end game", and distribution was his
first concern.

(In fact, his mindset has completely obliterated every tutorial I've
ever looked at.. they all turn out to be written from a staggeringly
impractical perspective.)


On Thu, 24 Feb 2011 09:26:58 -0500
Steve Klabnik <steve@steveklabnik.com> wrote:

> The problem is that the term 'packaging' is confused.
> 
> If you'd like to compile your own application yourself, it'll totally
> work. No problems there. This is how I distribute Hackety.

It's good to hear that what I'm looking for is indeed possible.

Are there simple instructions which go over this?

There's a "Hello, World!"-type example which is given[1]

Shoes.app :width => 300, :height => 200 do
  button("Click me!") { alert("Good job.") }
end

But my desire is to compile one executable for Windows, and another
executable for a Linux distro which doesn't have Ruby.  (maybe also
instructions for 32 vs 64-bit if necessary)


> There is also exerb[2]...

I'll definitely check that out, thanks.




[1] http://shoesrb.com/

[2] http://exerb.sourceforge.jp/index.en.html


-- 
http://spiralofhope.com

Re: [shoes] Packaging applications

From:
Steve Klabnik
Date:
2011-02-25 @ 04:28
>
> Are there simple instructions which go over this?
>

Nope. It's on my list. The biggest thing that's needed is app.yml:
https://github.com/hacketyhack/hacketyhack/blob/master/app.yaml

But I don't know everything that can or should go in it, or what's required.

shoes -p is still using the other kind of packager.

Re: [shoes] Packaging applications

From:
Cecil Coupe
Date:
2011-02-25 @ 02:28
From a Linux console, start shoes with the -p option to get the packager
GUI. Pick your file to bundle up. Select the "include Shoes without
video" and create your windows exe. (it downloads from the net so be
patient). 

Creating a linux executable is difficult. The one that is there works on
32 bit Ubuntu 10.10 (or .04?)

On Thu, 2011-02-24 at 16:39 -0800, spiralofhope wrote:
> On Thu, 24 Feb 2011 02:59:26 -0700
> Cecil Coupe <ccoupe@cableone.net> wrote:
> 
> > In the case of Windows users/downloaders, there are two options for
> > the developer - package the script with Ruby (7+MB) or package the
> > script to download Shoes if needed which is much smaller for the
> > script developer. 
> 
> I'd prefer to have everything packaged together.
> 
> 
> > Contact me off list if you have one particular script/gem-set in mind
> > and are willing to dive deep.
> 
> Not a chance.  =)  The whole idea is to keep things very simple for a
> straightforward learning experience.
> 
> The reason I brought this topic up was my mentee/paired programming
> partner likes to think about the "end game", and distribution was his
> first concern.
> 
> (In fact, his mindset has completely obliterated every tutorial I've
> ever looked at.. they all turn out to be written from a staggeringly
> impractical perspective.)
> 
> 
> On Thu, 24 Feb 2011 09:26:58 -0500
> Steve Klabnik <steve@steveklabnik.com> wrote:
> 
> > The problem is that the term 'packaging' is confused.
> > 
> > If you'd like to compile your own application yourself, it'll totally
> > work. No problems there. This is how I distribute Hackety.
> 
> It's good to hear that what I'm looking for is indeed possible.
> 
> Are there simple instructions which go over this?
> 
> There's a "Hello, World!"-type example which is given[1]
> 
> Shoes.app :width => 300, :height => 200 do
>   button("Click me!") { alert("Good job.") }
> end
> 
> But my desire is to compile one executable for Windows, and another
> executable for a Linux distro which doesn't have Ruby.  (maybe also
> instructions for 32 vs 64-bit if necessary)
> 
> 
> > There is also exerb[2]...
> 
> I'll definitely check that out, thanks.
> 
> 
> 
> 
> [1] http://shoesrb.com/
> 
> [2] http://exerb.sourceforge.jp/index.en.html
> 
> 

Re: [shoes] Packaging applications

From:
spiralofhope
Date:
2011-02-25 @ 03:55
On Thu, 24 Feb 2011 19:28:55 -0700
Cecil Coupe <ccoupe@cableone.net> wrote:

> From a Linux console, start shoes with the -p option to get the
> packager GUI. Pick your file to bundle up. Select the "include Shoes
> without video" and create your windows exe. (it downloads from the
> net so be patient). 
> 
> Creating a linux executable is difficult. The one that is there works
> on 32 bit Ubuntu 10.10 (or .04?)

-p  Aha, that's how it's done.  Is this documented anywhere?  =)

I walked through the Linux compilation it worked as expected on Lubuntu
10.10 32bit.

Strangely, running the Linux .run downloaded Shoes.. and that method of
installation was vastly easier than the original stuff I did to build
from source. *boggles*




-- 
http://spiralofhope.com

Re: [shoes] Packaging applications

From:
Zachary Scott
Date:
2011-02-25 @ 04:05
It should be covered under -h if not

On Thu, Feb 24, 2011 at 10:55 PM, spiralofhope <spiralofhope@lavabit.com> wrote:
> On Thu, 24 Feb 2011 19:28:55 -0700
> Cecil Coupe <ccoupe@cableone.net> wrote:
>
>> From a Linux console, start shoes with the -p option to get the
>> packager GUI. Pick your file to bundle up. Select the "include Shoes
>> without video" and create your windows exe. (it downloads from the
>> net so be patient).
>>
>> Creating a linux executable is difficult. The one that is there works
>> on 32 bit Ubuntu 10.10 (or .04?)
>
> -p  Aha, that's how it's done.  Is this documented anywhere?  =)
>
> I walked through the Linux compilation it worked as expected on Lubuntu
> 10.10 32bit.
>
> Strangely, running the Linux .run downloaded Shoes.. and that method of
> installation was vastly easier than the original stuff I did to build
> from source. *boggles*
>
>
>
>
> --
> http://spiralofhope.com
>
>

Re: [shoes] Packaging applications

From:
Cecil Coupe
Date:
2011-02-25 @ 04:16
On Thu, 2011-02-24 at 19:55 -0800, spiralofhope wrote:
> On Thu, 24 Feb 2011 19:28:55 -0700

> -p  Aha, that's how it's done.  Is this documented anywhere?  =)

It is, somewhere in the wiki but not in the online manual as far as I
know. $shoes -h is your friend.
> 
> I walked through the Linux compilation it worked as expected on Lubuntu
> 10.10 32bit.
> 
> Strangely, running the Linux .run downloaded Shoes.. and that method of
> installation was vastly easier than the original stuff I did to build
> from source. *boggles*
> 
When it works, it's amazing to see ;^) Don't try it for creating OSX. 

You have two versions of Shoes - the one you compiled from source in
whatever directory you compiled it in and the one you downloaded (the
interesting bits are in ~/.shoes/). Neither are installed in the system
directories. Both contain Ruby and associated libraries. 

Building and distributing a 64 bit linux version is problematic.
Building and distributing binary gems is problematic.
> 
> 
> 

Re: [shoes] Packaging applications

From:
ashbb
Date:
2011-02-24 @ 15:01
Hi Spiralofhope,

Can you build Shoes for Windows on your pc?

If you can, why not to customize lib/shoes.rb to launch your application
instead of Shoes.splash.

Shoes.splash is a method just to launch a default Shoes.app which opens
`Welcome to SHOES` window.

ashbb