GLOBALBASE ARCHITECTURE Developing Environment
for Macintosh

0. Support Information

The Macintosh version supports following architectures:

	COSMOS GLOBALBASE VIEWER


1.  Development environment for COSMOS

The project file env/proj/mac/cosmos.mcp is constructed with Metrowerks CodeWarrior version 7 for Macintosh. The project file named "cosmos_8.mcp" is for CW8, makes Mach-O binary which runs only in MacOS X. This project needs PowerPlant framework.

Note that some files of LThread class implementation in PowerPlant are removed from the project file. Alternative files are in the src/arch/mac/machine/carbon/ folder.


2. Installing plain2c preprocessor plugin

To preprocess *.t file, you need to install plain2c preprocessor. Please follow the instruction below to install this plugin.

(1) Access the directory utils/mac/p2c

(1) Decompress the archive file 'plain2c.sit', then you'll get a plugin file named plain2c.

(2) Place this file in 'CodeWarrior Plugins' folder in the same directory as the compiler.

(3) You need to quit CodeWarrior once and re-launch to make it recognized by CodeWarrior.

Please see the plain2c document for further information.


3. Compilation of COSMOS for Macintosh

(1) Files in env/src/arch/mac/carbon/Resource/ have resource fork.
If you get sources from CVS and resource fork is lost. You have to run './compile_res' command in the env/proj/mac/ directory to re-compile from its rez source (i.e. resource files includes both the resource fork and its source in the data fork). To execute this command, you should add the directory of Rez command (/Developer/Tools by default) to PATH environment variable.

(2) Open the COSMOS project file, and click 'make' button.
The application is created in COSMOS folder of the project directory.

The project file has a two targets. 'COSMOS D' is for debugging, 'COSMOS' is for release version.
'COSMOS D' skips optimization, and turns MEMORY_DEBUG option on.

Sometimes, preprocessing of *.t files fails. When this problem occurs, delete corresponding *.c file entries from the project and click 'make' button again. This may be fixed in future version of plain2c plugin...

(3) If compiling with CW7, Copy 'peripheral' folder into the COSMOS folder. (In CW8, this file is automatically copied into the generated application package by shell script 'pack_files.sh.')

(4) Now you may launch the application by hitting command-option-R !


2003.5.20
Tomoki Sekiyama <sekiyama@yahoo.co.jp>
