X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2Fbash%2FCreateInstances.cxx;h=95d41fa2476329f365a67b526d4dc40a07e4e32e;hb=ced860e96e5d2e10481582649664505396b0054d;hp=6ffe2dc628d1fe83859a98464ed8ad885f5cf52d;hpb=d8c6c19cd58d865ddfde7a5724bd99bbad19878c;p=cpPlugins.git diff --git a/appli/bash/CreateInstances.cxx b/appli/bash/CreateInstances.cxx index 6ffe2dc..95d41fa 100644 --- a/appli/bash/CreateInstances.cxx +++ b/appli/bash/CreateInstances.cxx @@ -4,19 +4,19 @@ int main( int argc, char* argv[] ) { // Get inputs - if( argc < 5 ) + if( argc < 4 ) { std::cerr << "Usage: " << argv[ 0 ] - << " definitons_file library_name output_path number_of_sources" + << " definitons_file library_name output_prefix" << std::endl; return( 1 ); } // fi std::string definitions_filename = argv[ 1 ]; std::string library_name = argv[ 2 ]; - std::string output_path = argv[ 3 ]; - unsigned int number_of_sources = std::atoi( argv[ 4 ] ); + std::string output_prefix = argv[ 3 ]; + unsigned int number_of_sources = cpPlugins_CONFIG_NUMBER_OF_FILES; // Read inputs std::string definitions_buffer; @@ -105,7 +105,7 @@ int main( int argc, char* argv[] ) // Write header std::stringstream header_filename; - header_filename << output_path << "/" << library_name << ".h"; + header_filename << output_prefix << ".h"; if( !( cpPlugins_bash::Write( header.str( ), header_filename.str( ) ) ) ) { std::cerr << "Error writing header file." << std::endl; @@ -151,7 +151,7 @@ int main( int argc, char* argv[] ) << "#include <" << library_name << "_Export.h>" << std::endl; source - << "#include <" << output_path<< "/" << library_name << ".h>" + << "#include <" << output_prefix << ".h>" << std::endl << std::endl; if( tfiles.size( ) > 0 ) { @@ -184,7 +184,7 @@ int main( int argc, char* argv[] ) source << std::endl << "// eof" << std::endl; std::stringstream source_file; source_file - << output_path << "/" << library_name << "_" << f_id << ".cxx"; + << output_prefix << "_" << f_id << ".cxx"; if( !( cpPlugins_bash::Write( source.str( ), source_file.str( ) ) ) ) { std::cerr << "Error writing source code." << std::endl;