diff --git a/code/DefaultIOSystem.cpp b/code/DefaultIOSystem.cpp index 5c733a934..a1f1959d3 100644 --- a/code/DefaultIOSystem.cpp +++ b/code/DefaultIOSystem.cpp @@ -46,6 +46,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "DefaultIOSystem.h" #include "DefaultIOStream.h" +#ifdef __unix__ +#include +#include +#endif + using namespace Assimp; @@ -113,18 +118,19 @@ bool IOSystem::ComparePaths (const std::string& one, 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 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 } // ------------------------------------------------------------------------------------------------ diff --git a/code/FindDegenerates.cpp b/code/FindDegenerates.cpp index 3a9cf8bb6..0522b9c13 100644 --- a/code/FindDegenerates.cpp +++ b/code/FindDegenerates.cpp @@ -150,4 +150,4 @@ void FindDegeneratesProcess::Execute( aiScene* pScene) } } DefaultLogger::get()->debug("FindDegeneratesProcess finished"); -} \ No newline at end of file +} diff --git a/code/FindDegenerates.h b/code/FindDegenerates.h index 4997f22d7..15abb3af5 100644 --- a/code/FindDegenerates.h +++ b/code/FindDegenerates.h @@ -77,4 +77,4 @@ private: }; } -#endif // !! AI_FINDDEGENERATESPROCESS_H_INC \ No newline at end of file +#endif // !! AI_FINDDEGENERATESPROCESS_H_INC diff --git a/code/IRRMeshLoader.cpp b/code/IRRMeshLoader.cpp index c844ab3a9..205612147 100644 --- a/code/IRRMeshLoader.cpp +++ b/code/IRRMeshLoader.cpp @@ -964,4 +964,4 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile, delete reader; AI_DEBUG_INVALIDATE_PTR(reader); -} \ No newline at end of file +} diff --git a/code/RemoveComments.cpp b/code/RemoveComments.cpp index fc40cf9aa..8986de1bc 100644 --- a/code/RemoveComments.cpp +++ b/code/RemoveComments.cpp @@ -102,4 +102,4 @@ void CommentRemover::RemoveMultiLineComments(const char* szCommentStart, } } -}; // !! Assimp +} // !! Assimp diff --git a/code/SceneCombiner.cpp b/code/SceneCombiner.cpp index e802046ce..955790415 100644 --- a/code/SceneCombiner.cpp +++ b/code/SceneCombiner.cpp @@ -1095,4 +1095,4 @@ void SceneCombiner::Copy (aiNode** _dest, const aiNode* src) } -} \ No newline at end of file +} diff --git a/code/SceneCombiner.h b/code/SceneCombiner.h index de4ae77bf..5095d13d3 100644 --- a/code/SceneCombiner.h +++ b/code/SceneCombiner.h @@ -278,4 +278,4 @@ public: } -#endif // !! AI_SCENE_COMBINER_H_INC \ No newline at end of file +#endif // !! AI_SCENE_COMBINER_H_INC diff --git a/code/ScenePreprocessor.cpp b/code/ScenePreprocessor.cpp index 64a8e45f6..b6ade4166 100644 --- a/code/ScenePreprocessor.cpp +++ b/code/ScenePreprocessor.cpp @@ -196,4 +196,4 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim) DefaultLogger::get()->debug("Setting animation duration"); anim->mDuration = last - std::min( first, 0. ); } -} \ No newline at end of file +} diff --git a/code/ScenePreprocessor.h b/code/ScenePreprocessor.h index 202cd52a7..cc67d521e 100644 --- a/code/ScenePreprocessor.h +++ b/code/ScenePreprocessor.h @@ -75,4 +75,4 @@ protected: } // ! end namespace Assimp -#endif // include guard \ No newline at end of file +#endif // include guard diff --git a/code/TargetAnimation.cpp b/code/TargetAnimation.cpp index cb435108a..91314b0a9 100644 --- a/code/TargetAnimation.cpp +++ b/code/TargetAnimation.cpp @@ -241,4 +241,4 @@ void TargetAnimationHelper::Process(std::vector* distanceTrack) if (real.size()) *distanceTrack = real; -} \ No newline at end of file +} diff --git a/code/irrXML/irrXML.h b/code/irrXML/irrXML.h index 23eb2a11b..f9badbd83 100644 --- a/code/irrXML/irrXML.h +++ b/code/irrXML/irrXML.h @@ -172,7 +172,7 @@ namespace io ETF_UTF32_BE, //! UTF-32 format, little endian - ETF_UTF32_LE, + ETF_UTF32_LE }; diff --git a/include/aiPostProcess.h b/include/aiPostProcess.h index c579cccec..0a90d2f5a 100644 --- a/include/aiPostProcess.h +++ b/include/aiPostProcess.h @@ -258,7 +258,7 @@ enum aiPostProcessSteps * Most applications won't support UV transformations, so you will * propably want to specify this step in every case. */ - aiProcess_TransformUVCoords = 0x80000, + aiProcess_TransformUVCoords = 0x80000 }; diff --git a/workspaces/scons_ATMNotUpToDate/SConstruct b/workspaces/scons_ATMNotUpToDate/SConstruct index 3036dbcae..2069a9fef 100644 --- a/workspaces/scons_ATMNotUpToDate/SConstruct +++ b/workspaces/scons_ATMNotUpToDate/SConstruct @@ -17,61 +17,8 @@ g_IncPath = Split(""" /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 #------------------------------------------------------------------------------