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

The Legend of Heroes: Trails of Cold Ste...
I adore game series that have connecting lore and stories, which of course means the Legend of Heroes is very dear to me, Trails lore has been building for two decades. Excitedly, the next stage is upon us as Userjoy has announced the upcoming... | Read more »
Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
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 »

Price Scanner via MacPrices.net

Sunday Sale: Apple Studio Display with Standa...
Amazon has the standard-glass Apple Studio Display on sale for $300 off MSRP for a limited time. Shipping is free: – Studio Display (Standard glass): $1299.97 $300 off MSRP For the latest prices and... Read more
Apple is offering significant discounts on 16...
Apple has a full line of 16″ M3 Pro and M3 Max MacBook Pros available, Certified Refurbished, starting at $2119 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free... Read more
Apple HomePods on sale for $30-$50 off MSRP t...
Best Buy is offering a $30-$50 discount on Apple HomePods this weekend on their online store. The HomePod mini is on sale for $69.99, $30 off MSRP, while Best Buy has the full-size HomePod on sale... Read more
Limited-time sale: 13-inch M3 MacBook Airs fo...
Amazon has the base 13″ M3 MacBook Air (8GB/256GB) in stock and on sale for a limited time for $989 shipped. That’s $110 off MSRP, and it’s the lowest price we’ve seen so far for an M3-powered... Read more
13-inch M2 MacBook Airs in stock today at App...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New today at Apple: Series 9 Watches availabl...
Apple is now offering Certified Refurbished Apple Watch Series 9 models on their online store for up to $80 off MSRP, starting at $339. Each Watch includes Apple’s standard one-year warranty, a new... Read more
The latest Apple iPhone deals from wireless c...
We’ve updated our iPhone Price Tracker with the latest carrier deals on Apple’s iPhone 15 family of smartphones as well as previous models including the iPhone 14, 13, 12, 11, and SE. Use our price... Read more
Boost Mobile will sell you an iPhone 11 for $...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering an iPhone 11 for $149.99 when purchased with their $40 Unlimited service plan (12GB of premium data). No trade-in is required... Read more
Free iPhone 15 plus Unlimited service for $60...
Boost Infinite, part of MVNO Boost Mobile using AT&T and T-Mobile’s networks, is offering a free 128GB iPhone 15 for $60 per month including their Unlimited service plan (30GB of premium data).... Read more
$300 off any new iPhone with service at Red P...
Red Pocket Mobile has new Apple iPhones on sale for $300 off MSRP when you switch and open up a new line of service. Red Pocket Mobile is a nationwide MVNO using all the major wireless carrier... Read more

Jobs Board

Licensed Practical Nurse - Womens Imaging *A...
Licensed Practical Nurse - Womens Imaging Apple Hill - PRN Location: York Hospital, York, PA Schedule: PRN/Per Diem Sign-On Bonus Eligible Remote/Hybrid Regular Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
Operating Room Assistant - *Apple* Hill Sur...
Operating Room Assistant - Apple Hill Surgical Center - Day Location: WellSpan Health, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Read more
Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.