mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-09 13:14:02 +02:00
VCMIDirs update #2 fix
This commit is contained in:
parent
8eb1721050
commit
5d5db77fc9
@ -48,10 +48,10 @@ class VCMIDirs_win32 : public IVCMIDirs
|
|||||||
|
|
||||||
namespace VCMIDirs
|
namespace VCMIDirs
|
||||||
{
|
{
|
||||||
const IVCMIDirs* get()
|
const IVCMIDirs& get()
|
||||||
{
|
{
|
||||||
static VCMIDirs_win32 singleton;
|
static VCMIDirs_win32 singleton;
|
||||||
return &singleton;
|
return singleton;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,13 +142,13 @@ std::string VCMIDirs_win32::genHelpString() const
|
|||||||
" user saves: " + utf8_convert(userSavePath()) + "\n"; // Should end without new-line?
|
" user saves: " + utf8_convert(userSavePath()) + "\n"; // Should end without new-line?
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string libraryName(const std::string& basename) { return basename + ".dll"; }
|
std::string VCMIDirs_win32::libraryName(const std::string& basename) const { return basename + ".dll"; }
|
||||||
// End of file: VCMIDirs_win32.cpp
|
// End of file: VCMIDirs_win32.cpp
|
||||||
#else // UNIX
|
#else // UNIX
|
||||||
// File: IVCMIDirs_unix.h
|
// File: IVCMIDirs_UNIX.h
|
||||||
//#include "IVCMIDirs.h"
|
//#include "IVCMIDirs.h"
|
||||||
|
|
||||||
class IVCMIDirs_unix : public IVCMIDirs
|
class IVCMIDirs_UNIX : public IVCMIDirs
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
boost::filesystem::path clientPath() const override;
|
boost::filesystem::path clientPath() const override;
|
||||||
@ -156,16 +156,16 @@ class IVCMIDirs_unix : public IVCMIDirs
|
|||||||
|
|
||||||
std::string genHelpString() const override;
|
std::string genHelpString() const override;
|
||||||
};
|
};
|
||||||
// End of file: IVCMIDirs_unix.h
|
// End of file: IVCMIDirs_UNIX.h
|
||||||
|
|
||||||
// File: IVCMIDirs_unix.cpp
|
// File: IVCMIDirs_UNIX.cpp
|
||||||
//#include "StdInc.h"
|
//#include "StdInc.h"
|
||||||
//#include "IVCMIDirs_unix.h"
|
//#include "IVCMIDirs_UNIX.h"
|
||||||
|
|
||||||
bfs::path IVCMIDirs_unix::clientPath() const { return binaryPath() / "vcmiclient"; }
|
bfs::path IVCMIDirs_UNIX::clientPath() const { return binaryPath() / "vcmiclient"; }
|
||||||
bfs::path IVCMIDirs_unix::clientPath() const { return binaryPath() / "vcmiserver"; }
|
bfs::path IVCMIDirs_UNIX::clientPath() const { return binaryPath() / "vcmiserver"; }
|
||||||
|
|
||||||
std::string IVCMIDirs_unix::genHelpString() const
|
std::string IVCMIDirs_UNIX::genHelpString() const
|
||||||
{
|
{
|
||||||
std::vector<std::string> temp_vec;
|
std::vector<std::string> temp_vec;
|
||||||
for (const bfs::path& path : dataPaths())
|
for (const bfs::path& path : dataPaths())
|
||||||
@ -183,13 +183,13 @@ std::string IVCMIDirs_unix::genHelpString() const
|
|||||||
" user config: " + userConfigPath().string() + "\n" +
|
" user config: " + userConfigPath().string() + "\n" +
|
||||||
" user saves: " + userSavePath().string() + "\n"; // Should end without new-line?
|
" user saves: " + userSavePath().string() + "\n"; // Should end without new-line?
|
||||||
}
|
}
|
||||||
// End of file: IVCMIDirs_unix.cpp
|
// End of file: IVCMIDirs_UNIX.cpp
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// File: VCMIDirs_OSX.h
|
// File: VCMIDirs_OSX.h
|
||||||
//#include "IVCMIDirs_unix.h"
|
//#include "IVCMIDirs_UNIX.h"
|
||||||
|
|
||||||
class VCMIDirs_OSX : public IVCMIDirs_unix
|
class VCMIDirs_OSX : public IVCMIDirs_UNIX
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
boost::filesystem::path userDataPath() const override;
|
boost::filesystem::path userDataPath() const override;
|
||||||
@ -212,10 +212,10 @@ class VCMIDirs_OSX : public IVCMIDirs_unix
|
|||||||
|
|
||||||
namespace VCMIDirs
|
namespace VCMIDirs
|
||||||
{
|
{
|
||||||
const IVCMIDirs* get()
|
const IVCMIDirs& get()
|
||||||
{
|
{
|
||||||
static VCMIDirs_OSX singleton;
|
static VCMIDirs_OSX singleton;
|
||||||
return &singleton;
|
return singleton;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,9 +248,9 @@ std::string libraryName(const std::string& basename) { return "lib" + basename +
|
|||||||
// End of file: VCMIDirs_OSX.cpp
|
// End of file: VCMIDirs_OSX.cpp
|
||||||
#else
|
#else
|
||||||
// File: VCMIDirs_Linux.h
|
// File: VCMIDirs_Linux.h
|
||||||
//#include "IVCMIDirs_unix.h"
|
//#include "IVCMIDirs_UNIX.h"
|
||||||
|
|
||||||
class VCMIDirs_Linux : public IVCMIDirs_unix
|
class VCMIDirs_Linux : public IVCMIDirs_UNIX
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
boost::filesystem::path userDataPath() const override;
|
boost::filesystem::path userDataPath() const override;
|
||||||
@ -273,10 +273,10 @@ public:
|
|||||||
|
|
||||||
namespace VCMIDirs
|
namespace VCMIDirs
|
||||||
{
|
{
|
||||||
const IVCMIDirs* get()
|
const IVCMIDirs& get()
|
||||||
{
|
{
|
||||||
static VCMIDirs_Linux singleton;
|
static VCMIDirs_Linux singleton;
|
||||||
return &singleton;
|
return singleton;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,10 +375,10 @@ public:
|
|||||||
|
|
||||||
namespace VCMIDirs
|
namespace VCMIDirs
|
||||||
{
|
{
|
||||||
const IVCMIDirs* get()
|
const IVCMIDirs& get()
|
||||||
{
|
{
|
||||||
static VCMIDirs_Android singleton;
|
static VCMIDirs_Android singleton;
|
||||||
return &singleton;
|
return singleton;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,5 +58,5 @@ class IVCMIDirs
|
|||||||
|
|
||||||
namespace VCMIDirs
|
namespace VCMIDirs
|
||||||
{
|
{
|
||||||
extern DLL_LINKAGE const IVCMIDirs* get();
|
extern DLL_LINKAGE const IVCMIDirs& get();
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user