Added a dialog that shows up if compress whole is used and initial uncompressing lasts longer than a second.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@706 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-08-21 19:05:14 +00:00
parent 9f69735152
commit f9ddfb219e
2 changed files with 17 additions and 7 deletions

View file

@ -55,26 +55,28 @@ char g_caption[NSIS_MAX_STRLEN*2];
int g_filehdrsize;
HWND g_hwnd;
static int m_length;
static int m_pos;
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
extern char plugins_temp_dir[NSIS_MAX_STRLEN];
#endif
int m_length;
int m_pos;
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
#ifdef NSIS_CONFIG_CRC_SUPPORT
static BOOL CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#if defined(NSIS_CONFIG_CRC_SUPPORT) || defined(NSIS_COMPRESS_WHOLE)
BOOL CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static char *msg;
if (uMsg == WM_INITDIALOG)
{
SetTimer(hwndDlg,1,250,NULL);
msg = (char*)lParam;
uMsg = WM_TIMER;
}
if (uMsg == WM_TIMER)
{
static char bt[64];
wsprintf(bt,_LANG_VERIFYINGINST,MulDiv(m_pos,100,m_length));
wsprintf(bt,msg,MulDiv(m_pos,100,m_length));
SetWindowText(hwndDlg,bt);
SetDlgItemText(hwndDlg,IDC_STR,bt);
@ -236,7 +238,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
while (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) DispatchMessage(&msg);
}
else if (GetTickCount() > verify_time)
hwnd=CreateDialog(g_hInstance,MAKEINTRESOURCE(IDD_VERIFY),GetDesktopWindow(),verProc);
hwnd=CreateDialogParam(
g_hInstance,
MAKEINTRESOURCE(IDD_VERIFY),
GetDesktopWindow(),
verProc,
(LPARAM)_LANG_VERIFYINGINST
);
}
#endif//NSIS_CONFIG_VISIBLE_SUPPORT