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
0f284520
Commit
0f284520
authored
Sep 17, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineboot: Add a generic mechanism for pre-installing things before the main wine.inf section.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
80a57c61
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
21 deletions
+15
-21
install.c
dlls/setupapi/install.c
+0
-9
wine.inf.in
loader/wine.inf.in
+6
-2
wineboot.c
programs/wineboot/wineboot.c
+9
-10
No files found.
dlls/setupapi/install.c
View file @
0f284520
...
@@ -1076,15 +1076,6 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section,
...
@@ -1076,15 +1076,6 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section,
BOOL
ret
;
BOOL
ret
;
int
i
;
int
i
;
if
(
flags
&
SPINST_REGISTRY
)
{
struct
registry_callback_info
info
;
info
.
default_root
=
key_root
;
info
.
delete
=
FALSE
;
if
(
!
iterate_section_fields
(
hinf
,
section
,
L"WinePreInstall"
,
registry_callback
,
&
info
))
return
FALSE
;
}
if
(
flags
&
SPINST_REGSVR
)
if
(
flags
&
SPINST_REGSVR
)
{
{
if
(
iterate_section_fields
(
hinf
,
section
,
L"WineFakeDlls"
,
fake_dlls_callback
,
NULL
))
if
(
iterate_section_fields
(
hinf
,
section
,
L"WineFakeDlls"
,
fake_dlls_callback
,
NULL
))
...
...
loader/wine.inf.in
View file @
0f284520
...
@@ -26,6 +26,12 @@
...
@@ -26,6 +26,12 @@
[version]
[version]
signature="$CHICAGO$"
signature="$CHICAGO$"
[PreInstall.ntamd64]
AddReg=Wow64
[PreInstall.ntarm64]
AddReg=Wow64
[DefaultInstall]
[DefaultInstall]
RegisterDlls=RegisterDllsSection
RegisterDlls=RegisterDllsSection
WineFakeDlls=FakeDllsWin32,FakeDlls
WineFakeDlls=FakeDllsWin32,FakeDlls
...
@@ -78,7 +84,6 @@ AddReg=\
...
@@ -78,7 +84,6 @@ AddReg=\
[DefaultInstall.ntamd64]
[DefaultInstall.ntamd64]
RegisterDlls=RegisterDllsSection
RegisterDlls=RegisterDllsSection
WineFakeDlls=FakeDllsWin64,FakeDlls
WineFakeDlls=FakeDllsWin64,FakeDlls
WinePreInstall=Wow64
UpdateInis=SystemIni
UpdateInis=SystemIni
CopyFiles=ColorFiles,EtcFiles,InfFiles,NlsFiles,SortFiles
CopyFiles=ColorFiles,EtcFiles,InfFiles,NlsFiles,SortFiles
AddReg=\
AddReg=\
...
@@ -105,7 +110,6 @@ AddReg=\
...
@@ -105,7 +110,6 @@ AddReg=\
[DefaultInstall.ntarm64]
[DefaultInstall.ntarm64]
RegisterDlls=RegisterDllsSection
RegisterDlls=RegisterDllsSection
WineFakeDlls=FakeDllsWin64,FakeDlls
WineFakeDlls=FakeDllsWin64,FakeDlls
WinePreInstall=Wow64
UpdateInis=SystemIni
UpdateInis=SystemIni
CopyFiles=ColorFiles,EtcFiles,InfFiles,NlsFiles,SortFiles
CopyFiles=ColorFiles,EtcFiles,InfFiles,NlsFiles,SortFiles
AddReg=\
AddReg=\
...
...
programs/wineboot/wineboot.c
View file @
0f284520
...
@@ -1327,7 +1327,7 @@ static HWND show_wait_window(void)
...
@@ -1327,7 +1327,7 @@ static HWND show_wait_window(void)
return
hwnd
;
return
hwnd
;
}
}
static
HANDLE
start_rundll32
(
const
WCHAR
*
inf_path
,
WORD
machine
)
static
HANDLE
start_rundll32
(
const
WCHAR
*
inf_path
,
const
WCHAR
*
install
,
WORD
machine
)
{
{
WCHAR
app
[
MAX_PATH
+
ARRAY_SIZE
(
L"
\\
rundll32.exe"
)];
WCHAR
app
[
MAX_PATH
+
ARRAY_SIZE
(
L"
\\
rundll32.exe"
)];
STARTUPINFOW
si
;
STARTUPINFOW
si
;
...
@@ -1345,12 +1345,7 @@ static HANDLE start_rundll32( const WCHAR *inf_path, WORD machine )
...
@@ -1345,12 +1345,7 @@ static HANDLE start_rundll32( const WCHAR *inf_path, WORD machine )
len
=
lstrlenW
(
app
)
+
ARRAY_SIZE
(
L" setupapi,InstallHinfSection DefaultInstall 128 "
)
+
lstrlenW
(
inf_path
);
len
=
lstrlenW
(
app
)
+
ARRAY_SIZE
(
L" setupapi,InstallHinfSection DefaultInstall 128 "
)
+
lstrlenW
(
inf_path
);
if
(
!
(
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
)))
return
0
;
if
(
!
(
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
)))
return
0
;
swprintf
(
buffer
,
len
,
L"%s setupapi,InstallHinfSection %s 128 %s"
,
app
,
install
,
inf_path
);
lstrcpyW
(
buffer
,
app
);
lstrcatW
(
buffer
,
L" setupapi,InstallHinfSection"
);
lstrcatW
(
buffer
,
machine
!=
IMAGE_FILE_MACHINE_TARGET_HOST
?
L" Wow64Install"
:
L" DefaultInstall"
);
lstrcatW
(
buffer
,
L" 128 "
);
lstrcatW
(
buffer
,
inf_path
);
if
(
CreateProcessW
(
app
,
buffer
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
))
if
(
CreateProcessW
(
app
,
buffer
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
))
CloseHandle
(
pi
.
hThread
);
CloseHandle
(
pi
.
hThread
);
...
@@ -1480,7 +1475,7 @@ static void update_wineprefix( BOOL force )
...
@@ -1480,7 +1475,7 @@ static void update_wineprefix( BOOL force )
if
(
NtQuerySystemInformationEx
(
SystemSupportedProcessorArchitectures
,
&
process
,
sizeof
(
process
),
if
(
NtQuerySystemInformationEx
(
SystemSupportedProcessorArchitectures
,
&
process
,
sizeof
(
process
),
machines
,
sizeof
(
machines
),
NULL
))
machines
[
0
]
=
0
;
machines
,
sizeof
(
machines
),
NULL
))
machines
[
0
]
=
0
;
if
((
process
=
start_rundll32
(
inf_path
,
IMAGE_FILE_MACHINE_TARGET_HOST
)))
if
((
process
=
start_rundll32
(
inf_path
,
L"PreInstall"
,
IMAGE_FILE_MACHINE_TARGET_HOST
)))
{
{
HWND
hwnd
=
show_wait_window
();
HWND
hwnd
=
show_wait_window
();
for
(;;)
for
(;;)
...
@@ -1490,9 +1485,13 @@ static void update_wineprefix( BOOL force )
...
@@ -1490,9 +1485,13 @@ static void update_wineprefix( BOOL force )
if
(
res
==
WAIT_OBJECT_0
)
if
(
res
==
WAIT_OBJECT_0
)
{
{
CloseHandle
(
process
);
CloseHandle
(
process
);
if
(
HIWORD
(
machines
[
count
])
&
4
/* native machine */
)
count
++
;
if
(
!
machines
[
count
])
break
;
if
(
!
machines
[
count
])
break
;
if
(
!
(
process
=
start_rundll32
(
inf_path
,
LOWORD
(
machines
[
count
++
])
)))
break
;
if
(
HIWORD
(
machines
[
count
])
&
4
/* native machine */
)
process
=
start_rundll32
(
inf_path
,
L"DefaultInstall"
,
IMAGE_FILE_MACHINE_TARGET_HOST
);
else
process
=
start_rundll32
(
inf_path
,
L"Wow64Install"
,
LOWORD
(
machines
[
count
])
);
count
++
;
if
(
!
process
)
break
;
}
}
else
while
(
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageW
(
&
msg
);
else
while
(
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageW
(
&
msg
);
}
}
...
...
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