mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 17:44:56 +00:00
Windows sync fixes for API changes
This commit is contained in:
@@ -23,13 +23,13 @@ class ToolPackage final : public ToolBase
|
||||
|
||||
void CheckFile(const hecl::ProjectPath& path)
|
||||
{
|
||||
if (!hecl::StrCmp(path.getLastComponent().data(), _S("!world.blend")))
|
||||
if (!hecl::StrCmp(path.getLastComponent().data(), _SYS_STR("!world.blend")))
|
||||
AddSelectedItem(path);
|
||||
#if RUNTIME_ORIGINAL_IDS
|
||||
else if (!hecl::StrCmp(path.getLastComponent().data(), _S("!original_ids.yaml")))
|
||||
else if (!hecl::StrCmp(path.getLastComponent().data(), _SYS_STR("!original_ids.yaml")))
|
||||
{
|
||||
auto pathComps = path.getPathComponents();
|
||||
if (pathComps.size() == 2 && pathComps[0] != _S("out"))
|
||||
if (pathComps.size() == 2 && pathComps[0] != _SYS_STR("out"))
|
||||
AddSelectedItem(path);
|
||||
}
|
||||
#endif
|
||||
@@ -60,8 +60,8 @@ class ToolPackage final : public ToolBase
|
||||
if (checkGeneral && origSize == m_selectedItems.size())
|
||||
{
|
||||
auto pathComps = path.getPathComponents();
|
||||
if (pathComps.size() == 2 && pathComps[0] != _S("out") &&
|
||||
pathComps[1] != _S("Shared") && pathComps[0].find(_S(".app")) == hecl::SystemString::npos)
|
||||
if (pathComps.size() == 2 && pathComps[0] != _SYS_STR("out") &&
|
||||
pathComps[1] != _SYS_STR("Shared") && pathComps[0].find(_SYS_STR(".app")) == hecl::SystemString::npos)
|
||||
AddSelectedItem(path);
|
||||
}
|
||||
}
|
||||
@@ -82,12 +82,12 @@ public:
|
||||
{
|
||||
if (arg.empty())
|
||||
continue;
|
||||
else if (!arg.compare(_S("--fast")))
|
||||
else if (!arg.compare(_SYS_STR("--fast")))
|
||||
{
|
||||
m_fast = true;
|
||||
continue;
|
||||
}
|
||||
else if (arg.size() >= 8 && !arg.compare(0, 7, _S("--spec=")))
|
||||
else if (arg.size() >= 8 && !arg.compare(0, 7, _SYS_STR("--spec=")))
|
||||
{
|
||||
hecl::SystemString specName(arg.begin() + 7, arg.end());
|
||||
for (const hecl::Database::DataSpecEntry* spec : hecl::Database::DATA_SPEC_REGISTRY)
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
LogModule.report(logvisor::Fatal, "unable to find data spec '%s'", specName.c_str());
|
||||
continue;
|
||||
}
|
||||
else if (arg.size() >= 2 && arg[0] == _S('-') && arg[1] == _S('-'))
|
||||
else if (arg.size() >= 2 && arg[0] == _SYS_STR('-') && arg[1] == _SYS_STR('-'))
|
||||
continue;
|
||||
|
||||
hecl::SystemString subPath;
|
||||
@@ -117,8 +117,8 @@ public:
|
||||
}
|
||||
else if (m_fallbackProj->getProjectRootPath() != root)
|
||||
LogModule.report(logvisor::Fatal,
|
||||
_S("hecl package can only process multiple items in the same project; ")
|
||||
_S("'%s' and '%s' are different projects"),
|
||||
_SYS_STR("hecl package can only process multiple items in the same project; ")
|
||||
_SYS_STR("'%s' and '%s' are different projects"),
|
||||
m_fallbackProj->getProjectRootPath().getAbsolutePath().data(),
|
||||
root.getAbsolutePath().data());
|
||||
|
||||
@@ -133,64 +133,64 @@ public:
|
||||
|
||||
/* Default case: recursive at root */
|
||||
if (m_selectedItems.empty())
|
||||
FindSelectedItems({*m_useProj, _S("")}, true);
|
||||
FindSelectedItems({*m_useProj, _SYS_STR("")}, true);
|
||||
}
|
||||
|
||||
static void Help(HelpOutput& help)
|
||||
{
|
||||
help.secHead(_S("NAME"));
|
||||
help.secHead(_SYS_STR("NAME"));
|
||||
help.beginWrap();
|
||||
help.wrap(_S("hecl-pack\n")
|
||||
_S("hecl-package - Package objects within the project database\n"));
|
||||
help.wrap(_SYS_STR("hecl-pack\n")
|
||||
_SYS_STR("hecl-package - Package objects within the project database\n"));
|
||||
help.endWrap();
|
||||
|
||||
help.secHead(_S("SYNOPSIS"));
|
||||
help.secHead(_SYS_STR("SYNOPSIS"));
|
||||
help.beginWrap();
|
||||
help.wrap(_S("hecl package [--spec=<spec>] [<input-dir>]\n"));
|
||||
help.wrap(_SYS_STR("hecl package [--spec=<spec>] [<input-dir>]\n"));
|
||||
help.endWrap();
|
||||
|
||||
help.secHead(_S("DESCRIPTION"));
|
||||
help.secHead(_SYS_STR("DESCRIPTION"));
|
||||
help.beginWrap();
|
||||
help.wrap(_S("This command initiates a packaging pass on the project database. Packaging ")
|
||||
_S("is analogous to linking in software development. All objects necessary to ")
|
||||
_S("generate a complete package are gathered, grouped, and indexed within a .upak file.\n"));
|
||||
help.wrap(_SYS_STR("This command initiates a packaging pass on the project database. Packaging ")
|
||||
_SYS_STR("is analogous to linking in software development. All objects necessary to ")
|
||||
_SYS_STR("generate a complete package are gathered, grouped, and indexed within a .upak file.\n"));
|
||||
help.endWrap();
|
||||
|
||||
help.secHead(_S("OPTIONS"));
|
||||
help.optionHead(_S("--spec=<spec>"), _S("data specification"));
|
||||
help.secHead(_SYS_STR("OPTIONS"));
|
||||
help.optionHead(_SYS_STR("--spec=<spec>"), _SYS_STR("data specification"));
|
||||
help.beginWrap();
|
||||
help.wrap(_S("Specifies a DataSpec to use when cooking and generating the package. ")
|
||||
_S("This build of hecl supports the following values of <spec>:\n"));
|
||||
help.wrap(_SYS_STR("Specifies a DataSpec to use when cooking and generating the package. ")
|
||||
_SYS_STR("This build of hecl supports the following values of <spec>:\n"));
|
||||
for (const hecl::Database::DataSpecEntry* spec : hecl::Database::DATA_SPEC_REGISTRY)
|
||||
{
|
||||
if (!spec->m_factory)
|
||||
continue;
|
||||
help.wrap(_S(" "));
|
||||
help.wrap(_SYS_STR(" "));
|
||||
help.wrapBold(spec->m_name.data());
|
||||
help.wrap(_S("\n"));
|
||||
help.wrap(_SYS_STR("\n"));
|
||||
}
|
||||
help.endWrap();
|
||||
|
||||
help.secHead(_S("OPTIONS"));
|
||||
help.optionHead(_S("<input-dir>"), _S("input directory"));
|
||||
help.secHead(_SYS_STR("OPTIONS"));
|
||||
help.optionHead(_SYS_STR("<input-dir>"), _SYS_STR("input directory"));
|
||||
help.beginWrap();
|
||||
help.wrap(_S("Specifies a project subdirectory to root the resulting package from. ")
|
||||
_S("If any dependent files fall outside this subdirectory, they will be implicitly ")
|
||||
_S("gathered and packaged.\n"));
|
||||
help.wrap(_SYS_STR("Specifies a project subdirectory to root the resulting package from. ")
|
||||
_SYS_STR("If any dependent files fall outside this subdirectory, they will be implicitly ")
|
||||
_SYS_STR("gathered and packaged.\n"));
|
||||
help.endWrap();
|
||||
}
|
||||
|
||||
hecl::SystemString toolName() const {return _S("package");}
|
||||
hecl::SystemString toolName() const {return _SYS_STR("package");}
|
||||
|
||||
int run()
|
||||
{
|
||||
if (XTERM_COLOR)
|
||||
hecl::Printf(_S("" GREEN BOLD "ABOUT TO PACKAGE:" NORMAL "\n"));
|
||||
hecl::Printf(_SYS_STR("" GREEN BOLD "ABOUT TO PACKAGE:" NORMAL "\n"));
|
||||
else
|
||||
hecl::Printf(_S("ABOUT TO PACKAGE:\n"));
|
||||
hecl::Printf(_SYS_STR("ABOUT TO PACKAGE:\n"));
|
||||
|
||||
for (auto& item : m_selectedItems)
|
||||
hecl::Printf(_S(" %s\n"), item.getRelativePath().data());
|
||||
hecl::Printf(_SYS_STR(" %s\n"), item.getRelativePath().data());
|
||||
fflush(stdout);
|
||||
|
||||
if (continuePrompt())
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
for (const hecl::ProjectPath& path : m_selectedItems)
|
||||
{
|
||||
if (!m_useProj->packagePath(path, printer, m_fast, m_spec, &cp))
|
||||
LogModule.report(logvisor::Error, _S("Unable to package %s"), path.getAbsolutePath().data());
|
||||
LogModule.report(logvisor::Error, _SYS_STR("Unable to package %s"), path.getAbsolutePath().data());
|
||||
}
|
||||
cp.waitUntilComplete();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user