Skip to content

Commit

Permalink
fix bugs and version up
Browse files Browse the repository at this point in the history
  • Loading branch information
MikiraSora committed Oct 22, 2024
1 parent 6cabcb4 commit e60e22a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,17 @@ public async Task StartUpdate()
throw new Exception($"Downloaded wrong file, updater file is not found: {updaterFilePath}");

var targetFolder = Path.GetDirectoryName(typeof(DefaultProgramUpdater).Assembly.Location);
var args = new string[] { "updater", "-v", "--targetFolder", targetFolder, "--sourceFolder", sourceFolder, "--sourceVersion", ThisAssembly.AssemblyFileVersion };

Log.LogInfo($"updaterFilePath: {updaterFilePath}");
Log.LogInfo($"targetFolder: {updaterFilePath}");
Log.LogInfo($"args: {string.Join(" ", args)}");

if (MessageBox.Show($"程序更新文件准备完成, 是否关闭程序, 开始更新?", Resources.Warning, MessageBoxButton.OKCancel) != MessageBoxResult.OK)
return;

Log.LogInfo($"user comfirmed.");
Process.Start(updaterFilePath, ["updater", "-v", "--targetFolder", targetFolder, "--sourceFolder", sourceFolder, "--sourceVersion", ThisAssembly.AssemblyFileVersion]);
Process.Start(updaterFilePath, args);
App.Current.Shutdown();
}

Expand Down
2 changes: 1 addition & 1 deletion OngekiFumenEditor/UI/Dialogs/AboutWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<RowDefinition />
</Grid.RowDefinitions>

<Label VerticalAlignment="Center" FontSize="15">Product Verion</Label>
<Label VerticalAlignment="Center" FontSize="15">Product Version</Label>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<StackPanel Orientation="Horizontal" Visibility="{Binding IsNotifyUpdateSuccess, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=True}">
<Label
Expand Down
2 changes: 1 addition & 1 deletion OngekiFumenEditor/version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "0.7.5"
"version": "0.7.8"
}

0 comments on commit e60e22a

Please sign in to comment.