Crystal Space
Welcome, Guest. Please login or register.
October 25, 2014, 09:10:31 pm

Login with username, password and session length
Search:     Advanced search
9011 Posts in 2044 Topics by 8828 Members
Latest Member: Saikjanna
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  How do I add directories for resources to an application specific .cfg file?
« previous next »
Pages: [1] Print
Author Topic: How do I add directories for resources to an application specific .cfg file?  (Read 2297 times)
willjm
Newbie
*
Posts: 39


View Profile
« on: October 30, 2008, 05:39:32 pm »

Hi,

I have an application that I want to map a system directory to the VFS using the app.cfg found in C:\CS\data\config\app.cfg instead of the vfs.cfg file found in C:\CS. Is this possible and if so, how do I do this?

TY!
« Last Edit: October 30, 2008, 05:45:03 pm by willjm » Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: October 30, 2008, 05:45:09 pm »

You can't (automatically). You can put a custom vfs.cfg to your application directory. It will be appended to the one from CS so you don't have to make a copy. Only add new entries.

Another thing you can do is to add your application specific mount configuration options in your app config file and then read that in code manually to mount whatever additional paths you require.

Greetings,
Logged
willjm
Newbie
*
Posts: 39


View Profile
« Reply #2 on: October 30, 2008, 05:50:42 pm »

Great! I'll try the first route as that seems easier. Is there any documentation on what the app.cfg configures and how to use it?
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #3 on: October 30, 2008, 05:54:14 pm »

There is a section on configuration in the manual. You can basically put CS specific configs (i.e. configurations that belong to the renderer or such) in your application configuration file to override CS specific defaults and in addition you can also put your own config options there which you can read (or write) in your code.

Greetings,
Logged
willjm
Newbie
*
Posts: 39


View Profile
« Reply #4 on: October 30, 2008, 06:17:10 pm »

Alright I understand how it's used now. Thank you for the expedient responses Jorrit!
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.195 seconds with 16 queries.