protected BuildTargetBootablePublishProviderBase(
     IBuildSupport buildSupport,
     IBuildProject buildProject)
 {
     _buildSupport = buildSupport;
     _buildProject = buildProject;
 }
Ejemplo n.º 2
0
        public async Task <IReadOnlyDictionary <string, string> > GetAllBuildProperties()
        {
            if (_buildProject == null)
            {
                _buildProject = await GetBuildProject(_hier.GetUnconfiguredProject());
            }

            return(await _buildProject.GetFullBuildPropertiesAsync(CancellationToken.None));
        }
Ejemplo n.º 3
0
        public UsbPublishProvider(
            IBuildSupport buildSupport,
            IBuildProject buildProject)
            : base(buildSupport, buildProject)
        {
            _viewModel = new UsbPublishSettingsViewModel();

            _settingsControl             = new UsbPublishSettingsControl();
            _settingsControl.DataContext = _viewModel;
        }
Ejemplo n.º 4
0
        public IsoPublishProvider(
            IBuildSupport buildSupport,
            IBuildProject buildProject,
            IProjectThreadingService projectThreadingService,
            IBootableProperties bootableProperties)
            : base(buildSupport, buildProject)
        {
            _viewModel             = new IsoPublishSettingsViewModel();
            _viewModel.PublishPath = projectThreadingService.ExecuteSynchronously(bootableProperties.GetIsoFileFullPathAsync);

            _settingsControl             = new IsoPublishSettingsControl();
            _settingsControl.DataContext = _viewModel;
        }
Ejemplo n.º 5
0
        public async Task <IBuildResult> BuildAsync(string target, IDictionary <string, string> globalProperties)
        {
            if (globalProperties == null)
            {
                globalProperties = new Dictionary <string, string>();
            }

            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            IVsOutputWindowPane outputWindowPane = null;
            IVsOutputWindow     outputWindow     = ServiceProvider.GlobalProvider.GetService(typeof(SVsOutputWindow)) as IVsOutputWindow;

            if (outputWindow != null)
            {
                outputWindow.GetPane(VSConstants.GUID_BuildOutputWindowPane, out outputWindowPane);
            }

            var hostObjects = new HashSet <IHostObject>();

            ILogger logger = null;

            if (outputWindowPane != null)
            {
                outputWindowPane.Activate();
                logger = new PublishLogger(outputWindowPane);
            }

            var loggers = new HashSet <ILogger>()
            {
                logger
            };

            if (_buildProject == null)
            {
                _buildProject = await GetBuildProject(_hier.GetUnconfiguredProject());
            }

            _hier.GetDTEProject().DTE.Solution.SolutionBuild.BuildProject(globalProperties["Configuration"], _hier.GetDTEProject().UniqueName, true);
            IBuildResult result = await _buildProject?.BuildAsync(new string[] { target }, CancellationToken.None, true, ImmutableDictionary.ToImmutableDictionary(globalProperties), hostObjects.ToImmutableHashSet(), BuildRequestPriority.High, loggers.ToImmutableHashSet());

            return(result);
        }