[PATCH try2 1/2] winemenubuilder: Create/release semaphore only
around call to wineshelllink.
mk144210 at bcm.edu
Tue Jun 26 23:58:35 CDT 2007
Changes from previous try:
* Patch 1 - Capitalized name of patch
* Patch 2:
- Wait for __wine_make_process_system event in addition to icon file; this means if
an icon file is never created for some reason, we will finish when all user processes
(e.g., installers) have exited and leave no dangling processes.
- I had not cleared my icons correctly when I was testing my last version, and discovered that
I was actually getting blank icons in Vector NTI b/c file is created before it is completely
written. Thus I detect in this version whether the file is completely written by using
CreateFile (OPEN_EXISTING) with GENERIC_WRITE access and no sharing, which fails if the
file is being written (unshared) by another process and creates all Vector NTI icons correctly
(but if I just change GENERIC_WRITE to 0, which causes no sharing violation, I get blank icons again).
Summary of patches:
These patches fix our handling of shortcuts created before their icons (e.g., Vector NTI, iTunes/Quicktime
installers). Currently we handle this by putting calls to winemenubuilder in RunOnce. Not only do these
calls never happen for many installers, but this is analogous to saying "let's make the shortcuts _after_
we reboot", which is not what happens on native. I believe the solution proposed here is the correct way
of doing this, specifically waiting for the icons to be fully written and then creating the shortcuts.
These patches should not affect handling of shortcuts that already work fine, but will allow shortcuts
that are created before their icons to be created properly without any extra user intervention.
programs/winemenubuilder/winemenubuilder.c | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2279 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070626/7a0e8e09/37ee89a938a1d033e57cb7ac500e55fc13456d3f.bin
More information about the wine-patches