fixes
This commit is contained in:
@@ -267,26 +267,38 @@ public partial class MainForm : Window
|
||||
private async void MainForm_Loaded(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
#if !DISABLE_UPDATE
|
||||
var myAppPath = EnvironmentEx.ProcessPath;
|
||||
#if !DEBUG
|
||||
try
|
||||
{
|
||||
#endif
|
||||
var myAppPath = EnvironmentEx.ProcessPath!;
|
||||
var updater = new UpdateClient(Program.UpdateUrl, Assembly.GetEntryAssembly()!.GetAppVersion(), AppChannel.Stable)
|
||||
{
|
||||
Distro = RuntimeInformationsEx.GetRuntimeIdentifier(),
|
||||
};
|
||||
|
||||
if (await updater.CheckForUpdate() is {} packageToInstall
|
||||
&& await MessageBoxManager.GetMessageBoxStandard(MsgBoxLangRes.UpdateAvailable_Title, MsgBoxLangRes.UpdateAvailable, ButtonEnum.YesNo).ShowWindowDialogAsync(this) == ButtonResult.Ok)
|
||||
&& await MessageBoxManager.GetMessageBoxStandard(MsgBoxLangRes.UpdateAvailable_Title, MsgBoxLangRes.UpdateAvailable, ButtonEnum.YesNo, MsBox.Avalonia.Enums.Icon.Info).ShowWindowDialogAsync(this) == ButtonResult.Yes)
|
||||
{
|
||||
SetStatus(GeneralLangRes.DownloadProgramUpdate, Symbols.Fluent.GetImageSource(SymbolsFluent.software_installer));
|
||||
IsEnabled = false;
|
||||
if (await updater.DownloadPackageAsync(packageToInstall)
|
||||
&& await updater.InstallPackageAsync(packageToInstall, myAppPath))
|
||||
{
|
||||
Process.Start(myAppPath);
|
||||
IsVisible = false;
|
||||
await Process.Start(myAppPath).WaitForExitAsync();
|
||||
Environment.Exit(0);
|
||||
return;
|
||||
}
|
||||
IsEnabled = true;
|
||||
}
|
||||
#if !DEBUG
|
||||
}
|
||||
catch
|
||||
{
|
||||
IsEnabled = true;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
CheckStatusAndUpdate(true);
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Pilz.Updating" Version="4.3.4" />
|
||||
<PackageReference Include="Pilz.Updating.Client" Version="4.4.1" />
|
||||
<PackageReference Include="Pilz.Updating.Client" Version="4.4.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
9
ModpackUpdater.Apps.Client.Gui/publish.sh
Executable file
9
ModpackUpdater.Apps.Client.Gui/publish.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
pupnet -y -v "$1[1]" -r linux-x64 -k appimage
|
||||
pupnet -y -v "$1[1]" -r linux-x64 -k flatpak -p DefineConstants=DISABLE_UPDATE
|
||||
#pupnet -y -v "$1[1]"-r linux-x64 -k deb -p DefineConstants=DISABLE_UPDATE
|
||||
#pupnet -y -v "$1[1]"-r linux-x64 -k rpm -p DefineConstants=DISABLE_UPDATE
|
||||
pupnet -y -v "$1[1]" -r linux-arm64 -k appimage
|
||||
pupnet -y -v "$1[1]" -r linux-arm64 -k flatpak -p DefineConstants=DISABLE_UPDATE
|
||||
#pupnet -y -v "$1[1]"-r linux-arm64 -k deb -p DefineConstants=DISABLE_UPDATE
|
||||
#pupnet -y -v "$1[1]"-r linux-arm64 -k rpm -p DefineConstants=DISABLE_UPDATE
|
||||
pupnet -y -v "$1[1]" -r win-x64 -k zip
|
||||
@@ -1,3 +1,3 @@
|
||||
using Pilz;
|
||||
|
||||
[assembly: AssemblyAppVersion("1.10.0")]
|
||||
[assembly: AssemblyAppVersion(AssemblyAppVersionAttribute.EntryAssemblyVersionKey)]
|
||||
@@ -1,9 +0,0 @@
|
||||
pupnet -y -r linux-x64 -k appimage
|
||||
pupnet -y -r linux-x64 -k flatpak -p DefineConstants=DISABLE_UPDATE
|
||||
#pupnet -y -r linux-x64 -k deb -p DefineConstants=DISABLE_UPDATE
|
||||
#pupnet -y -r linux-x64 -k rpm -p DefineConstants=DISABLE_UPDATE
|
||||
pupnet -y -r linux-arm64 -k appimage
|
||||
pupnet -y -r linux-arm64 -k flatpak -p DefineConstants=DISABLE_UPDATE
|
||||
#pupnet -y -r linux-arm64 -k deb -p DefineConstants=DISABLE_UPDATE
|
||||
#pupnet -y -r linux-arm64 -k rpm -p DefineConstants=DISABLE_UPDATE
|
||||
pupnet -y -r win-x64 -k zip
|
||||
Reference in New Issue
Block a user