Skip to content

Commit

Permalink
fix: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pd233 committed Mar 5, 2024
1 parent c46b4d4 commit 82fe235
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/AutoUpdate/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ void Lipui_Handler(string? lipPath, string? workingDir)
{
WorkingDirectory = workingDir,
Arguments = "install --yes --force-reinstall --no-dependencies github.com/lippkg/LipUI",
WindowStyle = ProcessWindowStyle.Normal,
}
};
logger.LogInformation("Running: {lipPath} install github.com/lippkg/LipUI", lipPath);
process.Start();
Environment.Exit(0);
}

void Lip_Handler()
Expand Down
13 changes: 11 additions & 2 deletions src/LipUI/Pages/Settings/SettingsAndAboutView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,23 @@ private async void UpdateButton_Click(object sender, RoutedEventArgs e)
var (success, path) = await Main.TryGetLipConsolePathAsync(XamlRoot);

if (success is false)
{
await InternalServices.ShowInfoBarAsync(
severity: InfoBarSeverity.Error,
title: "infoBar$error".GetLocalized(),
message: "lipExecution$nullLipPath".GetLocalized());

return;
}

var args = @$"--type lipui_autoupdate --lip-path ""{path}"" --working-dir ""{Main.ProgramDirectory}""";
await InternalServices.ShowInfoBarAsync(
interval: TimeSpan.FromSeconds(3),
message: $"Running {args}");

Process.Start(
Path.Combine(Main.ProgramDirectory, "AutoUpdate.exe"),
@$"--type lipui_autoupdate --lip-path ""{path}"" --working-dir ""{Main.ProgramDirectory}""");
Path.Combine(Main.ProgramDirectory, "AutoUpdate.exe"), args);

Environment.Exit(0);
}
Expand Down
11 changes: 6 additions & 5 deletions tooth.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "github.com/lippkg/LipUI",
"version": "0.4.3",
"version": "0.4.4",
"info": {
"name": "LipUI",
"description": "A GUI client for lip",
Expand All @@ -14,10 +14,11 @@
{
"goos": "windows",
"goarch": "amd64",
"asset_url": "https://github.com/lippkg/LipUI/releases/download/v0.4.3/LipUI-win-x64.zip",
"asset_url": "https://github.com/lippkg/LipUI/releases/download/v0.4.4/LipUI-win-x64.zip",
"commands": {
"post-install": [
".autoupdate/AutoUpdate.exe --type lip_postinstall"
"echo Copy files",
"IF EXIST .autoupdate/current_lipui_path.txt (.autoupdate/AutoUpdate.exe --type lip_postinstall)"
]
},
"files": {
Expand All @@ -32,11 +33,11 @@
{
"goos": "windows",
"goarch": "arm64",
"asset_url": "https://github.com/lippkg/LipUI/releases/download/v0.4.3/LipUI-win-arm64.zip",
"asset_url": "https://github.com/lippkg/LipUI/releases/download/v0.4.4/LipUI-win-arm64.zip",
"commands": {
"post-install": [
"echo Copy files",
"IF EXIST current_lipui_path.txt (.autoupdate/AutoUpdate.exe --type lip_postinstall)"
"IF EXIST .autoupdate/current_lipui_path.txt (.autoupdate/AutoUpdate.exe --type lip_postinstall)"
]
},
"files": {
Expand Down

0 comments on commit 82fe235

Please sign in to comment.