[referencer] ./data directory needed during startup

Dominik Kriegner dominik.kriegner at aol.at
Mon Aug 15 12:14:02 EDT 2011


I think the main problem is in the Utility::findDataFile function. I
could fix the problem with

=== modified file 'src/Utility.C'
--- old/src/Utility.C	2011-03-24 16:55:22 +0000
+++ new/src/Utility.C	2011-08-15 15:39:32 +0000
@@ -213,9 +213,7 @@
 		localfile = filename;
 	} else {
 		localfile = Glib::build_filename (
-			Glib::get_current_dir (), "data");
-		localfile = Glib::build_filename (
-			localfile, filename);
+		    DATADIR, filename);
 	}
 
 	Glib::RefPtr<Gio::File> uri =

I am however not sure if this is what the findDataFile function is
intended for. I also attached the patch file. Please have a look!

kind regards

Dominik

On Mon, 2011-08-15 at 12:44 +0200, Dominik Kriegner wrote:
> hi
> 
> > man, 15 08 2011 kl. 11:27 +0200, skrev Dominik Kriegner:
> > > $ bin/referencer
> > > int main(int, char**):
> > >         setting pythonPath
> > > to :/home/dominik/apps/lib/python:./plugins:/home/dominik/.referencer/plugins:/home/dominik/devel/referencer/amrlima_gio_port/dist/lib/referencer:
> > > terminate called after throwing an instance of 'Gio::Error'
> > > Aborted
> > 
> > I see the same behaviour, however if you use ./src/referencer it works
> > for me
> 
> You are right it works with ./src/referencer but only When I execute it
> from the root directory of the branch! If I do 
> 
> cd src
> ./referencer 
> 
> it fails with the same error again. I guess your case works only since
> a data directory and the needed files exist in the root directory.
> Since the files already exist there also subsequent startups work as
> expected.
> 
> >    
> > > A subsequent start of referencer fails because of those 4 emtpy files.
> > > Did I do something wrong or should I file a bug report on launchpad? 
> > 
> > Does installing as non-devconfigure work?
> > ./configure
> > make
> > make install
> 
> fails for me too if executed outside the build directory where the data folder is located!
> somehow the current directory is important when referencer is started!
> 
> kind regards 
> 
> dominik
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: referencer-datadir.patch
Type: text/x-patch
Size: 393 bytes
Desc: not available
URL: <http://icculus.org/pipermail/referencer/attachments/20110815/61535c87/attachment.bin>


More information about the referencer mailing list