X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMProjectActionsPanel.cpp;h=ddfe262e867ed7271cd971e5045e3903be2843e8;hb=327c33758d25e6ff1f90f9ab74ea219eaed934a9;hp=30326590cdc0a764d84c1e217ccce019a927b6f7;hpb=eed967098aa87503c59d09c8d5c0dc87485698e2;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp b/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp index 3032659..ddfe262 100755 --- a/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp @@ -124,6 +124,14 @@ void wxCDMProjectActionsPanel::OnBtnConfigureBuild(wxCommandEvent& event) //compile project void wxCDMProjectActionsPanel::OnBtnBuildProject(wxCommandEvent& event) { +#ifdef _WIN32 + std::string* result; + if(!this->project->Build(result, "")) + { + wxMessageBox(crea::std2wx(result->c_str()), wxT("Project Compilation - Error!")); + return; + } +#else //get author from user wxTextEntryDialog* buildDlg = new wxTextEntryDialog( this, @@ -152,15 +160,26 @@ void wxCDMProjectActionsPanel::OnBtnBuildProject(wxCommandEvent& event) //wxMessageBox(crea::std2wx("The compilation was executed successfully. Please check the \"building.log\" file located in the build folder to check the compilation result."), wxT("Project Compilation")); } } +#endif } //plug packages void wxCDMProjectActionsPanel::OnBtnConnectProject(wxCommandEvent& event) { std::string* result; - if(!this->project->Connect(result)) + wxString file = wxDirSelector( + wxT("Please select the folder containing the bbtkPackage file you want to use. Usually it is where you built your project."), + crea::std2wx(this->project->GetBuildPath()) + ); + + if(file.IsEmpty() || !this->project->Connect(result, crea::wx2std(file))) { wxMessageBox(crea::std2wx(result->c_str()), wxT("Plug Packages - Error!")); return; } - wxMessageBox(crea::std2wx("The connection was executed successfully. Please check the \"plugging.log\" file located in the build folder to check the compilation result."), wxT("Plug Package")); +#ifdef _WIN32 + wxMessageBox(crea::std2wx("The connection was executed successfully. Please check the console to see the compilation result."), wxT("Plug Package")); +#else + wxMessageBox(crea::std2wx("The connection was executed successfully. Please check the \"plugging.log\" file located in the build folder to see the compilation result."), wxT("Plug Package")); +#endif + }