Installing 4Suite on Windows

This version:
Revision 0.8 (2005-12-08)
Principal author:
Shatin Rai (Fourthought, Inc.)
Additional contributors:
Uche Ogbuji (Fourthought, Inc.)
Mike Brown (Fourthought, Inc.)

Legal Notice

This document can be freely translated and distributed. It's released under the LDP License.

Abstract

4Suite is a platform for XML and RDF application development. This document gives step-by step instructions for installing 4Suite on a Microsoft Windows system such as Windows XP. It does not cover Cygwin installation.


Table Of Contents

1 Introduction and conventions

2 Quick Installation Steps

3 CVS: bleeding-edge 4Suite

4 Detailed Installation Guide

4.1 Python

4.2 4Suite

4.2.1 4Suite installation using the installer .exe

4.3 Final Step

4.4 Tests and Further Setup

5 Resources

5.1 4Suite @ SourceForge

5.2 Additional Links

6 Appendix A: Notes on PyXML and 4Suite


1 Introduction and conventions

These instructions were originally written for Windows 98 release 2, and have been tested successfully on Windows 2000 and Windows XP. They should also work on Windows 95, Windows ME, and Windows NT with few, if any, modifications. The 4Suite developers no longer test 4Suite on any Windows platform other than Windows 2000 and Windows XP.

Cygwin is not Windows

These instructions are for installing 4Suite fully in Windows, as an application that uses modules from a native Windows build of Python. If you instead want to use 4Suite as a Cygwin application, you must refer to separate instructions for installing Python and 4Suite under Cygwin.

Some instructions require the user to modify their shell environment. On a Windows 98 or ME system, you will want to make these permanent by editing the autoexec.bat file. Possible things to add will be mentioned when appropriate.

Sometimes there will be a great deal of output from an instruction. If there is nothing of particular interest in the output, it will be omitted and replaced with the text "SNIP".

2 Quick Installation Steps

The Detailed Installation Guide sections that follow this section will further explain these steps.

  1. Install Python 2.2.1 or higher

    Although you can install versions of Python obtained from other places, the 4Suite installer for WIndows requires that you install the appropriate version of Python from the official distributions available at python.org. The self-installing .exe that you get from there will create the entries in the Windows Registry that are necessary for 4Suite's installer to work properly.

  2. Install 4Suite

    Download the latest 4Suite installer for Windows from ftp://ftp.4suite.org/pub/4Suite/. Note there are separate installers for use with each version of Python.

    Save the file somewhere on your hard drive, and run it. It works like almost any other application installer.

3 CVS: bleeding-edge 4Suite

If you need up-to-the-minute features or fixes for 4Suite, you can install the latest version from the developers' CVS repository. It should be considered an unstable work-in-progress preview of the next official release; it is not recommended for ordinary users.

As a further complication, in order to build the development version, you'll need an ANSI/ISO C compiler, such as Microsoft Visual C (the same version used to build Python's C libraries) or Cygwin's mingw32. Refer to separate instructions for how to configure the 4Suite build under compilers other than Microsoft Visual C.

  1. 4Suite CVS snapshots

    CVS snapshots are a way to get bug fixes and experimental new features between full releases of the software. They are tarballs and zipfiles generated from Fourthought's internal CVS repository nightly.

  2. 4Suite anonymous CVS

    If you want to keep closer track of the 4Suite development, you can use anonymous CVS (pserver). The main advantage of this approach is that you can get fixes quite easily when checked in by the developers, and keeping up-to-date afterward is easy. The main disadvantage is that you can also pick up bugs that the developers sometimes accidentally check in.

    For more information about 4Suite CVS, refer to the Obtaining 4Suite with CVS documentation.

4 Detailed Installation Guide

4.1 Python

4Suite is written mostly in Python: a mature, robust, efficient programming language well-suited to object-oriented programming, functional programming, and procedural tasks of any complexity. In the few cases where Python is not sufficiently speedy, certain 4Suite components are implemented in C. The C components are distributed for Windows as compiled DLLs, so you do not need to have a C compiler in order to install and use 4Suite. You do, however, need an appropriate version of Python on your system.

Specifically, Python 2.2.1 or higher is required for 4Suite. You can also have other versions of Python installed alongside the one you need for 4Suite, as long as when you use 4Suite's Python API, you be sure to load the modules with the interpreter that they were built for.

If you need to install Python, then download the appropriate Python installer .exe from python.org.

  1. Double click on the downloaded file. A confirmation screen will appear to make sure that you do want to install Python. Click "next".

  2. The next screen will be to pick the destination directory. Preferably, just use the default. You are free to install to any location you choose, but if you do install to a nonstandard location, keep in mind where it is, and adjust all paths in these instructions accordingly.

  3. The component selection screen is where you decide what pieces of Python to install. Preferably, just leave them all selected. You may, however, trim them as space requires; the only one that is absolutely necessary is "Python interpreter and library".

  4. Start Menu Group is where you name this installation in your start menu. Again, the default is preferable, but it really doesn't matter.

  5. Lastly, a confirmation window will appear. If all looks correct press the "next" button to begin the installation.

  6. If all goes well, you will get an "Installation Complete" screen. Click the finish button when you are done. Of course you will be prompted to reboot, but for now, press "Cancel"; you can reboot later.

  1. Now you need to make it so that you can run the Python interpreter and the 4Suite tools from the command line. This requires changing the PATH environment variable.

    If you installed Python 2.3, add C:\Python23;C:\Python23\Scripts to the path. In any case, be sure that other versions of Python don't come first in the path. Also note that any changes you make won't affect command shell windows that are already open.

    • If on Windows 98 or Windows ME, you should modify your autoexec.bat script, which gets run automatically at boot time. Add set path=C:\Python23;C:\Python23\Scripts;%path% to the bottom of the file.

    • If on Windows NT, Windows 2000 or Windows XP, you should set the environment in the System Properties. Either right-click on your computer's icon on the desktop and pick "Properties", or navigate through the Start Menu to Control Panels and then to System. There are slight variations from version to version of Windows, but somewhere in the system properties window, perhaps on the "advanced" tab, there will be an "environment variables" button. Click the button so that you can modify the environment variables.

  2. Now you may reboot your machine.

Test the installation

When the machine is back up, test that Python is working by opening a command/DOS shell window. Then type python to enter the Python interpreter shell.

C:\WINDOWS>python
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Slight differences in build info are to be expected, but if you get an error or don't get similar output, then your environment is probably incorrect.

Type ctrl-Z and press enter to get out of the Python interpreter.

4.2 4Suite

4Suite is available for Windows download in two formats:

  1. a standard application installer in executable form, and

  2. a ZIP archive containing all the same files as the installer.

Preferably, just use the installer, because it automatically detects where Python is installed (via registry keys), and because afterward, 4Suite can be easily uninstalled via the Add/Remove Programs menu, just like any other application. Advanced users who cannot use the installer can use the ZIP file instead.

These instructions will walk through both installation processes.

4.2.1 4Suite installation using the installer .exe

There are separate 4Suite installers -- one for each version of Python. Be sure you download the correct one for your system. If you are using Python 2.3, download the latest Windows installation executable from ftp://ftp.4suite.org/pub/4Suite/

  1. Double-click on the downloaded executable. The first screen is a confirmation that you do indeed want to install this version of 4Suite. Click "next".

  2. It will then ask you for an installation directory. This should default to the directory you just installed Python into. Once the correct directory is selected, click "next".

    Normally, if Python 2.3 was installed in C:\Python23 (the default location), then the installer will put the main 4Suite libs in C:\Python23\Lib\site-packages\Ft, the executables will go in C:\Python23\Scripts, and other support files will go in C:\Python23\Share\4Suite. Under Python 2.2 the locations will be similar, but rooted under C:\Python22.

  3. One last screen before installation begins... If all is ready, click the "next" button.

Go to the final step section.

4.3 Final Step

Now you can perform a quick test to make sure everything is installed correctly. First, open up a command prompt. From any directory outside of the 4Suite source or installation directories, run the following (you enter 'python' and then the text to the right of the '>>>' prompts):

C:\WINDOWS>python
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from Ft.Xml import Domlette
>>> from Ft.Xml.Xslt import Processor
>>> print Processor
<module 'Ft.Xml.Xslt.Processor' from 'C:\Python23\lib\site-packages\Ft\Xml\Xslt\Processor.pyc'>
>>>

The imports and the print should complete without error. Report any problems to the 4Suite mailing list.

4.4 Tests and Further Setup

If all you wish to use in 4Suite are the basic command-line tools and Python libraries, then you are done with installation and can proceed to use them. To make sure things are working, try running a few of the command-line tools with the -h option to get usage information.

C:\>4xml -h
SNIP
C:\>4xslt -h
SNIP
C:\>4xpath -h
SNIP
C:\>4rdf -h
SNIP

If you want to use the XML/RDF repository and server features of 4Suite, then you will need to customize and install a configuration file, initialize a repository, and do some further tests. These topics are covered in the Quick Start documentation.

5 Resources

5.1 4Suite @ SourceForge

4Suite Project Page - Bug Reports, Feature Requests, Patches

5.2 Additional Links

4suite.org - Documentation, Downloads, News, CVS, Developer Resources

4Suite Users Mailing List - Peer & Developer Support

4Suite Announcement Mailing List - Infrequent Announcements about 4Suite

Fourthought, Inc. - Commercial Development, Consulting & Support

6 Appendix A: Notes on PyXML and 4Suite

PyXML is a collection of XML processing libraries for Python. 4Suite and PyXML are complementary projects developed in tandem. There is minimal overlap in functionality. For example, where PyXML has a compliant, pure Python implementation of DOM Level 1, 4Suite has a lightweight, "Domlette" optimized for XPath processing and implemented mostly in C.

Prior to the 4Suite 0.12.0a1 release, PyXML was required to use 4Suite. This is no longer the case with modern versions of 4Suite; PyXML is not needed at all.

If you decide to install PyXML, you must install PyXML 0.8 or higher (try to install the most recent version) for compatibility with 4Suite. Avoid PyXML 0.8.1 — that specific version integrates a buggy version of Expat (1.95.5), which leads to core dumps in some situations. When installing PyXML, it is recommended that you use the --without-xpath --without-xslt options for setup.py install in order to ensure that the very old, deprecated XPath and XSLT implementations included with PyXML will not be installed. These implementations are ported from 4Suite 0.11.1 and using them alongside newer versions of 4Suite may be problematic.