FreeOrion

Forums for the FreeOrion project
It is currently Mon May 20, 2013 5:55 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: specifying bindir and datadir with CMAKE
PostPosted: Tue Sep 28, 2010 4:27 pm 
Offline
Space Floater

Joined: Sun Sep 26, 2010 11:05 pm
Posts: 22
Hi,

I have been studying the CMAKE system, and I cannot seem to find where to specify the datadir for cmake. Right now it goes to /usr/default/default. I wish to make it something like /usr/share/freeorion.

Thanks,
q


Top
 Profile  
 
 Post subject: Re: specifying bindir and datadir with CMAKE
PostPosted: Tue Sep 28, 2010 6:16 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7888
Location: Vancouver, BC
I'm not sure what you mean by specifying the bindir and datadir... Do you mean where are these files placed when building or installing freeorion? Or where the game would look for binaries or the data files when it is run? Or something else?


Top
 Profile  
 
 Post subject: Re: specifying bindir and datadir with CMAKE
PostPosted: Tue Sep 28, 2010 6:52 pm 
Offline
Space Floater

Joined: Sun Sep 26, 2010 11:05 pm
Posts: 22
Sorry, I should have been more clear.

After running 'cmake' with '-DCMAKE_INSTALL_PREFIX=/usr', I run make install and it puts the data files into:

/usr/default/default

I wish to change this to:

/usr/share/freeorion (or something similiar).

Thanks,
q


Top
 Profile  
 
 Post subject: Re: specifying bindir and datadir with CMAKE
PostPosted: Tue Sep 28, 2010 7:31 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7888
Location: Vancouver, BC
That may not be possible, as the CMake system possibly wasn't designed to support it. See this post: viewtopic.php?p=42618#p42618

Apparently it could be modified to do so, though...


Top
 Profile  
 
 Post subject: Re: specifying bindir and datadir with CMAKE
PostPosted: Tue Sep 28, 2010 10:56 pm 
Offline
Space Floater

Joined: Sun Sep 26, 2010 11:05 pm
Posts: 22
I will take a look into implementing this feature.

I am curious, how does freeorion know where to grab the data? i.e. Is it hard-coded in a .cpp file somewhere right now?

Thanks,
q


Top
 Profile  
 
 Post subject: Re: specifying bindir and datadir with CMAKE
PostPosted: Wed Sep 29, 2010 1:23 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7888
Location: Vancouver, BC
q1w2e3r4 wrote:
I am curious, how does freeorion know where to grab the data? i.e. Is it hard-coded in a .cpp file somewhere right now?

Sort of. Directories.cpp has the relevant code. It's not exactly hard-coded, but depending on the OS-specific code, has a few places it tries looking. The resources directory (where game content files are gotten) is also defaulted to the root data directory, but this can be changed in the options screen directories tab. Some places still look for a specific file within the root data dire / default directory, though, even if the resource dir is changed.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group