[7/7] msi: Define common strings just once.

Hans Leidekker hans at codeweavers.com
Mon May 2 09:04:25 CDT 2011


---
 dlls/msi/action.c    |   50 ++++++++++++++++----------------------------------
 dlls/msi/appsearch.c |    2 +-
 dlls/msi/custom.c    |   17 ++++++-----------
 dlls/msi/dialog.c    |    2 +-
 dlls/msi/helpers.c   |   12 +++++-------
 dlls/msi/install.c   |    6 +-----
 dlls/msi/media.c     |    6 +++---
 dlls/msi/msi.c       |   12 ++++--------
 dlls/msi/msipriv.h   |   18 ++++++++++++++----
 dlls/msi/package.c   |   10 +++-------
 dlls/msi/string.c    |    5 -----
 dlls/msi/table.c     |    5 -----
 dlls/msi/upgrade.c   |    2 +-
 13 files changed, 55 insertions(+), 92 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index bcae5e9..58152a4 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -47,16 +47,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
 /*
  * consts and values used
  */
-static const WCHAR c_colon[] = {'C',':','\\',0};
-
 static const WCHAR szCreateFolders[] =
     {'C','r','e','a','t','e','F','o','l','d','e','r','s',0};
 static const WCHAR szCostFinalize[] =
     {'C','o','s','t','F','i','n','a','l','i','z','e',0};
 static const WCHAR szWriteRegistryValues[] =
     {'W','r','i','t','e','R','e','g','i','s','t','r','y','V','a','l','u','e','s',0};
-static const WCHAR szCostInitialize[] =
-    {'C','o','s','t','I','n','i','t','i','a','l','i','z','e',0};
 static const WCHAR szFileCost[] = 
     {'F','i','l','e','C','o','s','t',0};
 static const WCHAR szInstallInitialize[] = 
@@ -362,7 +358,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
         TRACE("Found commandline property %s = %s\n", debugstr_w(prop), debugstr_w(val));
 
         r = msi_set_property( package->db, prop, val );
-        if (r == ERROR_SUCCESS && !strcmpW( prop, cszSourceDir ))
+        if (r == ERROR_SUCCESS && !strcmpW( prop, szSourceDir ))
             msi_reset_folders( package, TRUE );
 
         msi_free( val );
@@ -1217,18 +1213,18 @@ UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
         msi_free( db );
     }
 
-    check = msi_dup_property( package->db, cszSourceDir );
+    check = msi_dup_property( package->db, szSourceDir );
     if (!check || replace)
     {
-        UINT r = msi_set_property( package->db, cszSourceDir, source );
+        UINT r = msi_set_property( package->db, szSourceDir, source );
         if (r == ERROR_SUCCESS)
             msi_reset_folders( package, TRUE );
     }
     msi_free( check );
 
-    check = msi_dup_property( package->db, cszSOURCEDIR );
+    check = msi_dup_property( package->db, szSOURCEDIR );
     if (!check || replace)
-        msi_set_property( package->db, cszSOURCEDIR, source );
+        msi_set_property( package->db, szSOURCEDIR, source );
 
     msi_free( check );
     msi_free( source );
@@ -1364,7 +1360,7 @@ static UINT ACTION_ProcessExecSequence(MSIPACKAGE *package, BOOL UIran)
     {
         TRACE("Running the actions\n");
 
-        msi_set_property(package->db, cszSourceDir, NULL);
+        msi_set_property(package->db, szSourceDir, NULL);
 
         rc = MSI_IterateRecords(view, NULL, ITERATE_Actions, package);
         msiobj_release(&view->hdr);
@@ -2158,7 +2154,7 @@ static UINT load_all_folders( MSIPACKAGE *package )
 static UINT ACTION_CostInitialize(MSIPACKAGE *package)
 {
     msi_set_property( package->db, szCostingComplete, szZero );
-    msi_set_property( package->db, cszRootDrive, c_colon );
+    msi_set_property( package->db, szRootDrive, szCRoot );
 
     load_all_folders( package );
     load_all_components( package );
@@ -2346,14 +2342,12 @@ static BOOL process_overrides( MSIPACKAGE *package, int level )
 UINT MSI_SetFeatureStates(MSIPACKAGE *package)
 {
     int level;
-    static const WCHAR szlevel[] =
-        {'I','N','S','T','A','L','L','L','E','V','E','L',0};
     MSICOMPONENT* component;
     MSIFEATURE *feature;
 
     TRACE("Checking Install Level\n");
 
-    level = msi_get_property_int(package->db, szlevel, 1);
+    level = msi_get_property_int(package->db, szInstallLevel, 1);
 
     if (!msi_get_property_int( package->db, szPreselected, 0 ))
     {
@@ -2811,11 +2805,11 @@ void msi_resolve_target_folder( MSIPACKAGE *package, const WCHAR *name, BOOL loa
 
     if (!(folder = get_loaded_folder( package, name ))) return;
 
-    if (!strcmpW( folder->Directory, cszTargetDir )) /* special resolving for target root dir */
+    if (!strcmpW( folder->Directory, szTargetDir )) /* special resolving for target root dir */
     {
-        if (!load_prop || !(path = msi_dup_property( package->db, cszTargetDir )))
+        if (!load_prop || !(path = msi_dup_property( package->db, szTargetDir )))
         {
-            path = msi_dup_property( package->db, cszRootDrive );
+            path = msi_dup_property( package->db, szRootDrive );
         }
     }
     else if (!load_prop || !(path = msi_dup_property( package->db, folder->Directory )))
@@ -2840,8 +2834,6 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
 {
     static const WCHAR condition_query[] =
         {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','`','C','o','n','d','i','t','i','o','n','`',0};
-    static const WCHAR szlevel[] =
-        {'I','N','S','T','A','L','L','L','E','V','E','L',0};
     static const WCHAR szOutOfDiskSpace[] =
         {'O','u','t','O','f','D','i','s','k','S','p','a','c','e',0};
     MSICOMPONENT *comp;
@@ -2850,7 +2842,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
     LPWSTR level;
 
     TRACE("Building directory properties\n");
-    msi_resolve_target_folder( package, cszTargetDir, TRUE );
+    msi_resolve_target_folder( package, szTargetDir, TRUE );
 
     TRACE("Evaluating component conditions\n");
     LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
@@ -2868,7 +2860,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
     ACTION_GetComponentInstallStates(package);
     ACTION_GetFeatureInstallStates(package);
 
-    if (!process_overrides( package, msi_get_property_int( package->db, szlevel, 1 ) ))
+    if (!process_overrides( package, msi_get_property_int( package->db, szInstallLevel, 1 ) ))
     {
         TRACE("Evaluating feature conditions\n");
 
@@ -2885,9 +2877,9 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
 
     msi_set_property( package->db, szCostingComplete, szOne );
     /* set default run level if not set */
-    level = msi_dup_property( package->db, szlevel );
+    level = msi_dup_property( package->db, szInstallLevel );
     if (!level)
-        msi_set_property( package->db, szlevel, szOne );
+        msi_set_property( package->db, szInstallLevel, szOne );
     msi_free(level);
 
     /* FIXME: check volume disk space */
@@ -4460,12 +4452,8 @@ static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey)
     DWORD size;
     UINT r;
 
-    static const WCHAR szProductLanguage[] =
-        {'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
     static const WCHAR szARPProductIcon[] =
         {'A','R','P','P','R','O','D','U','C','T','I','C','O','N',0};
-    static const WCHAR szProductVersion[] =
-        {'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
     static const WCHAR szAssignment[] =
         {'A','s','s','i','g','n','m','e','n','t',0};
     static const WCHAR szAdvertiseFlags[] =
@@ -5324,8 +5312,6 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
     const WCHAR *prop, *key;
 
     static const WCHAR date_fmt[] = {'%','i','%','0','2','i','%','0','2','i',0};
-    static const WCHAR szWindowsInstaller[] =
-        {'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0};
     static const WCHAR modpath_fmt[] =
         {'M','s','i','E','x','e','c','.','e','x','e',' ',
          '/','I','[','P','r','o','d','u','c','t','C','o','d','e',']',0};
@@ -5335,10 +5321,6 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
         {'U','n','i','n','s','t','a','l','l','S','t','r','i','n','g',0};
     static const WCHAR szEstimatedSize[] =
         {'E','s','t','i','m','a','t','e','d','S','i','z','e',0};
-    static const WCHAR szProductLanguage[] =
-        {'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
-    static const WCHAR szProductVersion[] =
-        {'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
     static const WCHAR szDisplayVersion[] =
         {'D','i','s','p','l','a','y','V','e','r','s','i','o','n',0};
     static const WCHAR szInstallSource[] =
@@ -5400,7 +5382,7 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
         szARPHELPLINK,            szHelpLink,
         szARPHELPTELEPHONE,       szHelpTelephone,
         szARPINSTALLLOCATION,     szInstallLocation,
-        cszSourceDir,             szInstallSource,
+        szSourceDir,              szInstallSource,
         szManufacturer,           szPublisher,
         szARPREADME,              szReadme,
         szARPSIZE,                szSize,
diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c
index c8aea77..7092a5b 100644
--- a/dlls/msi/appsearch.c
+++ b/dlls/msi/appsearch.c
@@ -1053,7 +1053,7 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param)
     if (value)
     {
         r = msi_set_property( package->db, propName, value );
-        if (r == ERROR_SUCCESS && !strcmpW( propName, cszSourceDir ))
+        if (r == ERROR_SUCCESS && !strcmpW( propName, szSourceDir ))
             msi_reset_folders( package, TRUE );
 
         msi_free(value);
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index 5fe3de7..bac86bd 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -41,8 +41,6 @@
 WINE_DEFAULT_DEBUG_CHANNEL(msi);
 
 #define CUSTOM_ACTION_TYPE_MASK 0x3F
-static const WCHAR c_collen[] = {'C',':','\\',0};
-static const WCHAR cszTempFolder[]= {'T','e','m','p','F','o','l','d','e','r',0};
 
 typedef struct tagMSIRUNNINGACTION
 {
@@ -326,7 +324,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
 
             deformat_string(package,target,&deformated);
             rc = msi_set_property( package->db, source, deformated );
-            if (rc == ERROR_SUCCESS && !strcmpW( source, cszSourceDir ))
+            if (rc == ERROR_SUCCESS && !strcmpW( source, szSourceDir ))
                 msi_reset_folders( package, TRUE );
             msi_free(deformated);
             break;
@@ -375,7 +373,7 @@ static MSIBINARY *create_temp_binary( MSIPACKAGE *package, LPCWSTR source, BOOL
     DWORD sz = MAX_PATH, write;
     UINT r;
 
-    if (msi_get_property(package->db, cszTempFolder, fmt, &sz) != ERROR_SUCCESS)
+    if (msi_get_property(package->db, szTempFolder, fmt, &sz) != ERROR_SUCCESS)
         GetTempPathW(MAX_PATH, fmt);
 
     if (!GetTempFileNameW( fmt, szMsi, 0, tmpfile ))
@@ -892,7 +890,7 @@ static UINT HANDLE_CustomType23(MSIPACKAGE *package, LPCWSTR source,
     UINT r;
 
     size = MAX_PATH;
-    msi_get_property(package->db, cszSourceDir, package_path, &size);
+    msi_get_property(package->db, szSourceDir, package_path, &size);
     lstrcatW(package_path, szBackSlash);
     lstrcatW(package_path, source);
 
@@ -960,8 +958,7 @@ static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source,
 
     TRACE("executing exe %s\n", debugstr_w(cmd));
 
-    rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL,
-                  c_collen, &si, &info);
+    rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL, szCRoot, &si, &info);
     msi_free(cmd);
 
     if ( !rc )
@@ -1037,8 +1034,7 @@ static UINT HANDLE_CustomType18(MSIPACKAGE *package, LPCWSTR source,
 
     TRACE("executing exe %s\n", debugstr_w(cmd));
 
-    rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL,
-                  c_collen, &si, &info);
+    rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL, szCRoot, &si, &info);
 
     if ( !rc )
     {
@@ -1121,8 +1117,7 @@ static UINT HANDLE_CustomType50(MSIPACKAGE *package, LPCWSTR source,
 
     TRACE("executing exe %s\n", debugstr_w(cmd));
 
-    rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL,
-                  c_collen, &si, &info);
+    rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL, szCRoot, &si, &info);
 
     if ( !rc )
     {
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 705dde3..d612acf 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -585,7 +585,7 @@ static void msi_dialog_update_controls( msi_dialog *dialog, LPCWSTR property )
 static void msi_dialog_set_property( MSIPACKAGE *package, LPCWSTR property, LPCWSTR value )
 {
     UINT r = msi_set_property( package->db, property, value );
-    if (r == ERROR_SUCCESS && !strcmpW( property, cszSourceDir ))
+    if (r == ERROR_SUCCESS && !strcmpW( property, szSourceDir ))
         msi_reset_folders( package, TRUE );
 }
 
diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c
index aecdc5b..9e7464e 100644
--- a/dlls/msi/helpers.c
+++ b/dlls/msi/helpers.c
@@ -34,8 +34,6 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(msi);
 
-static const WCHAR cszDatabase[]={'D','A','T','A','B','A','S','E',0};
-
 LPWSTR build_icon_path(MSIPACKAGE *package, LPCWSTR icon_name )
 {
     LPWSTR SystemFolder, dest, FilePath;
@@ -183,11 +181,11 @@ static LPWSTR get_source_root( MSIPACKAGE *package )
 {
     LPWSTR path, p;
 
-    path = msi_dup_property( package->db, cszSourceDir );
+    path = msi_dup_property( package->db, szSourceDir );
     if (path)
         return path;
 
-    path = msi_dup_property( package->db, cszDatabase );
+    path = msi_dup_property( package->db, szDatabase );
     if (path)
     {
         p = strrchrW(path,'\\');
@@ -229,15 +227,15 @@ LPWSTR resolve_source_folder( MSIPACKAGE *package, LPCWSTR name, MSIFOLDER **fol
 
     TRACE("working to resolve %s\n", debugstr_w(name));
 
-    if (!strcmpW( name, cszSourceDir ))
-        name = cszTargetDir;
+    if (!strcmpW( name, szSourceDir ))
+        name = szTargetDir;
 
     f = get_loaded_folder( package, name );
     if (!f)
         return NULL;
 
     /* special resolving for Target and Source root dir */
-    if (!strcmpW( name, cszTargetDir ))
+    if (!strcmpW( name, szTargetDir ))
     {
         if (!f->ResolvedSource)
             f->ResolvedSource = get_source_root( package );
diff --git a/dlls/msi/install.c b/dlls/msi/install.c
index 5993867..078e6df 100644
--- a/dlls/msi/install.c
+++ b/dlls/msi/install.c
@@ -1292,9 +1292,7 @@ LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall)
 {
     MSIPACKAGE* package;
     LANGID langid;
-    static const WCHAR szProductLanguage[] =
-        {'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
-    
+
     package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
     if (!package)
     {
@@ -1321,8 +1319,6 @@ LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall)
 
 UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel )
 {
-    static const WCHAR szInstallLevel[] = {
-        'I','N','S','T','A','L','L','L','E','V','E','L',0 };
     static const WCHAR fmt[] = { '%','d',0 };
     WCHAR level[6];
     UINT r;
diff --git a/dlls/msi/media.c b/dlls/msi/media.c
index 6675f2b..712da26 100644
--- a/dlls/msi/media.c
+++ b/dlls/msi/media.c
@@ -85,7 +85,7 @@ static UINT msi_change_media(MSIPACKAGE *package, MSIMEDIAINFO *mi)
 
     error = generate_error_string(package, 1302, 1, mi->disk_prompt);
     error_dialog = msi_dup_property(package->db, error_prop);
-    source_dir = msi_dup_property(package->db, cszSourceDir);
+    source_dir = msi_dup_property(package->db, szSourceDir);
 
     while (r == ERROR_SUCCESS && !source_matches_volume(mi, source_dir))
     {
@@ -702,7 +702,7 @@ UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi)
         mi->first_volume = strdupW(mi->volume_label);
 
     msi_set_sourcedir_props(package, FALSE);
-    source_dir = msi_dup_property(package->db, cszSourceDir);
+    source_dir = msi_dup_property(package->db, szSourceDir);
     lstrcpyW(mi->sourcedir, source_dir);
     mi->type = get_drive_type(source_dir);
 
@@ -869,7 +869,7 @@ UINT ready_media(MSIPACKAGE *package, UINT Sequence, BOOL IsCompressed, MSIMEDIA
     if (mi->volume_label && mi->disk_id > 1 &&
         strcmpW( mi->first_volume, mi->volume_label ))
     {
-        LPWSTR source = msi_dup_property(package->db, cszSourceDir);
+        LPWSTR source = msi_dup_property(package->db, szSourceDir);
         BOOL matches;
 
         matches = source_matches_volume(mi, source);
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index d48d1d1..867abb4 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -685,7 +685,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
 
     static const WCHAR szInstalled[] = {
         ' ','I','n','s','t','a','l','l','e','d','=','1',0};
-    static const WCHAR szInstallLevel[] = {
+    static const WCHAR szMaxInstallLevel[] = {
         ' ','I','N','S','T','A','L','L','L','E','V','E','L','=','3','2','7','6','7',0};
     static const WCHAR szRemoveAll[] = {
         ' ','R','E','M','O','V','E','=','A','L','L',0};
@@ -719,7 +719,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
         sz += lstrlenW(szCommandLine);
 
     if (eInstallState != INSTALLSTATE_DEFAULT)
-        sz += lstrlenW(szInstallLevel);
+        sz += lstrlenW(szMaxInstallLevel);
 
     if (eInstallState == INSTALLSTATE_ABSENT)
         sz += lstrlenW(szRemoveAll);
@@ -739,7 +739,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
         lstrcpyW(commandline,szCommandLine);
 
     if (eInstallState != INSTALLSTATE_DEFAULT)
-        lstrcatW(commandline, szInstallLevel);
+        lstrcatW(commandline, szMaxInstallLevel);
 
     if (eInstallState == INSTALLSTATE_ABSENT)
         lstrcatW(commandline, szRemoveAll);
@@ -2098,9 +2098,6 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
     DWORD val;
     UINT r;
 
-    static const WCHAR szWindowsInstaller[] = {
-        'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0};
-
     TRACE("%s\n", debugstr_w(szProduct));
 
     if (!szProduct || !*szProduct)
@@ -3554,7 +3551,6 @@ end:
  */
 UINT WINAPI MsiConfigureFeatureW(LPCWSTR szProduct, LPCWSTR szFeature, INSTALLSTATE eInstallState)
 {
-    static const WCHAR szCostInit[] = { 'C','o','s','t','I','n','i','t','i','a','l','i','z','e',0 };
     MSIPACKAGE *package = NULL;
     UINT r;
     WCHAR sourcepath[MAX_PATH], filename[MAX_PATH];
@@ -3596,7 +3592,7 @@ UINT WINAPI MsiConfigureFeatureW(LPCWSTR szProduct, LPCWSTR szFeature, INSTALLST
 
     MsiSetInternalUI( INSTALLUILEVEL_BASIC, NULL );
 
-    r = ACTION_PerformUIAction( package, szCostInit, -1 );
+    r = ACTION_PerformUIAction( package, szCostInitialize, -1 );
     if (r != ERROR_SUCCESS)
         goto end;
 
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 7758db3..5c4faca 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -1049,10 +1049,10 @@ extern void ui_progress(MSIPACKAGE *, int, int, int, int) DECLSPEC_HIDDEN;
 extern void ui_actiondata(MSIPACKAGE *, LPCWSTR, MSIRECORD *) DECLSPEC_HIDDEN;
 
 /* common strings */
-static const WCHAR cszSourceDir[] = {'S','o','u','r','c','e','D','i','r',0};
-static const WCHAR cszSOURCEDIR[] = {'S','O','U','R','C','E','D','I','R',0};
-static const WCHAR cszRootDrive[] = {'R','O','O','T','D','R','I','V','E',0};
-static const WCHAR cszTargetDir[] = {'T','A','R','G','E','T','D','I','R',0};
+static const WCHAR szSourceDir[] = {'S','o','u','r','c','e','D','i','r',0};
+static const WCHAR szSOURCEDIR[] = {'S','O','U','R','C','E','D','I','R',0};
+static const WCHAR szRootDrive[] = {'R','O','O','T','D','R','I','V','E',0};
+static const WCHAR szTargetDir[] = {'T','A','R','G','E','T','D','I','R',0};
 static const WCHAR szLocalSid[] = {'S','-','1','-','5','-','1','8',0};
 static const WCHAR szEmpty[] = {0};
 static const WCHAR szAll[] = {'A','L','L',0};
@@ -1130,6 +1130,16 @@ static const WCHAR szStreams[] = {'_','S','t','r','e','a','m','s',0};
 static const WCHAR szStorages[] = {'_','S','t','o','r','a','g','e','s',0};
 static const WCHAR szMsiPublishAssemblies[] = {'M','s','i','P','u','b','l','i','s','h','A','s','s','e','m','b','l','i','e','s',0};
 static const WCHAR szCostingComplete[] = {'C','o','s','t','i','n','g','C','o','m','p','l','e','t','e',0};
+static const WCHAR szTempFolder[] = {'T','e','m','p','F','o','l','d','e','r',0};
+static const WCHAR szDatabase[] = {'D','A','T','A','B','A','S','E',0};
+static const WCHAR szCRoot[] = {'C',':','\\',0};
+static const WCHAR szProductLanguage[] = {'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
+static const WCHAR szProductVersion[] = {'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
+static const WCHAR szWindowsInstaller[] = {'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0};
+static const WCHAR szStringData[] = {'_','S','t','r','i','n','g','D','a','t','a',0};
+static const WCHAR szStringPool[] = {'_','S','t','r','i','n','g','P','o','o','l',0};
+static const WCHAR szInstallLevel[] = {'I','N','S','T','A','L','L','L','E','V','E','L',0};
+static const WCHAR szCostInitialize[] = {'C','o','s','t','I','n','i','t','i','a','l','i','z','e',0};
 
 /* memory allocation macro functions */
 static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 9bb5526..e2476c5 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -690,9 +690,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
     static const WCHAR szLocalAppDataFolder[] = {'L','o','c','a','l','A','p','p','D','a','t','a','F','o','l','d','e','r',0};
     static const WCHAR szMyPicturesFolder[] = {'M','y','P','i','c','t','u','r','e','s','F','o','l','d','e','r',0};
     static const WCHAR szPersonalFolder[] = {'P','e','r','s','o','n','a','l','F','o','l','d','e','r',0};
-    static const WCHAR szWindowsFolder[] = {'W','i','n','d','o','w','s','F','o','l','d','e','r',0};
     static const WCHAR szWindowsVolume[] = {'W','i','n','d','o','w','s','V','o','l','u','m','e',0};
-    static const WCHAR szTempFolder[]= {'T','e','m','p','F','o','l','d','e','r',0};
     static const WCHAR szPrivileged[] = {'P','r','i','v','i','l','e','g','e','d',0};
     static const WCHAR szVersion9x[] = {'V','e','r','s','i','o','n','9','X',0};
     static const WCHAR szVersionNT[] = {'V','e','r','s','i','o','n','N','T',0};
@@ -1137,7 +1135,6 @@ void msi_adjust_privilege_properties( MSIPACKAGE *package )
 
 MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
 {
-    static const WCHAR szLevel[] = { 'U','I','L','e','v','e','l',0 };
     static const WCHAR szpi[] = {'%','i',0};
     MSIPACKAGE *package;
     WCHAR uilevel[10];
@@ -1166,7 +1163,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
         set_installer_properties( package );
 
         sprintfW(uilevel,szpi,gUILevel);
-        msi_set_property(package->db, szLevel, uilevel);
+        msi_set_property(package->db, szUILevel, uilevel);
 
         r = msi_load_summary_properties( package );
         if (r != ERROR_SUCCESS)
@@ -1448,7 +1445,6 @@ static UINT validate_package( MSIPACKAGE *package )
 
 UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
 {
-    static const WCHAR Database[] = {'D','A','T','A','B','A','S','E',0};
     static const WCHAR dotmsi[] = {'.','m','s','i',0};
     MSIDATABASE *db = NULL;
     MSIPACKAGE *package;
@@ -1581,7 +1577,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
         msiobj_release( &package->hdr );
         return r;
     }
-    msi_set_property( package->db, Database, db->path );
+    msi_set_property( package->db, szDatabase, db->path );
 
     if( UrlIsW( szPackage, URLIS_URL ) )
         msi_set_property( package->db, szOriginalDatabase, szPackage );
@@ -2091,7 +2087,7 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue
     }
 
     ret = msi_set_property( package->db, szName, szValue );
-    if (ret == ERROR_SUCCESS && !strcmpW( szName, cszSourceDir ))
+    if (ret == ERROR_SUCCESS && !strcmpW( szName, szSourceDir ))
         msi_reset_folders( package, TRUE );
 
     msiobj_release( &package->hdr );
diff --git a/dlls/msi/string.c b/dlls/msi/string.c
index 4068033..142658f 100644
--- a/dlls/msi/string.c
+++ b/dlls/msi/string.c
@@ -461,11 +461,6 @@ static void string_totalsize( const string_table *st, UINT *datasize, UINT *pool
     TRACE("data %u pool %u codepage %x\n", *datasize, *poolsize, st->codepage );
 }
 
-static const WCHAR szStringData[] = {
-    '_','S','t','r','i','n','g','D','a','t','a',0 };
-static const WCHAR szStringPool[] = {
-    '_','S','t','r','i','n','g','P','o','o','l',0 };
-
 HRESULT msi_init_string_table( IStorage *stg )
 {
     USHORT zero[2] = { 0, 0 };
diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index 14f4d30..f53b817 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -82,11 +82,6 @@ struct tagMSITABLE
     WCHAR name[1];
 };
 
-static const WCHAR szStringData[] = {
-    '_','S','t','r','i','n','g','D','a','t','a',0 };
-static const WCHAR szStringPool[] = {
-    '_','S','t','r','i','n','g','P','o','o','l',0 };
-
 /* information for default tables */
 static WCHAR szTables[]  = { '_','T','a','b','l','e','s',0 };
 static WCHAR szTable[]  = { 'T','a','b','l','e',0 };
diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c
index b131d66..8e6b7ed 100644
--- a/dlls/msi/upgrade.c
+++ b/dlls/msi/upgrade.c
@@ -89,7 +89,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
     strcatW(newprop,productid);
 
     r = msi_set_property( package->db, action_property, newprop );
-    if (r == ERROR_SUCCESS && !strcmpW( action_property, cszSourceDir ))
+    if (r == ERROR_SUCCESS && !strcmpW( action_property, szSourceDir ))
         msi_reset_folders( package, TRUE );
 
     TRACE("Found Related Product... %s now %s\n",
-- 
1.7.4.1






More information about the wine-patches mailing list