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
9254476d
Commit
9254476d
authored
Mar 30, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineboot: Display a wait dialog while processing wine.inf.
parent
3edc09fa
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
5 deletions
+65
-5
resource.h
programs/wineboot/resource.h
+4
-0
wineboot.c
programs/wineboot/wineboot.c
+51
-5
wineboot_En.rc
programs/wineboot/wineboot_En.rc
+10
-0
No files found.
programs/wineboot/resource.h
View file @
9254476d
...
...
@@ -20,4 +20,8 @@
#include "winuser.h"
#define IDC_STATIC -1
#define IDC_WAITICON 1
#define IDC_WAITTEXT 2
#define IDD_ENDTASK 100
#define IDD_WAITDLG 101
programs/wineboot/wineboot.c
View file @
9254476d
...
...
@@ -81,6 +81,7 @@
#include <shobjidl.h>
#include <shlwapi.h>
#include <shellapi.h>
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wineboot
);
...
...
@@ -859,6 +860,44 @@ static BOOL start_services_process(void)
return
TRUE
;
}
static
INT_PTR
CALLBACK
wait_dlgproc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
)
{
switch
(
msg
)
{
case
WM_INITDIALOG
:
{
WCHAR
*
buffer
,
text
[
1024
];
const
WCHAR
*
name
=
(
WCHAR
*
)
lp
;
HICON
icon
=
LoadImageW
(
0
,
(
LPCWSTR
)
IDI_WINLOGO
,
IMAGE_ICON
,
48
,
48
,
LR_SHARED
);
SendDlgItemMessageW
(
hwnd
,
IDC_WAITICON
,
STM_SETICON
,
(
WPARAM
)
icon
,
0
);
SendDlgItemMessageW
(
hwnd
,
IDC_WAITTEXT
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
text
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
text
)
+
strlenW
(
name
)
+
1
)
*
sizeof
(
WCHAR
)
);
sprintfW
(
buffer
,
text
,
name
);
SendDlgItemMessageW
(
hwnd
,
IDC_WAITTEXT
,
WM_SETTEXT
,
0
,
(
LPARAM
)
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
break
;
}
return
0
;
}
static
HWND
show_wait_window
(
void
)
{
const
char
*
config_dir
=
wine_get_config_dir
();
WCHAR
*
name
;
HWND
hwnd
;
DWORD
len
;
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
config_dir
,
-
1
,
NULL
,
0
);
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
config_dir
,
-
1
,
name
,
len
);
hwnd
=
CreateDialogParamW
(
GetModuleHandleW
(
0
),
MAKEINTRESOURCEW
(
IDD_WAITDLG
),
0
,
wait_dlgproc
,
(
LPARAM
)
name
);
ShowWindow
(
hwnd
,
SW_SHOWNORMAL
);
HeapFree
(
GetProcessHeap
(),
0
,
name
);
return
hwnd
;
}
static
HANDLE
start_rundll32
(
const
char
*
inf_path
,
BOOL
wow64
)
{
static
const
WCHAR
rundll
[]
=
{
'\\'
,
'r'
,
'u'
,
'n'
,
'd'
,
'l'
,
'l'
,
'3'
,
'2'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
...
...
@@ -930,16 +969,23 @@ static void update_wineprefix( int force )
if
(
update_timestamp
(
config_dir
,
st
.
st_mtime
)
||
force
)
{
HANDLE
process
;
DWORD
count
=
0
;
if
((
process
=
start_rundll32
(
inf_path
,
FALSE
)))
{
WaitForSingleObject
(
process
,
INFINITE
);
CloseHandle
(
process
);
}
if
((
process
=
start_rundll32
(
inf_path
,
TRUE
)))
HWND
hwnd
=
show_wait_window
();
for
(;;)
{
MSG
msg
;
DWORD
res
=
MsgWaitForMultipleObjects
(
1
,
&
process
,
FALSE
,
INFINITE
,
QS_ALLINPUT
);
if
(
res
==
WAIT_OBJECT_0
)
{
WaitForSingleObject
(
process
,
INFINITE
);
CloseHandle
(
process
);
if
(
count
++
||
!
(
process
=
start_rundll32
(
inf_path
,
TRUE
)))
break
;
}
else
while
(
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageW
(
&
msg
);
}
DestroyWindow
(
hwnd
);
}
WINE_MESSAGE
(
"wine: configuration in '%s' has been updated.
\n
"
,
config_dir
);
}
...
...
programs/wineboot/wineboot_En.rc
View file @
9254476d
...
...
@@ -35,3 +35,13 @@ BEGIN
LTEXT "If you terminate the process you may lose all unsaved data.",
IDC_STATIC,7,28,172,15
END
IDD_WAITDLG DIALOG 0, 0, 200, 50
STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_CENTER | WS_POPUP | WS_DISABLED
CAPTION "Wine"
FONT 8, "MS Shell Dlg"
BEGIN
ICON "", IDC_WAITICON, 3, 3, 10, 10
LTEXT "The Wine configuration in %s is being updated, please wait...",
IDC_WAITTEXT, 40, 5, 150, 40, SS_NOPREFIX
END
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