]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / wxCDMProjectActionsPanel.cpp
index 5b5cc09279986c0f70abb1e7ea993c82910a77eb..2d89a2df0f05e76a7fa4dbccbcbc89033138cf1e 100755 (executable)
@@ -107,27 +107,43 @@ void wxCDMProjectActionsPanel::OnBtnConfigureBuild(wxCommandEvent& event)
 //compile project
 void wxCDMProjectActionsPanel::OnBtnBuildProject(wxCommandEvent& event)
 {
-  std::string* result;
-  //wxProgressDialog* loadBar = new wxProgressDialog(wxT("Compiling"), wxT("Please wait while the compilation is executing..."), 100, this);
-  //loadBar->Pulse();
-  if(!this->project->Build(result))
+  //get author from user
+  wxTextEntryDialog* buildDlg = new wxTextEntryDialog(
+      this,
+      wxT("Enter the compilation instruction:"),
+      wxT("Project Compilation- creaDevManager"),
+      crea::std2wx(this->project->GetBuildInstruction()),
+      wxTE_MULTILINE | wxOK | wxCANCEL
+  );
+
+  if (buildDlg->ShowModal() == wxID_OK)
     {
-      //loadBar->Destroy();
-      wxMessageBox(crea::std2wx(result->c_str()), wxT("Project Compilation - Error!"));
-      return;
+      std::string buildDlgStr = crea::wx2std(buildDlg->GetValue());
+      //check name
+      if (buildDlgStr != "")
+        {
+          std::string* result;
+          //wxProgressDialog* loadBar = new wxProgressDialog(wxT("Compiling"), wxT("Please wait while the compilation is executing..."), 100, this);
+          //loadBar->Pulse();
+          if(!this->project->Build(result, buildDlgStr))
+            {
+              //loadBar->Destroy();
+              wxMessageBox(crea::std2wx(result->c_str()), wxT("Project Compilation - Error!"));
+              return;
+            }
+          //loadBar->Destroy();
+          //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"));
+        }
     }
-  //loadBar->Destroy();
-  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"));
 }
-
 //plug packages
 void wxCDMProjectActionsPanel::OnBtnConnectProject(wxCommandEvent& event)
 {
   std::string* result;
   if(!this->project->Connect(result))
-      {
-        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"));
+    {
+      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"));
 }