mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Revert change of x64->amd64 in 20882971. the former is officially what windows uses.
This commit is contained in:
@@ -199,7 +199,7 @@ namespace Squirrel
|
||||
{
|
||||
switch (CpuArchitecture) {
|
||||
|
||||
case RuntimeCpu.amd64: return Task.FromResult(CheckIsInstalledX64());
|
||||
case RuntimeCpu.x64: return Task.FromResult(CheckIsInstalledX64());
|
||||
case RuntimeCpu.x86: return Task.FromResult(CheckIsInstalledX86());
|
||||
default: return Task.FromResult(false);
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace Squirrel
|
||||
/// <inheritdoc/>
|
||||
public override Task<bool> CheckIsSupported()
|
||||
{
|
||||
if (CpuArchitecture == RuntimeCpu.amd64 && !Environment.Is64BitOperatingSystem)
|
||||
if (CpuArchitecture == RuntimeCpu.x64 && !Environment.Is64BitOperatingSystem)
|
||||
return Task.FromResult(false);
|
||||
|
||||
// TODO use IsWindowsVersionOrGreater function to verify it can be installed on this machine
|
||||
@@ -266,7 +266,7 @@ namespace Squirrel
|
||||
var latest = await GetLatestDotNetVersion(DotnetRuntimeType.WindowsDesktop, $"{MinVersion.Major}.{MinVersion.Minor}").ConfigureAwait(false);
|
||||
var architecture = CpuArchitecture switch {
|
||||
RuntimeCpu.x86 => "x86",
|
||||
RuntimeCpu.amd64 => "x64",
|
||||
RuntimeCpu.x64 => "x64",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(CpuArchitecture)),
|
||||
};
|
||||
|
||||
@@ -426,7 +426,7 @@ namespace Squirrel
|
||||
/// <inheritdoc/>
|
||||
public override Task<bool> CheckIsSupported()
|
||||
{
|
||||
if (CpuArchitecture == RuntimeCpu.amd64 && !Environment.Is64BitOperatingSystem)
|
||||
if (CpuArchitecture == RuntimeCpu.x64 && !Environment.Is64BitOperatingSystem)
|
||||
return Task.FromResult(false);
|
||||
|
||||
// TODO use IsWindowsVersionOrGreater function to verify it can be installed on this machine
|
||||
@@ -454,7 +454,7 @@ namespace Squirrel
|
||||
// these entries do not get added into the correct registry hive, so we need to determine
|
||||
// the cpu architecture from the name. I hate this but what can I do?
|
||||
if (name.Contains("x64") && Environment.Is64BitOperatingSystem) {
|
||||
results.Add((v, RuntimeCpu.amd64));
|
||||
results.Add((v, RuntimeCpu.x64));
|
||||
} else {
|
||||
results.Add((v, RuntimeCpu.x86));
|
||||
}
|
||||
@@ -494,7 +494,7 @@ namespace Squirrel
|
||||
// https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-170
|
||||
return Task.FromResult(CpuArchitecture switch {
|
||||
RuntimeCpu.x86 => "https://aka.ms/vs/17/release/vc_redist.x86.exe",
|
||||
RuntimeCpu.amd64 => "https://aka.ms/vs/17/release/vc_redist.x64.exe",
|
||||
RuntimeCpu.x64 => "https://aka.ms/vs/17/release/vc_redist.x64.exe",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(CpuArchitecture)),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -38,51 +38,51 @@ namespace Squirrel
|
||||
/// <summary> Runtime for .NET Core 3.1 Desktop Runtime (x86) </summary>
|
||||
public static readonly DotnetInfo DOTNETCORE31_X86 = new("3.1", RuntimeCpu.x86); // eg. netcoreapp3.1-x86
|
||||
/// <summary> Runtime for .NET Core 3.1 Desktop Runtime (x64) </summary>
|
||||
public static readonly DotnetInfo DOTNETCORE31_X64 = new("3.1", RuntimeCpu.amd64); // eg. netcoreapp3.1-x64
|
||||
public static readonly DotnetInfo DOTNETCORE31_X64 = new("3.1", RuntimeCpu.x64); // eg. netcoreapp3.1-x64
|
||||
/// <summary> Runtime for .NET 5.0 Desktop Runtime (x86) </summary>
|
||||
public static readonly DotnetInfo DOTNET5_X86 = new("5.0", RuntimeCpu.x86); // eg. net5.0.14-x86
|
||||
/// <summary> Runtime for .NET 5.0 Desktop Runtime (x64) </summary>
|
||||
public static readonly DotnetInfo DOTNET5_X64 = new("5.0", RuntimeCpu.amd64); // eg. net5
|
||||
public static readonly DotnetInfo DOTNET5_X64 = new("5.0", RuntimeCpu.x64); // eg. net5
|
||||
/// <summary> Runtime for .NET 6.0 Desktop Runtime (x86) </summary>
|
||||
public static readonly DotnetInfo DOTNET6_X86 = new("6.0.2", RuntimeCpu.x86); // eg. net6-x86
|
||||
/// <summary> Runtime for .NET 6.0 Desktop Runtime (x64) </summary>
|
||||
public static readonly DotnetInfo DOTNET6_X64 = new("6.0.2", RuntimeCpu.amd64); // eg. net6.0.2
|
||||
public static readonly DotnetInfo DOTNET6_X64 = new("6.0.2", RuntimeCpu.x64); // eg. net6.0.2
|
||||
|
||||
|
||||
/// <summary> Runtime for Visual C++ 2010 Redistributable (x86) </summary>
|
||||
public static readonly VCRedist00 VCREDIST100_X86 = new("vcredist100-x86", "Visual C++ 2010 Redistributable (x86)", new(10, 00, 40219), RuntimeCpu.x86,
|
||||
"https://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe");
|
||||
/// <summary> Runtime for Visual C++ 2010 Redistributable (x64) </summary>
|
||||
public static readonly VCRedist00 VCREDIST100_X64 = new("vcredist100-x64", "Visual C++ 2010 Redistributable (x64)", new(10, 00, 40219), RuntimeCpu.amd64,
|
||||
public static readonly VCRedist00 VCREDIST100_X64 = new("vcredist100-x64", "Visual C++ 2010 Redistributable (x64)", new(10, 00, 40219), RuntimeCpu.x64,
|
||||
"https://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe");
|
||||
/// <summary> Runtime for Visual C++ 2012 Redistributable (x86) </summary>
|
||||
public static readonly VCRedist00 VCREDIST110_X86 = new("vcredist110-x86", "Visual C++ 2012 Redistributable (x86)", new(11, 00, 61030), RuntimeCpu.x86,
|
||||
"https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe");
|
||||
/// <summary> Runtime for Visual C++ 2012 Redistributable (x64) </summary>
|
||||
public static readonly VCRedist00 VCREDIST110_X64 = new("vcredist110-x64", "Visual C++ 2012 Redistributable (x64)", new(11, 00, 61030), RuntimeCpu.amd64,
|
||||
public static readonly VCRedist00 VCREDIST110_X64 = new("vcredist110-x64", "Visual C++ 2012 Redistributable (x64)", new(11, 00, 61030), RuntimeCpu.x64,
|
||||
"https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe");
|
||||
/// <summary> Runtime for Visual C++ 2013 Redistributable (x86) </summary>
|
||||
public static readonly VCRedist00 VCREDIST120_X86 = new("vcredist120-x86", "Visual C++ 2013 Redistributable (x86)", new(12, 00, 40664), RuntimeCpu.x86,
|
||||
"https://aka.ms/highdpimfc2013x86enu");
|
||||
/// <summary> Runtime for Visual C++ 2013 Redistributable (x64) </summary>
|
||||
public static readonly VCRedist00 VCREDIST120_X64 = new("vcredist120-x64", "Visual C++ 2013 Redistributable (x64)", new(12, 00, 40664), RuntimeCpu.amd64,
|
||||
public static readonly VCRedist00 VCREDIST120_X64 = new("vcredist120-x64", "Visual C++ 2013 Redistributable (x64)", new(12, 00, 40664), RuntimeCpu.x64,
|
||||
"https://aka.ms/highdpimfc2013x64enu");
|
||||
/// <summary> Runtime for Visual C++ 2015 Redistributable (x86) </summary>
|
||||
public static readonly VCRedist14 VCREDIST140_X86 = new("vcredist140-x86", "Visual C++ 2015 Redistributable (x86)", new(14, 00, 23506), RuntimeCpu.x86);
|
||||
/// <summary> Runtime for Visual C++ 2015 Redistributable (x64) </summary>
|
||||
public static readonly VCRedist14 VCREDIST140_X64 = new("vcredist140-x64", "Visual C++ 2015 Redistributable (x64)", new(14, 00, 23506), RuntimeCpu.amd64);
|
||||
public static readonly VCRedist14 VCREDIST140_X64 = new("vcredist140-x64", "Visual C++ 2015 Redistributable (x64)", new(14, 00, 23506), RuntimeCpu.x64);
|
||||
/// <summary> Runtime for Visual C++ 2017 Redistributable (x86) </summary>
|
||||
public static readonly VCRedist14 VCREDIST141_X86 = new("vcredist141-x86", "Visual C++ 2017 Redistributable (x86)", new(14, 15, 26706), RuntimeCpu.x86);
|
||||
/// <summary> Runtime for Visual C++ 2017 Redistributable (x64) </summary>
|
||||
public static readonly VCRedist14 VCREDIST141_X64 = new("vcredist141-x64", "Visual C++ 2017 Redistributable (x64)", new(14, 15, 26706), RuntimeCpu.amd64);
|
||||
public static readonly VCRedist14 VCREDIST141_X64 = new("vcredist141-x64", "Visual C++ 2017 Redistributable (x64)", new(14, 15, 26706), RuntimeCpu.x64);
|
||||
/// <summary> Runtime for Visual C++ 2019 Redistributable (x86) </summary>
|
||||
public static readonly VCRedist14 VCREDIST142_X86 = new("vcredist142-x86", "Visual C++ 2019 Redistributable (x86)", new(14, 20, 27508), RuntimeCpu.x86);
|
||||
/// <summary> Runtime for Visual C++ 2019 Redistributable (x64) </summary>
|
||||
public static readonly VCRedist14 VCREDIST142_X64 = new("vcredist142-x64", "Visual C++ 2019 Redistributable (x64)", new(14, 20, 27508), RuntimeCpu.amd64);
|
||||
public static readonly VCRedist14 VCREDIST142_X64 = new("vcredist142-x64", "Visual C++ 2019 Redistributable (x64)", new(14, 20, 27508), RuntimeCpu.x64);
|
||||
/// <summary> Runtime for Visual C++ 2022 Redistributable (x86) </summary>
|
||||
public static readonly VCRedist14 VCREDIST143_X86 = new("vcredist143-x86", "Visual C++ 2022 Redistributable (x86)", new(14, 30, 30704), RuntimeCpu.x86);
|
||||
/// <summary> Runtime for Visual C++ 2022 Redistributable (x64) </summary>
|
||||
public static readonly VCRedist14 VCREDIST143_X64 = new("vcredist143-x64", "Visual C++ 2022 Redistributable (x64)", new(14, 30, 30704), RuntimeCpu.amd64);
|
||||
public static readonly VCRedist14 VCREDIST143_X64 = new("vcredist143-x64", "Visual C++ 2022 Redistributable (x64)", new(14, 30, 30704), RuntimeCpu.x64);
|
||||
|
||||
/// <summary> An array of all the currently supported runtimes </summary>
|
||||
public static readonly RuntimeInfo[] All;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Squirrel.Sources
|
||||
var args = new Dictionary<string, string>();
|
||||
|
||||
if (SquirrelRuntimeInfo.SystemArchitecture != RuntimeCpu.Unknown) {
|
||||
args.Add("arch", SquirrelRuntimeInfo.SystemArchitecture.ToString().ToLower());
|
||||
args.Add("arch", SquirrelRuntimeInfo.SystemArchitecture.ToString());
|
||||
}
|
||||
|
||||
if (SquirrelRuntimeInfo.SystemOsName != null) {
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Squirrel
|
||||
/// <summary> Intel x86 </summary>
|
||||
x86 = 0x014c,
|
||||
/// <summary> x64 / Amd64 </summary>
|
||||
amd64 = 0x8664,
|
||||
x64 = 0x8664,
|
||||
/// <summary> Arm64 </summary>
|
||||
arm64 = 0xAA64,
|
||||
}
|
||||
@@ -111,7 +111,7 @@ namespace Squirrel
|
||||
// because of emulation support. Arm64 generally supports x86/x64 emulation, and x64
|
||||
// often supports x86 emulation, so we want to pick the least compatible architecture
|
||||
// for the package.
|
||||
var archOrder = new[] { RuntimeCpu.arm64, RuntimeCpu.amd64, RuntimeCpu.x86 };
|
||||
var archOrder = new[] { RuntimeCpu.arm64, RuntimeCpu.x64, RuntimeCpu.x86 };
|
||||
|
||||
var pkg = archOrder.FirstOrDefault(o => pearchs.Contains(o));
|
||||
if (pkg == RuntimeCpu.arm64) {
|
||||
@@ -137,10 +137,10 @@ namespace Squirrel
|
||||
if (architecture == RuntimeCpu.x86) return true;
|
||||
// x64 virtualisation is only avaliable on windows 11
|
||||
// https://stackoverflow.com/questions/69038560/detect-windows-11-with-net-framework-or-windows-api
|
||||
if (architecture == RuntimeCpu.amd64 && Environment.OSVersion.Version.Build >= 22000) return true;
|
||||
if (architecture == RuntimeCpu.x64 && Environment.OSVersion.Version.Build >= 22000) return true;
|
||||
}
|
||||
if (SystemArchitecture == RuntimeCpu.amd64) {
|
||||
if (architecture == RuntimeCpu.amd64) return true;
|
||||
if (SystemArchitecture == RuntimeCpu.x64) {
|
||||
if (architecture == RuntimeCpu.x64) return true;
|
||||
if (architecture == RuntimeCpu.x86) return true;
|
||||
}
|
||||
if (SystemArchitecture == RuntimeCpu.x86) {
|
||||
@@ -186,7 +186,7 @@ namespace Squirrel
|
||||
SystemArchitecture = RuntimeCpu.arm64;
|
||||
break;
|
||||
case "AMD64":
|
||||
SystemArchitecture = RuntimeCpu.amd64;
|
||||
SystemArchitecture = RuntimeCpu.x64;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,7 @@ namespace Squirrel
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
SystemArchitecture = Environment.Is64BitOperatingSystem ? RuntimeCpu.amd64 : RuntimeCpu.x86;
|
||||
SystemArchitecture = Environment.Is64BitOperatingSystem ? RuntimeCpu.x64 : RuntimeCpu.x86;
|
||||
#else
|
||||
CheckArchitectureOther();
|
||||
#endif
|
||||
@@ -215,7 +215,7 @@ namespace Squirrel
|
||||
|
||||
SystemArchitecture = RuntimeInformation.OSArchitecture switch {
|
||||
InteropArchitecture.X86 => RuntimeCpu.x86,
|
||||
InteropArchitecture.X64 => RuntimeCpu.amd64,
|
||||
InteropArchitecture.X64 => RuntimeCpu.x64,
|
||||
InteropArchitecture.Arm64 => RuntimeCpu.arm64,
|
||||
_ => RuntimeCpu.Unknown,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user