small makensisw fixes for possible crash

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@848 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
rainwater 2002-08-31 14:30:33 +00:00
parent 53b82a6199
commit 5e32d0504a
3 changed files with 29 additions and 24 deletions

View file

@ -134,6 +134,10 @@ Version History
- Added sound for sucessfull compilations - Added sound for sucessfull compilations
- Update home page and documentation menu items to Sourceforge page - Update home page and documentation menu items to Sourceforge page
1.8
- Contents of low window are now streamed in
- Empty log window check (to prevent random crashes)
Copyright Information Copyright Information
--------------------- ---------------------

View file

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D RELEASE=1.7 /FD /c # ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D RELEASE=1.8 /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD BASE RSC /l 0x409 /d "NDEBUG"

View file

@ -85,31 +85,32 @@ void DisableItems(HWND hwnd) {
void EnableItems(HWND hwnd) { void EnableItems(HWND hwnd) {
int len=SendDlgItemMessage(hwnd,IDC_LOGWIN,WM_GETTEXTLENGTH,0,0); int len=SendDlgItemMessage(hwnd,IDC_LOGWIN,WM_GETTEXTLENGTH,0,0);
char *existing_text=(char*)GlobalAlloc(GPTR,len); if (len>0) {
if (!existing_text) return; char *existing_text=(char*)GlobalAlloc(GPTR,len+1);
existing_text[0]=0; if (!existing_text) return;
GetDlgItemText(hwnd, IDC_LOGWIN, existing_text, len); existing_text[0]=0;
char *p=existing_text; GetDlgItemText(hwnd, IDC_LOGWIN, existing_text, len);
char *p2; char *p=existing_text;
char *p3; char *p2;
if ((p2=my_strstr(p,"\r\nOutput: \""))) { char *p3;
while (*p2 != '\"') p2++; if ((p2=my_strstr(p,"\r\nOutput: \""))) {
p2++; while (*p2 != '\"') p2++;
if ((p3=my_strstr(p2,"\"\r\n")) && p3 < my_strstr(p2,"\r\n")) { p2++;
*p3=0; if ((p3=my_strstr(p2,"\"\r\n")) && p3 < my_strstr(p2,"\r\n")) {
lstrcpy(g_output_exe,p2); *p3=0;
lstrcpy(g_output_exe,p2);
}
}
p=my_strstr(existing_text,"\r\nProcessing script file: \"");
if (p) {
while (*p++ != '"');
char *p2=my_strstr(p,"\r\n");
lstrcpyn(g_input_script,p,p2-p);
}
if (my_strstr(existing_text, " warning:") || my_strstr(existing_text, " warnings:")) {
g_warnings = TRUE;
} }
} }
p=my_strstr(existing_text,"\r\nProcessing script file: \"");
if (p) {
while (*p++ != '"');
char *p2=my_strstr(p,"\r\n");
lstrcpyn(g_input_script,p,p2-p);
}
if (my_strstr(existing_text, " warning:") || my_strstr(existing_text, " warnings:")) {
g_warnings = TRUE;
}
HMENU m = GetMenu(hwnd); HMENU m = GetMenu(hwnd);
if (g_output_exe[0]) { if (g_output_exe[0]) {
EnableWindow(GetDlgItem(hwnd,IDC_TEST),1); EnableWindow(GetDlgItem(hwnd,IDC_TEST),1);