[ 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
pull/1/head
aramis_acg 2008-12-07 20:00:58 +00:00
parent f601c3c5b9
commit 321334fd12
13 changed files with 26 additions and 73 deletions

View File

@ -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 // this should be sufficient for all platforms :D -- not really :->
#define PATHLIMIT 1024 #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 #ifdef _WIN32
::_fullpath(_out, in.c_str(),PATHLIMIT); ::_fullpath(_out, in.c_str(),PATHLIMIT);
#else #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 // use realpath
#endif realpath(in.c_str(), _out);
#endif
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------

View File

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

View File

@ -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
}; };

View File

@ -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
}; };

View File

@ -17,61 +17,8 @@ g_IncPath = Split("""
/usr/local/include/ /usr/local/include/
""") """)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
g_assimp_lib_Source = Split(""" g_assimp_lib_Source = Glob(r"../../code/*.cpp")
../../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
""")
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# 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
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------