MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Compile[Next]: Component
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Source Code->Commands->Compile->Compile Options

Compile Options

The options shown here are valid for the "compile" command, you may need to alter these options to work around cabinet file limitations.

Please see the "options for commands" section of the manual for generic configuration details on how these can be altered:

;----------------------------------------------------------------------------
;--- Options that can be varied by "COMPILE" command ------------------------
;----------------------------------------------------------------------------
#define? COMPILE_CABDDF_Compress               ON                  ;;ON/OFF - Want to compress files?
#define? COMPILE_CABDDF_CompressionType        <$COMPRESS_MEDIUM>
#define? COMPILE_CABDDF_CompressionLevel       7                   ;;Valid 1-7
#define? COMPILE_CABDDF_CompressionMemory      21                  ;;Valid 10-21
#define? COMPILE_CABDDF_ClusterSize            4096                ;;Safe for CD-ROM, floppies (512) etc
#define? COMPILE_CAB_FILE_NAME                 MM*                 ;;Name of generated 8.3 formatted CAB filename (without extension). MM01.cab, MM01_2.cab etc.


;------------------------------------------------------------------------------------
;--- MAKEMSI generates some COMPILE commands for you (choose the "cache" option!) ---
;------------------------------------------------------------------------------------
#define?  COMPILE_CACHE_VALUE_FOR_COMPILE_TO_PREPARE_FOR_MM_MERGE
#define?  COMPILE_CACHE_VALUE_FOR_COMPILE_ENDPASS1


;----------------------------------------------------------------------------
;--- For "COMPILE_CABDDF_MaxDiskSize" (2GB limit on cabinet) ----------------
;----------------------------------------------------------------------------
#ifndef COMPRESS_MAX_VALID_CAB_SIZE                            ;;0 would work if not for MAKECAB.EXE bug(s)
    ;--- User hasn't overriden value so define to 2GB less a safety margin ---
    #define   @@2GB           2000000000                       ;;2GB as per "http://en.wikipedia.org/wiki/Gigabyte"
    #define   @@SafetyMargin  1 * 1024 * 1024                  ;;Allow 1MB
    #evaluate ^COMPRESS_MAX_VALID_CAB_SIZE^ ^<$@@2GB> - (<$@@SafetyMargin>)^
#endif


;----------------------------------------------------------------------------
;--- More options (only those above can vary per "COMPILE" command) ---------
;----------------------------------------------------------------------------
#define? COMPILE_SRC_FILE_NAME                 <$ProdInfo.MsiName>            ;;Name of generated SOURCE files (without extension)
#define? COMPILE_MAKECAB_EXE                   MakeCab.exe                    ;;Allow user ability to add path information etc (double quote if it contains spaces!)
#define? COMPILE_MAKECAB_EXE_DOS_WAIT_FOR_EXIT /c                             ;;Change to "/K" to require user to type "exit" (debugging...)
#define? COMPILE_CABDDF_MaxDiskSize            <$COMPRESS_MAX_VALID_CAB_SIZE> ;;One cab of unlimited size (Should be multiple of 512 bytes, 0 = No Limit)!
#define? COMPILE_RESERVED_BYTES_ON_MEDIA1      50000                          ;;On top of that required by MSI (or files specified by "MsiExtraFiles" commands)
#define? COMPILE_CABDDF_ReservePerCabinetSize  8
#define? COMPILE_CABDDF_FolderSizeThreshold    1
#define? COMPILE_CAB_PER_COMPONENT             N                   ;;Doesn't work yet (don't set to "Y"). If you know why let me know!
#define? COMPILE_DELETE_CAB_FILES_IN_LOG_DIR   Y                   ;;Delete these temporary CAB files (Y/N)? May be useful for debugging.
#define? COMPILE_CAB_EXTRA_COMMANDS                                ;;Any extra DDF commands you might wish to add (use "{NL}" for newline)
#define? COMPILE_MAKECAB_VERBOSITY             1                   ;;1 (Low) - 3 (High). Determines how much is displayed/logged during "compile"
#define? COMPILE_SEE_MAKECAB_OUTPUT            1                   ;;1=YES 0=Hide
#define? COMPILE_CAB_RPT_DISPLAY_PREFIX        "    | "
#define? COMPILE_DISKPROMPT_PROPERTY           <$ProdInfo.ProductName> version <$ProductVersion> - [1]      ;;[1] gets replaces with "DiskPrompt" from "Media" table
#define? COMPILE_HOOK_BEFORE_MAY_NOT_HAVE_ANY_FILES                ;;HOOK: Just before checking file count, if no files then next hook never invoked.
#define? COMPILE_HOOK_BEFORE                                       ;;HOOK: We know we need to do something :-)
#if ['<$COMPILE_CABDDF_MaxDiskSize>' = <$COMPRESS_MAX_VALID_CAB_SIZE>]
    ;--- User did not specify media size so no point having external --------
    #define? COMPILE_TYPE   <$COMPILE_CAB_IMBEDDED_INTO_MSI>
#elseif
    ;--- User specified a media size so default to external cabs! -----------
    #define? COMPILE_TYPE   <$COMPILE_CAB_EXTERNAL_WITH_MSI>
#endif

;----------------------------------------------------------------------------
;--- Where are the external CABs placed? ("{#}" = disk number) --------------
;----------------------------------------------------------------------------
#define? COMPILE_MEDIA_DISK2_ONWARDS_DIR.D   .               ;;Same directory as MSI (good for testing - No need to create media)
#define? COMPILE_MEDIA_DISK2_ONWARDS_DIR.P   OtherDisks.MSI\<$COMPILE_MEDIA_VolumeLabel_TEMPLATE>
#define? COMPILE_MEDIA_DISK2_ONWARDS_DIR     <$COMPILE_MEDIA_DISK2_ONWARDS_DIR.[MMMODE]>


;----------------------------------------------------------------------------
;--- Some other MULTI CAB/DISK templates ("{#}" = disk number) --------------
;----------------------------------------------------------------------------
#define? COMPILE_MEDIA_DISK_NUMBER_DESC_TEMPLATE  Disk #{#}
#define? COMPILE_MEDIA_VolumeLabel_TEMPLATE       AppDisk #{#}


;----------------------------------------------------------------------------
;--- Compile types ----------------------------------------------------------
;----------------------------------------------------------------------------
#define COMPILE_CAB_IMBEDDED_INTO_MSI  ImbeddedCabs   ;;default method, cans imbedded within the MSI
#define COMPILE_CAB_EXTERNAL_WITH_MSI  ExternalCabs   ;;Cab filename MUST be 8.3 format!


;----------------------------------------------------------------------------
;--- Media Capacities (warning, see: COMPRESS_MAX_VALID_CAB_SIZE) -----------
;----------------------------------------------------------------------------
#define? COMPRESS_CAPACITY_CDROM      (640*1024*1024)    ;;640MB (as bytes)
#define? COMPRESS_CAPACITY_DVD-R(SL)  4707319808         ;;DVD capacities from: http://en.wikipedia.org/wiki/DVD#DVD_disc_capacity
#define? COMPRESS_CAPACITY_DVD-R(DL)  8543666176
#define? COMPRESS_CAPACITY_DVD+R(SL)  4700372992
#define? COMPRESS_CAPACITY_DVD+R(DL)  8547991552



;----------------------------------------------------------------------------
;--- Known Compression levels -----------------------------------------------
;----------------------------------------------------------------------------
#define  COMPRESS_NONE      NONE                ;;2007-09-12: Doesn't appear to work?
#define  COMPRESS_MEDIUM    MSZIP
#define  COMPRESS_BEST      LZX                 ;;Builds smallest MSI

Options that Vary by Processing Mode

You should note that the following definitions override some of the above, the values vary based on the processing mode (development or production):

;----------------------------------------------------------------------------
;--- Which compression to use? ----------------------------------------------
;----------------------------------------------------------------------------
#define? COMPILE_COMPRESSION_TYPE_4_PRODUCTION     <$COMPRESS_BEST>
#define? COMPILE_COMPRESSION_TYPE_4_NOT_PRODUCTION <$COMPRESS_MEDIUM>
#define? COMPILE_COMPRESS_4_PRODUCTION             ON
#define? COMPILE_COMPRESS_4_NOT_PRODUCTION         ON
#if ['<$MmMode>' = '<$MMMODE_PRODUCTION>']
   ;--- Production mode -----------------------------------------------------
   #define? COMPILE_CABDDF_CompressionType    <$COMPILE_COMPRESSION_TYPE_4_PRODUCTION>
   #define? COMPILE_CABDDF_Compress           <$COMPILE_COMPRESS_4_PRODUCTION>
#elseif
   ;--- Other mode ----------------------------------------------------------
   #define? COMPILE_CABDDF_CompressionType    <$COMPILE_COMPRESSION_TYPE_4_NOT_PRODUCTION>
   #define? COMPILE_CABDDF_Compress           <$COMPILE_COMPRESS_4_NOT_PRODUCTION>
#endif


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Compile[Next]: Component


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday August 13 2017 at 2:39pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.