#include <cpPlugins/Interface/Plugins.h>
#include <cpPlugins/OS/DLLManager.h>
#include <cpPlugins/OS/DirContents.h>
-#include <cpExtensions/Utility.h>
+#include <cpPlugins/Utility.h>
// -------------------------------------------------------------------------
cpPlugins::Interface::Plugins::
AddEnvironments( const std::string& env )
{
std::vector< std::string > directories;
- cpExtensions::Tokenize( directories, env, cpPlugins_ENV_SEPARATOR );
+ cpPlugins::Tokenize( directories, env, cpPlugins_ENV_SEPARATOR );
for( auto dir = directories.begin( ); dir != directories.end( ); ++dir )
- this->m_Paths.insert( cpExtensions::CanonicalPath( *dir ) );
+ this->m_Paths.insert( cpPlugins::CanonicalPath( *dir ) );
}
// -------------------------------------------------------------------------
std::stringstream fname;
fname << *d << cpPlugins_PATH_SEPARATOR << cpPlugins_CONFIG;
std::string buffer;
- if( cpExtensions::Read( buffer, fname.str( ) ) )
+ if( cpPlugins::Read( buffer, fname.str( ) ) )
{
std::istringstream input( buffer );
for( std::string line; std::getline( input, line ); )
for( auto l = libs.begin( ); l != libs.end( ); ++l )
{
- std::string lib = cpExtensions::CanonicalPath( *l );
+ std::string lib = cpPlugins::CanonicalPath( *l );
if( lib != "" )
{
if( this->m_Libraries.find( lib ) == this->m_Libraries.end( ) )
{
std::stringstream fname, envs;
fname << dir;
- if( !cpExtensions::IsPathSeparator( dir.back( ) ) )
- fname << cpExtensions_PATH_SEPARATOR;
+ if( !cpPlugins::IsPathSeparator( dir.back( ) ) )
+ fname << cpPlugins_PATH_SEPARATOR;
fname << cpPlugins_PATHS;
std::string buffer;
- if( cpExtensions::Read( buffer, fname.str( ) ) )
+ if( cpPlugins::Read( buffer, fname.str( ) ) )
{
std::istringstream input( buffer );
for( std::string line; std::getline( input, line ); )
std::stringstream fname;
fname << dir;
- if( !cpExtensions::IsPathSeparator( dir.back( ) ) )
- fname << cpExtensions_PATH_SEPARATOR;
+ if( !cpPlugins::IsPathSeparator( dir.back( ) ) )
+ fname << cpPlugins_PATH_SEPARATOR;
fname << cpPlugins_PATHS;
- if( !cpExtensions::Write( buffer.str( ), fname.str( ) ) )
+ if( !cpPlugins::Write( buffer.str( ), fname.str( ) ) )
throw std::runtime_error( "Error writing environment file." );
}
LoadFile( const std::string& fname )
{
// Resolve canonical filename
- std::string can_name = cpExtensions::CanonicalPath( fname );
+ std::string can_name = cpPlugins::CanonicalPath( fname );
if( can_name == "" )
throw std::runtime_error(
std::string( "Loading file: can't find library \"" ) +
{
std::stringstream dir;
dir << *i;
- if( !cpExtensions::IsPathSeparator( i->back( ) ) )
- dir << cpExtensions_PATH_SEPARATOR;
+ if( !cpPlugins::IsPathSeparator( i->back( ) ) )
+ dir << cpPlugins_PATH_SEPARATOR;
dir << fname.str( );
try
{