So do you think I should add a define like INSTALLUILEVEL_NOFLAGS somewhere set to 0xf then? Should this be in msi.h (or would this be confusing as this is not defined in Windows I don't think) or just in the same file where the other change is being made?
Thanks Misha -----Original Message----- From: James Hawkins [mailto:[EMAIL PROTECTED] Sent: Tue 2/6/2007 1:57 AM To: [email protected] Cc: Koshelev, Misha Vladislavo Subject: Re: msi: InstallPackage check for UI level must not disregard flags (updated) On 2/6/07, James Hawkins <[EMAIL PROTECTED]> wrote: > On 2/5/07, Misha Koshelev <[EMAIL PROTECTED]> wrote: > > This is an update, a little less hacky thanks to advice from Dmitry > > Timoshkov. This fixes bug #6992. The installer for Vector NTI 10 was > > getting to the > > point where it was trying to launch the .msi files that do the actual > > install, but was quitting with the message "This module is not designed > > for direct execution." Install worked fine with native MSI. After a > > while of playing with it and disassembling the MSI file with dark.exe > > tool, I noticed that the .msi files ran in execute mode but not UI mode. > > Finally, I checked the UI level that wine msi was reading, and it was > > 102 which is INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCESONLY. However, > > MSI_InstallPackage was only checking if the uilevel >= > > INSTALLUILEVEL_REDUCED, which would have been true in this case as > > INSTALLUILEVEL_SOURCESONLY > INSTALLUILEVEL_REDUCED but the actual ui > > level is INSTALLUILEVEL_NONE which is < INSTALLUILEVEL_REDUCED. This > > patch fixes this check, and now the installer finished successfully > > (although it seems upon a quick check that there are more install bugs > > for this program in wine, as not all files that should be there seem to > > be there after this install). > > > > Changelog: > > > > * msi: InstallPackage check for UI level must not disregard > > INSTALLUILEVEL flags. > > > > + if ( (msi_get_property_int(package, szUILevel, 0) & 0xf) >= > > INSTALLUILEVEL_REDUCED ) > > > > Magic numbers are bad. What is 0xF? > I just read the thread that this patch came from, but the fact that I had to ask in the first place shows that we need at least a comment or a descriptive constant variable/define. -- James Hawkins
