PimenovPavel
Member | Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору
Цитата: запись текущих данных в папку, куда установлена программа - особенность вообще всех программ DC++ | Это не так. путь к установкам можно переопределить в файле dcppboot.xml p.s. // Load boot settings try { SimpleXML boot; boot.fromXML(File(systemPath + "dcppboot.xml", File::READ, File::OPEN).read()); boot.stepIn(); if(boot.findChild("ConfigPath")) { StringMap params; #ifdef _WIN32 TCHAR path[MAX_PATH]; params["APPDATA"] = Text::fromT((::SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, path), path)); params["PERSONAL"] = Text::fromT((::SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, path), path)); configPath = Util::formatParams(boot.getChildData(), params, false); #endif } } catch(const Exception& ) { // Unable to load boot settings... } if(!File::isAbsolute(configPath)) { configPath = systemPath + configPath; } configPath = Util::validateFileName(configPath); File::ensureDirectory(Util::getConfigPath()); |