更新 EF-Web-Push-202509021556.unitypackage 修复aar里面的包名
This commit is contained in:
parent
764d9f5f09
commit
5959868867
|
@ -32,8 +32,8 @@ namespace EFSDK
|
||||||
CopyAndRenameFiles(ResDir, TempDir, out Dictionary<string, string> mapping);
|
CopyAndRenameFiles(ResDir, TempDir, out Dictionary<string, string> mapping);
|
||||||
string manifestPath = Path.Combine(TempDir, "AndroidManifest.xml");
|
string manifestPath = Path.Combine(TempDir, "AndroidManifest.xml");
|
||||||
File.WriteAllText(manifestPath,
|
File.WriteAllText(manifestPath,
|
||||||
@"<manifest xmlns:android=""http://schemas.android.com/apk/res/android""
|
@$"<manifest xmlns:android=""http://schemas.android.com/apk/res/android""
|
||||||
package=""com.unity.reswrapper"">
|
package=""com.{GetFirstEightWithUnderscore(GetMD5Hash(Application.identifier + "res"))}"">
|
||||||
<application/>
|
<application/>
|
||||||
</manifest>");
|
</manifest>");
|
||||||
|
|
||||||
|
@ -131,9 +131,10 @@ namespace EFSDK
|
||||||
{
|
{
|
||||||
string ext = Path.GetExtension(filePath);
|
string ext = Path.GetExtension(filePath);
|
||||||
string oriFileName = Path.GetFileNameWithoutExtension(filePath);
|
string oriFileName = Path.GetFileNameWithoutExtension(filePath);
|
||||||
string md5Str = GetFirstEightWithUnderscore(GetMD5Hash(Application.identifier + oriFileName+ oriFileName));
|
string md5Str = GetFirstEightWithUnderscore(GetMD5Hash(Application.identifier + oriFileName + oriFileName));
|
||||||
return md5Str + ext;
|
return md5Str + ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
static string GetFirstEightWithUnderscore(string str)
|
static string GetFirstEightWithUnderscore(string str)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(str)) return str;
|
if (string.IsNullOrEmpty(str)) return str;
|
||||||
|
@ -142,8 +143,10 @@ namespace EFSDK
|
||||||
{
|
{
|
||||||
sub = "a" + sub;
|
sub = "a" + sub;
|
||||||
}
|
}
|
||||||
|
|
||||||
return sub;
|
return sub;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetMD5Hash(string input)
|
public static string GetMD5Hash(string input)
|
||||||
{
|
{
|
||||||
using (var md5 = MD5.Create())
|
using (var md5 = MD5.Create())
|
||||||
|
|
Loading…
Reference in New Issue