1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-30 08:07:46 +00:00

Merge branch 'feature/vs2019' into develop

This commit is contained in:
NotAdam 2020-02-08 09:58:30 +11:00
commit abcba7aebd
44 changed files with 143 additions and 128 deletions

View file

@ -1,5 +1,5 @@
os:
- Visual Studio 2017
- Visual Studio 2019
configuration:
- Debug
@ -20,8 +20,8 @@ before_build:
- git submodule update --init
- mkdir build
- cd build
- cmake .. -G "Visual Studio 15 2017 Win64"
- cmake --build . --target ALL_BUILD --config Release
- cmake .. -G "Visual Studio 16 2019" -A x64
- cmake --build . --target ALL_BUILD --config RelWithDebInfo
build_script:
- cd bin

View file

@ -14,9 +14,10 @@ matrix:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- g++-8
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- CXX=g++-8
# Setup cache
cache:

View file

@ -1,21 +1,32 @@
{
// See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file.
"environments": [
{
"BuildDir": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build"
}
],
"configurations": [
{
"name": "x64-Debug",
"generator": "Visual Studio 15 2017 Win64",
"generator": "Visual Studio 16 2019 Win64",
"configurationType": "Debug",
"buildRoot": "${env.USERPROFILE}\\CMakeBuild\\${workspaceHash}\\build\\${name}",
"buildRoot": "${env.BuildDir}\\${name}",
"cmakeCommandArgs": "-DCMAKE_BUILD_TYPE=\"Debug\"",
"buildCommandArgs": "-m -v:minimal"
"buildCommandArgs": "-m -v:minimal",
"inheritEnvironments": [
"msvc_x64"
]
},
{
"name": "x64-Release",
"generator": "Visual Studio 15 2017 Win64",
"generator": "Visual Studio 16 2019 Win64",
"configurationType": "Release",
"buildRoot": "${env.USERPROFILE}\\CMakeBuild\\${workspaceHash}\\build\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-m -v:minimal"
"buildRoot": "${env.BuildDir}\\${name}",
"cmakeCommandArgs": "-DCMAKE_BUILD_TYPE=\"RelWithDebInfo\"",
"buildCommandArgs": "-m -v:minimal",
"inheritEnvironments": [
"msvc_x64"
]
}
]
}

View file

@ -18,7 +18,7 @@ Sapphire requires the following software:
| *Name* | *Windows* | *Linux* |
| ------ | --------- | ------- |
| CMake 3.0.2+ and C++17 capable compiler | [Visual Studio 2017](https://www.visualstudio.com/) | `gcc 7` and `g++ 7` or newer |
| CMake 3.0.2+ and C++17 capable compiler | [Visual Studio 2019](https://www.visualstudio.com/) | `gcc 8` and `g++ 8` or newer, alternatively, `clang 8` and `clang++ 8` or newer. |
| MySQL Server 5.7 | [Official Site](https://dev.mysql.com/downloads/mysql/) | MySQL server from your distribution's package manager |
Please check the [wiki](https://github.com/SapphireMordred/Sapphire/wiki) for detailed installation/build instructions for your OS.

View file

@ -140,7 +140,7 @@ namespace xiv
namespace dat
{
Dat::Dat( const std::experimental::filesystem::path& i_path, uint32_t i_nb ) :
Dat::Dat( const std::filesystem::path& i_path, uint32_t i_nb ) :
SqPack( i_path ),
m_num( i_nb )
{

View file

@ -5,7 +5,7 @@
#include <mutex>
#include <experimental/filesystem>
#include <filesystem>
namespace xiv
{
@ -18,7 +18,7 @@ class Dat : public SqPack
{
public:
// Full path to the dat file
Dat( const std::experimental::filesystem::path& i_path, uint32_t i_nb );
Dat( const std::filesystem::path& i_path, uint32_t i_nb );
virtual ~Dat();
// Retrieves a file given the offset in the dat file

View file

@ -10,7 +10,7 @@ namespace xiv
namespace dat
{
Cat::Cat( const std::experimental::filesystem::path& basePath, uint32_t catNum, const std::string& name ) :
Cat::Cat( const std::filesystem::path& basePath, uint32_t catNum, const std::string& name ) :
m_name( name ),
m_catNum( catNum ),
m_chunk( -1 )
@ -30,7 +30,7 @@ Cat::Cat( const std::experimental::filesystem::path& basePath, uint32_t catNum,
}
}
Cat::Cat( const std::experimental::filesystem::path& basePath, uint32_t catNum, const std::string& name, uint32_t exNum, uint32_t chunk ) :
Cat::Cat( const std::filesystem::path& basePath, uint32_t catNum, const std::string& name, uint32_t exNum, uint32_t chunk ) :
m_name( name ),
m_catNum( catNum ),
m_chunk( chunk )

View file

@ -3,7 +3,7 @@
#include <memory>
#include <vector>
#include <experimental/filesystem>
#include <filesystem>
namespace xiv {
namespace dat {
@ -19,14 +19,14 @@ public:
// basePath: Path to the folder containingthe datfiles
// catNum: The number of the category
// name: The name of the category, empty if not known
Cat( const std::experimental::filesystem::path& basePath, uint32_t catNum, const std::string& name );
Cat( const std::filesystem::path& basePath, uint32_t catNum, const std::string& name );
// basePath: Path to the folder containingthe datfiles
// catNum: The number of the category
// name: The name of the category, empty if not known
// exNum: The number of the expansion to load from
// chunk: The chunk to load from
Cat( const std::experimental::filesystem::path& basePath, uint32_t catNum, const std::string& name, uint32_t exNum, uint32_t chunk );
Cat( const std::filesystem::path& basePath, uint32_t catNum, const std::string& name, uint32_t exNum, uint32_t chunk );
~Cat();
// Returns .index of the category

View file

@ -4,7 +4,7 @@
#include <memory>
#include <map>
#include <experimental/filesystem>
#include <filesystem>
#include "bparse.h"
#include "Exd.h"

View file

@ -5,7 +5,7 @@
#include <memory>
#include <mutex>
#include <experimental/filesystem>
#include <filesystem>
namespace xiv
{
@ -34,7 +34,7 @@ namespace xiv
const Cat& get_category(const std::string& i_cat_name);
// Export in csv in base flder i_ouput_path
void export_as_csvs(const std::experimental::filesystem::path& i_output_path);
void export_as_csvs(const std::filesystem::path& i_output_path);
protected:
// Lazy instantiation of category

View file

@ -31,7 +31,7 @@ std::vector<std::vector<char>>& File::access_data_sections()
return _data_sections;
}
void File::exportToFile(const std::experimental::filesystem::path& i_path) const
void File::exportToFile(const std::filesystem::path& i_path) const
{
std::ofstream ofs( i_path.string(), std::ios_base::binary | std::ios_base::out );
for( auto& data_section : _data_sections )

View file

@ -3,7 +3,7 @@
#include <vector>
#include <experimental/filesystem>
#include <filesystem>
#include <stdint.h>
#include "bparse.h"
@ -43,7 +43,7 @@ namespace xiv
const std::vector<std::vector<char>>& get_data_sections() const;
std::vector<std::vector<char>>& access_data_sections();
void exportToFile( const std::experimental::filesystem::path& i_path ) const;
void exportToFile( const std::filesystem::path& i_path ) const;
protected:
FileType _type;

View file

@ -53,7 +53,7 @@ namespace xiv
namespace dat
{
GameData::GameData(const std::experimental::filesystem::path& path) try :
GameData::GameData(const std::filesystem::path& path) try :
m_path(path)
{
int maxExLevel = 0;
@ -62,18 +62,18 @@ GameData::GameData(const std::experimental::filesystem::path& path) try :
#ifdef _WIN32
static constexpr auto sep = "\\";
#else
static constexpr auto sep = std::experimental::filesystem::path::preferred_separator;
static constexpr auto sep = std::filesystem::path::preferred_separator;
#endif
// Determine which expansions are available
while( std::experimental::filesystem::exists( std::experimental::filesystem::path( m_path.string() + sep + "ex" + std::to_string( maxExLevel + 1 ) + sep + "ex" + std::to_string( maxExLevel + 1 ) + ".ver" ) ) )
while( std::filesystem::exists( std::filesystem::path( m_path.string() + sep + "ex" + std::to_string( maxExLevel + 1 ) + sep + "ex" + std::to_string( maxExLevel + 1 ) + ".ver" ) ) )
{
maxExLevel++;
}
// Iterate over the files in path
for( auto it = std::experimental::filesystem::directory_iterator( m_path.string() + "//ffxiv" ); it != std::experimental::filesystem::directory_iterator(); ++it )
for( auto it = std::filesystem::directory_iterator( m_path.string() + "//ffxiv" ); it != std::filesystem::directory_iterator(); ++it )
{
// Get the filename of the current element
auto filename = it->path().filename().string();
@ -99,14 +99,14 @@ GameData::GameData(const std::experimental::filesystem::path& path) try :
{
const std::string path = m_path.string() + sep + buildDatStr( "ex" + std::to_string( exNum ), cat_nb, exNum, 0, "win32", "index" );
if( std::experimental::filesystem::exists( std::experimental::filesystem::path( path ) ) )
if( std::filesystem::exists( std::filesystem::path( path ) ) )
{
int chunkCount = 0;
for(int chunkTest = 0; chunkTest < 256; chunkTest++ )
{
if( std::experimental::filesystem::exists( m_path.string() + sep + buildDatStr( "ex" + std::to_string( exNum ), cat_nb, exNum, chunkTest, "win32", "index" ) ) )
if( std::filesystem::exists( m_path.string() + sep + buildDatStr( "ex" + std::to_string( exNum ), cat_nb, exNum, chunkTest, "win32", "index" ) ) )
{
m_exCats[cat_nb].exNumToChunkMap[exNum].chunkToCatMap[chunkTest] = std::unique_ptr<Cat>();
chunkCount++;

View file

@ -5,7 +5,7 @@
#include <unordered_map>
#include <mutex>
#include <experimental/filesystem>
#include <filesystem>
namespace xiv
{
@ -21,7 +21,7 @@ class GameData
{
public:
// This should be the path in which the .index/.datX files are located
GameData( const std::experimental::filesystem::path& path );
GameData( const std::filesystem::path& path );
~GameData();
static const std::string buildDatStr( const std::string folder, const int cat, const int exNum, const int chunk, const std::string platform, const std::string type );
@ -61,7 +61,7 @@ protected:
void createExCategory( uint32_t catNum );
// Path given to constructor, pointing to the folder with the .index/.datX files
const std::experimental::filesystem::path m_path;
const std::filesystem::path m_path;
// Stored categories, indexed by their number, categories are instantiated and parsed individually when they are needed
std::unordered_map<uint32_t, std::unique_ptr<Cat>> m_cats;

View file

@ -56,7 +56,7 @@ namespace xiv
namespace dat
{
Index::Index(const std::experimental::filesystem::path& path) :
Index::Index(const std::filesystem::path& path) :
SqPack( path )
{
if( !m_handle )

View file

@ -5,7 +5,7 @@
#include <unordered_map>
#include <experimental/filesystem>
#include <filesystem>
namespace xiv {
namespace dat {
@ -16,7 +16,7 @@ class Index : public SqPack
{
public:
// Full path to the index file
Index( const std::experimental::filesystem::path& i_path );
Index( const std::filesystem::path& i_path );
virtual ~Index();
// An entry in the hash table, representing a file in a given dat

View file

@ -55,7 +55,7 @@ namespace xiv::dat
{
// Open the file
SqPack::SqPack( const std::experimental::filesystem::path& path ) :
SqPack::SqPack( const std::filesystem::path& path ) :
m_handle( path.string(), std::ios_base::in | std::ios_base::binary )
{
// Extract the header

View file

@ -3,7 +3,7 @@
#include <fstream>
#include <experimental/filesystem>
#include <filesystem>
#include "bparse.h"
@ -49,7 +49,7 @@ class SqPack
public:
// Full path to the sqpack file
SqPack( const std::experimental::filesystem::path& i_path );
SqPack( const std::filesystem::path& i_path );
virtual ~SqPack();
protected:

View file

@ -4,7 +4,10 @@
#include "PreparedStatement.h"
#include <mysql.h>
#ifdef _MSC_VER
// fixes compile error when compiling with vs2019
#include <stdexcept>
#endif
#include <vector>
Mysql::Connection::Connection( std::shared_ptr< MySqlBase > pBase,

View file

@ -4,6 +4,7 @@
#include <memory>
#include <map>
#include <string>
#include "MysqlCommon.h"
typedef struct st_mysql MYSQL;

View file

@ -31,8 +31,8 @@
#include <mutex>
#include <functional>
#include <experimental/filesystem>
namespace ci { namespace fs = std::experimental::filesystem; }
#include <filesystem>
namespace ci { namespace fs = std::filesystem; }
//! Exception for when Watchdog can't locate a file or parse the wildcard
class WatchedFileSystemExc : public std::exception {
@ -319,7 +319,7 @@ protected:
std::string mFilter;
std::function<void(const ci::fs::path&)> mCallback;
std::function<void(const std::vector<ci::fs::path>&)> mListCallback;
std::map< std::string, std::experimental::filesystem::file_time_type > mModificationTimes;
std::map< std::string, std::filesystem::file_time_type > mModificationTimes;
};
std::mutex mMutex;

View file

@ -2,9 +2,9 @@
#define _PLAYERMINIMAL_H
#include <map>
#include <stdint.h>
#include <string.h> // ?
#include <cstdint>
#include <string>
#include <cstring>
namespace Sapphire::Api
{

View file

@ -22,7 +22,7 @@
//Added for the default_resource example
#include <fstream>
#include <string>
#include <experimental/filesystem>
#include <filesystem>
#include <vector>
#include <algorithm>
@ -39,7 +39,7 @@ Sapphire::Db::DbWorkerPool< Sapphire::Db::ZoneDbConnection > g_charaDb;
Sapphire::Data::ExdDataGenerated g_exdDataGen;
Sapphire::Api::SapphireApi g_sapphireAPI;
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
using namespace std;
using namespace Sapphire;

View file

@ -1,9 +1,8 @@
#include "ConfigMgr.h"
#include <iostream>
#include <fstream>
#include <experimental/filesystem>
#include <filesystem>
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
using namespace Sapphire;
using namespace Sapphire::Common;

View file

@ -8,9 +8,9 @@
#include <spdlog/sinks/daily_file_sink.h>
// #include <iostream>
#include <experimental/filesystem> // or #include <filesystem>
#include <filesystem> // or #include <filesystem>
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
void Sapphire::Logger::init( const std::string& logPath )
{

View file

@ -5,14 +5,14 @@
#include <streambuf>
#include <sstream>
#include <Logging/Logger.h>
#include <experimental/filesystem>
#include <filesystem>
#include <common/Util/Util.h>
using namespace Sapphire;
using namespace Sapphire::Common;
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
DbManager::DbManager( const std::string& host, const std::string& database, const std::string& user, const std::string& pw, uint16_t port ) :
m_host( host ),

View file

@ -3,14 +3,14 @@
#include <cctype>
#include <set>
#include <common/Logging/Logger.h>
#include <experimental/filesystem>
#include <filesystem>
#include <MySqlConnector.h>
#include <common/Util/CrashHandler.h>
#include <common/Config/ConfigMgr.h>
Sapphire::Common::Util::CrashHandler crashHandler;
namespace filesys = std::experimental::filesystem;
namespace fs = std::filesystem;
#include <fstream>
#include <streambuf>
@ -30,19 +30,19 @@ std::vector< std::string > getAllFilesInDir( const std::string& dirPath,
try
{
// Check if given path exists and points to a directory
if( filesys::exists( dirPath ) && filesys::is_directory( dirPath ) )
if( fs::exists( dirPath ) && fs::is_directory( dirPath ) )
{
// Create a Recursive Directory Iterator object and points to the starting of directory
filesys::recursive_directory_iterator iter( dirPath );
fs::recursive_directory_iterator iter( dirPath );
// Create a Recursive Directory Iterator object pointing to end.
filesys::recursive_directory_iterator end;
fs::recursive_directory_iterator end;
// Iterate till end
while( iter != end )
{
// Check if current entry is a directory and if exists in skip list
if( filesys::is_directory( iter->path() ) &&
if( fs::is_directory( iter->path() ) &&
( std::find( dirSkipList.begin(), dirSkipList.end(), iter->path().filename() ) != dirSkipList.end() ) )
{
// Skip the iteration of current directory pointed by iterator

View file

@ -17,11 +17,11 @@
#include <streambuf>
#include <regex>
#include <experimental/filesystem>
#include <filesystem>
Sapphire::Data::ExdDataGenerated g_exdData;
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
using namespace Sapphire;

View file

@ -26,14 +26,14 @@
#include <ExdCat.h>
#include <Exd.h>
#include <experimental/filesystem>
#include <filesystem>
Sapphire::Common::Util::CrashHandler crashHandler;
Sapphire::Data::ExdDataGenerated g_exdData;
using namespace Sapphire;
using namespace std::chrono_literals;
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
// garbage to ignore models
bool ignoreModels = false;

View file

@ -11,7 +11,7 @@
#include <set>
#include <Exd/ExdDataGenerated.h>
#include <Logging/Logger.h>
#include <experimental/filesystem>
#include <filesystem>
#include <nlohmann/json.hpp>
@ -22,7 +22,7 @@
using namespace Sapphire;
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
Sapphire::Data::ExdDataGenerated g_exdData;
bool skipUnmapped = true;

View file

@ -22,7 +22,7 @@
#include <Util/CrashHandler.h>
#include <experimental/filesystem>
#include <filesystem>
Sapphire::Common::Util::CrashHandler crashHandler;
@ -31,7 +31,7 @@ xiv::dat::GameData* gameData = nullptr;
using namespace Sapphire;
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
//const std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" );
const std::string datLocation( "/mnt/c/Program Files (x86)/Steam/steamapps/common/FINAL FANTASY XIV Online/game/sqpack" );

View file

@ -13,9 +13,9 @@
#include <Logging/Logger.h>
#include <Util/Util.h>
#include <experimental/filesystem>
#include <filesystem>
namespace filesys = std::experimental::filesystem;
namespace fs = std::filesystem;
#include <fstream>
#include <streambuf>
@ -138,19 +138,19 @@ std::vector< std::string > getAllFilesInDir( const std::string& dirPath,
try
{
// Check if given path exists and points to a directory
if( filesys::exists( dirPath ) && filesys::is_directory( dirPath ) )
if( fs::exists( dirPath ) && fs::is_directory( dirPath ) )
{
// Create a Recursive Directory Iterator object and points to the starting of directory
filesys::recursive_directory_iterator iter( dirPath );
fs::recursive_directory_iterator iter( dirPath );
// Create a Recursive Directory Iterator object pointing to end.
filesys::recursive_directory_iterator end;
fs::recursive_directory_iterator end;
// Iterate till end
while( iter != end )
{
// Check if current entry is a directory and if exists in skip list
if( filesys::is_directory( iter->path() ) &&
if( fs::is_directory( iter->path() ) &&
( std::find( dirSkipList.begin(), dirSkipList.end(), iter->path().filename() ) != dirSkipList.end() ) )
{
// Skip the iteration of current directory pointed by iterator
@ -212,17 +212,17 @@ int dumpSpawns()
for( auto file : listOfFiles )
{
if( !filesys::is_directory( file ) )
if( !fs::is_directory( file ) )
{
auto pos = file.find_last_of( "\\" );
if( pos != std::string::npos )
{
auto pos = file.find_last_of( filesys::path::preferred_separator );
auto pos = file.find_last_of( fs::path::preferred_separator );
if( pos != std::string::npos )
{
auto str = file.substr( 0, pos );
pos = str.find_last_of( filesys::path::preferred_separator );
pos = str.find_last_of( fs::path::preferred_separator );
auto zone = str.substr( pos + 1 );
//Logger::info( zone );
@ -399,17 +399,17 @@ int dumpTemplates()
for( auto file : listOfFiles )
{
if( !filesys::is_directory( file ) )
if( !fs::is_directory( file ) )
{
auto pos = file.find_last_of( "\\" );
if( pos != std::string::npos )
{
auto pos = file.find_last_of( filesys::path::preferred_separator );
auto pos = file.find_last_of( fs::path::preferred_separator );
if( pos != std::string::npos )
{
auto str = file.substr( 0, pos );
pos = str.find_last_of( filesys::path::preferred_separator );
pos = str.find_last_of( fs::path::preferred_separator );
auto zone = str.substr( pos + 1 );
//Logger::info( zone );
@ -434,7 +434,7 @@ int dumpTemplates()
}
/* if( filesys::is_directory( file ) )
/* if( fs::is_directory( file ) )
{
auto pos = file.find_last_of( "\\" );
if( pos != std::string::npos )

View file

@ -1,11 +1,11 @@
#include "TiledNavmeshGenerator.h"
#include <experimental/filesystem>
#include <filesystem>
#include <cstring>
#include <recastnavigation/Detour/Include/DetourNavMeshBuilder.h>
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
inline unsigned int nextPow2( uint32_t v )

View file

@ -12,9 +12,9 @@
#include "obj_exporter.h"
#include "nav/TiledNavmeshGenerator.h"
#include <experimental/filesystem>
#include <filesystem>
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
class NavmeshExporter
{
@ -23,7 +23,7 @@ public:
{
auto start = std::chrono::high_resolution_clock::now();
static std::string currPath = std::experimental::filesystem::current_path().string();
static std::string currPath = std::filesystem::current_path().string();
auto dir = fs::current_path().string() + "/pcb_export/" + zone.name + "/";
auto fileName = dir + zone.name;

View file

@ -3,7 +3,7 @@
#include <chrono>
#include <cstdint>
#include <experimental/filesystem>
#include <filesystem>
#include <fstream>
#include <string>
@ -16,7 +16,7 @@ class ObjExporter
public:
static std::string exportZone( const ExportedZone& zone )
{
static std::string currPath = std::experimental::filesystem::current_path().string();
static std::string currPath = std::filesystem::current_path().string();
auto start = std::chrono::high_resolution_clock::now();
@ -25,9 +25,9 @@ public:
std::error_code e;
if( !std::experimental::filesystem::exists( dir, e ) )
if( !std::filesystem::exists( dir, e ) )
{
if( !std::experimental::filesystem::create_directories( dir, e ) )
if( !std::filesystem::create_directories( dir, e ) )
{
printf( "Unable to create directory '%s'", ( dir ).c_str() );
return "";
@ -59,7 +59,7 @@ public:
static std::string exportGroup( const std::string& zoneName, const ExportedGroup& group )
{
static std::string currPath = std::experimental::filesystem::current_path().string();
static std::string currPath = std::filesystem::current_path().string();
auto start = std::chrono::high_resolution_clock::now();
@ -67,9 +67,9 @@ public:
auto fileName = dir + group.name + ".obj";
std::error_code e;
if( !std::experimental::filesystem::exists( dir, e ) )
if( !std::filesystem::exists( dir, e ) )
{
if( !std::experimental::filesystem::create_directories( dir, e ) )
if( !std::filesystem::create_directories( dir, e ) )
{
printf( "Unable to create directory '%s'", ( dir ).c_str() );
return "";

View file

@ -1,11 +1,11 @@
#include "TiledNavmeshGenerator.h"
#include <experimental/filesystem>
#include <filesystem>
#include <cstring>
#include <recastnavigation/Detour/Include/DetourNavMeshBuilder.h>
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
inline unsigned int nextPow2( uint32_t v )

View file

@ -12,9 +12,9 @@
#include "obj_exporter.h"
#include "nav/TiledNavmeshGenerator.h"
#include <experimental/filesystem>
#include <filesystem>
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
class NavmeshExporter
{
@ -23,7 +23,7 @@ public:
{
auto start = std::chrono::high_resolution_clock::now();
static std::string currPath = std::experimental::filesystem::current_path().string();
static std::string currPath = std::filesystem::current_path().string();
auto dir = fs::current_path().string() + "/pcb_export/" + zone.name + "/";
auto fileName = dir + zone.name;
@ -60,7 +60,7 @@ public:
{
auto start = std::chrono::high_resolution_clock::now();
static std::string currPath = std::experimental::filesystem::current_path().string();
static std::string currPath = std::filesystem::current_path().string();
auto dir = fs::current_path().string() + "/pcb_export/" + zoneName + "/";

View file

@ -3,7 +3,7 @@
#include <chrono>
#include <cstdint>
#include <experimental/filesystem>
#include <filesystem>
#include <fstream>
#include <string>
@ -16,7 +16,7 @@ class ObjExporter
public:
static std::string exportZone( const ExportedZone& zone )
{
static std::string currPath = std::experimental::filesystem::current_path().string();
static std::string currPath = std::filesystem::current_path().string();
auto start = std::chrono::high_resolution_clock::now();
@ -25,9 +25,9 @@ public:
std::error_code e;
if( !std::experimental::filesystem::exists( dir, e ) )
if( !std::filesystem::exists( dir, e ) )
{
if( !std::experimental::filesystem::create_directories( dir, e ) )
if( !std::filesystem::create_directories( dir, e ) )
{
printf( "Unable to create directory '%s'", ( dir ).c_str() );
return "";
@ -59,7 +59,7 @@ public:
static std::string exportGroup( const std::string& zoneName, const ExportedGroup& group )
{
static std::string currPath = std::experimental::filesystem::current_path().string();
static std::string currPath = std::filesystem::current_path().string();
auto start = std::chrono::high_resolution_clock::now();
@ -67,9 +67,9 @@ public:
auto fileName = dir + group.name + ".obj";
std::error_code e;
if( !std::experimental::filesystem::exists( dir, e ) )
if( !std::filesystem::exists( dir, e ) )
{
if( !std::experimental::filesystem::create_directories( dir, e ) )
if( !std::filesystem::create_directories( dir, e ) )
{
printf( "Unable to create directory '%s'", ( dir ).c_str() );
return "";

View file

@ -6,7 +6,7 @@
#include <string>
#include <cstring>
#include <experimental/filesystem>
#include <filesystem>
#include <Exd.h>
#include <ExdCat.h>
@ -21,7 +21,7 @@
#include <algorithm>
Sapphire::Data::ExdDataGenerated g_exdDataGen;
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
using namespace Sapphire;
const std::string onTalkStr(

View file

@ -18,7 +18,7 @@
#include <Util/CrashHandler.h>
#include <experimental/filesystem>
#include <filesystem>
Sapphire::Common::Util::CrashHandler crashHandler;
@ -27,7 +27,7 @@ xiv::dat::GameData* gameData = nullptr;
using namespace Sapphire;
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
//const std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" );
//const std::string datLocation( "/mnt/c/Program Files (x86)/Steam/steamapps/common/FINAL FANTASY XIV Online/game/sqpack" );

View file

@ -16,7 +16,7 @@
#include <recastnavigation/Detour/Include/DetourNavMeshQuery.h>
#include <DetourCommon.h>
#include <recastnavigation/Recast/Include/Recast.h>
#include <experimental/filesystem>
#include <filesystem>
Sapphire::World::Navi::NaviProvider::NaviProvider( const std::string& internalName, FrameworkPtr pFw ) :
m_naviMesh( nullptr ),
@ -34,12 +34,12 @@ bool Sapphire::World::Navi::NaviProvider::init()
{
auto& cfg = m_pFw->get< Sapphire::World::ServerMgr >()->getConfig();
auto meshesFolder = std::experimental::filesystem::path( cfg.navigation.meshPath );
auto meshFolder = meshesFolder / std::experimental::filesystem::path( m_internalName );
auto meshesFolder = std::filesystem::path( cfg.navigation.meshPath );
auto meshFolder = meshesFolder / std::filesystem::path( m_internalName );
if( std::experimental::filesystem::exists( meshFolder ) )
if( std::filesystem::exists( meshFolder ) )
{
auto baseMesh = meshFolder / std::experimental::filesystem::path( m_internalName + ".nav" );
auto baseMesh = meshFolder / std::filesystem::path( m_internalName + ".nav" );
if( !loadMesh( baseMesh.string() ) )
return false;

View file

@ -5,11 +5,11 @@
#include <Util/Util.h>
#include "ServerMgr.h"
#include <experimental/filesystem>
#include <filesystem>
#include "Framework.h"
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
const std::string Sapphire::Scripting::ScriptLoader::getModuleExtension()
{

View file

@ -27,7 +27,7 @@
// enable the ambiguity fix for every platform to avoid #define nonsense
#define WIN_AMBIGUITY_FIX
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
Sapphire::Scripting::ScriptMgr::ScriptMgr( FrameworkPtr pFw ) :
World::Manager::BaseManager( pFw ),

View file

@ -1,4 +1,4 @@
#include <experimental/filesystem>
#include <filesystem>
#include <time.h>
#include <Util/Util.h>
@ -10,7 +10,7 @@
#include "Session.h"
namespace fs = std::experimental::filesystem;
namespace fs = std::filesystem;
Sapphire::World::Session::Session( uint32_t sessionId, FrameworkPtr pFw ) :
m_sessionId( sessionId ),