msi: Add VersionIndIndex for ProgIds
Aric Stewart
aric at codeweavers.com
Thu Jun 2 08:17:54 CDT 2005
Do not loop if a ProgId's Parent Index it itself.
Add a VersionIndIndex for tracking version independent fields for the
ProgIds properly.
-------------- next part --------------
Index: dlls//msi/action.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/action.c,v
retrieving revision 1.127
diff -u -r1.127 action.c
--- dlls//msi/action.c 2 Jun 2005 10:29:57 -0000 1.127
+++ dlls//msi/action.c 2 Jun 2005 12:57:10 -0000
@@ -4551,9 +4558,11 @@
}
package->progids[index].CurVerIndex = -1;
+ package->progids[index].VersionIndIndex = -1;
/* if we have a parent then we may be that parents CurVer */
- if (package->progids[index].ParentIndex >= 0)
+ if (package->progids[index].ParentIndex >= 0 &&
+ package->progids[index].ParentIndex != index)
{
int pindex = package->progids[index].ParentIndex;
while (package->progids[pindex].ParentIndex>= 0)
@@ -4562,6 +4571,7 @@
FIXME("BAD BAD need to determing if we are really the CurVer\n");
package->progids[index].CurVerIndex = pindex;
+ package->progids[pindex].VersionIndIndex = index;
}
return index;
@@ -5396,12 +5444,12 @@
RegCloseKey(hkey3);
if (package->classes[i].ProgIDIndex >= 0 &&
- package->progids[package->classes[i].ProgIDIndex].ParentIndex
- >= 0)
+ package->progids[package->classes[i].ProgIDIndex].
+ VersionIndIndex >= 0)
{
- progid = package->progids[package->progids[
- package->classes[i].ProgIDIndex].ParentIndex].ProgID;
-
+ progid = strdupW(package->progids[package->progids[
+ package->classes[i].ProgIDIndex].VersionIndIndex].
+ ProgID);
RegCreateKeyW(hkey2,szVIProgID,&hkey3);
RegSetValueExW(hkey3,NULL,0,REG_SZ,(LPVOID)progid,
(strlenW(progid)+1) *sizeof(WCHAR));
Index: dlls//msi/action.h
===================================================================
RCS file: /home/wine/wine/dlls/msi/action.h,v
retrieving revision 1.12
diff -u -r1.12 action.h
--- dlls//msi/action.h 30 May 2005 09:56:56 -0000 1.12
+++ dlls//msi/action.h 2 Jun 2005 12:57:10 -0000
@@ -147,6 +147,7 @@
/* not in the table, set during installation */
BOOL InstallMe;
INT CurVerIndex;
+ INT VersionIndIndex;
} MSIPROGID;
typedef struct tagMSIVERB
More information about the wine-patches
mailing list