|
1 | 1 | function checkDependencies() |
2 | | -% Checks that the right dependencies are installed. |
3 | | - |
4 | | -printCredits() |
5 | | - |
6 | | -PTB.major = 3; |
7 | | -PTB.minor = 0; |
8 | | -PTB.point = 14; |
9 | | - |
10 | | -fprintf('Checking dependencies\n') |
11 | | - |
12 | | -% check ptb version |
13 | | -try |
14 | | - |
15 | | - [~, versionStruc] = PsychtoolboxVersion; |
16 | | - |
17 | | - fprintf(' Using PTB %i.%i.%i\n', ... |
18 | | - versionStruc.major, ... |
19 | | - versionStruc.minor, ... |
20 | | - versionStruc.point) |
21 | | - |
22 | | - if any( [... |
23 | | - versionStruc.major < PTB.major, ... |
24 | | - versionStruc.minor < PTB.minor, ... |
25 | | - versionStruc.point < PTB.point, ... |
26 | | - ]) |
27 | | - |
28 | | - str = sprintf('%s %i.%i.%i %s.\n%s', ... |
29 | | - 'The current version PTB version is not', ... |
30 | | - PTB.major, ... |
31 | | - PTB.minor, ... |
32 | | - PTB.point, ... |
33 | | - 'In case of problems (e.g json file related) consider updating.'); |
34 | | - warning(str); %#ok<*SPWRN> |
35 | | - end |
36 | | -catch |
37 | | - error('Failed to check the PTB version: Are you sure that PTB is in the matlab path?') |
38 | | -end |
| 2 | + % Checks that the right dependencies are installed. |
| 3 | + |
| 4 | + printCredits(); |
| 5 | + |
| 6 | + PTB.major = 3; |
| 7 | + PTB.minor = 0; |
| 8 | + PTB.point = 14; |
| 9 | + |
| 10 | + fprintf('Checking dependencies\n'); |
39 | 11 |
|
| 12 | + % check ptb version |
| 13 | + try |
| 14 | + |
| 15 | + [~, versionStruc] = PsychtoolboxVersion; |
| 16 | + |
| 17 | + fprintf(' Using PTB %i.%i.%i\n', ... |
| 18 | + versionStruc.major, ... |
| 19 | + versionStruc.minor, ... |
| 20 | + versionStruc.point); |
| 21 | + |
| 22 | + if any([ ... |
| 23 | + versionStruc.major < PTB.major, ... |
| 24 | + versionStruc.minor < PTB.minor, ... |
| 25 | + versionStruc.point < PTB.point, ... |
| 26 | + ]) |
| 27 | + |
| 28 | + str = sprintf('%s %i.%i.%i %s.\n%s', ... |
| 29 | + 'The current version PTB version is not', ... |
| 30 | + PTB.major, ... |
| 31 | + PTB.minor, ... |
| 32 | + PTB.point, ... |
| 33 | + 'In case of problems (e.g json file related) consider updating.'); |
| 34 | + warning(str); %#ok<*SPWRN> |
| 35 | + end |
| 36 | + catch |
| 37 | + error('Failed to check the PTB version: Are you sure that PTB is in the matlab path?'); |
| 38 | + end |
40 | 39 |
|
41 | | -fprintf(' We got all we need. Let us get to work.\n') |
| 40 | + fprintf(' We got all we need. Let us get to work.\n'); |
42 | 41 |
|
43 | 42 | end |
0 commit comments