2023-12-04 01:36:02 +08:00
|
|
|
|
using MicaSetup.Design.Controls;
|
|
|
|
|
using MicaSetup.Services;
|
|
|
|
|
using MicaSetup.Views;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
|
|
[assembly: Guid("00000000-0000-0000-0000-000000000000")]
|
|
|
|
|
[assembly: AssemblyTitle("BetterGI Uninst")]
|
|
|
|
|
[assembly: AssemblyProduct("BetterGI")]
|
|
|
|
|
[assembly: AssemblyDescription("BetterGI Uninst")]
|
|
|
|
|
[assembly: AssemblyCompany("Lemutec")]
|
|
|
|
|
[assembly: AssemblyCopyright("Under GPL-3.0 license. Copyright (c) better-genshin-impact Contributors.")]
|
|
|
|
|
[assembly: AssemblyVersion("2.0.0.0")]
|
|
|
|
|
[assembly: AssemblyFileVersion("2.0.0.0")]
|
|
|
|
|
|
|
|
|
|
namespace MicaSetup;
|
|
|
|
|
|
|
|
|
|
internal class Program
|
|
|
|
|
{
|
|
|
|
|
[STAThread]
|
|
|
|
|
internal static void Main()
|
|
|
|
|
{
|
|
|
|
|
Hosting.CreateBuilder()
|
|
|
|
|
.UseAsUninst()
|
|
|
|
|
.UseLogger()
|
|
|
|
|
.UseSingleInstance("BetterGI_MicaSetup")
|
|
|
|
|
.UseTempPathFork()
|
|
|
|
|
.UseElevated()
|
|
|
|
|
.UseDpiAware()
|
|
|
|
|
.UseOptions(option =>
|
|
|
|
|
{
|
|
|
|
|
option.IsCreateDesktopShortcut = true;
|
|
|
|
|
option.IsCreateUninst = true;
|
|
|
|
|
option.IsCreateRegistryKeys = true;
|
|
|
|
|
option.IsCreateStartMenu = true;
|
|
|
|
|
option.IsCreateQuickLaunch = false;
|
|
|
|
|
option.IsCreateAsAutoRun = false;
|
|
|
|
|
option.IsUseRegistryPreferX86 = null!;
|
|
|
|
|
option.IsAllowFirewall = true;
|
2023-12-17 14:57:31 +08:00
|
|
|
|
option.IsRefreshExplorer = true;
|
2023-12-04 01:36:02 +08:00
|
|
|
|
option.IsInstallCertificate = false;
|
2025-01-07 11:49:05 +08:00
|
|
|
|
option.ExeName = @"BetterGI.exe";
|
2023-12-04 01:36:02 +08:00
|
|
|
|
option.KeyName = "BetterGI";
|
|
|
|
|
option.DisplayName = "BetterGI";
|
2025-01-07 11:49:05 +08:00
|
|
|
|
option.DisplayIcon = @"BetterGI.exe";
|
2023-12-04 01:36:02 +08:00
|
|
|
|
option.DisplayVersion = "0.0.0.0";
|
|
|
|
|
option.Publisher = "babalae";
|
|
|
|
|
option.AppName = "BetterGI";
|
|
|
|
|
option.SetupName = $"BetterGI {Mui("UninstallProgram")}";
|
|
|
|
|
})
|
|
|
|
|
.UseServices(service =>
|
|
|
|
|
{
|
|
|
|
|
service.AddSingleton<IMuiLanguageService, MuiLanguageService>();
|
|
|
|
|
service.AddScoped<IExplorerService, ExplorerService>();
|
|
|
|
|
})
|
|
|
|
|
.CreateApp()
|
|
|
|
|
.UseMuiLanguage()
|
|
|
|
|
.UseTheme(WindowsTheme.Auto)
|
|
|
|
|
.UsePages(page =>
|
|
|
|
|
{
|
|
|
|
|
page.Add(nameof(MainPage), typeof(MainPage));
|
|
|
|
|
page.Add(nameof(UninstallPage), typeof(UninstallPage));
|
|
|
|
|
page.Add(nameof(FinishPage), typeof(FinishPage));
|
|
|
|
|
})
|
|
|
|
|
.UseDispatcherUnhandledExceptionCatched()
|
|
|
|
|
.UseDomainUnhandledExceptionCatched()
|
|
|
|
|
.UseUnobservedTaskExceptionCatched()
|
|
|
|
|
.RunApp();
|
|
|
|
|
}
|
|
|
|
|
}
|