mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-14 18:48:04 -07:00
Updated python script to use new "extract directory" mode.
Additionally fixed oversight with audio files and bug in OTRGui.
This commit is contained in:
parent
a59317627f
commit
c1eb71fa33
7 changed files with 167 additions and 109 deletions
|
@ -387,18 +387,6 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
BuildAssetBlob(Globals::Instance->inputPath, Globals::Instance->outputPath);
|
||||
}
|
||||
/*
|
||||
else if (fileMode == ZFileMode::BuildOverlay)
|
||||
{
|
||||
ZOverlay* overlay =
|
||||
ZOverlay::FromBuild(Path::GetDirectoryName(Globals::Instance->inputPath),
|
||||
Path::GetDirectoryName(Globals::Instance->cfgPath));
|
||||
|
||||
if (overlay != nullptr)
|
||||
File::WriteAllText(Globals::Instance->outputPath.string(),
|
||||
overlay->GetSourceOutputCode(""));
|
||||
}
|
||||
*/
|
||||
|
||||
if (exporterSet != nullptr && exporterSet->endProgramFunc != nullptr)
|
||||
exporterSet->endProgramFunc();
|
||||
|
|
|
@ -823,6 +823,32 @@ void ZFile::GenerateSourceHeaderFiles()
|
|||
|
||||
if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory)
|
||||
File::WriteAllText(headerFilename, formatter.GetOutput());
|
||||
else if (Globals::Instance->sourceOutputPath != "")
|
||||
{
|
||||
std::string xmlPath = xmlFilePath.string();
|
||||
xmlPath = StringHelper::Replace(xmlPath, "\\", "/");
|
||||
auto pathList = StringHelper::Split(xmlPath, "/");
|
||||
std::string outPath = "";
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
outPath += pathList[i] + "/";
|
||||
|
||||
for (int i = 5; i < pathList.size(); i++)
|
||||
{
|
||||
if (i == pathList.size() - 1)
|
||||
{
|
||||
outPath += Path::GetFileNameWithoutExtension(pathList[i]) + "/";
|
||||
outPath += outName.string() + ".h";
|
||||
}
|
||||
else
|
||||
outPath += pathList[i];
|
||||
|
||||
if (i < pathList.size() - 1)
|
||||
outPath += "/";
|
||||
}
|
||||
|
||||
File::WriteAllText(outPath, formatter.GetOutput());
|
||||
}
|
||||
}
|
||||
|
||||
std::string ZFile::GetHeaderInclude() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue