# Windows packaging advice

**URL:** <https://www.ruby-forum.com/t/windows-packaging-advice/204220>\
**Category:** Ruby-Gnome 2\
**Created:** [March 8, 2011, 5:27am UTC](https://www.ruby-forum.com/t/windows-packaging-advice/204220 "2011-03-08T05:27:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [March 8, 2011, 5:27am UTC](https://www.ruby-forum.com/t/windows-packaging-advice/204220/1 "2011-03-08T05:27:29Z")

</div>

First I want to thank everyone for doing such a good  
job with ruby-gnome2. It seems that lately development  
has accelerated 🙂 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](http://nsis.sourceforge.net/Main_Page)

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 🙂 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!”  
🙂

```
         MikeC

```

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [March 9, 2011, 3:25am UTC](https://www.ruby-forum.com/t/windows-packaging-advice/204220/2 "2011-03-09T03:25:48Z")

</div>

On 9 March 2011 10:59, hendra kusuma [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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 😉

I will think about it some more.

```
     MikeC

```

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [March 9, 2011, 11:47am UTC](https://www.ruby-forum.com/t/windows-packaging-advice/204220/3 "2011-03-09T11:47:12Z")

</div>

On Wed, Mar 9, 2011 at 10:25 AM, Mike C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> so broken that it is difficult to decide what do do, isn’t it 😉
> 
> 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?

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [March 9, 2011, 3:00am UTC](https://www.ruby-forum.com/t/windows-packaging-advice/204220/4 "2011-03-09T03:00:08Z")

</div>

On Tue, Mar 8, 2011 at 12:27 PM, Mike C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> command line to install an application. In other words,  
> a script that simply installs the ruby-gnome2 gems  
> anyone has a better idea 🙂 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)

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [March 9, 2011, 5:05pm UTC](https://www.ruby-forum.com/t/windows-packaging-advice/204220/5 "2011-03-09T17:05:23Z")

</div>

> so basically  
> 1st installer is ruby installer

Do you have take a look at [http://rubyforge.org/projects/rubyinstaller/](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.

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [March 10, 2011, 3:52am UTC](https://www.ruby-forum.com/t/windows-packaging-advice/204220/6 "2011-03-10T03:52:53Z")

</div>

On Thu, Mar 10, 2011 at 12:04 AM, Vincent C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)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 🙂  
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 😃

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [August 20, 2011, 5:14pm UTC](https://www.ruby-forum.com/t/windows-packaging-advice/204220/7 "2011-08-20T17:14:37Z")

</div>

Any progress you did so far here?

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [April 26, 2013, 10:30am UTC](https://www.ruby-forum.com/t/windows-packaging-advice/204220/8 "2013-04-26T10:30:01Z")

</div>

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
