[Rubyinstaller-devel] Ruby Installer is Ready for Enhancements & Bug Fixes

Curt Hibbs curt at curthibbs.us
Sun Mar 28 01:58:00 EST 2004


I just checked in my last set of changes for getting the ruby installer to
work with the latest NSIS release (2.0 final). The README is now very
complete and detailed, so it should be easy to setup your own ruby-installer
development-environment.

If you want to try out my last build of the ruby installer, you can download
it here:

   http://curthibbs.us/ruby181-12.exe

Previously, the makefiles required that NSIS be installed in the ruby
installer's "bin" directory (the path to the NSIS compiler was hard-coded in
the makefile). This didn't work for me because I use NSIS for other
projects, too. The makefiles I checked in just invokes the NSIS compiler by
name. This means that you can install it anywhere, but you have to add it to
your path (this is in the README).

Andy, the Modern UI theme of NSIS has changed substantially since the
version you last used. You had some customizations of the NSIS installer
(mostly custom bitmap images) that I haven't yet been able to figure out how
to specify in the new NSIS world. After spending a couple evenings trying to
get then to work, I decided to shelve it for the time being. So, you will
notice that your custom images are current not there.

As I said before, VC++ 7.1 (from Visual Studio .NET 2003). It would be nice
to find out if this can be successfully build using VC++ 6 SP5, for those of
you who have that installed.

Finally, for you convenience, I've pasted the new README below.

We should now be ready to move forward with enhancements and bug fixes.

Curt

PS
   One last sanity check that I'm going to perform is to delete my entire
ruby installer directory tree, retrieve a fresh copy from cvs, and then do a
complete build. I should work, but if I run into any problems, you'll be the
first to know...  :-)


<< ====== README ======= >>


Building the Ruby Installer for Windows
=======================================

Building the Ruby Installer is a two step process:

1. Download and compile Ruby and the extension packages.
2. Package the results of step 1 into a self-contained
   Windows installer.

You can use makefiles to run each step independently, or
use the makefile run automatically runs both steps.

Step 1 can build the last stable release of Ruby or a
development version.

*** Note from Curt: below I have documented the makefile
*** target for building a development version of Ruby, but
*** it may or may not work, as I have not yet run, tested,
*** or debugged it. Up to this point I have been concentrating
*** on the stable release. (3-27-2004)

Table of Contents
=================

  * Prerequisites
  * Step 1: Download and Compile
  * Step 2: Create the self-contained installer EXE
    - Step 2 in Windows Explorer
    - Step 2 in a Command Window
  * Steps 1 & 2, Together -- or "Cleaning"
    - Clean
    - Steps 1 and 2 Together


Prerequisites
=============

Before you can build the Ruby Installer, you must install software
and configure your system as follows:

* Ruby 1.8.0 or greater

* Microsoft Visual C++

  I am using VC++ 7.1 (comes with Visual Studio .NET 2003),
  but VC++ 6.0 SP5 should also work.

* Oracle 8 Client for Windows
  (http://otn.oracle.com/software/products/oracle8i/htdocs/winsoft.html)

  This is a free download, but you have to register before you can
  download it. After you have installed the Oracle client you must
  add to your lib and include paths as follows:

  - Add "...\oci\include" to the include path.
  - Add "...\oci\lib\msvc" to the lib path.

* Info UnZip
  (http://www.info-zip.org/pub/infozip/UnZip.html)

  - download the file: unz550xN.exe (self-extracting archive)
  - Exexcute it to unzip to the directory of your choice.
  - Make sure that directory is on your path.

* GNUWin32
  (http://sourceforge.net/projects/gnuwin32/)

  - Download and install: "tar" and "gzip"
  - Add "...\GnuWin32\bin" to your path

* NSIS 2.0 final
  (http://nsis.sourceforge.net/home/)

  - Add the base install directory (the one that contains
    makensis.exe) to your path.


Step 1: Download and Compile
============================

* Open a command window and navigate to:
  ...\installer\builder

* Be sure you have your environment variables set for VC++
  (for VC++ 7, run "vsvars32.bat")
  (for VC++ 6, run "vcvars32.bat")

* run "nmake" (no parameters)

  NOTE: You can specify a paameter of "stable" (the default)
        or "dvl" to specify a stable or development build of
        Ruby.

  NOTE: When Expat is installed, it will popup a Windows
        installer dialog. Unfortunately, there is no way
        to avoid this. Just accept all of the defaults and
        let the build continue.

That's it!

Your system should download all needed packages to:
   ...\installer\stable\download

And build the system to the base directory:

   ...\installer\stable


Step 2: Create the self-contained installer EXE
===============================================

Step 2 can be done in windows explorer or in a
command window.

Step 2 in Windows Explorer:
---------------------------

* Open Windows Explorer and navigate to:
  ...\installer\stable

* Right click on "Ruby.nsi" and choose the menu command:
  "Compile NSIS Script"

That's it!

Step 2 in a Command Window:
---------------------------

* Open a command window and navigate to:
  ...\installer\stable

* Be sure you have your environment variables set for VC++
  (for VC++ 7, run "vsvars32.bat")
  (for VC++ 6, run "vcvars32.bat")

* run "nmake" (no parameters)

That's it!


Steps 1 & 2, Together -- or "Cleaning"
======================================

In the base ruby-installer directory is a makefile that can
be used to cleanup (delete) all of files created from a previous
build (this allows you to start a new build from a completely
clean state), or to run both steps 1 and 2 of the build process.

NOTE: You may not always want to run both steps together. When you
      are debugging changes you have made to step one, you often do
      not want to run step2 two, and vice versa. Limiting yourself
      to one of the two steps can shorten your edit-compile-debug
      cycle time.

Clean:
------

To cleanup (delete)the output file from a previous build,
do this:

* Open a command window and navigate to:
  ...\installer

* Be sure you have your environment variables set for VC++
  (for VC++ 7, run "vsvars32.bat")
  (for VC++ 6, run "vcvars32.bat")

* run "nmake clean"

That's it!

Steps 1 and 2 Together:
----------------------

To run both steps 1 and 2 with a single command, do this:

* Open a command window and navigate to:
  ...\installer

* Be sure you have your environment variables set for VC++
  (for VC++ 7, run "vsvars32.bat")
  (for VC++ 6, run "vcvars32.bat")

* run "nmake" (no parameters)

That's it!



More information about the Rubyinstaller-devel mailing list