コード例 #1
0
        /// <summary>
        /// Generate the command line arguments to write to the response file from the properties.
        /// </summary>
        /// <returns>Command line string.</returns>
        protected override string GenerateResponseFileCommands()
        {
            WixCommandLineBuilder commandLineBuilder = new WixCommandLineBuilder();

            commandLineBuilder.AppendIfTrue("-ai", this.AllowIdenticalRows);
            commandLineBuilder.AppendIfTrue("-au", this.AllowUnresolvedReferences);
            commandLineBuilder.AppendArrayIfNotNull("-b ", this.BaseInputPaths);
            commandLineBuilder.AppendIfTrue("-bf", this.BindFiles);
            commandLineBuilder.AppendSwitchIfNotNull("-cc ", this.CabinetCachePath);
            commandLineBuilder.AppendIfSpecified("-ct ", this.CabinetCreationThreadCount);
            commandLineBuilder.AppendSwitchIfNotNull("-cultures:", this.Cultures);
            commandLineBuilder.AppendArrayIfNotNull("-d", this.WixVariables);
            commandLineBuilder.AppendExtensions(this.Extensions, this.Log);
            commandLineBuilder.AppendIfTrue("-fv", this.SetMsiAssemblyNameFileVersion);
            commandLineBuilder.AppendArrayIfNotNull("-loc ", this.LocalizationFiles);
            commandLineBuilder.AppendIfTrue("-nologo", this.NoLogo);
            commandLineBuilder.AppendIfTrue("-notidy", this.LeaveTemporaryFiles);
            commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile);
            commandLineBuilder.AppendIfTrue("-pedantic", this.Pedantic);
            commandLineBuilder.AppendIfTrue("-reusecab", this.ReuseCabinetCache);
            commandLineBuilder.AppendIfTrue("-sa", this.SuppressAssemblies);
            commandLineBuilder.AppendIfTrue("-sacl", this.SuppressAclReset);
            commandLineBuilder.AppendIfTrue("-sadmin", this.SuppressDefaultAdminSequenceActions);
            commandLineBuilder.AppendIfTrue("-sadv", this.SuppressDefaultAdvSequenceActions);
            commandLineBuilder.AppendIfTrue("-sdut", this.SuppressDroppingUnrealTables);
            commandLineBuilder.AppendArrayIfNotNull("-sice:", this.SuppressIces);
            commandLineBuilder.AppendIfTrue("-sma", this.SuppressMsiAssemblyTableProcessing);
            commandLineBuilder.AppendIfTrue("-sf", this.SuppressFiles);
            commandLineBuilder.AppendIfTrue("-sh", this.SuppressFileHashAndInfo);
            commandLineBuilder.AppendIfTrue("-sl", this.SuppressLayout);
            commandLineBuilder.AppendIfTrue("-ss", this.SuppressSchemaValidation);
            commandLineBuilder.AppendIfTrue("-sui", this.SuppressDefaultUISequenceActions);
            commandLineBuilder.AppendIfTrue("-sv", this.SuppressIntermediateFileVersionMatching);
            commandLineBuilder.AppendIfTrue("-sval", this.SuppressValidation);
            commandLineBuilder.AppendArrayIfNotNull("-sw", this.SuppressSpecificWarnings);
            commandLineBuilder.AppendIfTrue("-ts", this.TagSectionIdAttributeOnTuples);
            commandLineBuilder.AppendSwitchIfNotNull("-usf", this.UnreferencedSymbolsFile);
            commandLineBuilder.AppendIfTrue("-v", this.VerboseOutput);
            commandLineBuilder.AppendIfTrue("-wx", this.TreatWarningsAsErrors);
            commandLineBuilder.AppendIfTrue("-xo", this.OutputAsXml);
            commandLineBuilder.AppendFileNamesIfNotNull(this.ObjectFiles, " ");

            return(commandLineBuilder.ToString());
        }
コード例 #2
0
        /// <summary>
        /// Builds a command line from options in this task.
        /// </summary>
        protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
        {
            // Always put the output first so it is easy to find in the log.
            commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile);
            commandLineBuilder.AppendSwitchIfNotNull("-pdbout ", this.PdbOutputFile);

            base.BuildCommandLine(commandLineBuilder);

            commandLineBuilder.AppendIfTrue("-ai", this.AllowIdenticalRows);
            commandLineBuilder.AppendIfTrue("-au", this.AllowUnresolvedReferences);
            commandLineBuilder.AppendArrayIfNotNull("-b ", this.baseInputPaths);

            if (null != this.BindInputPaths)
            {
                Queue <String> formattedBindInputPaths = new Queue <String>();
                foreach (ITaskItem item in this.BindInputPaths)
                {
                    String formattedPath = string.Empty;
                    String bindName      = item.GetMetadata("BindName");
                    if (!String.IsNullOrEmpty(bindName))
                    {
                        formattedPath = String.Concat(bindName, "=", item.GetMetadata("FullPath"));
                    }
                    else
                    {
                        formattedPath = item.GetMetadata("FullPath");
                    }
                    formattedBindInputPaths.Enqueue(formattedPath);
                }
                commandLineBuilder.AppendArrayIfNotNull("-b ", formattedBindInputPaths.ToArray());
            }

            commandLineBuilder.AppendIfTrue("-bcgg", this.BackwardsCompatibleGuidGeneration);
            commandLineBuilder.AppendIfTrue("-bf", this.BindFiles);
            commandLineBuilder.AppendSwitchIfNotNull("-cc ", this.CabinetCachePath);
            commandLineBuilder.AppendIfSpecified("-ct ", this.CabinetCreationThreadCount);
            commandLineBuilder.AppendSwitchIfNotNull("-cub ", this.AdditionalCub);
            commandLineBuilder.AppendSwitchIfNotNull("-cultures:", this.Cultures);
            commandLineBuilder.AppendSwitchIfNotNull("-binder ", this.CustomBinder);
            commandLineBuilder.AppendArrayIfNotNull("-d", this.WixVariables);
            commandLineBuilder.AppendSwitchIfNotNull("-dcl:", this.DefaultCompressionLevel);
            commandLineBuilder.AppendIfTrue("-dut", this.DropUnrealTables);
            commandLineBuilder.AppendIfTrue("-eav", this.ExactAssemblyVersions);
            commandLineBuilder.AppendExtensions(this.Extensions, this.ExtensionDirectory, this.referencePaths);
            commandLineBuilder.AppendIfTrue("-fv", this.SetMsiAssemblyNameFileVersion);
            commandLineBuilder.AppendArrayIfNotNull("-ice:", this.Ices);
            commandLineBuilder.AppendArrayIfNotNull("-loc ", this.LocalizationFiles);
            commandLineBuilder.AppendIfTrue("-notidy", this.LeaveTemporaryFiles);
            commandLineBuilder.AppendIfTrue("-pedantic", this.Pedantic);
            commandLineBuilder.AppendIfTrue("-reusecab", this.ReuseCabinetCache);
            commandLineBuilder.AppendIfTrue("-sa", this.SuppressAssemblies);
            commandLineBuilder.AppendIfTrue("-sacl", this.SuppressAclReset);
            commandLineBuilder.AppendIfTrue("-sadmin", this.SuppressDefaultAdminSequenceActions);
            commandLineBuilder.AppendIfTrue("-sadv", this.SuppressDefaultAdvSequenceActions);
            commandLineBuilder.AppendArrayIfNotNull("-sice:", this.SuppressIces);
            commandLineBuilder.AppendIfTrue("-sma", this.SuppressMsiAssemblyTableProcessing);
            commandLineBuilder.AppendIfTrue("-sf", this.SuppressFiles);
            commandLineBuilder.AppendIfTrue("-sh", this.SuppressFileHashAndInfo);
            commandLineBuilder.AppendIfTrue("-sl", this.SuppressLayout);
            commandLineBuilder.AppendIfTrue("-sloc", this.SuppressLocalization);
            commandLineBuilder.AppendIfTrue("-spdb", this.SuppressPdbOutput);
            commandLineBuilder.AppendIfTrue("-spsd", this.SuppressPatchSequenceData);
            commandLineBuilder.AppendIfTrue("-ss", this.SuppressSchemaValidation);
            commandLineBuilder.AppendIfTrue("-sts", this.SuppressTagSectionIdAttributeOnTuples);
            commandLineBuilder.AppendIfTrue("-sui", this.SuppressDefaultUISequenceActions);
            commandLineBuilder.AppendIfTrue("-sv", this.SuppressIntermediateFileVersionMatching);
            commandLineBuilder.AppendIfTrue("-sval", this.SuppressValidation);
            commandLineBuilder.AppendSwitchIfNotNull("-usf ", this.UnreferencedSymbolsFile);
            commandLineBuilder.AppendIfTrue("-xo", this.OutputAsXml);
            commandLineBuilder.AppendSwitchIfNotNull("-contentsfile ", this.BindContentsFile);
            commandLineBuilder.AppendSwitchIfNotNull("-outputsfile ", this.BindOutputsFile);
            commandLineBuilder.AppendSwitchIfNotNull("-builtoutputsfile ", this.BindBuiltOutputsFile);
            commandLineBuilder.AppendSwitchIfNotNull("-wixprojectfile ", this.WixProjectFile);
            commandLineBuilder.AppendTextIfNotNull(this.AdditionalOptions);

            List <string> objectFilePaths = AdjustFilePaths(this.objectFiles, this.ReferencePaths);

            commandLineBuilder.AppendFileNamesIfNotNull(objectFilePaths.ToArray(), " ");
        }
コード例 #3
0
ファイル: Light.cs プロジェクト: zooba/wix3
        /// <summary>
        /// Builds a command line from options in this task.
        /// </summary>
        protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
        {
            // Always put the output first so it is easy to find in the log.
            commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile);
            commandLineBuilder.AppendSwitchIfNotNull("-pdbout ", this.PdbOutputFile);

            base.BuildCommandLine(commandLineBuilder);

            commandLineBuilder.AppendIfTrue("-ai", this.AllowIdenticalRows);
            commandLineBuilder.AppendIfTrue("-au", this.AllowUnresolvedReferences);
            commandLineBuilder.AppendArrayIfNotNull("-b ", this.baseInputPaths);

            if (null != this.BindInputPaths)
            {
                Queue<String> formattedBindInputPaths = new Queue<String>();
                foreach (ITaskItem item in this.BindInputPaths)
                {
                    String formattedPath = string.Empty;
                    String bindName = item.GetMetadata("BindName");
                    if (!String.IsNullOrEmpty(bindName))
                    {
                        formattedPath = String.Concat(bindName, "=", item.GetMetadata("FullPath"));
                    }
                    else
                    {
                        formattedPath = item.GetMetadata("FullPath");
                    }
                    formattedBindInputPaths.Enqueue(formattedPath);
                }
                commandLineBuilder.AppendArrayIfNotNull("-b ", formattedBindInputPaths.ToArray());
            }

            commandLineBuilder.AppendIfTrue("-bcgg", this.BackwardsCompatibleGuidGeneration);
            commandLineBuilder.AppendIfTrue("-bf", this.BindFiles);
            commandLineBuilder.AppendSwitchIfNotNull("-cc ", this.CabinetCachePath);
            commandLineBuilder.AppendIfSpecified("-ct ", this.CabinetCreationThreadCount);
            commandLineBuilder.AppendSwitchIfNotNull("-cub ", this.AdditionalCub);
            commandLineBuilder.AppendSwitchIfNotNull("-cultures:", this.Cultures);
            commandLineBuilder.AppendSwitchIfNotNull("-binder ", this.CustomBinder);
            commandLineBuilder.AppendArrayIfNotNull("-d", this.WixVariables);
            commandLineBuilder.AppendSwitchIfNotNull("-dcl:", this.DefaultCompressionLevel);
            commandLineBuilder.AppendIfTrue("-dut", this.DropUnrealTables);
            commandLineBuilder.AppendIfTrue("-eav", this.ExactAssemblyVersions);
            commandLineBuilder.AppendExtensions(this.Extensions, this.ExtensionDirectory, this.referencePaths);
            commandLineBuilder.AppendIfTrue("-fv", this.SetMsiAssemblyNameFileVersion);
            commandLineBuilder.AppendArrayIfNotNull("-ice:", this.Ices);
            commandLineBuilder.AppendArrayIfNotNull("-loc ", this.LocalizationFiles);
            commandLineBuilder.AppendIfTrue("-notidy", this.LeaveTemporaryFiles);
            commandLineBuilder.AppendIfTrue("-pedantic", this.Pedantic);
            commandLineBuilder.AppendIfTrue("-reusecab", this.ReuseCabinetCache);
            commandLineBuilder.AppendIfTrue("-sa", this.SuppressAssemblies);
            commandLineBuilder.AppendIfTrue("-sacl", this.SuppressAclReset);
            commandLineBuilder.AppendIfTrue("-sadmin", this.SuppressDefaultAdminSequenceActions);
            commandLineBuilder.AppendIfTrue("-sadv", this.SuppressDefaultAdvSequenceActions);
            commandLineBuilder.AppendArrayIfNotNull("-sice:", this.SuppressIces);
            commandLineBuilder.AppendIfTrue("-sma", this.SuppressMsiAssemblyTableProcessing);
            commandLineBuilder.AppendIfTrue("-sf", this.SuppressFiles);
            commandLineBuilder.AppendIfTrue("-sh", this.SuppressFileHashAndInfo);
            commandLineBuilder.AppendIfTrue("-sl", this.SuppressLayout);
            commandLineBuilder.AppendIfTrue("-sloc", this.SuppressLocalization);
            commandLineBuilder.AppendIfTrue("-spdb", this.SuppressPdbOutput);
            commandLineBuilder.AppendIfTrue("-spsd", this.SuppressPatchSequenceData);
            commandLineBuilder.AppendIfTrue("-ss", this.SuppressSchemaValidation);
            commandLineBuilder.AppendIfTrue("-sts", this.SuppressTagSectionIdAttributeOnTuples);
            commandLineBuilder.AppendIfTrue("-sui", this.SuppressDefaultUISequenceActions);
            commandLineBuilder.AppendIfTrue("-sv", this.SuppressIntermediateFileVersionMatching);
            commandLineBuilder.AppendIfTrue("-sval", this.SuppressValidation);
            commandLineBuilder.AppendSwitchIfNotNull("-usf ", this.UnreferencedSymbolsFile);
            commandLineBuilder.AppendIfTrue("-xo", this.OutputAsXml);
            commandLineBuilder.AppendSwitchIfNotNull("-contentsfile ", this.BindContentsFile);
            commandLineBuilder.AppendSwitchIfNotNull("-outputsfile ", this.BindOutputsFile);
            commandLineBuilder.AppendSwitchIfNotNull("-builtoutputsfile ", this.BindBuiltOutputsFile);
            commandLineBuilder.AppendSwitchIfNotNull("-wixprojectfile ", this.WixProjectFile);
            commandLineBuilder.AppendTextIfNotNull(this.AdditionalOptions);

            List<string> objectFilePaths = AdjustFilePaths(this.objectFiles, this.ReferencePaths);
            commandLineBuilder.AppendFileNamesIfNotNull(objectFilePaths.ToArray(), " ");
        }