update: 更新 Android 打包参数
parent
68a14a4ae5
commit
97d472beaa
|
|
@ -28,6 +28,10 @@ namespace Guru.Editor
|
|||
public int AndroidTargetVersion = 0; // Android SDK 版本设置 ( GooglePlay 发布专用 )
|
||||
public bool AndroidUseMinify = false; // 是否开启 Android 的代码混淆和保护文件
|
||||
public bool DebugWithMono = true; // 是否使用 Mono 编译项目 ( Android Debug包专用 )
|
||||
public string AndroidKeystorePath = ""; // Android KeyStore 文件名
|
||||
public string AndroidKeystorePass = ""; // Android KeyStore 文件名
|
||||
public string AndroidAlias = ""; // Android KeyStore 文件名
|
||||
public string AndroidAliasPass = ""; // Android KeyStore 文件名
|
||||
//------------ iOS ----------------
|
||||
public string IOSTargetVersion = ""; // IOS SDK 版本设置 ( iOS 发布专用 )
|
||||
public string IOSTeamId = ""; // IOS 打包 TeamId ( iOS 使用专用的开发证书后开启 )
|
||||
|
|
|
|||
|
|
@ -17,9 +17,12 @@ namespace Guru.Editor
|
|||
public static int AndroidTargetSdkVersion = 33;
|
||||
public static string IOSTargetOSVersion = "13.0";
|
||||
public static string GuruIOSTeamId = "39253T242A";
|
||||
public static string KeystoreName => $"guru_key.jks";
|
||||
public static string KeystorePath => Application.dataPath + $"/Plugins/Android/{KeystoreName}";
|
||||
public static string ProguardName => $"proguard-user.txt";
|
||||
public static string GuruKeystoreName => "guru_key.jks";
|
||||
public static string GuruKeystorePass => "guru0622";
|
||||
public static string GuruAliasName => "guru";
|
||||
public static string GuruAliasPass => "guru0622";
|
||||
public static string GuruKeystorePath => Application.dataPath + $"/Plugins/Android/{GuruKeystoreName}";
|
||||
public static string ProguardName => "proguard-user.txt";
|
||||
public static string ProguardPath => Application.dataPath + $"/Plugins/Android/{ProguardName}";
|
||||
public static string OutputDirName => "BuildOutput";
|
||||
|
||||
|
|
@ -95,10 +98,19 @@ namespace Guru.Editor
|
|||
{
|
||||
// ---- 使用 Guru 专用的 KeyStore ----
|
||||
PlayerSettings.Android.useCustomKeystore = true;
|
||||
PlayerSettings.Android.keystoreName = KeystorePath;
|
||||
PlayerSettings.Android.keystorePass = "guru0622";
|
||||
PlayerSettings.Android.keyaliasName = "guru";
|
||||
PlayerSettings.Android.keyaliasPass = "guru0622";
|
||||
PlayerSettings.Android.keystoreName = GuruKeystorePath;
|
||||
PlayerSettings.Android.keystorePass = GuruKeystorePass;
|
||||
PlayerSettings.Android.keyaliasName = GuruAliasName;
|
||||
PlayerSettings.Android.keyaliasPass = GuruAliasPass;
|
||||
}
|
||||
else if(!string.IsNullOrEmpty(buildParam.AndroidKeystorePath))
|
||||
{
|
||||
// ---- 使用 Custom 的 KeyStore ----
|
||||
PlayerSettings.Android.useCustomKeystore = true;
|
||||
PlayerSettings.Android.keystoreName = buildParam.AndroidKeystorePath;
|
||||
PlayerSettings.Android.keystorePass = buildParam.AndroidKeystorePass;
|
||||
PlayerSettings.Android.keyaliasName = buildParam.AndroidAlias;
|
||||
PlayerSettings.Android.keyaliasPass = buildParam.AndroidAliasPass;
|
||||
}
|
||||
|
||||
PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARMv7 | AndroidArchitecture.ARM64; //只构建 armv7 和 arm64
|
||||
|
|
@ -136,8 +148,8 @@ namespace Guru.Editor
|
|||
private static bool DeployAndroidKeystore()
|
||||
{
|
||||
var dir = GetWorkingDir();
|
||||
var from = $"{dir}/{KeystoreName}";
|
||||
var to = KeystorePath;
|
||||
var from = $"{dir}/{GuruKeystoreName}";
|
||||
var to = GuruKeystorePath;
|
||||
|
||||
if (File.Exists(to)) return true;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue