-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for inno setup installers and uninstallers
closes #1
- Loading branch information
Showing
16 changed files
with
265 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
<Identity | ||
Name="26499Wolvenkit.WolvenKit.Installer" | ||
Publisher="[email protected], "Open Source Developer, Moritz Baron", O=Open Source Developer, L=Gmunden, S=Oberösterreich, C=AT" | ||
Version="0.2.1.0" /> | ||
Version="0.2.0.0" /> | ||
|
||
<Properties> | ||
<DisplayName>WolvenKit.Installer</DisplayName> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Windows.Storage; | ||
|
||
namespace Wolvenkit.Installer.Helper; | ||
internal static class SettingsHelper | ||
{ | ||
private const string s_useZipInstallers = "useZipInstallers"; | ||
|
||
// Booleans | ||
public static bool GetUseZipInstallers() => ApplicationData.Current.LocalSettings.Values.TryGetValue(s_useZipInstallers, out var value) && value is bool b && b; | ||
public static void SetUseZipInstallers(bool value) => ApplicationData.Current.LocalSettings.Values[s_useZipInstallers] = value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
namespace Wolvenkit.Installer.Models; | ||
public class PackageModel | ||
{ | ||
public PackageModel(string name, string version, string[] files, string path) | ||
public PackageModel(string name, string version, /*string[] files,*/ string path) | ||
{ | ||
Version = version; | ||
Name = name; | ||
Files = files; | ||
//Files = files; | ||
Path = path; | ||
} | ||
|
||
public string Name { get; set; } | ||
public string Path { get; set; } | ||
public string Version { get; set; } | ||
public string[] Files { get; set; } | ||
//public string[] Files { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
using Microsoft.UI.Xaml.Controls; | ||
|
||
namespace Wolvenkit.Installer.Services; | ||
|
||
[ObservableObject] | ||
public partial class BannerNotification | ||
{ | ||
[ObservableProperty] | ||
private string title; | ||
|
||
[ObservableProperty] | ||
private bool isOpen; | ||
|
||
[ObservableProperty] | ||
private string message; | ||
|
||
[ObservableProperty] | ||
private InfoBarSeverity severity; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.UI.Xaml.Controls; | ||
|
||
namespace Wolvenkit.Installer.Services; | ||
|
||
public class DialogService : IDialogService | ||
{ | ||
public async Task DisplayAlert(string title, string message, string cancel) | ||
{ | ||
ContentDialog dlg = new() | ||
{ | ||
Title = title, | ||
Content = message, | ||
CloseButtonText = cancel, | ||
XamlRoot = App.MainRoot.XamlRoot, | ||
}; | ||
|
||
await dlg.ShowAsync(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,10 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Microsoft.UI.Xaml.Controls; | ||
|
||
namespace Wolvenkit.Installer.Services; | ||
public interface IDialogService | ||
{ | ||
Task DisplayAlert(string title, string message, string cancel); | ||
} | ||
|
||
public class DialogService : IDialogService | ||
{ | ||
public async Task DisplayAlert(string title, string message, string cancel) | ||
{ | ||
ContentDialog dlg = new() | ||
{ | ||
Title = title, | ||
Content = message, | ||
CloseButtonText = cancel, | ||
XamlRoot = App.MainRoot.XamlRoot, | ||
}; | ||
|
||
await dlg.ShowAsync(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Collections.ObjectModel; | ||
using System.Threading.Tasks; | ||
using Wolvenkit.Installer.Models; | ||
using Wolvenkit.Installer.ViewModel; | ||
|
||
namespace Wolvenkit.Installer.Services; | ||
|
||
public interface ILibraryService | ||
{ | ||
ObservableCollection<PackageViewModel> InstalledPackages { get; } | ||
|
||
ObservableCollection<RemotePackageViewModel> RemotePackages { get; set; } | ||
|
||
Task<string> GetLatestVersionAsync(RemotePackageModel model, bool prerelease); | ||
Task<bool> InstallAsync(RemotePackageModel id, string installPath); | ||
Task<bool> InstallAsync(PackageModel id, string installPath); | ||
Task InitAsync(); | ||
Task SaveAsync(); | ||
Task<bool> RemoveAsync(PackageModel model); | ||
bool TryGetRemote(PackageModel model, out RemotePackageViewModel remote); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.