Skip to content

Commit

Permalink
Downloaders/Updaters etc.: Update again for final SVN death on GitHub.
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinerm committed Jan 25, 2024
1 parent 8351c4f commit ec08ed6
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 65 deletions.
61 changes: 27 additions & 34 deletions Psychtoolbox/DownloadAdditionsForLinux.m
Original file line number Diff line number Diff line change
@@ -1,49 +1,40 @@
function DownloadAdditionsForLinux(targetdirectory, flavor)
% DownloadAdditionsForLinux(targetdirectory [, flavor]);
%
% Install missing Matlab or Octave mex files for older versions of the
% Psychtoolbox, as provided by some Linux distributions, e.g., Ubuntu 12.10
% or (as of April 2013) 13.04.
% THIS FUNCTION DOES NO LONGER WORK, AS GITHUB HAS REMOVED THEIR
% SUBVERSION FRONTEND, WHICH IT CRITICALLY REQUIRES, FROM THEIR SERVICES
% PERMANENTLY AT 8TH JANUARY 2024.
%
% It needs Subversion to be installed on your machine (sudo apt-get install
% subversion).
% Due to the lack of financial support for Psychtoolbox by the vast
% majority of our non-paying users, we did not and currently do not have
% the funding to work on a good alternative solution for this.
%
% You *do not need* this function if you downloaded Psychtoolbox from its
% home-site via DownloadPsychtoolbox(), or if you install Psychtoolbox from
% the NeuroDebian repository. If you install from NeuroDebian, simply
% install these packages:
%
% For Matlab:
%
% Basic Mex files: sudo apt-get install matlab-psychtoolbox-3
% Datapixx and Eyelink: sudo apt-get install matlab-psychtoolbox-3-nonfree
% Try to manually download and install the Datapixx or Eyelink mex files,
% which this function would normally install for you. Other than that,
% see http://psychtoolbox.org/download.html#alternate-download for a
% workable, although way less convenient and advanced, download and
% installation method, via zip file download and execution of
% SetupPsychtoolbox(). Good luck!
%
% For Octave, if you want to use the Datapixx or Eyelink functions:
% sudo apt-get install octave-psychtoolbox-3-nonfree
% =========================================================================
%
% However, some Linux distributinos bundle Psychtoolbox as part of their
% standard package repository, e.g., Ubuntu 12.10 and 13.04, and they
% provide outdated packages (as of April 2013) which require you to run
% this script manually after each installation or update in order to
% retrieve mex files for Matlab, or the Datapixx and Eyelink mex files for
% octave.
% Install missing Matlab or Octave mex files for versions of the Psychtoolbox
% which are directly provided by some Linux distributions, e.g., Ubuntu 20.04
% and later.
%
% You can call this function from within Matlab, providing the full path to
% a directory. The function will create a new folder PsychtoolboxAddOns
% inside that directory and add it to your path. The add on files will be
% downloaded from the Psychtoolbox main repository and stored there.
% You *DO NOT NEED* this function if you downloaded Psychtoolbox from its
% home-site via DownloadPsychtoolbox(), or if you install Psychtoolbox from
% the NeuroDebian repository. If you installed from NeuroDebian, then for
% Matlab nothing extra needs to be done. For Octave, to add the Datapixx
% or Eyelink functions execute this in a terminal:
%
% After this function successfully completes, your Psychtoolbox should work
% with Matlab on Linux as well.
% sudo apt install octave-psychtoolbox-3-nonfree
%
% If you call this function from within Octave, it will download only a few
% additional addon files for the Octave Psychtoolbox. Currently the only
% added files are the Eyelink mex files for SR-Research Eyelink
% If you would call this function from within Octave, it will download only
% a few additional addon files for the Octave Psychtoolbox. Currently the
% only added files are the Eyelink mex files for SR-Research Eyelink
% Gazetrackers, and the Datapixx mex file for VPixx Inc. products.
%
% This function should eventually become obsolete when the regular mainstream
% Linux distributions update their packaged versions of Psychtoolbox.
%

% History:
% 29.09.2011 mk Written.
Expand All @@ -64,6 +55,8 @@ function DownloadAdditionsForLinux(targetdirectory, flavor)
% R2013a and later.
%

error('Function aborted due to currently unsupported update method. Read "help DownloadAdditionsForLinux".');

% Psychtoolbox package installed?
if ~exist('/usr/share/octave/site/m/psychtoolbox-3/', 'dir')
fprintf('This system is missing a octave-psychtoolbox-3 installation.\n');
Expand Down
38 changes: 24 additions & 14 deletions Psychtoolbox/DownloadPsychtoolbox.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
function DownloadPsychtoolbox(targetdirectory, flavor, targetRevision, downloadmethod, tryNonInteractiveSetup)
% DownloadPsychtoolbox([targetdirectory][, flavor][, targetRevision][, downloadmethod][, tryNonInteractiveSetup=0])
%
% THIS DOWNLOADER DOES NO LONGER WORK, AS GITHUB HAS REMOVED THEIR
% SUBVERSION FRONTEND, WHICH IT CRITICALLY REQUIRES, FROM THEIR SERVICES
% PERMANENTLY AT 8TH JANUARY 2024.
%
% Due to the lack of financial support for Psychtoolbox by the vast
% majority of our non-paying users, we did not and currently do not have
% the funding to work on a good alternative solution for this. Therefore
% this convenient installation and update method will be unavailable for an
% unknown period of time.
%
% See http://psychtoolbox.org/download.html#alternate-download for a
% workable, although way less convenient and advanced, download and
% installation method, via zip file download and execution of
% SetupPsychtoolbox(). Good luck!
%
% =========================================================================
%
% This script downloads the latest GNU/Linux, MS-Windows, or Apple macOS
% Psychtoolbox-3, version 3.0.10 or later, from our git-server to your
% disk, creating your working copy, ready to use as a new toolbox in your
Expand Down Expand Up @@ -370,27 +387,20 @@ function DownloadPsychtoolbox(targetdirectory, flavor, targetRevision, downloadm
end

% It's the end of the world as we know it...
if datenum(date) > datenum('8-Jan-2024') %#ok<*DATE,*DATNM>
fprintf('This Downloader does no longer work after 8th January 2024, as GitHub has removed its\n');
fprintf('Subversion download frontend from their services permanently at that day.\n\n');
else
fprintf('This Downloader will no longer work, starting at or after 8th January 2024, as GitHub will\n');
fprintf('remove its Subversion download frontend from their services permanently at that day.\n');
fprintf('Before this deadline, there may be multiple temporary hour-long or day-long brownouts,\n');
fprintf('resulting in download failure, as a heads-up by GitHub about the upcoming permanent end of service.\n\n');
end

fprintf('This Downloader does no longer work, as GitHub has removed their Subversion frontend,\n');
fprintf('which we critically require, from their services permanently at 8th January 2024.\n\n');
fprintf('Due to the lack of financial support for Psychtoolbox by the vast majority of our non-paying users,\n');
fprintf('we did not and currently do not have the funding to work on a good alternative solution for this.\n');
fprintf('Therefore this convenient installation and update method will be unavailable for an unknown period\n');
fprintf('of time.\n\n');
fprintf('See http://psychtoolbox.org/download.html#alternate-download for a workable, although way less\n');
fprintf('convenient and advanced download and installation method, via zip file download and execution\n');
fprintf('convenient and advanced, download and installation method, via zip file download and execution\n');
fprintf('of SetupPsychtoolbox(). Good luck!\n\n\n');
error('Updater aborted due to currently unsupported update method.');

if datenum(date) > datenum('8-Jan-2024')
error('Downloader aborted due to currently unsupported installation method.');
end
% After date check, leave here commented out as it may be useful in the future...
%if datenum(date) > datenum('8-Jan-2024') %#ok<*DATE,*DATNM>
%end

oldpause = pause('query');
if tryNonInteractiveSetup
Expand Down
Binary file modified Psychtoolbox/DownloadPsychtoolbox.m.zip
Binary file not shown.
44 changes: 27 additions & 17 deletions Psychtoolbox/UpdatePsychtoolbox.m
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
function UpdatePsychtoolbox(targetdirectory, targetRevision, tryNonInteractiveSetup)
% UpdatePsychtoolbox([targetdirectory][, targetRevision][, tryNonInteractiveSetup=0])
%
% THIS UPDATER DOES NO LONGER WORK, AS GITHUB HAS REMOVED THEIR
% SUBVERSION FRONTEND, WHICH IT CRITICALLY REQUIRES, FROM THEIR SERVICES
% PERMANENTLY AT 8TH JANUARY 2024.
%
% Due to the lack of financial support for Psychtoolbox by the vast
% majority of our non-paying users, we did not and currently do not have
% the funding to work on a good alternative solution for this. Therefore
% this convenient installation and update method will be unavailable for an
% unknown period of time.
%
% See http://psychtoolbox.org/download.html#alternate-download for a
% workable, although way less convenient and advanced, download and
% installation method, via zip file download and execution of
% SetupPsychtoolbox(). Good luck!
%
% =========================================================================
%
% Update your working copy of the Psychtoolbox with the latest bug fixes,
% enhancements, and features from our Git server.
%
% If you are using a Psychtoolbox provided by NeuroDebian, then this is not
% needed. You will be automatically notified of updates to Psychtoolbox by
% your operating systems update manager as soon as they become available.
% your operating systems update manager, as soon as they become available.
%
% The "targetdirectory" argument is optional. If present, it specifies the path
% of the Psychtoolbox folder to update. If omitted, UpdatePsychtoolbox will
Expand All @@ -26,8 +43,8 @@ function UpdatePsychtoolbox(targetdirectory, targetRevision, tryNonInteractiveSe
% multiple times with the 'PREV' specifier, you could incrementally
% downgrade until stuff works for you.
%
% UpdatePsychtoolbox cannot change the beta-vs-stable flavor of your
% Psychtoolbox. To change the flavor, run DownloadPsychtoolbox again.
% UpdatePsychtoolbox cannot change the flavor of your Psychtoolbox. To
% change the flavor, run DownloadPsychtoolbox again.
%
% The optional parameter 'tryNonInteractiveSetup' if provided as 1 (true), will
% try a setup without user interaction, not asking users for input in certain
Expand Down Expand Up @@ -109,27 +126,20 @@ function UpdatePsychtoolbox(targetdirectory, targetRevision, tryNonInteractiveSe
end

% It's the end of the world as we know it...
if datenum(date) > datenum('8-Jan-2024') %#ok<*DATE,*DATNM>
fprintf('This Updater does no longer work after 8th January 2024, as GitHub has removed its\n');
fprintf('Subversion download frontend from their services permanently at that day.\n\n');
else
fprintf('This Updater will no longer work, starting at or after 8th January 2024, as GitHub will\n');
fprintf('remove its Subversion download frontend from their services permanently at that day.\n');
fprintf('Before this deadline, there may be multiple temporary hour-long or day-long brownouts,\n');
fprintf('resulting in update failure, as a heads-up by GitHub about the upcoming permanent end of service.\n\n');
end

fprintf('This Updater does no longer work, as GitHub has removed their Subversion frontend,\n');
fprintf('which we critically require, from their services permanently at 8th January 2024.\n\n');
fprintf('Due to the lack of financial support for Psychtoolbox by the vast majority of our non-paying users,\n');
fprintf('we did not and currently do not have the funding to work on a good alternative solution for this.\n');
fprintf('Therefore this convenient installation and update method will be unavailable for an unknown period\n');
fprintf('of time.\n\n');
fprintf('See http://psychtoolbox.org/download.html#alternate-download for a workable, although way less\n');
fprintf('convenient and advanced download and installation method, via zip file download and execution\n');
fprintf('convenient and advanced, download and installation method, via zip file download and execution\n');
fprintf('of SetupPsychtoolbox(). Good luck!\n\n\n');
error('Updater aborted due to currently unsupported update method.');

if datenum(date) > datenum('8-Jan-2024')
error('Updater aborted due to currently unsupported update method.');
end
% After date check, leave here commented out as it may be useful in the future...
%if datenum(date) > datenum('8-Jan-2024') %#ok<*DATE,*DATNM>
%end

oldpause = pause('query');
if tryNonInteractiveSetup
Expand Down

0 comments on commit ec08ed6

Please sign in to comment.