- fixed a typo in inner langstrings name - [un]LicenseTextRB
- Finnish language files updated - made SetStlColors able to set background color with /BRANDING - some optimizations - fixed progress showing for WriteUninstaller git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2870 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
ff2ab1239f
commit
bb927a6230
10 changed files with 239 additions and 117 deletions
|
@ -108,10 +108,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
#define END_OF_ARG(c) (((c)|' ')==' ')
|
||||
|
||||
#if defined(NSIS_CONFIG_VISIBLE_SUPPORT) && defined(NSIS_CONFIG_SILENT_SUPPORT)
|
||||
if (cmdline[0] == 'S' && END_OF_ARG(cmdline[1])) cl_flags |= FH_FLAGS_SILENT;
|
||||
if (cmdline[0] == 'S' && END_OF_ARG(cmdline[1]))
|
||||
cl_flags |= FH_FLAGS_SILENT;
|
||||
#endif//NSIS_CONFIG_SILENT_SUPPORT && NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
#ifdef NSIS_CONFIG_CRC_SUPPORT
|
||||
if (*(DWORD*)cmdline == CHAR4_TO_DWORD('N','C','R','C') && END_OF_ARG(cmdline[4])) cl_flags |= FH_FLAGS_NO_CRC;
|
||||
if (*(DWORD*)cmdline == CHAR4_TO_DWORD('N','C','R','C') && END_OF_ARG(cmdline[4]))
|
||||
cl_flags |= FH_FLAGS_NO_CRC;
|
||||
#endif//NSIS_CONFIG_CRC_SUPPORT
|
||||
|
||||
if (*(WORD*)cmdline == CHAR2_TO_WORD('D','='))
|
||||
|
@ -135,7 +137,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
char *p=cmdline;
|
||||
while (*p) p++;
|
||||
|
||||
while (p >= cmdline && (p[0] != '_' || p[1] != '?' || p[2] != '=')) p--;
|
||||
while (p >= cmdline && (p[0] != '_' || p[1] != '?' || p[2] != '=')) p--;
|
||||
|
||||
if (p >= cmdline)
|
||||
{
|
||||
|
|
|
@ -193,7 +193,7 @@ int NSISCALL ui_doinstall(void)
|
|||
if (e > p)
|
||||
{
|
||||
// if filename ends in .exe, and is not a directory, remove the filename
|
||||
if (*(int*)e == *(int*)".exe") // check extension
|
||||
if (*(int*)e == CHAR4_TO_DWORD('.', 'e', 'x', 'e')) // check extension
|
||||
{
|
||||
DWORD d;
|
||||
d=GetFileAttributes(p);
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#ifdef NSIS_SUPPORT_BGBG
|
||||
|
||||
#define c1 g_header->bg_color1
|
||||
#define c2 g_header->bg_color2
|
||||
#define c1 header->bg_color1
|
||||
#define c2 header->bg_color2
|
||||
|
||||
LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -24,6 +24,8 @@ LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
case WM_PAINT:
|
||||
{
|
||||
header *header = g_header;
|
||||
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc=BeginPaint(hwnd,&ps);
|
||||
RECT r;
|
||||
|
@ -49,7 +51,7 @@ LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
r.bottom+=4;
|
||||
}
|
||||
|
||||
if (g_header->bg_textcolor != -1)
|
||||
if (header->bg_textcolor != -1)
|
||||
{
|
||||
HFONT newFont, oldFont;
|
||||
newFont = CreateFont(40,0,0,0,FW_BOLD,TRUE,FALSE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,"Garamond");
|
||||
|
@ -60,7 +62,7 @@ LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
r.top=8;
|
||||
my_GetWindowText(hwnd,buf,sizeof(buf));
|
||||
SetBkMode(hdc,TRANSPARENT);
|
||||
SetTextColor(hdc,g_header->bg_textcolor);
|
||||
SetTextColor(hdc,header->bg_textcolor);
|
||||
oldFont = SelectObject(hdc,newFont);
|
||||
DrawText(hdc,buf,-1,&r,DT_TOP|DT_LEFT|DT_SINGLELINE|DT_NOPREFIX);
|
||||
SelectObject(hdc,oldFont);
|
||||
|
|
|
@ -343,7 +343,7 @@ int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
|
|||
u=(char*)g_inflate_stream.next_out - outbuffer;
|
||||
|
||||
tc = GetTickCount();
|
||||
if (tc - ltc > 200 || !input_len)
|
||||
if (ui_st_updateflag & 1 && (tc - ltc > 200 || !input_len))
|
||||
{
|
||||
wsprintf(progress, "... %d%%", MulDiv(input_len_total - input_len, 100, input_len_total));
|
||||
update_status_text(0, progress);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue