WIXFEAT:4382 Added support for "files in use" to WixStdBA #250

Merged
merged 2 commits into from May 25, 2015

Projects

None yet

3 participants

@creativbox
Contributor

No description provided.

@barnson
Member
barnson commented May 17, 2015

Thanks, this is great! Small issue: because it's a behavior change and introduces new loc strings, it needs to be opt-in for WiX v3.x. WixStdBA has a bunch of flags like that; see, for example, https://github.com/wixtoolset/wix3/blob/develop/src/ext/BalExtension/wixext/BalCompiler.cs#L303. Can you add ShowFilesInUse?

@creativbox
Contributor

I'm still fighting with GIT, but I think I got it right. I've added a "ShowFilesInUse" option the same way as mentioned by you. Please check it out.

@rseanhall rseanhall commented on the diff May 19, 2015
...nsion/wixstdba/WixStandardBootstrapperApplication.cpp
@@ -934,6 +952,26 @@ class CWixStandardBootstrapperApplication : public CBalBaseBootstrapperApplicati
}
}
+ virtual STDMETHODIMP_(int) OnExecuteFilesInUse(
+ __in_z LPCWSTR wzPackageId,
+ __in DWORD cFiles,
+ __in_ecount_z(cFiles) LPCWSTR* rgwzFiles
+ )
+ {
+ if (m_fShowFilesInUse && !m_fPrereq && wzPackageId && *wzPackageId)
+ {
+ //If this is an MSI package, display the files in use page.
+ BAL_INFO_PACKAGE* pPackage = NULL;
+ BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
+
+ if (pPackage && BAL_INFO_PACKAGE_TYPE_MSI == pPackage->type)
+ {
+ return ShowFilesInUseModal(cFiles, rgwzFiles);
@rseanhall
rseanhall May 19, 2015 Member

Calling it modal is really confusing to me when it's just another page. I'd really like to see the new page be a modal window instead.

@creativbox
creativbox May 19, 2015 Contributor

It is similar to a modal dialog regarding the other pages and the concept was inspired by dialogs too. That’s where the name was coming from. What would be a better name?

@barnson barnson merged commit a708009 into wixtoolset:develop May 25, 2015
@barnson
Member
barnson commented May 25, 2015

I did a bit of style cleanup and added a history entry. It would be great if ThmUtil understood modal pages/dialogs but this is fine, especially in v3.x.

@creativbox
Contributor

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment