Windows packaging advice

First I want to thank everyone for doing such a good
job with ruby-gnome2. It seems that lately development
has accelerated :slight_smile: Thanks especially to Kou for
reducing the size of the Windows install.

This brings me to my question. I want to release
my app for Windows. It was difficult in the past, but
I think now it has become easier because we can install
ruby-gnome2 with gems. But even still, I think that
most people on Windows will not want to use the
command line to install an application. In other words,
typing ā€œgem install myApplicationā€ from the command
line is still too difficult for them. I have an idea for
building an installer for ruby-gnome applications and
I want some advice.

My idea is to write an install script using
NSIS: NSIS Wiki

It should check to see if Ruby is installed.
If it is not, then it installs ruby. After that it runs
a script that simply installs the ruby-gnome2 gems
and your application gem. Finally, it will wrap
the gem executable script as a windows executable
with an icon. It will also make an uninstall
script and an upgrade script. The upgrade script
will simply run ā€œgem upgradeā€ on the relevant
gems, so if your application is in the gem repository
it will upgrade automatically.

To be honest, I hate working with Windows and I
would rather not do this, so first I want to know if
anyone has a better idea :slight_smile: Also, the gem commands
donā€™t really have any feedback for the user, so
Iā€™m worried that since it can take a long time, the
user will give up. Are there any ideas on how to
give feedback to the user?

Any ideas are very welcome (especially if they are
of the form ā€œDonā€™t do this. Thereā€™s an easier way!ā€
:slight_smile:

         MikeC

On 9 March 2011 10:59, hendra kusuma [email protected] wrote:

another stupid ideas is to include ruby installation complete with all gems
and your application from your windows system, into your nsis installer
but then you will need to add ruby path into windows system path in your
nsis script (this I never found out how)

I thought about this too. It has some advantages because everything
works from one installer. But I am worried about having multiple
versions
of ruby on the system. The problem is that Windows packaging is
so broken that it is difficult to decide what do do, isnā€™t it :wink:

I will think about it some more.

     MikeC

On Wed, Mar 9, 2011 at 10:25 AM, Mike C. [email protected]
wrote:

so broken that it is difficult to decide what do do, isnā€™t it :wink:

I will think about it some more.

Exactly
perhaps if you are really good with nsis script something like this can
be
done

  1. if there is no ruby then install ruby
  2. if there is ruby but not required gem, install the gem
  3. install the program

but of couse I prefer all that is done offline, without internet
connection
so that means the nsis installer contain the ruby and required gem along
with the program

of course it will make installer become big

another idea is to seperate ruby and the program+gem
make it looks like .net framework or java

so basically
1st installer is ruby installer
2nd installer will check if ruby exist, if not it asked user to install
ruby
(just like they do with both example)
then install required gem and program (of course I still prefer offline
here)

What do you think?

On Tue, Mar 8, 2011 at 12:27 PM, Mike C. [email protected]
wrote:

command line to install an application. In other words,
a script that simply installs the ruby-gnome2 gems
anyone has a better idea :slight_smile: Also, the gem commands

another stupid ideas is to include ruby installation complete with all
gems
and your application from your windows system, into your nsis installer
but then you will need to add ruby path into windows system path in your
nsis script (this I never found out how)

so basically
1st installer is ruby installer

Do you have take a look at http://rubyforge.org/projects/rubyinstaller/
?

2nd installer will check if ruby exist, if not it asked user to install ruby
(just like they do with both example)
then install required gem and program (of course I still prefer offline
here)

ā€“
Vincent C.

On Thu, Mar 10, 2011 at 12:04 AM, Vincent C.
[email protected]wrote:

Yes, I use that to install ruby on my windows system
I believe thatā€™s suitable to be used in ā€˜please install rubyā€™ messege :slight_smile:
main problem is packaging our application, right?

back then I can use my stupid idea because I believe no user has ruby
yet
but if this installer (that check if ruby exist like java or .net) exist
and more of us making end-user application with ruby, that is far from
ideal
way

but really, I cannot depend on internet yet
because generally internet in my country sucks ( I got 2 mb/s for 20
users
and it is considered very fast)

so eventhough it a pain in the nect to download every gems I need,
offline installation is trully sparkling here :smiley:

Any progress you did so far here?

Marc H. wrote in post #1017647:

Any progress you did so far here?

As an aside Iā€™ve had limited play with an app called rubyencoder.

I was using fxruby and foxGuib.

Now what ruby encoder does is to collect everything your app uses plus
required ruby runtime library and bundles it all up into a single app.

Well Iā€™m sure it did that (maybe it was erb that did the collection) and
ruby encoder created the exe.

anyhow go and have a look at Ruby Encoder Iā€™m sure itā€™s improved lots as
it was 1.0 when i looked at it.

HTH

Dave