Team LiB
Previous Section Next Section

Appendix D: Downloading and Compiling the SRS Source Code

All of the source code and supporting data files for the key example programs in Chapters 14, 15, and 16 are available for download from the Apress web site, http://www.apress.com/book/download.html, as a single file named 159059360X.zip. To download the file, select the title of this book from the list, click the Submit button, and then click the Download Source Code File link. When downloaded and unzipped, this will create the directory structure shown in Figure D-1; make sure to use your zip utility's provision to "use directory names from the ZIP file" (or equivalent), so that this directory structure is preserved.

Click To expand
Figure D-1: The source code directory structure

For each of the three chapters, the SRS-specific files will be located in a subdirectory called SRS—for example, xxx\Chapter14\SRS. For Chapters 14 and 16, small example programs unrelated to the SRS—for example, the TestForm examples from Chapter 16—will be located in the Chapter14 and Chapter16 "parent" subdirectories, respectively.

To compile the SRS code for a particular chapter, change your default working directory to the appropriate xxx\Chapternn\SRS subdirectory—e.g., xxx\Chapter14\SRS—and enter the appropriate compile command, which in many cases will simply be

csc /out:SRS.exe *.cs

In other situations where the compilation command needs to be a bit more complicated—e.g., for selected code in Chapters 15 and 16—you'll be given specific instructions at that point in the chapter text.

Following the procedure that was outlined in Chapter 13, if the SRS source code for a given chapter has been compiled into a file named SRS.exe, the SRS application can be run by typing the command-prompt command:

SRS

To compile and run individual example files such as TestForm.cs, change your default working directory to the appropriate Chapter subdirectory (xxx/Chapter14 or xxx/Chapter16), and type

csc programName.cs
programName

to compile and run the program of interest; for example:

csc TestForm.cs
TestForm

Team LiB
Previous Section Next Section