mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Set uninstall version on install/update (#47)
Version has also been bumped to v1.5.4
This commit is contained in:
parent
66f6cd16cd
commit
9244234860
@ -10,8 +10,8 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<Platforms>AnyCPU;x86</Platforms>
|
<Platforms>AnyCPU;x86</Platforms>
|
||||||
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
|
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
|
||||||
<Version>1.5.3</Version>
|
<Version>1.5.4</Version>
|
||||||
<FileVersion>1.5.3.0</FileVersion>
|
<FileVersion>1.5.4.0</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -284,7 +284,11 @@ namespace Bloxstrap
|
|||||||
RegistryKey uninstallKey = Registry.CurrentUser.CreateSubKey($@"Software\Microsoft\Windows\CurrentVersion\Uninstall\{Program.ProjectName}");
|
RegistryKey uninstallKey = Registry.CurrentUser.CreateSubKey($@"Software\Microsoft\Windows\CurrentVersion\Uninstall\{Program.ProjectName}");
|
||||||
uninstallKey.SetValue("DisplayIcon", $"{Directories.App},0");
|
uninstallKey.SetValue("DisplayIcon", $"{Directories.App},0");
|
||||||
uninstallKey.SetValue("DisplayName", Program.ProjectName);
|
uninstallKey.SetValue("DisplayName", Program.ProjectName);
|
||||||
|
uninstallKey.SetValue("DisplayVersion", Program.Version);
|
||||||
|
|
||||||
|
if (uninstallKey.GetValue("InstallDate") is null)
|
||||||
uninstallKey.SetValue("InstallDate", DateTime.Now.ToString("yyyyMMdd"));
|
uninstallKey.SetValue("InstallDate", DateTime.Now.ToString("yyyyMMdd"));
|
||||||
|
|
||||||
uninstallKey.SetValue("InstallLocation", Directories.Base);
|
uninstallKey.SetValue("InstallLocation", Directories.Base);
|
||||||
uninstallKey.SetValue("NoRepair", 1);
|
uninstallKey.SetValue("NoRepair", 1);
|
||||||
uninstallKey.SetValue("Publisher", Program.ProjectName);
|
uninstallKey.SetValue("Publisher", Program.ProjectName);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Bloxstrap.Helpers
|
namespace Bloxstrap.Helpers
|
||||||
{
|
{
|
||||||
internal class Directories
|
class Directories
|
||||||
{
|
{
|
||||||
public static string Base { get; private set; } = "";
|
public static string Base { get; private set; } = "";
|
||||||
public static string Downloads { get; private set; } = "";
|
public static string Downloads { get; private set; } = "";
|
||||||
|
@ -34,6 +34,8 @@ namespace Bloxstrap.Helpers
|
|||||||
File.Delete(Directories.App);
|
File.Delete(Directories.App);
|
||||||
File.Copy(Environment.ProcessPath, Directories.App);
|
File.Copy(Environment.ProcessPath, Directories.App);
|
||||||
|
|
||||||
|
Bootstrapper.Register();
|
||||||
|
|
||||||
Program.ShowMessageBox(
|
Program.ShowMessageBox(
|
||||||
$"{Program.ProjectName} has been updated to v{currentVersionInfo.ProductVersion}",
|
$"{Program.ProjectName} has been updated to v{currentVersionInfo.ProductVersion}",
|
||||||
MessageBoxIcon.Information,
|
MessageBoxIcon.Information,
|
||||||
|
@ -10,6 +10,7 @@ using Bloxstrap.Models;
|
|||||||
using Bloxstrap.Dialogs;
|
using Bloxstrap.Dialogs;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
namespace Bloxstrap
|
namespace Bloxstrap
|
||||||
{
|
{
|
||||||
@ -34,6 +35,8 @@ namespace Bloxstrap
|
|||||||
public static string LocalAppData { get; private set; } = null!;
|
public static string LocalAppData { get; private set; } = null!;
|
||||||
public static string StartMenu { get; private set; } = null!;
|
public static string StartMenu { get; private set; } = null!;
|
||||||
|
|
||||||
|
public static string Version = Assembly.GetExecutingAssembly().GetName().Version!.ToString()[..^2];
|
||||||
|
|
||||||
public static SettingsManager SettingsManager = new();
|
public static SettingsManager SettingsManager = new();
|
||||||
public static SettingsFormat Settings = SettingsManager.Settings;
|
public static SettingsFormat Settings = SettingsManager.Settings;
|
||||||
public static readonly HttpClient HttpClient = new(new HttpClientHandler { AutomaticDecompression = DecompressionMethods.All });
|
public static readonly HttpClient HttpClient = new(new HttpClientHandler { AutomaticDecompression = DecompressionMethods.All });
|
||||||
|
Loading…
Reference in New Issue
Block a user