Command-line Utilities
PRELIMINARY
download MacOS X executables
ls_far
ls_far file.far
Very simple program that just lists the length and name of each entry in the .far file.
ls_iff
ls_iff [-l] file.iff
Without the -l option, a summary of the contents of the file is printed. With the -l option, the as much as is known about each resource is also printed. (In some cases, the resource type is well understood and a complete analysis is printed; in others, the resource type is poorly understood (if at all) and only a hexidecimal dump of the initial bytes is printed.)
un_far
un_far file.far directory [suffix ...]
The contents of the .far file are unpacked into the specified directory. If any suffixes are present, only entries whose name ends in one of the suffixes are unpacked.
No directories are created (even if the contents of the .far file go in subdirecories); they must be created in advance of running un_far.
un_iff
un_iff file.iff directory [type ...]
The resources in the .iff file are unpacked into the specified directory. Normally, filler resources (resource type `XXXX') and the resource map (resource type `rsmp') are not unpacked. However, if any types are present, only resources of the specified type(s) are unpacked, which can include filler resources and the resource map.
A text file named .toc is also created in the directory. It contains the filename where the resource was unpacked and the resource type, ID, flags, and name string.
mk_far
mk_far out.far src-arg ...
The source arguments are processed in turn and written to the output file in .far format.
- If the source argument is another .far file, each element of the source .far file is added to the output .far file.
- If the source argument is a regular file, the file is added to the output .far file.
- If the source argument is a directory, each file in the directory is added to the output of the .far file.
- Otherwise, the argument is ignored.
Thus, mk_far out.far in.far makes a copy of the source .far file
(in fact, they are usually bit-for-bit identical afterwards).
And mk_far out.far in1.far in2.far combines the contents
of two source .far files into a single file.
And m_far out.far file.iff dir
will put in one .iff file
and then all the files in the directory.
mk_iff
mk_iff out.iff src-arg ...
The source arguments are processed in turn and then the accumulated inputs are written to the output file in .iff format.
- If the source argument is another .iff fike. each resource of the source .iff file is added to the output .iff file.
- If the source argument is a directory, the file .toc in that directory is used. (In other words, if you said path/to/dir it's as if you had said path/to/dir/.toc.)
- If the source argument is a regular file, it is assumed to be a text table-of-contents file and each line is evaluated for a resource to be added to the output archive. Relative pathnames within the file are relative to the directory in which the file is located.
- Otherwise, the source argument is ignored.
Thus, mk_iff out.iff in.iff makes an effectively identical copy
of the source .iff file.
They may not be bit-for-bit identical,
since the resources may be in a different order
and any filler resources (resource type `XXXX') will be stripped out.
And mk_iff out.iff in.iff in.spf in.stx
will create one combined .iff file from the various separated components.
And mk_iff out.iff in.iff in-dir/.toc
will create a new .iff file from the source .iff file
after applying the changed resources in in-dir.
The Sims™ is a trademark of Maxis and Electronic Arts.
This page was last modified Wednesday, 24-Sep-2003 23:54:23 UTC.
