1 #include "SalomeApprc_utils.h"
3 QDir salomeappdir(getenv("SALOME_APPLICATION_DIR"));
4 SUIT_ResourceMgr ResMgr("SalomeApp");
6 int main(int argc, char** argv)
8 QString salome_version;
9 if (QString::compare(salomeappdir.dirName(), ".") == 0)
11 qWarning() << "SALOME_APPLICATION_DIR must not be empty!!";
16 qWarning() << "Too many arguments!! This function accept only one arg for the version name";
21 qInfo() << "Enter the salome version:";
22 bool ok_input = false;
25 QTextStream in (stdin);
26 salome_version = in.readLine();
27 if (!salome_version.contains(" "))
30 qWarning() << "The version string must not contain a blank space. Please re-enter the salome version";
35 salome_version = (QString)argv[1];
38 QApplication app(argc, argv);
39 app.setOrganizationName("salome");
40 ResMgr.setVersion(salome_version);
42 QString salomemodules(getenv("SALOME_MODULES"));
43 if(salomemodules.isEmpty())
44 AddComponents_from_salomeappdir();
46 AddComponents_from_salomemodules(salomemodules);
47 ResMgr.setCurrentFormat("xml");