Salome HOME
This commit was generated by cvs2git to create tag 'V1_3_0'.
[modules/kernel.git] / src / TOOLSGUI / ToolsGUI_CatalogGeneratorDlg.cxx
index ddaa15f726f68ded30ac44998ea387afccc11629..f117c1b60b30bca34db1e8e248850726a4b8f702 100644 (file)
@@ -343,7 +343,15 @@ void ToolsGUI_CatalogGeneratorDlg::onApply()
                              tr ("TOOLS_BUT_OK") );
     }
     else {
-      QString command = QString( getenv( "SALOME_ROOT_DIR" ) ) + "/bin/runIDLparser -Wbcatalog=" + XmlFile;
+      QString command = "";
+      if ( getenv("KERNEL_ROOT_DIR")  )
+       command = QString( getenv( "KERNEL_ROOT_DIR" ) ) + "/bin/runIDLparser -Wbcatalog=" + XmlFile;
+      else {
+       QAD_MessageBox::error1( this, 
+                               tr("TOOLS_ERR_ERROR"), 
+                               tr("KERNEL_ROOT_DIR variable is not defined"), 
+                               tr("TOOLS_BUT_OK") );
+      }
       if (!Author.isEmpty()) command += ",author=" + Author; 
       if (!Version.isEmpty()) command += ",version=" + Version;
       if (!PngFile.isEmpty()) {