Beispiel #1
0
        private void SetRelatedBundleDetectedState(Wix.DetectRelatedBundleEventArgs args)
        {
            if (this.PlannedAction == Wix.LaunchAction.Install)
            {
                ProductInstallationState stateForCurrentBundleDetection = ProductInstallationState.Unknown;
                if (args.Operation == Wix.RelatedOperation.Downgrade)
                {
                    this.LogStandard("A higher version the bundle is already installed");
                    stateForCurrentBundleDetection    = ProductInstallationState.NewerVersionInstalled;
                    this.NewerProductInstalledVersion = args.Version;
                }
                else if (args.Operation == Wix.RelatedOperation.MajorUpgrade)
                {
                    stateForCurrentBundleDetection = ProductInstallationState.OlderVersionInstalled;
                }
                else if (args.Operation == Wix.RelatedOperation.MinorUpdate)
                {
                    stateForCurrentBundleDetection = ProductInstallationState.OlderVersionInstalled;
                }

                if (this.ProductInstallationState < stateForCurrentBundleDetection)
                {
                    this.LogVerbose("Updating ProductInstallationState to: " + stateForCurrentBundleDetection);
                    this.ProductInstallationState = stateForCurrentBundleDetection;
                }
            }
        }
Beispiel #2
0
        /// <summary>Called when a related bundle has been detected for a bundle.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnDetectRelatedBundle(Wix.DetectRelatedBundleEventArgs args)
        {
            LogVerbose("Enter Method: OnDetectRelatedBundle");
            WPFBootstrapperEventArgs <Wix.DetectRelatedBundleEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.DetectRelatedBundleEventArgs>(args);

            TryInvoke(new Action(() => { _mainWindow.OnDetectRelatedBundle(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnDetectRelatedBundle(cancelArgs.Arguments);
            }
            LogVerbose("Leaving Method: OnDetectRelatedBundle");
        }
        /// <summary>Called when a related bundle has been detected for a bundle.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnDetectRelatedBundle(Wix.DetectRelatedBundleEventArgs args)
        {
            this.LogBootstrapperEnterEvent(args, "DetectRelatedBundle");
            WPFBootstrapperEventArgs <Wix.DetectRelatedBundleEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.DetectRelatedBundleEventArgs>(args);

            this.TryInvoke(new Action(() => { this.model.OnDetectRelatedBundle(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnDetectRelatedBundle(cancelArgs.Arguments);
            }
            this.LogBootstrapperLeaveEvent(null, "DetectRelatedBundle");
        }
Beispiel #4
0
        public void SetInstallEntry(DetectRelatedBundleEventArgs e)
        {
            if (e.RelationType != RelationType.Upgrade)
                return;

            if (e.Operation != RelatedOperation.MajorUpgrade)
                return;

            Logger.Standard("setting install entries for {0}", e.ProductCode);
            SetInstallEntries(e.ProductCode, "Completing Update",
                "It may take a minute or two to finish updating {0}");
        }
		void DetectedRelatedBundle(object sender, DetectRelatedBundleEventArgs e)
		{
			if (e.Operation == RelatedOperation.Downgrade)
			{
				this.Downgrade = true;
			}
		}
Beispiel #6
0
        private void DetectedRelatedBundle(object sender, DetectRelatedBundleEventArgs e)
        {
            Logger.Standard("Detected related bundle: {0} {1} {2} {3}", e.ProductCode, e.RelationType, e.Operation, e.BundleTag);
            if (e.Operation == RelatedOperation.Downgrade)
            {
                _downgrade = true;
                return;
            }

            if (e.Operation == RelatedOperation.MajorUpgrade)
            {
                _upgrade = true;
            }

            BaseModel.SetInstallEntry(e);
        }
Beispiel #7
0
        Result IBootstrapperApplication.OnDetectRelatedBundle(string wzProductCode, RelationType relationType, string wzBundleTag, bool fPerMachine, long version, RelatedOperation operation)
        {
            DetectRelatedBundleEventArgs args = new DetectRelatedBundleEventArgs(wzProductCode, relationType, wzBundleTag, fPerMachine, version, operation);
            this.OnDetectRelatedBundle(args);

            return args.Result;
        }
Beispiel #8
0
 /// <summary>
 /// Called when a related bundle has been detected for a bundle.
 /// </summary>
 /// <param name="args">Additional arguments for this event.</param>
 protected virtual void OnDetectRelatedBundle(DetectRelatedBundleEventArgs args)
 {
     EventHandler<DetectRelatedBundleEventArgs> handler = this.DetectRelatedBundle;
     if (null != handler)
     {
         handler(this, args);
     }
 }
		private void OnDetectRelatedBundle(object sender, DetectRelatedBundleEventArgs e)
		{
			if (e.Operation == RelatedOperation.Downgrade)
			{
				Operation = Operation.Information;
				_completedStepVmFactory.GetViewModelInstance().Result = OperationResult.Downgrade;
			}
		}