https://bugs.winehq.org/show_bug.cgi?id=39377
Bug ID: 39377 Summary: Add support for 'msidbControlAttributesFormatSize' in static text controls to format and label properties such as 'PrimaryVolumeSpaceRequired' (SkySaga installer) Product: Wine Version: 1.7.52 Hardware: x86-64 OS: Linux Status: NEW Severity: enhancement Priority: P2 Component: msi Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
continuation of bug 39307
Prerequisites:
* 'winetricks -q dotnet40' (if Wine-Mono not present) * Windows version set to 'Windows Vista+'
--- snip --- ... 0035:trace:msi:msi_set_property 0x15bbf8 L"PrimaryVolumeSpaceRequired" L"19380" -1 ... 0035:trace:msi:msi_dialog_add_control L"Static", L"Description", 00090003, L"Setup requires [PrimaryVolumeSpaceRequired] in:", 00020000 ... 0035:trace:msi:MSI_FormatRecordW L"Setup requires [PrimaryVolumeSpaceRequired] in:" ... 0035:trace:msi:msi_get_property returning L"19380" for property L"PrimaryVolumeSpaceRequired" ... 0035:Call user32.CreateWindowExW(00000000,7ce97ae0 L"Static",00198d58 L"Setup requires 19380 in:",50020000,000000d9,000000a4,00000183,00000017,00030080,00000000,00000000,00000000) ret=7ce272f3 ... --- snip ---
This number displayed is 512 byte units.
I found this in the remark section of 'PrimaryVolumeSpaceRequired' property in MSDN:
https://msdn.microsoft.com/en-us/library/aa370849%28v=vs.85%29.aspx
--- quote --- PrimaryVolumeSpaceRequired property
The installer sets the value of the PrimaryVolumeSpaceRequired property to a string representing the total number of bytes required by all selected features on the volume referenced by the PrimaryVolumePath property. As with the PrimaryVolumeSpaceAvailable property, this number is expressed in units of 512 bytes.
Remarks
Note if this value is to be displayed within a static Text control, the FormatSize bit can be used to automatically format and label this number in units of kilobytes or megabytes as appropriate. --- quote ---
https://msdn.microsoft.com/en-us/library/aa368608%28v=vs.85%29.aspx
'FormatSize' is indeed applicable here (attributes of control = 0x00090003).
The value should be formatted with proper units to be meaningful.
$ sha1sum SkySagaEUInstaller.exe ee55d51213031fdf8d71475434c18ecd7caef9eb SkySagaEUInstaller.exe
$ du -sh SkySagaEUInstaller.exe 11M SkySagaEUInstaller.exe
$ wine --version wine-1.7.52
Regards
https://bugs.winehq.org/show_bug.cgi?id=39377
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, Installer URL| |http://www.skysagaonline.co | |m/download/SkySagaEUInstall | |er.exe
https://bugs.winehq.org/show_bug.cgi?id=39377
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, still present.
Unfortunately the original website seems to be on lock down for whatever reason.
http://www.skysaga.com/ https://www.reddit.com/r/skysaga/
I wasn't able to retrieve the installer by other means (no Internet archive snapshot exists).
Anyway, inspection of source code is enough ;-)
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/msi/action.c#l2418
--- snip --- 2418 static UINT ACTION_CostFinalize(MSIPACKAGE *package) 2419 { ... 2479 TRACE("Calculating file cost\n"); 2480 calculate_file_cost( package ); 2481 2482 msi_set_property( package->db, szCostingComplete, szOne, -1 ); 2483 /* set default run level if not set */ 2484 level = msi_dup_property( package->db, szInstallLevel ); 2485 if (!level) msi_set_property( package->db, szInstallLevel, szOne, -1 ); 2486 msi_free(level); 2487 2488 if ((rc = MSI_SetFeatureStates( package ))) return rc; 2489 2490 if ((primary_key = msi_dup_property( package->db, szPrimaryFolder ))) 2491 { 2492 if ((primary_folder = msi_dup_property( package->db, primary_key ))) 2493 { 2494 if (((primary_folder[0] >= 'A' && primary_folder[0] <= 'Z') || 2495 (primary_folder[0] >= 'a' && primary_folder[0] <= 'z')) && primary_folder[1] == ':') 2496 { 2497 static const WCHAR fmtW[] = {'%','l','u',0}; 2498 ULARGE_INTEGER free; 2499 ULONGLONG required; 2500 WCHAR buf[21]; 2501 2502 primary_folder[2] = 0; 2503 if (GetDiskFreeSpaceExW( primary_folder, &free, NULL, NULL )) 2504 { 2505 sprintfW( buf, fmtW, free.QuadPart / 512 ); 2506 msi_set_property( package->db, szPrimaryVolumeSpaceAvailable, buf, -1 ); 2507 } 2508 required = get_volume_space_required( package ); 2509 sprintfW( buf, fmtW, required / 512 ); 2510 msi_set_property( package->db, szPrimaryVolumeSpaceRequired, buf, -1 ); 2511 2512 sprintfW( buf, fmtW, (free.QuadPart - required) / 512 ); 2513 msi_set_property( package->db, szPrimaryVolumeSpaceRemaining, buf, -1 ); 2514 msi_set_property( package->db, szPrimaryVolumePath, primary_folder, 2 ); 2515 } 2516 msi_free( primary_folder ); 2517 } 2518 msi_free( primary_key ); 2519 } ... --- snip ---
$ wine --version wine-4.4
Regards
https://bugs.winehq.org/show_bug.cgi?id=39377
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED URL|http://www.skysagaonline.co |https://web.archive.org/web |m/download/SkySagaEUInstall |/20210714052551/http://www. |er.exe |skysagaonline.com/download/ | |SkySagaEUInstaller.exe
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting. It seems the original download site came back to life again. I promptly created a snapshot of the installer via Internet Archive.
https://web.archive.org/web/20210714052551/http://www.skysagaonline.com/down...
$ sha1sum SkySagaEUInstaller.exe ee55d51213031fdf8d71475434c18ecd7caef9eb SkySagaEUInstaller.exe
$ du -sh SkySagaEUInstaller.exe 11M SkySagaEUInstaller.exe
Turns out this was fixed a long time ago, contrary to my comment #1.
Reverse bisecting didn't work. Between Wine 2.11 (bad) and Wine 2.20 (good) there were multiple msi regressions which causes the installer to crash.
The first crash was introduced with:
https://source.winehq.org/git/wine.git/commitdiff/48237e249b76f5ad883ec073e3... ("msi: Add a basic internal UI implementation.")
Part of Wine 2.12
Installer UI became usable again without crash after commit https://source.winehq.org/git/wine.git/commitdiff/c14a16b08911d1695e42b75c60... ("user32: Implement IDI_SHIELD.").
Part of Wine 2.20
At that point the dialog showed the disk space properly formatted. That's obviously not the fix commit. Something in between:
--- snip --- $ git log --oneline 48237e249b7^...wine-2.20 -- dlls/msi | grep -v tests
9ce8592b068 msi: Add error handling when retriving component/feature state/action in condition. dcd92a168b3 msi: Store condition intermediate values in union. c8d32b69ec4 msi: Define special types for condition operators, identifiers and expressions. 024c6c1b4b9 msi: Move condition integer handling into value_i. 599622d5832 msi: Add install test with no arguments on already installed product. a6ad46dc940 msi: Don't leak memory on failure. f621f4102d6 msi: Don't leak memory on failure. 808f3158bbc msi: Improve installation with no argument of already installed product. c41b8ce5c36 msi: Improve "full uninstall" detection code. b141a145c49 msi: Improve feature action value evaluation in conditions. 30c957b9ccb msi: Fix installations with only INSTALLSTATE_SOURCE features. f517022ecc8 msi: Fix an invalid write in build_default_format (Valgrind). af9ee877488 msi: Add a missing UI message in the ExecuteAction action. 4a2809166c4 msi: Remove redundant NULL checks before msi_free(). fdac39f697e msi: Pass correct length to GetDateFormatW. e1e668d41fc msi: Store the current script in the package. 5245b9d3a85 msi: Remove a superfluous substructure. 86bc556f9fd msi: Don't execute a deferred custom action when not running the install script. 92118091f8e msi: Perform the given action, or INSTALL, from MsiInstallProduct(). 26493d316c1 msi: Implement the INSTALL top-level action. 5c39852c1e7 msi: More fully implement the ExecuteAction action. d17fda090d2 msi: Simplify message type processing. eb79fe1c3b2 msi: Remove ACTION_PerformUIAction(). 52fbaeb2c44 msi: Add support for ActionText table. 700ebc86a9f msi: Return the correct values from dialogs. a3dd99c9a36 msi: Return the current date and time. 4ccc82a88ae msi: Use the Error table for more messages. 77e3d3372fd msi: Use MsiProcessMessage() to send error messages. 3ca2dfe4624 msi: Avoid uninitialized pointer access on error path (Coverity). d631714ca86 msi: Add a trailing linefeed to a FIXME() trace. 39c2ff02832 msi: Send the dialog created message in dialog_create(). 14f865e14fc msi: Don't queue a parent dialog to be shown in EndDialog. 8826584b1d7 msi: Process ShowDialog/EndDialog after all other control events. 44fb23dc328 msi: Don't set _BrowseProperty. b4c39f4e7c9 msi: Avoid a null pointer dereference. 51bd884384d msi: Properly parse empty format strings. 16f0dffd011 msi: Return the correct values from custom actions. f348c7c04c0 msi: Rewrite dump_record(). f9c68dfd920 msi: Use the given record for INSTALLMESSAGE_ACTIONDATA. c788ed858ed msi: Provide the result of the last action. 1505912ce14 msi: Allow setting NULL in MsiSetInteger(). f9f53fe624b msi: Correctly format the template field for MsiProcessMessage(). 3033daec111 msi: Implement UI messages for dialogs. 5da9250394f msi: Don't increment the refcount when creating dialogs. 48237e249b7 msi: Add a basic internal UI implementation. --- snip ---
Regards
https://bugs.winehq.org/show_bug.cgi?id=39377
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.13.