Пример #1
0
 internal RealSignTool(SignToolArgs args, TaskLoggingHelper log) : base(args, log)
 {
     TestSign     = args.TestSign;
     _msbuildPath = args.MSBuildPath;
     _snPath      = args.SNBinaryPath;
     _logDir      = args.LogDir;
 }
Пример #2
0
        public void ExecuteImpl()
        {
            if (!DryRun)
            {
                if (typeof(object).Assembly.GetName().Name != "mscorlib" && !File.Exists(MSBuildPath))
                {
                    Log.LogError($"MSBuild was not found at this path: '{MSBuildPath}'.");
                    return;
                }

                if (String.IsNullOrEmpty(LogDir) || !Directory.Exists(LogDir))
                {
                    Log.LogError($"Invalid LogDir informed: {LogDir}");
                    return;
                }
            }

            var signInfos           = ParseStrongNameSignInfo();
            var overridingSignInfos = ParseFileSignInfo();

            if (Log.HasLoggedErrors)
            {
                return;
            }

            var signToolArgs = new SignToolArgs(TempDir, MicroBuildCorePath, TestSign, MSBuildPath, LogDir);
            var signTool     = DryRun ? new ValidationOnlySignTool(signToolArgs) : (SignTool) new RealSignTool(signToolArgs);
            var signingInput = new Configuration(TempDir, ItemsToSign, signInfos, overridingSignInfos, PublishUrl, Log).GenerateListOfFiles();

            if (Log.HasLoggedErrors)
            {
                return;
            }

            var util = new BatchSignUtil(BuildEngine, Log, signTool, signingInput, OrchestrationManifestPath);

            if (Log.HasLoggedErrors)
            {
                return;
            }

            util.Go();
        }
Пример #3
0
        private void ExecuteImpl()
        {
            if (!DryRun && typeof(object).Assembly.GetName().Name != "mscorlib")
            {
                if (!File.Exists(MSBuildPath))
                {
                    Log.LogError($"File '{MSBuildPath}' not found.");
                    return;
                }
            }

            var signToolArgs = new SignToolArgs(
                outputPath: OutputDir,
                tempPath: TempDir,
                microBuildCorePath: MicroBuildCorePath,
                testSign: TestSign);

            var signTool  = DryRun ? new ValidationOnlySignTool(signToolArgs) : (SignTool) new RealSignTool(signToolArgs, MSBuildPath, LogDir);
            var batchData = Configuration.ReadConfigFile(signToolArgs.OutputDir, ConfigFilePath, Log);
            var util      = new BatchSignUtil(BuildEngine, Log, signTool, batchData, null);

            util.Go();
        }
Пример #4
0
 internal ValidationOnlySignTool(SignToolArgs args)
     : base(args)
 {
 }
Пример #5
0
 internal SignTool(SignToolArgs args, TaskLoggingHelper log)
 {
     _args = args;
     _log  = log;
 }
Пример #6
0
 internal ValidationOnlySignTool(SignToolArgs args, TaskLoggingHelper log)
     : base(args, log)
 {
     TestSign = args.TestSign;
 }
Пример #7
0
 internal SignTool(SignToolArgs args)
 {
     _args = args;
 }
Пример #8
0
 internal FakeSignTool(SignToolArgs args, TaskLoggingHelper log)
     : base(args, log)
 {
 }
Пример #9
0
 internal RealSignTool(SignToolArgs args) : base(args)
 {
     TestSign     = args.TestSign;
     _msbuildPath = args.MSBuildPath;
     _logDir      = args.LogDir;
 }
Пример #10
0
 internal FakeSignTool(SignToolArgs args)
     : base(args)
 {
 }
Пример #11
0
 internal RealSignTool(SignToolArgs args, string msbuildPath, string logDir) : base(args)
 {
     TestSign     = args.TestSign;
     _msbuildPath = msbuildPath;
     _logDir      = logDir;
 }
Пример #12
0
 internal ValidationOnlySignTool(SignToolArgs args)
     : base(args)
 {
     TestSign = args.TestSign;
 }