msi: Define common strings just once.

This commit is contained in:
Hans Leidekker 2011-05-02 16:04:25 +02:00 committed by Alexandre Julliard
parent 4668091528
commit cd34bfe6c1
13 changed files with 55 additions and 92 deletions

View File

@ -47,16 +47,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
/* /*
* consts and values used * consts and values used
*/ */
static const WCHAR c_colon[] = {'C',':','\\',0};
static const WCHAR szCreateFolders[] = static const WCHAR szCreateFolders[] =
{'C','r','e','a','t','e','F','o','l','d','e','r','s',0}; {'C','r','e','a','t','e','F','o','l','d','e','r','s',0};
static const WCHAR szCostFinalize[] = static const WCHAR szCostFinalize[] =
{'C','o','s','t','F','i','n','a','l','i','z','e',0}; {'C','o','s','t','F','i','n','a','l','i','z','e',0};
static const WCHAR szWriteRegistryValues[] = static const WCHAR szWriteRegistryValues[] =
{'W','r','i','t','e','R','e','g','i','s','t','r','y','V','a','l','u','e','s',0}; {'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[] = static const WCHAR szFileCost[] =
{'F','i','l','e','C','o','s','t',0}; {'F','i','l','e','C','o','s','t',0};
static const WCHAR szInstallInitialize[] = 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)); TRACE("Found commandline property %s = %s\n", debugstr_w(prop), debugstr_w(val));
r = msi_set_property( package->db, prop, 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_reset_folders( package, TRUE );
msi_free( val ); msi_free( val );
@ -1217,18 +1213,18 @@ UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
msi_free( db ); msi_free( db );
} }
check = msi_dup_property( package->db, cszSourceDir ); check = msi_dup_property( package->db, szSourceDir );
if (!check || replace) 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) if (r == ERROR_SUCCESS)
msi_reset_folders( package, TRUE ); msi_reset_folders( package, TRUE );
} }
msi_free( check ); msi_free( check );
check = msi_dup_property( package->db, cszSOURCEDIR ); check = msi_dup_property( package->db, szSOURCEDIR );
if (!check || replace) if (!check || replace)
msi_set_property( package->db, cszSOURCEDIR, source ); msi_set_property( package->db, szSOURCEDIR, source );
msi_free( check ); msi_free( check );
msi_free( source ); msi_free( source );
@ -1364,7 +1360,7 @@ static UINT ACTION_ProcessExecSequence(MSIPACKAGE *package, BOOL UIran)
{ {
TRACE("Running the actions\n"); 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); rc = MSI_IterateRecords(view, NULL, ITERATE_Actions, package);
msiobj_release(&view->hdr); msiobj_release(&view->hdr);
@ -2158,7 +2154,7 @@ static UINT load_all_folders( MSIPACKAGE *package )
static UINT ACTION_CostInitialize(MSIPACKAGE *package) static UINT ACTION_CostInitialize(MSIPACKAGE *package)
{ {
msi_set_property( package->db, szCostingComplete, szZero ); 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_folders( package );
load_all_components( package ); load_all_components( package );
@ -2346,14 +2342,12 @@ static BOOL process_overrides( MSIPACKAGE *package, int level )
UINT MSI_SetFeatureStates(MSIPACKAGE *package) UINT MSI_SetFeatureStates(MSIPACKAGE *package)
{ {
int level; int level;
static const WCHAR szlevel[] =
{'I','N','S','T','A','L','L','L','E','V','E','L',0};
MSICOMPONENT* component; MSICOMPONENT* component;
MSIFEATURE *feature; MSIFEATURE *feature;
TRACE("Checking Install Level\n"); 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 )) 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 (!(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 ))) 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[] = 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}; {'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[] = static const WCHAR szOutOfDiskSpace[] =
{'O','u','t','O','f','D','i','s','k','S','p','a','c','e',0}; {'O','u','t','O','f','D','i','s','k','S','p','a','c','e',0};
MSICOMPONENT *comp; MSICOMPONENT *comp;
@ -2850,7 +2842,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
LPWSTR level; LPWSTR level;
TRACE("Building directory properties\n"); TRACE("Building directory properties\n");
msi_resolve_target_folder( package, cszTargetDir, TRUE ); msi_resolve_target_folder( package, szTargetDir, TRUE );
TRACE("Evaluating component conditions\n"); TRACE("Evaluating component conditions\n");
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry ) LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
@ -2868,7 +2860,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
ACTION_GetComponentInstallStates(package); ACTION_GetComponentInstallStates(package);
ACTION_GetFeatureInstallStates(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"); TRACE("Evaluating feature conditions\n");
@ -2885,9 +2877,9 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
msi_set_property( package->db, szCostingComplete, szOne ); msi_set_property( package->db, szCostingComplete, szOne );
/* set default run level if not set */ /* set default run level if not set */
level = msi_dup_property( package->db, szlevel ); level = msi_dup_property( package->db, szInstallLevel );
if (!level) if (!level)
msi_set_property( package->db, szlevel, szOne ); msi_set_property( package->db, szInstallLevel, szOne );
msi_free(level); msi_free(level);
/* FIXME: check volume disk space */ /* FIXME: check volume disk space */
@ -4460,12 +4452,8 @@ static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey)
DWORD size; DWORD size;
UINT r; 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[] = static const WCHAR szARPProductIcon[] =
{'A','R','P','P','R','O','D','U','C','T','I','C','O','N',0}; {'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[] = static const WCHAR szAssignment[] =
{'A','s','s','i','g','n','m','e','n','t',0}; {'A','s','s','i','g','n','m','e','n','t',0};
static const WCHAR szAdvertiseFlags[] = static const WCHAR szAdvertiseFlags[] =
@ -5324,8 +5312,6 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
const WCHAR *prop, *key; const WCHAR *prop, *key;
static const WCHAR date_fmt[] = {'%','i','%','0','2','i','%','0','2','i',0}; 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[] = static const WCHAR modpath_fmt[] =
{'M','s','i','E','x','e','c','.','e','x','e',' ', {'M','s','i','E','x','e','c','.','e','x','e',' ',
'/','I','[','P','r','o','d','u','c','t','C','o','d','e',']',0}; '/','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}; {'U','n','i','n','s','t','a','l','l','S','t','r','i','n','g',0};
static const WCHAR szEstimatedSize[] = static const WCHAR szEstimatedSize[] =
{'E','s','t','i','m','a','t','e','d','S','i','z','e',0}; {'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[] = static const WCHAR szDisplayVersion[] =
{'D','i','s','p','l','a','y','V','e','r','s','i','o','n',0}; {'D','i','s','p','l','a','y','V','e','r','s','i','o','n',0};
static const WCHAR szInstallSource[] = static const WCHAR szInstallSource[] =
@ -5400,7 +5382,7 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
szARPHELPLINK, szHelpLink, szARPHELPLINK, szHelpLink,
szARPHELPTELEPHONE, szHelpTelephone, szARPHELPTELEPHONE, szHelpTelephone,
szARPINSTALLLOCATION, szInstallLocation, szARPINSTALLLOCATION, szInstallLocation,
cszSourceDir, szInstallSource, szSourceDir, szInstallSource,
szManufacturer, szPublisher, szManufacturer, szPublisher,
szARPREADME, szReadme, szARPREADME, szReadme,
szARPSIZE, szSize, szARPSIZE, szSize,

View File

@ -1053,7 +1053,7 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param)
if (value) if (value)
{ {
r = msi_set_property( package->db, propName, 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_reset_folders( package, TRUE );
msi_free(value); msi_free(value);

View File

@ -41,8 +41,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(msi); WINE_DEFAULT_DEBUG_CHANNEL(msi);
#define CUSTOM_ACTION_TYPE_MASK 0x3F #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 typedef struct tagMSIRUNNINGACTION
{ {
@ -326,7 +324,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
deformat_string(package,target,&deformated); deformat_string(package,target,&deformated);
rc = msi_set_property( package->db, source, 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_reset_folders( package, TRUE );
msi_free(deformated); msi_free(deformated);
break; break;
@ -375,7 +373,7 @@ static MSIBINARY *create_temp_binary( MSIPACKAGE *package, LPCWSTR source, BOOL
DWORD sz = MAX_PATH, write; DWORD sz = MAX_PATH, write;
UINT r; 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); GetTempPathW(MAX_PATH, fmt);
if (!GetTempFileNameW( fmt, szMsi, 0, tmpfile )) if (!GetTempFileNameW( fmt, szMsi, 0, tmpfile ))
@ -892,7 +890,7 @@ static UINT HANDLE_CustomType23(MSIPACKAGE *package, LPCWSTR source,
UINT r; UINT r;
size = MAX_PATH; 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, szBackSlash);
lstrcatW(package_path, source); lstrcatW(package_path, source);
@ -960,8 +958,7 @@ static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source,
TRACE("executing exe %s\n", debugstr_w(cmd)); TRACE("executing exe %s\n", debugstr_w(cmd));
rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL, rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL, szCRoot, &si, &info);
c_collen, &si, &info);
msi_free(cmd); msi_free(cmd);
if ( !rc ) if ( !rc )
@ -1037,8 +1034,7 @@ static UINT HANDLE_CustomType18(MSIPACKAGE *package, LPCWSTR source,
TRACE("executing exe %s\n", debugstr_w(cmd)); TRACE("executing exe %s\n", debugstr_w(cmd));
rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL, rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL, szCRoot, &si, &info);
c_collen, &si, &info);
if ( !rc ) if ( !rc )
{ {
@ -1121,8 +1117,7 @@ static UINT HANDLE_CustomType50(MSIPACKAGE *package, LPCWSTR source,
TRACE("executing exe %s\n", debugstr_w(cmd)); TRACE("executing exe %s\n", debugstr_w(cmd));
rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL, rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL, szCRoot, &si, &info);
c_collen, &si, &info);
if ( !rc ) if ( !rc )
{ {

View File

@ -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 ) static void msi_dialog_set_property( MSIPACKAGE *package, LPCWSTR property, LPCWSTR value )
{ {
UINT r = msi_set_property( package->db, property, 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 ); msi_reset_folders( package, TRUE );
} }

View File

@ -34,8 +34,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(msi); 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 build_icon_path(MSIPACKAGE *package, LPCWSTR icon_name )
{ {
LPWSTR SystemFolder, dest, FilePath; LPWSTR SystemFolder, dest, FilePath;
@ -183,11 +181,11 @@ static LPWSTR get_source_root( MSIPACKAGE *package )
{ {
LPWSTR path, p; LPWSTR path, p;
path = msi_dup_property( package->db, cszSourceDir ); path = msi_dup_property( package->db, szSourceDir );
if (path) if (path)
return path; return path;
path = msi_dup_property( package->db, cszDatabase ); path = msi_dup_property( package->db, szDatabase );
if (path) if (path)
{ {
p = strrchrW(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)); TRACE("working to resolve %s\n", debugstr_w(name));
if (!strcmpW( name, cszSourceDir )) if (!strcmpW( name, szSourceDir ))
name = cszTargetDir; name = szTargetDir;
f = get_loaded_folder( package, name ); f = get_loaded_folder( package, name );
if (!f) if (!f)
return NULL; return NULL;
/* special resolving for Target and Source root dir */ /* special resolving for Target and Source root dir */
if (!strcmpW( name, cszTargetDir )) if (!strcmpW( name, szTargetDir ))
{ {
if (!f->ResolvedSource) if (!f->ResolvedSource)
f->ResolvedSource = get_source_root( package ); f->ResolvedSource = get_source_root( package );

View File

@ -1292,9 +1292,7 @@ LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall)
{ {
MSIPACKAGE* package; MSIPACKAGE* package;
LANGID langid; 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); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
if (!package) if (!package)
{ {
@ -1321,8 +1319,6 @@ LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall)
UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel ) 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 }; static const WCHAR fmt[] = { '%','d',0 };
WCHAR level[6]; WCHAR level[6];
UINT r; UINT r;

View File

@ -85,7 +85,7 @@ static UINT msi_change_media(MSIPACKAGE *package, MSIMEDIAINFO *mi)
error = generate_error_string(package, 1302, 1, mi->disk_prompt); error = generate_error_string(package, 1302, 1, mi->disk_prompt);
error_dialog = msi_dup_property(package->db, error_prop); 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)) 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); mi->first_volume = strdupW(mi->volume_label);
msi_set_sourcedir_props(package, FALSE); 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); lstrcpyW(mi->sourcedir, source_dir);
mi->type = get_drive_type(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 && if (mi->volume_label && mi->disk_id > 1 &&
strcmpW( mi->first_volume, mi->volume_label )) 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; BOOL matches;
matches = source_matches_volume(mi, source); matches = source_matches_volume(mi, source);

View File

@ -685,7 +685,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
static const WCHAR szInstalled[] = { static const WCHAR szInstalled[] = {
' ','I','n','s','t','a','l','l','e','d','=','1',0}; ' ','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}; ' ','I','N','S','T','A','L','L','L','E','V','E','L','=','3','2','7','6','7',0};
static const WCHAR szRemoveAll[] = { static const WCHAR szRemoveAll[] = {
' ','R','E','M','O','V','E','=','A','L','L',0}; ' ','R','E','M','O','V','E','=','A','L','L',0};
@ -719,7 +719,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
sz += lstrlenW(szCommandLine); sz += lstrlenW(szCommandLine);
if (eInstallState != INSTALLSTATE_DEFAULT) if (eInstallState != INSTALLSTATE_DEFAULT)
sz += lstrlenW(szInstallLevel); sz += lstrlenW(szMaxInstallLevel);
if (eInstallState == INSTALLSTATE_ABSENT) if (eInstallState == INSTALLSTATE_ABSENT)
sz += lstrlenW(szRemoveAll); sz += lstrlenW(szRemoveAll);
@ -739,7 +739,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
lstrcpyW(commandline,szCommandLine); lstrcpyW(commandline,szCommandLine);
if (eInstallState != INSTALLSTATE_DEFAULT) if (eInstallState != INSTALLSTATE_DEFAULT)
lstrcatW(commandline, szInstallLevel); lstrcatW(commandline, szMaxInstallLevel);
if (eInstallState == INSTALLSTATE_ABSENT) if (eInstallState == INSTALLSTATE_ABSENT)
lstrcatW(commandline, szRemoveAll); lstrcatW(commandline, szRemoveAll);
@ -2098,9 +2098,6 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
DWORD val; DWORD val;
UINT r; 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)); TRACE("%s\n", debugstr_w(szProduct));
if (!szProduct || !*szProduct) if (!szProduct || !*szProduct)
@ -3554,7 +3551,6 @@ end:
*/ */
UINT WINAPI MsiConfigureFeatureW(LPCWSTR szProduct, LPCWSTR szFeature, INSTALLSTATE eInstallState) 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; MSIPACKAGE *package = NULL;
UINT r; UINT r;
WCHAR sourcepath[MAX_PATH], filename[MAX_PATH]; WCHAR sourcepath[MAX_PATH], filename[MAX_PATH];
@ -3596,7 +3592,7 @@ UINT WINAPI MsiConfigureFeatureW(LPCWSTR szProduct, LPCWSTR szFeature, INSTALLST
MsiSetInternalUI( INSTALLUILEVEL_BASIC, NULL ); MsiSetInternalUI( INSTALLUILEVEL_BASIC, NULL );
r = ACTION_PerformUIAction( package, szCostInit, -1 ); r = ACTION_PerformUIAction( package, szCostInitialize, -1 );
if (r != ERROR_SUCCESS) if (r != ERROR_SUCCESS)
goto end; goto end;

View File

@ -1049,10 +1049,10 @@ extern void ui_progress(MSIPACKAGE *, int, int, int, int) DECLSPEC_HIDDEN;
extern void ui_actiondata(MSIPACKAGE *, LPCWSTR, MSIRECORD *) DECLSPEC_HIDDEN; extern void ui_actiondata(MSIPACKAGE *, LPCWSTR, MSIRECORD *) DECLSPEC_HIDDEN;
/* common strings */ /* common strings */
static const WCHAR cszSourceDir[] = {'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 cszSOURCEDIR[] = {'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 cszRootDrive[] = {'R','O','O','T','D','R','I','V','E',0}; static const WCHAR szRootDrive[] = {'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 szTargetDir[] = {'T','A','R','G','E','T','D','I','R',0};
static const WCHAR szLocalSid[] = {'S','-','1','-','5','-','1','8',0}; static const WCHAR szLocalSid[] = {'S','-','1','-','5','-','1','8',0};
static const WCHAR szEmpty[] = {0}; static const WCHAR szEmpty[] = {0};
static const WCHAR szAll[] = {'A','L','L',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 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 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 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 */ /* memory allocation macro functions */
static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1); static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);

View File

@ -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 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 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 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 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 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 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}; 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 ) 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}; static const WCHAR szpi[] = {'%','i',0};
MSIPACKAGE *package; MSIPACKAGE *package;
WCHAR uilevel[10]; WCHAR uilevel[10];
@ -1166,7 +1163,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
set_installer_properties( package ); set_installer_properties( package );
sprintfW(uilevel,szpi,gUILevel); sprintfW(uilevel,szpi,gUILevel);
msi_set_property(package->db, szLevel, uilevel); msi_set_property(package->db, szUILevel, uilevel);
r = msi_load_summary_properties( package ); r = msi_load_summary_properties( package );
if (r != ERROR_SUCCESS) if (r != ERROR_SUCCESS)
@ -1448,7 +1445,6 @@ static UINT validate_package( MSIPACKAGE *package )
UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage) 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}; static const WCHAR dotmsi[] = {'.','m','s','i',0};
MSIDATABASE *db = NULL; MSIDATABASE *db = NULL;
MSIPACKAGE *package; MSIPACKAGE *package;
@ -1581,7 +1577,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
msiobj_release( &package->hdr ); msiobj_release( &package->hdr );
return r; return r;
} }
msi_set_property( package->db, Database, db->path ); msi_set_property( package->db, szDatabase, db->path );
if( UrlIsW( szPackage, URLIS_URL ) ) if( UrlIsW( szPackage, URLIS_URL ) )
msi_set_property( package->db, szOriginalDatabase, szPackage ); 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 ); 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 ); msi_reset_folders( package, TRUE );
msiobj_release( &package->hdr ); msiobj_release( &package->hdr );

View File

@ -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 ); 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 ) HRESULT msi_init_string_table( IStorage *stg )
{ {
USHORT zero[2] = { 0, 0 }; USHORT zero[2] = { 0, 0 };

View File

@ -82,11 +82,6 @@ struct tagMSITABLE
WCHAR name[1]; 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 */ /* information for default tables */
static WCHAR szTables[] = { '_','T','a','b','l','e','s',0 }; static WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
static WCHAR szTable[] = { 'T','a','b','l','e',0 }; static WCHAR szTable[] = { 'T','a','b','l','e',0 };

View File

@ -89,7 +89,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
strcatW(newprop,productid); strcatW(newprop,productid);
r = msi_set_property( package->db, action_property, newprop ); 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 ); msi_reset_folders( package, TRUE );
TRACE("Found Related Product... %s now %s\n", TRACE("Found Related Product... %s now %s\n",