mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
update readme and start removing boost from tools
This commit is contained in:
parent
e650117e29
commit
ffb0b31663
2 changed files with 29 additions and 25 deletions
|
@ -1,8 +1,10 @@
|
|||
# Sapphire - FINAL FANTASY XIV Server Emulator
|
||||

|
||||
|
||||
[](https://discord.gg/xxcdCER)
|
||||
[](https://travis-ci.org/SapphireMordred/Sapphire)
|
||||
[](https://ci.appveyor.com/project/SapphireMordred/Sapphire)
|
||||

|
||||
|
||||
|
||||
Sapphire is a FINAL FANTASY XIV 4.0+ Server Emulator currently in development.
|
||||
|
||||
|
@ -13,8 +15,7 @@ Sapphire requires the following software:
|
|||
|
||||
| *Name* | *Windows* | *Linux* |
|
||||
| ------ | --------- | ------- |
|
||||
| CMake 3.0.2+ and C++14 capable compiler | [Visual Studio 2017](https://www.visualstudio.com/) | `gcc 4.9` and `g++ 4.9` or newer |
|
||||
| Boost 1.63.0 | [Win32 precompiled binaries](https://sourceforge.net/projects/boost/files/boost-binaries/1.63.0/boost_1_63_0-msvc-14.0-32.exe/download) | Boost libraries from your distribution's package manager |
|
||||
| CMake 3.0.2+ and C++17 capable compiler | [Visual Studio 2017](https://www.visualstudio.com/) | `gcc 7` and `g++ 7` 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.
|
||||
|
|
|
@ -9,27 +9,19 @@
|
|||
#include <iostream>
|
||||
#include <cctype>
|
||||
#include <set>
|
||||
#include <Exd/ExdData.h>
|
||||
#include <Exd/ExdDataGenerated.h>
|
||||
#include <Logging/Logger.h>
|
||||
#include <boost/range/algorithm/remove_if.hpp>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/property_tree/json_parser.hpp>
|
||||
#include <boost/property_tree/xml_parser.hpp>
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include <fstream>
|
||||
#include <streambuf>
|
||||
#include <regex>
|
||||
#include <boost/archive/iterators/ostream_iterator.hpp>
|
||||
|
||||
|
||||
|
||||
Core::Logger g_log;
|
||||
Core::Data::ExdData g_exdData;
|
||||
Core::Data::ExdDataGenerated g_exdData;
|
||||
bool skipUnmapped = true;
|
||||
|
||||
std::map< char, std::string > numberToStringMap
|
||||
|
@ -69,7 +61,7 @@ std::string generateIdListDecl( const std::string& exd )
|
|||
|
||||
std::string generateDirectGetters( const std::string& exd )
|
||||
{
|
||||
return " using " + exd + "Ptr = boost::shared_ptr< " + exd + " >;\n";
|
||||
return " using " + exd + "Ptr = std::shared_ptr< " + exd + " >;\n";
|
||||
}
|
||||
|
||||
std::string generateIdListGetter( const std::string& exd )
|
||||
|
@ -119,9 +111,20 @@ std::string generateStruct( const std::string& exd )
|
|||
|
||||
int count = 0;
|
||||
|
||||
using boost::property_tree::ptree;
|
||||
ptree m_propTree;
|
||||
boost::property_tree::read_json( "ex.json", m_propTree );
|
||||
|
||||
auto json = nlohmann::json();
|
||||
|
||||
std::istream exJson( "ex.json" );
|
||||
exJson >> json;
|
||||
|
||||
for( auto& sheet : json["sheets"] )
|
||||
{
|
||||
std::string name = json["sheet"];
|
||||
if( name != exd )
|
||||
continue;
|
||||
|
||||
|
||||
}
|
||||
|
||||
BOOST_FOREACH( boost::property_tree::ptree::value_type& sheet, m_propTree.get_child( "sheets" ) )
|
||||
{
|
||||
|
@ -208,7 +211,7 @@ std::string generateStruct( const std::string& exd )
|
|||
fieldName = indexToNameMap[ count ];
|
||||
}
|
||||
fieldName[ 0 ] = std::tolower( fieldName[ 0 ] );
|
||||
fieldName.erase( boost::remove_if( fieldName, boost::is_any_of( ",-':![](){}<>% \x02\x1f\x01\x03" ) ),
|
||||
fieldName.erase( std::remove_if( fieldName, std::is_any_of( ",-':![](){}<>% \x02\x1f\x01\x03" ) ),
|
||||
fieldName.end() );
|
||||
|
||||
for( auto entry : numberToStringMap )
|
||||
|
@ -229,7 +232,7 @@ std::string generateStruct( const std::string& exd )
|
|||
indexToNameMap[ count ] = fieldName;
|
||||
indexToTypeMap[ count ] = type;
|
||||
if( indexToTarget.find( count ) != indexToTarget.end() )
|
||||
result += " boost::shared_ptr< " + indexToTarget[ count ] + "> " + fieldName + ";\n";
|
||||
result += " std::shared_ptr< " + indexToTarget[ count ] + "> " + fieldName + ";\n";
|
||||
else
|
||||
{
|
||||
if( indexIsArrayMap.find( count ) != indexIsArrayMap.end() )
|
||||
|
@ -272,7 +275,7 @@ std::string generateConstructorsDecl( const std::string& exd )
|
|||
continue;
|
||||
}
|
||||
if( indexToTarget.find( count ) != indexToTarget.end() )
|
||||
result += indent + indexToNameMap[ count ] + " = boost::make_shared< " + indexToTarget[ count ] +
|
||||
result += indent + indexToNameMap[ count ] + " = std::make_shared< " + indexToTarget[ count ] +
|
||||
">( exdData->getField< " +
|
||||
indexToTypeMap[ count ] + " >( row, " + std::to_string( count ) + " ), exdData );\n";
|
||||
else
|
||||
|
@ -382,11 +385,11 @@ int main( int argc, char** argv )
|
|||
|
||||
getterDecl +=
|
||||
"\n template< class T >\n"
|
||||
" boost::shared_ptr< T > get( uint32_t id )\n"
|
||||
" std::shared_ptr< T > get( uint32_t id )\n"
|
||||
" {\n"
|
||||
" try\n"
|
||||
" {\n"
|
||||
" auto info = boost::make_shared< T >( id, this );\n"
|
||||
" auto info = std::make_shared< T >( id, this );\n"
|
||||
" return info;\n"
|
||||
" }\n"
|
||||
" catch( ... )\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue