Skip to content

Commit

Permalink
Fix android build using hardcoded path for data instead of using the …
Browse files Browse the repository at this point in the history
…one fetched by android api on init.

Fix android missing version information
  • Loading branch information
sapier authored and sapier committed Oct 1, 2014
1 parent 47abe25 commit b37bff7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/config.h
Expand Up @@ -74,5 +74,10 @@
#define VERSION_EXTRA_STRING CMAKE_VERSION_EXTRA_STRING
#endif

#ifdef __ANDROID__
#include "android_version.h"
#define VERSION_STRING CMAKE_VERSION_STRING
#endif

#endif

4 changes: 1 addition & 3 deletions src/porting.cpp
Expand Up @@ -480,7 +480,7 @@ void initializePaths()
bindir + DIR_DELIM + ".." + DIR_DELIM + "share" + DIR_DELIM + PROJECT_NAME);
trylist.push_back(bindir + DIR_DELIM + "..");
#ifdef __ANDROID__
trylist.push_back(DIR_DELIM "sdcard" DIR_DELIM PROJECT_NAME);
trylist.push_back(path_user);
#endif

for(std::list<std::string>::const_iterator i = trylist.begin();
Expand All @@ -502,8 +502,6 @@ void initializePaths()
}
#ifndef __ANDROID__
path_user = std::string(getenv("HOME")) + DIR_DELIM + "." + PROJECT_NAME;
#else
path_user = std::string(DIR_DELIM "sdcard" DIR_DELIM PROJECT_NAME DIR_DELIM);
#endif

/*
Expand Down

0 comments on commit b37bff7

Please sign in to comment.