diff --git a/.appveyor.yml b/.appveyor.yml index 70d4d921..ef08146f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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 diff --git a/.travis.yml b/.travis.yml index 375d4353..4c04e527 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/CMakeSettings.json b/CMakeSettings.json index 7a6006fe..cc894359 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -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" + ] } ] } diff --git a/README.md b/README.md index 582f4ebf..a133f5e0 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/deps/datReader/Dat.cpp b/deps/datReader/Dat.cpp index 94812a09..5e12d5d1 100644 --- a/deps/datReader/Dat.cpp +++ b/deps/datReader/Dat.cpp @@ -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 ) { diff --git a/deps/datReader/Dat.h b/deps/datReader/Dat.h index 5311ab48..10693b3c 100644 --- a/deps/datReader/Dat.h +++ b/deps/datReader/Dat.h @@ -5,7 +5,7 @@ #include -#include +#include 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 diff --git a/deps/datReader/DatCat.cpp b/deps/datReader/DatCat.cpp index 117c2b9b..2ce9566f 100644 --- a/deps/datReader/DatCat.cpp +++ b/deps/datReader/DatCat.cpp @@ -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 ) diff --git a/deps/datReader/DatCat.h b/deps/datReader/DatCat.h index 1e1d0759..07878589 100644 --- a/deps/datReader/DatCat.h +++ b/deps/datReader/DatCat.h @@ -3,7 +3,7 @@ #include #include -#include +#include 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 diff --git a/deps/datReader/ExdCat.h b/deps/datReader/ExdCat.h index af1090d8..e22ec036 100644 --- a/deps/datReader/ExdCat.h +++ b/deps/datReader/ExdCat.h @@ -4,7 +4,7 @@ #include #include -#include +#include #include "bparse.h" #include "Exd.h" diff --git a/deps/datReader/ExdData.h b/deps/datReader/ExdData.h index c6ca6170..15092d6e 100644 --- a/deps/datReader/ExdData.h +++ b/deps/datReader/ExdData.h @@ -5,7 +5,7 @@ #include #include -#include +#include 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 diff --git a/deps/datReader/File.cpp b/deps/datReader/File.cpp index 9559159d..c3413d5a 100644 --- a/deps/datReader/File.cpp +++ b/deps/datReader/File.cpp @@ -31,7 +31,7 @@ std::vector>& 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 ) diff --git a/deps/datReader/File.h b/deps/datReader/File.h index 1d09e78e..3ce77b4f 100644 --- a/deps/datReader/File.h +++ b/deps/datReader/File.h @@ -3,7 +3,7 @@ #include -#include +#include #include #include "bparse.h" @@ -43,7 +43,7 @@ namespace xiv const std::vector>& get_data_sections() const; std::vector>& 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; diff --git a/deps/datReader/GameData.cpp b/deps/datReader/GameData.cpp index 4b4a71e4..e3f36b6b 100644 --- a/deps/datReader/GameData.cpp +++ b/deps/datReader/GameData.cpp @@ -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(); chunkCount++; diff --git a/deps/datReader/GameData.h b/deps/datReader/GameData.h index 2b64fafd..d44c9ac8 100644 --- a/deps/datReader/GameData.h +++ b/deps/datReader/GameData.h @@ -5,7 +5,7 @@ #include #include -#include +#include 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> m_cats; diff --git a/deps/datReader/Index.cpp b/deps/datReader/Index.cpp index e7985396..3ff7d365 100644 --- a/deps/datReader/Index.cpp +++ b/deps/datReader/Index.cpp @@ -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 ) diff --git a/deps/datReader/Index.h b/deps/datReader/Index.h index 0dc565b7..b7999ad5 100644 --- a/deps/datReader/Index.h +++ b/deps/datReader/Index.h @@ -5,7 +5,7 @@ #include -#include +#include 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 diff --git a/deps/datReader/SqPack.cpp b/deps/datReader/SqPack.cpp index bdcfe2fb..4885cdf1 100644 --- a/deps/datReader/SqPack.cpp +++ b/deps/datReader/SqPack.cpp @@ -54,12 +54,12 @@ using xiv::utils::bparse::extract; namespace xiv::dat { - // Open the file - SqPack::SqPack( const std::experimental::filesystem::path& path ) : - m_handle( path.string(), std::ios_base::in | std::ios_base::binary ) - { - // Extract the header - extract< SqPackHeader >( m_handle ); + // Open the file + SqPack::SqPack( const std::filesystem::path& path ) : + m_handle( path.string(), std::ios_base::in | std::ios_base::binary ) + { + // Extract the header + extract( m_handle ); // Skip until the IndexHeader the extract it m_handle.seekg( 0x400 ); diff --git a/deps/datReader/SqPack.h b/deps/datReader/SqPack.h index cc7feab3..5fcb1c36 100644 --- a/deps/datReader/SqPack.h +++ b/deps/datReader/SqPack.h @@ -3,7 +3,7 @@ #include -#include +#include #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: diff --git a/deps/mysqlConnector/Connection.cpp b/deps/mysqlConnector/Connection.cpp index a1c2a58e..df6a28f0 100644 --- a/deps/mysqlConnector/Connection.cpp +++ b/deps/mysqlConnector/Connection.cpp @@ -4,7 +4,10 @@ #include "PreparedStatement.h" #include -#include +#ifdef _MSC_VER + // fixes compile error when compiling with vs2019 + #include +#endif #include Mysql::Connection::Connection( std::shared_ptr< MySqlBase > pBase, diff --git a/deps/mysqlConnector/Connection.h b/deps/mysqlConnector/Connection.h index e09bda69..43cc6e07 100644 --- a/deps/mysqlConnector/Connection.h +++ b/deps/mysqlConnector/Connection.h @@ -4,6 +4,7 @@ #include #include #include + #include "MysqlCommon.h" typedef struct st_mysql MYSQL; diff --git a/deps/watchdog/Watchdog.h b/deps/watchdog/Watchdog.h index d9f7aa25..e64a21f0 100644 --- a/deps/watchdog/Watchdog.h +++ b/deps/watchdog/Watchdog.h @@ -31,8 +31,8 @@ #include #include -#include -namespace ci { namespace fs = std::experimental::filesystem; } +#include +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 mCallback; std::function&)> 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; diff --git a/src/api/PlayerMinimal.h b/src/api/PlayerMinimal.h index 47b902b3..a5e41b7b 100644 --- a/src/api/PlayerMinimal.h +++ b/src/api/PlayerMinimal.h @@ -2,9 +2,9 @@ #define _PLAYERMINIMAL_H #include -#include -#include // ? +#include #include +#include namespace Sapphire::Api { diff --git a/src/api/main.cpp b/src/api/main.cpp index 004233ba..78d02861 100644 --- a/src/api/main.cpp +++ b/src/api/main.cpp @@ -22,7 +22,7 @@ //Added for the default_resource example #include #include -#include +#include #include #include @@ -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; diff --git a/src/common/Config/ConfigMgr.cpp b/src/common/Config/ConfigMgr.cpp index 8b8823f2..e581a37c 100644 --- a/src/common/Config/ConfigMgr.cpp +++ b/src/common/Config/ConfigMgr.cpp @@ -1,9 +1,8 @@ #include "ConfigMgr.h" #include -#include -#include +#include -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; using namespace Sapphire; using namespace Sapphire::Common; diff --git a/src/common/Logging/Logger.cpp b/src/common/Logging/Logger.cpp index 221f9291..4b37aba9 100644 --- a/src/common/Logging/Logger.cpp +++ b/src/common/Logging/Logger.cpp @@ -8,9 +8,9 @@ #include // #include -#include // or #include +#include // or #include -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; void Sapphire::Logger::init( const std::string& logPath ) { diff --git a/src/dbm/DbManager.cpp b/src/dbm/DbManager.cpp index e39eedcd..4b7a7783 100644 --- a/src/dbm/DbManager.cpp +++ b/src/dbm/DbManager.cpp @@ -5,14 +5,14 @@ #include #include #include -#include +#include #include 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 ), diff --git a/src/dbm/main.cpp b/src/dbm/main.cpp index 3eeebf2c..990f500d 100644 --- a/src/dbm/main.cpp +++ b/src/dbm/main.cpp @@ -3,14 +3,14 @@ #include #include #include -#include +#include #include #include #include Sapphire::Common::Util::CrashHandler crashHandler; -namespace filesys = std::experimental::filesystem; +namespace fs = std::filesystem; #include #include @@ -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 diff --git a/src/tools/action_parse/main.cpp b/src/tools/action_parse/main.cpp index 5f7afc07..9aacb0cd 100644 --- a/src/tools/action_parse/main.cpp +++ b/src/tools/action_parse/main.cpp @@ -17,11 +17,11 @@ #include #include -#include +#include Sapphire::Data::ExdDataGenerated g_exdData; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; using namespace Sapphire; diff --git a/src/tools/event_object_parser/main.cpp b/src/tools/event_object_parser/main.cpp index 3e726a44..8d86dbb7 100644 --- a/src/tools/event_object_parser/main.cpp +++ b/src/tools/event_object_parser/main.cpp @@ -26,14 +26,14 @@ #include #include -#include +#include 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; diff --git a/src/tools/exd_struct_gen/main.cpp b/src/tools/exd_struct_gen/main.cpp index 1fbcb042..7526a231 100644 --- a/src/tools/exd_struct_gen/main.cpp +++ b/src/tools/exd_struct_gen/main.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include @@ -22,7 +22,7 @@ using namespace Sapphire; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; Sapphire::Data::ExdDataGenerated g_exdData; bool skipUnmapped = true; diff --git a/src/tools/exd_struct_test/main.cpp b/src/tools/exd_struct_test/main.cpp index 88ad0d46..e2beba0e 100644 --- a/src/tools/exd_struct_test/main.cpp +++ b/src/tools/exd_struct_test/main.cpp @@ -22,7 +22,7 @@ #include -#include +#include 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" ); diff --git a/src/tools/mob_parse/main.cpp b/src/tools/mob_parse/main.cpp index e8598da0..7ed1966d 100644 --- a/src/tools/mob_parse/main.cpp +++ b/src/tools/mob_parse/main.cpp @@ -13,9 +13,9 @@ #include #include -#include +#include -namespace filesys = std::experimental::filesystem; +namespace fs = std::filesystem; #include #include @@ -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 ) diff --git a/src/tools/nav_export/nav/TiledNavmeshGenerator.cpp b/src/tools/nav_export/nav/TiledNavmeshGenerator.cpp index 0204910f..ad16bc21 100644 --- a/src/tools/nav_export/nav/TiledNavmeshGenerator.cpp +++ b/src/tools/nav_export/nav/TiledNavmeshGenerator.cpp @@ -1,11 +1,11 @@ #include "TiledNavmeshGenerator.h" -#include +#include #include #include -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; inline unsigned int nextPow2( uint32_t v ) diff --git a/src/tools/nav_export/navmesh_exporter.h b/src/tools/nav_export/navmesh_exporter.h index 6035b552..642c404b 100644 --- a/src/tools/nav_export/navmesh_exporter.h +++ b/src/tools/nav_export/navmesh_exporter.h @@ -12,9 +12,9 @@ #include "obj_exporter.h" #include "nav/TiledNavmeshGenerator.h" -#include +#include -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; diff --git a/src/tools/nav_export/obj_exporter.h b/src/tools/nav_export/obj_exporter.h index b01ad970..fc7ddc99 100644 --- a/src/tools/nav_export/obj_exporter.h +++ b/src/tools/nav_export/obj_exporter.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include @@ -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 ""; diff --git a/src/tools/pcb_reader/nav/TiledNavmeshGenerator.cpp b/src/tools/pcb_reader/nav/TiledNavmeshGenerator.cpp index c4423177..40b4ba62 100644 --- a/src/tools/pcb_reader/nav/TiledNavmeshGenerator.cpp +++ b/src/tools/pcb_reader/nav/TiledNavmeshGenerator.cpp @@ -1,11 +1,11 @@ #include "TiledNavmeshGenerator.h" -#include +#include #include #include -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; inline unsigned int nextPow2( uint32_t v ) diff --git a/src/tools/pcb_reader/navmesh_exporter.h b/src/tools/pcb_reader/navmesh_exporter.h index 29e4cecd..ba890727 100644 --- a/src/tools/pcb_reader/navmesh_exporter.h +++ b/src/tools/pcb_reader/navmesh_exporter.h @@ -12,9 +12,9 @@ #include "obj_exporter.h" #include "nav/TiledNavmeshGenerator.h" -#include +#include -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 + "/"; diff --git a/src/tools/pcb_reader/obj_exporter.h b/src/tools/pcb_reader/obj_exporter.h index b01ad970..fc7ddc99 100644 --- a/src/tools/pcb_reader/obj_exporter.h +++ b/src/tools/pcb_reader/obj_exporter.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include @@ -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 ""; diff --git a/src/tools/quest_parser/main.cpp b/src/tools/quest_parser/main.cpp index 0fa1a6f2..06d48373 100644 --- a/src/tools/quest_parser/main.cpp +++ b/src/tools/quest_parser/main.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include @@ -21,7 +21,7 @@ #include Sapphire::Data::ExdDataGenerated g_exdDataGen; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; using namespace Sapphire; const std::string onTalkStr( diff --git a/src/tools/questbattle_bruteforce/main.cpp b/src/tools/questbattle_bruteforce/main.cpp index 37ecd51d..7aa34fbd 100644 --- a/src/tools/questbattle_bruteforce/main.cpp +++ b/src/tools/questbattle_bruteforce/main.cpp @@ -18,7 +18,7 @@ #include -#include +#include 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" ); diff --git a/src/world/Navi/NaviProvider.cpp b/src/world/Navi/NaviProvider.cpp index 433a2408..fc05f9bf 100644 --- a/src/world/Navi/NaviProvider.cpp +++ b/src/world/Navi/NaviProvider.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include 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; diff --git a/src/world/Script/ScriptLoader.cpp b/src/world/Script/ScriptLoader.cpp index ab72f61f..ace591a8 100644 --- a/src/world/Script/ScriptLoader.cpp +++ b/src/world/Script/ScriptLoader.cpp @@ -5,11 +5,11 @@ #include #include "ServerMgr.h" -#include +#include #include "Framework.h" -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; const std::string Sapphire::Scripting::ScriptLoader::getModuleExtension() { diff --git a/src/world/Script/ScriptMgr.cpp b/src/world/Script/ScriptMgr.cpp index 6557b326..fc0a7736 100644 --- a/src/world/Script/ScriptMgr.cpp +++ b/src/world/Script/ScriptMgr.cpp @@ -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 ), diff --git a/src/world/Session.cpp b/src/world/Session.cpp index b1e2c615..273d20d0 100644 --- a/src/world/Session.cpp +++ b/src/world/Session.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -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 ),