msi: ResolveSource
Aric Stewart
aric at codeweavers.com
Mon Aug 15 10:16:28 CDT 2005
add some body to ResolveSource because it is possible to need it when an
install is begun but the media is not in the drive, such as in
install-on-demand cases.
-------------- next part --------------
Index: dlls/msi/action.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/action.c,v
retrieving revision 1.173
diff -u -r1.173 action.c
--- dlls/msi/action.c 13 Jul 2005 12:07:41 -0000 1.173
+++ dlls/msi/action.c 15 Aug 2005 15:14:48 -0000
@@ -3688,11 +3691,52 @@
UINT ACTION_ResolveSource(MSIPACKAGE* package)
{
+ DWORD attrib;
+ UINT rc;
/*
* we are currently doing what should be done here in the top level Install
* however for Adminastrative and uninstalls this step will be needed
*/
- return ERROR_SUCCESS;
+ if (!package->PackagePath)
+ return ERROR_SUCCESS;
+
+ attrib = GetFileAttributesW(package->PackagePath);
+ if (attrib == INVALID_FILE_ATTRIBUTES)
+ {
+ LPWSTR prompt;
+ LPWSTR msg;
+ DWORD size = 0;
+
+ rc = MsiSourceListGetInfoW(package->ProductCode, NULL,
+ MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT,
+ INSTALLPROPERTY_DISKPROMPTW,NULL,&size);
+ if (rc == ERROR_MORE_DATA)
+ {
+ prompt = HeapAlloc(GetProcessHeap(),0,size);
+ MsiSourceListGetInfoW(package->ProductCode, NULL,
+ MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT,
+ INSTALLPROPERTY_DISKPROMPTW,prompt,&size);
+ }
+ else
+ prompt = strdupW(package->PackagePath);
+
+ msg = generate_error_string(package,1302,1,prompt);
+ while(attrib == INVALID_FILE_ATTRIBUTES)
+ {
+ rc = MessageBoxW(NULL,msg,NULL,MB_OKCANCEL);
+ if (rc == IDCANCEL)
+ {
+ rc = ERROR_INSTALL_USEREXIT;
+ break;
+ }
+ attrib = GetFileAttributesW(package->PackagePath);
+ }
+ rc = ERROR_SUCCESS;
+ }
+ else
+ return ERROR_SUCCESS;
+
+ return rc;
}
static UINT ACTION_RegisterUser(MSIPACKAGE *package)
More information about the wine-patches
mailing list