Windows fixes

This commit is contained in:
Jack Andersen 2017-11-13 17:34:05 -10:00
parent 67a0fff04d
commit b41b21cb4b
7 changed files with 16 additions and 15 deletions

View File

@ -54,11 +54,11 @@ static void printHelp(const hecl::SystemChar* pname)
else
hecl::Printf(_S("HECL"));
#if HECL_GIT
hecl::Printf(_S(" Commit " HECL_GIT_S " " HECL_BRANCH_S "\nUsage: %s init|add|remove|group|cook|clean|package|help\n"), pname);
hecl::Printf(_S(" Commit " HECL_GIT_S " " HECL_BRANCH_S "\nUsage: %s extract|init|add|remove|group|cook|clean|package|help\n"), pname);
#elif HECL_VER
hecl::Printf(_S(" Version " HECL_VER_S "\nUsage: %s init|add|remove|group|cook|clean|package|help\n"), pname);
hecl::Printf(_S(" Version " HECL_VER_S "\nUsage: %s extract|init|add|remove|group|cook|clean|package|help\n"), pname);
#else
hecl::Printf(_S("\nUsage: %s init|add|remove|group|cook|clean|package|help\n"), pname);
hecl::Printf(_S("\nUsage: %s extract|init|add|remove|group|cook|clean|package|help\n"), pname);
#endif
}

2
hecl/extern/athena vendored

@ -1 +1 @@
Subproject commit 3f24b7f33e6e68a43e95df5e3c7609f61d5e3f04
Subproject commit 30391f335269ec0404be73e7c238525cce12b27c

2
hecl/extern/boo vendored

@ -1 +1 @@
Subproject commit 6950d96b4694a124b04608826cdb0e388b7e308a
Subproject commit b7646f7f9a6fc3d4dfb8b3d0104d9020e52a99ed

View File

@ -85,9 +85,9 @@ public:
: m_utf8(WideToUTF8(str)) {}
std::string_view str() const {return m_utf8;}
const char* c_str() const {return m_utf8.c_str();}
std::string operator+(std::string_view other) const {return m_utf8 + other;}
std::string operator+(std::string_view other) const {return m_utf8 + other.data();}
};
inline std::string operator+(std::string_view lhs, const SystemUTF8Conv& rhs) {return lhs + std::string(rhs);}
inline std::string operator+(std::string_view lhs, const SystemUTF8Conv& rhs) {return std::string(lhs) + rhs.c_str();}
class SystemStringConv
{
std::wstring m_sys;
@ -96,9 +96,9 @@ public:
: m_sys(UTF8ToWide(str)) {}
SystemStringView sys_str() const {return m_sys;}
const SystemChar* c_str() const {return m_sys.c_str();}
std::wstring operator+(const std::wstring_view other) const {return m_sys + other;}
std::wstring operator+(const std::wstring_view other) const {return m_sys + other.data();}
};
inline std::wstring operator+(std::wstring_view lhs, const SystemStringConv& rhs) {return lhs + std::wstring(rhs);}
inline std::wstring operator+(std::wstring_view lhs, const SystemStringConv& rhs) {return std::wstring(lhs) + rhs.c_str();}
#else
class SystemUTF8Conv
{
@ -915,7 +915,7 @@ public:
return {};
return {m_relPath.c_str() + pos + 1, m_relPath.size() - pos - 1};
}
SystemStringView getLastComponentUTF8() const
std::string_view getLastComponentUTF8() const
{
size_t pos = m_relPath.rfind(_S('/'));
#if HECL_UCS2

View File

@ -87,7 +87,7 @@ void CVarManager::deserialize(CVar* cvar)
CVarContainer container;
#if _WIN32
hecl::SystemString filename = m_store.getStoreRoot() + _S('/') + com_configfile->toWideLiteral();
hecl::SystemString filename = hecl::SystemString(m_store.getStoreRoot()) + _S('/') + com_configfile->toWideLiteral();
#else
hecl::SystemString filename = hecl::SystemString(m_store.getStoreRoot()) + _S('/') + com_configfile->toLiteral();
#endif

View File

@ -261,7 +261,7 @@ const ProjectPath& Project::getProjectCookedPath(const DataSpecEntry& spec) cons
for (const ProjectDataSpec& sp : m_compiledSpecs)
if (&sp.spec == &spec)
return sp.cookedPath;
LogModule.report(logvisor::Fatal, "Unable to find spec '%s'", spec.m_name);
LogModule.report(logvisor::Fatal, "Unable to find spec '%s'", spec.m_name.data());
return m_cookedRoot;
}
@ -368,7 +368,7 @@ public:
{
SystemString submsg(m_file);
submsg += _S(" (");
submsg += specEnt->m_name;
submsg += specEnt->m_name.data();
submsg += _S(')');
if (m_progFunc)
m_progFunc(m_dir, submsg.c_str(), lidx, m_prog);
@ -377,7 +377,7 @@ public:
{
SystemString submsg(m_file);
submsg += _S(" (");
submsg += specEnt->m_name;
submsg += specEnt->m_name.data();
submsg += _S(", ");
submsg += extra;
submsg += _S(')');

View File

@ -23,7 +23,8 @@ FileStoreManager::FileStoreManager(SystemStringView domain)
path += _S("/.heclrun");
hecl::MakeDir(path.c_str());
path += _S('/') + domain;
path += _S('/');
path += domain.data();
hecl::MakeDir(path.c_str());
m_storeRoot = path;