mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added patch to allow to create win23 prefix when directory already exists.
This commit is contained in:
parent
4483c9737e
commit
c08a9ab0d6
@ -291,6 +291,7 @@ patch_enable_all ()
|
||||
enable_server_Signal_Thread="$1"
|
||||
enable_server_Stored_ACLs="$1"
|
||||
enable_server_Timestamp_Compat="$1"
|
||||
enable_server_Win32_Prefix="$1"
|
||||
enable_setupapi_DelReg="$1"
|
||||
enable_setupapi_DiskSpaceList="$1"
|
||||
enable_setupapi_Display_Device="$1"
|
||||
@ -1053,6 +1054,9 @@ patch_enable ()
|
||||
server-Timestamp_Compat)
|
||||
enable_server_Timestamp_Compat="$2"
|
||||
;;
|
||||
server-Win32_Prefix)
|
||||
enable_server_Win32_Prefix="$2"
|
||||
;;
|
||||
setupapi-DelReg)
|
||||
enable_setupapi_DelReg="$2"
|
||||
;;
|
||||
@ -6170,6 +6174,21 @@ if test "$enable_server_Timestamp_Compat" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset server-Win32_Prefix
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#29661] Allow to create win23 prefix when directory already exists
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ntdll/server.c, server/registry.c
|
||||
# |
|
||||
if test "$enable_server_Win32_Prefix" -eq 1; then
|
||||
patch_apply server-Win32_Prefix/0001-server-Allow-to-create-win23-prefix-when-directory-a.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "server: Allow to create win23 prefix when directory already exists.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset setupapi-DelReg
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,61 @@
|
||||
From 11444a1efc32c983c49e40112d9a71042fd92f36 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 18 Sep 2016 19:48:14 +0200
|
||||
Subject: server: Allow to create win23 prefix when directory already exists.
|
||||
|
||||
---
|
||||
dlls/ntdll/server.c | 11 -----------
|
||||
server/registry.c | 8 +++++++-
|
||||
2 files changed, 7 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
|
||||
index 356d631..25c6473 100644
|
||||
--- a/dlls/ntdll/server.c
|
||||
+++ b/dlls/ntdll/server.c
|
||||
@@ -1139,17 +1139,6 @@ static void setup_config_dir(void)
|
||||
mkdir( config_dir, 0777 );
|
||||
if (chdir( config_dir ) == -1) fatal_perror( "chdir to %s\n", config_dir );
|
||||
|
||||
- if ((p = getenv( "WINEARCH" )) && !strcmp( p, "win32" ))
|
||||
- {
|
||||
- /* force creation of a 32-bit prefix */
|
||||
- int fd = open( "system.reg", O_WRONLY | O_CREAT | O_EXCL, 0666 );
|
||||
- if (fd != -1)
|
||||
- {
|
||||
- static const char regfile[] = "WINE REGISTRY Version 2\n\n#arch=win32\n";
|
||||
- write( fd, regfile, sizeof(regfile) - 1 );
|
||||
- close( fd );
|
||||
- }
|
||||
- }
|
||||
MESSAGE( "wine: created the configuration directory '%s'\n", config_dir );
|
||||
}
|
||||
|
||||
diff --git a/server/registry.c b/server/registry.c
|
||||
index 97b16ed..0731b22 100644
|
||||
--- a/server/registry.c
|
||||
+++ b/server/registry.c
|
||||
@@ -1805,6 +1805,7 @@ void init_registry(void)
|
||||
WCHAR *current_user_path;
|
||||
struct unicode_str current_user_str;
|
||||
struct key *key, *hklm, *hkcu;
|
||||
+ char *p;
|
||||
|
||||
/* switch to the config dir */
|
||||
|
||||
@@ -1821,7 +1822,12 @@ void init_registry(void)
|
||||
fatal_error( "could not create Machine registry key\n" );
|
||||
|
||||
if (!load_init_registry_from_file( "system.reg", hklm ))
|
||||
- prefix_type = sizeof(void *) > sizeof(int) ? PREFIX_64BIT : PREFIX_32BIT;
|
||||
+ {
|
||||
+ if ((p = getenv( "WINEARCH" )) && !strcmp( p, "win32" ))
|
||||
+ prefix_type = PREFIX_32BIT;
|
||||
+ else
|
||||
+ prefix_type = sizeof(void *) > sizeof(int) ? PREFIX_64BIT : PREFIX_32BIT;
|
||||
+ }
|
||||
else if (prefix_type == PREFIX_UNKNOWN)
|
||||
prefix_type = PREFIX_32BIT;
|
||||
|
||||
--
|
||||
2.9.0
|
||||
|
1
patches/server-Win32_Prefix/definition
Normal file
1
patches/server-Win32_Prefix/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [29661] Allow to create win23 prefix when directory already exists
|
Loading…
x
Reference in New Issue
Block a user