Default verbosity is /V3 without logo, MakeNSISW still uses /V4

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6375 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2013-06-08 18:48:38 +00:00
parent 4a221a8995
commit 47e481a3bf
7 changed files with 33 additions and 11 deletions

View file

@ -285,11 +285,12 @@ void CompileNSISScript() {
TCHAR *args = (TCHAR *) GlobalLock(g_sdata.script_cmd_args);
size_t byteSize = sizeof(TCHAR)*(
/* makensis.exe */ lstrlen(EXENAME) + /* space */ 1 +
/* script path */ lstrlen(g_sdata.script) + /* space */ 1 +
/* script cmd args */ lstrlen(args) + /* space */ 1 +
/* defines /Dblah=... */ lstrlen(symbols) + /* space */ 1 +
/* /XSetCompressor... */ lstrlen(compressor) + /* space */ 1 +
/* makensis.exe */ lstrlen(EXENAME) + /* space */ 1 +
/* script path */ lstrlen(g_sdata.script) + /* space */ 1 +
/* script cmd args */ lstrlen(args) + /* space */ 1 +
/* defines /Dblah=... */ lstrlen(symbols) + /* space */ 1 +
/* /XSetCompressor... */ lstrlen(compressor) + /* space */ 1 +
/* /V + UINT8 */ 2 + 3 + /* space */ 1 +
/* /NOTIFYHWND + HWND */ COUNTOF(_T("/NOTIFYHWND -4294967295")) + /* space */ 1
+6); /* for -- \"\" and NULL */
@ -297,8 +298,9 @@ void CompileNSISScript() {
wsprintf(
g_sdata.compile_command,
_T("%s %s %s /NOTIFYHWND %d %s -- \"%s\""),
_T("%s /V%u %s %s /NOTIFYHWND %d %s -- \"%s\""),
EXENAME,
g_sdata.verbosity,
compressor,
symbols,
g_sdata.hwnd,
@ -340,6 +342,17 @@ bool OpenRegSettingsKey(HKEY &hKey, bool create) {
return false;
}
DWORD ReadRegSettingDW(LPCTSTR name, const DWORD defval) {
DWORD val = defval, siz = sizeof(val), typ;
HKEY hKey;
if (OpenRegSettingsKey(hKey)) {
if (RegQueryValueEx(hKey,name,NULL,&typ,(LPBYTE)&val,&siz) || REG_DWORD != typ || sizeof(val) != siz)
val = defval;
RegCloseKey(hKey);
}
return val;
}
void RestoreWindowPos(HWND hwnd) {
HKEY hKey;
WINDOWPLACEMENT p;