Beispiel #1
0
        public bool Run()
        {
            var newConfig = InstallationValidator.VerifyInstallation(_fs, _configLoader.GetCurrentConfig(), _progress);
            var failed    = false;

            if (newConfig.JavaJdkDirectory.HasValue == false)
            {
                failed = true;
                _progress.Report(new InstallerMessage("Failed to find JDK."));
            }

            if (newConfig.AndroidSdkDirectory.HasValue == false)
            {
                failed = true;
                _progress.Report(new InstallerMessage("Failed to find Android SDK."));
            }

            if (newConfig.AndroidNdkDirectory.HasValue == false)
            {
                failed = true;
                _progress.Report(new InstallerMessage("Failed to find NDK."));
            }

            if (newConfig.HaveAllSdkPackages == false)
            {
                failed = true;
                _progress.Report(new InstallerMessage("Failed to find one or more Android SDK packages."));
            }

            return(failed == false);
        }
Beispiel #2
0
        public void Run(InstallOptions opts)
        {
            BackwardCompatibility.RemoveOldConfigFileIfItExists(_fs);
            var config = InstallationValidator.VerifyInstallation(_fs, _configLoader.GetCurrentConfig(), _progress);

            try
            {
                Install(config, opts);
            }
            finally
            {
                // Save config
                _configLoader.Save(config);
            }
        }