Skip to content

Commit

Permalink
[0.1.0][enhancement][0][增加开发组名称到Android Package Name][android]
Browse files Browse the repository at this point in the history
  • Loading branch information
takashiro committed Jan 6, 2015
1 parent d53ab79 commit b0095d8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.builds
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Notice: Android version is still not fully supported.
Working Directory: %{buildDir}
Click build (Ctrl + B) and you'll get an APK in < YOUR build directory >/android-build/bin, and install the APK manually.

7. Copy the following files and folders from ~ into <one of YOUR SD card>/Android/data/org.qsanguosha
7. Copy the following files and folders from ~ into <one of YOUR SD card>/Android/data/org.mogara.qsanguosha
ai-selector
audio
diy
Expand All @@ -236,4 +236,4 @@ Notice: Android version is still not fully supported.

8. (optional) Add the Chinese language pack.
run lrelease QSanguosha.pro
copy ~/builds/sanguosha.qm and ~/qt_zh_CN.qm into Android/data/org.qsanguosha mentioned in step 7.
copy ~/builds/sanguosha.qm and ~/qt_zh_CN.qm into Android/data/org.mogara.qsanguosha mentioned in step 7.
4 changes: 2 additions & 2 deletions builds/sanguosha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2901,8 +2901,8 @@
</message>
<message>
<location filename="../src/main.cpp" line="116"/>
<source>Game data not found, please download QSanguosha PC version, and put the files and folders into /sdcard/Android/data/org.qsanguosha</source>
<translation>找不到游戏资源,请下载太阳神三国杀PC版,然后将文件放入/sdcard/Android/data/org.qsanguosha</translation>
<source>Game data not found, please download QSanguosha PC version, and put the files and folders into /sdcard/Android/data/org.mogara.qsanguosha</source>
<translation>找不到游戏资源,请下载太阳神三国杀PC版,然后将文件放入/sdcard/Android/data/org.mogara.qsanguosha</translation>
</message>
<message>
<location filename="../src/main.cpp" line="118"/>
Expand Down
2 changes: 1 addition & 1 deletion resource/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<manifest package="org.qsanguosha" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.1.0" android:versionCode="1" android:installLocation="auto">
<manifest package="org.mogara.qsanguosha" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.1.0" android:versionCode="1" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="@string/app_name" android:icon="@drawable/icon">
<activity
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation"
Expand Down
7 changes: 4 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "mainwindow.h"
#include "audio.h"
#include "stylehelper.h"
#include "wifimanager.h"

#ifndef WINDOWS
#include <QDir>
Expand Down Expand Up @@ -97,23 +98,23 @@ int main(int argc, char *argv[]) {
QDir storageDir("/storage");
QStringList sdcards = storageDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
foreach (const QString &sdcard, sdcards) {
QDir root(QString("/storage/%1/Android/data/org.qsanguosha").arg(sdcard));
QDir root(QString("/storage/%1/Android/data/org.mogara.qsanguosha").arg(sdcard));
if (root.exists("lua/config.lua")) {
QDir::setCurrent(root.absolutePath());
found = true;
break;
}
}
if (!found) {
QDir root("/sdcard/Android/data/org.qsanguosha");
QDir root("/sdcard/Android/data/org.mogara.qsanguosha");
if (root.exists("lua/config.lua")) {
QDir::setCurrent(root.absolutePath());
found = true;
}
}

if (!found) {
QString m = QObject::tr("Game data not found, please download QSanguosha PC version, and put the files and folders into /sdcard/Android/data/org.qsanguosha");
QString m = QObject::tr("Game data not found, please download QSanguosha PC version, and put the files and folders into /sdcard/Android/data/org.mogara.qsanguosha");
if (!noGui)
QMessageBox::critical(NULL, QObject::tr("Error"), m);
else
Expand Down

0 comments on commit b0095d8

Please sign in to comment.