74 if (*
p !=
'{' || !
q)
goto error;
79 ret->product_code_from[
len] = 0;
86 ret->version_from[
len] = 0;
90 if (*
p !=
'{' || !
q)
goto error;
95 ret->product_code_to[
len] = 0;
106 if (*
p !=
'{' || !
q)
goto error;
111 ret->upgrade_code[
len] = 0;
122 static const UINT supported_flags =
127 UINT r, valid_flags = 0, wanted_flags = 0;
128 WCHAR *
template, *product, *
p;
134 WARN(
"no summary information!\n");
138 wanted_flags &= 0xffff;
139 TRACE(
"validation flags 0x%04x\n", wanted_flags);
142 wanted_flags &= ~MSITRANSFORM_VALIDATE_PLATFORM;
144 if (wanted_flags & ~supported_flags)
146 FIXME(
"unsupported validation flags 0x%04x\n", wanted_flags);
152 WARN(
"no template property!\n");
159 WARN(
"no product property!\n");
184 if (!product_code_installed)
191 if (!
wcscmp(
desc->product_code_from, product_code_installed ))
195 free( product_code_installed );
203 if (!product_version_installed)
212 if (major_installed ==
major)
215 wanted_flags &= ~MSITRANSFORM_VALIDATE_MINORVERSION;
217 free( product_version_installed );
224 if (!product_version_installed)
233 if (major_installed ==
major && minor_installed ==
minor)
235 free( product_version_installed );
241 if (!upgrade_code_installed)
247 if (!
wcscmp(
desc->upgrade_code, upgrade_code_installed ))
249 free( upgrade_code_installed );
255 TRACE(
"applicable transform\n");
285 IStorage_Release( stg );
303 ERR(
"no product code to check\n");
314 free( product_code );
419 pos->count =
pos->max = 0;
559 L"`Header`,`StreamRef_`) VALUES (?,?,?,?,?,?)", &
insert_view );
581 L"SELECT * FROM `File` WHERE `Sequence` >= ? AND `Sequence` <= ? ORDER BY `Sequence`",
604 L"SELECT *FROM `Patch` WHERE `Sequence` >= ? AND `Sequence` <= ? ORDER BY `Sequence`",
631 L"SELECT * FROM `Media` WHERE `Source` IS NOT NULL AND `Cabinet` IS NOT NULL ORDER BY `DiskId`";
649 struct list media_list;
659 TRACE(
"query failed %u\n",
r);
666 TRACE(
"disk_id %u\n", disk_id);
677 media->disk_id = disk_id;
703 L"`Cabinet`,`VolumeLabel`,`Source`) VALUES (?,?,?,?,?,?)",
708 TRACE(
"disk id %u\n", disk_id);
709 TRACE(
"last sequence %u\n",
media->last_sequence);
783 last_sequence +=
pos->min;
789 ERR(
"Failed to set offsets, expect breakage (%u)\n",
r);
794 ERR(
"Failed to update Media table entry, expect breakage (%u)\n",
r);
828 FIXME(
"check other criteria\n" );
900 TRACE(
"patch not applicable\n");
934 LPWSTR patch_list, *patches;
952 LPWSTR xform_list, *xforms;
960 if (xforms[
i][0] ==
':')
1006 ERR(
"failed to get patch filename %u\n",
r);
1025 ERR(
"failed to parse patch summary %u\n",
r);
1041 ERR(
"failed to apply patch %u\n",
r);
void msi_parse_version_string(LPCWSTR verStr, PDWORD ms, PDWORD ls)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
WCHAR ** msi_split_string(const WCHAR *str, WCHAR sep)
UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
static UINT patch_file(MSIPACKAGE *package, MSIFILEPATCH *patch)
int msiobj_release(MSIOBJECTHDR *info)
UINT WINAPI MsiGetPatchInfoExW(LPCWSTR szPatchCode, LPCWSTR szProductCode, LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, LPCWSTR szProperty, LPWSTR lpValue, DWORD *pcchValue)
UINT msi_check_patch_applicable(MSIPACKAGE *package, MSISUMMARYINFO *si)
static void patch_offset_get_filepatches(MSIDATABASE *db, UINT last_sequence, struct patch_offset_list *pos)
static UINT parse_patch_summary(MSISUMMARYINFO *si, MSIPATCHINFO **patch)
static struct patch_offset_list * patch_offset_list_create(void)
static void patch_offset_get_files(MSIDATABASE *db, UINT last_sequence, struct patch_offset_list *pos)
static UINT patch_update_file_sequence(MSIDATABASE *db, const struct patch_offset_list *pos, MSIQUERY *view, MSIRECORD *rec)
UINT msi_apply_patches(MSIPACKAGE *package)
static UINT apply_patch_db(MSIPACKAGE *package, MSIDATABASE *patch_db, MSIPATCHINFO *patch)
static UINT patch_update_filepatch_sequence(MSIDATABASE *db, const struct patch_offset_list *pos, MSIQUERY *view, MSIRECORD *rec)
static UINT patch_add_media(MSIPACKAGE *package, IStorage *storage, MSIPATCHINFO *patch)
static UINT apply_patch_package(MSIPACKAGE *package, const WCHAR *file)
UINT msi_apply_registered_patch(MSIPACKAGE *package, LPCWSTR patch_code)
static struct transform_desc * parse_transform_desc(const WCHAR *str)
static void free_transform_desc(struct transform_desc *desc)
void msi_free_patchinfo(MSIPATCHINFO *patch)
static const WCHAR patch_media_query[]
static UINT patch_offset_modify_db(MSIDATABASE *db, struct patch_offset_list *pos)
static UINT patch_set_offsets(MSIDATABASE *db, MSIPATCHINFO *patch)
static UINT apply_substorage_transform(MSIPACKAGE *package, MSIDATABASE *patch_db, LPCWSTR name)
static BOOL match_language(MSIPACKAGE *package, LANGID langid)
UINT msi_apply_transforms(MSIPACKAGE *package)
static void patch_offset_list_free(struct patch_offset_list *pos)
static UINT check_transform_applicable(MSIPACKAGE *package, IStorage *transform)
static DWORD is_uninstallable(MSIDATABASE *db)
static UINT patch_set_media_source_prop(MSIPACKAGE *package)
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble GLdouble q
GLuint GLenum GLenum transform
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define memcpy(s1, s2, n)
static const WCHAR desc[]
static const WCHAR INSTALLPROPERTY_LOCALPACKAGEW[]
@ msidbFileAttributesPatchAdded
int MSI_RecordGetInteger(MSIRECORD *, UINT)
UINT MSI_ViewExecute(MSIQUERY *, MSIRECORD *)
#define MSI_INITIAL_MEDIA_TRANSFORM_DISKID
UINT MSI_RecordSetInteger(MSIRECORD *, UINT, int)
WCHAR * msi_dup_record_field(MSIRECORD *row, INT index)
WCHAR * msi_get_suminfo_product(IStorage *stg)
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **)
UINT MSI_DatabaseApplyTransformW(MSIDATABASE *db, LPCWSTR szTransformFile, int iErrorCond)
UINT msi_table_apply_transform(MSIDATABASE *db, IStorage *stg, int err_cond)
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT)
INT msi_suminfo_get_int32(MSISUMMARYINFO *si, UINT uiProperty)
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int)
WCHAR * msi_dup_property(MSIDATABASE *db, const WCHAR *prop)
WCHAR * msi_suminfo_dup_string(MSISUMMARYINFO *si, UINT property)
UINT MSI_ViewFetch(MSIQUERY *, MSIRECORD **)
#define MSI_INITIAL_MEDIA_TRANSFORM_OFFSET
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR)
MSIRECORD * MSI_CreateRecord(UINT)
UINT MSI_ViewModify(MSIQUERY *, MSIMODIFY, MSIRECORD *)
UINT msi_get_suminfo(IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **si)
UINT msi_create_empty_local_file(LPWSTR path, LPCWSTR suffix)
#define MSIDBOPEN_PATCHFILE
@ MSITRANSFORM_ERROR_VIEWTRANSFORM
#define MSIDBOPEN_READONLY
@ MSITRANSFORM_VALIDATE_LANGUAGE
@ MSITRANSFORM_VALIDATE_PLATFORM
@ MSITRANSFORM_VALIDATE_UPGRADECODE
@ MSITRANSFORM_VALIDATE_MAJORVERSION
@ MSITRANSFORM_VALIDATE_PRODUCT
@ MSITRANSFORM_VALIDATE_MINORVERSION
#define STGM_SHARE_EXCLUSIVE
static unsigned __int64 next
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP wchar_t *__cdecl wcsdup(_In_z_ const wchar_t *_Str)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
UINT media_transform_disk_id
UINT media_transform_offset
MSIINSTALLCONTEXT Context
#define ERROR_INSTALL_PACKAGE_INVALID
#define ERROR_PATCH_PACKAGE_INVALID
#define ERROR_FUNCTION_FAILED