Skip to content

Commit f971f2d

Browse files
committed
Merge branch 'develop' of https://github.com/NetSparkleUpdater/NetSparkle into develop
2 parents a8c626d + 1452374 commit f971f2d

File tree

15 files changed

+59
-30
lines changed

15 files changed

+59
-30
lines changed

.github/workflows/publish-nuget.yml

+18-9
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
matrix:
1414
os: [windows-latest, macos-latest, ubuntu-latest]
1515
steps:
16-
- uses: actions/[email protected].1
16+
- uses: actions/[email protected].2
1717
- uses: nuget/setup-nuget@v2
1818
with:
1919
nuget-api-key: ${{secrets.NUGET_API_KEY}}
@@ -23,13 +23,14 @@ jobs:
2323
uses: microsoft/[email protected]
2424
if: matrix.os == 'windows-latest'
2525

26-
- name: Setup .NET 6.0, 7.0, 8.0 for tests
27-
uses: actions/setup-dotnet@v4.0.1
26+
- name: Setup .NET 6.0, 7.0, 8.0, 9.0 for tests
27+
uses: actions/setup-dotnet@v4.1.0
2828
with:
2929
dotnet-version: |
3030
6.0.x
3131
7.0.x
3232
8.0.x
33+
9.0.x
3334
3435
- name: Run NetSparkle.Tests in .NET 4.6.2
3536
run: dotnet test -f net462 ${{ github.workspace }}/src/NetSparkle.Tests/NetSparkle.Tests.csproj
@@ -53,12 +54,18 @@ jobs:
5354
- name: Run NetSparkle.Tests.AppCastGenerator in .NET 8
5455
run: dotnet test -f net8.0 ${{ github.workspace }}/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj
5556

57+
- name: Run NetSparkle.Tests in .NET 9
58+
run: dotnet test -f net9.0 ${{ github.workspace }}/src/NetSparkle.Tests/NetSparkle.Tests.csproj
59+
60+
- name: Run NetSparkle.Tests.AppCastGenerator in .NET 9
61+
run: dotnet test -f net9.0 ${{ github.workspace }}/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj
62+
5663
build:
5764
name: Build all packages as smoke test
5865
runs-on: windows-latest
5966
needs: test
6067
steps:
61-
- uses: actions/[email protected].1
68+
- uses: actions/[email protected].2
6269
- uses: nuget/setup-nuget@v2
6370
with:
6471
nuget-api-key: ${{secrets.NUGET_API_KEY}}
@@ -67,13 +74,14 @@ jobs:
6774
- name: Add MSBuild to PATH
6875
uses: microsoft/[email protected]
6976

70-
- name: Setup .NET 6.0, 7.0, 8.0
71-
uses: actions/setup-dotnet@v4.0.1
77+
- name: Setup .NET 6.0, 7.0, 8.0, 9.0
78+
uses: actions/setup-dotnet@v4.1.0
7279
with:
7380
dotnet-version: |
7481
6.0.x
7582
7.0.x
7683
8.0.x
84+
9.0.x
7785
7886
- name: Clean things to be safe
7987
run: |
@@ -104,7 +112,7 @@ jobs:
104112
needs: build
105113
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/avalonia-preview' || github.ref == 'refs/heads/versions/2.x'
106114
steps:
107-
- uses: actions/[email protected].1
115+
- uses: actions/[email protected].2
108116
- uses: nuget/setup-nuget@v2
109117
with:
110118
nuget-api-key: ${{secrets.NUGET_API_KEY}}
@@ -113,13 +121,14 @@ jobs:
113121
- name: Add MSBuild to PATH
114122
uses: microsoft/[email protected]
115123

116-
- name: Setup .NET 6.0, 7.0, 8.0
117-
uses: actions/setup-dotnet@v4.0.1
124+
- name: Setup .NET 6.0, 7.0, 8.0, 9.0
125+
uses: actions/setup-dotnet@v4.1.0
118126
with:
119127
dotnet-version: |
120128
6.0.x
121129
7.0.x
122130
8.0.x
131+
9.0.x
123132
124133
- name: Publish NetSparkleUpdater.SparkleUpdater on version change
125134
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ The file that launches your downloaded update executable only waits for 90 secon
233233
* Subclassing `JSONConfiguration` lets you quickly change the file path where data is saved via `GetSavePath`
234234
* Subclass `AppCastHelper` if you want full control over the app cast downloading and parsing process. Note that you can probably do everything you need to do via the `AppCastHelper` properties (including `IAppCastFilter AppCastFilter`), but subclassing will give you full, absolute control over the whole process. To use the instance of your class, set `SparkleUpdater.AppCastHelper`.
235235
* Subclass `ReleaseNotesGrabber` to control the release notes downloading (and therefore display) process. To use an instance of your class, set `UIFactory.ReleaseNotesGrabberOverride`.
236-
* Override `WebFileDownloader` if you don't want to implement `IUpdateDownloader` yourself and just want to override a function or two such as `CreateHttpClient`. To use an instance of your class, set `SparkleUpdater.UpdateDownloader`.
236+
* Override `WebFileDownloader` if you don't want to implement `IUpdateDownloader` yourself and just want to override a function or two such as `CreateHttpClient` or `RetreiveDestinationFileNameAsync`. To use an instance of your class, set `SparkleUpdater.UpdateDownloader`.
237237
* Override `WebRequestAppCastDataDownloader` if you don't want to implement `IAppCastDataDownloader` and just want to override a function or two such as `CreateHttpClient`. To use an instance of your class, set `SparkleUpdater.AppCastDataDownloader`.
238238
* Override `LogWriter` to implement the `PrintMessage` function; because `ILogger` is a pretty simple interface, you can probably just implement that interface yourself if your needs are complex. To use an instance of your class, set `SparkleUpdater.LogWriter`.
239239
* Override `SparkleUpdater` to implement some different installation-related functions, including:

src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0</TargetFrameworks>
55

66
<IsPackable>false</IsPackable>
77
<IsTestProject>true</IsTestProject>

src/NetSparkle.Tests/NetSparkle.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<ProjectGuid>{E50AC3A5-6C63-40D7-A4C4-9B359EFD5707}</ProjectGuid>
44
<RootNamespace>NetSparkleUnitTests</RootNamespace>
55
<AssemblyName>NetSparkleUnitTests</AssemblyName>
6-
<TargetFrameworks>net8.0;net7.0;net6.0;net462</TargetFrameworks>
6+
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0;net462</TargetFrameworks>
77
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
88
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
99
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>

src/NetSparkle.Tests/SparkleUpdaterFixture.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using NetSparkleUpdater.AppCastHandlers;
55
using NetSparkleUpdater.Interfaces;
66
using Xunit;
7-
#if (NETSTANDARD || NET5 || NET6 || NET7 || NET8)
7+
#if (NETSTANDARD || NET5 || NET6 || NET7 || NET8 || NET9)
88
using System.Runtime.InteropServices;
99
#endif
1010

src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<OutputType>Exe</OutputType>
55
<RootNamespace>NetSparkleUpdater.AppCastGenerator</RootNamespace>
66
<AssemblyName>NetSparkleUpdater.Tools.AppCastGenerator</AssemblyName>
7-
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
7+
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0</TargetFrameworks>
88
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
99
<PublishUrl>publish\</PublishUrl>
1010
<Install>true</Install>

src/NetSparkle.Tools.DSAHelper/NetSparkle.Tools.DSAHelper.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<OutputType>Exe</OutputType>
66
<RootNamespace>NetSparkleUpdater.DSAHelper</RootNamespace>
77
<AssemblyName>NetSparkleUpdater.Tools.DSAHelper</AssemblyName>
8-
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
8+
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0</TargetFrameworks>
99
<AssemblyTitle>NetSparkle</AssemblyTitle>
1010
<Product>NetSparkleUpdater.Tools.DSAHelper</Product>
1111
<Description>Command line tool 'netsparkle-dsa' to generate and use DSA signatures. WARNING: DSA signatures are insecure. If possible, please use NetSparkleUpdater.Tools.AppCastGenerator instead to use ed25519 signatures. Use in conjunction with the NetSparkleUpdater library.</Description>

src/NetSparkle.UI.Avalonia/NetSparkle.UI.Avalonia.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
66
<PackageId>NetSparkleUpdater.UI.Avalonia</PackageId>
77
<Version>3.0.0-preview20241016001</Version>

src/NetSparkle.UI.WPF/NetSparkle.UI.WPF.csproj

+7-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<ProjectGuid>{6915843C-7947-4268-B569-6F5684651DF4}</ProjectGuid>
44
<UseWPF>true</UseWPF>
5-
<TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net462</TargetFrameworks>
5+
<TargetFrameworks>net9.0-windows;net8.0-windows;net7.0-windows;net6.0-windows;net462</TargetFrameworks>
66
<AssemblyTitle>NetSparkleUpdater.UI.WPF</AssemblyTitle>
77
<Product>NetSparkleUpdater.UI.WPF</Product>
88
<Copyright>Copyright © 2024</Copyright>
@@ -52,13 +52,16 @@
5252
<ProjectReference Include="..\NetSparkle\NetSparkle.csproj" />
5353
</ItemGroup>
5454
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-windows'">
55-
<PackageReference Include="System.Drawing.Common" Version="8.0.8" />
55+
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
5656
</ItemGroup>
5757
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0-windows'">
58-
<PackageReference Include="System.Drawing.Common" Version="8.0.8" />
58+
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
5959
</ItemGroup>
6060
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-windows'">
61-
<PackageReference Include="System.Drawing.Common" Version="8.0.8" />
61+
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
62+
</ItemGroup>
63+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0-windows'">
64+
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
6265
</ItemGroup>
6366
<ItemGroup>
6467
<None Include="..\..\README.md" Pack="true" PackagePath="\" />

src/NetSparkle.UI.WinForms/NetSparkle.UI.WinForms.csproj

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<RootNamespace>NetSparkleUpdater.UI.WinForms</RootNamespace>
55
<AssemblyName>NetSparkleUpdater.UI.WinForms</AssemblyName>
66
<UseWindowsForms>true</UseWindowsForms>
7-
<TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net462</TargetFrameworks>
7+
<TargetFrameworks>net9.0-windows;net8.0-windows;net7.0-windows;net6.0-windows;net462</TargetFrameworks>
88
<AssemblyTitle>NetSparkle.NetFramework.WinForms</AssemblyTitle>
99
<Product>NetSparkleUpdater.UI.WinForms</Product>
1010
<Copyright>Copyright © 2024</Copyright>
@@ -95,14 +95,17 @@
9595
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
9696
</PropertyGroup>
9797
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-windows'">
98-
<PackageReference Include="System.Drawing.Common" Version="8.0.8" />
98+
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
9999
</ItemGroup>
100100
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0-windows'">
101-
<PackageReference Include="System.Drawing.Common" Version="8.0.8" />
101+
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
102102
</ItemGroup>
103103
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-windows'">
104-
<PackageReference Include="System.Drawing.Common" Version="8.0.8" />
104+
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
105105
</ItemGroup>
106+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0-windows'">
107+
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
108+
</ItemGroup>
106109
<ItemGroup>
107110
<Folder Include="Properties\" />
108111
</ItemGroup>

src/NetSparkle.UI.WinForms/ToastNotifier.cs

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using NetSparkleUpdater.Properties;
22
using System;
33
using System.Collections.Generic;
4+
using System.ComponentModel;
45
using System.Drawing;
56
using System.Windows.Forms;
67

@@ -49,6 +50,7 @@ public ToastNotifier(Icon? applicationIcon = null)
4950
/// <summary>
5051
/// Action to perform when the user clicks on the toast window
5152
/// </summary>
53+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
5254
public Action ClickAction { get; set; }
5355

5456
private void PauseTimerTick(object? sender, EventArgs e)

src/NetSparkle.UI.WinForms/UpdateAvailableWindow.cs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.Collections.Generic;
99
using NetSparkleUpdater.Events;
1010
using NetSparkleUpdater.AppCastHandlers;
11+
using System.ComponentModel;
1112

1213
namespace NetSparkleUpdater.UI.WinForms
1314
{
@@ -40,6 +41,7 @@ public partial class UpdateAvailableWindow : Form, IUpdateAvailable
4041
/// <summary>
4142
/// Object responsible for downloading and formatting markdown release notes for display in HTML
4243
/// </summary>
44+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
4345
public ReleaseNotesGrabber? ReleaseNotesGrabber { get; set; }
4446

4547
private ISignatureVerifier? _signatureVerifier;

src/NetSparkle/Configurations/RegistryConfiguration.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Globalization;
33
using Microsoft.Win32;
44
using NetSparkleUpdater.Interfaces;
5-
#if (NETSTANDARD || NET6 || NET7 || NET8)
5+
#if (NETSTANDARD || NET6 || NET7 || NET8 || NET9)
66
using System.Runtime.InteropServices;
77
#endif
88

@@ -134,7 +134,7 @@ private DateTime ConvertStringToDate(string str)
134134
/// <returns><c>true</c> if the items were loaded successfully; false otherwise</returns>
135135
private bool LoadValuesFromPath(string regPath)
136136
{
137-
#if (NETSTANDARD || NET6 || NET7 || NET8)
137+
#if (NETSTANDARD || NET6 || NET7 || NET8 || NET9)
138138
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
139139
{
140140
return false;
@@ -206,7 +206,7 @@ private void SaveDidRunOnceAsTrue(string regPath)
206206
/// <returns><c>true</c> if the values were saved to the registry; false otherwise</returns>
207207
private bool SaveValuesToPath(string regPath)
208208
{
209-
#if (NETSTANDARD || NET6 || NET7 || NET8)
209+
#if (NETSTANDARD || NET6 || NET7 || NET8 || NET9)
210210
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
211211
{
212212
return false;

src/NetSparkle/NetSparkle.csproj

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0;net462</TargetFrameworks>
4+
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0;netstandard2.0;net462</TargetFrameworks>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
66
<PackageId>NetSparkleUpdater.SparkleUpdater</PackageId>
77
<Version>3.0.0-preview20241016001</Version>
@@ -82,6 +82,16 @@
8282
<DocumentationFile>..\bin\Debug\NetSparkle\NetSparkle.xml</DocumentationFile>
8383
<DefineConstants>DEBUG;TRACE;NETCORE;NET8</DefineConstants>
8484
</PropertyGroup>
85+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0|AnyCPU'">
86+
<OutputPath>..\bin\Release\NetSparkle\</OutputPath>
87+
<DocumentationFile>..\bin\Release\NetSparkle\NetSparkle.xml</DocumentationFile>
88+
<DefineConstants>TRACE;NETCORE;NET9</DefineConstants>
89+
</PropertyGroup>
90+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net9.0|AnyCPU'">
91+
<OutputPath>..\bin\Debug\NetSparkle\</OutputPath>
92+
<DocumentationFile>..\bin\Debug\NetSparkle\NetSparkle.xml</DocumentationFile>
93+
<DefineConstants>DEBUG;TRACE;NETCORE;NET9</DefineConstants>
94+
</PropertyGroup>
8595
<!-- .NET 4.6.2 references, compilation flags and build options -->
8696
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
8797
<Reference Include="System" />

src/NetSparkle/SparkleUpdater.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
using NetSparkleUpdater.AppCastHandlers;
1515
using NetSparkleUpdater.AssemblyAccessors;
1616
using System.Text;
17-
#if NETSTANDARD || NET6 || NET7 || NET8
17+
#if NETSTANDARD || NET6 || NET7 || NET8 || NET9
1818
using System.Runtime.InteropServices;
1919
#endif
2020

@@ -274,7 +274,7 @@ public Configuration Configuration
274274
{
275275
if (_configuration == null)
276276
{
277-
#if NETSTANDARD || NET6 || NET7 || NET8
277+
#if NETSTANDARD || NET6 || NET7 || NET8 || NET9
278278
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
279279
{
280280
_configuration = new RegistryConfiguration(new AssemblyDiagnosticsAccessor(_appReferenceAssembly));

0 commit comments

Comments
 (0)