mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-14 02:27:21 -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
|
@ -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