//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,
//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())
+ );
+ std::cout << crea::wx2std(file) << std::endl;
+ std::cout.flush();
+
+ if(crea::wx2std(file) == "" || !this->project->Connect(result, crea::wx2std(file)))
{
- wxMessageBox(crea::std2wx(result->c_str()), wxT("Plug Packages - Error!"));
+ if (crea::wx2std(file) == "")
+ result = new std::string("Folder not specified.");
+ wxMessageBox(crea::std2wx(result->c_str()), wxT("Plug BBTK Packages - Error!"), wxICON_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
+
}