On 2/6/07, James Hawkins truiken@gmail.com wrote:
On 2/5/07, Misha Koshelev mk144210@bcm.tmc.edu 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.