Parcourir la source

update:
- update version info for 3.1
- aiGetVersionRevision will now return the git tag.

Signed-off-by: Kim Kulling <[email protected]>

Kim Kulling il y a 11 ans
Parent
commit
825a61fbc0
4 fichiers modifiés avec 17 ajouts et 10 suppressions
  1. 8 5
      code/AssimpPCH.cpp
  2. 1 2
      include/assimp/version.h
  3. 6 1
      revision.h
  4. 2 2
      tools/assimp_cmd/assimp_cmd.rc

+ 8 - 5
code/AssimpPCH.cpp

@@ -4,6 +4,9 @@
 #include "AssimpPCH.h"
 #include "AssimpPCH.h"
 #include "./../include/assimp/version.h"
 #include "./../include/assimp/version.h"
 
 
+static const unsigned int MajorVersion = 3;
+static const unsigned int MinorVersion = 1;
+
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 // Legal information string - dont't remove this.
 // Legal information string - dont't remove this.
 static const char* LEGAL_INFORMATION =
 static const char* LEGAL_INFORMATION =
@@ -25,13 +28,13 @@ ASSIMP_API const char*  aiGetLegalString  ()	{
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Get Assimp minor version
 // Get Assimp minor version
 ASSIMP_API unsigned int aiGetVersionMinor ()	{
 ASSIMP_API unsigned int aiGetVersionMinor ()	{
-	return 0;
+    return MinorVersion;
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Get Assimp major version
 // Get Assimp major version
 ASSIMP_API unsigned int aiGetVersionMajor ()	{
 ASSIMP_API unsigned int aiGetVersionMajor ()	{
-	return 3;
+    return MajorVersion;
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
@@ -65,11 +68,11 @@ ASSIMP_API unsigned int aiGetCompileFlags ()	{
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 ASSIMP_API unsigned int aiGetVersionRevision ()
 ASSIMP_API unsigned int aiGetVersionRevision ()
 {
 {
-	return SVNRevision;
+    return GitVersion;
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-ASSIMP_API aiScene::aiScene()
+ASSIMP_API aiScene::aiScene()
 	: mFlags(0)
 	: mFlags(0)
 	, mRootNode(NULL)
 	, mRootNode(NULL)
 	, mNumMeshes(0)
 	, mNumMeshes(0)
@@ -83,7 +86,7 @@ ASSIMP_API aiScene::aiScene()
 	, mNumLights(0)
 	, mNumLights(0)
 	, mLights(NULL)
 	, mLights(NULL)
 	, mNumCameras(0)
 	, mNumCameras(0)
-	, mCameras(NULL)
+	, mCameras(NULL)
 	, mPrivate(new Assimp::ScenePrivateData())
 	, mPrivate(new Assimp::ScenePrivateData())
 	{
 	{
 	}
 	}

+ 1 - 2
include/assimp/version.h

@@ -74,11 +74,10 @@ ASSIMP_API unsigned int aiGetVersionMajor (void);
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /** @brief Returns the repository revision of the Assimp runtime.
 /** @brief Returns the repository revision of the Assimp runtime.
  *  @return SVN Repository revision number of the Assimp runtime the 
  *  @return SVN Repository revision number of the Assimp runtime the 
- *    application was linked/built against
+ *          application was linked/built against.
  */
  */
 ASSIMP_API unsigned int aiGetVersionRevision (void);
 ASSIMP_API unsigned int aiGetVersionRevision (void);
 
 
-
 //! Assimp was compiled as a shared object (Windows: DLL)
 //! Assimp was compiled as a shared object (Windows: DLL)
 #define ASSIMP_CFLAGS_SHARED  0x1 
 #define ASSIMP_CFLAGS_SHARED  0x1 
 //! Assimp was compiled against STLport
 //! Assimp was compiled against STLport

+ 6 - 1
revision.h

@@ -1 +1,6 @@
-#define SVNRevision  1270 
+#ifndef ASSIMP_REVISION_H_INC
+#define ASSIMP_REVISION_H_INC
+
+#define GitVersion 0xA0bA3A8;
+
+#endif // ASSIMP_REVISION_H_INC

+ 2 - 2
tools/assimp_cmd/assimp_cmd.rc

@@ -42,8 +42,8 @@ IDI_ASSIMP_VIEW         ICON                    "../shared/assimp_tools_icon.ico
 //
 //
 
 
 VS_VERSION_INFO VERSIONINFO
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,1,SVNRevision,0
- PRODUCTVERSION 1,1,SVNRevision,1
+ FILEVERSION 1, 1, GitVersion, 0
+ PRODUCTVERSION 1, 1, GitVersion, 1
  FILEFLAGSMASK 0x17L
  FILEFLAGSMASK 0x17L
 #ifdef _DEBUG
 #ifdef _DEBUG
  FILEFLAGS 0x1L
  FILEFLAGS 0x1L