Compare commits

..

4 Commits

Author SHA1 Message Date
Sebastian Lackner
8a378ee8e7 Release 1.8. 2015-12-21 18:34:18 +01:00
Sebastian Lackner
fd5fd19bb9 wusa-MSU_Package_Installer: Improve tracing and warn if cabinet contains compressed files. 2015-12-21 04:45:30 +01:00
Sebastian Lackner
d14e078ed7 Added patch to implement of wusa.exe (MSU package installer). 2015-12-21 03:16:54 +01:00
Sebastian Lackner
47e0b460b4 nvencodeapi-Video_Encoder: Update patchset to version 6.0 and fix Debian compatibility. 2015-12-20 22:55:59 +01:00
13 changed files with 2604 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features in Wine Staging 1.8-rc4 [267]:**
**Bug fixes and features in Wine Staging 1.8 [268]:**
*Note: The following list only contains features and bug fixes which are not
yet available in vanilla Wine. They are removed from the list as soon as they
@@ -219,6 +219,7 @@ for more details.*
* Improve stubs for AEV_{Get,Set}Mute
* Improve stubs for dxgi MakeWindowAssociation and GetWindowAssociation
* Improvement for heap allocation performance
* Initial implementation of wusa.exe (MSU package installer) ([Wine Bug #26757](https://bugs.winehq.org/show_bug.cgi?id=26757))
* Initialize *lpcDevices in RasEnumDevicesA ([Wine Bug #30378](https://bugs.winehq.org/show_bug.cgi?id=30378))
* Initialize System\CurrentControlSet\Control\TimeZoneInformation registry keys
* Jedi Knight: Dark Forces II crashes with winmm set to native ([Wine Bug #37983](https://bugs.winehq.org/show_bug.cgi?id=37983))

View File

@@ -0,0 +1,41 @@
From f9279651171338a8e147a4468e175c1b30861b32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 20 Dec 2015 22:13:24 +0100
Subject: nvencodeapi: Add debian specific paths to native library.
---
dlls/nvencodeapi/nvencodeapi.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/dlls/nvencodeapi/nvencodeapi.c b/dlls/nvencodeapi/nvencodeapi.c
index 7a0f531..557c6ae 100644
--- a/dlls/nvencodeapi/nvencodeapi.c
+++ b/dlls/nvencodeapi/nvencodeapi.c
@@ -324,7 +324,23 @@ NVENCSTATUS WINAPI NvEncodeAPICreateInstance(NV_ENCODE_API_FUNCTION_LIST *functi
static BOOL load_nvencode(void)
{
- libnvidia_encode_handle = wine_dlopen("libnvidia-encode.so", RTLD_NOW, NULL, 0);
+ static const char *libname[] =
+ {
+ "libnvidia-encode.so",
+ #ifdef __i386__
+ "/usr/lib/i386-linux-gnu/nvidia/current/libnvidia-encode.so",
+ #elif defined __x86_64__
+ "/usr/lib/x86_64-linux-gnu/nvidia/current/libnvidia-encode.so",
+ #endif
+ };
+ int i;
+
+ for (i = 0; i < sizeof(libname)/sizeof(libname[0]); i++)
+ {
+ libnvidia_encode_handle = wine_dlopen(libname[i], RTLD_NOW, NULL, 0);
+ if (libnvidia_encode_handle) break;
+ }
+
if (!libnvidia_encode_handle)
{
FIXME("Wine cannot find the libnvidia-encode.so library, NVIDIA video encoding support disabled.\n");
--
2.6.4

View File

@@ -0,0 +1,153 @@
From 279a1c527003811333646bcb827fda38618d8f21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 20 Dec 2015 22:15:45 +0100
Subject: nvencodeapi: Add support for version 6.0.
---
dlls/nvencodeapi/nvencodeapi.c | 51 ++++++++++++++++++++++++++++++++----------
include/nvencodeapi.h | 21 +++++++++++++++--
2 files changed, 58 insertions(+), 14 deletions(-)
diff --git a/dlls/nvencodeapi/nvencodeapi.c b/dlls/nvencodeapi/nvencodeapi.c
index 557c6ae..1a03a0b 100644
--- a/dlls/nvencodeapi/nvencodeapi.c
+++ b/dlls/nvencodeapi/nvencodeapi.c
@@ -264,18 +264,50 @@ static NVENCSTATUS WINAPI NvEncReconfigureEncoder(void *encoder, NV_ENC_RECONFIG
return origFunctions.nvEncReconfigureEncoder(encoder, reInitEncodeParams);
}
+static NVENCSTATUS WINAPI NvEncCreateMVBuffer(void *encoder, NV_ENC_CREATE_MV_BUFFER *createMVBufferParams)
+{
+ TRACE("(%p, %p)\n", encoder, createMVBufferParams);
+ return origFunctions.nvEncCreateMVBuffer(encoder, createMVBufferParams);
+}
+
+static NVENCSTATUS WINAPI NvEncDestroyMVBuffer(void *encoder, NV_ENC_OUTPUT_PTR MVBuffer)
+{
+ TRACE("(%p, %p)\n", encoder, MVBuffer);
+ return origFunctions.nvEncDestroyMVBuffer(encoder, MVBuffer);
+}
+
+static NVENCSTATUS WINAPI NvEncRunMotionEstimationOnly(void *encoder, NV_ENC_MEONLY_PARAMS *MEOnlyParams)
+{
+ TRACE("(%p, %p)\n", encoder, MEOnlyParams);
+ return origFunctions.nvEncRunMotionEstimationOnly(encoder, MEOnlyParams);
+}
NVENCSTATUS WINAPI NvEncodeAPICreateInstance(NV_ENCODE_API_FUNCTION_LIST *functionList)
{
+ NVENCSTATUS status;
+
TRACE("(%p)\n", functionList);
if (!functionList)
return NV_ENC_ERR_INVALID_PTR;
- /* FIXME: Provide forward/backwards compatibility */
- if (functionList->version != NV_ENCODE_API_FUNCTION_LIST_VER)
- FIXME("Application expects nvencodeapi version %x, but wrapper only supports version %x\n",
- functionList->version, NV_ENCODE_API_FUNCTION_LIST_VER);
+ /* we currently support 5.0 and 6.0 */
+ if (functionList->version != NV_ENCODE_API_FUNCTION_LIST_VER &&
+ functionList->version != NV_ENCODE_API_FUNCTION_LIST_VER_6_0)
+ {
+ FIXME("Application requested nvencodeapi version %x which is not supported yet\n",
+ functionList->version);
+ return NV_ENC_ERR_INVALID_VERSION;
+ }
+
+ memset(&origFunctions, 0, sizeof(origFunctions));
+ origFunctions.version = functionList->version;
+ status = pNvEncodeAPICreateInstance(&origFunctions);
+ if (status)
+ {
+ FIXME("Failed to create native encoder for version %x\n", functionList->version);
+ return status;
+ }
/* set all function points and reserved values to zero */
memset(functionList, 0, sizeof(*functionList));
@@ -316,6 +348,9 @@ NVENCSTATUS WINAPI NvEncodeAPICreateInstance(NV_ENCODE_API_FUNCTION_LIST *functi
SET_FUNCPTR(EncRegisterResource);
SET_FUNCPTR(EncUnregisterResource);
SET_FUNCPTR(EncReconfigureEncoder);
+ SET_FUNCPTR(EncCreateMVBuffer); /* available since 6.0 */
+ SET_FUNCPTR(EncDestroyMVBuffer); /* available since 6.0 */
+ SET_FUNCPTR(EncRunMotionEstimationOnly); /* available since 6.0 */
#undef SET_FUNCPTR
@@ -354,14 +389,6 @@ static BOOL load_nvencode(void)
return FALSE;
}
- memset(&origFunctions, 0, sizeof(origFunctions));
- origFunctions.version = NV_ENCODE_API_FUNCTION_LIST_VER;
- if (pNvEncodeAPICreateInstance(&origFunctions))
- {
- FIXME("Failed to get function pointers.\n");
- return FALSE;
- }
-
return TRUE;
}
diff --git a/include/nvencodeapi.h b/include/nvencodeapi.h
index 45e9fb9..3e44dd3 100644
--- a/include/nvencodeapi.h
+++ b/include/nvencodeapi.h
@@ -27,6 +27,12 @@
#define NVENCAPI_VERSION ((NVENCAPI_MAJOR_VERSION << 4) | (NVENCAPI_MINOR_VERSION))
#define NVENCAPI_STRUCT_VERSION(type, version) (uint32_t)(sizeof(type) | ((version)<<16) | (NVENCAPI_VERSION << 24))
+/* the version scheme changed between 5.0 and 6.0 */
+#define NVENCAPI_MAJOR_VERSION_6 6
+#define NVENCAPI_MINOR_VERSION_0 0
+#define NVENCAPI_VERSION_6_0 (NVENCAPI_MAJOR_VERSION_6 | (NVENCAPI_MINOR_VERSION_0 << 24))
+#define NVENCAPI_STRUCT_VERSION_6_0(ver) ((uint32_t)NVENCAPI_VERSION_6_0 | ((ver)<<16) | (0x7 << 28))
+
#define NVENCSTATUS int
#define NV_ENC_SUCCESS 0
#define NV_ENC_ERR_INVALID_PTR 6
@@ -59,6 +65,8 @@ typedef struct _NV_ENC_EVENT_PARAMS NV_ENC_EVENT_PARAMS;
typedef struct _NV_ENC_OPEN_ENCODE_SESSIONEX_PARAMS NV_ENC_OPEN_ENCODE_SESSIONEX_PARAMS;
typedef struct _NV_ENC_BUFFER_FORMAT NV_ENC_BUFFER_FORMAT;
typedef struct _NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS;
+typedef struct _NV_ENC_CREATE_MV_BUFFER NV_ENC_CREATE_MV_BUFFER;
+typedef struct _NV_ENC_MEONLY_PARAMS NV_ENC_MEONLY_PARAMS;
typedef struct _NVENC_EXTERNAL_ME_HINT_COUNTS_PER_BLOCKTYPE
{
@@ -230,10 +238,15 @@ typedef struct __NV_ENCODE_API_FUNCTION_LIST
NVENCSTATUS (WINAPI *nvEncRegisterResource)(void *encoder, NV_ENC_REGISTER_RESOURCE *registerResParams);
NVENCSTATUS (WINAPI *nvEncUnregisterResource)(void *encoder, NV_ENC_REGISTERED_PTR registeredRes);
NVENCSTATUS (WINAPI *nvEncReconfigureEncoder)(void *encoder, NV_ENC_RECONFIGURE_PARAMS *reInitEncodeParams);
- void *reserved2[285];
+ void *reserved1;
+ NVENCSTATUS (WINAPI *nvEncCreateMVBuffer)(void *encoder, NV_ENC_CREATE_MV_BUFFER *createMVBufferParams);
+ NVENCSTATUS (WINAPI *nvEncDestroyMVBuffer)(void *encoder, NV_ENC_OUTPUT_PTR MVBuffer);
+ NVENCSTATUS (WINAPI *nvEncRunMotionEstimationOnly)(void *encoder, NV_ENC_MEONLY_PARAMS *MEOnlyParams);
+ void *reserved2[281];
} NV_ENCODE_API_FUNCTION_LIST;
#define NV_ENCODE_API_FUNCTION_LIST_VER NVENCAPI_STRUCT_VERSION(NV_ENCODE_API_FUNCTION_LIST, 2)
+#define NV_ENCODE_API_FUNCTION_LIST_VER_6_0 NVENCAPI_STRUCT_VERSION_6_0(2)
typedef struct __LINUX_NV_ENCODE_API_FUNCTION_LIST
{
@@ -275,7 +288,11 @@ typedef struct __LINUX_NV_ENCODE_API_FUNCTION_LIST
NVENCSTATUS (*nvEncRegisterResource)(void *encoder, NV_ENC_REGISTER_RESOURCE *registerResParams);
NVENCSTATUS (*nvEncUnregisterResource)(void *encoder, NV_ENC_REGISTERED_PTR registeredRes);
NVENCSTATUS (*nvEncReconfigureEncoder)(void *encoder, NV_ENC_RECONFIGURE_PARAMS *reInitEncodeParams);
- void *reserved2[285];
+ void *reserved1;
+ NVENCSTATUS (*nvEncCreateMVBuffer)(void *encoder, NV_ENC_CREATE_MV_BUFFER *createMVBufferParams);
+ NVENCSTATUS (*nvEncDestroyMVBuffer)(void *encoder, NV_ENC_OUTPUT_PTR MVBuffer);
+ NVENCSTATUS (*nvEncRunMotionEstimationOnly)(void *encoder, NV_ENC_MEONLY_PARAMS *MEOnlyParams);
+ void *reserved2[281];
} LINUX_NV_ENCODE_API_FUNCTION_LIST;
#endif /* __WINE_NVENCODEAPI_H */
--
2.6.4

View File

@@ -52,13 +52,13 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "ca9001d6bda3084ab9bc80baa7d6e5533252c797"
echo "a981d3738014339cd0fae1e7f5aa9429222ee03d"
}
# Show version information
version()
{
echo "Wine Staging 1.8-rc4"
echo "Wine Staging 1.8"
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
echo ""
echo "Patchset to be applied on upstream Wine:"
@@ -344,6 +344,7 @@ patch_enable_all ()
enable_ws2_32_WriteWatches="$1"
enable_ws2_32_getaddrinfo="$1"
enable_wtsapi32_EnumerateProcesses="$1"
enable_wusa_MSU_Package_Installer="$1"
}
# Enable or disable all categories
@@ -1145,6 +1146,9 @@ patch_enable ()
wtsapi32-EnumerateProcesses)
enable_wtsapi32_EnumerateProcesses="$2"
;;
wusa-MSU_Package_Installer)
enable_wusa_MSU_Package_Installer="$2"
;;
*)
return 1
;;
@@ -4735,8 +4739,12 @@ fi
# |
if test "$enable_nvencodeapi_Video_Encoder" -eq 1; then
patch_apply nvencodeapi-Video_Encoder/0001-nvencodeapi-First-implementation.patch
patch_apply nvencodeapi-Video_Encoder/0002-nvencodeapi-Add-debian-specific-paths-to-native-libr.patch
patch_apply nvencodeapi-Video_Encoder/0003-nvencodeapi-Add-support-for-version-6.0.patch
(
echo '+ { "Michael MĂĽller", "nvencodeapi: First implementation.", 1 },';
echo '+ { "Michael MĂĽller", "nvencodeapi: Add debian specific paths to native library.", 1 },';
echo '+ { "Michael MĂĽller", "nvencodeapi: Add support for version 6.0.", 1 },';
) >> "$patchlist"
fi
@@ -6802,6 +6810,33 @@ if test "$enable_wtsapi32_EnumerateProcesses" -eq 1; then
) >> "$patchlist"
fi
# Patchset wusa-MSU_Package_Installer
# |
# | This patchset fixes the following Wine bugs:
# | * [#26757] Initial implementation of wusa.exe (MSU package installer)
# |
# | Modified files:
# | * programs/wusa/Makefile.in, 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/0001-wusa-Implement-basic-installation-logic.patch
patch_apply wusa-MSU_Package_Installer/0002-wusa-Ignore-systemProtection-subkey-of-registry-key.patch
patch_apply wusa-MSU_Package_Installer/0003-wusa-Treat-empty-update-list-as-error.patch
patch_apply wusa-MSU_Package_Installer/0004-wusa-Implement-WOW64-support.patch
patch_apply wusa-MSU_Package_Installer/0005-wusa-Add-workaround-to-be-compatible-with-Vista-pack.patch
patch_apply wusa-MSU_Package_Installer/0006-wusa-Improve-tracing-of-installation-process.patch
patch_apply wusa-MSU_Package_Installer/0007-wusa-Print-warning-when-encountering-msdelta-compres.patch
(
echo '+ { "Michael MĂĽller", "wusa: Implement basic installation logic.", 1 },';
echo '+ { "Michael MĂĽller", "wusa: Ignore systemProtection subkey of registry key.", 1 },';
echo '+ { "Michael MĂĽller", "wusa: Treat empty update list as error.", 1 },';
echo '+ { "Michael MĂĽller", "wusa: Implement WOW64 support.", 1 },';
echo '+ { "Sebastian Lackner", "wusa: Add workaround to be compatible with Vista packages.", 1 },';
echo '+ { "Sebastian Lackner", "wusa: Improve tracing of installation process.", 1 },';
echo '+ { "Michael MĂĽller", "wusa: Print warning when encountering msdelta compressed files.", 1 },';
) >> "$patchlist"
fi
if test "$enable_patchlist" -eq 1; then

View File

@@ -0,0 +1,32 @@
From f4415437d092f621e2cb292cf290a7910165d05f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 21 Dec 2015 01:45:07 +0100
Subject: wusa: Ignore systemProtection subkey of registry key.
---
programs/wusa/manifest.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/programs/wusa/manifest.c b/programs/wusa/manifest.c
index fc1f65b..63e56e0 100644
--- a/programs/wusa/manifest.c
+++ b/programs/wusa/manifest.c
@@ -449,6 +449,7 @@ error:
static BOOL read_registry_key(IXMLDOMElement *child, WCHAR *tagname, void *context)
{
static const WCHAR securityDescriptorW[] = {'s','e','c','u','r','i','t','y','D','e','s','c','r','i','p','t','o','r',0};
+ static const WCHAR systemProtectionW[] = {'s','y','s','t','e','m','P','r','o','t','e','c','t','i','o','n',0};
static const WCHAR registryValueW[] = {'r','e','g','i','s','t','r','y','V','a','l','u','e',0};
static const WCHAR nameW[] = {'n','a','m','e',0};
static const WCHAR valueTypeW[] = {'v','a','l','u','e','T','y','p','e',0};
@@ -457,6 +458,7 @@ static BOOL read_registry_key(IXMLDOMElement *child, WCHAR *tagname, void *conte
struct registrykv_entry *entry;
if (!strcmpW(tagname, securityDescriptorW)) return TRUE;
+ if (!strcmpW(tagname, systemProtectionW)) return TRUE;
if (strcmpW(tagname, registryValueW))
{
WINE_FIXME("Ignoring unexpected tag %s\n", debugstr_w(tagname));
--
2.6.4

View File

@@ -0,0 +1,29 @@
From e489fac14e207ba0973c145ede43587457cc0be1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 21 Dec 2015 01:46:34 +0100
Subject: wusa: Treat empty update list as error.
---
programs/wusa/main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/programs/wusa/main.c b/programs/wusa/main.c
index 7c1dfef..9cd8a2d 100644
--- a/programs/wusa/main.c
+++ b/programs/wusa/main.c
@@ -998,6 +998,12 @@ static BOOL install_msu(WCHAR *filename, struct installer_state *state)
}
}
+ if (list_empty(&state->updates))
+ {
+ WINE_ERR("No updates found, probably incompatible MSU file format?\n");
+ goto done;
+ }
+
/* perform dryrun */
set_assembly_status(&state->assemblies, ASSEMBLY_STATUS_NONE);
if (!install_updates(state, TRUE))
--
2.6.4

View File

@@ -0,0 +1,126 @@
From 3bd8282421aad38c45c38d2f3510c46560a4902d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 21 Dec 2015 01:47:59 +0100
Subject: wusa: Implement WOW64 support.
---
programs/wusa/main.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 58 insertions(+), 1 deletion(-)
diff --git a/programs/wusa/main.c b/programs/wusa/main.c
index 9cd8a2d..5dae802 100644
--- a/programs/wusa/main.c
+++ b/programs/wusa/main.c
@@ -66,6 +66,9 @@ struct installer_state
struct list updates;
};
+static const WCHAR x86W[] = {'x','8','6',0};
+static const WCHAR amd64W[] = {'a','m','d','6','4',0};
+
static BOOL strbuf_init(struct strbuf *buf)
{
buf->pos = 0;
@@ -375,6 +378,14 @@ static WCHAR *lookup_expression(struct assembly_entry *assembly, const WCHAR *ke
if (!strcmpW(key, runtime_system32))
{
+ #if defined(__x86_64__)
+ if (!strcmpW(assembly->identity.architecture, x86W))
+ {
+ GetSystemWow64DirectoryW(path, sizeof(path)/sizeof(path[0]));
+ return strdupW(path);
+ }
+ #endif
+
GetSystemDirectoryW(path, sizeof(path)/sizeof(path[0]));
return strdupW(path);
}
@@ -691,8 +702,13 @@ static BOOL install_registry(struct assembly_entry *assembly, BOOL dryrun)
struct registrykv_entry *registrykv;
HKEY root, subkey;
WCHAR *path;
+ REGSAM sam = KEY_ALL_ACCESS;
BOOL ret = TRUE;
+#if defined(__x86_64__)
+ if (!strcmpW(assembly->identity.architecture, x86W)) sam |= KEY_WOW64_32KEY;
+#endif
+
LIST_FOR_EACH_ENTRY(registryop, &assembly->registryops, struct registryop_entry, entry)
{
if (!(path = split_registry_key(registryop->key, &root)))
@@ -701,7 +717,7 @@ static BOOL install_registry(struct assembly_entry *assembly, BOOL dryrun)
break;
}
- if (!dryrun && RegCreateKeyExW(root, path, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &subkey, NULL))
+ if (!dryrun && RegCreateKeyExW(root, path, 0, NULL, REG_OPTION_NON_VOLATILE, sam, NULL, &subkey, NULL))
{
WINE_ERR("Failed to open registry key %s\n", debugstr_w(registryop->key));
ret = FALSE;
@@ -772,6 +788,14 @@ static BOOL install_assembly(struct list *manifest_list, struct assembly_identit
return FALSE;
}
+#if defined(__i386__)
+ if (!strcmpW(assembly->identity.architecture, amd64W))
+ {
+ WINE_ERR("Can not install amd64 assembly in 32 bit prefix\n");
+ return FALSE;
+ }
+#endif
+
assembly->status = ASSEMBLY_STATUS_IN_PROGRESS;
LIST_FOR_EACH_ENTRY(dependency, &assembly->dependencies, struct dependency_entry, entry)
@@ -1027,6 +1051,37 @@ done:
return ret;
}
+static void restart_as_x86_64(void)
+{
+ WCHAR filename[MAX_PATH];
+ PROCESS_INFORMATION pi;
+ STARTUPINFOW si;
+ DWORD exit_code = 1;
+ BOOL is_wow64;
+ void *redir;
+
+ if (!IsWow64Process(GetCurrentProcess(), &is_wow64) || !is_wow64)
+ return;
+
+ memset(&si, 0, sizeof(si));
+ si.cb = sizeof(si);
+ GetModuleFileNameW(0, filename, MAX_PATH);
+
+ Wow64DisableWow64FsRedirection(&redir);
+ if (CreateProcessW(filename, GetCommandLineW(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
+ {
+ WINE_TRACE("Restarting %s\n", wine_dbgstr_w(filename));
+ WaitForSingleObject(pi.hProcess, INFINITE);
+ GetExitCodeProcess(pi.hProcess, &exit_code);
+ CloseHandle(pi.hProcess);
+ CloseHandle(pi.hThread);
+ }
+ else WINE_ERR("Failed to restart 64-bit %s, err %d\n", wine_dbgstr_w(filename), GetLastError());
+ Wow64RevertWow64FsRedirection(redir);
+
+ ExitProcess(exit_code);
+}
+
int wmain(int argc, WCHAR *argv[])
{
static const WCHAR norestartW[] = {'/','n','o','r','e','s','t','a','r','t',0};
@@ -1035,6 +1090,8 @@ int wmain(int argc, WCHAR *argv[])
WCHAR *filename = NULL;
int i;
+ restart_as_x86_64();
+
state.norestart = FALSE;
state.quiet = FALSE;
--
2.6.4

View File

@@ -0,0 +1,95 @@
From c848126e160493a7baa717c96e663ef5ebddb542 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 21 Dec 2015 03:01:05 +0100
Subject: 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 5dae802..834da33 100644
--- a/programs/wusa/main.c
+++ b/programs/wusa/main.c
@@ -111,6 +111,13 @@ static BOOL strbuf_append(struct strbuf *buf, const WCHAR *str, DWORD len)
return TRUE;
}
+static BOOL str_starts_with(const WCHAR *str, const WCHAR *prefix)
+{
+ DWORD str_len = strlenW(str), prefix_len = strlenW(prefix);
+ if (prefix_len > str_len) return FALSE;
+ return !strncmpiW(str, prefix, prefix_len);
+}
+
static BOOL str_ends_with(const WCHAR *str, const WCHAR *suffix)
{
DWORD str_len = strlenW(str), suffix_len = strlenW(suffix);
@@ -1003,6 +1010,20 @@ static BOOL install_msu(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 (WINE_TRACE_ON(wusa))
{
diff --git a/programs/wusa/manifest.c b/programs/wusa/manifest.c
index 63e56e0..0d6fae6 100644
--- a/programs/wusa/manifest.c
+++ b/programs/wusa/manifest.c
@@ -704,3 +704,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 eada6d9..ef5793b 100644
--- a/programs/wusa/wusa.h
+++ b/programs/wusa/wusa.h
@@ -82,6 +82,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.6.4

View File

@@ -0,0 +1,69 @@
From 2038bc924b8e3a3b1d5a1e989e9d2a74570c0dc1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 21 Dec 2015 04:27:02 +0100
Subject: wusa: Improve tracing of installation process.
---
programs/wusa/main.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/programs/wusa/main.c b/programs/wusa/main.c
index 834da33..6a893ec 100644
--- a/programs/wusa/main.c
+++ b/programs/wusa/main.c
@@ -469,6 +469,8 @@ static BOOL install_files_copy(struct assembly_entry *assembly, const WCHAR *sou
}
else
{
+ WINE_TRACE("Copying %s -> %s\n", debugstr_w(source), debugstr_w(target));
+
if (!create_parent_directory(target))
{
WINE_ERR("Failed to create parent directory for %s\n", debugstr_w(target));
@@ -688,6 +690,8 @@ static BOOL install_registry_value(struct assembly_entry *assembly, HKEY key, st
static const WCHAR reg_dwordW[] = {'R','E','G','_','D','W','O','R','D',0};
static const WCHAR reg_binaryW[] = {'R','E','G','_','B','I','N','A','R','Y',0};
+ WINE_TRACE("Setting registry key %s = %s\n", debugstr_w(registrykv->name), debugstr_w(registrykv->value));
+
if (!strcmpW(registrykv->value_type, reg_szW))
return install_registry_string(assembly, key, registrykv, REG_SZ, dryrun);
if (!strcmpW(registrykv->value_type, reg_expand_szW))
@@ -724,6 +728,8 @@ static BOOL install_registry(struct assembly_entry *assembly, BOOL dryrun)
break;
}
+ WINE_TRACE("Processing registry key %s\n", debugstr_w(registryop->key));
+
if (!dryrun && RegCreateKeyExW(root, path, 0, NULL, REG_OPTION_NON_VOLATILE, sam, NULL, &subkey, NULL))
{
WINE_ERR("Failed to open registry key %s\n", debugstr_w(registryop->key));
@@ -810,6 +816,8 @@ static BOOL install_assembly(struct list *manifest_list, struct assembly_identit
if (!install_assembly(manifest_list, &dependency->identity, dryrun)) return FALSE;
}
+ WINE_TRACE("Installing assembly %s%s\n", debugstr_w(name), dryrun ? " (dryrun)" : "");
+
if (!install_files(assembly, dryrun))
{
WINE_ERR("Failed to install all files for %s\n", debugstr_w(name));
@@ -822,6 +830,8 @@ static BOOL install_assembly(struct list *manifest_list, struct assembly_identit
return FALSE;
}
+ WINE_TRACE("Installation of %s finished\n", debugstr_w(name));
+
assembly->status = ASSEMBLY_STATUS_INSTALLED;
return TRUE;
}
@@ -1065,6 +1075,7 @@ static BOOL install_msu(WCHAR *filename, struct installer_state *state)
goto done;
}
+ WINE_TRACE("Installation finished\n");
ret = TRUE;
done:
--
2.6.4

View File

@@ -0,0 +1,39 @@
From b1dbdbafa126589fdaf8f92eb0706eab0ff85f56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 21 Dec 2015 04:09:11 +0100
Subject: wusa: Print warning when encountering msdelta compressed files.
---
programs/wusa/main.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/programs/wusa/main.c b/programs/wusa/main.c
index 6a893ec..299aff2 100644
--- a/programs/wusa/main.c
+++ b/programs/wusa/main.c
@@ -892,6 +892,7 @@ static void installer_cleanup(struct installer_state *state)
static BOOL load_assemblies_from_cab(const WCHAR *filename, struct installer_state *state)
{
+ static const WCHAR manifest_cix_xmlW[] = {'_','m','a','n','i','f','e','s','t','_','.','c','i','x','.','x','m','l',0};
static const WCHAR manifestW[] = {'.','m','a','n','i','f','e','s','t',0};
static const WCHAR mumW[] = {'.','m','u','m',0};
static const WCHAR starW[] = {'*',0};
@@ -910,6 +911,14 @@ static BOOL load_assemblies_from_cab(const WCHAR *filename, struct installer_sta
return FALSE;
}
+ if (!(path = path_combine(temp_path, manifest_cix_xmlW))) return FALSE;
+ if (GetFileAttributesW(path) != INVALID_FILE_ATTRIBUTES)
+ {
+ WINE_FIXME("Cabinet uses proprietary msdelta file compression which is not (yet) supported.\n");
+ WINE_FIXME("Installation of msu file will most likely fail.\n");
+ }
+ heap_free(path);
+
if (!(path = path_combine(temp_path, starW))) return FALSE;
search = FindFirstFileW(path, &data);
heap_free(path);
--
2.6.4

View File

@@ -0,0 +1 @@
Fixes: [26757] Initial implementation of wusa.exe (MSU package installer)

View File

@@ -1,3 +1,9 @@
wine-staging (1.8) unstable; urgency=low
* Update nvencodeapi wrapper patchset to version 6.0 and fix Debian
compatibility.
* Added patch to add implementation of wusa.exe (MSU package installer).
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 21 Dec 2015 18:31:02 +0100
wine-staging (1.8~rc4) unstable; urgency=low
* Updated patch to fix implementation of NtQueryInformationProcess for
ProcessDebugFlags.