Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update mac x64 installer script arch detection
  • Loading branch information
sfoslund committed Sep 17, 2021
commit e8951bf883cad27d9495c1964672a4a185eed483
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,16 @@ public override bool Execute()

var archScriptContent = @"<![CDATA[
function IsX64Machine() {
var machine = system.sysctl(""hw.machine"");
system.log(""Machine type: "" + machine);
var result = machine == ""x64"" || machine.endsWith(""_x64"");
system.log(""IsX64Machine: "" + result);
return result;
var machine = system.sysctl(""hw.foo"");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is .foo a typo or is it to imply that hw .anything returns machine architecture?

var cputype = system.sysctl(""hw.cputype"");
var cpu64 = system.sysctl(""hw.cpu64bit_capable"");
system.log(""Machine type: "" + machine);
system.log(""Cpu type: "" + cputype);
system.log(""64-bit: "" + cpu64);

var result = machine == ""amd64"" || machine == ""x86_64"" || cputype == ""16777223"" || (cputype == ""7"" && cpu64 == ""1"");
system.log(""IsX64Machine: "" + result);
return result;
}
]]>";
var scriptElement = new XElement("script", new XText(archScriptContent));
Expand Down