Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ea2d9c04
Commit
ea2d9c04
authored
Apr 27, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Create the Wow64 key and system directory for all supported architectures.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
339ed576
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
8 deletions
+35
-8
registry.c
server/registry.c
+35
-8
No files found.
server/registry.c
View file @
ea2d9c04
...
...
@@ -1797,17 +1797,26 @@ void init_registry(void)
{
static
const
WCHAR
HKLM
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
};
static
const
WCHAR
HKU_default
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'\\'
,
'.'
,
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
};
static
const
WCHAR
classes
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'e'
,
's'
,
'\\'
,
'W'
,
'o'
,
'w'
,
'6'
,
'4'
,
'3'
,
'2'
,
'N'
,
'o'
,
'd'
,
'e'
};
static
const
WCHAR
classes_i386
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'e'
,
's'
,
'\\'
,
'W'
,
'o'
,
'w'
,
'6'
,
'4'
,
'3'
,
'2'
,
'N'
,
'o'
,
'd'
,
'e'
};
static
const
WCHAR
classes_amd64
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'e'
,
's'
,
'\\'
,
'W'
,
'o'
,
'w'
,
'6'
,
'4'
,
'6'
,
'4'
,
'N'
,
'o'
,
'd'
,
'e'
};
static
const
WCHAR
classes_arm
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'e'
,
's'
,
'\\'
,
'W'
,
'o'
,
'w'
,
'A'
,
'A'
,
'3'
,
'2'
,
'N'
,
'o'
,
'd'
,
'e'
};
static
const
WCHAR
classes_arm64
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'e'
,
's'
,
'\\'
,
'W'
,
'o'
,
'w'
,
'A'
,
'A'
,
'6'
,
'4'
,
'N'
,
'o'
,
'd'
,
'e'
};
static
const
struct
unicode_str
root_name
=
{
NULL
,
0
};
static
const
struct
unicode_str
HKLM_name
=
{
HKLM
,
sizeof
(
HKLM
)
};
static
const
struct
unicode_str
HKU_name
=
{
HKU_default
,
sizeof
(
HKU_default
)
};
static
const
struct
unicode_str
classes_name
=
{
classes
,
sizeof
(
classes
)
};
WCHAR
*
current_user_path
;
struct
unicode_str
current_user_str
;
struct
key
*
key
,
*
hklm
,
*
hkcu
;
unsigned
int
i
;
char
*
p
;
/* switch to the config dir */
...
...
@@ -1854,10 +1863,19 @@ void init_registry(void)
free
(
current_user_path
);
load_init_registry_from_file
(
"user.reg"
,
hkcu
);
/* set the shared flag on Software\Classes\Wow6432Node */
if
(
prefix_type
==
PREFIX_64BIT
)
/* set the shared flag on Software\Classes\Wow6432Node
for all platforms
*/
for
(
i
=
1
;
i
<
supported_machines_count
;
i
++
)
{
if
((
key
=
create_key_recursive
(
hklm
,
&
classes_name
,
current_time
)))
struct
unicode_str
name
;
switch
(
supported_machines
[
i
])
{
case
IMAGE_FILE_MACHINE_I386
:
name
.
str
=
classes_i386
;
name
.
len
=
sizeof
(
classes_i386
);
break
;
case
IMAGE_FILE_MACHINE_ARMNT
:
name
.
str
=
classes_arm
;
name
.
len
=
sizeof
(
classes_arm
);
break
;
case
IMAGE_FILE_MACHINE_AMD64
:
name
.
str
=
classes_amd64
;
name
.
len
=
sizeof
(
classes_amd64
);
break
;
case
IMAGE_FILE_MACHINE_ARM64
:
name
.
str
=
classes_arm64
;
name
.
len
=
sizeof
(
classes_arm64
);
break
;
}
if
((
key
=
create_key_recursive
(
hklm
,
&
name
,
current_time
)))
{
key
->
flags
|=
KEY_WOWSHARE
;
release_object
(
key
);
...
...
@@ -1876,7 +1894,16 @@ void init_registry(void)
if
(
!
mkdir
(
"drive_c/windows"
,
0777
))
{
mkdir
(
"drive_c/windows/system32"
,
0777
);
if
(
prefix_type
==
PREFIX_64BIT
)
mkdir
(
"drive_c/windows/syswow64"
,
0777
);
for
(
i
=
1
;
i
<
supported_machines_count
;
i
++
)
{
switch
(
supported_machines
[
i
])
{
case
IMAGE_FILE_MACHINE_I386
:
mkdir
(
"drive_c/windows/syswow64"
,
0777
);
break
;
case
IMAGE_FILE_MACHINE_ARMNT
:
mkdir
(
"drive_c/windows/sysarm32"
,
0777
);
break
;
case
IMAGE_FILE_MACHINE_AMD64
:
mkdir
(
"drive_c/windows/sysx8664"
,
0777
);
break
;
case
IMAGE_FILE_MACHINE_ARM64
:
mkdir
(
"drive_c/windows/sysarm64"
,
0777
);
break
;
}
}
}
/* go back to the server dir */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment