예제 #1
0
    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);
        }
    }
예제 #2
0
        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;
            }
        }
예제 #3
0
 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") }
     };
 }