http://bugs.winehq.org/show_bug.cgi?id=10211
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEW CC| |focht@gmx.net Component|-unknown |msi Version|unspecified |0.9.48. Summary|gmax installer does not |gmax 1.2 installer doesn't |allow changing of |update dialog controls |installation directory, |subscribed to SelectionPath |fails to install |event when the INSTALLDIR | |property has changed
--- Comment #8 from Anastasius Focht focht@gmx.net 2011-07-22 15:31:01 CDT --- Hello,
confirming, still present.
--- snip --- ... 0021:Call user32.CreateWindowExW(00000000,683a7440 L"Static",0063e346 L"C:\gmax\",50020000,00000033,000000c8,00000130,00000017,00040022,00000000,00000000,00000000) ret=68338857 0021:trace:win:WIN_CreateWindowEx L"C:\gmax\" L"Static" ex=00000000 style=50020000 51,200 304x23 parent=0x40022 menu=(nil) inst=(nil) params=(nil) 0021:trace:win:dump_window_styles style: WS_CHILD WS_VISIBLE WS_GROUP 0021:trace:win:dump_window_styles exstyle: 0021:trace:win:WIN_SetWindowLong 0x20094 -12 0 W ... 0021:trace:win:WIN_CreateWindowEx created window 0x20094 0021:Ret user32.CreateWindowExW() retval=00020094 ret=68338857 0021:trace:msi:msi_dialog_create_window Dialog L"Single_Feature_Destination" control L"[_WiseDialogFontDefault][INSTALLDIR]" hwnd 0x20094 ... 0021:Call user32.SetPropW(00020094,683a745c L"MSIDATA",00185b20) ret=6833996f 0021:Ret user32.SetPropW() retval=00000001 ret=6833996f 0021:trace:msi:ControlEvent_SubscribeToEvent event L"SelectionPath" control L"Text43" attribute L"SelectionPath" ... 0021:trace:msi:msi_get_property returning L"C:\gmax\yyy\" for property L"INSTALLDIR" ... 0021:trace:msi:ControlEvent_FireSubscribedEvent Firing event L"SelectionPath" ... 0021:trace:msi:msi_get_property property L"C:\gmax\yyy\" not found 0021:Call user32.SetWindowTextW(00020094,00000000) ret=683392c9 0021:Call window proc 0x683395e0 (hwnd=0x20094,msg=WM_SETTEXT,wp=00000000,lp=00000000) 0021:trace:msi:MSIText_WndProc 0x20094 000c 00000000 00000000 0021:Call user32.GetPropW(00020094,683a745c L"MSIDATA") ret=68339673 0021:Ret user32.GetPropW() retval=00185b20 ret=68339673 0021:Call user32.CallWindowProcW(68712a33,00020094,0000000c,00000000,00000000) ret=683396e5 0021:Call window proc 0x68712a33 (hwnd=0x20094,msg=WM_SETTEXT,wp=00000000,lp=00000000) 0021:Ret window proc 0x68712a33 (hwnd=0x20094,msg=WM_SETTEXT,wp=00000000,lp=00000000) retval=00000000 0021:Ret user32.CallWindowProcW() retval=00000000 ret=683396e5 ... 0021:Ret window proc 0x683395e0 (hwnd=0x20094,msg=WM_SETTEXT,wp=00000000,lp=00000000) retval=00000000 0021:Ret user32.SetWindowTextW() retval=00000000 ret=683392c9 ... 0021:trace:msi:MSI_SetTargetPathW 0x1658a0 L"INSTALLDIR" L"C:\gmax\yyy\" ... 0021:trace:msi:msi_set_property 0x1468d8 L"INSTALLDIR" L"C:\gmax\yyy\" --- snip ---
The dialog controls correctly subscribe the "SelectionPath" event. The event is fired after the folder selection is done (browse dialog). Unfortunately there is a bug when retrieving the property value.
See "msi_dialog_handle_event": http://source.winehq.org/git/wine.git/blob/e601ef55a9ce9c0d3e52da48846cfa3ff...
--- snip --- ... else if ( !strcmpW( attribute, szSelectionPath ) ) { LPWSTR prop = msi_dialog_dup_property( dialog, ctrl->property, TRUE ); LPWSTR path; if (!prop) return; path = msi_dup_property( dialog->package->db, prop ); SetWindowTextW( ctrl->hwnd, path ); msi_free(prop); msi_free(path); } --- snip ---
Due to "indirect == TRUE" passed to msi_dialog_dup_property(), the returned string which ought to be the property name _is_ the property value (path value of the INSTALLDIR property). The following msi_dup_property() fails due to that mishap, returning NULL.
Either pass FALSE to msi_dialog_dup_property() or get rid following msi_dup_property().
With that fixed, the installation directory name will be properly updated for controls that are subscribed to SelectionPath event.
$ sha1sum gmax12.exe 197b049ab1eda1b26061520e18ae43cf55b97e92 gmax12.exe
$ wine --version wine-1.3.25-1-gdf65f3e
Regards