Changeset 7383
- Timestamp:
- 09/11/07 12:10:43
- Files:
-
- OpenSceneGraph/trunk/applications/osgversion/osgversion.cpp (modified) (3 diffs)
- OpenSceneGraph/trunk/include/osg/Version (modified) (2 diffs)
- OpenSceneGraph/trunk/src/osg/Version.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenSceneGraph/trunk/applications/osgversion/osgversion.cpp
r7279 r7383 2 2 #include <osg/ArgumentParser> 3 3 #include <osg/ApplicationUsage> 4 #include <OpenThreads/Version> 4 5 5 6 #include <set> … … 650 651 arguments.getApplicationUsage()->addCommandLineOption("--entries","Print out number of entries into the ChangeLog file for each contributor."); 651 652 arguments.getApplicationUsage()->addCommandLineOption("--version-number","Print out version number only"); 653 arguments.getApplicationUsage()->addCommandLineOption("--soversion-number","Print out shared object version number only"); 654 arguments.getApplicationUsage()->addCommandLineOption("--openthreads-version-number","Print out version number for OpenThreads only"); 655 arguments.getApplicationUsage()->addCommandLineOption("--openthreads-soversion-number","Print out shared object version number for OpenThreads only"); 652 656 arguments.getApplicationUsage()->addCommandLineOption("-r <file> or --read <file>","Read the ChangeLog to generate an estimated contributors list."); 653 657 … … 655 659 { 656 660 std::cout<<osgGetVersion()<<std::endl; 661 return 0; 662 } 663 664 if (arguments.read("--soversion-number")) 665 { 666 std::cout<<osgGetSOVersion()<<std::endl; 667 return 0; 668 } 669 670 if (arguments.read("--openthreads-version-number")) 671 { 672 std::cout<<OpenThreadsGetVersion()<<std::endl; 673 return 0; 674 } 675 676 if (arguments.read("--openthreads-soversion-number")) 677 { 678 std::cout<<OpenThreadsGetSOVersion()<<std::endl; 657 679 return 0; 658 680 } OpenSceneGraph/trunk/include/osg/Version
r7350 r7383 19 19 extern "C" { 20 20 21 #define OSG_VERSION_MAJOR 222 #define OSG_VERSION_MINOR 123 #define OSG_VERSION_PATCH 924 21 25 #define OSG_VERSION_RELEASE OSG_VERSION_PATCH 26 #define OSG_VERSION_REVISION 0 22 #define OPENSCENEGRAPH_MAJOR_VERSION 2 23 #define OPENSCENEGRAPH_MINOR_VERSION 1 24 #define OPENSCENEGRAPH_PATCH_VERSION 9 25 #define OPENSCENEGRAPH_SOVERSION 20 27 26 28 27 /** … … 44 43 extern OSG_EXPORT const char* osgGetVersion(); 45 44 45 /** The osgGetSOVersion() method returns the OpenSceneGraph soversion number. */ 46 extern OSG_EXPORT const char* osgGetSOVersion(); 47 46 48 /** The osgGetLibraryName() method returns the library name in human-friendly form. */ 47 49 extern OSG_EXPORT const char* osgGetLibraryName(); 50 51 // old defines for backwards compatibility. 52 #define OSG_VERSION_MAJOR OPENSCENEGRAPH_MAJOR_VERSION 53 #define OSG_VERSION_MINOR OPENSCENEGRAPH_MINOR_VERSION 54 #define OSG_VERSION_PATCH OPENSCENEGRAPH_PATCH_VERSION 55 56 #define OSG_VERSION_RELEASE OSG_VERSION_PATCH 57 #define OSG_VERSION_REVISION 0 58 48 59 49 60 } OpenSceneGraph/trunk/src/osg/Version.cpp
r7170 r7383 38 38 } 39 39 40 const char* osgGetSOVersion() 41 { 42 static char osg_soversion[32]; 43 static int osg_soversion_init = 1; 44 if (osg_soversion_init) 45 { 46 sprintf(osg_soversion,"%d",OPENSCENEGRAPH_SOVERSION); 47 osg_soversion_init = 0; 48 } 49 50 return osg_soversion; 51 } 40 52 41 53 const char* osgGetLibraryName()
