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

Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »
MoreFun Studios has announced Season 4,...
Tension has escalated in the ever-volatile world of Arena Breakout, as your old pal Randall Fisher and bosses Fred and Perrero continue to lob insults and explosives at each other, bringing us to a new phase of warfare. Season 4, Into The Fog of... | Read more »
Top Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links below... | Read more »
Marvel Future Fight celebrates nine year...
Announced alongside an advertising image I can only assume was aimed squarely at myself with the prominent Deadpool and Odin featured on it, Netmarble has revealed their celebrations for the 9th anniversary of Marvel Future Fight. The Countdown... | Read more »
HoYoFair 2024 prepares to showcase over...
To say Genshin Impact took the world by storm when it was released would be an understatement. However, I think the most surprising part of the launch was just how much further it went than gaming. There have been concerts, art shows, massive... | Read more »
Explore some of BBCs' most iconic s...
Despite your personal opinion on the BBC at a managerial level, it is undeniable that it has overseen some fantastic British shows in the past, and now thanks to a partnership with Roblox, players will be able to interact with some of these... | Read more »

Price Scanner via MacPrices.net

You can save $300-$480 on a 14-inch M3 Pro/Ma...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
24-inch M1 iMacs available at Apple starting...
Apple has clearance M1 iMacs available in their Certified Refurbished store starting at $1049 and ranging up to $300 off original MSRP. Each iMac is in like-new condition and comes with Apple’s... Read more
Walmart continues to offer $699 13-inch M1 Ma...
Walmart continues to offer new Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBook for sale by... Read more
B&H has 13-inch M2 MacBook Airs with 16GB...
B&H Photo has 13″ MacBook Airs with M2 CPUs, 16GB of memory, and 256GB of storage in stock and on sale for $1099, $100 off Apple’s MSRP for this configuration. Free 1-2 day delivery is available... Read more
14-inch M3 MacBook Pro with 16GB of RAM avail...
Apple has the 14″ M3 MacBook Pro with 16GB of RAM and 1TB of storage, Certified Refurbished, available for $300 off MSRP. Each MacBook Pro features a new outer case, shipping is free, and an Apple 1-... Read more
Apple M2 Mac minis on sale for up to $150 off...
Amazon has Apple’s M2-powered Mac minis in stock and on sale for $100-$150 off MSRP, each including free delivery: – Mac mini M2/256GB SSD: $499, save $100 – Mac mini M2/512GB SSD: $699, save $100 –... Read more
Amazon is offering a $200 discount on 14-inch...
Amazon has 14-inch M3 MacBook Pros in stock and on sale for $200 off MSRP. Shipping is free. Note that Amazon’s stock tends to come and go: – 14″ M3 MacBook Pro (8GB RAM/512GB SSD): $1399.99, $200... Read more
Sunday Sale: 13-inch M3 MacBook Air for $999,...
Several Apple retailers have the new 13″ MacBook Air with an M3 CPU in stock and on sale today for only $999 in Midnight. These are the lowest prices currently available for new 13″ M3 MacBook Airs... Read more
Multiple Apple retailers are offering 13-inch...
Several Apple retailers have 13″ MacBook Airs with M2 CPUs in stock and on sale this weekend starting at only $849 in Space Gray, Silver, Starlight, and Midnight colors. These are the lowest prices... Read more
Roundup of Verizon’s April Apple iPhone Promo...
Verizon is offering a number of iPhone deals for the month of April. Switch, and open a new of service, and you can qualify for a free iPhone 15 or heavy monthly discounts on other models: – 128GB... Read more

Jobs Board

Relationship Banker - *Apple* Valley Financ...
Relationship Banker - Apple Valley Financial Center APPLE VALLEY, Minnesota **Job Description:** At Bank of America, we are guided by a common purpose to help Read more
IN6728 Optometrist- *Apple* Valley, CA- Tar...
Date: Apr 9, 2024 Brand: Target Optical Location: Apple Valley, CA, US, 92308 **Requisition ID:** 824398 At Target Optical, we help people see and look great - and Read more
Medical Assistant - Orthopedics *Apple* Hil...
Medical Assistant - Orthopedics Apple Hill York Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Now Read more
*Apple* Systems Administrator - JAMF - Activ...
…**Public Trust/Other Required:** None **Job Family:** Systems Administration **Skills:** Apple Platforms,Computer Servers,Jamf Pro **Experience:** 3 + years of Read more
Liquor Stock Clerk - S. *Apple* St. - Idaho...
Liquor Stock Clerk - S. Apple St. Boise Posting Begin Date: 2023/10/10 Posting End Date: 2024/10/14 Category: Retail Sub Category: Customer Service Work Type: Part Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.