[wix-users] Switching Bundle Runtime during Update

Stephen Downard stephen.downard at medfusion.com
Tue May 24 10:21:46 PDT 2016


The issue for me is that our current update specification uses an ini file format.  So, from what I understand the inherent update detection and download (ATOM Feed) will not work and therefore I implement the detection and download within the BA.  With that working all I need to do is notify the engine of where the local update executable resides.

Is my implementation impossible to accomplish via BAFunctions.dll and so I'll have to customize the WixStdBA? If I have to customize WixStdBa do I then notify Wix of my version of WixStdBa via the PayLoad Element?

Thanks for your guidance.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phill Hogland
Sent: Tuesday, May 24, 2016 12:06 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Switching Bundle Runtime during Update

I used the WixToolset implementation WixBA as my guide and other than implementing the InstallationViewModel and UpdateViewModel in a similar manner I did not need to do any additional downloads.  When the url is authored in the bundle using the Update/@Location I don't think I even had to add any call to SetUpdate as the code similar to that used by WixBA already handles all this behavior.  Once it detects a new version it sets UpdateState.Available, which the View uses to prompt the user.  If the user decides to do the update, then the UpdateCommand calls Engine.Plan with LaunchAction.UpdateReplace, which is what triggers Burn to manage starting the new bundle and terminating the current bundle, at least in my understanding.  (It may also be the case that in certain situations you may want to alter the url from that authored in the bundle Update/@Location, and then in that case when in DetectUpdateBegin you determine that a different url is needed, that is when I call SetUp  date to set a non-default url.  but that is a side issue that I would work on after the basic functionality of using the url authored I the bundle is working for you.)

I would add Engine.Log messages to each handler of concern and dump the EventArgs values into the log as you investigate the scenarios you are working with.
Phill
________________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Stephen Downard <stephen.downard at medfusion.com>
Sent: Tuesday, May 24, 2016 10:17:16 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Switching Bundle Runtime during Update

So within OnDetectComplete() in BaFunctions.dll I sucessfully download the update and then call the following.

m_pEngine->SetUpdate(NULL, updateExeFilePath.GetString(), size.QuadPart, BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE, NULL, 0);

The updated executable does not get executed and the current active Bundle continues to install, why?


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Monday, May 23, 2016 3:18 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Switching Bundle Runtime during Update

https://github.com/wixtoolset/wix3/compare/develop...jchoover:develop-3.10-WixStdBA

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Monday, May 23, 2016 2:15 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Switching Bundle Runtime during Update

Thank you for the response.  Could you explain how you "inject a custom update on top of current WixStdBA"?

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Monday, May 23, 2016 3:01 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Switching Bundle Runtime during Update

I've never done it from a BA function, as I've always injected my custom update handling on top of the current WixStdBA.

Since we do pass the engine to CreateBootstrapperBAFunction the BAF would have the engine pointer, however we don't have hooks for the OnDetectUpdate* events.  I'm guessing you could call it from OnDetectComplete.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Monday, May 23, 2016 10:50 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Switching Bundle Runtime during Update

How does this work within bafunctions.dll (hr = m_pEngine-->SetUpdate(...)?

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Friday, May 20, 2016 2:13 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Switching Bundle Runtime during Update

Engine.SetUpdate

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Friday, May 20, 2016 1:03 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Switching Bundle Runtime during Update

At runtime the BA detects a new version is available and downloads, how is the Burn Engine informed of the new bundle?  So, now the value of WixBundleOriginalSource is obsolete and the new downloaded Bundle needs to be executed.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Rob Mensching
Sent: Friday, May 20, 2016 1:54 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Switching Bundle Runtime during Update

What is a "Bundle Runtime"? The Burn engine?

_____________________________________________________________
 Short replies here. Complete answers over there: http://www.firegiant.com/


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Friday, May 20, 2016 5:40 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Switching Bundle Runtime during Update

What is the proper procedure for switching the Bundle runtime after an update is detected and downloaded?

Cheers,
Stephen Downard

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list