The "Cabinet" Command |
This command will be used for these main reasons:
Compiled cab files are now cached by default for better build performance.
The main cabinet (compile) related options are:
;--------------------------------------------------------------------------------- ;--- GLOBAL DEFAULT options when option not specified on the "Cabinet" command --- ;--------------------------------------------------------------------------------- #define? CABINET_ALIAS_DEFAULT [DEFAULT] ;;If no or empty alias provided #define? CABINET_ALIAS_FREQUENTLY_CHANGES [FrequentlyChanges] ;; #define? CABINET_CACHE Y ;;Y/N cache results #define? CABINET_CABDDF_Compression ON ;;ON/OFF - Want to compress files? #define? CABINET_CABDDF_CompressionType <$COMPRESS_MEDIUM> #define? CABINET_CABDDF_CompressionLevel 7 ;;Valid 1-7 #define? CABINET_CABDDF_CompressionMemory 21 ;;Valid 10-21 #define? CABINET_CABDDF_ClusterSize 4096 ;;Safe for CD-ROM, floppies (512) etc #define? CABINET_CAB_FILE_NAME_FORMAT MM_* ;;Name of generated 8.3 formatted CAB filename (without extension). MM01.cab, MM01_2.cab etc.
This command provides default cabinet options for any files nested between this command and the associated "/cabinet" command.
The command takes these parameters:
This value represents a set of compile related options which can be specified by the following parameters.
You can refer to this value using the "cabinet" parameter of the "File" and "Files" commands.
This value will influence the cabinet related directories and files and should only include characters that are valid in a Windows file name.
The first time an alias is used (case insensitive) the "MakeCab.EXE" options are saved away.
The following aliases are created by MAKEMSI:
You want to separate the files from others so the cabinet caches are more efficiently utilized.
All files with the same alias are compiled into a windows compressed cabinet together.
#define COMPRESS_NONE NONE ;;2007-09-12: Doesn't appear to work? #define COMPRESS_MEDIUM MSZIP #define COMPRESS_BEST LZX ;;Builds smallest MSI
This determines how the cabinet files/folders are named and these characters have special meaning:
If specified the "/cabinet" command is not required and extensions should begin with "." and be delimited by "|".
Define Some Cabinets |
;--- Put graphics in their own cabinet file (potentially using their own compression settings) --- <$Cabinet "{DEFAULT.Graphics}" Default4=".jpg|.bmp|.gif"> <$Cabinet "{DEFAULT.EXE}" Default4=".exe"> ;--- Add some files into specific cabinets ---------------------------------- <$Cabinet "FILES.1"> <$Files "D:\tmp\1.txt" DestDir="[INSTALLDIR]"> <$/Cabinet> <$Cabinet "FILES.2"> <$Files "D:\tmp\2.txt" DestDir="[INSTALLDIR]"> <$/Cabinet> ;--- These will default, see "Default4" definitions above ------------------- <$Files "D:\tmp\SomeExe.exe" DestDir="[INSTALLDIR]"> <$Files "D:\tmp\SomeGif.gif" DestDir="[INSTALLDIR]"> <$Files "D:\tmp\SomeBmp.bmp" DestDir="[INSTALLDIR]">