Merge branch 'master' into matrix
@@ -57,7 +57,7 @@ install:
|
|||||||
tar --absolute-names -jxf android-ndk-r9-linux-x86_64.tar.bz2 &&
|
tar --absolute-names -jxf android-ndk-r9-linux-x86_64.tar.bz2 &&
|
||||||
tar -zxf android-sdk_r24.3.4-linux.tgz &&
|
tar -zxf android-sdk_r24.3.4-linux.tgz &&
|
||||||
$ANDROID list sdk --extended -a &&
|
$ANDROID list sdk --extended -a &&
|
||||||
echo yes | $ANDROID update sdk -a -t tools,platform-tools,build-tools-23.0.1,android-10 --no-ui --force --no-https;
|
echo yes | $ANDROID update sdk -a -t tools,platform-tools,build-tools-23.0.1,android-23 --no-ui --force --no-https;
|
||||||
fi
|
fi
|
||||||
- sudo python -m easy_install --upgrade pyOpenSSL
|
- sudo python -m easy_install --upgrade pyOpenSSL
|
||||||
- sudo pip install pyjavaproperties
|
- sudo pip install pyjavaproperties
|
||||||
|
|||||||
@@ -474,7 +474,7 @@
|
|||||||
|
|
||||||
#ifndef PNG_VERSION_INFO_ONLY
|
#ifndef PNG_VERSION_INFO_ONLY
|
||||||
/* include the compression library's header */
|
/* include the compression library's header */
|
||||||
#include "zlib.h"
|
#include "../include/zlib.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* include all user configurable info, including optional assembler routines */
|
/* include all user configurable info, including optional assembler routines */
|
||||||
|
|||||||
@@ -394,6 +394,7 @@ class JGE
|
|||||||
void SetJNIEnv(JNIEnv * env, jclass cls);
|
void SetJNIEnv(JNIEnv * env, jclass cls);
|
||||||
void sendJNICommand(std::string command);
|
void sendJNICommand(std::string command);
|
||||||
std::string getFileSystemLocation();
|
std::string getFileSystemLocation();
|
||||||
|
std::string getFileUserFolderPath();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -131,10 +131,11 @@ JFileSystem::JFileSystem(const string & _userPath, const string & _systemPath)
|
|||||||
systemPath = [[documentsDirectory stringByAppendingString: @"/Res/"] cStringUsingEncoding:1];
|
systemPath = [[documentsDirectory stringByAppendingString: @"/Res/"] cStringUsingEncoding:1];
|
||||||
|
|
||||||
#elif defined (ANDROID)
|
#elif defined (ANDROID)
|
||||||
userPath = JGE::GetInstance()->getFileSystemLocation();
|
userPath = JGE::GetInstance()->getFileUserFolderPath();
|
||||||
systemPath = "";
|
systemPath = JGE::GetInstance()->getFileSystemLocation();
|
||||||
|
|
||||||
DebugTrace("User path " << userPath);
|
DebugTrace("User path " << userPath);
|
||||||
|
DebugTrace("System path " << systemPath);
|
||||||
#elif defined (QT_CONFIG)
|
#elif defined (QT_CONFIG)
|
||||||
|
|
||||||
QDir sysDir(RESDIR);
|
QDir sysDir(RESDIR);
|
||||||
|
|||||||
@@ -668,7 +668,7 @@ string JGE::getFileSystemLocation()
|
|||||||
if (env == NULL)
|
if (env == NULL)
|
||||||
{
|
{
|
||||||
DebugTrace("An Error Occurred in getting the JNI Environment whie trying to get the system folder location. Defaulting to /mnt/sdcard/net.wagic.app/Wagic");
|
DebugTrace("An Error Occurred in getting the JNI Environment whie trying to get the system folder location. Defaulting to /mnt/sdcard/net.wagic.app/Wagic");
|
||||||
return "/mnt/sdcard/Wagic";
|
return "/mnt/sdcard/Wagic/Res";
|
||||||
};
|
};
|
||||||
|
|
||||||
jclass jniClass = env->FindClass("org/libsdl/app/SDLActivity");
|
jclass jniClass = env->FindClass("org/libsdl/app/SDLActivity");
|
||||||
@@ -677,7 +677,36 @@ string JGE::getFileSystemLocation()
|
|||||||
if (methodId == 0)
|
if (methodId == 0)
|
||||||
{
|
{
|
||||||
DebugTrace("An Error Occurred in getting the JNI methodID for getSystemFolderPath. Defaulting to /mnt/sdcard/Wagic");
|
DebugTrace("An Error Occurred in getting the JNI methodID for getSystemFolderPath. Defaulting to /mnt/sdcard/Wagic");
|
||||||
return "/mnt/sdcard/Wagic";
|
return "/mnt/sdcard/Wagic/Res";
|
||||||
|
};
|
||||||
|
|
||||||
|
jstring systemPath = (jstring) env->CallStaticObjectMethod(jniClass, methodId);
|
||||||
|
|
||||||
|
// Now convert the Java String to C++ char array
|
||||||
|
const char* cstr = env->GetStringUTFChars(systemPath, 0);
|
||||||
|
string retVal (cstr);
|
||||||
|
env->ReleaseStringUTFChars(systemPath, cstr);
|
||||||
|
env->DeleteLocalRef(systemPath);
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
string JGE::getFileUserFolderPath()
|
||||||
|
{
|
||||||
|
JNIEnv * env = getJNIEnv();
|
||||||
|
if (env == NULL)
|
||||||
|
{
|
||||||
|
DebugTrace("An Error Occurred in getting the JNI Environment whie trying to get the system folder location. Defaulting to /mnt/sdcard/net.wagic.app/Wagic");
|
||||||
|
return "/mnt/sdcard/Wagic/User";
|
||||||
|
};
|
||||||
|
|
||||||
|
jclass jniClass = env->FindClass("org/libsdl/app/SDLActivity");
|
||||||
|
jmethodID methodId = env->GetStaticMethodID( jniClass, "getUserFolderPath", "()Ljava/lang/String;");
|
||||||
|
|
||||||
|
if (methodId == 0)
|
||||||
|
{
|
||||||
|
DebugTrace("An Error Occurred in getting the JNI methodID for getSystemFolderPath. Defaulting to /mnt/sdcard/Wagic");
|
||||||
|
return "/mnt/sdcard/Wagic/User";
|
||||||
};
|
};
|
||||||
|
|
||||||
jstring systemPath = (jstring) env->CallStaticObjectMethod(jniClass, methodId);
|
jstring systemPath = (jstring) env->CallStaticObjectMethod(jniClass, methodId);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="0201" android:versionName="@string/app_version" package="net.wagic.app">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="0211" android:installLocation="preferExternal" android:versionName="@string/app_version" package="net.wagic.app">
|
||||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="10"/>
|
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="13"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -8,4 +8,4 @@
|
|||||||
# project structure.
|
# project structure.
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-10
|
target=android-23
|
||||||
|
|||||||
@@ -11,4 +11,4 @@
|
|||||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-10
|
target=android-23
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Wagic</string>
|
<string name="app_name">Wagic</string>
|
||||||
<string name="app_version">0.20.1</string>
|
<string name="app_version">0.21.1</string>
|
||||||
<string name="info_text">Wagic v0.20.1\\nAll Rights Reserved.</string>
|
<string name="info_text">Wagic v0.21.1\\nAll Rights Reserved.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 159 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 355 B |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 210 B |
|
After Width: | Height: | Size: 235 B |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 146 B |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 426 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 162 B |
|
After Width: | Height: | Size: 310 B |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 58 KiB |