The Mozilla
Organization
Our Mission
Who We Are
Getting Involved
Community
Editorials
What's New
Newsbot
Development
Roadmap
Module Owners
Blue Sky
Projects
Status
Tools
Products
Source Code
Binaries
Documentation
License Terms
Bug Reports
Quality
Search
Feedback


xpidl for CodeWarrior

v1.0d1 - first development release

Installation Notes

xpidl for CodeWarrior consists of three tools, which must be installed in three distinct locations in your "CodeWarrior Plugins" folder:

  1. xpidl - the idl compiler - goes in "Compilers"
  2. xpidl Settings - the preferences panel - goes in "Preference Panels"
  3. xpt Linker - the .xpt file linker - goes in "Linkers"

Setting up an IDL Project

Create a new IDL Project

After installing the tools, create a new empty project. Add .idl files for the particular module you are working with (for example all of the .idl files in mozilla/xpcom/idl).

Generating Headers

Open CodeWarrior's target specific settings window. Go to the "Target Settings" panel, and change the "Target Name:" field to "headers". Set the "Linker:" preference to "None". Switch to the "xpidl Settings" panel and set the "Mode:" to "Header Files". The panel should look like the following:

Generating Type Libraries

Create another target in the IDL project you created before. Call this target "typelibs". Set the "Linker:" preference to "xpt Linker". Go to the "xpidl Settings" panel again, and set the "Mode:" to "Type Libraries". Set the "Linker output:" field to an appropriate name (e.g. "xpcom.xpt"). The xpt Linker will combine all of the .xpt files generated for each .idl file into a single type library. The panel should look like the following:

Sample IDL Project

A sample project can be found in the Mozilla tree at "mozilla/xpcom/tools/xpidl/macbuild/test". This project points at the current idl files in "mozilla/xpcom/idl".

v1.0d2 - second development release

Enhancements

Better Dependency Tracking

When the xpidl compiler generates header or typelib files, it now informs the CodeWarrior IDE that an external file has been created. This lets CodeWarrior know that the external file depends on the .idl file from which it was compiled. Thus, if a header or typelib file is deleted (e.g. you throw away your dist folder), the IDE will correctly recompile the .idl file to regenerate the appropriate file. Moreover, if you're working with an IDL project, and use the "Remove Objects" command, the IDE will delete the external files, giving you a clean slate.

The .xpt files are also built within a target specific folder within the IDL project's data folder. Only the final linked .xpt file will appear in the project's output directory.

Bug Fixes

Fixed a bug where the linker would always relink the output .xpt library.

Fixed a major problem with trapping calls to exit(), causing infinite recursion. Was using exception handling which evidently doesn't work with this kind of shared library setup. Switched to trapping calls to exit() with setjmp/longjmp, and disabled exception handling (for now).

v1.0d3 - third development release

No new features

Bug Fixes

Each #include of a .idl file was leaking a file handle. Now, when an include file is done being processed, the file is explicitly closed.

v1.0d4 - fourth development release

New Feature: Header Alias Creation

The linker has been enhanced to create aliases to header files in the project's output directory. This lets our build system throw away the contents of mozilla/dist, without causing all of the header files to be regenerated, which will speed up dependency builds. To use this feature, you must turn on the linker in your project's header file target, and provide a name of a file for the linker to create in the output directory. For example, if your project is called "moduleIDL.mcp", and you create a type library called "module.xpt", you should call this file "module.headers". This file is only created to provide a timestamp for the Metrowerks IDE. If you throw away the file, the linker will recreate all of the aliases, but the original header files will be untouched.

Bug Fixes

All of the latest changes to the xpidl compiler have been incorporated in this release. Take a look at the CVS logs to see what changed.


Last Modified on 18 May 1999 by Patrick C. Beard <beard@netscape.com>



Copyright © 1998 The Mozilla Organization.