debugging help, fastter loading(?) and android sdcard
This commit is contained in:
		
							parent
							
								
									81964cb708
								
							
						
					
					
						commit
						ae60825b29
					
				@ -1,7 +1,7 @@
 | 
				
			|||||||
<?xml version="1.0"?>
 | 
					<?xml version="1.0"?>
 | 
				
			||||||
<manifest package="com.aceattorneyonline.android" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.5.0" android:versionCode="2" android:installLocation="auto">
 | 
					<manifest package="com.aceattorneyonline.ao2" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.5.0" android:versionCode="2" android:installLocation="auto">
 | 
				
			||||||
    <application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Attorney Online" android:icon="@drawable/icon">
 | 
					    <application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Attorney Online 2" android:icon="@drawable/icon">
 | 
				
			||||||
        <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="Attorney Online Lobby" android:screenOrientation="unspecified" android:launchMode="singleTop">
 | 
					        <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="Attorney Online 2 Lobby" android:screenOrientation="unspecified" android:launchMode="singleTop">
 | 
				
			||||||
            <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"/>
 | 
				
			||||||
@ -11,7 +11,7 @@
 | 
				
			|||||||
            <!-- meta-data android:name="android.app.arguments" android:value="arg1 arg2 arg3"/ -->
 | 
					            <!-- meta-data android:name="android.app.arguments" android:value="arg1 arg2 arg3"/ -->
 | 
				
			||||||
            <!-- Application arguments -->
 | 
					            <!-- Application arguments -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <meta-data android:name="android.app.lib_name" android:value="Attorney_Online_remake"/>
 | 
					            <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
 | 
				
			||||||
            <meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
 | 
					            <meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
 | 
				
			||||||
            <meta-data android:name="android.app.repository" android:value="default"/>
 | 
					            <meta-data android:name="android.app.repository" android:value="default"/>
 | 
				
			||||||
            <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
 | 
					            <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
 | 
				
			||||||
@ -63,12 +63,12 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    </application>
 | 
					    </application>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16"/>
 | 
					    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23"/>
 | 
				
			||||||
    <supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
 | 
					    <supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
 | 
					    <!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
 | 
				
			||||||
         Remove the comment if you do not require these default permissions. -->
 | 
					         Remove the comment if you do not require these default permissions. -->
 | 
				
			||||||
    <!-- %%INSERT_PERMISSIONS -->
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
 | 
					    <!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
 | 
				
			||||||
         Remove the comment if you do not require these default features. -->
 | 
					         Remove the comment if you do not require these default features. -->
 | 
				
			||||||
 | 
				
			|||||||
@ -3,22 +3,32 @@
 | 
				
			|||||||
#include "file_functions.h"
 | 
					#include "file_functions.h"
 | 
				
			||||||
#include <QDir>
 | 
					#include <QDir>
 | 
				
			||||||
#include <QDebug>
 | 
					#include <QDebug>
 | 
				
			||||||
 | 
					#include <QStandardPaths>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef BASE_OVERRIDE
 | 
					#ifdef BASE_OVERRIDE
 | 
				
			||||||
#include "base_override.h"
 | 
					#include "base_override.h"
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					QString base_path = "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QString AOApplication::get_base_path()
 | 
					QString AOApplication::get_base_path()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (base_path == "")
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
#ifdef BASE_OVERRIDE
 | 
					#ifdef BASE_OVERRIDE
 | 
				
			||||||
  return base_override;
 | 
					  base_path = base_override;
 | 
				
			||||||
#elif defined(ANDROID)
 | 
					#elif defined(ANDROID)
 | 
				
			||||||
  return "/storage/extSdCard/AO2/";
 | 
					        QString sdcard_storage = getenv("SECONDARY_STORAGE");
 | 
				
			||||||
 | 
					        if (dir_exists(sdcard_storage)){
 | 
				
			||||||
 | 
					            base_path = sdcard_storage + "/AO2/";
 | 
				
			||||||
 | 
					        }else{
 | 
				
			||||||
 | 
					            QString external_storage = getenv("EXTERNAL_STORAGE");
 | 
				
			||||||
 | 
					            base_path = external_storage + "/AO2/";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
  return QDir::currentPath() + "/base/";
 | 
					  base_path = QDir::currentPath() + "/base/";
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					    return base_path;
 | 
				
			||||||
  /*
 | 
					  /*
 | 
				
			||||||
#ifdef OMNI_DEBUG
 | 
					#ifdef OMNI_DEBUG
 | 
				
			||||||
  return "/media/omnitroid/Data/winshare/AO/client/base/";
 | 
					  return "/media/omnitroid/Data/winshare/AO/client/base/";
 | 
				
			||||||
 | 
				
			|||||||
@ -152,8 +152,10 @@ QString AOApplication::read_design_ini(QString p_identifier, QString p_design_pa
 | 
				
			|||||||
  design_ini.setFileName(p_design_path);
 | 
					  design_ini.setFileName(p_design_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!design_ini.open(QIODevice::ReadOnly))
 | 
					  if (!design_ini.open(QIODevice::ReadOnly))
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					      qDebug() << "Could not find design ini " + p_design_path;
 | 
				
			||||||
    return "";
 | 
					    return "";
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  QTextStream in(&design_ini);
 | 
					  QTextStream in(&design_ini);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  QString result = "";
 | 
					  QString result = "";
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user