Configuring the Compiler


Before turning to the App class, I want to discuss REALbasic's build settings. I'm assuming you have created a new project in REALbasic and decided that the project will be a desktop application. When you first create a project, it is untitled, and you give it a name when you save it for the first time. I always save it right away and give the project a name. For the purposes of the examples I give, I'll be calling this project RSSReader.

Even though you don't need to set the build settings until you are ready to compile the application, I think it's valuable to start at that point because it identifies the platform choices you will have to make and will serve as a good place to begin discussing the differences between the apps.

In the Project menu, select Build Settings, and the window shown in Figure 4.1 will appear:

Figure 4.1. Build settings.


Because you certainly already know that REALbasic compiles for Windows, Macintosh, and Linux, you might be surprised at the number of options you have when compiling a Macintosh program. This comes as a consequence of the variety of hardware and system changes that Macs have undergone over the years.

Here is what the options available for compiling on Macintosh mean:

  • Mac OS X/ClassicCarbon (PEF), executable on any PPC-based Macintosh.

  • Mac OS XCocoa (Mach-0), will run on PPC-based Macintosh computers running OS X.

  • Mac "Classic"System 9 Only, executable on either 68K or PPC-based computers.

Here are some factors to consider when deciding which Macintosh platforms you should build for:

  • The only practical reason to compile for Mac "Classic" is if you already have an application created and you have customers who use it on a System 9-Only Macintosh. These folks are few and far between and chances are they could run a Carbon version of your application as well, unless their Mac is really, really old.

  • Use the Cocoa (Mach-0) build if you want to make use of some OS X specific features, such as accessing Frameworks, which are the equivalent of shared libraries.

  • Otherwise, the simplest choice is to choose the Carbon build, because the largest number of Mac users will be able to use it.

  • Remember that Macintosh is switching to Intel processors and REALbasic will provide support for compiling on the new processors when they are available. Some of these choices may change as a consequence, but at this point, it's too early to say how that might impact your choices.

Next Steps

Now that you understand the different formats you can compile your application to, you can turn to the App class. When you configure App's properties, you will need to decide your application's name for each platform, how you are going to manage different versions of your application, the file types your application will access, and which icon should be used to represent it.

All this work is done with the App class.




REALbasic Cross-Platform Application Development
REALbasic Cross-Platform Application Development
ISBN: 0672328135
EAN: 2147483647
Year: 2004
Pages: 149

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net