It would be really nice to be able to specifiy where all files for settings and such like Favorites.xml, DCPlusPlus.xml, notepad.txt, HashData.dat and HashIndex.xml are being stored.
This would make it easier if you do backups of files (which everyone should) or if you like to ghost your system.
This could be done either with a xml file where this can be specified or even better if the program would take an argument where to look for the files (like Firefox's "C:\Program Files\Mozilla Firefox\firefox.exe" -profile "T:\Firefox").
Anyone else thinks this would be a good idea?
Being able to specify directory for settings
Moderator: Moderators
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
This has been requested, in a way: Bug 723: Store configuration in Windows user profile (per-user settings).
I'm not sure I see the utility in storing settings in an arbitrary path - there are too many directory locations in the file, and none of them are relative. So even making a "thumb drive" version of DC++ wouldn't make much sense.
I'm not sure I see the utility in storing settings in an arbitrary path - there are too many directory locations in the file, and none of them are relative. So even making a "thumb drive" version of DC++ wouldn't make much sense.
I don't think I agree on
A simple and quick fix (I guess there are a lot of better and nicer ways to do it) to implement the feature I'm interested in
From util.cpp
if this
got changed to this
Then any windows user who would like to store the settings files from DC++ anywhere else than where the program is installed would only have to set an enviromental variable.
While I could probably do this myself for my own copy, I'm not sure my own version would get accepted in any hub...
It seems like they are all related to Util::getConfigPath().there are too many directory locations in the file, and none of them are relative
A simple and quick fix (I guess there are a lot of better and nicer ways to do it) to implement the feature I'm interested in
From util.cpp
Code: Select all
string Util::getConfigPath() {
#ifdef _WIN32
return getAppPath();
#else
char* home = getenv("HOME");
if (home) {
#ifdef __APPLE__
/// @todo Verify this for apple?
return string(home) + "/Library/Application Support/Mac DC++/";
#else
return string(home) + "/.dc++/";
#endif // __APPLE__
}
return emptyString;
#endif // _WIN32
}
Code: Select all
#ifdef _WIN32
return getAppPath();
#else
Code: Select all
#ifdef _WIN32
char* dcconfighome = getenv("DCCONFIGHOME");
if (dcconfighome){
return dcconfighome;
}
else{
return getAppPath();
}
#else
While I could probably do this myself for my own copy, I'm not sure my own version would get accepted in any hub...
-
- Posts: 506
- Joined: 2003-01-03 07:33