Warn if !packhdr system() call returns non-zero

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6536 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2014-08-07 12:31:51 +00:00
parent fd6400d44d
commit 0f264e9f5a

View file

@ -2528,12 +2528,15 @@ int CEXEBuild::pack_exe_header()
}
fwrite(m_exehead,1,m_exehead_size,tmpfile);
fclose(tmpfile);
if (sane_system(build_packcmd) == -1)
int ec = sane_system(build_packcmd);
if (ec == -1)
{
_tremove(build_packname);
ERROR_MSG(_T("Error: calling packer on \"%") NPRIs _T("\"\n"),build_packname);
return PS_ERROR;
}
if (ec != 0)
warning(_T("Packer returned %d, \"%") NPRIs _T("\" might still be unpacked\n"),ec,build_packname);
int result = update_exehead(build_packname);
_tremove(build_packname);