cleanflash: Update to 34.0.0.267 and switch to .NET Core SDK building

This commit is contained in:
Disyer
2022-08-03 03:40:14 +03:00
parent 420aa8ac66
commit 4591cb2e54
21 changed files with 109 additions and 628 deletions
+14 -69
View File
@@ -1,35 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D00F629B-455A-42DE-B2FA-A3759A3095AE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CleanFlashCommon</RootNamespace>
<AssemblyName>CleanFlashCommon</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net40</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -43,46 +21,13 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ExitedProcess.cs" />
<Compile Include="FileUtil.cs" />
<Compile Include="GradientButton.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="HandleUtil.cs" />
<Compile Include="ImageCheckBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ImageCheckBox.Designer.cs">
<DependentUpon>ImageCheckBox.cs</DependentUpon>
</Compile>
<Compile Include="InstallException.cs" />
<Compile Include="IProgressForm.cs" />
<Compile Include="ProcessUtils.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="RedirectionManager.cs" />
<Compile Include="RegistryManager.cs" />
<Compile Include="SmoothProgressBar.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SystemInfo.cs" />
<Compile Include="Uninstaller.cs" />
<Compile Include="UpdateChecker.cs" />
<Compile Include="WinAPI.cs" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net40" Version="1.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="flashLogo.png" />
<Content Include="icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
</PropertyGroup>
</Project>
+9 -9
View File
@@ -205,8 +205,8 @@ namespace CleanFlashCommon {
RuntimeHelpers.PrepareConstrainedRegions();
try { } finally {
// CER guarantees that the address of the allocated
// memory is actually assigned to ptr if an
// CER guarantees that the address of the allocated
// memory is actually assigned to ptr if an
// asynchronous exception occurs.
ptr = Marshal.AllocHGlobal(length);
}
@@ -223,7 +223,7 @@ namespace CleanFlashCommon {
for (int i = 0; i < handleCount; i++) {
SYSTEM_HANDLE_ENTRY handleEntry = (SYSTEM_HANDLE_ENTRY) Marshal.PtrToStructure((IntPtr)((int)ptr + offset), typeof(SYSTEM_HANDLE_ENTRY));
if (handleEntry.OwnerPid == processId) {
IntPtr handle = (IntPtr) handleEntry.HandleValue;
SystemHandleType handleType;
@@ -245,8 +245,8 @@ namespace CleanFlashCommon {
}
}
} finally {
// CER guarantees that the allocated memory is freed,
// if an asynchronous exception occurs.
// CER guarantees that the allocated memory is freed,
// if an asynchronous exception occurs.
Marshal.FreeHGlobal(ptr);
}
} while (ret == NT_STATUS.STATUS_INFO_LENGTH_MISMATCH);
@@ -294,8 +294,8 @@ namespace CleanFlashCommon {
RuntimeHelpers.PrepareConstrainedRegions();
try { } finally {
// CER guarantees the assignment of the allocated
// memory address to ptr, if an ansynchronous exception
// CER guarantees the assignment of the allocated
// memory address to ptr, if an ansynchronous exception
// occurs.
ptr = Marshal.AllocHGlobal(length);
}
@@ -306,7 +306,7 @@ namespace CleanFlashCommon {
RuntimeHelpers.PrepareConstrainedRegions();
try { } finally {
// CER guarantees that the previous allocation is freed,
// and that the newly allocated memory address is
// and that the newly allocated memory address is
// assigned to ptr if an asynchronous exception occurs.
Marshal.FreeHGlobal(ptr);
ptr = Marshal.AllocHGlobal(length);
@@ -318,7 +318,7 @@ namespace CleanFlashCommon {
return fileName.Length != 0;
}
} finally {
// CER guarantees that the allocated memory is freed,
// CER guarantees that the allocated memory is freed,
// if an asynchronous exception occurs.
Marshal.FreeHGlobal(ptr);
}
@@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CleanFlashCommon")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CleanFlashCommon")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("d00f629b-455a-42de-b2fa-a3759a3095ae")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CleanFlashCommon.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
+3 -3
View File
@@ -32,11 +32,11 @@ namespace CleanFlashCommon {
}
public class UpdateChecker {
private static readonly string FLASH_VERSION = "34.0.0.251";
private static readonly string VERSION = "v34.0.0.251";
private static readonly string FLASH_VERSION = "34.0.0.267";
private static readonly string VERSION = "34.0.0.267";
private static readonly string AUTHOR = "cleanflash";
private static readonly string REPO = "installer";
private static readonly string USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36";
private static readonly string USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36";
public static string GetAPILink() {
return "https://api.github.com/repos/" + AUTHOR + "/" + REPO + "/releases/latest";