Skip to content

Commit

Permalink
Add MacOS support for Travis-CI (ihhub#6)
Browse files Browse the repository at this point in the history
close ihhub#2
  • Loading branch information
ihhub authored and taeber committed Apr 24, 2020
1 parent 408f007 commit 099d1aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ matrix:
- sudo apt-get install -y libsdl-ttf2.0-dev
- sudo apt-get install -y libsdl-mixer1.2-dev
- sudo apt-get install -y libsdl-image1.2-dev
- os: osx
before_install:
- brew install sdl
- brew install sdl_ttf
- brew install sdl_mixer
- brew install sdl_image
- brew install gettext
- export PATH="/usr/local/opt/gettext/bin:$PATH"

script:
- |
Expand Down
4 changes: 2 additions & 2 deletions src/engine/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ int System::SetEnvironment(const char* name, const char* value)

void System::SetLocale(int category, const char* locale)
{
#if defined(ANDROID)
#if defined(ANDROID) || defined(__APPLE__)
setlocale(category, locale);
#else
std::setlocale(category, locale);
Expand All @@ -238,7 +238,7 @@ std::string System::GetMessageLocale(int length /* 1, 2, 3 */)
std::string locname;
#if defined(__MINGW32CE__) || defined(__MINGW32__)
char* clocale = std::setlocale(LC_MONETARY, NULL);
#elif defined(ANDROID)
#elif defined(ANDROID) || defined(__APPLE__)
char* clocale = setlocale(LC_MESSAGES, NULL);
#else
char* clocale = std::setlocale(LC_MESSAGES, NULL);
Expand Down

0 comments on commit 099d1aa

Please sign in to comment.