1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Quick solution for #1688.

This commit is contained in:
Michał W. Urbańczyk 2014-02-27 20:44:20 +00:00
parent 07aef4f2f6
commit 93856dbe98
2 changed files with 10 additions and 6 deletions

View File

@ -280,9 +280,11 @@ int main(int argc, char** argv)
console->start();
atexit(dispose);
CBasicLogConfigurator logConfig(VCMIDirs::get().userCachePath() + "/VCMI_Client_log.txt", console);
const auto logPath = VCMIDirs::get().userCachePath() + "/VCMI_Client_log.txt";
CBasicLogConfigurator logConfig(logPath, console);
logConfig.configureDefault();
logGlobal->infoStream() <<"Creating console "<<pomtime.getDiff();
logGlobal->infoStream() << "Creating console and configuring logger: " << pomtime.getDiff();
logGlobal->infoStream() << "The log file will be saved to " << logPath;
// Init filesystem and settings
preinitDLL(::console);

View File

@ -52,22 +52,24 @@ std::vector<std::string> VCMIDirs::configPaths() const
std::string VCMIDirs::userDataPath() const
{
return dataPaths()[0];
const std::string homeDir = std::getenv("userprofile");
return homeDir + "\\vcmi";
//return dataPaths()[0];
}
std::string VCMIDirs::libraryPath() const
{
return userDataPath();
return ".";
}
std::string VCMIDirs::clientPath() const
{
return userDataPath() + "\\" + "VCMI_client.exe";
return libraryPath() + "\\" + "VCMI_client.exe";
}
std::string VCMIDirs::serverPath() const
{
return userDataPath() + "\\" + "VCMI_server.exe";
return libraryPath() + "\\" + "VCMI_server.exe";
}
std::vector<std::string> VCMIDirs::dataPaths() const