diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 0de6b274..d3322abe 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -369,7 +369,6 @@ patch_enable_all () enable_ws2_32_getaddrinfo="$1" enable_ws2_32_getsockopt="$1" enable_wtsapi32_EnumerateProcesses="$1" - enable_wusa_MSU_Package_Installer="$1" } # Enable or disable a specific patchset @@ -1234,9 +1233,6 @@ patch_enable () wtsapi32-EnumerateProcesses) enable_wtsapi32_EnumerateProcesses="$2" ;; - wusa-MSU_Package_Installer) - enable_wusa_MSU_Package_Installer="$2" - ;; *) return 1 ;; @@ -2837,7 +2833,7 @@ fi # | * [#24754] Support for ID3DXFont::DrawTextA/W # | # | Modified files: -# | * dlls/d3dx9_36/font.c, dlls/d3dx9_36/tests/core.c +# | * dlls/d3dx9_36/font.c # | if test "$enable_d3dx9_36_DrawText" -eq 1; then patch_apply d3dx9_36-DrawText/0001-d3dx9_36-Implement-ID3DXFontImpl_DrawText.patch @@ -7587,18 +7583,6 @@ if test "$enable_wtsapi32_EnumerateProcesses" -eq 1; then ) >> "$patchlist" fi -# Patchset wusa-MSU_Package_Installer -# | -# | Modified files: -# | * programs/wusa/main.c, programs/wusa/manifest.c, programs/wusa/wusa.h -# | -if test "$enable_wusa_MSU_Package_Installer" -eq 1; then - patch_apply wusa-MSU_Package_Installer/0005-wusa-Add-workaround-to-be-compatible-with-Vista-pack.patch - ( - printf '%s\n' '+ { "Sebastian Lackner", "wusa: Add workaround to be compatible with Vista packages.", 1 },'; - ) >> "$patchlist" -fi - if test "$enable_patchlist" -eq 1; then diff --git a/patches/wusa-MSU_Package_Installer/0005-wusa-Add-workaround-to-be-compatible-with-Vista-pack.patch b/patches/wusa-MSU_Package_Installer/0005-wusa-Add-workaround-to-be-compatible-with-Vista-pack.patch deleted file mode 100644 index 3067ce16..00000000 --- a/patches/wusa-MSU_Package_Installer/0005-wusa-Add-workaround-to-be-compatible-with-Vista-pack.patch +++ /dev/null @@ -1,95 +0,0 @@ -From b3478336224263e3a09fb3d1324af261b0b5ec07 Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Mon, 21 Dec 2015 03:01:05 +0100 -Subject: [PATCH] wusa: Add workaround to be compatible with Vista packages. - ---- - programs/wusa/main.c | 21 +++++++++++++++++++++ - programs/wusa/manifest.c | 22 ++++++++++++++++++++++ - programs/wusa/wusa.h | 1 + - 3 files changed, 44 insertions(+) - -diff --git a/programs/wusa/main.c b/programs/wusa/main.c -index 49e7dc753..323b16e93 100644 ---- a/programs/wusa/main.c -+++ b/programs/wusa/main.c -@@ -346,6 +346,13 @@ static void installer_cleanup(struct installer_state *state) - } - } - -+static BOOL str_starts_with(const WCHAR *str, const WCHAR *prefix) -+{ -+ DWORD str_len = lstrlenW(str), prefix_len = lstrlenW(prefix); -+ if (prefix_len > str_len) return FALSE; -+ return !wcsnicmp(str, prefix, prefix_len); -+} -+ - static BOOL str_ends_with(const WCHAR *str, const WCHAR *suffix) - { - DWORD str_len = lstrlenW(str), suffix_len = lstrlenW(suffix); -@@ -964,6 +971,20 @@ static BOOL install_msu(const WCHAR *filename, struct installer_state *state) - FindClose(search); - } - -+ /* Windows Vista MSU files do not contain an xml file - what is the correct way to get -+ * the update list? For now just install all assemblies starting with "Package_for_KB". */ -+ if (list_empty(&state->updates)) -+ { -+ static const WCHAR package_for_kbW[] = {'P','a','c','k','a','g','e','_','f','o','r','_','K','B',0}; -+ struct assembly_entry *assembly; -+ LIST_FOR_EACH_ENTRY(assembly, &state->assemblies, struct assembly_entry, entry) -+ { -+ if (!assembly->identity.name) continue; -+ if (str_starts_with(assembly->identity.name, package_for_kbW)) -+ queue_update(assembly, &state->updates); -+ } -+ } -+ - /* dump package information (for debugging) */ - if (TRACE_ON(wusa)) - { -diff --git a/programs/wusa/manifest.c b/programs/wusa/manifest.c -index e80c11998..0f61afa45 100644 ---- a/programs/wusa/manifest.c -+++ b/programs/wusa/manifest.c -@@ -671,3 +671,25 @@ done: - IXMLDOMElement_Release(root); - return ret; - } -+ -+BOOL queue_update(struct assembly_entry *assembly, struct list *update_list) -+{ -+ struct dependency_entry *entry; -+ -+ if (!(entry = alloc_dependency())) -+ return FALSE; -+ -+ if (!(entry->identity.name = strdupW(assembly->identity.name))) goto error; -+ if (!(entry->identity.version = strdupW(assembly->identity.version))) goto error; -+ if (!(entry->identity.architecture = strdupW(assembly->identity.architecture))) goto error; -+ if (!(entry->identity.language = strdupW(assembly->identity.language))) goto error; -+ if (!(entry->identity.pubkey_token = strdupW(assembly->identity.pubkey_token))) goto error; -+ -+ WINE_TRACE("Queued update %s\n", debugstr_w(entry->identity.name)); -+ list_add_tail(update_list, &entry->entry); -+ return TRUE; -+ -+error: -+ free_dependency(entry); -+ return FALSE; -+} -diff --git a/programs/wusa/wusa.h b/programs/wusa/wusa.h -index dcd784e76..ad9523776 100644 ---- a/programs/wusa/wusa.h -+++ b/programs/wusa/wusa.h -@@ -77,6 +77,7 @@ void free_assembly(struct assembly_entry *entry) DECLSPEC_HIDDEN; - void free_dependency(struct dependency_entry *entry) DECLSPEC_HIDDEN; - struct assembly_entry *load_manifest(const WCHAR *filename) DECLSPEC_HIDDEN; - BOOL load_update(const WCHAR *filename, struct list *update_list) DECLSPEC_HIDDEN; -+BOOL queue_update(struct assembly_entry *assembly, struct list *update_list) DECLSPEC_HIDDEN; - - static void *heap_alloc(size_t len) __WINE_ALLOC_SIZE(1); - static inline void *heap_alloc(size_t len) --- -2.23.0 - diff --git a/patches/wusa-MSU_Package_Installer/definition b/patches/wusa-MSU_Package_Installer/definition deleted file mode 100644 index ea400197..00000000 --- a/patches/wusa-MSU_Package_Installer/definition +++ /dev/null @@ -1 +0,0 @@ -#No idea what this workaround is for.