2
0
Эх сурвалжийг харах

[ 2373610 ] Patch for Linux and SCons. Added patch provided by John Connors, closed the corresponding tracker item.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@262 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg 17 жил өмнө
parent
commit
321334fd12

+ 13 - 7
code/DefaultIOSystem.cpp

@@ -46,6 +46,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "DefaultIOSystem.h"
 #include "DefaultIOSystem.h"
 #include "DefaultIOStream.h"
 #include "DefaultIOStream.h"
 
 
+#ifdef __unix__
+#include <sys/param.h>
+#include <stdlib.h>
+#endif
+
 using namespace Assimp;
 using namespace Assimp;
 
 
 
 
@@ -113,18 +118,19 @@ bool IOSystem::ComparePaths (const std::string& one,
 	return !ASSIMP_stricmp(one,second);
 	return !ASSIMP_stricmp(one,second);
 }
 }
 
 
-// this should be sufficient for all platforms :D
-#define PATHLIMIT 1024
+// this should be sufficient for all platforms :D -- not really :->
+#define PATHLIMIT 4096 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Convert a relative path into an absolute path
 // Convert a relative path into an absolute path
 inline void MakeAbsolutePath (const std::string& in, char* _out)
 inline void MakeAbsolutePath (const std::string& in, char* _out)
 {
 {
-	#ifdef WIN32
-    ::_fullpath(_out, in.c_str(),PATHLIMIT);
-  #else
-    realpath(in.c_str(), _out);     //TODO not a save implementation realpath assumes that _out has the size PATH_MAX defined in limits.h; an error handling should be added to both versions
-  #endif
+#ifdef _WIN32
+	::_fullpath(_out, in.c_str(),PATHLIMIT);
+#else
+    // use realpath
+    realpath(in.c_str(), _out);
+#endif    
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------

+ 1 - 1
code/FindDegenerates.cpp

@@ -150,4 +150,4 @@ void FindDegeneratesProcess::Execute( aiScene* pScene)
 		}
 		}
 	}
 	}
 	DefaultLogger::get()->debug("FindDegeneratesProcess finished");
 	DefaultLogger::get()->debug("FindDegeneratesProcess finished");
-}
+}

+ 1 - 1
code/FindDegenerates.h

@@ -77,4 +77,4 @@ private:
 };
 };
 }
 }
 
 
-#endif // !! AI_FINDDEGENERATESPROCESS_H_INC
+#endif // !! AI_FINDDEGENERATESPROCESS_H_INC

+ 1 - 1
code/IRRMeshLoader.cpp

@@ -964,4 +964,4 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
 
 
 	delete reader;
 	delete reader;
 	AI_DEBUG_INVALIDATE_PTR(reader);
 	AI_DEBUG_INVALIDATE_PTR(reader);
-}
+}

+ 1 - 1
code/RemoveComments.cpp

@@ -102,4 +102,4 @@ void CommentRemover::RemoveMultiLineComments(const char* szCommentStart,
 	}
 	}
 }
 }
 
 
-}; // !! Assimp
+} // !! Assimp

+ 1 - 1
code/SceneCombiner.cpp

@@ -1095,4 +1095,4 @@ void SceneCombiner::Copy     (aiNode** _dest, const aiNode* src)
 }
 }
 
 
 
 
-}
+}

+ 1 - 1
code/SceneCombiner.h

@@ -278,4 +278,4 @@ public:
 
 
 }
 }
 
 
-#endif // !! AI_SCENE_COMBINER_H_INC
+#endif // !! AI_SCENE_COMBINER_H_INC

+ 1 - 1
code/ScenePreprocessor.cpp

@@ -196,4 +196,4 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
 		DefaultLogger::get()->debug("Setting animation duration");
 		DefaultLogger::get()->debug("Setting animation duration");
 		anim->mDuration = last - std::min( first, 0. );
 		anim->mDuration = last - std::min( first, 0. );
 	}
 	}
-}
+}

+ 1 - 1
code/ScenePreprocessor.h

@@ -75,4 +75,4 @@ protected:
 
 
 } // ! end namespace Assimp
 } // ! end namespace Assimp
 
 
-#endif // include guard
+#endif // include guard

+ 1 - 1
code/TargetAnimation.cpp

@@ -241,4 +241,4 @@ void TargetAnimationHelper::Process(std::vector<aiVectorKey>* distanceTrack)
 
 
 	if (real.size())
 	if (real.size())
 		*distanceTrack = real;
 		*distanceTrack = real;
-}
+}

+ 1 - 1
code/irrXML/irrXML.h

@@ -172,7 +172,7 @@ namespace io
 		ETF_UTF32_BE,
 		ETF_UTF32_BE,
 
 
 		//! UTF-32 format, little endian
 		//! UTF-32 format, little endian
-		ETF_UTF32_LE,
+		ETF_UTF32_LE
 	};
 	};
 
 
 
 

+ 1 - 1
include/aiPostProcess.h

@@ -258,7 +258,7 @@ enum aiPostProcessSteps
 	 * Most applications won't support UV transformations, so you will
 	 * Most applications won't support UV transformations, so you will
 	 * propably want to specify this step in every case.
 	 * propably want to specify this step in every case.
 	*/
 	*/
-	aiProcess_TransformUVCoords = 0x80000,
+	aiProcess_TransformUVCoords = 0x80000
 };
 };
 
 
 
 

+ 2 - 55
workspaces/scons_ATMNotUpToDate/SConstruct

@@ -17,61 +17,8 @@ g_IncPath = Split("""
 	/usr/local/include/
 	/usr/local/include/
 """)
 """)
 #------------------------------------------------------------------------------
 #------------------------------------------------------------------------------
-g_assimp_lib_Source = Split("""
-	../../code/3DSConverter.cpp
-	../../code/3DSGenNormals.cpp
-	../../code/3DSLoader.cpp
-	../../code/3DSSpatialSort.cpp
-	../../code/aiAssert.cpp
-	../../code/ASELoader.cpp
-	../../code/ASEParser.cpp
-	../../code/Assimp.cpp
-	../../code/BaseImporter.cpp
-	../../code/BaseProcess.cpp
-	../../code/CalcTangentsProcess.cpp
-	../../code/ConvertToLHProcess.cpp
-	../../code/DefaultIOStream.cpp
-	../../code/DefaultIOSystem.cpp
-	../../code/DefaultLogger.cpp
-	../../code/FixNormalsStep.cpp
-	../../code/GenFaceNormalsProcess.cpp
-	../../code/GenVertexNormalsProcess.cpp
-	../../code/HMPLoader.cpp
-	../../code/Importer.cpp
-	../../code/ImproveCacheLocality.cpp
-	../../code/JoinVerticesProcess.cpp
-	../../code/KillNormalsProcess.cpp
-	../../code/LimitBoneWeightsProcess.cpp
-	../../code/LWOBLoader.cpp
-	../../code/LWOLoader.cpp
-	../../code/LWOMaterial.cpp
-	../../code/MaterialSystem.cpp
-	../../code/MD2Loader.cpp
-	../../code/MD3Loader.cpp
-	../../code/MD5Loader.cpp
-	../../code/MD5Parser.cpp
-	../../code/MDCLoader.cpp
-	../../code/MDLLoader.cpp
-	../../code/MDLMaterialLoader.cpp
-	../../code/ObjFileImporter.cpp
-	../../code/ObjFileMtlImporter.cpp
-	../../code/ObjFileParser.cpp
-	../../code/PretransformVertices.cpp
-	../../code/PlyLoader.cpp
-	../../code/PlyParser.cpp
-	../../code/RemoveComments.cpp
-	../../code/RemoveRedundantMaterials.cpp
-	../../code/SMDLoader.cpp
-	../../code/SpatialSort.cpp
-	../../code/SplitLargeMeshes.cpp
-	../../code/STLLoader.cpp
-	../../code/TextureTransform.cpp
-	../../code/TriangulateProcess.cpp
-	../../code/ValidateDataStructure.cpp
-	../../code/VertexTriangleAdjacency.cpp
-	../../code/XFileImporter.cpp
-	../../code/XFileParser.cpp
-""")
+g_assimp_lib_Source = Glob(r"../../code/*.cpp")
+
 #------------------------------------------------------------------------------
 #------------------------------------------------------------------------------
 # don't reset CC/CXX-variable, other users might have set it to something special
 # don't reset CC/CXX-variable, other users might have set it to something special
 #------------------------------------------------------------------------------
 #------------------------------------------------------------------------------