TweetFollow Us on Twitter

Aug 97 Factory Floor

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

Quick Tour: New CodeWarrior 2.0 IDE

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

This past June, Metrowerks released version 2.0 of the CodeWarrior IDE. The 2.0 IDE is chock full of brand new features. Now you can have multiple projects open at the same time, nest projects within other projects, and easily manage multiple builds of the same project. There's a new MacOS Merge Linker for merging 68K and PowerPC binaries into Fat binaries, a new customizable Toolbar, improved drag and drop support and project file management. Last but not least, this new version of the IDE is now multi-threaded and allows you to edit files, etc., while your project is building. Cool! Of course, this version still has an integrated source code editor and browser. And it still supports plug-in compilers and linkers, an essential part of the IDE's power and flexibility.

Last month, we interviewed the folks from the CodeWarrior IDE team. They got a chance to crow about their favorite features and talk about future directions. This month, I'd like to break with tradition a bit. Instead of our regularly scheduled interview, I'd like to take a brief tour of the 2.0 IDE.

Before we do, just a quick warning. If you haven't already done so, take the time to read the very short document titled "URGENT ReadMe New IDE". You'll find it on the top level of your CodeWarrior Tools CD. In addition to a brief introduction, the document discusses issues relating to 1.7 to 2.0 conversion, new features in 2.0, conversion from Plauger/Plum Hall to Metrowerks Standard Library (MSL), and using the obsolete ANSI libraries in MacOS projects. Where appropriate, "URGENT ReadMe New IDE" points you to documents on the CodeWarrior CD that contain more detailed info.

Also, be sure to spend some time looking over the new Preferences... and Target Settings... dialogs, as they have changed. You'll definitely want to spend some time in the Preferences' Key Bindings pane which lets you customize the key sequences attached to various parts of the 2.0 IDE user interface.

A quick note of thanks to "BitHead" Magnuson and Dan Podwall from Metrowerks who answered my pesky questions and helped get this month's column up and running. Thanks, guys...

Converting Your Existing Projects

One of the first things you'll notice when you use the new IDE is that it will not open your older, 1.7 IDE projects. Fortunately, CodeWarrior Professional (the new name for the joint Mac and Windows release) includes a tool called Project Converter which will not only convert your projects to 2.0 format for you, but will merge multiple projects together into a single project containing multiple targets. This is incredibly useful (and you'll see an example of this a bit later in the column).

If you double-click on Project Converter, it will prompt you for a project file to convert. Alternatively, you can drop one or more project files on top of the Project Converter icon. This will allow you to combine several projects into a single project file. One classic example of this is when you are maintaining two versions of the same project, one for 68K and one for PPC. Now you can combine the PPC and 68K projects under a single project with separate targets set up to generate the 68K build, PPC build, and fat build. You might also want to set up target builds for debug and no-debug. Multiple target support is cool.

You'll find Project Converter inside the Metrowerks folder, in the Other Metrowerks Tools subfolder on your hard drive (assuming you've installed it).

A Multiple Target Example

Let's take a look at an example. I grabbed FormEdit, one of my old Mac Primer, Volume 2 projects, which I happened to have in both PPC and 68K formats. Just to see what would happen, I double-clicked on the PPC FormEdit project. Figure 1 shows the dialog that appeared. Clearly, a trip to Project Converter was in order.

Figure 1. This message appears when you try to open a 1.x project using the 2.0 IDE.

My next step was to combine the CW11 PPC and 68K FormEdit projects into a single multi-target, IDE 2.0 project. To do this, I first selected FormEdit (68K).µ and FormEdit (PPC).µ, then dragged both projects onto the Project Converter icon. The dialog shown in Figure 2 appeared. If I was just doing a batch convert of a bunch of old projects, I'd click the Keep Separate button. Since I want to join the projects, I clicked the Merge button. Project Converter prompted me for a new project file name. I used the name FormEdit (Merged).µ.

Figure 2. Project Converter prompts you whether to combine your old projects into one new one or convert them separately.

My next step was to double-click on the merged project to launch the 2.0 IDE. A status dialog appeared (Figure 3), displaying a series of messages as the 68K project was loaded, its files located, the PPC project was loaded and, finally, its files located.

Figure 3. The status dialog that appears as the project opens. At this point, the 68K project was loading.

Once the files are all located and the projects loaded, the project window appears. At the top of the project window is a series of tabs that allow you to explore various aspects of your project. When the project file first appears, the Files tab is selected, presenting a merged list of all the files that make up your project, regardless of target. In the Files view, a popup appears at the top of the window that allows you to select from the various targets you have set up.

At this point, I've got two targets set up: PPC and 68K. To switch between targets, just select the target name from the popup. Figure 4 shows the project window with FormEdit (68K) selected. Figure 5 shows the project window with FormEdit (PPC) selected. Take a close look at the second column in each figure. This is the column with the "touched/untouched" red checkmark next to each file in the target. Since the project has not yet been built, this is a good indicator of which files are in which target. As you can see, some of the project files are used by both targets, others belong to only one target or the other.

Figure 4. The project window with FormEdit (68K) selected.

Figure 5. The project window with FormEdit (PPC) selected.

To build a target, just select it from the list and Make or Run. If the IDE reports that it can't locate some of your libraries, build a new project that corresponds to the target you are trying to build. For example, when I converted FormEdit, CodeWarrior choked on the old style MSL library names in my 68K target. I built a new project using the Basic 68K Toolbox app stationery, then dragged the libraries from the new project window into my FormEdit project window. The user interface makes this trivial to do. Once you release the drag, the IDE will prompt you to select to which target you'd like the new files added. Of course, this technique applies anytime you add files to the project.

Cool feature alert: What do you think will happen if you drag a file from the project window to the Finder's trash can? But of course -- the file is removed from the project -- Cool!

The Buttons at the Top of the Project Window

Just to the right of the target popup menu at the top of the project window is a series of 7 buttons (Figure 6), each of which performs a separate function. From left to right, here's what each of these buttons do:

Figure 6. The 2.0 IDE includes a set of 7 useful buttons at the top of the project window, just to the right of the target popup.

  • Target Settings - Brings up the Target Settings dialog.
  • Bring Up To Date - Compiles all modified and marked files in the current target of the active target.
  • Make - Compiles and links all modified and marked files in the current target of the active target.
  • Run/Debug - Does a Make, then runs the executable.
  • Synchronize Modification Dates - Synchronizes the project's internal modification dates for each file with the file's actual modification date on disk.
  • Remove Object Code - removes objects from the current target of the active project.
  • Project Inspector - Brings up the Project Inspector window, which allows you to edit properties of the selected files in the active project.

Figure 7 shows two views of the Project Inspector window. The Attributes tab lets you turn on and off attributes like debug info, and the Targets tab lets you select which targets the file or files are part of.

Figure 7. Two views of the project inspector, showing the Attributes and Targets panes.

The Link Order and Segments Tabs

The second tab in the project window says either Segments or Link Order, depending on the target. In a 68K project, the Segments tab allows you to manage your project's segmentation (Figure 8). You can create a new segment (an item appears in the Project menu), reorder files and segments, or drag files from one segment to another.

The Link Order tab (Figure 9) lets you use drag and drop to change the link order in a PPC target.

Figure 8. The Segments tab, which appears when the current target is 68K based.

Figure 9. The Link Order tab, which appears when the current target is PPC-based.

Creating a New, Fat Target

The last thing we'll do is create a new, fat target. First, click on the target tab in the project window. Then, select Create New Target from the Project menu. When the New Target dialog appears (Figure 10), type in an appropriate name (such as "FormEdit Fat") and click OK.

Figure 10. The New Target dialog box.

When the new target appears in the target list, double-click on it to bring up the Target Settings dialog. In the Linker popup menu, select MacOS Merge. Next, select Linker/MacOS Merge from the scrolling list on the left side of the Target Settings window. Type "FormEdit (Fat)" in the File Name field (feel free to fill in the Creator field as well).

Click the Save button, which will bring up a dialog telling you the target must be relinked. Click OK, then close the Target Settings window.

The last step is to create dependencies between the Fat target and the PPC and 68K target, so that when you tell CodeWarrior to build the fat target, it makes sure the 68K and PPC targets are built. To do this, click on the 68K target and drop it on the Fat target (you'll want to drag a little to the right so it appears as if the drag was slightly indented). Now drag the PPC target and drop it on the Fat target. Click on the disclosure triangle to see the results.

Figure 11. The Fat target with its two dependencies.

Next, click in the link column (far right of the project window, Targets pane) of both dependent targets to tell CodeWarrior to use the output of both 68K and PPC targets at link time to create the FormEdit Fat target. A black dot will appear in the link column to let you know you did the right thing (Figure 11).

Next Month: The Java Interview

I wish I had more pages to work with, as we've only scratched the surface of the 2.0 IDE. Perhaps in a future column, I'll tackle a more complex example, with subprojects, plug-ins, etc. Till then, it's back to the interviews. Next month is our special Java issue and we'll be talking with the CodeWarrior Java team. See you then!

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Tokkun Studio unveils alpha trailer for...
We are back on the MMORPG news train, and this time it comes from the sort of international developers Tokkun Studio. They are based in France and Japan, so it counts. Anyway, semantics aside, they have released an alpha trailer for the upcoming... | Read more »
Win a host of exclusive in-game Honor of...
To celebrate its latest Jujutsu Kaisen crossover event, Honor of Kings is offering a bounty of login and achievement rewards kicking off the holiday season early. [Read more] | Read more »
Miraibo GO comes out swinging hard as it...
Having just launched what feels like yesterday, Dreamcube Studio is wasting no time adding events to their open-world survival Miraibo GO. Abyssal Souls arrives relatively in time for the spooky season and brings with it horrifying new partners to... | Read more »
Ditch the heavy binders and high price t...
As fun as the real-world equivalent and the very old Game Boy version are, the Pokemon Trading Card games have historically been received poorly on mobile. It is a very strange and confusing trend, but one that The Pokemon Company is determined to... | Read more »
Peace amongst mobile gamers is now shatt...
Some of the crazy folk tales from gaming have undoubtedly come from the EVE universe. Stories of spying, betrayal, and epic battles have entered history, and now the franchise expands as CCP Games launches EVE Galaxy Conquest, a free-to-play 4x... | Read more »
Lord of Nazarick, the turn-based RPG bas...
Crunchyroll and A PLUS JAPAN have just confirmed that Lord of Nazarick, their turn-based RPG based on the popular OVERLORD anime, is now available for iOS and Android. Starting today at 2PM CET, fans can download the game from Google Play and the... | Read more »
Digital Extremes' recent Devstream...
If you are anything like me you are impatiently waiting for Warframe: 1999 whilst simultaneously cursing the fact Excalibur Prime is permanently Vault locked. To keep us fed during our wait, Digital Extremes hosted a Double Devstream to dish out a... | Read more »
The Frozen Canvas adds a splash of colou...
It is time to grab your gloves and layer up, as Torchlight: Infinite is diving into the frozen tundra in its sixth season. The Frozen Canvas is a colourful new update that brings a stylish flair to the Netherrealm and puts creativity in the... | Read more »
Back When AOL WAS the Internet – The Tou...
In Episode 606 of The TouchArcade Show we kick things off talking about my plans for this weekend, which has resulted in this week’s show being a bit shorter than normal. We also go over some more updates on our Patreon situation, which has been... | Read more »
Creative Assembly's latest mobile p...
The Total War series has been slowly trickling onto mobile, which is a fantastic thing because most, if not all, of them are incredibly great fun. Creative Assembly's latest to get the Feral Interactive treatment into portable form is Total War:... | Read more »

Price Scanner via MacPrices.net

Early Black Friday Deal: Apple’s newly upgrad...
Amazon has Apple 13″ MacBook Airs with M2 CPUs and 16GB of RAM on early Black Friday sale for $200 off MSRP, only $799. Their prices are the lowest currently available for these newly upgraded 13″ M2... Read more
13-inch 8GB M2 MacBook Airs for $749, $250 of...
Best Buy has Apple 13″ MacBook Airs with M2 CPUs and 8GB of RAM in stock and on sale on their online store for $250 off MSRP. Prices start at $749. Their prices are the lowest currently available for... Read more
Amazon is offering an early Black Friday $100...
Amazon is offering early Black Friday discounts on Apple’s new 2024 WiFi iPad minis ranging up to $100 off MSRP, each with free shipping. These are the lowest prices available for new minis anywhere... Read more
Price Drop! Clearance 14-inch M3 MacBook Pros...
Best Buy is offering a $500 discount on clearance 14″ M3 MacBook Pros on their online store this week with prices available starting at only $1099. Prices valid for online orders only, in-store... Read more
Apple AirPods Pro with USB-C on early Black F...
A couple of Apple retailers are offering $70 (28%) discounts on Apple’s AirPods Pro with USB-C (and hearing aid capabilities) this weekend. These are early AirPods Black Friday discounts if you’re... Read more
Price drop! 13-inch M3 MacBook Airs now avail...
With yesterday’s across-the-board MacBook Air upgrade to 16GB of RAM standard, Apple has dropped prices on clearance 13″ 8GB M3 MacBook Airs, Certified Refurbished, to a new low starting at only $829... Read more
Price drop! Apple 15-inch M3 MacBook Airs now...
With yesterday’s release of 15-inch M3 MacBook Airs with 16GB of RAM standard, Apple has dropped prices on clearance Certified Refurbished 15″ 8GB M3 MacBook Airs to a new low starting at only $999.... Read more
Apple has clearance 15-inch M2 MacBook Airs a...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs now available starting at $929 and ranging up to $410 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at... Read more
Apple drops prices on 13-inch M2 MacBook Airs...
Apple has dropped prices on 13″ M2 MacBook Airs to a new low of only $749 in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, now available for $679 for 8-Core CPU/7-Core GPU/256GB models. Apple’s one-year warranty is included, shipping is free, and each... Read more

Jobs Board

Seasonal Cashier - *Apple* Blossom Mall - J...
Seasonal Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Seasonal Fine Jewelry Commission Associate -...
…Fine Jewelry Commission Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) Read more
Seasonal Operations Associate - *Apple* Blo...
Seasonal Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.