Skip to content

Commit

Permalink
build ftgl drawtext plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
iandol committed Dec 6, 2022
1 parent 43e8a1e commit 0b84c80
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
9 changes: 7 additions & 2 deletions PsychSourceGL/Cohorts/FTGLTextRenderer/makeftglplugin.m
Expand Up @@ -28,8 +28,13 @@

if IsLinux
if Is64Bit
cmd='g++ -g -fPIC -I. -I/usr/include/ -I/usr/include/freetype2/ -L/usr/lib -pie -shared -Wl,-Bsymbolic -Wl,-Bsymbolic-functions -Wl,--version-script=linuxexportlist.txt -o libptbdrawtext_ftgl64.so.1 libptbdrawtext_ftgl.cpp qstringqcharemulation.cpp OGLFT.cpp -lGL -lGLU -lfontconfig -lfreetype';
name = 'libptbdrawtext_ftgl64.so.1';
if IsARM
cmd='g++ -g -fPIC -I. -I/usr/include/ -I/usr/include/freetype2/ -L/usr/lib -pie -shared -Wl,-Bsymbolic -Wl,-Bsymbolic-functions -Wl,--version-script=linuxexportlist.txt -o libptbdrawtext_2_64.so.1 libptbdrawtext_ftgl.cpp qstringqcharemulation.cpp OGLFT.cpp -lGL -lGLU -lfontconfig -lfreetype';
name = 'libptbdrawtext_2_64.so.1';
else
cmd='g++ -g -fPIC -I. -I/usr/include/ -I/usr/include/freetype2/ -L/usr/lib -pie -shared -Wl,-Bsymbolic -Wl,-Bsymbolic-functions -Wl,--version-script=linuxexportlist.txt -o libptbdrawtext_ftgl64.so.1 libptbdrawtext_ftgl.cpp qstringqcharemulation.cpp OGLFT.cpp -lGL -lGLU -lfontconfig -lfreetype';
name = 'libptbdrawtext_ftgl64.so.1';
end
else
if IsARM
cmd='g++ -g -fPIC -I. -I/usr/include/ -I/usr/include/freetype2/ -L/usr/lib -pie -shared -Wl,-Bsymbolic -Wl,-Bsymbolic-functions -Wl,--version-script=linuxexportlist.txt -o libptbdrawtext_ftgl_arm.so.1 libptbdrawtext_ftgl.cpp qstringqcharemulation.cpp OGLFT.cpp -lGL -lGLU -lfontconfig -lfreetype';
Expand Down
Binary file not shown.
8 changes: 6 additions & 2 deletions Psychtoolbox/PsychtoolboxPostInstallRoutine.m
Expand Up @@ -325,6 +325,10 @@ function PsychtoolboxPostInstallRoutine(isUpdate, flavor)
if exist([PsychtoolboxRoot 'PsychBasic' filesep 'Octave3LinuxFilesARM'], 'dir')
rmpath([PsychtoolboxRoot 'PsychBasic' filesep 'Octave3LinuxFilesARM']);
end

if exist([PsychtoolboxRoot 'PsychBasic' filesep 'Octave5LinuxFilesARM64'], 'dir')
rmpath([PsychtoolboxRoot 'PsychBasic' filesep 'Octave5LinuxFilesARM64']);
end

if exist([PsychtoolboxRoot 'PsychBasic' filesep 'Octave5LinuxFiles64'], 'dir')
rmpath([PsychtoolboxRoot 'PsychBasic' filesep 'Octave5LinuxFiles64']);
Expand Down Expand Up @@ -385,9 +389,9 @@ function PsychtoolboxPostInstallRoutine(isUpdate, flavor)
octavepatchv = octavev(3);

fprintf('Octave major version %i detected. Will prepend the following folder to your Octave path:\n', octavemajorv);

% Octave on Linux with ARM processor, e.g., RaspberryPi?
if IsLinux && IsARM
if IsLinux && IsARM && ~Is64Bit
% 32-Bit ARM can currently share mex files from Octave 3.8 to at least 6.2,
% so treat it as Octave 3.8, and all versions will share the same folder:
octavemajorv = 3;
Expand Down

0 comments on commit 0b84c80

Please sign in to comment.