Skip to content

Commit

Permalink
PsychtoolboxPostInstallRoutine(): Detect and reject native Apple Sili…
Browse files Browse the repository at this point in the history
…con Matlab/Octave.

Point to Intel variants under Rosetta 2 emulation instead. Untested so far.
  • Loading branch information
kleinerm committed Dec 16, 2023
1 parent 40a4296 commit 7500f05
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Psychtoolbox/PsychtoolboxPostInstallRoutine.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function PsychtoolboxPostInstallRoutine(isUpdate, flavor)
% ??/??/2021 64-Bit Octave 6.1.0 support for Windows and OSX. (MK)
% 02/05/2023 64-Bit Octave 7.3.0 support for Windows and OSX. (MK)
% 03/12/2023 64-Bit Octave 8.1.0 support for OSX. (MK)
% 12/16/2023 Guard against running on macOS with Matlab/Octave for native Apple Silicon. (MK)

fprintf('\n\nRunning post-install routine...\n\n');

Expand Down Expand Up @@ -160,6 +161,14 @@ function PsychtoolboxPostInstallRoutine(isUpdate, flavor)
fprintf('Info: Failed to remove .svn subfolders from path. Not a big deal...\n');
end

% No Apple Silicon Matlab/Octave support yet. Only Rosetta 2 emulated Intel.
if IsOSX && IsARM
fprintf('Psychtoolbox does not yet work on native Matlab or Octave for Apple Silicon Macs with 64-Bit ARM architecture.\n');
fprintf('You may get a minimally functional Psychtoolbox by installing and running Matlab or Octave for 64-Bit Intel\n');
fprintf('under Rosetta 2 emulation.\n');
error('Tried to setup on native Matlab or Octave for Apple Silicon 64-Bit ARM. This is not supported.');
end

% 32-Bit Octave or 32-Bit Matlab on OSX? This is unsupported as of Version 3.0.11.
if (IsOSX || IsWin) && ~Is64Bit
fprintf('Psychtoolbox 3.0.13 and later versions do no longer work with 32-Bit versions of Octave or Matlab on OSX or Windows.\n');
Expand Down

0 comments on commit 7500f05

Please sign in to comment.