don't rely on WM_DESTROY to update extraction status to 100%
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3875 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
ab68488a0c
commit
54bb163a4f
1 changed files with 15 additions and 7 deletions
|
@ -62,11 +62,7 @@ BOOL CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
msg = (char *) lParam;
|
msg = (char *) lParam;
|
||||||
uMsg = WM_TIMER;
|
uMsg = WM_TIMER;
|
||||||
}
|
}
|
||||||
if (uMsg == WM_TIMER
|
if (uMsg == WM_TIMER)
|
||||||
#ifdef NSIS_COMPRESS_WHOLE
|
|
||||||
|| (!msg && uMsg == WM_DESTROY)
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
static char bt[64];
|
static char bt[64];
|
||||||
int percent=MulDiv(min(m_pos,m_length),100,m_length);
|
int percent=MulDiv(min(m_pos,m_length),100,m_length);
|
||||||
|
@ -424,8 +420,10 @@ extern BOOL CALLBACK verProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
extern BOOL CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM);
|
extern BOOL CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
static int NSISCALL __ensuredata(int amount)
|
static int NSISCALL __ensuredata(int amount)
|
||||||
{
|
{
|
||||||
|
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||||
HWND hwnd=NULL;
|
HWND hwnd=NULL;
|
||||||
unsigned int verify_time=GetTickCount()+500;
|
unsigned int verify_time=GetTickCount()+500;
|
||||||
|
#endif
|
||||||
int needed=amount-(dbd_size-dbd_pos);
|
int needed=amount-(dbd_size-dbd_pos);
|
||||||
if (needed>0)
|
if (needed>0)
|
||||||
{
|
{
|
||||||
|
@ -450,12 +448,14 @@ static int NSISCALL __ensuredata(int amount)
|
||||||
if (!g_exec_flags.silent)
|
if (!g_exec_flags.silent)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (hwnd) {
|
if (hwnd)
|
||||||
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
m_pos=m_length-(amount-(dbd_size-dbd_pos));
|
m_pos=m_length-(amount-(dbd_size-dbd_pos));
|
||||||
while (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) DispatchMessage(&msg);
|
while (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) DispatchMessage(&msg);
|
||||||
}
|
}
|
||||||
else if (GetTickCount() > verify_time)
|
else if (GetTickCount() > verify_time)
|
||||||
|
{
|
||||||
hwnd = CreateDialogParam(
|
hwnd = CreateDialogParam(
|
||||||
g_hInstance,
|
g_hInstance,
|
||||||
MAKEINTRESOURCE(IDD_VERIFY),
|
MAKEINTRESOURCE(IDD_VERIFY),
|
||||||
|
@ -464,6 +464,7 @@ static int NSISCALL __ensuredata(int amount)
|
||||||
g_hwnd ? 0 : (LPARAM)_LANG_UNPACKING
|
g_hwnd ? 0 : (LPARAM)_LANG_UNPACKING
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif//NSIS_CONFIG_VISIBLE_SUPPORT
|
#endif//NSIS_CONFIG_VISIBLE_SUPPORT
|
||||||
g_inflate_stream.next_out=_outbuffer;
|
g_inflate_stream.next_out=_outbuffer;
|
||||||
g_inflate_stream.avail_out=OBUFSIZE;
|
g_inflate_stream.avail_out=OBUFSIZE;
|
||||||
|
@ -489,7 +490,14 @@ static int NSISCALL __ensuredata(int amount)
|
||||||
}
|
}
|
||||||
SetFilePointer(dbd_hFile,dbd_pos,NULL,FILE_BEGIN);
|
SetFilePointer(dbd_hFile,dbd_pos,NULL,FILE_BEGIN);
|
||||||
}
|
}
|
||||||
if (hwnd) DestroyWindow(hwnd);
|
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||||
|
if (hwnd)
|
||||||
|
{
|
||||||
|
m_pos=m_length;
|
||||||
|
SendMessage(hwnd,WM_TIMER,0,0);
|
||||||
|
DestroyWindow(hwnd);
|
||||||
|
}
|
||||||
|
#endif//NSIS_CONFIG_VISIBLE_SUPPORT
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue