Jump to content

Contributions:Patches: Difference between revisions

From BCI2000 Wiki
Mellinger (talk | contribs)
Mellinger (talk | contribs)
 
(9 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 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.
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.


Information about how to use patches may be found at [[Programming Reference:Patches]].
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.


==Applying 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.
Applying a patch will apply the modifications recorded in the patch file, to your version of the source code. To apply a patch, follow these steps:
*Download the patch file.
*With TortoiseSVN, right-click the BCI2000 folder to which you want to apply the patch, and choose TortoiseSVN->Apply Patch... Then, choose the downloaded patch file.
*When using a Unix-based operating system, cd to the BCI2000 top level directory. Then, execute <code>patch < /path/to/downloaded/patch</code>.
*When application of the patch fails, open the patch file with a text editor, and determine the SVN revision against which the patch was created. Then, do a new checkout of that revision, and apply the patch there.


==Creating a Patch==
==KeyToAdvance==
===Windows (TortoiseSVN)===
*Author: juergen.mellinger@uni-tuebingen.de
*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.
*Original SVN revision:  [https://{{SERVERNAME}}/tracproj/changeset/4234 4234]
*Right-click your BCI2000 folder and choose TortoiseSVN->Create Patch... from the context menu.
*Obsolete since SVN revision: [https://{{SERVERNAME}}/tracproj/changeset/4259 4259] -- this patch's functionality has been added to BCI2000 in a more general form.
*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==
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.
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.
*Click the "Upload file" link from the wiki toolbox to the left. In the upload page, choose your patch file, and put a few lines of description into the "Summary" field. Then, click "upload".


==Contributed Patches==
[https://{{SERVERNAME}}/wiki/images/8/84/KeyToAdvance.patch Download]
===KeyToAdvance===
 
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/index/Image:KeyToAdvance.patch File information page]


[http://{{{servername}}}/wiki/index.php Download]
==See also==
[[Programming Reference:Patches]]


[[Image:KeyToAdvance.patch||Description page]]
[[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