public static void CreateAndroidKeystore() { if (File.Exists(AndroidKeystoreFile)) { Debug.LogErrorFormat("Android keystore file already exists in '{0}'", AndroidKeystoreFile); } else { Directory.CreateDirectory(AndroidLocation); var data = new AndroidKeystoreData(); string json = JsonUtility.ToJson(data, true); File.WriteAllText(AndroidKeystoreFile, json); Debug.LogFormat("Android keystore kreated in '{0}'", AndroidKeystoreFile); } }
private void buttonGenerate_Click(object sender, EventArgs e) { string errors = String.Join("\n", AndroidUtilities.GetKeystoreErrors(_ks)); if (!string.IsNullOrEmpty(errors)) { string intro = "We found errors that have to be fixed before keystore geneation:"; MessageBox.Show(intro + "\n\n" + errors); return; } if (AndroidUtilities.RunGenerateKeystore(_ks)) { _lastGeneratedKS = _ks.Copy(); buttonOK.Enabled = true; } }
public GenerateAndroidKeystore() { InitializeComponent(); buttonOK.Enabled = false; _ks = new AndroidKeystoreData(); _lastGeneratedKS = null; Response = null; _TbProp = new Dictionary <TextBox, PropertyInfo> { { textboxKeystorePath, typeof(AndroidKeystoreData).GetProperty("KeystorePath") }, { textboxKeystorePassword, typeof(AndroidKeystoreData).GetProperty("Password") }, { textboxKeystoreKeyAlias, typeof(AndroidKeystoreData).GetProperty("KeyAlias") }, { textboxKeystoreKeyPassword, typeof(AndroidKeystoreData).GetProperty("KeyPassword") }, { textboxKeystoreCertCN, typeof(AndroidKeystoreData).GetProperty("FirstAndLastName") }, { textboxKeystoreCertOU, typeof(AndroidKeystoreData).GetProperty("OrganizationalUnit") }, { textboxKeystoreCertO, typeof(AndroidKeystoreData).GetProperty("OrganizationName") }, { textboxKeystoreCertL, typeof(AndroidKeystoreData).GetProperty("CityOrLocality") }, { textboxKeystoreCertST, typeof(AndroidKeystoreData).GetProperty("StateOrProvince") }, { textboxKeystoreCertC, typeof(AndroidKeystoreData).GetProperty("CountryCode") } }; }