Example #1
0
 protected override void OnDetectUpdate(DetectUpdateEventArgs e)
 {
     // The list of updates is sorted in descending version, so the first callback should be the largest update available.
     // This update should be either larger than ours (so we are out of date), the same as ours (so we are current)
     // or smaller than ours (we have a private build).
     // Enumerate all of the updates anyway in case something's broken.
     this.Log(String.Format("Potential update v{0} from '{1}'; current version: v{2}", e.Version, e.UpdateLocation, this.Version));
     if (!this.UpdateAvailable && this.Engine.CompareVersions(e.Version, this.Version) > 0)
     {
         this.Log(String.Format("Selected update v{0}", e.Version));
         this.Engine.SetUpdate(null, e.UpdateLocation, e.Size, UpdateHashType.None, null);
         this.UpdateAvailable = true;
     }
 }
        private void Bootstrapper_DetectUpdate(object sender, DetectUpdateEventArgs e)
        {
            Log(LogLevel.Debug, $"Bootstrapper has called {nameof(this.Bootstrapper_DetectUpdate)}!");
            Log(LogLevel.Standard, $"Bootstrapper found bundle version {e.Version} at \"{e.UpdateLocation}\", current version: {Version}");

            if (e.Version > BundleVersion)
            {
                BootstrapperUpdateState = UpdateState.Available;
                e.Result = Result.Ok;
            }
            else if (e.Version <= BundleVersion)
            {
                BootstrapperUpdateState = UpdateState.Current;
                e.Result = Result.Cancel;
            }
        }
Example #3
0
 protected override void OnDetectUpdate(DetectUpdateEventArgs e)
 {
     // The list of updates is sorted in descending version, so the first callback should be the largest update available.
     // This update should be either larger than ours (so we are out of date), the same as ours (so we are current)
     // or smaller than ours (we have a private build). If we really wanted to, we could leave the e.StopProcessingUpdates alone and
     // enumerate all of the updates.
     this.Log(String.Format("Potential update v{0} from '{1}'; current version: v{2}", e.Version, e.UpdateLocation, this.Version));
     if (e.Version > this.Version)
     {
         this.Log(String.Format("Selected update v{0}", e.Version));
         this.Engine.SetUpdate(null, e.UpdateLocation, e.Size, UpdateHashType.None, null);
         this.UpdateAvailable = true;
     }
     else
     {
         this.UpdateAvailable = false;
     }
     e.StopProcessingUpdates = true;
 }
Example #4
0
 private void DetectUpdate(object sender, DetectUpdateEventArgs e)
 {
     // The list of updates is sorted in descending version, so the first callback should be the largest update available.
     // This update should be either larger than ours (so we are out of date), the same as ours (so we are current)
     // or smaller than ours (we have a private build). If we really wanted to, we could leave the e.StopProcessingUpdates alone and
     // enumerate all of the updates.
     WixBA.Model.Engine.Log(LogLevel.Verbose, String.Format("Potential update v{0} from '{1}'; current version: v{2}", e.Version, e.UpdateLocation, WixBA.Model.Version));
     if (e.Version > WixBA.Model.Version)
     {
         WixBA.Model.Engine.SetUpdate(null, e.UpdateLocation, e.Size, UpdateHashType.None, null);
         this.UpdateVersion = String.Concat("v", e.Version.ToString());
         string changesFormat = @"<body style='overflow: auto;'>{0}</body>";
         this.UpdateChanges = String.Format(changesFormat, e.Content);
         this.State         = UpdateState.Available;
     }
     else
     {
         this.State = UpdateState.Current;
     }
     e.StopProcessingUpdates = true;
 }
Example #5
0
 /// Fired when the update detection has found a potential update candidate.
 static void OnDetectUpdate(object sender, DetectUpdateEventArgs e)
 {
     Logger.Instance.Trace("");
 }
Example #6
0
 private void DetectUpdate(DetectUpdateEventArgs eventArgs)
 {
     // IDK
 }