TweetFollow Us on Twitter

Jul 97 Factory Floor

Volume Number: 13 (1997)
Issue Number: 7
Column Tag: From The Factory Floor

The CodeWarrior IDE Team

by Dave Mark, ©1997 by Metrowerks, Inc., all rights reserved.

This month's interview is with the folks responsible for the latest rev of the CodeWarrior IDE. The members of the IDE team: Dan Podwall (technical lead), Kevin Bell, Matt Henderson, Glenn Meter, and Rob Vaterlaus.

Dave: I'm very excited about the release of version 2.0 of the CodeWarrior IDE. What are some of the new features?

Dan: The primary new feature is a ground-up rewrite of the project manager. We gave the old code a decent burial and then started from scratch. We've learned a lot in the four years since CodeWarrior DR1 shipped and had a long list of user requests to address.

The project manager can now build multiple executable files from a single project. This can be variations on a single application, such as 68K and PowerPC versions. Or it could be anything else CodeWarrior supports, such as libraries, code resources, or shared libraries.

A project can also link to other project files, and build those subprojects during make. And of course you can have more than one project open at a time. It's very flexible.

The build system is now threaded and can handle the requirements of C++, Java, and Pascal in a very general way.

We were very concerned about not slowing down builds with all these new features. In fact, the new IDE is faster than before. In our tests, builds are usually around 30% faster. Initial builds, where the IDE has to search for include files, are up to twice as fast as in 1.7.

The project window now has three different views on the project to accommodate the increased power. There are now optional toolbars in the project, editor, and browser windows, and there's a whizzy new interface for customizing them. Keyboard shortcuts are also customizable via the Key Bindings preference panel.

Dave: What impact will the new threaded execution have on the user?

Dan: The main benefit is that you can do other things in the IDE while a make is in progress, including editing, browsing, checkin/checkout and multi-file search. So if you get compile errors during a make, you can start fixing them while the rest of your project is still compiling.

We use Apple's Thread Manager to run the build in a separate thread from the user interface. We're planning to thread other features in the future, such as version control and multi-file search. Not only does this make for a more responsive user interface, but we'll be ready to take advantage of modern operating systems like Rhapsody as well as multiprocessing hardware.

Glenn: To give some examples of how threads work together, let's look closer at what happens during a build. Under the old IDEs, all compiling and UI happened on the same thread. So, there was not much you could do during a build but wait for it to finish. Under the 2.0 IDE, as Dan pointed out, builds happen on a different thread than the UI. This means that you can still open files, use the browser, perform searches, and even edit files during a build. As the project state is changed during the build, messages are sent from the build thread to the other threads to let them know about the change. When the UI thread next gets a slice of time it will read its messages and update the project window and browser windows, for example.

Dave: With multiple targets per project, will I be able to build fat binaries? How about separate debug and release versions of my program from a single project?

Glenn: In the 2.0 IDE, each "target" matches what used to be a 1.7.x "project". Each target includes a file list, segmentation or link order, and preferences to build an application or library. Before 2.0, to build a fat application you would usually have two projects: one to build the 68K app and another that would build the PowerPC code and include the 68K app to leave a fat application. This meant that whenever you needed to update your application, you'd have to be keep the two projects in sync. In the 2.0 world, the same thing can be done within a single project. The KillerApp.u project can have one target to build the 68K app and another to build the PowerPC code and create the fat application. Maintaining the project is easier since we can now help you add or remove files from both targets at once. You'll still have to set preferences on a target by target basis, but that will be improved in a later release.

Once you've got related targets in the same project file, you can use target dependencies to make your life even easier. For example, if you have a "Killer Engine" shared library that is used by the Killer application, you can set the application target to depend on the shared library target and to link against its output. Then, whenever the application is built the shared library will automatically be brought up to date. Also, if the name of the shared library is changed, the name will also get changed in the application's file list.

Two new linkers are included in the 2.0 IDE to support working with multiple targets. The "MacOS Merge" linker can be used to merge code and resources into a single file. So, you could also build separate 68K debug and release targets, and use a third target with the merge linker to build the fat application. The other new linker, the "None" linker, actually doesn't generate an output file. It can be used to create "build-only" targets to automate building a set of targets without scripts. For example, you could add a "Build All" target that depends on all other targets and uses the "None" linker. When the "Build All" target is built, all of the other targets will be brought up-to-date without having to leave a dummy output file. This is especially useful when generating groups of applications, libraries, or plugins.

Matt: Targets are managed from the targets page in the project window. From the targets page, you can create new targets that are either empty or identical to some other target in the project. Once you've created a new target, double-clicking it will allow you to edit its settings. This is an important difference between CodeWarrior 1.x and 2.0. Language, codegen, and all the other stuff that was configured with Project Settings dialog in 1.x are now targets settings, so each target in a 2.0 project can be configured however you like.

Building debug, release, 68K, and PowerPC versions of your program is mostly a matter of adding new targets to your project. When you convert a project from CodeWarrior 1.x, it will start out with one target that's configured exactly the same as the project you converted. So if you converted a PowerPC project configured for debugging and wanted to be able to build a release version of your app, you would create a new target using the "Clone existing target" option. This produces a new target identical to the first, so all that would be left for you to do would be to edit the new target's settings so they're configured for shipping instead of debugging. Likewise, to create a 68K target, you just clone an existing target and change the new target to use the 68K linker.

It's easy to set up a target to build a fat app as well. Simply drag a 68K and a PowerPC target under the target that you want to be fat, and a target dependency will be set up so that the 68K and PowerPC targets will be built whenever the fat target is built. You'll also have to turn on the "link output" flag for your 68K and PPC subtargets by clicking in the Link column (which has the chain link icon at top). The "link output" flag tells the IDE to link the output file of a subtarget into the output file of the main target.

Figure 1. The CodeWarrior 2.0 IDE supports multiple targets within the same project.

Aside from different settings, targets can contain different files. Obviously, you wouldn't want to include a PowerPC-specific library in a 68K target. We've introduced a new feature, the Project Inspector, to allow you to examine and change which targets contain the files in your project. The Inspector always "inspects" whichever files are currently selected in the Files view of the project window. So, to move a PowerPC-specific library out of a 68K target, you would simply select the library, choose the "Project Inspector" command from the Windows menu, uncheck the checkbox for the 68K target, and the press the "Apply" button to save the change. Once the change has been applied, the library will no longer be a part of your 68K target. The Inspector works on all selected items, so if you have several files you need to inspect, use command- or shift-click to select them all at once.

Figure 2. The CodeWarrior Project Inspector.

Dave: Tell me about nested projects. Can I build a shared library as a subproject within an app that depends on the shared library in order to run?

Rob: With 2.0 you can include another project in a target in much the same way you include normal source files in a target. You can select which of the targets of the subproject you want to have built when you build the main target. You can also set whether or not the main target links against the subproject target. You would set this flag when the subproject is generating a shared or static library.

In many cases the same objective can be achieved using either multiple targets or subprojects. Multiple targets are generally preferred when you have different versions of the same code (e.g. PowerPC & 68K, Debug & Release, different localized versions) and you want to build them in various combinations.

Subprojects are nice when you have a library that is shared among many projects and you want to only have to build it once. For example, many of our projects have subprojects for PowerPlant and/or MSL. The subproject has multiple targets for PowerPC & 68K, Debug & Release. Each target in the main project is set to build and link against the corresponding target in the subproject (e.g. the PPC Debug target in the main project builds and links against the PPC Debug target of the PowerPlant subproject). When changes are made to the library code the subproject will only get rebuilt the first time.

Another situation where subprojects would be preferred over using multiple targets is if you had a product that used a plugin architecture (e.g. Photoshop, AfterDark, or CodeWarrior). You could have one giant project with a target for each plugin and a master build target that had a subtarget for each of the plugin targets. The drawback to structuring the project that way would be that if someone was just doing development on a single plugin they would still need to be working with a project that included the entire source code base which would be unwieldy.

A better way to organize the projects would be to have individual projects for each of the plugins and then have a master project that included all the plugin projects as subprojects. That way it would be more convenient to work on individual plugins, but you could still do a complete build of the entire product in a single make of the master project.

Dave: Must I rebuild all my projects to take advantage of this new architecture?

Kevin: The 2.0 IDE uses a new project format. You can convert your old projects using the Project Converter that comes with the new IDE. When converting, you have two options: you can merge multiple 1.7 projects into a single multi-target 2.0 project, or convert projects individually. Converting projects individually will create single target 2.0 projects which work the same as the original projects. Merging 1.7 projects allows you to take advantage of new 2.0 features. For example, if you have two 1.7 projects which create 68K and PowerPC versions of your application, you can merge these together with the converter to get one 2.0 project which has 68K and PowerPC targets. If you want to build a fat version of your app, you can create a third target which uses the merge linker to combine the outputs of the 68K and PowerPC targets. To avoid getting lots of duplicate resource warnings you'll probably want to move the resources to a separate target.

Dave: What's the story behind the new, configurable toolbars?

Kevin: The IDE now has user configurable toolbars in the editor, project, and browser windows in addition to the floating toolbar. You configure the toolbars by dragging command buttons, popups, and other elements from a new element list window. One of the biggest problems I had with the 1.7 toolbar was that you almost had to leave it visible because that's where the IDE reported all status information during builds, file searching, and other operations. In the 2.0 IDE, this status information is shown in other places so you can hide the toolbars without missing out on important information.

Figure 3. The Toolbar Element list, used to configure your toolbars.

Dave: Can you tell me about the Visual Source Safe plugin?

Rob: When version control is enabled in the IDE, an extra Version Control System (VCS) menu is added to the menu bar. The menu includes commands for all the common VCS commands like Get, Check In, and Check Out. There are recursive variants of all the commands so you can iterate over entire directory trees. The commands can be used from the editor and browser or with the selection in the project window.

The 2.0 IDE supports version control through a plugin interface, so we can support many different version control systems. The plugin API defines abstract VCS operations; a plugin implements these operations for a specific version control system. Our CodeManager product includes a plugin that lets you access Source Safe databases. Several people have come out with shareware plugins that let you use Projector databases and we are working with other VCS vendors to help them develop plugins for their products.

Some of the improvements we've made in the IDE really help out with using source control with project files. In 1.7 the project contains all the object code, dependency info, etc., so you need to make the project file writable just to be able to open and build it. In 2.0 the project file only contains the structural information about the project: the list of source files, subtargets, and settings for each target. All the data generated during a build is stored in a separate per-target data file. This means you can open and build projects without having to check them out. You only need to checkout the project when you add new source files, change the settings, etc.

When you get a new version of a project from the database, if any files have been added or deleted, the IDE will synchronize the target data with the new project file to figure out which files are new and need to be compiled. If the compiler settings haven't changed, you will not need to recompile any of the files that are unchanged from the old version of the project.

Another nice improvement is that we store the VCS settings in a separate per-project settings file so each user can configure VCS with their user name, password, and local root that won't get replaced when they get a new version of the project from the database.

Dave: Any other features you'd like to mention?

Kevin: The keyboard equivalents for IDE menu commands and editor actions are now customizable via a new preference panel. Any key combinations can be used, and emacs-like prefix keys are supported. Each command can be bound to two keys, so for example, emacs-addicts can bind control-x control-s to save and the standard command-s would still work.

Matt: One of the most requested new features is that you can now have multiple projects open at the same time. Perhaps the most obvious change, though, is that the project window has a completely new look - it's now divided into separate pages. The Files page contains the hierarchical list of all the files in the project. This list is for you to organize your files however you want. You can create as many levels of nested groups as you like in the Files page, and the order of files doesn't affect the way your project builds. The Targets page is, of course, where you create and configure the targets in your project. This page has a hierarchical list of your project's targets and their dependencies and subprojects. You'll also see either the Segments page for 68K targets or the Link Order page for PowerPC and Java targets. The Segments page lists the code segments in a 68K target and the files that they contain. This page works like the CodeWarrior 1.x project window. The Link Order page lists all the files in PowerPC target in the order that the files will be linked into your program. This list is flat since PowerPC executables are not segmented.

Also new is that it's now possible to drag things out of the project window. Files dragged out of the project can be dropped into all sorts of cool places. You can drop files onto applications in the Finder, you can drop files into the trash to remove them from the project, you can select a group of files and drop them into the multi-file search list in the Find dialog, or you can drag files from one project and drop them into another.

 
AAPL
$106.79
Apple Inc.
-0.55
MSFT
$45.98
Microsoft Corpora
-0.65
GOOG
$544.32
Google Inc.
-5.01

MacTech Search:
Community Search:

Software Updates via MacUpdate

OneNote 15.3.2 - Free digital notebook f...
OneNote is your very own digital notebook. With OneNote, you can capture that flash of genius, that moment of inspiration, or that list of errands that's too important to forget. Whether you're at... Read more
Audio Hijack Pro 2.11.4 - Record and enh...
Audio Hijack Pro drastically changes the way you use audio on your computer, giving you the freedom to listen to audio when you want and how you want. Record and enhance any audio with Audio Hijack... Read more
Iridient Developer 3.0.0 beta 3 - Powerf...
Iridient Developer (was RAW Developer) is a powerful image conversion application designed specifically for OS X. Iridient Developer gives advanced photographers total control over every aspect of... Read more
TextWrangler 4.5.11 - Free general purpo...
TextWrangler is the powerful general purpose text editor, and Unix and server administrator's tool. Oh, and also, like the best things in life, it's free. TextWrangler is the "little brother" to... Read more
NeoFinder 6.6 - Catalog your external me...
NeoFinder (formerly CDFinder) rapidly organizes your data, either on external or internal disks, or any other volumes. It catalogs all your data, so you stay in control of your data archive or disk... Read more
Chromium 38.0.2125.111 - Fast and stable...
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all Internet users to experience the web. FreeSMUG-Free OpenSource Mac User Group build is... Read more
Default Folder X 4.6.11 - Enhances Open...
Default Folder X attaches a toolbar to the right side of the Open and Save dialogs in any OS X-native application. The toolbar gives you fast access to various folders and commands. You just click... Read more
Mariner Write 3.9.3 - Light-weight and s...
Mariner Write is your Mac OS go-to word processing tool! Professional writer, educator or student, Write has all the functionality you need for that important letter, technical paper or research... Read more
DesktopLyrics 2.6.5 - Displays current i...
DesktopLyrics is an application that displays the lyrics of the song currently playing in "iTunes" right on your desktop. The lyrics for the song have to be set in iTunes; DesktopLyrics does nothing... Read more
DiskMaker X 4.0b4 - Make a bootable OS X...
DiskMaker X (formerly Lion DiskMaker) is an application built with AppleScript that you can use with many versions of OS X to build a bootable drive from OS X OS X 10.8 Mountain Lion up to OS X 10.10... Read more

Latest Forum Discussions

See All

Any.DO 2.0 Hopes to Help Manage Producti...
Any.DO 2.0 Hopes to Help Manage Productivity Posted by Ellis Spice on October 30th, 2014 [ permalink ] iPhone App - Designed for the iPhone, compatible with the iPad | Read more »
Base Busters Review
Base Busters Review By Jennifer Allen on October 30th, 2014 Our Rating: :: FUN BUT RESTRICTED MIXUniversal App - Designed for iPhone and iPad Mixing up two forms of tower defense gaming and collectible cards, Base Busters is a fun... | Read more »
Medford Asylum: Paranormal Case - Hidden...
Medford Asylum: Paranormal Case - Hidden Object Adventure (Full) 1.0 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0 (iTunes) Description: Uncover the mystery of Medford City asylum! | Read more »
Secret Files Sam Peters (Games)
Secret Files Sam Peters 1.0.0 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0.0 (iTunes) Description: [ After the successful iOS release of Secret Files Tunguska, the acclaimed point and click adventure Secret Files... | Read more »
Woah Dave! (Games)
Woah Dave! 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: ***SPECIAL LAUNCH PRICE! IT DOESN'T COST A LOT OF MONEY!*** Optimized for iPhone 6+! A huge hit at E3, PAX, PAX East, IndieCade... | Read more »
Drift'n'Drive (Games)
Drift'n'Drive 1.0.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0.0 (iTunes) Description: Follow your destiny to become the ultimate racing driver! | Read more »
Twisty Hollow (Games)
Twisty Hollow 1.0.1 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0.1 (iTunes) Description: A self-appointed mayor is spinning the town of Twisty Hollow out of order with nonsensical rulings. His cryptic instructions... | Read more »
Omnistat (Utilities)
Omnistat 1.0 Device: iOS Universal Category: Utilities Price: $1.99, Version: 1.0 (iTunes) Description: Omnistat is an application for tech lovers, it's the easiest way to consult your device stats. With Omnistat you don't need to... | Read more »
South Park Pinball Review
South Park Pinball Review By Blake Grundman on October 29th, 2014 Our Rating: :: FAN SERVICE GALOREUniversal App - Designed for iPhone and iPad It is hard to go wrong when tables are obviously being designed by fans of a specific... | Read more »
Mmm Fingers Review
Mmm Fingers Review By Jennifer Allen on October 29th, 2014 Our Rating: :: SIMPLE PLEASURESUniversal App - Designed for iPhone and iPad Chasing high scores with just one finger works well for Mmm Fingers.   | Read more »

Price Scanner via MacPrices.net

Sale! 3.7GHz Quad Core Mac Pro available for...
 B&H Photo has the 3.7GHz Quad Core Mac Pro on sale for $2649 including free shipping plus NY sales tax only. Their price is $350 off MSRP, and it’s the lowest price for this model from any... Read more
Mujjo Steps Up The Game With Refined Touchscr...
Netherlands based Mujjo have just launched their Refined Touchscreen Gloves, stepping up their game. The gloves feature a updated elegant design that takes these knitted gloves to the next level. A... Read more
Sale! Preorder the new 27-inch 5K iMac for $2...
 Abt Electronics has the new 27″ 3.5GHz 5K iMac on sale and available for preorder for $2374.05 including free shipping. Their price is $125 off MSRP, and it’s the lowest price available for this... Read more
Simplex Solutions Inc. Brings Secure Web Surf...
New York based Simplex Solutions Inc. has announced the release and immediate availability of Private Browser 1.0, its revolutionary new secure web browser developed for iPhone, iPad and iPod touch... Read more
Save up to $180 off MSRP with an Apple refurb...
The Apple Store has Apple Certified Refurbished 2014 MacBook Airs available for up to $180 off the cost of new models. An Apple one-year warranty is included with each MacBook, and shipping is free.... Read more
Apple refurbished 2013 MacBook Pros available...
The Apple Store has Apple Certified Refurbished 13″ and 15″ MacBook Pros available starting at $929. Apple’s one-year warranty is standard, and shipping is free: - 13″ 2.5GHz MacBook Pros (4GB RAM/... Read more
What Post PC Era? – The Mac Bounces Back, Big...
Apple’s fiscal Q4 2014 was an all-time record quarter for Mac sales, with 5.5 million units shipped, representing nearly one million more sales (+21 percent, + 25 percent sequentially) than Apple... Read more
Unpacking The Big Changes At Microsoft – iPad...
The days of product keys and email attachments are nearing an end and Microsoft, though late to the game, is making big strides to keep up, says tech expert Karl Volkman of SRV Network, Inc. Under... Read more
Apple refurbished iPad Airs and minis availab...
Apple dropped prices recently on Apple Certified Refurbished iPad Airs and iPad mini 2s, with models now available starting at $209. Apple’s one-year warranty is included with each model, and... Read more
Practice Fusion Launches New Electronic Healt...
Practice Fusion, claimed to be the nation’s largest cloud-based electronic health records (EHR) platform, has launched a new EHR for Practice Fusion’s community of more than 112,000 medical... Read more

Jobs Board

*Apple* Solutions Consultant (ASC) - Apple I...
…important role that the ASC serves is that of providing an excellent Apple Customer Experience. Responsibilities include: * Promoting Apple products and solutions Read more
*Apple* Solutions Consultant (ASC) - Apple I...
…important role that the ASC serves is that of providing an excellent Apple Customer Experience. Responsibilities include: * Promoting Apple products and solutions Read more
*Apple* Solutions Consultant (ASC) - Apple I...
…important role that the ASC serves is that of providing an excellent Apple Customer Experience. Responsibilities include: * Promoting Apple products and solutions Read more
*Apple* Solutions Consultant - Apple Inc. (U...
…important role that the ASC serves is that of providing an excellent Apple Customer Experience. Responsibilities include: * Promoting Apple products and solutions Read more
*Apple* Solutions Consultant - Apple Inc. (U...
…important role that the ASC serves is that of providing an excellent Apple Customer Experience. Responsibilities include: * Promoting Apple products and solutions Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.