Bump version + don't use distroinstaller when uninstalling w/ MSI

This commit is contained in:
Difegue 2022-04-25 15:34:19 +02:00
parent ad2264d47e
commit 3d50b496de
4 changed files with 7 additions and 5 deletions

View File

@ -42,7 +42,7 @@ namespace LANraragi.DistroInstaller
// Otherwise, just refer to the CLI argument
bool needsUpgrade = new DesktopBridge.Helpers().IsRunningAsUwp() ? NeedsUpgradeMSIX() : NeedsUpgradeCLI(args);
// TODO no uninstall mechanism on MSIX?
// Unused by the actual MSI setup, but might as well leave the functionality in
bool needsUninstall = args.Length > 0 && args[0] == "-remove";
if (!WslApi.WslIsDistributionRegistered(distro) || needsUpgrade)

View File

@ -63,7 +63,7 @@
<Separator Height="11.5" Margin="0"/>
<TextBlock Style="{StaticResource BodyTextBlockStyle}">
You're using the <Hyperlink NavigateUri="https://github.com/Difegue/Karen" RequestNavigate="Hyperlink_RequestNavigate">Karen</Hyperlink> Bootstrapper for <Hyperlink NavigateUri="https://github.com/Difegue/LANraragi" RequestNavigate="Hyperlink_RequestNavigate">LANraragi</Hyperlink>,
<LineBreak/> Version 2.2 <emoji:TextBlock Text="🐝"/>
<LineBreak/> Version 2.3 <emoji:TextBlock Text="🐝"/>
<LineBreak/>
<emoji:TextBlock Text="✨"/> Consider installing <Hyperlink NavigateUri="ms-windows-store://pdp/?ProductId=9MZ6BWWVSWJH" RequestNavigate="Hyperlink_RequestNavigate">LRReader</Hyperlink> from the Microsoft Store! <emoji:TextBlock Text="✨"/>
<LineBreak/>

View File

@ -128,11 +128,11 @@ namespace Setup
[CustomAction]
public static ActionResult UnRegisterWslDistro(Session session)
{
var distroInstaller = session.Property("INSTALLDIR") + @"DistroInstaller.exe";
// We don't use distroInstaller here since INSTALLDIR isn't set when uninstalling.
return session.HandleErrors(() =>
{
session.Log("Removing previous WSL Distro");
var wslProc = Process.Start("distroInstaller", "-remove");
var wslProc = Process.Start("wslconfig.exe", "/unregister lanraragi");
wslProc.WaitForExit();
});
}

View File

@ -67,7 +67,9 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="WslCheckDialog.cs" />
<Compile Include="WslCheckDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="WslCheckDialog.Designer.cs">
<DependentUpon>WslCheckDialog.cs</DependentUpon>
</Compile>