using MicaSetup.Helper;
using System.ComponentModel;
namespace MicaSetup;
///
/// Option Context
///
public class Option
{
public static Option Current { get; } = new();
///
/// Indicates whether enable logger
///
[Category("GlobalSetting")]
public bool Logging { get; internal set; } = false;
///
/// Indicates whether App installing
///
[Category("GlobalVariable")]
public bool Installing { get; set; } = false;
///
/// Indicates whether App uninstalling
///
[Category("GlobalVariable")]
public bool Uninstalling { get; set; } = false;
///
/// Indicates whether this assembly as uninst
///
[Category("GlobalSetting")]
public bool IsUninst { get; set; } = false;
///
/// Indicates whether create uninst after app installed
///
[Category("GlobalSetting")]
public bool IsCreateUninst { get; set; } = true;
///
/// Indicates whether to generate Desktop Shortcut
///
[Category("GlobalSetting")]
public bool IsCreateDesktopShortcut { get; set; } = true;
///
/// Indicates whether to generate Registry Keys
///
[Category("GlobalSetting")]
public bool IsCreateRegistryKeys { get; set; } = true;
///
/// Indicates whether to generate StartMenu Shortcut
///
[Category("GlobalSetting")]
public bool IsCreateStartMenu { get; set; } = true;
///
/// Indicates whether to generate StartMenu Shortcut
///
[Category("GlobalSetting")]
public bool IsCreateQuickLaunch { get; set; } = false;
///
/// Indicates whether to generate AutoRun
///
[Category("GlobalSetting")]
public bool IsCreateAsAutoRun { get; set; } = false;
///
/// Indicates whether to show customize option of AutoRun
///
[Category("GlobalSetting")]
public bool IsCustomizeVisiableAutoRun { get; set; } = false;
///
/// Indicates AutoRun CLI
///
[Category("GlobalSetting")]
public string AutoRunLaunchCommand { get; set; } = string.Empty;
///
/// Prefer to provide classic type folder selector
///
[Category("GlobalSetting")]
public bool UseFolderPickerPreferClassic { get; set; } = false;
///
/// Prefer to provide x86 type install path
///
[Category("GlobalSetting")]
public bool UseInstallPathPreferX86 { get; set; } = false;
///
/// Prefer to provide x86 type Registry Key
///
[Category("GlobalSetting")]
public bool? IsUseRegistryPreferX86 { get; set; } = null!;
///
/// Indicates whether to Allow Full Security intall path
///
[Category("GlobalSetting")]
public bool IsAllowFullFolderSecurity { get; set; } = true;
///
/// Indicates whether to Allow Network Firewall
///
[Category("GlobalSetting")]
public bool IsAllowFirewall { get; set; } = true;
///
/// Indicates whether to Refresh Explorer
///
[Category("GlobalSetting")]
public bool IsRefreshExplorer { get; set; } = false;
///
/// Indicates whether to Install Certification file (*.cer)
///
[Category("GlobalSetting")]
public bool IsInstallCertificate { get; set; } = false;
///
/// The file ext filter to remove when overlay install
/// Using just like "exe,dll,pdb"
///
[Category("GlobalSetting")]
public string OverlayInstallRemoveExt { get; set; } = string.Empty;
///
/// The archive file unpacking password
///
[Category("GlobalSetting")]
public string UnpackingPassword { get; set; } = null!;
///
/// Your Product Exe file name
///
[Category("GlobalSetting")]
public string ExeName { get; set; } = null!;
///
/// Indicates whether to uninst and keep my data
///
[Category("GlobalVariable")]
public bool KeepMyData { get; set; } = true;
///
/// Registry Uninstall key name
///
[Category("GlobalSetting")]
public string KeyName { get; set; } = null!;
///
/// Registry Uninstall `DisplayName` key value
///
[Category("GlobalSetting")]
public string DisplayName { get; set; } = null!;
///
/// Registry Uninstall `DisplayIcon` key value
///
[Category("GlobalSetting")]
public string DisplayIcon { get; set; } = null!;
///
/// Registry Uninstall `DisplayVersion` key value
///
[Category("GlobalSetting")]
public string DisplayVersion { get; set; } = null!;
///
/// Registry Uninstall `InstallLocation` key value
///
[Category("GlobalVariable")]
public string InstallLocation { get; set; } = null!;
///
/// Registry Uninstall `Publisher` key value
///
[Category("GlobalSetting")]
public string Publisher { get; set; } = null!;
///
/// Registry Uninstall `UninstallString` key value
///
[Category("GlobalVariable")]
public string UninstallString { get; set; } = null!;
///
/// Registry Uninstall `SystemComponent` key value
/// true(1) => Hidden
/// false(0) or _ => Shown (defalut)
///
[Category("GlobalSetting")]
public bool SystemComponent { get; set; } = false;
///
/// Provide {AppName}.exe to auto run
///
[Category("GlobalSetting")]
public string AppName { get; set; } = null!;
///
/// Provide SetupName
///
[Category("GlobalSetting")]
public string SetupName { get; set; } = null!;
///
/// Provide Package Name for Get-AppxPackage
/// You can get it from AppxManifest.xml in your MSIX/APPX type file
///
[Category("GlobalSetting")]
public string AppxPackageName { get; set; } = null!;
}