Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


MakePPCCodeRsrc

Script

SYNTAX

MakePPCCodeRsrc inputFile -rt resType=ID [-a[ppend]] [-c creator]
[-o outputFile] [-ov] [-procinfo n] [-ra attributes] [-rawpef]
[-rn resName] [-t type]

DESCRIPTION

MakePPCCodeRsrc creates a PowerPC code resource from a PEF file.

INPUT

MakePPCCodeRsrc expects a PEF file as input. The file should contain a single PowerPC code fragment (i.e. PEF container) in the data fork and should also contain a 'cfrg' resource in the resource fork.

OUTPUT

A PowerPC code resource is created and is written to the output file. By default, the code resource will consist of a routine descriptor followed by the PEF container. The -rawpef option can be used to create a code resource without a routine descriptor.

By default, the name of the output file will be the same as the input file with a ".rsrc" extension added. (This can be overridden using the -o option.)

STATUS

MakePPCCodeRsrc can return the following status codes:

0

no errors

1

parameter or option error

2

fatal error

PARAMETERS

inputFile

Specifies a PEF file that contains a single PowerPC code fragment (i.e. PEF container) in the data fork and a 'cfrg' resource in the resource fork.

OPTIONS

-a[ppend]

Appends the resource to the output file rather than replacing the output file. If the resource already exists, it is replaced.

Note
MakePPCCodeRsrc cannot append a resource to a resource file that has its read-only bit set. It also cannot replace a resource that has its protected bit set unless the -ov option is specified. •

-c creator

Sets the output file creator. By default, the creator is set to '????' when creating a new output file and is untouched if the output file already exists.

-o outputfile

Specifies the name of the output file. By default, the name of the output file will be the same as the input file with a ".rsrc" extension added.

-ov

Allows a protected resource to be overwritten when using the -a option.

-procinfo n

Specifies the value that should be stored in the procInfo field of the routine descriptor. The default value is 1.

-ra attributes

Sets the resource attributes. The attributes are specified using one or more keywords or corresponding values. The OR operator (|) is used to combine keywords or values. For example:

-ra 'purgeable|preload'
-ra '32|4'

By default, the resource attributes are set to 0.

-rawpef

Creates a "raw PEF" code resource. The resource will consist of the PEF container only and will not begin with a routine descriptor.

-rn resname

Sets the name of the resource. By default, the resource name is set to a null string.

-rt resType=ID

Specifies the resource type and ID. This option is required.

-t type

Sets the output file type. By default, the file type is set to 'APPL' when creating a new output file and is untouched if the output file already exists.

 
 


Last Updated July 2000