Jump to content

Contributions:Patches: Difference between revisions

From BCI2000 Wiki
Mellinger (talk | contribs)
No edit summary
 
Mellinger (talk | contribs)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Patches==
Patches contain modifications to the BCI2000 source code that may affect a few files, or many.
Patches are modifications to the BCI2000 source code that may affect a few files, or many.
Typically, such modifications are made in order to add some configuration option to a BCI2000 module, or you make a small modification to an analysis tool in order to make it easier to use.
Typically, such modifications are made in order to add some configuration option to a BCI2000 module, or you make a small modification to an analysis tool in order to make it easier to use.
Patches are shared in form of text files that contain the differences between the unchanged source code, and your modified source code.
Patches are shared in form of text files that contain the differences between the unchanged source code, and your modified source code.


==Creating a Patch==
To download a patch, right-click its "Download" link below, and choose "Save file" or similar. Otherwise, the patch will be displayed as text in a browser window.
===Windows (TortoiseSVN)===
*If you added new files to the BCI2000 source code, make sure to add them to SVN by right-clicking and choosing TortoiseSVN->Add... from the context menu.
*Right-click your BCI2000 folder and choose TortoiseSVN->Create Patch... from the context menu.
*In the list of modified files, deselect those that contain changes unrelated to your modification, and click OK.
*In the File Save dialog, save the patch to any location, and provide a name that gives some idea about the modification.
===Command-line SVN===
*Make sure to call <code>svn add</code> on all files that you added to the source code.
*CD to the BCI2000 directory, and execute <code>svn diff > MyModification.patch</code>.


==Uploading a Patch==
Instructions how to apply a downloaded patch may be found at [[Programming Reference:Patches]]. There, it is also explained how to add your own patch to this wiki page.
No special permission is required to upload a patch. Everyone with a BCI2000 user account may log into the wiki, edit the patches page, and upload a patch. In order to upload a patch, please follow these steps:
 
*Make sure you are logged into the wiki. Use the "log in" link at the top right of the wiki page in order to log in. When prompted for a user account and password, use your BCI2000 user account.
==KeyToAdvance==
*Click the "Upload file" link from the wiki toolbox to the left. In the upload page, choose your patch file, and add a few lines of description. Then, click OK.
*Author: juergen.mellinger@uni-tuebingen.de
*Original SVN revision:  [https://{{SERVERNAME}}/tracproj/changeset/4234 4234]
*Obsolete since SVN revision: [https://{{SERVERNAME}}/tracproj/changeset/4259 4259] -- this patch's functionality has been added to BCI2000 in a more general form.
 
This patch adds a configuration option to the StimulusPresentation application. When a "KeyToAdvance" row is added to the "Stimuli" matrix, then the entries in this row represent keys that must be pressed in order for the presentation to advance from the stimulus associated with that key. Without the proper key press, presentation will wait indefinitely.
 
[https://{{SERVERNAME}}/wiki/images/8/84/KeyToAdvance.patch Download]
 
[https://{{SERVERNAME}}/wiki/index/Image:KeyToAdvance.patch File information page]
 
==See also==
[[Programming Reference:Patches]]
 
[[Category:Contents]]

Latest revision as of 09:39, 5 June 2023

Patches contain modifications to the BCI2000 source code that may affect a few files, or many. Typically, such modifications are made in order to add some configuration option to a BCI2000 module, or you make a small modification to an analysis tool in order to make it easier to use. Patches are shared in form of text files that contain the differences between the unchanged source code, and your modified source code.

To download a patch, right-click its "Download" link below, and choose "Save file" or similar. Otherwise, the patch will be displayed as text in a browser window.

Instructions how to apply a downloaded patch may be found at Programming Reference:Patches. There, it is also explained how to add your own patch to this wiki page.

KeyToAdvance

  • Author: juergen.mellinger@uni-tuebingen.de
  • Original SVN revision: 4234
  • Obsolete since SVN revision: 4259 -- this patch's functionality has been added to BCI2000 in a more general form.

This patch adds a configuration option to the StimulusPresentation application. When a "KeyToAdvance" row is added to the "Stimuli" matrix, then the entries in this row represent keys that must be pressed in order for the presentation to advance from the stimulus associated with that key. Without the proper key press, presentation will wait indefinitely.

Download

File information page

See also

Programming Reference:Patches