Esempio n. 1
0
        IDSymUtilToolPolicy.CreateBundle(
            DSymUtilModule sender,
            Bam.Core.ExecutionContext context,
            Bam.Core.TokenizedString originalPath,
            Bam.Core.TokenizedString copiedPath)
        {
            var meta = new MakeFileBuilder.MakeFileMeta(sender);
            var rule = meta.AddRule();

            var sourceFilename = System.IO.Path.GetFileName(originalPath.Parse());

            meta.CommonMetaData.AddDirectory(sender.CreateTokenizedString("@dir($(0))", copiedPath).Parse());
            rule.AddTarget(copiedPath, variableName: "dSYM" + sourceFilename, isPhony: true);

            var commandLine = new Bam.Core.StringArray();

            (sender.Settings as CommandLineProcessor.IConvertToCommandLine).Convert(commandLine);

            rule.AddShellCommand(System.String.Format("{0} {1} -o {2} {3} {4}",
                                                      CommandLineProcessor.Processor.StringifyTool(sender.Tool as Bam.Core.ICommandLineTool),
                                                      commandLine.ToString(' '),
                                                      copiedPath.Parse(),
                                                      originalPath.Parse(),
                                                      CommandLineProcessor.Processor.TerminatingArgs(sender.Tool as Bam.Core.ICommandLineTool)));
        }
        IDSymUtilToolPolicy.CreateBundle(
            DSymUtilModule sender,
            Bam.Core.ExecutionContext context,
            Bam.Core.TokenizedString originalPath,
            Bam.Core.TokenizedString copiedPath)
        {
            var copiedDir = System.IO.Path.GetDirectoryName(copiedPath.ToString());

            Bam.Core.IOWrapper.CreateDirectoryIfNotExists(copiedDir);

            var commandLine = new Bam.Core.StringArray();

            (sender.Settings as CommandLineProcessor.IConvertToCommandLine).Convert(commandLine);
            commandLine.Add(System.String.Format("-o {0}", copiedPath.ToStringQuoteIfNecessary()));
            commandLine.Add(originalPath.ToStringQuoteIfNecessary());
            CommandLineProcessor.Processor.Execute(context, sender.Tool as Bam.Core.ICommandLineTool, commandLine);
        }
Esempio n. 3
0
        IDSymUtilToolPolicy.CreateBundle(
            DSymUtilModule sender,
            Bam.Core.ExecutionContext context,
            Bam.Core.TokenizedString originalPath,
            Bam.Core.TokenizedString copiedPath)
        {
            var copiedDir = System.IO.Path.GetDirectoryName(copiedPath.Parse());
            if (!System.IO.Directory.Exists(copiedDir))
            {
                System.IO.Directory.CreateDirectory(copiedDir);
            }

            var commandLine = new Bam.Core.StringArray();
            (sender.Settings as CommandLineProcessor.IConvertToCommandLine).Convert(commandLine);
            commandLine.Add(System.String.Format("-o {0}", copiedPath.Parse()));
            commandLine.Add(originalPath.Parse());
            CommandLineProcessor.Processor.Execute(context, sender.Tool as Bam.Core.ICommandLineTool, commandLine);
        }
Esempio n. 4
0
        IDSymUtilToolPolicy.CreateBundle(
            DSymUtilModule sender,
            Bam.Core.ExecutionContext context,
            Bam.Core.TokenizedString originalPath,
            Bam.Core.TokenizedString copiedPath)
        {
            var meta = new MakeFileBuilder.MakeFileMeta(sender);
            var rule = meta.AddRule();

            var sourceFilename = System.IO.Path.GetFileName(originalPath.Parse());

            meta.CommonMetaData.Directories.AddUnique(sender.CreateTokenizedString("@dir($(0))", copiedPath).Parse());
            rule.AddTarget(copiedPath, variableName: "dSYM" + sourceFilename, isPhony: true);

            var commandLine = new Bam.Core.StringArray();
            (sender.Settings as CommandLineProcessor.IConvertToCommandLine).Convert(commandLine);

            rule.AddShellCommand(System.String.Format("{0} {1} -o {2} {3} {4}",
                CommandLineProcessor.Processor.StringifyTool(sender.Tool as Bam.Core.ICommandLineTool),
                commandLine.ToString(' '),
                copiedPath.Parse(),
                originalPath.Parse(),
                CommandLineProcessor.Processor.TerminatingArgs(sender.Tool as Bam.Core.ICommandLineTool)));
        }