mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Fixed the issue that someone could have a windows 10 version which is older than what we can support. (#207)
Also upgrade Inno Setup and SVG
This commit is contained in:
parent
2a5ae1557e
commit
5db1f5564b
5 changed files with 15 additions and 6 deletions
|
@ -56,7 +56,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="!$(MSBuildProjectName.Contains('Tests')) And $(MSBuildProjectName.StartsWith('Greenshot'))">
|
<ItemGroup Condition="!$(MSBuildProjectName.Contains('Tests')) And $(MSBuildProjectName.StartsWith('Greenshot'))">
|
||||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.1.74">
|
<PackageReference Include="Nerdbank.GitVersioning" Version="3.1.91">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Tools.InnoSetup" version="6.0.3" GeneratePathProperty="true" />
|
<PackageReference Include="Tools.InnoSetup" version="6.0.4" GeneratePathProperty="true" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -102,6 +102,11 @@ namespace GreenshotPlugin.Core
|
||||||
/// <returns>true if we are running on Windows XP or later</returns>
|
/// <returns>true if we are running on Windows XP or later</returns>
|
||||||
public static bool IsWindowsXpOrLater { get; } = WinVersion.Major >= 5 || WinVersion.Major == 5 && WinVersion.Minor >= 1;
|
public static bool IsWindowsXpOrLater { get; } = WinVersion.Major >= 5 || WinVersion.Major == 5 && WinVersion.Minor >= 1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the windows build number
|
||||||
|
/// </summary>
|
||||||
|
public static int BuildVersion => WinVersion.Build;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test if the current Windows version is 10 and the build number or later
|
/// Test if the current Windows version is 10 and the build number or later
|
||||||
/// See the build numbers <a href="https://en.wikipedia.org/wiki/Windows_10_version_history">here</a>
|
/// See the build numbers <a href="https://en.wikipedia.org/wiki/Windows_10_version_history">here</a>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.JsonNet" Version="0.10.9" />
|
<PackageReference Include="Dapplo.HttpExtensions.JsonNet" Version="0.10.9" />
|
||||||
<PackageReference Include="log4net" version="2.0.8" />
|
<PackageReference Include="log4net" version="2.0.8" />
|
||||||
<PackageReference Include="Svg" Version="3.0.102" />
|
<PackageReference Include="Svg" Version="3.1.1" />
|
||||||
<Reference Include="Accessibility" />
|
<Reference Include="Accessibility" />
|
||||||
<Reference Include="CustomMarshalers" />
|
<Reference Include="CustomMarshalers" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -35,7 +35,9 @@ namespace GreenshotWin10Plugin
|
||||||
[Plugin("Win10", false)]
|
[Plugin("Win10", false)]
|
||||||
public sealed class Win10Plugin : IGreenshotPlugin
|
public sealed class Win10Plugin : IGreenshotPlugin
|
||||||
{
|
{
|
||||||
public void Dispose()
|
private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(Win10Plugin));
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Dispose(true);
|
Dispose(true);
|
||||||
}
|
}
|
||||||
|
@ -58,8 +60,10 @@ namespace GreenshotWin10Plugin
|
||||||
/// <returns>true if plugin is initialized, false if not (doesn't show)</returns>
|
/// <returns>true if plugin is initialized, false if not (doesn't show)</returns>
|
||||||
public bool Initialize()
|
public bool Initialize()
|
||||||
{
|
{
|
||||||
if (!WindowsVersion.IsWindows10OrLater)
|
// Here we check if the build version of Windows is actually what we support
|
||||||
|
if (!WindowsVersion.IsWindows10BuildOrLater(17763))
|
||||||
{
|
{
|
||||||
|
Log.WarnFormat("No support for Windows build {0}", WindowsVersion.BuildVersion);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue