Re: configuration file to go along with a virtual machine program [message #74622] |
Wed, 26 January 2011 17:52 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
JamesMeteo writes:
> I'm going to be distributing a virtual machine program and would like
> to let the user set up his own configuration file with paths to the
> data the program needs just once, so when on later executions of the
> program it will see the config file is present and get what it needs
> from it.
>
> Does anyone have suggestions on how the program can discover where it
> ought to look for the file? The program is going to be distributed to
> Windows, Solaris, and Linux so I need a solution for each o/s.
You can see how I have done this with the DataViewer program
I wrote when I was at NSIDC.
http://www.idlcoyote.com/programs/dataviewer.zip
I put this on a CD for Windows, Linux and Macintosh
computers and it worked great. Basically, I distribute
the program in a dataviewer directory. In that directory
are a config and resource directory. If the dataviewer
directory is copied to a new location, I can still find
these two sub-directories. I use ProgramRootDir from
the Coyote Library to find them. Users can have any
number of configuration files, as long as they live
in the right "application" directory.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|