Home Tools Inception
Vendor Branches Procedure Print
Written by Samuel E. Henley   
Thursday, 01 October 2009 10:25

Initial Branch

To establish an initial branch – download or export from the vendors svn, a copy of the current vendor source, renaming the directory to something suitable (ogre, wxwidgets etc.). From the OSRail repository import the newly named directory into the top directory of the repository under vendor. OSRail does not use tags for vendor branches so note the revision in the import comment for example (CMake maintenance branch branch 2.8.0 - last change Nov 11, 2009 svn-1347) it will be required to identify the revision for a merge of a newer revision to the trunk line of CMake.

Update a Branch

To update a vendor branch - download or export from the vendors svn, a copy of the updated vendor source, use the vendor branch name (cmake-2.8.0). Checkout the vendor directory under the vendor directory in the top of the OSRail repository (http://wush.net/svn/sehenley/vendor/cmake). Use the operating system to copy or move the exported vendor source to the checked out vendor source. Check for files and directories that have been removed and use svn to remove them from the working copy. Comment the working copy to the repository.

--- Or

Checkout the new cmake branch/tag to the working directory cmake-2.8.0 (http://www.cmake.org)

Run the Perl script svn_load_dirs.pl. In the working directory (not free, no copyright, not available from Debian site, but available from http://subversion.tigris.org)

./svn_load_dirs.pl http://wush.net/svn/sehenley/vendor cmake cmake-2.8.0

 

Update the Trunk

To update the trunk vendor branch – checkout the trunk vendor branch (http://wush.net/svn/sehenley/trunk/vendor/cmake). From the repository merge the previous vendor branch in the top directory with the current vendor branch into the checked out version of the trunk vendor branch. For example http://wush.net/svn/sehenley/vendor/cmake (svn revision 1324 ) is merged with http://wush.net/svn/sehenley/vendor/cmake (svn revision (head) ) into working directory c:/working/cmake. Resolve any conflicts etc. and commit the result back to the trunk. Use this copy to make any program changes required and commit them to the trunk branch after testing.

Caution: The Windows build of CMake, modifies the cmake source - do not commit these changes.
Self Modified Sources are:

  • Tests/.NoDartCoverage
  • Utilities/cmexpat/.NoDartCoverage
  • Utilities/cmexpat/cm_expat_mangle.h
  • Utilities/cmexpat/expat.h
  • Utilities/cmzlib/.NoDartCoverage

If the header files are commited - they will prevent a Linux build.
Caution: You should remove the cmake directory when finished or you will get an error running script svn_load_dirs.pl on the next update.

 

 

Last Updated on Thursday, 10 November 2011 04:55
 
MSTS2Blender – Reading Blender’s Structured DNA Print
Written by Samuel E. Henley   
Monday, 23 June 2008 13:46

The information in this article is from the Blender website http://www.blender.org/. The original information can be found under the development tab in articles “Blender file Reading” and “Notes on SDNA”. Blender is a 3D Editor/Content Creation Suite licensed under the GNU General Public License.

The source can be consulted for final authority and is available from the svn site at https://svn.blender.org/svnroot/bf-blender/trunk/blender (40MB+). The subdirectory of interest is …/source/blender/makesdna, and …source/blender/blenloader. These directories contain the C code that reads and writes blender formatted files (SDNA) and the structures used to represent Blender objects. The sub-directory …/source/blender/makesdna contains a source for a program that will produce a generated source file to be incorporated into Blender. This source represents the current SDNA version. The sub-directory …/source/blender/blenloader contains the read routines for a SDNA file.

In file …/blender/blenloader/intern/ readfile.c and writefile.c have comments outlining the read/write process. SDNA file format has two advantages for the development of a railroad simulator game. Blender saves the current user editor’s version of SDNA in newly created 3D files. That is, not just a version label where the simulation game could tell the user that he is using the wrong version of a 3rd party tool, but the file layout itself, where the simulator can make adjustments and load the file without burdening the user with requirements outside of railroad simulator’s control. The second advantage is the simulator can fix MSTS2Blender at a particular version of SDNA. The version need only be updated when Blender has a newly added features that the OSRail railroad simulator would like to incorporate into its simulation and graphics.

A key structure used in SDNA is BHead (…/makesdna /DNA_sdna.h) contains an index that ids the structure type, and the blocks original location in memory. The header also contains information on big/little ended and an indicator for 4 or 8 byte pointers. When the file is read the file pointers must be adjusted for the difference between the original block location and the new memory location and any links to this block must also be modified.

The file itself starts as a series of pointers, object counts and section sizes pointing to the blocks themselves, descriptions and names of each type and structures used in the file. The file and its objects must be aligned on a 4 or 8 byte boundary with pointers taking up 4 or 8 bytes.

The MSTS2Blender utility should read the file into memory as is, and adjust and convert the pointers for its new memory location, little ended, and pointer size. Blender maintains and edits 3D scenes and the Ogre 3D window must display individual meshes or an entire scene. The initial extension to MSTS2Blender should read a dummy “.blender” file and display in tabs in a similar manner to the current reader for MSTS (Microsoft Train Simulator) files.

Last Updated on Wednesday, 03 June 2009 08:12
 
Third Party Tools Print
Written by Samuel E. Henley   
Monday, 07 April 2008 10:25

OSRail is a simulation program and the utilities required to support the simulation. Additionally OSRail uses many third party tools to build the cross-platform simulation and utilities. The essentially third party tools and links to their web-sites are listed below:

Last Updated on Monday, 05 October 2009 14:05