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

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... | Read more »
Price of Glory unleashes its 1.4 Alpha u...
As much as we all probably dislike Maths as a subject, we do have to hand it to geometry for giving us the good old Hexgrid, home of some of the best strategy games. One such example, Price of Glory, has dropped its 1.4 Alpha update, stocked full... | Read more »
The SLC 2025 kicks off this month to cro...
Ever since the Solo Leveling: Arise Championship 2025 was announced, I have been looking forward to it. The promotional clip they released a month or two back showed crowds going absolutely nuts for the previous competitions, so imagine the... | Read more »
Dive into some early Magicpunk fun as Cr...
Excellent news for fans of steampunk and magic; the Precursor Test for Magicpunk MMORPG Crystal of Atlan opens today. This rather fancy way of saying beta test will remain open until March 5th and is available for PC - boo - and Android devices -... | Read more »
Prepare to get your mind melted as Evang...
If you are a fan of sci-fi shooters and incredibly weird, mind-bending anime series, then you are in for a treat, as Goddess of Victory: Nikke is gearing up for its second collaboration with Evangelion. We were also treated to an upcoming... | Read more »
Square Enix gives with one hand and slap...
We have something of a mixed bag coming over from Square Enix HQ today. Two of their mobile games are revelling in life with new events keeping them alive, whilst another has been thrown onto the ever-growing discard pile Square is building. I... | Read more »
Let the world burn as you have some fest...
It is time to leave the world burning once again as you take a much-needed break from that whole “hero” lark and enjoy some celebrations in Genshin Impact. Version 5.4, Moonlight Amidst Dreams, will see you in Inazuma to attend the Mikawa Flower... | Read more »
Full Moon Over the Abyssal Sea lands on...
Aether Gazer has announced its latest major update, and it is one of the loveliest event names I have ever heard. Full Moon Over the Abyssal Sea is an amazing name, and it comes loaded with two side stories, a new S-grade Modifier, and some fancy... | Read more »
Open your own eatery for all the forest...
Very important question; when you read the title Zoo Restaurant, do you also immediately think of running a restaurant in which you cook Zoo animals as the course? I will just assume yes. Anyway, come June 23rd we will all be able to start up our... | Read more »
Crystal of Atlan opens registration for...
Nuverse was prominently featured in the last month for all the wrong reasons with the USA TikTok debacle, but now it is putting all that behind it and preparing for the Crystal of Atlan beta test. Taking place between February 18th and March 5th,... | Read more »

Price Scanner via MacPrices.net

AT&T is offering a 65% discount on the ne...
AT&T is offering the new iPhone 16e for up to 65% off their monthly finance fee with 36-months of service. No trade-in is required. Discount is applied via monthly bill credits over the 36 month... Read more
Use this code to get a free iPhone 13 at Visi...
For a limited time, use code SWEETDEAL to get a free 128GB iPhone 13 Visible, Verizon’s low-cost wireless cell service, Visible. Deal is valid when you purchase the Visible+ annual plan. Free... Read more
M4 Mac minis on sale for $50-$80 off MSRP at...
B&H Photo has M4 Mac minis in stock and on sale right now for $50 to $80 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses: – M4 Mac mini (16GB/256GB): $549, $50 off... Read more
Buy an iPhone 16 at Boost Mobile and get one...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering one year of free Unlimited service with the purchase of any iPhone 16. Purchase the iPhone at standard MSRP, and then choose... Read more
Get an iPhone 15 for only $299 at Boost Mobil...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering the 128GB iPhone 15 for $299.99 including service with their Unlimited Premium plan (50GB of premium data, $60/month), or $20... Read more
Unreal Mobile is offering $100 off any new iP...
Unreal Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering a $100 discount on any new iPhone with service. This includes new iPhone 16 models as well as iPhone 15, 14, 13, and SE... Read more
Apple drops prices on clearance iPhone 14 mod...
With today’s introduction of the new iPhone 16e, Apple has discontinued the iPhone 14, 14 Pro, and SE. In response, Apple has dropped prices on unlocked, Certified Refurbished, iPhone 14 models to a... Read more
B&H has 16-inch M4 Max MacBook Pros on sa...
B&H Photo is offering a $360-$410 discount on new 16-inch MacBook Pros with M4 Max CPUs right now. B&H offers free 1-2 day shipping to most US addresses: – 16″ M4 Max MacBook Pro (36GB/1TB/... Read more
Amazon is offering a $100 discount on the M4...
Amazon has the M4 Pro Mac mini discounted $100 off MSRP right now. Shipping is free. Their price is the lowest currently available for this popular mini: – Mac mini M4 Pro (24GB/512GB): $1299, $100... Read more
B&H continues to offer $150-$220 discount...
B&H Photo has 14-inch M4 MacBook Pros on sale for $150-$220 off MSRP. B&H offers free 1-2 day shipping to most US addresses: – 14″ M4 MacBook Pro (16GB/512GB): $1449, $150 off MSRP – 14″ M4... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.