bubba2251 / freerct

Automatically exported from code.google.com/p/freerct
0 stars 0 forks source link

freerct.cfg and *.rcd files have hardcoded locations #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
To make installing FRCT easier, the cfg and rcd files should not be hardcoded 
into position
(along with the icon location as well)

Original issue reported on code.google.com by CharlesP...@googlemail.com on 28 Oct 2013 at 9:46

GoogleCodeExporter commented 9 years ago

Original comment by CharlesP...@googlemail.com on 28 Oct 2013 at 9:47

GoogleCodeExporter commented 9 years ago
Is current working directory intended or directory of the .exe? Usually the 
same thing but working directory is probably what's intended here.

Original comment by LaylCon...@gmail.com on 1 Dec 2013 at 4:59

GoogleCodeExporter commented 9 years ago
Current behavior is just temporary.

It should be some sequence of search paths decided at compile time, and they 
should be easy to override in a configuration file (also found using a sequence 
of possible locations also decided at compile time).

Some command-line options to override all searches is also likely to be useful.
Working directory is unlikely to work, as it would mean config and rcd files 
get scattered all over your directories, which seems unlikely to me, at this 
time.

Original comment by Alberth2...@gmail.com on 1 Dec 2013 at 8:22

GoogleCodeExporter commented 9 years ago
Please allow relative paths as it would allow to easily create a portable 
version of the game (e.g. a version that can be run on a USB Key without any 
installation on the host computer).

Original comment by devnonam...@gmail.com on 29 Dec 2013 at 4:13

GoogleCodeExporter commented 9 years ago
The current behavior uses relatives paths where the freerct binary exist (src)

Original comment by vatriani.nn on 19 Jan 2014 at 6:11

GoogleCodeExporter commented 9 years ago
I usually run CMake into a build directory ignored by .gitignore. This could be 
a starting point.

Original comment by adrian.a...@gmail.com on 25 Jan 2014 at 5:33

GoogleCodeExporter commented 9 years ago
extend config-file loading
- changing to directory search list.
- adding programm param -c or --config for own config file eg. an other path

Original comment by vatriani.nn on 1 Jun 2014 at 6:49

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

Having a --config option would be nice, which makes the basic idea good.
But as always, the pain is in the details.

Why do you have both a boolean flag, and a string? Wouldn't "config_filename != 
nullptr" be sufficient?

The list directory paths is quite a problem:
- The / is already added by the load routine.
- Relative directories won't work if you are in a different directory (eg run 
the program with some/path/to/bin/freerct).
- /usr/share assumes an install location, which may not be true. cmake should 
provide the install path here.
- ~/.config/freerct  won't fly, unless LoadFromDirectoryList implements ~ 
replacement. Also ~/.config is not a traditional place to store config 
information, it is actually a common value for $XDG_CONFIG_HOME, see also 
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html To make 
that fly, the load function needs to implement environment variable 
substitution.
- That may be quite useful anyway, so we can add $HOME/.freerct/

Please don't leave commented code in a patch.

Original comment by Alberth2...@gmail.com on 5 Jun 2014 at 4:52

GoogleCodeExporter commented 9 years ago
right but i've solved this for fetching users home in my earlier programms with
http://pastebin.com/Pnx6wE5X

for direct $XDG_CONFIG_HOME
http://pastebin.com/wbceuGb1

Original comment by vatriani.nn on 9 Jul 2014 at 9:19

GoogleCodeExporter commented 9 years ago
remove the unneeded boolean
remove unneeded paths from list
add ~ replacement with $HOME in ConfigFile::LoadFromDirectoryList
change --config to --config-file

Original comment by vatriani.nn on 19 Jul 2014 at 1:01

Attachments:

GoogleCodeExporter commented 9 years ago
how do i install these files at present?

Original comment by stormcha...@gmail.com on 27 Jan 2015 at 3:37