Mike McCormack : msi: Split ACTION_CostFinalize into two functions.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 7 10:16:38 CST 2006
Module: wine
Branch: master
Commit: c5c5521015fff843dd9273dc8f99945726d1c6c2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c5c5521015fff843dd9273dc8f99945726d1c6c2
Author: Mike McCormack <mike at codeweavers.com>
Date: Tue Nov 7 15:05:48 2006 +0900
msi: Split ACTION_CostFinalize into two functions.
---
dlls/msi/action.c | 88 +++++++++++++++++++++++++++++------------------------
1 files changed, 48 insertions(+), 40 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 8e76413..c878636 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -1939,48 +1939,10 @@ LPWSTR msi_get_disk_file_version( LPCWST
return strdupW( filever );
}
-/*
- * A lot is done in this function aside from just the costing.
- * The costing needs to be implemented at some point but for now I am going
- * to focus on the directory building
- *
- */
-static UINT ACTION_CostFinalize(MSIPACKAGE *package)
+static UINT msi_check_file_install_states( MSIPACKAGE *package )
{
- static const WCHAR ExecSeqQuery[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
- '`','D','i','r','e','c','t','o','r','y','`',0};
- static const WCHAR ConditionQuery[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
- '`','C','o','n','d','i','t','i','o','n','`',0};
- static const WCHAR szCosting[] =
- {'C','o','s','t','i','n','g','C','o','m','p','l','e','t','e',0 };
- static const WCHAR szlevel[] =
- {'I','N','S','T','A','L','L','L','E','V','E','L',0};
- static const WCHAR szOne[] = { '1', 0 };
- MSICOMPONENT *comp;
+ LPWSTR file_version;
MSIFILE *file;
- UINT rc;
- MSIQUERY * view;
- LPWSTR level, file_version;
-
- if ( 1 == msi_get_property_int( package, szCosting, 0 ) )
- return ERROR_SUCCESS;
-
- TRACE("Building Directory properties\n");
-
- rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
- if (rc == ERROR_SUCCESS)
- {
- rc = MSI_IterateRecords(view, NULL, ITERATE_CostFinalizeDirectories,
- package);
- msiobj_release(&view->hdr);
- }
-
- /* read components states from the registry */
- ACTION_GetComponentInstallStates(package);
-
- TRACE("File calculations\n");
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
{
@@ -2044,6 +2006,52 @@ static UINT ACTION_CostFinalize(MSIPACKA
file->state = msifs_present;
}
+ return ERROR_SUCCESS;
+}
+
+/*
+ * A lot is done in this function aside from just the costing.
+ * The costing needs to be implemented at some point but for now I am going
+ * to focus on the directory building
+ *
+ */
+static UINT ACTION_CostFinalize(MSIPACKAGE *package)
+{
+ static const WCHAR ExecSeqQuery[] =
+ {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
+ '`','D','i','r','e','c','t','o','r','y','`',0};
+ static const WCHAR ConditionQuery[] =
+ {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
+ '`','C','o','n','d','i','t','i','o','n','`',0};
+ static const WCHAR szCosting[] =
+ {'C','o','s','t','i','n','g','C','o','m','p','l','e','t','e',0 };
+ static const WCHAR szlevel[] =
+ {'I','N','S','T','A','L','L','L','E','V','E','L',0};
+ static const WCHAR szOne[] = { '1', 0 };
+ MSICOMPONENT *comp;
+ UINT rc;
+ MSIQUERY * view;
+ LPWSTR level;
+
+ if ( 1 == msi_get_property_int( package, szCosting, 0 ) )
+ return ERROR_SUCCESS;
+
+ TRACE("Building Directory properties\n");
+
+ rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
+ if (rc == ERROR_SUCCESS)
+ {
+ rc = MSI_IterateRecords(view, NULL, ITERATE_CostFinalizeDirectories,
+ package);
+ msiobj_release(&view->hdr);
+ }
+
+ /* read components states from the registry */
+ ACTION_GetComponentInstallStates(package);
+
+ TRACE("File calculations\n");
+ msi_check_file_install_states( package );
+
TRACE("Evaluating Condition Table\n");
rc = MSI_DatabaseOpenViewW(package->db, ConditionQuery, &view);
More information about the wine-cvs
mailing list