mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +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 <set>
|
||||
#include <sstream>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
using G3D::Vector3;
|
||||
using G3D::AABox;
|
||||
@@ -54,7 +55,7 @@ namespace VMAP
|
||||
TileAssembler::TileAssembler(const std::string& pSrcDirName, const std::string& pDestDirName)
|
||||
: iDestDir(pDestDirName), iSrcDir(pSrcDirName)
|
||||
{
|
||||
//mkdir(iDestDir);
|
||||
boost::filesystem::create_directory(iDestDir);
|
||||
//init();
|
||||
}
|
||||
|
||||
|
||||
@@ -56,8 +56,7 @@ bool checkDirectories(bool debugOutput)
|
||||
dirFiles.clear();
|
||||
if (getDirContents(dirFiles, "mmaps") == LISTFILE_DIRECTORY_NOT_FOUND)
|
||||
{
|
||||
printf("'mmaps' directory does not exist\n");
|
||||
return false;
|
||||
return boost::filesystem::create_directory("mmaps");
|
||||
}
|
||||
|
||||
dirFiles.clear();
|
||||
|
||||
@@ -22,14 +22,21 @@
|
||||
|
||||
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;
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string src = argv[1];
|
||||
std::string dest = argv[2];
|
||||
else
|
||||
{
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user