Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
en:develop:guidelines [2014/05/19 03:41] – external edit 127.0.0.1 | en:develop:guidelines [2023/09/26 13:22] – [Global/Shared/Private Headers] prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Getting started ==== | + | ===== Getting started |
Before you start coding, look at the sources and determine area in which you are interested to develop. We have wide range of tasks and, most probably, one of them will be interested for you. Only remember, our current main goal is to provide less or more full set of OS/2 API on top of L4 microkernel. | Before you start coding, look at the sources and determine area in which you are interested to develop. We have wide range of tasks and, most probably, one of them will be interested for you. Only remember, our current main goal is to provide less or more full set of OS/2 API on top of L4 microkernel. | ||
- | === Development Tools === | + | ==== Development Tools ==== |
^Language | ^Language | ||
|C |Open Watcom | | |C |Open Watcom | | ||
|C++ |Open Watcom | |C++ |Open Watcom | ||
+ | |Assembler | ||
|FORTRAN | |FORTRAN | ||
|Pascal | |Pascal | ||
|REXX | |REXX | ||
- | Other languages may be used to develop parts of the OS. However, they must be open source | + | Other languages may be used to develop parts of the OS. However, they must be Open Source |
When conflicting tools exists (ex. NMAKE and WMAKE) always use the Open Watcom tool. | When conflicting tools exists (ex. NMAKE and WMAKE) always use the Open Watcom tool. | ||
- | === Downloading and Compiling === | + | ==== Downloading and Compiling ==== |
+ | osFree sources are hosted at [[https:// | ||
- | First of all you need to download all above tools for your platform from corresponding sites: | + | osFree sources consist |
- | * [[http:// | + | FamilyAPI, MacroLib, fat32, jfs, os3 and others. |
- | * [[http:// | + | |
- | * [[http:// | + | |
- | You can [[en: | + | Hence, you need to clone the main osfree repo first, and then pull the submodules: |
- | Before compiling check files setvars-somename.cmd and somename.conf file, and change settings according your system. After changes just execute setvars-somename.cmd and enter | + | < |
+ | git clone https:// | ||
+ | git submodule update --init --recursive | ||
+ | git submodule update --remote --recursive | ||
+ | </ | ||
- | < | + | You need to download all above tools for your platform from corresponding sites. Use: |
- | build process will be started. For clean up source tree say | + | < |
+ | %root%\conf\scripts\_setup.{cmd|sh|bat} | ||
+ | </ | ||
- | < | + | , to pull the build dependencies. |
- | For more information about build system read [[en:bldenv|Build system]] document. | + | < |
- | === The Directory Tree === | + | build process will be started. |
- | Please look at the SVN code tree to understand how files are to be placed. Please understand that the osFree SVN tree containg the code for an operating | + | For more information about build system |
- | === Global/ | + | ==== The Directory Tree ==== |
- | Each level of the SVN tree contains two standard directories: | + | Please look at the source code tree to understand how files are to be placed. Please understand that the osFree source tree contains the code for an operating system and some toolkit tools. Please, DO NOT place unrelated tools or applications in this tree. The Toolkit is a set of helper utilities, which are built for development system (under which the OS is built). They are necessary for OS files building. |
+ | |||
+ | ==== Global/ | ||
+ | |||
+ | Each level of the source | ||
|// | |// | ||
Line 59: | Line 69: | ||
Example of use of common files: | Example of use of common files: | ||
- | <code c>// Use the normal OS/2 INCL_ since our toolkit is the OS/2 toolkit | + | <code c> |
+ | // Use the normal OS/2 INCL_ since our toolkit is the OS/2 toolkit | ||
#define INCL_DOSERROR | #define INCL_DOSERROR | ||
- | // Do NOT include | + | // Include |
- | #include <osfree.h> | + | #include <os2.h> |
// Include any needed normal C library | // Include any needed normal C library | ||
Line 74: | Line 85: | ||
</ | </ | ||
- | === Documentation === | + | ==== Documentation |
* Private code (not shared with other code) should be documented only in the source. | * Private code (not shared with other code) should be documented only in the source. | ||
- | * Shared code (shared with code at the same level or at all levels) should be documented in source and in a “building | + | * Shared code (shared with code at the same level or at all levels) should be documented in source and in a “[[en: |
* The API of the OS and the tools documentation should NOT be documented in the source tree but in the toolkit and release tree. | * The API of the OS and the tools documentation should NOT be documented in the source tree but in the toolkit and release tree. | ||
* Source code should be documented in the source file (not the header files). | * Source code should be documented in the source file (not the header files). | ||
Line 83: | Line 94: | ||
* Place comments in the source that helps the reader to understand the logic and don't overdo it. | * Place comments in the source that helps the reader to understand the logic and don't overdo it. | ||
- | === When Developing === | + | ==== When Developing |
* Use static linking, do not use dynamic libraries (LIBC style) or dynamic runtime. | * Use static linking, do not use dynamic libraries (LIBC style) or dynamic runtime. | ||
* Use the makefiles provided with the source tree, don't “do your own”. | * Use the makefiles provided with the source tree, don't “do your own”. | ||
- | * Currently osFree development is done on OS/2 (minimum Warp 4) but in the future development will be hosted on osFree. | + | * Currently osFree development is done on OS/2 (minimum Warp 4), Windows and Linux but in the future development will be hosted on osFree. |
- | * We use SVN to share code among developers. | + | * We use Git to share code among developers. |
* We use Doxygen and Wiki to document our work. | * We use Doxygen and Wiki to document our work. | ||
- | |||
- | === Submitting a Patch (FIX THIS!!!) === | ||
- | |||
- | * Make sure your changes follow the coding guidelines above. | ||
- | * Make sure you are using the current versions of the sources so that the resulting diffs are comparing your changes with the head of the source tree. | ||
- | * Create your patch either by using cvs diff -u (if you are using CVS) or diff -u original-file changed-file (if you are using a source archive - you can also create differences for the whole directory contents using diff -r) In the latter case include the old code first, the new code last – in the patch anything you added will be prefixed with a +. | ||
- | * Remove all/any lines that reference files without changes. | ||
- | * Send the patch file as an attachment in your email. Do not paste the patch directly into the email body. | ||
- | * Maintainers will often reply in response to your patch, pointing out things to fix up, etc. before a patch can be checked in. Please always follow the maintainer suggestions closely and respond by sending a new corrected patch. Please do not expect the maintainers to rework your changes, you want to be able to claim all the credit for your great patches! | ||
~~DISCUSSION~~ | ~~DISCUSSION~~ | ||