Resources | Resources |



Compiling from the command line

Brew MP resource files can be compiled from the command line. The resource compiler, brewrmc.exe, automatically includes all the Brew MP inc paths.

Note: When compiling CIF into MIF from the command-line, be sure to specify the MIF extension in the -o option.

To compile Brew MP resource files from the command line

  1. If a command prompt window is not already open, do one of the following to open one.
    • For Windows 2000, click Start > Programs > Accessories > Command Prompt.
    • For Windows XP, click Start > Run. Enter cmd and press OK.
  2. At the command prompt, navigate to .
  3. Type the following command.
    • brewrmc [option] (See options listed below.)

      Option Description
      [-outfile/-o/-out] Override default naming convention, create output BRX, BAR, MIF, CAR, or CIF file, depending on operation.

      Note: The brewrmc creates a BAR file by default. However, if you are compiling a CIF, make sure you specify the MIF extension with this option.

      -infile/-in Specifies input BRX, BAR, MFX, CIF, or CAR file, depending on operation.
      -I/-include Specify additional Include path(s) for resource data. For multiple include paths, repeat the option before each path. For example: brewrmc -I -I .

      Note: Relative paths for this option should be relative to the location of the CAR file, not the current directory.

      -src Specifies the name of the file where CIFC will output the necessary C-code stub for the module.
      -d Generate stub code for a dynamic module.

      Sets the operation to compile the XML source to Brew binary. If input file is a BRX/MFX file, user has to explicitly specify this command along with 'convert' command

      -decompile/-decomp Sets the operation to decompile the Brew binary to XML source.
      -mod Current output module name, which is used in the generated stub code.
      -mif Specifies the MIF file name.
      -modci Specifies the function to be called to create the module entry class.
      -pre Specifies the name of the file to output pre-processed CIF.
      -input_mif Specify the input MIF file to decompile to CIF file.
      -s Generates code for a static stub.
      -help/-h/-? Displays a description of all the available parameters. (Does not launch the Brew MP Resource Compiler.)
      -version/-ver Displays the current version. (Does not launch the Brew MP Resource Compiler.)
      -hloc Sets the location of the header file to be generated when a CAR file is compiled. If this option is not given, the header file will be generated in the same directory as the BAR file. Relative paths entered will be treated as relative to the CAR file location.

To compile CIF files, type the following in the command prompt.

brewrmc.exe -I "/IncludePath" -in MyApp.cif <-o MyApp.mif>

brewrmc.exe -in -o

Entering paths and filenames on the command line

When you are entering paths and filenames on the command line to run the Resource Manager, keep the following rules in mind.

  • When you enter a relative path on the command line, the path is relative to the current directory (except for -I option as noted above).
  • If the paths and filenames you enter on the command line contain spaces, you must enclose them with quotation marks. For example, if you typed the path:

    C:\brew apps\samplecode\

    All characters in the path after the word "brew" would be ignored. The correct way to type the path is:

    "C:\brew apps\samplecode\".