mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Check VelopackApp on compatible architectures
This commit is contained in:
@@ -25,7 +25,8 @@ public class OsxPackCommandRunner : PackageBuilder<OsxPackOptions>
|
||||
_ => throw new Exception($"Unsupported Mach-O machine type '{binary.Machine}'.")
|
||||
};
|
||||
|
||||
if (machine != VelopackRuntimeInfo.SystemArch) {
|
||||
// x64 is supported on arm64 but not the other way around
|
||||
if (machine != RuntimeCpu.x64 && machine != VelopackRuntimeInfo.SystemArch) {
|
||||
Log.Warn($"Skipping VelopackApp verification, because system architecture ({VelopackRuntimeInfo.SystemArch}) does not match main binary architecture ({machine}).");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,8 @@ public class WindowsPackCommandRunner : PackageBuilder<WindowsPackOptions>
|
||||
_ => throw new Exception($"Unsupported PE machine type '{binary.MachineType}'.")
|
||||
};
|
||||
|
||||
if (machine != VelopackRuntimeInfo.SystemArch) {
|
||||
// x86 is supported everywhere, otherwise we only check if the architecture matches the system architecture
|
||||
if (machine != RuntimeCpu.x86 && machine != VelopackRuntimeInfo.SystemArch) {
|
||||
Log.Warn($"Skipping VelopackApp verification, because system architecture ({VelopackRuntimeInfo.SystemArch}) does not match main binary architecture ({machine}).");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ public class WindowsPackTests
|
||||
Assert.Throws<UserInfoException>(() => runner.Run(options).GetAwaiterResult());
|
||||
}
|
||||
|
||||
[SkippableFact(Skip = "Need to sort out test binary architecture")]
|
||||
[SkippableFact]
|
||||
public void PackRefuseBuildingUnawareApp()
|
||||
{
|
||||
Skip.IfNot(VelopackRuntimeInfo.IsWindows);
|
||||
|
||||
Reference in New Issue
Block a user