mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 08:17:56 +00:00
feat(Tools): Automatically create directories for tools (#11540)
* . * .
This commit is contained in:
committed by
GitHub
parent
b7be09e96c
commit
ad8f8ee5a5
@@ -23,6 +23,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
using G3D::Vector3;
|
using G3D::Vector3;
|
||||||
using G3D::AABox;
|
using G3D::AABox;
|
||||||
@@ -54,7 +55,7 @@ namespace VMAP
|
|||||||
TileAssembler::TileAssembler(const std::string& pSrcDirName, const std::string& pDestDirName)
|
TileAssembler::TileAssembler(const std::string& pSrcDirName, const std::string& pDestDirName)
|
||||||
: iDestDir(pDestDirName), iSrcDir(pSrcDirName)
|
: iDestDir(pDestDirName), iSrcDir(pSrcDirName)
|
||||||
{
|
{
|
||||||
//mkdir(iDestDir);
|
boost::filesystem::create_directory(iDestDir);
|
||||||
//init();
|
//init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,8 +56,7 @@ bool checkDirectories(bool debugOutput)
|
|||||||
dirFiles.clear();
|
dirFiles.clear();
|
||||||
if (getDirContents(dirFiles, "mmaps") == LISTFILE_DIRECTORY_NOT_FOUND)
|
if (getDirContents(dirFiles, "mmaps") == LISTFILE_DIRECTORY_NOT_FOUND)
|
||||||
{
|
{
|
||||||
printf("'mmaps' directory does not exist\n");
|
return boost::filesystem::create_directory("mmaps");
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dirFiles.clear();
|
dirFiles.clear();
|
||||||
|
|||||||
@@ -22,14 +22,21 @@
|
|||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
if (argc != 3)
|
std::string src = "Buildings";
|
||||||
|
std::string dest = "vmaps";
|
||||||
|
|
||||||
|
if (argc > 3)
|
||||||
{
|
{
|
||||||
std::cout << "usage: " << argv[0] << " <raw data dir> <vmap dest dir>" << std::endl;
|
std::cout << "usage: " << argv[0] << " <raw data dir> <vmap dest dir>" << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
std::string src = argv[1];
|
{
|
||||||
std::string dest = argv[2];
|
if (argc > 1)
|
||||||
|
src = argv[1];
|
||||||
|
if (argc > 2)
|
||||||
|
dest = argv[2];
|
||||||
|
}
|
||||||
|
|
||||||
std::cout << "using " << src << " as source directory and writing output to " << dest << std::endl;
|
std::cout << "using " << src << " as source directory and writing output to " << dest << std::endl;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user