Commit 484a29ad authored by 無名の凝泪's avatar 無名の凝泪 Committed by Unicorn369

Update library-release.aar(add libgdiplus) | Only Support Android 5.0+

parent fba9af9e
#APP_BUILD_SCRIPT := Android.mk #APP_BUILD_SCRIPT := Android.mk
APP_PLATFORM :=android-14 APP_PLATFORM :=android-14
APP_ABI := armeabi-v7a x86 APP_ABI := armeabi-v7a
APP_STL := gnustl_static APP_STL := gnustl_static
APP_CPPFLAGS := -Wno-error=format-security -std=gnu++11 -fpermissive -fexceptions APP_CPPFLAGS := -Wno-error=format-security -std=gnu++11 -fpermissive -fexceptions
APP_OPTIM := release APP_OPTIM := release
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4288e383ed17c8c4a93d8d3a1395dafd guid: 4288e383ed17c8c4a93d8d3a1395dafd
folderAsset: yes folderAsset: yes
timeCreated: 1526538476 timeCreated: 1552532408
licenseType: Free licenseType: Free
DefaultImporter: DefaultImporter:
userData: userData:
......
fileFormatVersion: 2
guid: 450e0a9c89bf4a040b26f1fef13f5655
folderAsset: yes
timeCreated: 1445131378
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 53795d48a20b9524180c4bf4481385f1
timeCreated: 1526547438
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: fa9cbdc3a67e5fd4baeb5d0dd3f4cf71
timeCreated: 1445131383
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
...@@ -141,14 +141,16 @@ public class Menu : WindowServantSP ...@@ -141,14 +141,16 @@ public class Menu : WindowServantSP
void onClickDownload() void onClickDownload()
{ {
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows #if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
Application.OpenURL("https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.0.zip"); Application.OpenURL("https://github.com/Unicorn369/pro2_android_closeup/releases/tag/1.0");
#elif UNITY_ANDROID //Android #elif UNITY_ANDROID //Android
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API"); AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
if (!File.Exists("updates/closeup_version1.0.txt")) {//用于检查更新 if (!File.Exists("updates/closeup_version1.1.txt")) {//用于检查更新
if (File.Exists("closeup_version1.0.zip")) {//如果有则直接解压 if (File.Exists("closeup_version1.1.zip")) {//如果有则直接解压
jo.Call("doExtractZipFile", "closeup_version1.0.zip", Program.ANDROID_GAME_PATH); jo.Call("doExtractZipFile", "closeup_version1.1.zip", Program.ANDROID_GAME_PATH);
} else if (File.Exists("updates/closeup_version1.0.txt")){//如果有则下载更新包
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/up_closeup_version1.1.zip");
} else {//否则下载并解压,锁定目录:/ygopro2 } else {//否则下载并解压,锁定目录:/ygopro2
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.0.zip"); jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.1.zip");
} }
} else { } else {
jo.Call("showToast", "已下载,无需再次下载!"); jo.Call("showToast", "已下载,无需再次下载!");
......
...@@ -285,7 +285,7 @@ public class Program : MonoBehaviour ...@@ -285,7 +285,7 @@ public class Program : MonoBehaviour
#elif UNITY_ANDROID //Android #elif UNITY_ANDROID //Android
Screen.sleepTimeout = SleepTimeout.NeverSleep; Screen.sleepTimeout = SleepTimeout.NeverSleep;
if (!File.Exists(ANDROID_GAME_PATH + "updates/version1.0.txt")) if (!File.Exists(ANDROID_GAME_PATH + "updates/version2.0.txt"))
{ {
string filePath = Application.streamingAssetsPath + "/ygopro2.zip"; string filePath = Application.streamingAssetsPath + "/ygopro2.zip";
var www = new WWW(filePath); var www = new WWW(filePath);
...@@ -299,7 +299,7 @@ public class Program : MonoBehaviour ...@@ -299,7 +299,7 @@ public class Program : MonoBehaviour
#elif UNITY_IPHONE //iPhone #elif UNITY_IPHONE //iPhone
string GamePaths = Application.persistentDataPath + "/ygopro2/"; string GamePaths = Application.persistentDataPath + "/ygopro2/";
if (!File.Exists(GamePaths + "updates/version1.0.txt")) if (!File.Exists(GamePaths + "updates/version2.0.txt"))
{ {
string filePath = Application.streamingAssetsPath + "/ygopro2.zip"; string filePath = Application.streamingAssetsPath + "/ygopro2.zip";
var www = new WWW(filePath); var www = new WWW(filePath);
...@@ -382,15 +382,16 @@ public class Program : MonoBehaviour ...@@ -382,15 +382,16 @@ public class Program : MonoBehaviour
#if UNITY_ANDROID //Android Java Test #if UNITY_ANDROID //Android Java Test
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API"); AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
if (!File.Exists("updates/image_version1.0.txt"))//用于检查更新 if (!File.Exists("updates/image_version1.1.txt"))//用于检查更新
{ {
if (File.Exists("pics.zip")) { if (File.Exists("pics.zip")) {
jo.Call("doExtractZipFile", "pics.zip", ANDROID_GAME_PATH); jo.Call("doExtractZipFile", "pics.zip", ANDROID_GAME_PATH);
File.Create("updates/image_version1.0.txt"); File.Copy("updates/version2.0.txt", "updates/image_version1.1.txt", true);
} else if (File.Exists("/storage/emulated/0/ygocore/pics.zip")) {//YGOMobile内置的卡图包 } else if (File.Exists("/storage/emulated/0/ygocore/pics.zip")) {//YGOMobile内置的卡图包
jo.Call("doExtractZipFile", "/storage/emulated/0/ygocore/pics.zip", ANDROID_GAME_PATH); jo.Call("doExtractZipFile", "/storage/emulated/0/ygocore/pics.zip", ANDROID_GAME_PATH);
File.Create("updates/image_version1.0.txt"); File.Copy("updates/version2.0.txt", "updates/image_version1.1.txt", true);
} else { } else {
Application.OpenURL("https://www.taptap.com/app/37972");
jo.Call("showToast", "没有发现卡图包,是否未安装YGOMobile"); jo.Call("showToast", "没有发现卡图包,是否未安装YGOMobile");
} }
} }
......
...@@ -258,7 +258,7 @@ public class GameTextureManager ...@@ -258,7 +258,7 @@ public class GameTextureManager
if (File.Exists("picture/closeup/" + pic.code.ToString() + ".png")) if (File.Exists("picture/closeup/" + pic.code.ToString() + ".png"))
{ {
string path = "picture/closeup/" + pic.code.ToString() + ".png"; string path = "picture/closeup/" + pic.code.ToString() + ".png";
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows #if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android
BitmapHelper bitmap = new BitmapHelper(path); BitmapHelper bitmap = new BitmapHelper(path);
int left; int left;
int right; int right;
...@@ -290,10 +290,11 @@ public class GameTextureManager ...@@ -290,10 +290,11 @@ public class GameTextureManager
caculateK(pic); caculateK(pic);
/* /*
* 以上处理其他平台无法正常使用 * 以上处理iOS平台无法正常使用
* Android已成功编译 libgdiplus.so (https://github.com/Unicorn369/libgdiplus-Android.git)
* 暂时只能直接贴图,以后再处理 * 暂时只能直接贴图,以后再处理
*/ **/
#elif UNITY_ANDROID || UNITY_IPHONE //Android、iPhone #elif UNITY_IPHONE //iPhone
byte[] data; byte[] data;
using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read)) using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read))
{ {
...@@ -593,7 +594,7 @@ public class GameTextureManager ...@@ -593,7 +594,7 @@ public class GameTextureManager
string path = "picture/closeup/" + pic.code.ToString() + ".png"; string path = "picture/closeup/" + pic.code.ToString() + ".png";
if (!File.Exists(path)) if (!File.Exists(path))
{ {
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows #if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android
path = "picture/card/" + pic.code.ToString() + ".png"; path = "picture/card/" + pic.code.ToString() + ".png";
if (!File.Exists(path)) if (!File.Exists(path))
{ {
...@@ -629,10 +630,11 @@ public class GameTextureManager ...@@ -629,10 +630,11 @@ public class GameTextureManager
//pic.autoMade = true; //pic.autoMade = true;
/* /*
* 以上处理其他平台无法正常使用 * 以上处理iOS平台无法正常使用
* Android已成功编译libgdiplus.so (https://github.com/Unicorn369/libgdiplus-Android.git)
* 暂时只能直接贴图,以后再处理 * 暂时只能直接贴图,以后再处理
*/ **/
#elif UNITY_ANDROID || UNITY_IPHONE //Android、iPhone #elif UNITY_IPHONE //iPhone
path = "picture/null.png"; path = "picture/null.png";
byte[] data; byte[] data;
...@@ -647,7 +649,7 @@ public class GameTextureManager ...@@ -647,7 +649,7 @@ public class GameTextureManager
} }
else else
{ {
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows #if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android
BitmapHelper bitmap = new BitmapHelper(path); BitmapHelper bitmap = new BitmapHelper(path);
int left; int left;
int right; int right;
...@@ -701,10 +703,11 @@ public class GameTextureManager ...@@ -701,10 +703,11 @@ public class GameTextureManager
caculateK(pic); caculateK(pic);
/* /*
* 以上处理其他平台无法正常使用 * 以上处理iOS平台无法正常使用
* Android已成功编译libgdiplus.so (https://github.com/Unicorn369/libgdiplus-Android.git)
* 暂时只能直接贴图,以后再处理 * 暂时只能直接贴图,以后再处理
*/ **/
#elif UNITY_ANDROID || UNITY_IPHONE //Android、iPhone #elif UNITY_IPHONE //iPhone
byte[] data; byte[] data;
using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read)) using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read))
{ {
...@@ -805,7 +808,7 @@ public class GameTextureManager ...@@ -805,7 +808,7 @@ public class GameTextureManager
if (!File.Exists(path) && pic.code != 0 && Program.DownloadImage) if (!File.Exists(path) && pic.code != 0 && Program.DownloadImage)
{ {
//YGOMobile (177x254) //YGOMobile (177x254)
df.Download("http://download.ygopro.win/ygopro/pics/" + pic.code.ToString() + ".jpg", "expansions/pics/" + pic.code.ToString() + ".jpg"); df.Download("http://api.ygo2019.xyz/ygopro/pics/" + pic.code.ToString() + ".jpg", "expansions/pics/" + pic.code.ToString() + ".jpg");
path = "expansions/pics/" + pic.code.ToString() + ".jpg"; path = "expansions/pics/" + pic.code.ToString() + ".jpg";
} }
if (!File.Exists(path) && pic.code != 0 && Program.DownloadImage) if (!File.Exists(path) && pic.code != 0 && Program.DownloadImage)
......
...@@ -10,8 +10,8 @@ PlayerSettings: ...@@ -10,8 +10,8 @@ PlayerSettings:
targetDevice: 2 targetDevice: 2
useOnDemandResources: 0 useOnDemandResources: 0
accelerometerFrequency: 60 accelerometerFrequency: 60
companyName: "YGOPro2\uFF08Beta\uFF09" companyName: YGOPro2 (Test)
productName: "YGOPro2\uFF08Beta\uFF09" productName: YGOPro2 (Test)
defaultCursor: {fileID: 0} defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0} cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21176471, a: 1} m_SplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21176471, a: 1}
...@@ -123,7 +123,7 @@ PlayerSettings: ...@@ -123,7 +123,7 @@ PlayerSettings:
16:10: 1 16:10: 1
16:9: 1 16:9: 1
Others: 1 Others: 1
bundleVersion: 1.034.8 bundleVersion: 1.034.8 (Test 2.0)
preloadedAssets: [] preloadedAssets: []
metroInputSource: 0 metroInputSource: 0
m_HolographicPauseOnTrackingLoss: 1 m_HolographicPauseOnTrackingLoss: 1
...@@ -148,8 +148,8 @@ PlayerSettings: ...@@ -148,8 +148,8 @@ PlayerSettings:
tvOS: cn.ygopro2.ygopro2android tvOS: cn.ygopro2.ygopro2android
buildNumber: buildNumber:
iOS: iOS:
AndroidBundleVersionCode: 1 AndroidBundleVersionCode: 2
AndroidMinSdkVersion: 16 AndroidMinSdkVersion: 21
AndroidTargetSdkVersion: 0 AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 0 AndroidPreferredInstallLocation: 0
aotOptions: aotOptions:
...@@ -225,7 +225,7 @@ PlayerSettings: ...@@ -225,7 +225,7 @@ PlayerSettings:
iOSManualSigningProvisioningProfileID: iOSManualSigningProvisioningProfileID:
tvOSManualSigningProvisioningProfileID: tvOSManualSigningProvisioningProfileID:
appleEnableAutomaticSigning: 0 appleEnableAutomaticSigning: 0
AndroidTargetDevice: 0 AndroidTargetDevice: 3
AndroidSplashScreenScale: 0 AndroidSplashScreenScale: 0
androidSplashScreen: {fileID: 0} androidSplashScreen: {fileID: 0}
AndroidKeystoreName: ygopro.jks AndroidKeystoreName: ygopro.jks
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment