MakePack
The MakePack program can be used for creating .rez files, an alternative to the .pk3 files created by pakscape. One advantage of .rez files is that you can store streaming media, such as sounds and movies in this format. MakePack is a command line program that can be run from the Windows cmd.ex program. MakePack is installed in your MDK/bin folder (typically Program Files\EA Games\Medal of Honor Pacific Assault(tm)\MDK\bin).
Usage: MakePack infile
����������� where infile is the name of either the .rez
file (for extracting) or the script file (for creating .rez files).
Switches :
-Z ������ ����������� Do not save the .h
-V������� ����������� Verbose output
-M������ ����������� Create a manifest file (outfile.csv)
-L������� ����������� Dump a file list to "FileList.txt"
-S������� ����������� Suppress output, useful for debugging input scripts
-X *.ext���������� Extract
file(s) with a wildcard, where ext is
the file name extension.
Script Commands
For filename operands, quotes are optional, but recommended. Spaces are accepted inside quotes, but discouraged. Environment variables are invoked by using the form %PATH% where the word PATH is replaced with the variable to be used. Comments are C++ double slash style.
outputname
Specify the name of the output file. This command should occur only once and near the beginning of the script. If found a second time, it will trigger an error.
Examples:
outputname "Outputfilename.pak"
outputname "z:\data\foo\data.pak"
compress
Specify the compression algorithms to use on the data if compression is allowed. The dontpack command will take precidence on a file, but if compression is allowed, attempt to use these codecs.
Codecs supported (use a maximum of three):
lzss ����� ����������� A custom lzss
codec, not compatible with the one that's out on the 'net, extremely fast
decoding
rle ������ ����������� A simple run
length encoder, extremely fast decoding
inflate�� ����������� ZLib compression,
slow decoding.
lz77 ���� ����������� LZW. Decent
compression, but not as good as inflate
huffman ���������� Straight huffman compression. Moderate decoding speed, and
great for high concentrations of few numbers
lzari ���������������� Great compression, sucks at decoding time
Examples:
compress none������������������������ // Completely shut off
ALL compression
compress inflate,lzss,rle ����������� //
Use these three codecs
compress lzss�������������� ����������� //
Use lzss only.
basedirectory
Specify the base directory for where all subsequent file operations will work from. The default is the same directory that the script file itself exists. This command will allow the script file to be placed anywhere on the hard drive and import data from any other directory. Note: This should be a fully qualified pathname with a drive letter.
Examples:
basedirectory "Z:\mohpa\data\demo"
basedirectory "Z:\mohpa\data\release"
add
Filename to include into the pack file. Wildcards are
acceptable.
Examples:
add "*.tga"������������������ // Include tga files in this
directory only
add "data\*.*"� ����������� //
Include all files in the directory "data"
addrecursive
Filename to include into the pack file. Wildcards are
acceptable. If any directories are found, they will be recursively searched and
all their matching contents will be included.
Examples:
addrecursive "*.tga"����������������� // Include all tga files
addrecursive "data\*.*"������������ // Include all files in the data folder
addrecursive "*.*"������� ����������� //
Include everything
remove
Filename to explictly exclude from the pack file. Wildcards are
acceptable.
Examples:
remove "*.bmp"����������������������� // Remove all bmp files
from the root folder
remove "temp\*.*"������������������� // Remove all files in the
temp folder
removerecursive
Filename to explictly exclude from the pack file. Wildcards are
acceptable. If any directories are found, they will be recursively searched and
all their matching contents will be removed.
Examples:
removerecursive "*.gif"������������ // Exclude all gif files
removerecursive
"logfile\*.*"���� // Exclude all
files in the logfile folder
removerecursive "*.*"�������������� // Remove everything (Why? But then,
you can do it if you want to)
pack
Filenames that are allowed to be compressed. The default is no compression.
Examples:
pack "*.*"������������������������������� // Pack
everything
pack "*.tga"����������������������������� // Pack tga files
pack "data\*.*"������������ ����������� //
Pack everything in the data folder
dontpack
Filenames that are explictily barred from being compressed. Useful in hinting that movie and compress audio files do not need to be compressed a second time.
Examples:
dontpack "*.mp3"�������������������� // Don't pack mp3s
dontpack "*.avi"���������������������� // Don't pack movie
files.
Example Script
// Preflight
compress inflate,lzss,rle������������ ����������� //
Enable these codecs
basedirectory
"Z:\PackFileTest\demo"�� //
Working data folder
cachename "DemoCache"�������������������� // Save the cache here
outputname "pak0.rez"������������������������� // Output file
// Grab the files
addrecursive "*.*"������������������������������� // Grab
everything
removerecursive "*.tmp"���������������������� // Don't add the temp
files
remove "settings.ini"����������������������������� // Don't include
this into the
pack file
// Twiddle compression
pack "*.*"������������������������������������������� //
This is the default
dontpack "*.bik"���������������������������������� // Yeah,
right
dontpack "*.mp3"�������������������������������� // Nope, no
need to waste my time on this