From: Maksym Veremeyenko Date: Sat, 18 Jun 2011 08:56:09 +0000 (+0300) Subject: cleanup path before readlink, add devel case for pixmaps path detection X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=635efa35743022a87d0eccf0509562e83fa86c0d;hp=ed586cc08f8ea818882cf5385901a3330a9def7f;p=rugen cleanup path before readlink, add devel case for pixmaps path detection --- diff --git a/src/main.c b/src/main.c index 48e1ece..0b775f4 100644 --- a/src/main.c +++ b/src/main.c @@ -49,6 +49,7 @@ int main( int argc, char *argv[] ) gtk_init( &argc, &argv ); // Linux hack to determine path of the executable + memset(path, 0, sizeof(path)); readlink( "/proc/self/exe", path, 512 ); if ( strstr( path, "/bin/rugen" ) ) { @@ -56,6 +57,12 @@ int main( int argc, char *argv[] ) strcat( path, "/share/rugen/pixmaps" ); add_pixmap_directory( path ); } + else if ( strstr( path, "/src/rugen" ) ) + { + ( *strstr( path, "/src/rugen" ) ) = '\0'; + strcat( path, "/pixmaps" ); + add_pixmap_directory( path ); + } else { add_pixmap_directory( PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps" );