Difference between revisions of "patches Welcome"

From OpenKore Wiki
Jump to navigation Jump to search
m
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== License ==
 
== License ==
OpenKore is licensed under GNU General Public License. That basically means that anyone can modify it; and anyone can distribute modified OpenKore as long as all the source code included.
+
OpenKore is a [[wikipedia:free software]] licensed under the terms of [http://www.gnu.org/licenses/gpl.html GNU General Public License]. In short, it means:
 +
 
 +
* anyone can run it for any purpose;
 +
* anyone can study how it works, and change it to make it do what they with;
 +
* anyone can redistribute it;
 +
* anyone can improve it, and release their improvements (and modified versions in general) to the public, so that the whole community benefits.
 +
 
 +
This overview DOES NOT replace actual license in any way. You need to read and understand actual license before using or contributing to this project.
 +
 
 +
Note that the greater part of OpenKore runs directly from the source (and the other is meant to be compiled right before running).
  
 
== Ways of Modification ==
 
== Ways of Modification ==
* Write a plugin. Plugins can use various hooks to alter OpenKore's behavior, and they can be easily (un)installed without modifications of OpenKore itself.
+
=== Plugin ===
* Make a patch (modify OpenKore source code).
+
[[:Category:Plugins|Plugin]] is a [http://perl.org/ Perl] script OpenKore runs and interacts with via various hooks. As plugins use the same Perl interpreter as OpenKore, they can use its internals and symbolic table manupulation to alter just about anything.
  
== Sharing Plugins ==
+
Benefits of plugins over patches:
Post your plugin in corresponding forum section, like "Other Plugins". Include instructions of how to use and description.
+
* Plugins can be easily (un)installed without modifications of OpenKore itself.
 +
* Plugins are independent from OpenKore modifications to some degree, so unless there is really incompatible update, they will keep working.
  
== Sharing Patches ==
+
To share your plugin, post it with description and instructions in corresponding forum section, like "Other Plugins".
If you're fixing errors or server support, make sure that isn't fixed yet in trunk.
 
  
<span style="color:red;">Don't just post your whole OpenKore directory, that most likely will result in deleting your post</span> (unless you're really know what you're doing ­— in this case, post svn working copy anyway).
+
Plugins could be added to OpenKore svn, for committing you need to gain write access or ask ones who have it.
 +
 
 +
=== Patch ===
 +
"Patch" is a direct modification of OpenKore source code. That's needed in the first place for fixing bugs in the existing stuff.
 +
 
 +
'''<span style="color:red;">To share your patch, don't just post your whole OpenKore directory (bonus points: on a random JavascriptFlashWaitBeforeDownload file hosting), that most likely will result in deleting your post</span>'''.
  
 
'''Instead, post a diff file and specify a svn revision you've worked with.'''
 
'''Instead, post a diff file and specify a svn revision you've worked with.'''
Benefits:
+
 
 +
Benefits of diffs:
 
* Your patch most likely can be applied to subsequent revisions.
 
* Your patch most likely can be applied to subsequent revisions.
 
* Modified with your patch OpenKore can be updated without disturbing your applied patch.
 
* Modified with your patch OpenKore can be updated without disturbing your applied patch.
Line 21: Line 36:
 
* Developers can commit your patch into trunk way more easily.
 
* Developers can commit your patch into trunk way more easily.
  
Diff file can be created with svn client from your modified working copy with <code>svn diff</code>.
+
Use [[SVN|svn client]] or [[wikipedia:diff|other tools]] to create and apply diffs.
 +
 
 +
If you're posting a diff file, you can also optionally post OpenKore with that patch applied or just changed files. But that is unnecessary.
  
Diff file can be applied to your OpenKore with <code>patch</code>.
+
== Notes ==
  
On Windows, TortoiseSVN can be used.
+
=== Archive formats ===
  
If you're posting a diff file, you can optionally post OpenKore with that patch applied or just changed files. But that is unnecessary.
+
If you're posting an archive, do not use proprietary formats like ''rar''. It just can't be unpacked on many systems. If developer or any other peer would be unable to unpack your archive, most likely he will just ignore you. There are a lot of suitable interoperable formats around, like ''tar'', ''zip'' etc.

Revision as of 12:00, 6 December 2012

License

OpenKore is a wikipedia:free software licensed under the terms of GNU General Public License. In short, it means:

  • anyone can run it for any purpose;
  • anyone can study how it works, and change it to make it do what they with;
  • anyone can redistribute it;
  • anyone can improve it, and release their improvements (and modified versions in general) to the public, so that the whole community benefits.

This overview DOES NOT replace actual license in any way. You need to read and understand actual license before using or contributing to this project.

Note that the greater part of OpenKore runs directly from the source (and the other is meant to be compiled right before running).

Ways of Modification

Plugin

Plugin is a Perl script OpenKore runs and interacts with via various hooks. As plugins use the same Perl interpreter as OpenKore, they can use its internals and symbolic table manupulation to alter just about anything.

Benefits of plugins over patches:

  • Plugins can be easily (un)installed without modifications of OpenKore itself.
  • Plugins are independent from OpenKore modifications to some degree, so unless there is really incompatible update, they will keep working.

To share your plugin, post it with description and instructions in corresponding forum section, like "Other Plugins".

Plugins could be added to OpenKore svn, for committing you need to gain write access or ask ones who have it.

Patch

"Patch" is a direct modification of OpenKore source code. That's needed in the first place for fixing bugs in the existing stuff.

To share your patch, don't just post your whole OpenKore directory (bonus points: on a random JavascriptFlashWaitBeforeDownload file hosting), that most likely will result in deleting your post.

Instead, post a diff file and specify a svn revision you've worked with.

Benefits of diffs:

  • Your patch most likely can be applied to subsequent revisions.
  • Modified with your patch OpenKore can be updated without disturbing your applied patch.
  • People can quickly inspect and understand your modifications and provide more intelligent feedback.
  • Developers can commit your patch into trunk way more easily.

Use svn client or other tools to create and apply diffs.

If you're posting a diff file, you can also optionally post OpenKore with that patch applied or just changed files. But that is unnecessary.

Notes

Archive formats

If you're posting an archive, do not use proprietary formats like rar. It just can't be unpacked on many systems. If developer or any other peer would be unable to unpack your archive, most likely he will just ignore you. There are a lot of suitable interoperable formats around, like tar, zip etc.