[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


Project Classes


68K Project

Table A.3 lists the 68K Project class properties.

Table 0.3 68K Project Class

 

Name
Property Type
Project Type  
  • standard application
  • CFM68K application
  • code resource
  • library
  • shared library
  • MPW Too
  • Pilot Application
  • Pilot Code Resource
File Name  
string  
File Creator  
string  
File Type  
string  
Minimum Size  
integer  
Preferred Size  
integer  
SIZE Flags  
small integer
(SIZE flag bits must be computed as an integer value)
 
SYM File  
string  
Resource Name  
string  
Display Dialogs  
boolean  
Merge To File  
boolean  
Resource Flags  
small integer  
Resource Type  
string  
Resource ID  
small integer  
Multi Segment  
boolean  
Library Type  
  • A4 relative
  • A5 relative
  • CFM68K
  • Pilot Library
Seg Type  
string  
Stack Size  
integer  
Start-up Code  
  • standard
  • The Debugger Aware
  • custom
Header Type  
  • standard
  • device driver
  • desk accessory
  • custom
RSEG Application  
boolean  


PowerPC Project

Table A.4 lists the PPC Project class properties.

Table 0.4 PPC Project Class

 

Name
Property Type
Project Type  
  • standard application
  • code resource
  • library
  • shared library
File Name  
string  
File Creator  
string  
File Type  
string  
Minimum Size  
integer  
Preferred Size  
integer  
SIZE Flags  
small integer   (SIZE flag bits must be computed as an integer value)  
SYM File  
string  
Resource Name  
string  
Display Dialogs  
boolean  
Merge To File  
boolean  
Resource Flags  
small integer  
Resource Type  
string  
Resource ID  
small integer  
Stack Size  
integer  
Header Type  
  • none
  • native

.


Java Project

Table A.5 lists the Java Project class properties.

Table 0.5 Java Project Class

 

Name
Property Type
Main Class  
string  
Java Project Type  
  • java applet
  • java application
  • java library
Arguments  
string  
Compress  
boolean  
HTML Helper App  
string  

.


Win32/x86 Project

Table A.6 lists the x86 Project class properties.

Table 0.6 x86 Project Class

 

Name
Property Type
Project Type  
  • standard application
  • shared library
  • library
File Name  
string  
Min Heap Size  
integer  
Preferred Heap Size  
integer  
Base Address  
integer  
Max Stack Size  
integer  
Min Stack Size  
integer  


Access Paths

Table A.7 lists the properties for the Access Paths Class.

Table 0.7 Access Paths Class

 

Name
Property Type
User Paths  
list (of path information records)  
Always Full Search  
boolean  
Convert Paths  
boolean  
System Paths  
list (of path information records)  


Path Information

A path information record may contain the properties shown in Table A.8. It must contain at least the name field.

Table 0.8 Path Information Class

 

Name
Property Type
name  
string  
recursive  
boolean  
origin  
  • absolute
  • project relative
  • shell relative
  • system relative
host flags  
  • 1 (for the Mac OS)
  • 2 (for Windows)

If you use a string instead of a path information record, CodeWarrior sets recursive to true and origin to project relative.

To clear all the access path entries listed in the Access Paths preference panel, set the User Paths or System Paths property to an empty list. For example, in AppleScript, this statement removes all entries, including the default entries, {Project } and {Compiler }:


Set Preferences of panel "Access Paths" to ¬
 {User Paths: {}, System Paths: {} }

To add a default entry back, add an access path record with the name set to ":" and with the origin set to project relative (for {Project }) or shell relative (for {Compiler }). For example, this statement sets User Paths to {Project } and System Paths to {Compiler }:


Set Preferences of panel "Access Paths" to ¬
 {User Paths:  {{name: ":", ¬
          origin: project relative}},¬
  System Paths: {{name: ":", ¬
          origin: shell relative}}}

For more information on the meaning of the properties listed in Table A.7 and Table A.8, see "Access Paths".


Target Settings

You set the current target parameters in the Target Settings options panel with the properties shown in Table A.9.

Table 0.9 Target Settings Class

 

Name
Property Type
Target Name  
string  
Linker  
string  
Post Linker  
string  
Output Directory Path  
string  
Output Directory   Origin  
  • absolute
  • project relative
  • shell relative
  • system relative
Pre Linker  
string  

The Target Name string is the name of the target (you choose this name). The Linker string must be the name of one of the files in the Linkers folder of the CodeWarrior Plugins folder. The Post Linker string must be the name of one of the files in the Post Linkers folder of the CodeWarrior Plugins folder. The Output Directory Path string is a string that points to a location on your hard disk where the output files should be placed after linking. You can make this path absolute, or you can make it relative to the location of the project (project relative), compiler (compiler relative), or system (system relative).

The following is a list of the names of the linkers included with CodeWarrior:

For example, the following statement changes the current target to Macintosh 68K:


Set Preferences of panel "Target Settings" to ¬
 {Linker: "MacOS 68K Linker"}


File Mapping Information

The File Mapping Information is a list of all the types of files you can include in the current project. It contains records described in Table A.10.

Table 0.10 File Mapping Information Class

 

Name
Property Type
File Type  
string  
Extension  
string  
Precompiled  
boolean  
Resource File  
boolean  
Launchable  
boolean  
Ignored by Make  
boolean  
Compiler  
string  

The Compiler string must be the name of one of the files in the Compilers folder of the CodeWarrior Plugins folder. These names are different from the names that appear in the Compiler pop-up menu of the Target preference panel. Table A.11 shows you which name to use for the compilers included with CodeWarrior.

Table 0.11 Choosing a compiler

 

To target...
with...
specify this string.
68K   Macintosh  
Metrowerks C/C++  
"MW C/C++ 68K"  
Metrowerks Pascal  
"MW Pascal 68K"  
Rez  
"Rez"  
Library Importer  
"Lib Import 68K"  
MPW .o Importer  
"MPW Import 68K"  
PEF Importer  
"PEF Import 68K"  
Power Macintosh  
Metrowerks C/C++  
"MW C/C++ PPC"  
Metrowerks Pascal  
"MW Pascal PPC"  
Rez  
"Rez"  
Library Importer  
"Lib Import PPC"  
PEF Importer  
"PEF Import PPC"  
XCOFF Importer  
"XCOFF Import PPC"  
Win32/x86  
Metrowerks C/C++  
"MW C/C++ x86"  
Resource Compiler  
"MW WinRC"  
Resource Importer  
"WinRes Import"  
x86 Lib Importer  
"Lib Import x86"
x86 Obj Import  
"Obj Import x86"  
Java  
Java  
"MW Java"  

To specify that a file isn't compiled, use the empty string "" for the compiler. For example, these statements show how to add an entry for text files that end in .txt and are not compiled.


set currPrefs to Get Preferences from panel "Target"
set Mappings of currPrefs to ¬
 Mappings of currPrefs & ¬
 {{File Type:"TEXT", Extension:".txt", ¬
  Compiler:"", Precompiled:false, ¬
  Resource File:false, Launchable:true, ¬
  Ignored by Make:true}}
Set Preferences of panel "Target" to currPrefs


Segment

The Segment Class properties, as shown in Table A.12, contain information about a segment or group in the open project,

Table 0.12 Segment Class

 

Name
Property Type
name  
string  
filecount   (read only)  
small integer  
seg-preloaded   (68K only)  
boolean  
seg-protected   (68K only)  
boolean  
seg-locked   (68K only)  
boolean  
seg-purgeable   (68K only)  
boolean  
seg-system heap   (68K only)  
boolean  


Project File

The Project File Class contains information about an entry in a project file. Table A.13 illustrates the available properties.

Table 0.13 Project File Class

 

Name
Property Type
filetype (read only)  
  • source
  • unknown
name (read only)  
string  
disk file (read only)  
file specification  
codesize (read only)  
integer  
datasize (read only)  
integer  
up to date (read only)  
boolean  
symbols  
boolean  
initialize before  
boolean  
includes (read only)  
file specification  
weak link (PPC only)  
boolean  

.


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 02, 2000