private async Task EnableKeyboards(OneClickMeta meta, string tag)
        {
            Log.Debug("Enabling keyboards");

            var lang = meta.Languages.Find(lang => string.Equals(lang.Tag, tag));

            if (lang == null)
            {
                throw new Exception("No matching language found in meta.");
            }

            string kbdiFile;

            if (Environment.Is64BitOperatingSystem)
            {
                kbdiFile = System.IO.Path.Join(Directory.GetCurrentDirectory(), "kbdi-x64.exe");
            }
            else
            {
                kbdiFile = System.IO.Path.Join(Directory.GetCurrentDirectory(), "kbdi.exe");
            }

            var regionCode = RegionInfo.CurrentRegion.TwoLetterISORegionName;

            var regionLayouts = lang.Layouts.Filter(layout => {
                var parts = layout.Name.Split("-");

                if (parts.Length != 3)
                {
                    return(false);
                }

                var layoutRegion = parts[2];

                return(layoutRegion.Equals(regionCode));
            }).ToList();

            if (regionLayouts.Count > 0)
            {
                foreach (var layout in regionLayouts)
                {
                    await App.RunProcess(kbdiFile, $"keyboard_enable -g \"{{{layout.Uuid}}}\" -t {layout.Name}",
                                         cancellationToken.Token);
                }
            }
            else
            {
                foreach (var layout in lang.Layouts)
                {
                    await App.RunProcess(kbdiFile, $"keyboard_enable -g \"{{{layout.Uuid}}}\" -t {layout.Name}",
                                         cancellationToken.Token);
                }
            }
        }
        private async Task InstallDivvunInstaller(OneClickMeta meta, WebClient client)
        {
            Log.Debug("Installing Divvun Manager");
            SetProgress(Strings.DownloadingDivvunInstaller, 0, 1);
            client.DownloadProgressChanged += Client_DownloadProgressChanged;
            var tmpFile = System.IO.Path.GetTempFileName();
            await client.DownloadFileTaskAsync(meta.InstallerUrl, tmpFile);

            client.DownloadProgressChanged -= Client_DownloadProgressChanged;
            SetProgress(Strings.PreparingInstaller, 0, 0, true);
            Log.Debug($"Downloaded to {tmpFile}");

            var exeFile =
                $"{System.IO.Path.GetDirectoryName(tmpFile)}\\{System.IO.Path.GetFileNameWithoutExtension(tmpFile)}.exe";

            File.Move(tmpFile, exeFile);
            Log.Debug($"Renamed to executable: {exeFile}");

            Log.Debug("Running installer silently");
            await App.RunProcess(exeFile, "/VERYSILENT", cancellationToken.Token);

            Log.Debug("Done installing.");
        }