+ {
+ isLibFound = true;
+ break;
+ }
+ }
+
+ if ( !isLibFound )
+ {
+ printf( "****************************************************************\n" );
+ printf( "* Warning: library %s cannot be found\n", lib.latin1() );
+ printf( "* Module %s will not be available in GUI mode\n", moduleTitle.latin1() );
+ printf( "****************************************************************\n" );
+ }
+ else if ( !isPythonModule )
+ return true;
+
+ if ( isPythonModule )
+ {
+ QString pylib = moduleName( moduleTitle ) + QString(".py");
+ QString pylibgui = moduleName( moduleTitle ) + QString("GUI.py");
+
+ // Check the python library
+#ifdef WIN32
+ paths = QStringList::split( ";", ::getenv( "PATH" ) );
+#else
+ paths = QStringList::split( ":", ::getenv( "PYTHONPATH" ) );
+#endif
+ bool isPyLib = false, isPyGuiLib = false;
+ QStringList::const_iterator anIt = paths.begin(), aLast = paths.end();
+ for( ; anIt!=aLast; anIt++ )
+ {
+ QFileInfo inf( Qtx::addSlash( *anIt ) + pylib );
+ QFileInfo infgui( Qtx::addSlash( *anIt ) + pylibgui );
+
+ if( !isPyLib && inf.exists() )
+ isPyLib = true;
+
+ if( !isPyGuiLib && infgui.exists() )
+ isPyGuiLib = true;
+
+ if ( isPyLib && isPyGuiLib && isLibFound)
+ return true;
+ }
+
+ printf( "****************************************************************\n" );
+ printf( "* Warning: python library for %s cannot be found:\n", moduleTitle.latin1() );
+ if (!isPyLib)
+ printf( "* No module named %s\n", moduleName( moduleTitle ).latin1() );
+ if (!isPyGuiLib)
+ printf( "* No module named %s\n", (moduleName( moduleTitle ) + QString("GUI")).latin1() );
+ printf( "****************************************************************\n" );