no message

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@660 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-08-07 18:12:30 +00:00
parent d70aef84fa
commit 7894df4758

View file

@ -73,7 +73,7 @@ static void doRMDir(char *buf, int recurse)
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) doRMDir(buf,recurse); if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) doRMDir(buf,recurse);
else else
{ {
update_status_text(LANG_DELETEFILE,buf); update_status_text(STR(LANG_DELETEFILE),buf);
if (fd.dwFileAttributes & FILE_ATTRIBUTE_READONLY) if (fd.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
SetFileAttributes(buf,fd.dwFileAttributes^FILE_ATTRIBUTE_READONLY); SetFileAttributes(buf,fd.dwFileAttributes^FILE_ATTRIBUTE_READONLY);
DeleteFile(buf); DeleteFile(buf);
@ -85,7 +85,7 @@ static void doRMDir(char *buf, int recurse)
buf[i]=0; // fix buffer buf[i]=0; // fix buffer
} }
log_printf2("RMDir: RemoveDirectory(\"%s\")",buf); log_printf2("RMDir: RemoveDirectory(\"%s\")",buf);
update_status_text(LANG_REMOVEDIR,buf); update_status_text(STR(LANG_REMOVEDIR),buf);
RemoveDirectory(buf); RemoveDirectory(buf);
} }
#endif//NSIS_SUPPORT_RMDIR #endif//NSIS_SUPPORT_RMDIR
@ -240,10 +240,10 @@ static int ExecuteEntry(entry *entries, int pos)
log_printf3("CreateDirectory: \"%s\" (%d)",buf2,parms[1]); log_printf3("CreateDirectory: \"%s\" (%d)",buf2,parms[1]);
if (parms[1]) if (parms[1])
{ {
update_status_text(LANG_OUTPUTDIR,buf2); update_status_text(STR(LANG_OUTPUTDIR),buf2);
lstrcpy(state_output_directory,buf2); lstrcpy(state_output_directory,buf2);
} }
else update_status_text(LANG_CREATEDIR,buf2); else update_status_text(STR(LANG_CREATEDIR),buf2);
recursive_create_directory(buf2); recursive_create_directory(buf2);
return 0; return 0;
case EW_IFFILEEXISTS: case EW_IFFILEEXISTS:
@ -279,7 +279,7 @@ static int ExecuteEntry(entry *entries, int pos)
log_printf2("Rename: %s",buf4); log_printf2("Rename: %s",buf4);
if (MoveFile(buf,buf2)) if (MoveFile(buf,buf2))
{ {
update_status_text(LANG_RENAME,buf4); update_status_text(STR(LANG_RENAME),buf4);
} }
else else
{ {
@ -290,7 +290,7 @@ static int ExecuteEntry(entry *entries, int pos)
exec_rebootflag++; exec_rebootflag++;
#endif #endif
MoveFileOnReboot(buf,buf2); MoveFileOnReboot(buf,buf2);
update_status_text(LANG_RENAMEONREBOOT,buf4); update_status_text(STR(LANG_RENAMEONREBOOT),buf4);
log_printf2("Rename on reboot: %s",buf4); log_printf2("Rename on reboot: %s",buf4);
} }
else else
@ -390,7 +390,7 @@ static int ExecuteEntry(entry *entries, int pos)
{ {
if (overwriteflag) if (overwriteflag)
{ {
update_status_text(LANG_SKIPPED,buf4); update_status_text(STR(LANG_SKIPPED),buf4);
if (overwriteflag==2) exec_errorflag++; if (overwriteflag==2) exec_errorflag++;
log_printf3("File: skipped: \"%s\" (overwriteflag=%d)",buf,overwriteflag); log_printf3("File: skipped: \"%s\" (overwriteflag=%d)",buf,overwriteflag);
return 0; return 0;
@ -413,12 +413,12 @@ static int ExecuteEntry(entry *entries, int pos)
return 0; return 0;
default: default:
log_printf("File: error, user abort"); log_printf("File: error, user abort");
update_status_text(LANG_CANTWRITE,buf); update_status_text(STR(LANG_CANTWRITE),buf);
return EXEC_ERROR; return EXEC_ERROR;
} }
} }
update_status_text(LANG_EXTRACT,buf4); update_status_text(STR(LANG_EXTRACT),buf4);
ret=GetCompressedDataFromDataBlock(parms[2],hOut); ret=GetCompressedDataFromDataBlock(parms[2],hOut);
log_printf3("File: wrote %d to \"%s\"",ret,buf); log_printf3("File: wrote %d to \"%s\"",ret,buf);
@ -432,12 +432,12 @@ static int ExecuteEntry(entry *entries, int pos)
{ {
if (ret == -2) if (ret == -2)
{ {
lstrcpy(buf,LANG_ERRORWRITING); lstrcpy(buf,STR(LANG_ERRORWRITING));
lstrcat(buf,buf4); lstrcat(buf,buf4);
} }
else else
{ {
lstrcpy(buf,LANG_ERRORDECOMPRESSING); lstrcpy(buf,STR(LANG_ERRORDECOMPRESSING));
} }
log_printf2("%s",buf); log_printf2("%s",buf);
MessageBox(g_hwnd,buf,g_caption,MB_OK|MB_ICONSTOP); MessageBox(g_hwnd,buf,g_caption,MB_OK|MB_ICONSTOP);
@ -468,7 +468,7 @@ static int ExecuteEntry(entry *entries, int pos)
if (DeleteFile(buf2)) if (DeleteFile(buf2))
{ {
log_printf2("Delete: DeleteFile(\"%s\")",buf2); log_printf2("Delete: DeleteFile(\"%s\")",buf2);
update_status_text(LANG_DELETEFILE,buf2); update_status_text(STR(LANG_DELETEFILE),buf2);
} }
else else
{ {
@ -479,7 +479,7 @@ static int ExecuteEntry(entry *entries, int pos)
exec_rebootflag++; exec_rebootflag++;
#endif #endif
log_printf2("Delete: DeleteFile on Reboot(\"%s\")",buf2); log_printf2("Delete: DeleteFile on Reboot(\"%s\")",buf2);
update_status_text(LANG_DELETEONREBOOT,buf2); update_status_text(STR(LANG_DELETEONREBOOT),buf2);
MoveFileOnReboot(buf2,NULL); MoveFileOnReboot(buf2,NULL);
} }
else else
@ -714,7 +714,7 @@ static int ExecuteEntry(entry *entries, int pos)
lstrcpy(buf4,buf); lstrcpy(buf4,buf);
lstrcat(buf4," "); lstrcat(buf4," ");
lstrcat(buf4,buf2); lstrcat(buf4,buf2);
update_status_text(LANG_EXECSHELL, buf4); update_status_text(STR(LANG_EXECSHELL), buf4);
x=(int)ShellExecute(g_hwnd,buf[0]?buf:NULL,buf2,buf3[0]?buf3:NULL,state_output_directory,parms[3]); x=(int)ShellExecute(g_hwnd,buf[0]?buf:NULL,buf2,buf3[0]?buf3:NULL,state_output_directory,parms[3]);
if (x < 33) if (x < 33)
{ {
@ -734,7 +734,7 @@ static int ExecuteEntry(entry *entries, int pos)
HANDLE hProc; HANDLE hProc;
process_string_fromtab(buf,parms[0]); process_string_fromtab(buf,parms[0]);
log_printf2("Exec: command=\"%s\"",buf); log_printf2("Exec: command=\"%s\"",buf);
update_status_text(LANG_EXECUTE,buf); update_status_text(STR(LANG_EXECUTE),buf);
hProc=myCreateProcess(buf,*state_output_directory?state_output_directory:NULL); hProc=myCreateProcess(buf,*state_output_directory?state_output_directory:NULL);
@ -861,21 +861,21 @@ static int ExecuteEntry(entry *entries, int pos)
} }
else else
{ {
update_status_text(LANG_CANNOTFINDSYMBOL,buf2); update_status_text(STR(LANG_CANNOTFINDSYMBOL),buf2);
log_printf3("Error registering DLL: %s not found in %s",buf2,buf); log_printf3("Error registering DLL: %s not found in %s",buf2,buf);
} }
FreeLibrary(h); FreeLibrary(h);
} }
else else
{ {
update_status_text(LANG_COULDNOTLOAD,buf); update_status_text(STR(LANG_COULDNOTLOAD),buf);
log_printf2("Error registering DLL: Could not load %s",buf); log_printf2("Error registering DLL: Could not load %s",buf);
} }
OleUninitialize(); OleUninitialize();
} }
else else
{ {
update_status_text(LANG_NOOLE,buf); update_status_text(STR(LANG_NOOLE),buf);
log_printf("Error registering DLL: Could not initialize OLE"); log_printf("Error registering DLL: Could not initialize OLE");
} }
} }
@ -895,11 +895,11 @@ static int ExecuteEntry(entry *entries, int pos)
state_output_directory,(parms[4]&0xff00)>>8,parms[4]>>16)) state_output_directory,(parms[4]&0xff00)>>8,parms[4]>>16))
{ {
exec_errorflag++; exec_errorflag++;
update_status_text(LANG_ERRORCREATINGSHORTCUT,buf3); update_status_text(STR(LANG_ERRORCREATINGSHORTCUT),buf3);
} }
else else
{ {
update_status_text(LANG_CREATESHORTCUT,buf3); update_status_text(STR(LANG_CREATESHORTCUT),buf3);
} }
return 0; return 0;
#endif//NSIS_SUPPORT_CREATESHORTCUT #endif//NSIS_SUPPORT_CREATESHORTCUT
@ -916,7 +916,7 @@ static int ExecuteEntry(entry *entries, int pos)
buf[lstrlen(buf)+1]=0; buf[lstrlen(buf)+1]=0;
buf2[lstrlen(buf2)+1]=0; buf2[lstrlen(buf2)+1]=0;
lstrcpy(buf3,LANG_COPYTO); lstrcpy(buf3,STR(LANG_COPYTO));
lstrcat(buf3,buf2); lstrcat(buf3,buf2);
op.pFrom=buf; op.pFrom=buf;
@ -927,7 +927,7 @@ static int ExecuteEntry(entry *entries, int pos)
res=SHFileOperation(&op); res=SHFileOperation(&op);
if (res) if (res)
{ // some of these changes were from Edgewise (wiked_edge@yahoo.com) { // some of these changes were from Edgewise (wiked_edge@yahoo.com)
update_status_text(LANG_COPYFAILED,""); update_status_text(STR(LANG_COPYFAILED),"");
exec_errorflag++; exec_errorflag++;
} }
} }
@ -1332,11 +1332,11 @@ static int ExecuteEntry(entry *entries, int pos)
log_printf3("created uninstaller: %d, \"%s\"",ret,buf2); log_printf3("created uninstaller: %d, \"%s\"",ret,buf2);
if (ret < 0) if (ret < 0)
{ {
update_status_text(LANG_ERRORCREATING,buf); update_status_text(STR(LANG_ERRORCREATING),buf);
DeleteFile(buf2); DeleteFile(buf2);
} }
else else
update_status_text(LANG_CREATEDUNINST,buf); update_status_text(STR(LANG_CREATEDUNINST),buf);
} }
return 0; return 0;
#endif//NSIS_CONFIG_UNINSTALL_SUPPORT #endif//NSIS_CONFIG_UNINSTALL_SUPPORT
@ -1492,6 +1492,6 @@ static int ExecuteEntry(entry *entries, int pos)
return 0; return 0;
#endif // NSIS_CONFIG_PLUGIN_SUPPORT #endif // NSIS_CONFIG_PLUGIN_SUPPORT
} }
MessageBox(g_hwnd,LANG_INSTCORRUPTED,g_caption,MB_OK|MB_ICONSTOP); MessageBox(g_hwnd,STR(LANG_INSTCORRUPTED),g_caption,MB_OK|MB_ICONSTOP);
return EXEC_ERROR; return EXEC_ERROR;
} }