mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
fix windows build, add windows GetDefaultDataDir, add files to project
This commit is contained in:
parent
5337f4c9a4
commit
dbd9c5c105
4 changed files with 26 additions and 1 deletions
10
util.cpp
10
util.cpp
|
@ -10,9 +10,15 @@
|
|||
#include <boost/foreach.hpp>
|
||||
#include <boost/program_options/detail/config_file.hpp>
|
||||
#include <boost/program_options/parsers.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "util.h"
|
||||
#include "Log.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <Windows.h>
|
||||
#include <shlobj.h>
|
||||
#endif
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
namespace util
|
||||
|
@ -152,7 +158,9 @@ namespace filesystem
|
|||
// Unix: ~/.i2pd
|
||||
#ifdef WIN32
|
||||
// Windows
|
||||
return GetSpecialFolderPath(CSIDL_APPDATA) / "i2pd";
|
||||
char localAppData[MAX_PATH];
|
||||
SHGetFolderPath(NULL, CSIDL_APPDATA, 0, NULL, localAppData);
|
||||
return boost::filesystem::path(std::string(localAppData) + "\\i2pd");
|
||||
#else
|
||||
boost::filesystem::path pathRet;
|
||||
char* pszHome = getenv("HOME");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue