Выбрать главу

The MSYS installer is available from the same SourceForge page as MinGW. Click on MSYS Base System to get a list of the available releases. Select the Current Release and click on MSYS-1.0.10.exe to download the installer. After agreeing to the license terms and reviewing a release notes page, you get a dialog to select the installation folder. I chose to install MSYS in the \MinGW folder just to keep everything in one place. This is followed by a Select Components dialog, but in fact there is only one component.

Following installation, a command prompt window pops up to ask if you would like to execute the post-install process (Figure 2.7). Upon replying yes, “y”, you’re asked if you have MinGW installed and where it’s located. Post-install then builds some script files.

Figure 2.7: MSYS post install script.

The installation process puts an MSYS shortcut on your desktop. Double-click it to bring up the window in Figure 2.8. Try some POSIX shell commands to prove it works. For all practical purposes, MSYS provides the same functionality as Cygwin, so you really only need one or the other. In fact, its author describes MSYS as a fork of Cygwin that is “more friendly to the Win32 user.”

Figure 2.8: MSYS command shell.

2.5.3 NFS for Windows — nfsAxe

The combination of MinGW and MSYS does not include network server functionality such as NFS. There are several packages available, some for free, that add NFS server functionality to Windows. One that I’ve worked with is nfsAxe from LabF (http://www.labf.com/). It’s a fairly extensive package that includes:

• NFS client

• NFS server

• FTP client

• Telnet

• LPD and LPR

• TFTP client

A free downloadable evaluation version of nfsAxe is available that supports one user and times-out after 30 minutes of operation. A commercial version supporting any number of users sells for $24 to $40 per user, depending on how many user licenses are purchased.

The download, nfsaxe.exe, is a self-extracting ZIP file. Use nfsaxe.exe to extract the package files and start an InstallShield wizard that steps you through the usual options of selecting an install directory, a setup type, and a program folder. Unlike Cygwin and MinGW, nfsAxe uses the standard Windows software installation process, so to remove it you must use the Control Panel Add/Remove software process.

Using nfsAxe creates a program folder with icons for all of its features, plus a user’s manual and an uninstall process. The first time you double-click NFS-Server two things are likely to happen:

• A Windows security alert says the firewall has blocked the program from accepting connections. Click on Unblock.

• NFS_Server says the list of exported directories is empty, and asks, “Do you wish to create it?” Click Yes to bring up the window in Figure 2.9.

Figure 2.9: NFS Server Settings.

Click on Add directory to make one or more Windows directories visible to NFS. Then click on Add User Access to allow access to the directories you’ve exported. The simplest thing to do is select the wildcard, “*”, for all the entries. Uncheck Read only if you want write access to the export.

2.5.4 Allegro — Another NFS Server

Allegro is a commercial product available from Franz, Inc., a web software tools vendor. A free 30-day evaluation of the $65 package is available from http://www.nfsforwindows.com/home by sending them your name and email address. In return, they send you a link to a self-extracting ZIP file.

Following extraction, Allegro starts up a configuration utility (Figure 2.10) where you can specify exported directories and user access properties. An interesting feature of Allegro is that the exported name is separate and distinct from the path.

Figure 2.10: Allegro configuration utility.

Allegro is a Windows service and by default it is started automatically.

Summary

This chapter covered the process of obtaining and installing Eclipse under both Linux and Windows. The Linux process is fairly straightforward. About the only hitch may be that the version of the Java Virtual Machine on your system may not be compatible with Eclipse.

Installation of Eclipse itself under Windows is equally straightforward. The problem, though, is that Windows lacks other features necessary to do software development, such as a compiler toolchain. Cygwin and MinGW are alternative approaches to installing the GNU toolchain under Windows.

Another useful tool for embedded development that Windows lacks is an NFS server. Cygwin includes an NFS server, but MinGW doesn’t. Two packages that provide NFS server functionality under Windows are nfsAxe from LabF and Allegro from Franz, Inc.

Now that we have Eclipse installed, it’s time to start playing around with it. That’s the subject of the next chapter.

CHAPTER 3

Getting Started 

3.1 Start Eclipse

Start in your home directory. There are three ways to start Eclipse, indeed to start any program under Linux running a graphical desktop environment:

• In a shell window, execute <path_to_eclipse>eclipse.

• In a file manager window, double-click the eclipse executable.

• Click on a custom launch button in the toolbar.

Eclipse always begins by asking you to select a workspace (Figure 3.1). The default workspace is the directory workspace/ under your home directory. If the directory doesn’t exist, Eclipse will create it. If this is likely to be the only workspace you use, check the Use this as the default and do not ask again box to bypass this dialog.

Figure 3.1: Workspace dialog.

If the workspace did not exist, Eclipse brings up a Welcome screen (Figure 3.2). This offers the opportunity to learn more about Eclipse before jumping right into it. Icons include:

  Overview of Eclipse features

  What’s new in this release

  Samples

  Tutorials

  Go to the Workbench

Figure 3.2: Welcome screen.

The next time you start Eclipse in the same workspace the Welcome screen won’t be displayed but you can always get back to it by clicking Help→Welcome. For now click Go to the workbench, but feel free to come back to the samples and tutorials at any time.

3.2 Basic Concepts

At its core, Eclipse is really just a collection of tools for managing and manipulating files. The magic of course is in how these tools and other software components are structured and integrated. The user’s view of Eclipse is a desktop known as a Workbench. Figure 3.3 is the empty workbench window that comes up before we’ve created any projects or files.