1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Merge pull request #50 from xyzz/android-build-fix

Looks like it can't break anything, feel free to sumbit Android pacthes since you have direct access ;)
This commit is contained in:
DjWarmonger
2014-11-02 15:59:30 +01:00
3 changed files with 8 additions and 4 deletions

View File

@@ -137,7 +137,9 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size.");
#include <boost/format.hpp>
#include <boost/functional/hash.hpp>
#include <boost/lexical_cast.hpp>
#ifndef VCMI_ANDROID
#include <boost/locale/generator.hpp>
#endif
#include <boost/logic/tribool.hpp>
#include <boost/optional.hpp>
#include <boost/program_options.hpp>

View File

@@ -194,6 +194,10 @@ int SDL_main(int argc, char *argv[])
int main(int argc, char** argv)
#endif
{
#ifdef VCMI_ANDROID
// boost will crash without this
setenv("LANG", "C", 1);
#endif
#ifdef VCMI_APPLE
// Correct working dir executable folder (not bundle folder) so we can use executable relative paths
std::string executablePath = argv[0];
@@ -286,10 +290,6 @@ int main(int argc, char** argv)
logGlobal->infoStream() << "Creating console and configuring logger: " << pomtime.getDiff();
logGlobal->infoStream() << "The log file will be saved to " << logPath;
#ifdef VCMI_ANDROID
// boost will crash without this
setenv("LANG", "C", 1);
#endif
// Init filesystem and settings
preinitDLL(::console);
settings.init();

View File

@@ -573,7 +573,9 @@ namespace VCMIDirs
static bool initialized = false;
if (!initialized)
{
#ifndef VCMI_ANDROID
std::locale::global(boost::locale::generator().generate("en_US.UTF-8"));
#endif
boost::filesystem::path::imbue(std::locale());
singleton.init();