Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Changes

Jump to: navigation, search

Howto:Submit patches

1,498 bytes added, 16:53, 6 May 2012
m
moved Howto: Submit patches to Howto:Submit patches: Robot: Moved page
==Guidelines = Patch Guidlines === 
Any invasive or non-trivial patches should preferably adhere to the following recommendations:
Try to make your patch optionally minimally invasive* Search the [http* provide compile time switches to generally enable or disable your modifications //sourceforge.net/mailarchive/forum.php?forum_name=flightgear-devel flightgear-devel list archives] (i[http://www.eflightgear. using #ifdefs, autoconf and automake macrosorg/mail.html old]) That way, you will ensure that for any relevant discussion and then post to the flightgear-devel [[mailing list]] describing your patch can be easily disabled (excluded from compilation while remaining in idea and discussing the source tree) if it should cause trouble while any issues are addressedscope of effort required.* provide capabilities If you have developed several different features, make sure '''not''' to enable or disable your code modifications at startup time or even at runtimeprovide one big patch for all of these changes, using command line options or preferably but instead several smaller ones for each individual feature (likewise, use separate threads on the PropertyTree and some simple GUI dialog to enable developers and users to decide whether they want to activate your code. That waymailing list as well), it can be ensured that your code doesn't interfere with any other FlightGear components. This way you will make potential bug tracking much easier. Try enable developers to carefully document those passages in easily and independently review/discuss your source code thatpatches [http:* are non//www.mail-obvious* are hackish or workarounds* use code where you yourself aren't entirely sure if you're doing the right thing* are known to negatively interfere with other FlightGear code === Patch Format ===TODO: unified diff vsarchive. tarball (compressed archives) === Howto Create Patches ===TODO: links to diffcom/patch tutorialslink to diffflightgear-devel@lists.sourceforge.net/patch utilities for various platformsmsg16986.html].
recommended* Try to make your patch optionally minimally invasive: KDiff3 ** provide compile time switches to generally enable or disable your modifications (QT based cross platformi.e. using #ifdefs, GUI frontend to GNU diff[http://sources.redhat.com/autobook/ autoconf and automake] macros) That way, you will ensure that your patchcan be easily disabled (excluded from compilation while remaining in the source tree)if it should cause trouble while any issues are addressed. This applies in particular if your patch introduces any extra dependencies (i.e. libraries) or is any way platform specific.http:** provide capabilities to enable or disable your code modifications at startup time or even at runtime, using command line options (check out $FG_SRC/Main/kdiff3options.sourceforgecxx) or preferably the PropertyTree/SGPropertyListeners and some simple GUI dialog (check out $FG_ROOT/gui) to enable developers and users to decide whether they want to activate your code.netThat way, it can be ensured that your code doesn't interfere with any other FlightGear components. This will make potential bug tracking much easier and the chances of your code remaining in the source tree are much better as well.** if you intend to add new features that may benefit from proper documentation, make sure to also provide patches to the documentation files provided under $FG_SRC/mini-docs and $FG_ROOT/Docs** new command line switches should also be documented via options.xml* Try to carefully document those passages in your source code that:** are non-obvious or unfinished** are hackish or workarounds** use code where you yourself aren't entirely sure if you're doing the right thing** are known to negatively interfere with other FlightGear code** seem to affect overall runtime performance of FlightGear
=== Where * Try to Send Patches ===make sure that your code isn't platform-specific. Hence, it is generally a good idea to make any contributions as cross-platform capable as possible
'''Developers with CVS access :'''* If you need to print output to the terminal, make sure to use the SG_LOG logging mechanism, using the appropriate log level. Use this command sparingly, as excessive logging information has negative impact on framerate, especially on some platforms (you can however easily use switches to generally enable/disable output of debugging information). When committing a patch, make sure you have either removed or commented out any cout or cerr statements that you have used during private debugging sessions.
'''FlightGear developer mailing list(subscription required)'''== Howto create and share patches =={{Main article|Merge request}}
(any non-trivial or larger patches should preferably not be sent by email, but rather made available by putting a tarball of your patch on some free webspace, so that people can simply download your patch if they are interested[[Category:Development]]
4,400
edits

Navigation menu