Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Make.d package feature

This topic covers make.d packaging rules to create and delete .brewmp packages.

The Brew MP Packager (Bmppackager.exe) is a utility used to generate .tar files in the format required by Brew MP for Brew MP module installation. Packager supports most common BREW and Brew MP directory layouts, verifies contents, and packages them.

The following make.d options use the Packager to generate .brewmp files.

  • brewmp_src_path points to the location of the required binaries to package. The default location is <\package\$(V)>, where V is the variant (e.g. Win32_Debug) selected.
  • brewmp_dest_path points to the location of the resulting package (.brewmp) file. The default location is \run.
  • BREWMP_INPUT is a variable defined in a project-specific makefile, used to specify the files that need to be packaged. The following example demonstrates usage.

    BREWMP_INPUT =  [;directory relative to	module] 

    The directory is relative to the module. The directory path (if any) relative to the module directory on target can be specified using ";". This should not contain any spaces.

A full package is a package file with all the files mentioned in BREWMP_INPUT.

A partial package is a package file with only those files mentioned in BREWMP_INPUT that are updated from last successful (full/partial) package creation. For example, If Hello.png and MyApp.mod files were updated, the partial package will look like the following:

/MyApp
   MyApp.mod
      /en
         Hello.png

BREWMP_INPUT example

The following is an example of BREWMP_INPUT.

BREWMP_INPUT = 
   C:/Temp/Test.mp3 \
   C:/Brew/MyApp/MyApp.mif \
   C:/Brew/MyApp/MyApp.mod \
   C:/Sample/Hello.png;{en} \
   C:/Sample/Hello1.png;{es} \
   C:/Brew/MyApp/test.abc \
   $(call _shortname,C:/Temp/path with space/myfile);{hello} \
   C:/Temp/file;{dir1/dir2/dir3} \

This input will result in the following directory structure after installation on the target.

/MyApp
   MyApp.mif
   MyApp.mod
   test.abc
      /en
         Hello.png
      /es
         Hello1.png
      /hello
         myfile

Packaging multiple modules in a single package

The following is an example of multiple modules to package in a single .brewmp file.

/Package
    /Module1
       Module1.mod
       Module1.mif
       Module1.bar              
    /Module2
       Module2.mod
       Module2.mif
       Module2.bar              
    /Module3
       Module3.mod
       Module3.mif
       Module3.bar 

Packaging multiple BAR files

The following is an example of when a module has a large number of BAR files to package.

/Module1
    Module1.mod
    Module1.mif
    Hello1.bar
    Hello2.bar
    Hello3.bar
    Hello4.bar

Example: BREWMP_INPUT undefined

  1. make brewmp_pkg packages binaries from the <\package\$(V)> directory to the <\run> directory, where V is the variant (e.g. Win32_Debug etc) selected.
  2. make brewmp_pkg brewmp_src_path = "C:\Brew MP\Modules\test" packages binaries from the directory. The package will be created under the <\run> directory.
  3. make brewmp_pkg brewmp_dest_path ="C:\Brew MP\Results\test" packages files from the <\package\$(V)> directory to the .
  4. make brewmp_pkg brewmp_src_path="C:\Brew MP\Modules\test" brewmp_dest_path="C:\Brew MP\Results\test" packages binaries from . The package file is created in the .
  5. make brewmp_pkg BMP_PKG_IGNORE_FILES =.cpp packages all files except files with the .cpp extension.

Example: BREWMP_INPUT defined

  1. make brewmp_pkg packages files listed in BREWMP_INPUT under the <\run> directory.

    Note: First time call of this rule creates a full package. Successive invocation of this rule creates a partial package (.brewmp with updated files).

  2. make create_pkg_dir copies files listed in BREWMP_INPUT to the <\package_project_name> directory. Only updated files will be copied.
  3. make clean_pkg

    make brewmp_pkg

    creates a partial package with files that are updated recently. If you want a full package, use this before calling make brewmp_pkg. This rule removes the "donot_delete" directory created by make.d to store the previous files selection history.

Override

The following variables defined in make.d for packaging option which the project-specific makefile can override:

  • brewmp_src_path
  • Brewmp_dest_path
  • To override BMPPACKAGER (-I) Ignore option, define BMP_PKG_IGNORE_FILES variable.
  • To override BMPPACKAGER (-m) module option, define BMP_PKG_MODULE variable.