void CppCheckPlugin::DoProcess() { wxString command = DoGetCommand(); m_view->AppendLine(wxString::Format(_("Starting cppcheck: %s\n"), command.c_str())); m_cppcheckProcess = CreateAsyncProcess(this, command); if (!m_cppcheckProcess ) { wxMessageBox(_("Failed to launch codelite_cppcheck process!"), _("Warning"), wxOK|wxCENTER|wxICON_WARNING); return; } }
void CppCheckPlugin::DoProcess(ProjectPtr proj) { wxString command = DoGetCommand(proj); m_view->AppendLine(wxString::Format(_("Starting cppcheck: %s\n"), command.c_str())); #if defined(__WXMSW__) // Under Windows, we set the working directory to the binary folder // so the configurtion files can be found CL_DEBUG("CppCheck: Working directory: %s", clStandardPaths::Get().GetBinFolder()); CL_DEBUG("CppCheck: Command: %s", command); m_cppcheckProcess = CreateAsyncProcess(this, command, IProcessCreateDefault, clStandardPaths::Get().GetBinFolder()); #elif defined(__WXOSX__) CL_DEBUG("CppCheck: Working directory: %s", clStandardPaths::Get().GetDataDir()); CL_DEBUG("CppCheck: Command: %s", command); m_cppcheckProcess = CreateAsyncProcess(this, command, IProcessCreateDefault, clStandardPaths::Get().GetDataDir()); #else m_cppcheckProcess = CreateAsyncProcess(this, command); #endif if(!m_cppcheckProcess) { wxMessageBox(_("Failed to launch codelite_cppcheck process!"), _("Warning"), wxOK | wxCENTER | wxICON_WARNING); return; } }