Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wixfeat4190.1 #29

Merged
merged 4 commits into from Jun 12, 2014
Merged

Wixfeat4190.1 #29

merged 4 commits into from Jun 12, 2014

Conversation

jchoover
Copy link
Contributor

@jchoover jchoover commented May 8, 2014

I think I finally have the right branch merged and in the right state for this to function.

These are the needed 3.x changes for a BA/UX to be able to self update. In 4.x, it's desirable to allow OnDetectUpdateComplete to modify the HRESULT returned by DetectUpdate (so if a user is offline or the website is down, that the BA doesn't have to call Detect a second time).



// If the destination file already exists, clear the readonly bit to avoid E_ACCESSDENIED.
if (FileExistsEx(sczDestinationPath, &dwFileAttributes))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think this can happen (from PathCreateTimeBasedTempFile).

@rseanhall
Copy link
Contributor

  1. To address having to call Detect twice, I would add a Begin/Complete
    pair of methods to IBootstrapperApplication around lines 412-422 of
    detect.cpp (where you call
    AtomInitialize/DownloadUpdateFeed/AtomParseFromFile/ApupAllocChainFromAtom).
    This would allow the BA to tell the engine to ignore errors from those
    methods. If you give the path to the temp file, it could also be a way to
    give the BA access to the downloaded update feed in case it's not in the
    format the engine understands.
  2. Does Detect and Apply really need their own AuthenticationRequired
    methods? What's the guideline for duplicating code like this?
  3. For the OnDetectPackageBegin method, the engine doesn't call the
    OnDetectPackageComplete if there's an error while processing the package.
    But it always calls OnDetectUpdateComplete if it calls
    OnDetectUpdateBegin. Shouldn't it be consistent? (Jacob's pull request
    didn't alter this behavior, it was there already)
  4. Bob made a comment wondering whether the parameters in the new
    OnDetectUpdate method can be null. Looking through apuputil.cpp, it looks
    like the only thing guaranteed to be set in APPLICATION_UPDATE_ENTRY is
    dw64Version. This means that not only can most of the parameters be null,
    the engine will crash if there's no enclosures. I think there needs to be
    a spec for the feed that the engine expects, and it needs to be documented
    in the manual and enforced in the code.
  5. The new DetectUpdateEventArgs class inherits from the
    DetectUpdateBeginEventArgs. This inheritance doesn't make sense to me.
    Thoughts?

On Thu, May 8, 2014 at 3:49 PM, jchoover notifications@github.com wrote:

I think I finally have the right branch merged and in the right state for
this to function.

These are the needed 3.x changes for a BA/UX to be able to self update. In
4.x, it's desirable to allow OnDetectUpdateComplete to modify the HRESULT
returned by DetectUpdate (so if a user is offline or the website is down,

that the BA doesn't have to call Detect a second time).

You can merge this Pull Request by running

git pull https://github.com/jchoover/wix3 WIXFEAT4190.1

Or view, comment on, or merge it at:

#29


if (IDOK == nResult)
{
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to put "pUpdate->fUpdateAvailable = TRUE;" here.

barnson added a commit that referenced this pull request Jun 12, 2014
@barnson barnson merged commit 7a171aa into wixtoolset:develop Jun 12, 2014
nirbar pushed a commit to nirbar/wix3 that referenced this pull request Jun 19, 2022
…detection

Reverse checks to look for per-machine package registration first
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants