/// <summary> /// Instantiate a new CabinetWorkItem. /// </summary> /// <param name="fileRows">The collection of files in this cabinet.</param> /// <param name="cabinetFile">The cabinet file.</param> /// <param name="maxThreshold">Maximum threshold for each cabinet.</param> /// <param name="compressionLevel">The compression level of the cabinet.</param> /// <param name="binderFileManager">The binder file manager.</param> public CabinetWorkItem(FileRowCollection fileRows, string cabinetFile, int maxThreshold, Cab.CompressionLevel compressionLevel /*, BinderFileManager binderFileManager*/) { this.cabinetFile = cabinetFile; this.compressionLevel = compressionLevel; this.fileRows = fileRows; //this.binderFileManager = binderFileManager; this.maxThreshold = maxThreshold; }
/// <summary> /// Instantiate a new CabinetWorkItem. /// </summary> /// <param name="fileRows">The collection of files in this cabinet.</param> /// <param name="cabinetFile">The cabinet file.</param> /// <param name="maxThreshold">Maximum threshold for each cabinet.</param> /// <param name="compressionLevel">The compression level of the cabinet.</param> /// <param name="binderFileManager">The binder file manager.</param> public CabinetWorkItem(FileRowCollection fileRows, string cabinetFile, int maxThreshold, Cab.CompressionLevel compressionLevel, BinderFileManager binderFileManager) { this.cabinetFile = cabinetFile; this.compressionLevel = compressionLevel; this.fileRows = fileRows; this.binderFileManager = binderFileManager; this.maxThreshold = maxThreshold; }
/// <summary> /// Creates a Media row that belongs to a table. /// </summary> /// <param name="sourceLineNumbers">Original source lines for this row.</param> /// <param name="table">Table this Media row belongs to and should get its column definitions from.</param> public MediaRow(SourceLineNumberCollection sourceLineNumbers, Table table) : base(sourceLineNumbers, table) { // default the compression level to mszip this.compressionLevel = Cab.CompressionLevel.Mszip; }
public override StringCollection ParseCommandLine(string[] args, ConsoleMessageHandler consoleMessageHandler) { for (int i = 0; i < args.Length; ++i) { string arg = args[i]; if (null == arg || 0 == arg.Length) // skip blank arguments { continue; } if ('-' == arg[0] || '/' == arg[0]) { string parameter = arg.Substring(1); if (parameter.Equals("bcgg", StringComparison.Ordinal)) { consoleMessageHandler.Display(this, WixWarnings.DeprecatedCommandLineSwitch(parameter)); this.backwardsCompatibleGuidGen = true; } else if (parameter.Equals("cc", StringComparison.Ordinal)) { this.cabCachePath = CommandLine.GetDirectory(parameter, consoleMessageHandler, args, ++i); if (String.IsNullOrEmpty(this.cabCachePath)) { return this.invalidArgs; } } else if (parameter.Equals("ct", StringComparison.Ordinal)) { if (!CommandLine.IsValidArg(args, ++i)) { consoleMessageHandler.Display(this, WixErrors.IllegalCabbingThreadCount(String.Empty)); return this.invalidArgs; } try { this.cabbingThreadCount = Convert.ToInt32(args[i], CultureInfo.InvariantCulture.NumberFormat); if (0 >= this.cabbingThreadCount) { consoleMessageHandler.Display(this, WixErrors.IllegalCabbingThreadCount(args[i])); } consoleMessageHandler.Display(this, WixVerboses.SetCabbingThreadCount(this.cabbingThreadCount.ToString())); } catch (FormatException) { consoleMessageHandler.Display(this, WixErrors.IllegalCabbingThreadCount(args[i])); } catch (OverflowException) { consoleMessageHandler.Display(this, WixErrors.IllegalCabbingThreadCount(args[i])); } } else if (parameter.Equals("cub", StringComparison.Ordinal)) { string cubeFile = CommandLine.GetFile(parameter, consoleMessageHandler, args, ++i); if (String.IsNullOrEmpty(cubeFile)) { return this.invalidArgs; } this.validator.AddCubeFile(cubeFile); } else if (parameter.StartsWith("dcl:", StringComparison.Ordinal)) { string defaultCompressionLevel = arg.Substring(5); if (String.IsNullOrEmpty(defaultCompressionLevel)) { return this.invalidArgs; } this.defaultCompressionLevel = WixCreateCab.CompressionLevelFromString(defaultCompressionLevel); } else if (parameter.Equals("eav", StringComparison.Ordinal)) { this.exactAssemblyVersions = true; } else if (parameter.Equals("fv", StringComparison.Ordinal)) { this.setMsiAssemblyNameFileVersion = true; } else if (parameter.StartsWith("ice:", StringComparison.Ordinal)) { this.ices.Add(parameter.Substring(4)); } else if (parameter.Equals("contentsfile", StringComparison.Ordinal)) { this.contentsFile = CommandLine.GetFile(parameter, consoleMessageHandler, args, ++i); if (String.IsNullOrEmpty(this.contentsFile)) { return this.invalidArgs; } } else if (parameter.Equals("outputsfile", StringComparison.Ordinal)) { this.outputsFile = CommandLine.GetFile(parameter, consoleMessageHandler, args, ++i); if (String.IsNullOrEmpty(this.outputsFile)) { return this.invalidArgs; } } else if (parameter.Equals("builtoutputsfile", StringComparison.Ordinal)) { this.builtOutputsFile = CommandLine.GetFile(parameter, consoleMessageHandler, args, ++i); if (String.IsNullOrEmpty(this.builtOutputsFile)) { return this.invalidArgs; } } else if (parameter.Equals("wixprojectfile", StringComparison.Ordinal)) { this.wixprojectFile = CommandLine.GetFile(parameter, consoleMessageHandler, args, ++i); if (String.IsNullOrEmpty(this.wixprojectFile)) { return this.invalidArgs; } } else if (parameter.Equals("O1", StringComparison.Ordinal)) { consoleMessageHandler.Display(this, WixWarnings.DeprecatedCommandLineSwitch("O1")); } else if (parameter.Equals("O2", StringComparison.Ordinal)) { consoleMessageHandler.Display(this, WixWarnings.DeprecatedCommandLineSwitch("O2")); } else if (parameter.Equals("pdbout", StringComparison.Ordinal)) { this.pdbFile = CommandLine.GetFile(parameter, consoleMessageHandler, args, ++i); if (String.IsNullOrEmpty(this.pdbFile)) { return this.invalidArgs; } } else if (parameter.Equals("reusecab", StringComparison.Ordinal)) { this.reuseCabinets = true; } else if (parameter.Equals("sa", StringComparison.Ordinal)) { consoleMessageHandler.Display(this, WixWarnings.DeprecatedCommandLineSwitch(parameter)); this.suppressAssemblies = true; } else if (parameter.Equals("sacl", StringComparison.Ordinal)) { this.suppressAclReset = true; } else if (parameter.Equals("sbuildinfo", StringComparison.Ordinal)) { consoleMessageHandler.Display(this, WixWarnings.DeprecatedCommandLineSwitch(parameter)); } else if (parameter.Equals("sf", StringComparison.Ordinal)) { consoleMessageHandler.Display(this, WixWarnings.DeprecatedCommandLineSwitch(parameter)); this.suppressAssemblies = true; this.suppressFileHashAndInfo = true; } else if (parameter.Equals("sh", StringComparison.Ordinal)) { consoleMessageHandler.Display(this, WixWarnings.DeprecatedCommandLineSwitch(parameter)); this.suppressFileHashAndInfo = true; } else if (parameter.StartsWith("sice:", StringComparison.Ordinal)) { this.suppressICEs.Add(parameter.Substring(5)); } else if (parameter.Equals("sl", StringComparison.Ordinal)) { this.suppressLayout = true; } else if (parameter.Equals("spdb", StringComparison.Ordinal)) { this.suppressWixPdb = true; } else if (parameter.Equals("spsd", StringComparison.Ordinal)) { this.suppressPatchSequenceData = true; } else if (parameter.Equals("sval", StringComparison.Ordinal)) { this.suppressValidation = true; } else { this.invalidArgs.Add(arg); } } else { this.invalidArgs.Add(arg); } } this.pdbFile = this.suppressWixPdb ? null : this.pdbFile; return this.invalidArgs; }
/// <summary> /// Creates an MSI binder. /// </summary> public Binder() { this.defaultCompressionLevel = Cab.CompressionLevel.Mszip; this.suppressICEs = new StringCollection(); this.ices = new StringCollection(); this.invalidArgs = new StringCollection(); this.validator = new Validator(); // Need fileTransfers handle for NewCabNamesCallBack callback this.fileTransfers = new ArrayList(); this.newCabNamesCallBack = NewCabNamesCallBack; this.lastCabinetAddedToMediaTable = new Dictionary<string, string>(); this.nonEmptyProductCodes = new StringCollection(); this.nonEmptyTransformNames = new StringCollection(); this.emptyTransformNames = new StringCollection(); }
/// <summary> /// Instantiate a new CabinetWorkItem. /// </summary> /// <param name="fileRows">The collection of files in this cabinet.</param> /// <param name="cabinetFile">The cabinet file.</param> /// <param name="compressionLevel">The compression level of the cabinet.</param> public CabinetWorkItem(FileRowCollection fileRows, string cabinetFile, Cab.CompressionLevel compressionLevel) { this.cabinetFile = cabinetFile; this.compressionLevel = compressionLevel; this.fileRows = fileRows; }