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

Jump into one of Volkswagen's most...
We spoke about PUBG Mobile yesterday and their Esports development, so it is a little early to revisit them, but we have to because this is just too amusing. Someone needs to tell Krafton that PUBG Mobile is a massive title because out of all the... | Read more »
PUBG Mobile will be releasing more ways...
The emergence of Esports is perhaps one of the best things to happen in gaming. It shows our little hobby can be a serious thing, gets more people intrigued, and allows players to use their skills to earn money. And on that last point, PUBG Mobile... | Read more »
Genshin Impact 5.1 launches October 9th...
If you played version 5.0 of Genshin Impact, you would probably be a bit bummed by the lack of a Pyro version of the Traveller. Well, annoyingly HoYo has stopped short of officially announcing them in 5.1 outside a possible sighting in livestream... | Read more »
A Phoenix from the Ashes – The TouchArca...
Hello! We are still in a transitional phase of moving the podcast entirely to our Patreon, but in the meantime the only way we can get the show’s feed pushed out to where it needs to go is to post it to the website. However, the wheels are in motion... | Read more »
Race with the power of the gods as KartR...
I have mentioned it before, somewhere in the aether, but I love mythology. Primarily Norse, but I will take whatever you have. Recently KartRider Rush+ took on the Arthurian legends, a great piece of British mythology, and now they have moved on... | Read more »
Tackle some terrifying bosses in a new g...
Blue Archive has recently released its latest update, packed with quite an arsenal of content. Named Rowdy and Cheery, you will take part in an all-new game mode, recruit two new students, and follow the team's adventures in Hyakkiyako. [Read... | Read more »
Embrace a peaceful life in Middle-Earth...
The Lord of the Rings series shows us what happens to enterprising Hobbits such as Frodo, Bilbo, Sam, Merry and Pippin if they don’t stay in their lane and decide to leave the Shire. It looks bloody dangerous, which is why September 23rd is an... | Read more »
Athena Crisis launches on all platforms...
Athena Crisis is a game I have been following during its development, and not just because of its brilliant marketing genius of letting you play a level on the webpage. Well for me, and I assume many of you, the wait is over as Athena Crisis has... | Read more »
Victrix Pro BFG Tekken 8 Rage Art Editio...
For our last full controller review on TouchArcade, I’ve been using the Victrix Pro BFG Tekken 8 Rage Art Edition for PC and PlayStation across my Steam Deck, PS5, and PS4 Pro for over a month now. | Read more »
Matchday Champions celebrates early acce...
Since colossally shooting themselves in the foot with a bazooka and fumbling their deal with EA Sports, FIFA is no doubt scrambling for other games to plaster its name on to cover the financial blackhole they made themselves. Enter Matchday, with... | Read more »

Price Scanner via MacPrices.net

Apple Watch Ultra available today at Apple fo...
Apple has several Certified Refurbished Apple Watch Ultra models available in their online store for $589, or $210 off original MSRP. Each Watch includes Apple’s standard one-year warranty, a new... Read more
Amazon is offering coupons worth up to $109 o...
Amazon is offering clippable coupons worth up to $109 off MSRP on certain Silver and Blue M3-powered 24″ iMacs, each including free shipping. With the coupons, these iMacs are $150-$200 off Apple’s... Read more
Amazon is offering coupons to take up to $50...
Amazon has Apple’s M2-powered Mac minis in stock and on sale for up to $110 off MSRP, each including free delivery. Prices are valid after free coupons available on each mini’s product page, detailed... Read more
Use your Education discount to take up to $10...
Need a new Apple iPad? If you’re a student, teacher, or staff member at any educational institution, you can use your .edu email address when ordering at Apple Education to take up to $100 off the... Read more
Apple has 15-inch M2 MacBook Airs available f...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs available starting at $1019 and ranging up to $300 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at Apple.... Read more
Mac Studio with M2 Max CPU on sale for $1749,...
B&H Photo has the standard-configuration Mac Studio model with Apple’s M2 Max CPU in stock today and on sale for $250 off MSRP, now $1749 (12-Core CPU and 32GB RAM/512GB SSD). B&H offers... Read more
Save up to $260 on a 15-inch M3 MacBook Pro w...
Apple has Certified Refurbished 15″ M3 MacBook Airs in stock today starting at only $1099 and ranging up to $260 off MSRP. These are the cheapest M3-powered 15″ MacBook Airs for sale today at Apple.... Read more
Apple has 16-inch M3 Pro MacBook Pro in stock...
Apple has a full line of 16″ M3 Pro MacBook Pros available, Certified Refurbished, starting at $2119 and ranging up to $440 off MSRP. Each model features a new outer case, shipping is free, and an... Read more
Apple M2 Mac minis on sale for $120-$200 off...
Amazon has Apple’s M2-powered Mac minis in stock and on sale for $110-$200 off MSRP this weekend, each including free delivery: – Mac mini M2/256GB SSD: $469, save $130 – Mac mini M2/512GB SSD: $689.... Read more
Clearance 9th-generation iPads are in stock t...
Best Buy has Apple’s 9th generation 10.2″ WiFi iPads on clearance sale for starting at only $199 on their online store for a limited time. Sale prices for online orders only, in-store prices may vary... Read more

Jobs Board

Senior Mobile Engineer-Android/ *Apple* - Ge...
…Trust/Other Required:** NACI (T1) **Job Family:** Systems Engineering **Skills:** Apple Devices,Device Management,Mobile Device Management (MDM) **Experience:** 10 + Read more
Sonographer - *Apple* Hill Imaging Center -...
Sonographer - Apple Hill Imaging Center - Evenings Location: York Hospital, York, PA Schedule: Full Time Full Time (80 hrs/pay period) Evenings General Summary 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
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
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.