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:
parent
9f69735152
commit
f9ddfb219e
2 changed files with 17 additions and 7 deletions
|
@ -55,26 +55,28 @@ char g_caption[NSIS_MAX_STRLEN*2];
|
||||||
int g_filehdrsize;
|
int g_filehdrsize;
|
||||||
HWND g_hwnd;
|
HWND g_hwnd;
|
||||||
|
|
||||||
static int m_length;
|
|
||||||
static int m_pos;
|
|
||||||
|
|
||||||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
||||||
extern char plugins_temp_dir[NSIS_MAX_STRLEN];
|
extern char plugins_temp_dir[NSIS_MAX_STRLEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int m_length;
|
||||||
|
int m_pos;
|
||||||
|
|
||||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||||
#ifdef NSIS_CONFIG_CRC_SUPPORT
|
#if defined(NSIS_CONFIG_CRC_SUPPORT) || defined(NSIS_COMPRESS_WHOLE)
|
||||||
static BOOL CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
static char *msg;
|
||||||
if (uMsg == WM_INITDIALOG)
|
if (uMsg == WM_INITDIALOG)
|
||||||
{
|
{
|
||||||
SetTimer(hwndDlg,1,250,NULL);
|
SetTimer(hwndDlg,1,250,NULL);
|
||||||
|
msg = (char*)lParam;
|
||||||
uMsg = WM_TIMER;
|
uMsg = WM_TIMER;
|
||||||
}
|
}
|
||||||
if (uMsg == WM_TIMER)
|
if (uMsg == WM_TIMER)
|
||||||
{
|
{
|
||||||
static char bt[64];
|
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);
|
SetWindowText(hwndDlg,bt);
|
||||||
SetDlgItemText(hwndDlg,IDC_STR,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);
|
while (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) DispatchMessage(&msg);
|
||||||
}
|
}
|
||||||
else if (GetTickCount() > verify_time)
|
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
|
#endif//NSIS_CONFIG_VISIBLE_SUPPORT
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
#define _LANG_VERIFYINGINST "verifying installer: %d%%"
|
#define _LANG_VERIFYINGINST "verifying installer: %d%%"
|
||||||
|
|
||||||
|
#define _LANG_UNPACKING "unpacking data: %d%%"
|
||||||
|
|
||||||
#define _LANG_CANTOPENSELF "Can't open self"
|
#define _LANG_CANTOPENSELF "Can't open self"
|
||||||
|
|
||||||
#define _LANG_GENERIC_ERROR "NSIS ERROR"
|
#define _LANG_GENERIC_ERROR "NSIS ERROR"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue