Undo revision 23130 which was a merge with 2.5, a messy one because I did something wrong (svn status
output: http://www.pasteall.org/7887).
The command: svn merge -r 23130:23129 https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-kazanbas
This commit is contained in:
@@ -70,9 +70,6 @@ MACRO(SETUP_LIBDIRS)
|
||||
IF(WITH_JACK)
|
||||
LINK_DIRECTORIES(${JACK_LIBPATH})
|
||||
ENDIF(WITH_JACK)
|
||||
IF(WITH_SNDFILE)
|
||||
LINK_DIRECTORIES(${SNDFILE_LIBPATH})
|
||||
ENDIF(WITH_SNDFILE)
|
||||
IF(WITH_FFTW3)
|
||||
LINK_DIRECTORIES(${FFTW3_LIBPATH})
|
||||
ENDIF(WITH_FFTW3)
|
||||
@@ -121,9 +118,6 @@ MACRO(SETUP_LIBLINKS
|
||||
IF(WITH_JACK)
|
||||
TARGET_LINK_LIBRARIES(${target} ${JACK_LIB})
|
||||
ENDIF(WITH_JACK)
|
||||
IF(WITH_SNDFILE)
|
||||
TARGET_LINK_LIBRARIES(${target} ${SNDFILE_LIB})
|
||||
ENDIF(WITH_SNDFILE)
|
||||
IF(WITH_SDL)
|
||||
TARGET_LINK_LIBRARIES(${target} ${SDL_LIBRARY})
|
||||
ENDIF(WITH_SDL)
|
||||
|
678
CMakeLists.txt
678
CMakeLists.txt
@@ -34,11 +34,11 @@ IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
MESSAGE(FATAL_ERROR "CMake generation for blender is not allowed within the source directory!
|
||||
Remove the CMakeCache.txt file and try again from another folder, e.g.:
|
||||
|
||||
rm CMakeCache.txt
|
||||
cd ..
|
||||
mkdir cmake-make
|
||||
cd cmake-make
|
||||
cmake -G \"Unix Makefiles\" ../blender
|
||||
rm CMakeCache.txt
|
||||
cd ..
|
||||
mkdir cmake-make
|
||||
cd cmake-make
|
||||
cmake -G \"Unix Makefiles\" ../blender
|
||||
")
|
||||
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
|
||||
@@ -70,13 +70,11 @@ OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)"
|
||||
OPTION(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF)
|
||||
OPTION(WITH_FFTW3 "Enable FFTW3 support" OFF)
|
||||
OPTION(WITH_JACK "Enable Jack Support (http://www.jackaudio.org)" OFF)
|
||||
OPTION(WITH_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
|
||||
OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation" OFF)
|
||||
# OPTION(WITH_BUILDINFO "Include extra build details" ON)
|
||||
OPTION(WITH_CXX_GUARDEDALLOC "" OFF)
|
||||
OPTION(WITH_INSTALL "Install accompanying scripts and language files needed to run blender" ON)
|
||||
|
||||
IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
|
||||
MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
|
||||
MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
|
||||
ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
|
||||
|
||||
# For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
|
||||
@@ -95,434 +93,398 @@ INCLUDE(CMake/macros.cmake)
|
||||
#Platform specifics
|
||||
|
||||
IF(UNIX AND NOT APPLE)
|
||||
IF(WITH_OPENAL)
|
||||
FIND_PACKAGE(OpenAL)
|
||||
IF(OPENAL_FOUND)
|
||||
SET(WITH_OPENAL ON)
|
||||
ELSE(OPENAL_FOUND)
|
||||
SET(WITH_OPENAL OFF)
|
||||
ENDIF(OPENAL_FOUND)
|
||||
ENDIF(WITH_OPENAL)
|
||||
IF(WITH_OPENAL)
|
||||
FIND_PACKAGE(OpenAL)
|
||||
IF(OPENAL_FOUND)
|
||||
SET(WITH_OPENAL ON)
|
||||
ELSE(OPENAL_FOUND)
|
||||
SET(WITH_OPENAL OFF)
|
||||
ENDIF(OPENAL_FOUND)
|
||||
ENDIF(WITH_OPENAL)
|
||||
|
||||
IF(WITH_JACK)
|
||||
SET(JACK /usr)
|
||||
SET(JACK_INC ${JACK}/include/jack)
|
||||
SET(JACK_LIB jack)
|
||||
SET(JACK_LIBPATH ${JACK}/lib)
|
||||
ENDIF(WITH_JACK)
|
||||
IF(WITH_JACK)
|
||||
SET(JACK /usr)
|
||||
SET(JACK_INC ${JACK}/include/jack)
|
||||
SET(JACK_LIB jack)
|
||||
SET(JACK_LIBPATH ${JACK}/lib)
|
||||
ENDIF(WITH_JACK)
|
||||
|
||||
IF(WITH_SNDFILE)
|
||||
SET(SNDFILE /usr)
|
||||
SET(SNDFILE_INC ${SNDFILE}/include)
|
||||
SET(SNDFILE_LIB sndfile)
|
||||
SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
|
||||
ENDIF(WITH_SNDFILE)
|
||||
|
||||
FIND_LIBRARY(INTL_LIBRARY
|
||||
NAMES intl
|
||||
PATHS
|
||||
/sw/lib
|
||||
)
|
||||
FIND_LIBRARY(ICONV_LIBRARY
|
||||
NAMES iconv
|
||||
PATHS
|
||||
/sw/lib
|
||||
)
|
||||
FIND_LIBRARY(INTL_LIBRARY
|
||||
NAMES intl
|
||||
PATHS
|
||||
/sw/lib
|
||||
)
|
||||
FIND_LIBRARY(ICONV_LIBRARY
|
||||
NAMES iconv
|
||||
PATHS
|
||||
/sw/lib
|
||||
)
|
||||
|
||||
IF(INTL_LIBRARY AND ICONV_LIBRARY)
|
||||
SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
|
||||
ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
|
||||
IF(INTL_LIBRARY AND ICONV_LIBRARY)
|
||||
SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
|
||||
ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
|
||||
|
||||
FIND_PACKAGE(Freetype)
|
||||
# UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use
|
||||
FIND_PACKAGE(Freetype)
|
||||
# UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use
|
||||
|
||||
# No way to set py31. remove for now.
|
||||
# FIND_PACKAGE(PythonLibs)
|
||||
SET(PYTHON /usr)
|
||||
SET(PYTHON_VERSION 3.1)
|
||||
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
|
||||
# SET(PYTHON_BINARY python) # not used yet
|
||||
SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
|
||||
SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
|
||||
# No way to set py31. remove for now.
|
||||
# FIND_PACKAGE(PythonLibs)
|
||||
SET(PYTHON /usr)
|
||||
SET(PYTHON_VERSION 3.1)
|
||||
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
|
||||
# SET(PYTHON_BINARY python) # not used yet
|
||||
SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
|
||||
SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
|
||||
|
||||
# FIND_PACKAGE(PythonInterp) # not used yet
|
||||
# SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
|
||||
# FIND_PACKAGE(PythonInterp) # not used yet
|
||||
# SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
|
||||
|
||||
SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
|
||||
SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
|
||||
|
||||
IF(WITH_SDL)
|
||||
FIND_PACKAGE(SDL)
|
||||
# UNSET(SDLMAIN_LIBRARY CACHE)
|
||||
IF(NOT SDL_FOUND)
|
||||
SET(WITH_SDL OFF)
|
||||
ENDIF(NOT SDL_FOUND)
|
||||
ENDIF(WITH_SDL)
|
||||
IF(WITH_SDL)
|
||||
FIND_PACKAGE(SDL)
|
||||
# UNSET(SDLMAIN_LIBRARY CACHE)
|
||||
IF(NOT SDL_FOUND)
|
||||
SET(WITH_SDL OFF)
|
||||
ENDIF(NOT SDL_FOUND)
|
||||
ENDIF(WITH_SDL)
|
||||
|
||||
FIND_PATH(OPENEXR_INC
|
||||
ImfXdr.h
|
||||
PATHS
|
||||
/usr/local/include/OpenEXR
|
||||
/usr/include/OpenEXR
|
||||
/sw/include/OpenEXR
|
||||
/opt/local/include/OpenEXR
|
||||
/opt/csw/include/OpenEXR
|
||||
/opt/include/OpenEXR
|
||||
)
|
||||
SET(OPENEXR_LIB Half IlmImf Iex Imath)
|
||||
FIND_PATH(OPENEXR_INC
|
||||
ImfXdr.h
|
||||
PATHS
|
||||
/usr/local/include/OpenEXR
|
||||
/usr/include/OpenEXR
|
||||
/sw/include/OpenEXR
|
||||
/opt/local/include/OpenEXR
|
||||
/opt/csw/include/OpenEXR
|
||||
/opt/include/OpenEXR
|
||||
)
|
||||
SET(OPENEXR_LIB Half IlmImf Iex Imath)
|
||||
|
||||
SET(FFMPEG /usr)
|
||||
SET(FFMPEG_INC ${FFMPEG}/include)
|
||||
SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale)
|
||||
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
SET(FFMPEG /usr)
|
||||
SET(FFMPEG_INC ${FFMPEG}/include)
|
||||
SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale)
|
||||
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
|
||||
IF(WITH_FFTW3)
|
||||
SET(FFTW3 /usr)
|
||||
SET(FFTW3_INC ${FFTW3}/include)
|
||||
SET(FFTW3_LIB fftw3)
|
||||
SET(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
ENDIF(WITH_FFTW3)
|
||||
IF(WITH_FFTW3)
|
||||
SET(FFTW3 /usr)
|
||||
SET(FFTW3_INC ${FFTW3}/include)
|
||||
SET(FFTW3_LIB fftw3)
|
||||
SET(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
ENDIF(WITH_FFTW3)
|
||||
|
||||
SET(LIBSAMPLERATE /usr)
|
||||
SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
|
||||
SET(LIBSAMPLERATE_LIB samplerate)
|
||||
SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
|
||||
SET(LIBSAMPLERATE /usr)
|
||||
SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
|
||||
SET(LIBSAMPLERATE_LIB samplerate)
|
||||
SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
|
||||
|
||||
FIND_PACKAGE(JPEG REQUIRED)
|
||||
FIND_PACKAGE(JPEG REQUIRED)
|
||||
|
||||
FIND_PACKAGE(PNG REQUIRED)
|
||||
FIND_PACKAGE(PNG REQUIRED)
|
||||
|
||||
FIND_PACKAGE(ZLIB REQUIRED)
|
||||
FIND_PACKAGE(ZLIB REQUIRED)
|
||||
|
||||
# Could use ${X11_Xinput_LIB} ${X11_X11_LIB} too
|
||||
SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11")
|
||||
# Could use ${X11_Xinput_LIB} ${X11_X11_LIB} too
|
||||
SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11")
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# BSD's dont use libdl.so
|
||||
SET(LLIBS "${LLIBS} -ldl")
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# BSD's dont use libdl.so
|
||||
SET(LLIBS "${LLIBS} -ldl")
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
||||
IF(WITH_OPENMP)
|
||||
SET(LLIBS "${LLIBS} -lgomp")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
|
||||
ENDIF(WITH_OPENMP)
|
||||
IF(WITH_OPENMP)
|
||||
SET(LLIBS "${LLIBS} -lgomp")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
|
||||
ENDIF(WITH_OPENMP)
|
||||
|
||||
|
||||
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DXP_UNIX -Wno-char-subscripts")
|
||||
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DXP_UNIX -Wno-char-subscripts")
|
||||
|
||||
SET(PLATFORM_LINKFLAGS "-pthread")
|
||||
SET(PLATFORM_LINKFLAGS "-pthread")
|
||||
|
||||
# Better warnings
|
||||
SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement")
|
||||
SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
|
||||
# Better warnings
|
||||
SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wnested-externs -Wdeclaration-after-statement")
|
||||
SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
|
||||
|
||||
INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
|
||||
INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
|
||||
ENDIF(UNIX AND NOT APPLE)
|
||||
|
||||
IF(WIN32)
|
||||
|
||||
# this file is included anyway when building under Windows with cl.exe
|
||||
# INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
||||
# this file is included anyway when building under Windows with cl.exe
|
||||
# INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
||||
|
||||
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
|
||||
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
|
||||
|
||||
# Setup 64bit and 64bit windows systems
|
||||
IF(CMAKE_CL_64)
|
||||
message("64 bit compiler detected.")
|
||||
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
# Setup 64bit and 64bit windows systems
|
||||
IF(CMAKE_CL_64)
|
||||
message("64 bit compiler detected.")
|
||||
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
|
||||
SET(PYTHON ${LIBDIR}/python)
|
||||
SET(PYTHON_VERSION 3.1)
|
||||
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
|
||||
# SET(PYTHON_BINARY python) # not used yet
|
||||
SET(PYTHON_LIB python31)
|
||||
SET(PYTHON_LIBPATH ${PYTHON}/lib)
|
||||
SET(PYTHON ${LIBDIR}/python)
|
||||
SET(PYTHON_VERSION 3.1)
|
||||
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
|
||||
# SET(PYTHON_BINARY python) # not used yet
|
||||
SET(PYTHON_LIB python31)
|
||||
SET(PYTHON_LIBPATH ${PYTHON}/lib)
|
||||
|
||||
IF(CMAKE_CL_64)
|
||||
SET(WITH_OPENAL OFF)
|
||||
ELSE(CMAKE_CL_64)
|
||||
#SET(WITH_OPENAL ON)
|
||||
SET(OPENAL ${LIBDIR}/openal)
|
||||
SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
|
||||
SET(OPENAL_LIBRARY wrap_oal)
|
||||
SET(OPENAL_LIBPATH ${OPENAL}/lib)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(WITH_OPENAL OFF)
|
||||
ELSE(CMAKE_CL_64)
|
||||
#SET(WITH_OPENAL ON)
|
||||
SET(OPENAL ${LIBDIR}/openal)
|
||||
SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
|
||||
SET(OPENAL_LIBRARY wrap_oal)
|
||||
SET(OPENAL_LIBPATH ${OPENAL}/lib)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
|
||||
IF(WITH_JACK)
|
||||
SET(JACK ${LIBDIR}/jack)
|
||||
SET(JACK_INC ${JACK}/include/jack ${JACK}/include)
|
||||
SET(JACK_LIB libjack)
|
||||
SET(JACK_LIBPATH ${JACK}/lib)
|
||||
ENDIF(WITH_JACK)
|
||||
IF(WITH_JACK)
|
||||
SET(JACK ${LIBDIR}/jack)
|
||||
SET(JACK_INC ${JACK}/include/jack)
|
||||
SET(JACK_LIB jack)
|
||||
SET(JACK_LIBPATH ${JACK}/lib)
|
||||
ENDIF(WITH_JACK)
|
||||
|
||||
IF(WITH_SNDFILE)
|
||||
SET(SNDFILE ${LIBDIR}/sndfile)
|
||||
SET(SNDFILE_INC ${SNDFILE}/include)
|
||||
SET(SNDFILE_LIB libsndfile-1)
|
||||
SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
|
||||
ENDIF(WITH_SNDFILE)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(PNG_LIBRARIES libpng)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(PNG_LIBRARIES libpng_st)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
SET(JPEG_LIBRARY libjpeg)
|
||||
|
||||
IF(CMAKE_CL_64)
|
||||
SET(PNG_LIBRARIES libpng)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(PNG_LIBRARIES libpng_st)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
SET(JPEG_LIBRARY libjpeg)
|
||||
|
||||
SET(ZLIB ${LIBDIR}/zlib)
|
||||
SET(ZLIB_INC ${ZLIB}/include)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(ZLIB_LIBRARIES libz)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(ZLIB_LIBRARIES zlib)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
SET(ZLIB_LIBPATH ${ZLIB}/lib)
|
||||
SET(ZLIB ${LIBDIR}/zlib)
|
||||
SET(ZLIB_INC ${ZLIB}/include)
|
||||
SET(ZLIB_LIBRARIES zlib)
|
||||
SET(ZLIB_LIBPATH ${ZLIB}/lib)
|
||||
|
||||
SET(PTHREADS ${LIBDIR}/pthreads)
|
||||
SET(PTHREADS_INC ${PTHREADS}/include)
|
||||
SET(PTHREADS_LIB pthreadVC2)
|
||||
SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
|
||||
SET(PTHREADS ${LIBDIR}/pthreads)
|
||||
SET(PTHREADS_INC ${PTHREADS}/include)
|
||||
SET(PTHREADS_LIB pthreadVC2)
|
||||
SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
|
||||
|
||||
SET(ICONV ${LIBDIR}/iconv)
|
||||
SET(ICONV_INC ${ICONV}/include)
|
||||
SET(ICONV_LIB iconv)
|
||||
SET(ICONV_LIBPATH ${ICONV}/lib)
|
||||
SET(ICONV ${LIBDIR}/iconv)
|
||||
SET(ICONV_INC ${ICONV}/include)
|
||||
SET(ICONV_LIB iconv)
|
||||
SET(ICONV_LIBPATH ${ICONV}/lib)
|
||||
|
||||
IF(WITH_FFTW3)
|
||||
SET(FFTW3 ${LIBDIR}/fftw3)
|
||||
SET(FFTW3_INC ${FFTW3}/include)
|
||||
SET(FFTW3_LIB libfftw)
|
||||
SET(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
ENDIF(WITH_FFTW3)
|
||||
IF(WITH_FFTW3)
|
||||
SET(FFTW3 ${LIBDIR}/fftw3)
|
||||
SET(FFTW3_INC ${FFTW3}/include)
|
||||
SET(FFTW3_LIB libfftw)
|
||||
SET(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
ENDIF(WITH_FFTW3)
|
||||
|
||||
SET(GETTEXT ${LIBDIR}/gettext)
|
||||
SET(GETTEXT_INC ${GETTEXT}/include)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(GETTEXT_LIB gettext)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(GETTEXT_LIB gnu_gettext)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
|
||||
SET(GETTEXT ${LIBDIR}/gettext)
|
||||
SET(GETTEXT_INC ${GETTEXT}/include)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(GETTEXT_LIB gettextlib)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(GETTEXT_LIB gnu_gettext)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
|
||||
|
||||
SET(FREETYPE ${LIBDIR}/freetype)
|
||||
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
|
||||
SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
|
||||
SET(FREETYPE_LIBRARY freetype2ST)
|
||||
SET(FREETYPE ${LIBDIR}/freetype)
|
||||
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
|
||||
SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
|
||||
SET(FREETYPE_LIBRARY freetype2ST)
|
||||
|
||||
SET(OPENEXR ${LIBDIR}/openexr)
|
||||
SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
|
||||
SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
|
||||
IF (MSVC80)
|
||||
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
|
||||
ELSE (MSVC80)
|
||||
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
|
||||
ENDIF(MSVC80)
|
||||
IF (MSVC90)
|
||||
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
|
||||
ENDIF(MSVC90)
|
||||
SET(OPENEXR ${LIBDIR}/openexr)
|
||||
SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
|
||||
SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
|
||||
IF (MSVC80)
|
||||
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
|
||||
ELSE (MSVC80)
|
||||
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
|
||||
ENDIF(MSVC80)
|
||||
IF (MSVC90)
|
||||
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
|
||||
ENDIF(MSVC90)
|
||||
|
||||
|
||||
SET(QUICKTIME ${LIBDIR}/QTDevWin)
|
||||
SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
|
||||
SET(QUICKTIME_LIB qtmlClient)
|
||||
SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
|
||||
SET(QUICKTIME ${LIBDIR}/QTDevWin)
|
||||
SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
|
||||
SET(QUICKTIME_LIB qtmlClient)
|
||||
SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
|
||||
|
||||
SET(FFMPEG ${LIBDIR}/ffmpeg)
|
||||
SET(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc)
|
||||
SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
|
||||
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
SET(FFMPEG ${LIBDIR}/ffmpeg)
|
||||
SET(FFMPEG_INC ${FFMPEG}/include)
|
||||
SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
|
||||
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
|
||||
SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
|
||||
SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
|
||||
SET(LIBSAMPLERATE_LIB libsamplerate)
|
||||
SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
|
||||
SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
|
||||
SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
|
||||
SET(LIBSAMPLERATE_LIB libsamplerate)
|
||||
SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
|
||||
|
||||
IF(CMAKE_CL_64)
|
||||
SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_C_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_C_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_C_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_C_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_C_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_C_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
|
||||
|
||||
IF(WITH_OPENMP)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ")
|
||||
ENDIF(WITH_OPENMP)
|
||||
IF(WITH_OPENMP)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ")
|
||||
ENDIF(WITH_OPENMP)
|
||||
|
||||
SET(SDL ${LIBDIR}/sdl)
|
||||
SET(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
SET(SDL_LIBRARY SDL)
|
||||
SET(SDL_LIBPATH ${SDL}/lib)
|
||||
SET(SDL ${LIBDIR}/sdl)
|
||||
SET(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
SET(SDL_LIBRARY SDL)
|
||||
SET(SDL_LIBPATH ${SDL}/lib)
|
||||
|
||||
SET(PNG "${LIBDIR}/png")
|
||||
SET(PNG_INC "${PNG}/include")
|
||||
SET(PNG_LIBPATH ${PNG}/lib)
|
||||
SET(PNG "${LIBDIR}/png")
|
||||
SET(PNG_INC "${PNG}/include")
|
||||
SET(PNG_LIBPATH ${PNG}/lib)
|
||||
|
||||
SET(JPEG "${LIBDIR}/jpeg")
|
||||
SET(JPEG_INC "${JPEG}/include")
|
||||
SET(JPEG_LIBPATH ${JPEG}/lib)
|
||||
SET(JPEG "${LIBDIR}/jpeg")
|
||||
SET(JPEG_INC "${JPEG}/include")
|
||||
SET(JPEG_LIBPATH ${JPEG}/lib)
|
||||
|
||||
SET(TIFF ${LIBDIR}/tiff)
|
||||
SET(TIFF_INC ${TIFF}/include)
|
||||
SET(TIFF ${LIBDIR}/tiff)
|
||||
SET(TIFF_INC ${TIFF}/include)
|
||||
|
||||
SET(WINTAB_INC ${LIBDIR}/wintab/include)
|
||||
SET(WINTAB_INC ${LIBDIR}/wintab/include)
|
||||
|
||||
IF(CMAKE_CL_64)
|
||||
SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
|
||||
ENDIF(CMAKE_CL_64)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(PLATFORM_LINKFLAGS "/MANIFEST:NO /MANIFESTUAC:NO /MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
|
||||
ENDIF(CMAKE_CL_64)
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(APPLE)
|
||||
IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
|
||||
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386)
|
||||
ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
|
||||
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-6.1-powerpc)
|
||||
ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
|
||||
IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
|
||||
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386)
|
||||
ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
|
||||
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-6.1-powerpc)
|
||||
ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
|
||||
|
||||
IF(WITH_OPENAL)
|
||||
FIND_PACKAGE(OpenAL)
|
||||
IF(OPENAL_FOUND)
|
||||
SET(WITH_OPENAL ON)
|
||||
ELSE(OPENAL_FOUND)
|
||||
SET(WITH_OPENAL OFF)
|
||||
ENDIF(OPENAL_FOUND)
|
||||
ENDIF(WITH_OPENAL)
|
||||
IF(WITH_OPENAL)
|
||||
FIND_PACKAGE(OpenAL)
|
||||
IF(OPENAL_FOUND)
|
||||
SET(WITH_OPENAL ON)
|
||||
ELSE(OPENAL_FOUND)
|
||||
SET(WITH_OPENAL OFF)
|
||||
ENDIF(OPENAL_FOUND)
|
||||
ENDIF(WITH_OPENAL)
|
||||
|
||||
IF(WITH_JACK)
|
||||
SET(JACK /usr)
|
||||
SET(JACK_INC ${JACK}/include/jack)
|
||||
SET(JACK_LIB jack)
|
||||
SET(JACK_LIBPATH ${JACK}/lib)
|
||||
ENDIF(WITH_JACK)
|
||||
IF(WITH_JACK)
|
||||
SET(JACK /usr)
|
||||
SET(JACK_INC ${JACK}/include/jack)
|
||||
SET(JACK_LIB jack)
|
||||
SET(JACK_LIBPATH ${JACK}/lib)
|
||||
ENDIF(WITH_JACK)
|
||||
|
||||
IF(WITH_SNDFILE)
|
||||
SET(SNDFILE /usr)
|
||||
SET(SNDFILE_INC ${SNDFILE}/include)
|
||||
SET(SNDFILE_LIB sndfile)
|
||||
SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
|
||||
ENDIF(WITH_SNDFILE)
|
||||
SET(PYTHON_VERSION 3.1)
|
||||
|
||||
SET(PYTHON_VERSION 3.1)
|
||||
IF(PYTHON_VERSION MATCHES 3.1)
|
||||
# we use precompiled libraries for py 3.1 and up by default
|
||||
|
||||
IF(PYTHON_VERSION MATCHES 3.1)
|
||||
# we use precompiled libraries for py 3.1 and up by default
|
||||
SET(PYTHON ${LIBDIR}/python)
|
||||
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
|
||||
# SET(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}" CACHE STRING "") # not used yet
|
||||
SET(PYTHON_LIB python${PYTHON_VERSION})
|
||||
SET(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}" CACHE STRING "")
|
||||
# SET(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
|
||||
ELSE(PYTHON_VERSION MATCHES 3.1)
|
||||
# otherwise, use custom system framework
|
||||
|
||||
SET(PYTHON ${LIBDIR}/python)
|
||||
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
|
||||
# SET(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}" CACHE STRING "") # not used yet
|
||||
SET(PYTHON_LIB python${PYTHON_VERSION})
|
||||
SET(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}" CACHE STRING "")
|
||||
# SET(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
|
||||
ELSE(PYTHON_VERSION MATCHES 3.1)
|
||||
# otherwise, use custom system framework
|
||||
SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
|
||||
SET(PYTHON_VERSION 2.5)
|
||||
SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "")
|
||||
# SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "") # not used yet
|
||||
SET(PYTHON_LIB "")
|
||||
SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "")
|
||||
SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
|
||||
ENDIF(PYTHON_VERSION MATCHES 3.1)
|
||||
|
||||
SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
|
||||
SET(PYTHON_VERSION 2.5)
|
||||
SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "")
|
||||
# SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "") # not used yet
|
||||
SET(PYTHON_LIB "")
|
||||
SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "")
|
||||
SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
|
||||
ENDIF(PYTHON_VERSION MATCHES 3.1)
|
||||
|
||||
SET(GETTEXT ${LIBDIR}/gettext)
|
||||
SET(GETTEXT_INC "${GETTEXT}/include")
|
||||
SET(GETTEXT_LIB intl iconv)
|
||||
SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
|
||||
SET(GETTEXT ${LIBDIR}/gettext)
|
||||
SET(GETTEXT_INC "${GETTEXT}/include")
|
||||
SET(GETTEXT_LIB intl iconv)
|
||||
SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
|
||||
|
||||
IF(WITH_FFTW3)
|
||||
SET(FFTW3 ${LIBDIR}/fftw3)
|
||||
SET(FFTW3_INC ${FFTW3}/include)
|
||||
SET(FFTW3_LIB libfftw)
|
||||
SET(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
ENDIF(WITH_FFTW3)
|
||||
IF(WITH_FFTW3)
|
||||
SET(FFTW3 ${LIBDIR}/fftw3)
|
||||
SET(FFTW3_INC ${FFTW3}/include)
|
||||
SET(FFTW3_LIB libfftw)
|
||||
SET(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
ENDIF(WITH_FFTW3)
|
||||
|
||||
SET(PNG_LIBRARIES png)
|
||||
SET(JPEG_LIBRARY jpeg)
|
||||
SET(PNG_LIBRARIES png)
|
||||
SET(JPEG_LIBRARY jpeg)
|
||||
|
||||
SET(ZLIB /usr)
|
||||
SET(ZLIB_INC "${ZLIB}/include")
|
||||
SET(ZLIB_LIBRARIES z)
|
||||
SET(ZLIB /usr)
|
||||
SET(ZLIB_INC "${ZLIB}/include")
|
||||
SET(ZLIB_LIBRARIES z)
|
||||
|
||||
SET(FREETYPE ${LIBDIR}/freetype)
|
||||
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
|
||||
SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
|
||||
SET(FREETYPE_LIBRARY freetype)
|
||||
SET(FREETYPE ${LIBDIR}/freetype)
|
||||
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
|
||||
SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
|
||||
SET(FREETYPE_LIBRARY freetype)
|
||||
|
||||
SET(OPENEXR ${LIBDIR}/openexr)
|
||||
SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
|
||||
SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
|
||||
SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
SET(OPENEXR ${LIBDIR}/openexr)
|
||||
SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
|
||||
SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
|
||||
SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
|
||||
SET(FFMPEG ${LIBDIR}/ffmpeg)
|
||||
SET(FFMPEG_INC ${CMAKE_SOURCE_DIR}/extern/ffmpeg)
|
||||
SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore)
|
||||
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
SET(FFMPEG ${LIBDIR}/ffmpeg)
|
||||
SET(FFMPEG_INC ${CMAKE_SOURCE_DIR}/extern/ffmpeg)
|
||||
SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore)
|
||||
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
|
||||
SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
|
||||
SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
|
||||
SET(LIBSAMPLERATE_LIB samplerate)
|
||||
SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
|
||||
SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
|
||||
SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
|
||||
SET(LIBSAMPLERATE_LIB samplerate)
|
||||
SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
|
||||
|
||||
SET(LLIBS stdc++ SystemStubs)
|
||||
SET(LLIBS stdc++ SystemStubs)
|
||||
|
||||
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||
SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
|
||||
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||
SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
|
||||
|
||||
IF(WITH_OPENMP)
|
||||
SET(LLIBS "${LLIBS} -lgomp ")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
|
||||
ENDIF(WITH_OPENMP)
|
||||
IF(WITH_OPENMP)
|
||||
SET(LLIBS "${LLIBS} -lgomp ")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
|
||||
ENDIF(WITH_OPENMP)
|
||||
|
||||
SET(SDL ${LIBDIR}/sdl)
|
||||
SET(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
SET(SDL_LIBRARY SDL)
|
||||
SET(SDL_LIBPATH ${SDL}/lib)
|
||||
SET(SDL ${LIBDIR}/sdl)
|
||||
SET(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
SET(SDL_LIBRARY SDL)
|
||||
SET(SDL_LIBPATH ${SDL}/lib)
|
||||
|
||||
SET(PNG "${LIBDIR}/png")
|
||||
SET(PNG_INC "${PNG}/include")
|
||||
SET(PNG_LIBPATH ${PNG}/lib)
|
||||
SET(PNG "${LIBDIR}/png")
|
||||
SET(PNG_INC "${PNG}/include")
|
||||
SET(PNG_LIBPATH ${PNG}/lib)
|
||||
|
||||
SET(JPEG "${LIBDIR}/jpeg")
|
||||
SET(JPEG_INC "${JPEG}/include")
|
||||
SET(JPEG_LIBPATH ${JPEG}/lib)
|
||||
SET(JPEG "${LIBDIR}/jpeg")
|
||||
SET(JPEG_INC "${JPEG}/include")
|
||||
SET(JPEG_LIBPATH ${JPEG}/lib)
|
||||
|
||||
SET(TIFF ${LIBDIR}/tiff)
|
||||
SET(TIFF_INC ${TIFF}/include)
|
||||
SET(TIFF ${LIBDIR}/tiff)
|
||||
SET(TIFF_INC ${TIFF}/include)
|
||||
|
||||
SET(EXETYPE MACOSX_BUNDLE)
|
||||
SET(EXETYPE MACOSX_BUNDLE)
|
||||
ENDIF(APPLE)
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
|
||||
SET(BINRELOC_INC ${BINRELOC}/include)
|
||||
SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
|
||||
SET(BINRELOC_INC ${BINRELOC}/include)
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
||||
|
||||
# TODO - buildinfo
|
||||
# IF(UNIX)
|
||||
# IF(WITH_BUILDINFO)
|
||||
# EXEC_PROGRAM("date \"+%Y-%m-%d\"" OUTPUT_VARIABLE BUILD_DATE)
|
||||
# EXEC_PROGRAM("date \"+%H:%M:%S\"" OUTPUT_VARIABLE BUILD_TIME)
|
||||
# EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV)
|
||||
# SET(BUILD_TYPE ${CMAKE_BUILD_TYPE})
|
||||
# ENDIF(WITH_BUILDINFO)
|
||||
# ENDIF(UNIX)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Common.
|
||||
|
||||
@@ -534,10 +496,10 @@ set(OPENJPEG_LIb extern_libopenjpeg)
|
||||
# Blender WebPlugin
|
||||
|
||||
IF(WITH_WEBPLUGIN)
|
||||
SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
|
||||
SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none")
|
||||
SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
|
||||
SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none")
|
||||
|
||||
SET(WITH_PLAYER ON)
|
||||
SET(WITH_PLAYER ON)
|
||||
ENDIF(WITH_WEBPLUGIN)
|
||||
|
||||
|
||||
@@ -555,7 +517,7 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
|
||||
|
||||
# better not define flags here but this is a debugging option thats off by default.
|
||||
IF(WITH_CXX_GUARDEDALLOC)
|
||||
SET(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")
|
||||
ENDIF(WITH_CXX_GUARDEDALLOC)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -574,6 +536,6 @@ ADD_SUBDIRECTORY(source/creator)
|
||||
#-----------------------------------------------------------------------------
|
||||
# Blender Player
|
||||
IF(WITH_PLAYER)
|
||||
ADD_SUBDIRECTORY(source/blenderplayer)
|
||||
ADD_SUBDIRECTORY(blenderplayer)
|
||||
ENDIF(WITH_PLAYER)
|
||||
|
||||
|
17
SConstruct
17
SConstruct
@@ -207,6 +207,7 @@ if env['WITH_BF_OPENMP'] == 1:
|
||||
env.Append(CCFLAGS=['-fopenmp'])
|
||||
env.Append(CPPFLAGS=['-fopenmp'])
|
||||
env.Append(CXXFLAGS=['-fopenmp'])
|
||||
# env.Append(LINKFLAGS=['-fprofile-generate'])
|
||||
|
||||
#check for additional debug libnames
|
||||
|
||||
@@ -300,6 +301,7 @@ if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-min
|
||||
env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
|
||||
|
||||
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
|
||||
#B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)
|
||||
B.root_build_dir = env['BF_BUILDDIR']
|
||||
B.doc_build_dir = env['BF_DOCDIR']
|
||||
if not B.root_build_dir[-1]==os.sep:
|
||||
@@ -390,7 +392,7 @@ SConscript(B.root_build_dir+'/source/SConscript')
|
||||
# libraries to give as objects to linking phase
|
||||
mainlist = []
|
||||
for tp in B.possible_types:
|
||||
if not tp == 'player':
|
||||
if not tp == 'player' and not tp == 'player2':
|
||||
mainlist += B.create_blender_liblist(env, tp)
|
||||
|
||||
if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
|
||||
@@ -400,13 +402,15 @@ dobj = B.buildinfo(env, "dynamic") + B.resources
|
||||
thestatlibs, thelibincs = B.setup_staticlibs(env)
|
||||
thesyslibs = B.setup_syslibs(env)
|
||||
|
||||
if env['WITH_BF_PLAYER']:
|
||||
print("Warning: Game player may not build on 2.5")
|
||||
|
||||
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
|
||||
#env.BlenderProg(B.root_build_dir, "blender", dobj , [], mainlist + thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
|
||||
blen = env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
|
||||
|
||||
if env['WITH_BF_PLAYER']:
|
||||
playerlist = B.create_blender_liblist(env, 'player')
|
||||
playerlist += B.create_blender_liblist(env, 'intern')
|
||||
playerlist += B.create_blender_liblist(env, 'extern')
|
||||
env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
|
||||
|
||||
##### Now define some targets
|
||||
@@ -572,13 +576,16 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
|
||||
if env['WITH_BF_OPENAL']:
|
||||
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
|
||||
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
|
||||
if env['WITH_BF_SNDFILE']:
|
||||
dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
|
||||
if env['WITH_BF_FFMPEG']:
|
||||
dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-52.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/avformat-52.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/avutil-50.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/libfaad-2.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/libx264-67.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/xvidcore.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/swscale-0.dll']
|
||||
if env['WITH_BF_JACK']:
|
||||
dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
|
||||
|
135
blenderplayer/CMakeLists.txt
Normal file
135
blenderplayer/CMakeLists.txt
Normal file
@@ -0,0 +1,135 @@
|
||||
# $Id$
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2006, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): Jacques Beaurain.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
MESSAGE(STATUS "Configuring blenderplayer")
|
||||
|
||||
SETUP_LIBDIRS()
|
||||
|
||||
IF(WITH_QUICKTIME)
|
||||
ADD_DEFINITIONS(-DWITH_QUICKTIME)
|
||||
ENDIF(WITH_QUICKTIME)
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
ADD_DEFINITIONS(-DWITH_BINRELOC)
|
||||
INCLUDE_DIRECTORIES(${BINRELOC_INC})
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
|
||||
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
|
||||
DEPENDS ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna
|
||||
)
|
||||
|
||||
IF(WIN32)
|
||||
ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../source/icons/winblender.rc)
|
||||
ELSE(WIN32)
|
||||
ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_DEPENDENCIES(blenderplayer makesdna)
|
||||
|
||||
FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
|
||||
|
||||
SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} gp_common gp_ghost blenkernel_blc)
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
||||
IF(UNIX)
|
||||
# Sort libraries
|
||||
SET(BLENDER_SORTED_LIBS
|
||||
gp_ghost
|
||||
gp_common
|
||||
bf_string
|
||||
bf_ghost
|
||||
bf_blenkernel
|
||||
verse
|
||||
bf_blenkernel
|
||||
bf_blenloader
|
||||
bf_blenpluginapi
|
||||
bf_blroutines
|
||||
bf_converter
|
||||
bf_sumo
|
||||
bf_ketsji
|
||||
extern_solid
|
||||
extern_qhull
|
||||
bf_bullet
|
||||
bf_common
|
||||
bf_dummy
|
||||
bf_logic
|
||||
bf_rasterizer
|
||||
bf_oglrasterizer
|
||||
bf_expressions
|
||||
bf_scenegraph
|
||||
bf_IK
|
||||
bf_moto
|
||||
bf_kernel
|
||||
bf_nodes
|
||||
bf_gpu
|
||||
bf_imbuf
|
||||
bf_avi
|
||||
kx_network
|
||||
bf_ngnetwork
|
||||
bf_loopbacknetwork
|
||||
extern_bullet
|
||||
bf_guardedalloc
|
||||
bf_memutil
|
||||
bf_blenlib
|
||||
bf_cineon
|
||||
bf_openexr
|
||||
extern_libopenjpeg
|
||||
bf_dds
|
||||
bf_readblenfile
|
||||
blenkernel_blc
|
||||
bf_quicktime
|
||||
extern_binreloc
|
||||
extern_glew
|
||||
)
|
||||
|
||||
IF(WITH_CXX_GUARDEDALLOC)
|
||||
SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_guardedalloc_cpp)
|
||||
ENDIF(WITH_CXX_GUARDEDALLOC)
|
||||
|
||||
FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
|
||||
SET(REMLIB ${SORTLIB})
|
||||
FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
|
||||
IF(${SEARCHLIB} STREQUAL ${SORTLIB})
|
||||
SET(REMLIB "")
|
||||
ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
|
||||
ENDFOREACH(SEARCHLIB)
|
||||
IF(REMLIB)
|
||||
MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
|
||||
LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
|
||||
ENDIF(REMLIB)
|
||||
ENDFOREACH(SORTLIB)
|
||||
|
||||
TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_SORTED_LIBS})
|
||||
ELSE(UNIX)
|
||||
TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS})
|
||||
ENDIF(UNIX)
|
||||
|
||||
SETUP_LIBLINKS(blenderplayer)
|
@@ -1,3 +1,10 @@
|
||||
#
|
||||
# Note : if you want to alter this file
|
||||
# copy it as a whole in the upper folder
|
||||
# as user-config.py
|
||||
# dont create a new file with only some
|
||||
# vars changed.
|
||||
|
||||
import commands
|
||||
|
||||
# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
|
||||
@@ -112,12 +119,6 @@ BF_JACK_INC = '${BF_JACK}/include/jack'
|
||||
BF_JACK_LIB = 'jack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = False
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'sndfile'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
|
@@ -33,12 +33,6 @@ BF_JACK_INC = '${BF_JACK}/include/jack'
|
||||
BF_JACK_LIB = 'jack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = False
|
||||
BF_SNDFILE = '/usr'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
|
||||
BF_SNDFILE_LIB = 'sndfile'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = '/usr' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
@@ -91,6 +85,23 @@ BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
#WITH_BF_NSPR = True
|
||||
#BF_NSPR = $(LIBDIR)/nspr
|
||||
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
#BF_NSPR_LIB =
|
||||
|
||||
# Uncomment the following line to use Mozilla inplace of netscape
|
||||
#CPPFLAGS += -DMOZ_NOT_NET
|
||||
# Location of MOZILLA/Netscape header files...
|
||||
#BF_MOZILLA = $(LIBDIR)/mozilla
|
||||
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
|
||||
#BF_MOZILLA_LIB =
|
||||
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
|
||||
# if this is not set.
|
||||
#
|
||||
# Be paranoid regarding library creation (do not update archives)
|
||||
#BF_PARANOID = True
|
||||
|
||||
# enable freetype2 support for text objects
|
||||
BF_FREETYPE = '/usr'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
@@ -170,9 +181,8 @@ REL_CCFLAGS = ['-O2']
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
|
||||
CC_WARN = ['-Wall']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
CC_WARN = ['-Wall']
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
|
@@ -3,9 +3,14 @@ LIBDIR = "${LCGDIR}"
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.1'
|
||||
#BF_PYTHON_VERSION = '2.6'
|
||||
#BF_PYTHON_VERSION = '2.6'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
#BF_PYTHON_LIB = 'python25'
|
||||
#BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/lib25_vs2005'
|
||||
#BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/lib25_vs2005/libpython25.a'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}.a'
|
||||
@@ -17,9 +22,9 @@ BF_OPENAL_LIB = 'wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_FFMPEG = False
|
||||
BF_FFMPEG_LIB = 'avformat-52 avcodec-52 avdevice-52 avutil-50 swscale-0'
|
||||
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
|
||||
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
|
||||
BF_FFMPEG_LIB = 'avformat swscale avcodec avutil avdevice xvidcore x264'
|
||||
BF_FFMPEG_LIBPATH = LIBDIR + '/gcc/ffmpeg/lib'
|
||||
BF_FFMPEG_INC = LIBDIR + '/gcc/ffmpeg/include'
|
||||
|
||||
BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
|
||||
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
|
||||
@@ -32,12 +37,6 @@ BF_JACK_INC = '${BF_JACK}/include'
|
||||
BF_JACK_LIB = 'libjack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = False
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'libsndfile-1'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
@@ -100,6 +99,20 @@ BF_BULLET_LIB = 'extern_bullet'
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
#WITH_BF_NSPR = True
|
||||
#BF_NSPR = $(LIBDIR)/nspr
|
||||
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
#BF_NSPR_LIB =
|
||||
|
||||
# Uncomment the following line to use Mozilla inplace of netscape
|
||||
#CPPFLAGS += -DMOZ_NOT_NET
|
||||
# Location of MOZILLA/Netscape header files...
|
||||
#BF_MOZILLA = $(LIBDIR)/mozilla
|
||||
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
|
||||
#BF_MOZILLA_LIB =
|
||||
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
|
||||
# if this is not set.
|
||||
|
||||
# enable freetype2 support for text objects
|
||||
BF_FREETYPE = LIBDIR + '/gcc/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
|
@@ -4,7 +4,7 @@ LIBDIR = '${LCGDIR}'
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
|
||||
BF_FFMPEG = LIBDIR +'/ffmpeg'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avformat-52.lib avcodec-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib'
|
||||
|
||||
@@ -21,6 +21,11 @@ BF_OPENAL_INC = '${BF_OPENAL}/include '
|
||||
BF_OPENAL_LIB = 'wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
# TODO - are these useful on win32?
|
||||
# BF_CXX = '/usr'
|
||||
# WITH_BF_STATICCXX = False
|
||||
# BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = LIBDIR + '/iconv'
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
@@ -38,12 +43,6 @@ BF_JACK_INC = '${BF_JACK}/include'
|
||||
BF_JACK_LIB = 'libjack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = False
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'libsndfile-1'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
@@ -109,6 +108,23 @@ BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
WITH_BF_BINRELOC = False
|
||||
|
||||
#WITH_BF_NSPR = True
|
||||
#BF_NSPR = $(LIBDIR)/nspr
|
||||
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
#BF_NSPR_LIB =
|
||||
|
||||
# Uncomment the following line to use Mozilla inplace of netscape
|
||||
#CPPFLAGS += -DMOZ_NOT_NET
|
||||
# Location of MOZILLA/Netscape header files...
|
||||
#BF_MOZILLA = $(LIBDIR)/mozilla
|
||||
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
|
||||
#BF_MOZILLA_LIB =
|
||||
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
|
||||
# if this is not set.
|
||||
#
|
||||
# Be paranoid regarding library creation (do not update archives)
|
||||
#BF_PARANOID = True
|
||||
|
||||
# enable freetype2 support for text objects
|
||||
BF_WITH_FREETYPE = True
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
@@ -149,7 +165,6 @@ CXX = 'cl.exe'
|
||||
|
||||
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
|
||||
CXXFLAGS = ['/EHsc']
|
||||
BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
|
||||
|
||||
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
|
||||
|
||||
|
@@ -163,7 +163,6 @@ CXX = 'cl.exe'
|
||||
CFLAGS = []
|
||||
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
|
||||
CXXFLAGS = ['/EHsc']
|
||||
BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE2']
|
||||
|
||||
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
|
||||
|
||||
|
9
extern/CMakeLists.txt
vendored
9
extern/CMakeLists.txt
vendored
@@ -25,18 +25,15 @@
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
IF(WITH_BULLET)
|
||||
ADD_SUBDIRECTORY(bullet2)
|
||||
ADD_SUBDIRECTORY(bullet2)
|
||||
ENDIF(WITH_BULLET)
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
ADD_SUBDIRECTORY(binreloc)
|
||||
ADD_SUBDIRECTORY(binreloc)
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
||||
ADD_SUBDIRECTORY(glew)
|
||||
|
||||
IF(WITH_OPENJPEG)
|
||||
ADD_SUBDIRECTORY(libopenjpeg)
|
||||
ADD_SUBDIRECTORY(libopenjpeg)
|
||||
ENDIF(WITH_OPENJPEG)
|
||||
|
||||
ADD_SUBDIRECTORY(lzo)
|
||||
ADD_SUBDIRECTORY(lzma)
|
||||
|
8
extern/Makefile
vendored
8
extern/Makefile
vendored
@@ -54,14 +54,6 @@ ifeq ($(WITH_OPENJPEG), true)
|
||||
DIRS += libopenjpeg
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_LZO), true)
|
||||
DIRS += lzo/minilzo
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_LZMA), true)
|
||||
DIRS += lzma
|
||||
endif
|
||||
|
||||
TARGET = solid
|
||||
|
||||
all::
|
||||
|
4
extern/SConscript
vendored
4
extern/SConscript
vendored
@@ -22,5 +22,5 @@ if env['WITH_BF_REDCODE'] and env['BF_REDCODE_LIB'] == '':
|
||||
if env['OURPLATFORM'] == 'linux2':
|
||||
SConscript(['binreloc/SConscript']);
|
||||
|
||||
SConscript(['lzo/SConscript'])
|
||||
SConscript(['lzma/SConscript'])
|
||||
# FFTW not needed atm - dg
|
||||
# SConscript(['fftw/SConscript'])
|
||||
|
2
extern/binreloc/SConscript
vendored
2
extern/binreloc/SConscript
vendored
@@ -9,5 +9,5 @@ cflags = []
|
||||
sources = ['binreloc.c']
|
||||
incs = 'include'
|
||||
|
||||
env.BlenderLib ( 'extern_binreloc', sources, Split(incs), Split(defs), libtype=['extern','player'], priority=[36,225], compileflags = cflags)
|
||||
env.BlenderLib ( 'extern_binreloc', sources, Split(incs), Split(defs), libtype=['extern'], priority=[36], compileflags = cflags)
|
||||
|
||||
|
20
extern/bullet2/CMakeLists.txt
vendored
20
extern/bullet2/CMakeLists.txt
vendored
@@ -27,16 +27,16 @@
|
||||
SET(INC . src)
|
||||
|
||||
FILE(GLOB SRC
|
||||
src/LinearMath/*.cpp
|
||||
src/BulletCollision/BroadphaseCollision/*.cpp
|
||||
src/BulletCollision/CollisionShapes/*.cpp
|
||||
src/BulletCollision/NarrowPhaseCollision/*.cpp
|
||||
src/BulletCollision/Gimpact/*.cpp
|
||||
src/BulletCollision//CollisionDispatch/*.cpp
|
||||
src/BulletDynamics/ConstraintSolver/*.cpp
|
||||
src/BulletDynamics/Vehicle/*.cpp
|
||||
src/BulletDynamics/Dynamics/*.cpp
|
||||
src/BulletSoftBody/*.cpp
|
||||
src/LinearMath/*.cpp
|
||||
src/BulletCollision/BroadphaseCollision/*.cpp
|
||||
src/BulletCollision/CollisionShapes/*.cpp
|
||||
src/BulletCollision/NarrowPhaseCollision/*.cpp
|
||||
src/BulletCollision/Gimpact/*.cpp
|
||||
src/BulletCollision//CollisionDispatch/*.cpp
|
||||
src/BulletDynamics/ConstraintSolver/*.cpp
|
||||
src/BulletDynamics/Vehicle/*.cpp
|
||||
src/BulletDynamics/Dynamics/*.cpp
|
||||
src/BulletSoftBody/*.cpp
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS(-D_LIB)
|
||||
|
@@ -211,13 +211,13 @@ ADD_LIBRARY(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS})
|
||||
SET_TARGET_PROPERTIES(BulletCollision PROPERTIES VERSION ${BULLET_VERSION})
|
||||
SET_TARGET_PROPERTIES(BulletCollision PROPERTIES SOVERSION ${BULLET_VERSION})
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
TARGET_LINK_LIBRARIES(BulletCollision LinearMath)
|
||||
TARGET_LINK_LIBRARIES(BulletCollision LinearMath)
|
||||
ENDIF (BUILD_SHARED_LIBS)
|
||||
|
||||
#INSTALL of other files requires CMake 2.6
|
||||
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
||||
INSTALL(TARGETS BulletCollision DESTINATION lib)
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
||||
|
||||
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
||||
|
@@ -34,7 +34,7 @@ ENDIF (BUILD_SHARED_LIBS)
|
||||
|
||||
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
||||
INSTALL(TARGETS BulletSoftBody DESTINATION lib)
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
||||
|
||||
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
||||
|
16
extern/bullet2/src/SConscript
vendored
16
extern/bullet2/src/SConscript
vendored
@@ -35,11 +35,11 @@ softbody_src = env.Glob("BulletSoftBody/*.cpp")
|
||||
|
||||
incs = '. BulletCollision BulletDynamics LinearMath BulletSoftBody'
|
||||
|
||||
env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,137], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[19,136], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2collision_broadphase', sources=collision_broadphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[25,145], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2collision_dispatch', sources=collision_dispatch_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2collision_gimpact', sources=collision_gimpact_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2collision_shapes', sources=collision_shapes_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2collision_narrowphase', sources=collision_narrowphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2softbody', sources=softbody_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[18,135], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[19], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2collision_broadphase', sources=collision_broadphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[25], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2collision_dispatch', sources=collision_dispatch_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2collision_gimpact', sources=collision_gimpact_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2collision_shapes', sources=collision_shapes_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2collision_narrowphase', sources=collision_narrowphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
|
||||
env.BlenderLib ( libname = 'extern_bullet2softbody', sources=softbody_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[18], compileflags=cflags )
|
||||
|
4
extern/glew/CMakeLists.txt
vendored
4
extern/glew/CMakeLists.txt
vendored
@@ -27,11 +27,11 @@
|
||||
SET(INC include src)
|
||||
|
||||
IF(UNIX)
|
||||
SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
|
||||
SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
|
||||
ENDIF(UNIX)
|
||||
|
||||
SET(SRC
|
||||
src/glew.c
|
||||
src/glew.c
|
||||
)
|
||||
|
||||
BLENDERLIB(extern_glew "${SRC}" "${INC}")
|
||||
|
2
extern/glew/SConscript
vendored
2
extern/glew/SConscript
vendored
@@ -9,4 +9,4 @@ sources = ['src/glew.c']
|
||||
defs = ''
|
||||
incs = 'include'
|
||||
|
||||
env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['extern','player'], priority=[50,230])
|
||||
env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['extern'], priority=[50])
|
||||
|
4
extern/libopenjpeg/SConscript
vendored
4
extern/libopenjpeg/SConscript
vendored
@@ -24,5 +24,5 @@ if not env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
oj_env.BlenderLib ( libname='extern_openjpeg',
|
||||
sources=sources, includes=Split(incs),
|
||||
defines=defs,
|
||||
libtype=['extern','player'],
|
||||
priority=[10,185], compileflags = flags)
|
||||
libtype=['extern'],
|
||||
priority=[10], compileflags = flags)
|
||||
|
4
extern/libredcode/SConscript
vendored
4
extern/libredcode/SConscript
vendored
@@ -12,5 +12,5 @@ incs = '. ../libopenjpeg'
|
||||
env.BlenderLib ( libname='extern_redcode',
|
||||
sources=sources, includes=Split(incs),
|
||||
defines=[],
|
||||
libtype=['core','intern'],
|
||||
priority=[5, 5], compileflags = [])
|
||||
libtype=['core','intern','player'],
|
||||
priority=[5, 5, 200], compileflags = [])
|
||||
|
127
extern/lzma/Alloc.c
vendored
127
extern/lzma/Alloc.c
vendored
@@ -1,127 +0,0 @@
|
||||
/* Alloc.c -- Memory allocation functions
|
||||
2008-09-24
|
||||
Igor Pavlov
|
||||
Public domain */
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "Alloc.h"
|
||||
|
||||
/* #define _SZ_ALLOC_DEBUG */
|
||||
|
||||
/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
#include <stdio.h>
|
||||
int g_allocCount = 0;
|
||||
int g_allocCountMid = 0;
|
||||
int g_allocCountBig = 0;
|
||||
#endif
|
||||
|
||||
void *MyAlloc(size_t size)
|
||||
{
|
||||
if (size == 0)
|
||||
return 0;
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
{
|
||||
void *p = malloc(size);
|
||||
fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p);
|
||||
return p;
|
||||
}
|
||||
#else
|
||||
return malloc(size);
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyFree(void *address)
|
||||
{
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
if (address != 0)
|
||||
fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address);
|
||||
#endif
|
||||
free(address);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
void *MidAlloc(size_t size)
|
||||
{
|
||||
if (size == 0)
|
||||
return 0;
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++);
|
||||
#endif
|
||||
return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
|
||||
}
|
||||
|
||||
void MidFree(void *address)
|
||||
{
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
if (address != 0)
|
||||
fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid);
|
||||
#endif
|
||||
if (address == 0)
|
||||
return;
|
||||
VirtualFree(address, 0, MEM_RELEASE);
|
||||
}
|
||||
|
||||
#ifndef MEM_LARGE_PAGES
|
||||
#undef _7ZIP_LARGE_PAGES
|
||||
#endif
|
||||
|
||||
#ifdef _7ZIP_LARGE_PAGES
|
||||
SIZE_T g_LargePageSize = 0;
|
||||
typedef SIZE_T (WINAPI *GetLargePageMinimumP)();
|
||||
#endif
|
||||
|
||||
void SetLargePageSize()
|
||||
{
|
||||
#ifdef _7ZIP_LARGE_PAGES
|
||||
SIZE_T size = 0;
|
||||
GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP)
|
||||
GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum");
|
||||
if (largePageMinimum == 0)
|
||||
return;
|
||||
size = largePageMinimum();
|
||||
if (size == 0 || (size & (size - 1)) != 0)
|
||||
return;
|
||||
g_LargePageSize = size;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void *BigAlloc(size_t size)
|
||||
{
|
||||
if (size == 0)
|
||||
return 0;
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++);
|
||||
#endif
|
||||
|
||||
#ifdef _7ZIP_LARGE_PAGES
|
||||
if (g_LargePageSize != 0 && g_LargePageSize <= (1 << 30) && size >= (1 << 18))
|
||||
{
|
||||
void *res = VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)),
|
||||
MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE);
|
||||
if (res != 0)
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
|
||||
}
|
||||
|
||||
void BigFree(void *address)
|
||||
{
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
if (address != 0)
|
||||
fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig);
|
||||
#endif
|
||||
|
||||
if (address == 0)
|
||||
return;
|
||||
VirtualFree(address, 0, MEM_RELEASE);
|
||||
}
|
||||
|
||||
#endif
|
32
extern/lzma/Alloc.h
vendored
32
extern/lzma/Alloc.h
vendored
@@ -1,32 +0,0 @@
|
||||
/* Alloc.h -- Memory allocation functions
|
||||
2008-03-13
|
||||
Igor Pavlov
|
||||
Public domain */
|
||||
|
||||
#ifndef __COMMON_ALLOC_H
|
||||
#define __COMMON_ALLOC_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
void *MyAlloc(size_t size);
|
||||
void MyFree(void *address);
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
void SetLargePageSize();
|
||||
|
||||
void *MidAlloc(size_t size);
|
||||
void MidFree(void *address);
|
||||
void *BigAlloc(size_t size);
|
||||
void BigFree(void *address);
|
||||
|
||||
#else
|
||||
|
||||
#define MidAlloc(size) MyAlloc(size)
|
||||
#define MidFree(address) MyFree(address)
|
||||
#define BigAlloc(size) MyAlloc(size)
|
||||
#define BigFree(address) MyFree(address)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
34
extern/lzma/CMakeLists.txt
vendored
34
extern/lzma/CMakeLists.txt
vendored
@@ -1,34 +0,0 @@
|
||||
# $Id$
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2006, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): Daniel Genrich
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
SET(INC . )
|
||||
|
||||
FILE(GLOB SRC ./*.c)
|
||||
|
||||
|
||||
|
||||
BLENDERLIB(bf_lzma "${SRC}" "${INC}")
|
||||
#, libtype='blender', priority = 0 )
|
751
extern/lzma/LzFind.c
vendored
751
extern/lzma/LzFind.c
vendored
@@ -1,751 +0,0 @@
|
||||
/* LzFind.c -- Match finder for LZ algorithms
|
||||
2008-10-04 : Igor Pavlov : Public domain */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "LzFind.h"
|
||||
#include "LzHash.h"
|
||||
|
||||
#define kEmptyHashValue 0
|
||||
#define kMaxValForNormalize ((UInt32)0xFFFFFFFF)
|
||||
#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */
|
||||
#define kNormalizeMask (~(kNormalizeStepMin - 1))
|
||||
#define kMaxHistorySize ((UInt32)3 << 30)
|
||||
|
||||
#define kStartMaxLen 3
|
||||
|
||||
static void LzInWindow_Free(CMatchFinder *p, ISzAlloc *alloc)
|
||||
{
|
||||
if (!p->directInput)
|
||||
{
|
||||
alloc->Free(alloc, p->bufferBase);
|
||||
p->bufferBase = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */
|
||||
|
||||
static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAlloc *alloc)
|
||||
{
|
||||
UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv;
|
||||
if (p->directInput)
|
||||
{
|
||||
p->blockSize = blockSize;
|
||||
return 1;
|
||||
}
|
||||
if (p->bufferBase == 0 || p->blockSize != blockSize)
|
||||
{
|
||||
LzInWindow_Free(p, alloc);
|
||||
p->blockSize = blockSize;
|
||||
p->bufferBase = (Byte *)alloc->Alloc(alloc, (size_t)blockSize);
|
||||
}
|
||||
return (p->bufferBase != 0);
|
||||
}
|
||||
|
||||
Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; }
|
||||
Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; }
|
||||
|
||||
UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
|
||||
|
||||
void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue)
|
||||
{
|
||||
p->posLimit -= subValue;
|
||||
p->pos -= subValue;
|
||||
p->streamPos -= subValue;
|
||||
}
|
||||
|
||||
static void MatchFinder_ReadBlock(CMatchFinder *p)
|
||||
{
|
||||
if (p->streamEndWasReached || p->result != SZ_OK)
|
||||
return;
|
||||
for (;;)
|
||||
{
|
||||
Byte *dest = p->buffer + (p->streamPos - p->pos);
|
||||
size_t size = (p->bufferBase + p->blockSize - dest);
|
||||
if (size == 0)
|
||||
return;
|
||||
p->result = p->stream->Read(p->stream, dest, &size);
|
||||
if (p->result != SZ_OK)
|
||||
return;
|
||||
if (size == 0)
|
||||
{
|
||||
p->streamEndWasReached = 1;
|
||||
return;
|
||||
}
|
||||
p->streamPos += (UInt32)size;
|
||||
if (p->streamPos - p->pos > p->keepSizeAfter)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void MatchFinder_MoveBlock(CMatchFinder *p)
|
||||
{
|
||||
memmove(p->bufferBase,
|
||||
p->buffer - p->keepSizeBefore,
|
||||
(size_t)(p->streamPos - p->pos + p->keepSizeBefore));
|
||||
p->buffer = p->bufferBase + p->keepSizeBefore;
|
||||
}
|
||||
|
||||
int MatchFinder_NeedMove(CMatchFinder *p)
|
||||
{
|
||||
/* if (p->streamEndWasReached) return 0; */
|
||||
return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter);
|
||||
}
|
||||
|
||||
void MatchFinder_ReadIfRequired(CMatchFinder *p)
|
||||
{
|
||||
if (p->streamEndWasReached)
|
||||
return;
|
||||
if (p->keepSizeAfter >= p->streamPos - p->pos)
|
||||
MatchFinder_ReadBlock(p);
|
||||
}
|
||||
|
||||
static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p)
|
||||
{
|
||||
if (MatchFinder_NeedMove(p))
|
||||
MatchFinder_MoveBlock(p);
|
||||
MatchFinder_ReadBlock(p);
|
||||
}
|
||||
|
||||
static void MatchFinder_SetDefaultSettings(CMatchFinder *p)
|
||||
{
|
||||
p->cutValue = 32;
|
||||
p->btMode = 1;
|
||||
p->numHashBytes = 4;
|
||||
/* p->skipModeBits = 0; */
|
||||
p->directInput = 0;
|
||||
p->bigHash = 0;
|
||||
}
|
||||
|
||||
#define kCrcPoly 0xEDB88320
|
||||
|
||||
void MatchFinder_Construct(CMatchFinder *p)
|
||||
{
|
||||
UInt32 i;
|
||||
p->bufferBase = 0;
|
||||
p->directInput = 0;
|
||||
p->hash = 0;
|
||||
MatchFinder_SetDefaultSettings(p);
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
UInt32 r = i;
|
||||
int j;
|
||||
for (j = 0; j < 8; j++)
|
||||
r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1));
|
||||
p->crc[i] = r;
|
||||
}
|
||||
}
|
||||
|
||||
static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAlloc *alloc)
|
||||
{
|
||||
alloc->Free(alloc, p->hash);
|
||||
p->hash = 0;
|
||||
}
|
||||
|
||||
void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc)
|
||||
{
|
||||
MatchFinder_FreeThisClassMemory(p, alloc);
|
||||
LzInWindow_Free(p, alloc);
|
||||
}
|
||||
|
||||
static CLzRef* AllocRefs(UInt32 num, ISzAlloc *alloc)
|
||||
{
|
||||
size_t sizeInBytes = (size_t)num * sizeof(CLzRef);
|
||||
if (sizeInBytes / sizeof(CLzRef) != num)
|
||||
return 0;
|
||||
return (CLzRef *)alloc->Alloc(alloc, sizeInBytes);
|
||||
}
|
||||
|
||||
int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
|
||||
UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
|
||||
ISzAlloc *alloc)
|
||||
{
|
||||
UInt32 sizeReserv;
|
||||
if (historySize > kMaxHistorySize)
|
||||
{
|
||||
MatchFinder_Free(p, alloc);
|
||||
return 0;
|
||||
}
|
||||
sizeReserv = historySize >> 1;
|
||||
if (historySize > ((UInt32)2 << 30))
|
||||
sizeReserv = historySize >> 2;
|
||||
sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19);
|
||||
|
||||
p->keepSizeBefore = historySize + keepAddBufferBefore + 1;
|
||||
p->keepSizeAfter = matchMaxLen + keepAddBufferAfter;
|
||||
/* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */
|
||||
if (LzInWindow_Create(p, sizeReserv, alloc))
|
||||
{
|
||||
UInt32 newCyclicBufferSize = (historySize /* >> p->skipModeBits */) + 1;
|
||||
UInt32 hs;
|
||||
p->matchMaxLen = matchMaxLen;
|
||||
{
|
||||
p->fixedHashSize = 0;
|
||||
if (p->numHashBytes == 2)
|
||||
hs = (1 << 16) - 1;
|
||||
else
|
||||
{
|
||||
hs = historySize - 1;
|
||||
hs |= (hs >> 1);
|
||||
hs |= (hs >> 2);
|
||||
hs |= (hs >> 4);
|
||||
hs |= (hs >> 8);
|
||||
hs >>= 1;
|
||||
/* hs >>= p->skipModeBits; */
|
||||
hs |= 0xFFFF; /* don't change it! It's required for Deflate */
|
||||
if (hs > (1 << 24))
|
||||
{
|
||||
if (p->numHashBytes == 3)
|
||||
hs = (1 << 24) - 1;
|
||||
else
|
||||
hs >>= 1;
|
||||
}
|
||||
}
|
||||
p->hashMask = hs;
|
||||
hs++;
|
||||
if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size;
|
||||
if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size;
|
||||
if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size;
|
||||
hs += p->fixedHashSize;
|
||||
}
|
||||
|
||||
{
|
||||
UInt32 prevSize = p->hashSizeSum + p->numSons;
|
||||
UInt32 newSize;
|
||||
p->historySize = historySize;
|
||||
p->hashSizeSum = hs;
|
||||
p->cyclicBufferSize = newCyclicBufferSize;
|
||||
p->numSons = (p->btMode ? newCyclicBufferSize * 2 : newCyclicBufferSize);
|
||||
newSize = p->hashSizeSum + p->numSons;
|
||||
if (p->hash != 0 && prevSize == newSize)
|
||||
return 1;
|
||||
MatchFinder_FreeThisClassMemory(p, alloc);
|
||||
p->hash = AllocRefs(newSize, alloc);
|
||||
if (p->hash != 0)
|
||||
{
|
||||
p->son = p->hash + p->hashSizeSum;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
MatchFinder_Free(p, alloc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void MatchFinder_SetLimits(CMatchFinder *p)
|
||||
{
|
||||
UInt32 limit = kMaxValForNormalize - p->pos;
|
||||
UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos;
|
||||
if (limit2 < limit)
|
||||
limit = limit2;
|
||||
limit2 = p->streamPos - p->pos;
|
||||
if (limit2 <= p->keepSizeAfter)
|
||||
{
|
||||
if (limit2 > 0)
|
||||
limit2 = 1;
|
||||
}
|
||||
else
|
||||
limit2 -= p->keepSizeAfter;
|
||||
if (limit2 < limit)
|
||||
limit = limit2;
|
||||
{
|
||||
UInt32 lenLimit = p->streamPos - p->pos;
|
||||
if (lenLimit > p->matchMaxLen)
|
||||
lenLimit = p->matchMaxLen;
|
||||
p->lenLimit = lenLimit;
|
||||
}
|
||||
p->posLimit = p->pos + limit;
|
||||
}
|
||||
|
||||
void MatchFinder_Init(CMatchFinder *p)
|
||||
{
|
||||
UInt32 i;
|
||||
for (i = 0; i < p->hashSizeSum; i++)
|
||||
p->hash[i] = kEmptyHashValue;
|
||||
p->cyclicBufferPos = 0;
|
||||
p->buffer = p->bufferBase;
|
||||
p->pos = p->streamPos = p->cyclicBufferSize;
|
||||
p->result = SZ_OK;
|
||||
p->streamEndWasReached = 0;
|
||||
MatchFinder_ReadBlock(p);
|
||||
MatchFinder_SetLimits(p);
|
||||
}
|
||||
|
||||
static UInt32 MatchFinder_GetSubValue(CMatchFinder *p)
|
||||
{
|
||||
return (p->pos - p->historySize - 1) & kNormalizeMask;
|
||||
}
|
||||
|
||||
void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems)
|
||||
{
|
||||
UInt32 i;
|
||||
for (i = 0; i < numItems; i++)
|
||||
{
|
||||
UInt32 value = items[i];
|
||||
if (value <= subValue)
|
||||
value = kEmptyHashValue;
|
||||
else
|
||||
value -= subValue;
|
||||
items[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
static void MatchFinder_Normalize(CMatchFinder *p)
|
||||
{
|
||||
UInt32 subValue = MatchFinder_GetSubValue(p);
|
||||
MatchFinder_Normalize3(subValue, p->hash, p->hashSizeSum + p->numSons);
|
||||
MatchFinder_ReduceOffsets(p, subValue);
|
||||
}
|
||||
|
||||
static void MatchFinder_CheckLimits(CMatchFinder *p)
|
||||
{
|
||||
if (p->pos == kMaxValForNormalize)
|
||||
MatchFinder_Normalize(p);
|
||||
if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos)
|
||||
MatchFinder_CheckAndMoveAndRead(p);
|
||||
if (p->cyclicBufferPos == p->cyclicBufferSize)
|
||||
p->cyclicBufferPos = 0;
|
||||
MatchFinder_SetLimits(p);
|
||||
}
|
||||
|
||||
static UInt32 * Hc_GetMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
|
||||
UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
|
||||
UInt32 *distances, UInt32 maxLen)
|
||||
{
|
||||
son[_cyclicBufferPos] = curMatch;
|
||||
for (;;)
|
||||
{
|
||||
UInt32 delta = pos - curMatch;
|
||||
if (cutValue-- == 0 || delta >= _cyclicBufferSize)
|
||||
return distances;
|
||||
{
|
||||
const Byte *pb = cur - delta;
|
||||
curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)];
|
||||
if (pb[maxLen] == cur[maxLen] && *pb == *cur)
|
||||
{
|
||||
UInt32 len = 0;
|
||||
while (++len != lenLimit)
|
||||
if (pb[len] != cur[len])
|
||||
break;
|
||||
if (maxLen < len)
|
||||
{
|
||||
*distances++ = maxLen = len;
|
||||
*distances++ = delta - 1;
|
||||
if (len == lenLimit)
|
||||
return distances;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
|
||||
UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
|
||||
UInt32 *distances, UInt32 maxLen)
|
||||
{
|
||||
CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1;
|
||||
CLzRef *ptr1 = son + (_cyclicBufferPos << 1);
|
||||
UInt32 len0 = 0, len1 = 0;
|
||||
for (;;)
|
||||
{
|
||||
UInt32 delta = pos - curMatch;
|
||||
if (cutValue-- == 0 || delta >= _cyclicBufferSize)
|
||||
{
|
||||
*ptr0 = *ptr1 = kEmptyHashValue;
|
||||
return distances;
|
||||
}
|
||||
{
|
||||
CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
|
||||
const Byte *pb = cur - delta;
|
||||
UInt32 len = (len0 < len1 ? len0 : len1);
|
||||
if (pb[len] == cur[len])
|
||||
{
|
||||
if (++len != lenLimit && pb[len] == cur[len])
|
||||
while (++len != lenLimit)
|
||||
if (pb[len] != cur[len])
|
||||
break;
|
||||
if (maxLen < len)
|
||||
{
|
||||
*distances++ = maxLen = len;
|
||||
*distances++ = delta - 1;
|
||||
if (len == lenLimit)
|
||||
{
|
||||
*ptr1 = pair[0];
|
||||
*ptr0 = pair[1];
|
||||
return distances;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pb[len] < cur[len])
|
||||
{
|
||||
*ptr1 = curMatch;
|
||||
ptr1 = pair + 1;
|
||||
curMatch = *ptr1;
|
||||
len1 = len;
|
||||
}
|
||||
else
|
||||
{
|
||||
*ptr0 = curMatch;
|
||||
ptr0 = pair;
|
||||
curMatch = *ptr0;
|
||||
len0 = len;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
|
||||
UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue)
|
||||
{
|
||||
CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1;
|
||||
CLzRef *ptr1 = son + (_cyclicBufferPos << 1);
|
||||
UInt32 len0 = 0, len1 = 0;
|
||||
for (;;)
|
||||
{
|
||||
UInt32 delta = pos - curMatch;
|
||||
if (cutValue-- == 0 || delta >= _cyclicBufferSize)
|
||||
{
|
||||
*ptr0 = *ptr1 = kEmptyHashValue;
|
||||
return;
|
||||
}
|
||||
{
|
||||
CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
|
||||
const Byte *pb = cur - delta;
|
||||
UInt32 len = (len0 < len1 ? len0 : len1);
|
||||
if (pb[len] == cur[len])
|
||||
{
|
||||
while (++len != lenLimit)
|
||||
if (pb[len] != cur[len])
|
||||
break;
|
||||
{
|
||||
if (len == lenLimit)
|
||||
{
|
||||
*ptr1 = pair[0];
|
||||
*ptr0 = pair[1];
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pb[len] < cur[len])
|
||||
{
|
||||
*ptr1 = curMatch;
|
||||
ptr1 = pair + 1;
|
||||
curMatch = *ptr1;
|
||||
len1 = len;
|
||||
}
|
||||
else
|
||||
{
|
||||
*ptr0 = curMatch;
|
||||
ptr0 = pair;
|
||||
curMatch = *ptr0;
|
||||
len0 = len;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define MOVE_POS \
|
||||
++p->cyclicBufferPos; \
|
||||
p->buffer++; \
|
||||
if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p);
|
||||
|
||||
#define MOVE_POS_RET MOVE_POS return offset;
|
||||
|
||||
static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; }
|
||||
|
||||
#define GET_MATCHES_HEADER2(minLen, ret_op) \
|
||||
UInt32 lenLimit; UInt32 hashValue; const Byte *cur; UInt32 curMatch; \
|
||||
lenLimit = p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \
|
||||
cur = p->buffer;
|
||||
|
||||
#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0)
|
||||
#define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue)
|
||||
|
||||
#define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue
|
||||
|
||||
#define GET_MATCHES_FOOTER(offset, maxLen) \
|
||||
offset = (UInt32)(GetMatchesSpec1(lenLimit, curMatch, MF_PARAMS(p), \
|
||||
distances + offset, maxLen) - distances); MOVE_POS_RET;
|
||||
|
||||
#define SKIP_FOOTER \
|
||||
SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS;
|
||||
|
||||
static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
||||
{
|
||||
UInt32 offset;
|
||||
GET_MATCHES_HEADER(2)
|
||||
HASH2_CALC;
|
||||
curMatch = p->hash[hashValue];
|
||||
p->hash[hashValue] = p->pos;
|
||||
offset = 0;
|
||||
GET_MATCHES_FOOTER(offset, 1)
|
||||
}
|
||||
|
||||
UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
||||
{
|
||||
UInt32 offset;
|
||||
GET_MATCHES_HEADER(3)
|
||||
HASH_ZIP_CALC;
|
||||
curMatch = p->hash[hashValue];
|
||||
p->hash[hashValue] = p->pos;
|
||||
offset = 0;
|
||||
GET_MATCHES_FOOTER(offset, 2)
|
||||
}
|
||||
|
||||
static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
||||
{
|
||||
UInt32 hash2Value, delta2, maxLen, offset;
|
||||
GET_MATCHES_HEADER(3)
|
||||
|
||||
HASH3_CALC;
|
||||
|
||||
delta2 = p->pos - p->hash[hash2Value];
|
||||
curMatch = p->hash[kFix3HashSize + hashValue];
|
||||
|
||||
p->hash[hash2Value] =
|
||||
p->hash[kFix3HashSize + hashValue] = p->pos;
|
||||
|
||||
|
||||
maxLen = 2;
|
||||
offset = 0;
|
||||
if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
|
||||
{
|
||||
for (; maxLen != lenLimit; maxLen++)
|
||||
if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
|
||||
break;
|
||||
distances[0] = maxLen;
|
||||
distances[1] = delta2 - 1;
|
||||
offset = 2;
|
||||
if (maxLen == lenLimit)
|
||||
{
|
||||
SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));
|
||||
MOVE_POS_RET;
|
||||
}
|
||||
}
|
||||
GET_MATCHES_FOOTER(offset, maxLen)
|
||||
}
|
||||
|
||||
static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
||||
{
|
||||
UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset;
|
||||
GET_MATCHES_HEADER(4)
|
||||
|
||||
HASH4_CALC;
|
||||
|
||||
delta2 = p->pos - p->hash[ hash2Value];
|
||||
delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
|
||||
curMatch = p->hash[kFix4HashSize + hashValue];
|
||||
|
||||
p->hash[ hash2Value] =
|
||||
p->hash[kFix3HashSize + hash3Value] =
|
||||
p->hash[kFix4HashSize + hashValue] = p->pos;
|
||||
|
||||
maxLen = 1;
|
||||
offset = 0;
|
||||
if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
|
||||
{
|
||||
distances[0] = maxLen = 2;
|
||||
distances[1] = delta2 - 1;
|
||||
offset = 2;
|
||||
}
|
||||
if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur)
|
||||
{
|
||||
maxLen = 3;
|
||||
distances[offset + 1] = delta3 - 1;
|
||||
offset += 2;
|
||||
delta2 = delta3;
|
||||
}
|
||||
if (offset != 0)
|
||||
{
|
||||
for (; maxLen != lenLimit; maxLen++)
|
||||
if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
|
||||
break;
|
||||
distances[offset - 2] = maxLen;
|
||||
if (maxLen == lenLimit)
|
||||
{
|
||||
SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));
|
||||
MOVE_POS_RET;
|
||||
}
|
||||
}
|
||||
if (maxLen < 3)
|
||||
maxLen = 3;
|
||||
GET_MATCHES_FOOTER(offset, maxLen)
|
||||
}
|
||||
|
||||
static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
||||
{
|
||||
UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset;
|
||||
GET_MATCHES_HEADER(4)
|
||||
|
||||
HASH4_CALC;
|
||||
|
||||
delta2 = p->pos - p->hash[ hash2Value];
|
||||
delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
|
||||
curMatch = p->hash[kFix4HashSize + hashValue];
|
||||
|
||||
p->hash[ hash2Value] =
|
||||
p->hash[kFix3HashSize + hash3Value] =
|
||||
p->hash[kFix4HashSize + hashValue] = p->pos;
|
||||
|
||||
maxLen = 1;
|
||||
offset = 0;
|
||||
if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
|
||||
{
|
||||
distances[0] = maxLen = 2;
|
||||
distances[1] = delta2 - 1;
|
||||
offset = 2;
|
||||
}
|
||||
if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur)
|
||||
{
|
||||
maxLen = 3;
|
||||
distances[offset + 1] = delta3 - 1;
|
||||
offset += 2;
|
||||
delta2 = delta3;
|
||||
}
|
||||
if (offset != 0)
|
||||
{
|
||||
for (; maxLen != lenLimit; maxLen++)
|
||||
if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
|
||||
break;
|
||||
distances[offset - 2] = maxLen;
|
||||
if (maxLen == lenLimit)
|
||||
{
|
||||
p->son[p->cyclicBufferPos] = curMatch;
|
||||
MOVE_POS_RET;
|
||||
}
|
||||
}
|
||||
if (maxLen < 3)
|
||||
maxLen = 3;
|
||||
offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
|
||||
distances + offset, maxLen) - (distances));
|
||||
MOVE_POS_RET
|
||||
}
|
||||
|
||||
UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
||||
{
|
||||
UInt32 offset;
|
||||
GET_MATCHES_HEADER(3)
|
||||
HASH_ZIP_CALC;
|
||||
curMatch = p->hash[hashValue];
|
||||
p->hash[hashValue] = p->pos;
|
||||
offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
|
||||
distances, 2) - (distances));
|
||||
MOVE_POS_RET
|
||||
}
|
||||
|
||||
static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
||||
{
|
||||
do
|
||||
{
|
||||
SKIP_HEADER(2)
|
||||
HASH2_CALC;
|
||||
curMatch = p->hash[hashValue];
|
||||
p->hash[hashValue] = p->pos;
|
||||
SKIP_FOOTER
|
||||
}
|
||||
while (--num != 0);
|
||||
}
|
||||
|
||||
void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
||||
{
|
||||
do
|
||||
{
|
||||
SKIP_HEADER(3)
|
||||
HASH_ZIP_CALC;
|
||||
curMatch = p->hash[hashValue];
|
||||
p->hash[hashValue] = p->pos;
|
||||
SKIP_FOOTER
|
||||
}
|
||||
while (--num != 0);
|
||||
}
|
||||
|
||||
static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
||||
{
|
||||
do
|
||||
{
|
||||
UInt32 hash2Value;
|
||||
SKIP_HEADER(3)
|
||||
HASH3_CALC;
|
||||
curMatch = p->hash[kFix3HashSize + hashValue];
|
||||
p->hash[hash2Value] =
|
||||
p->hash[kFix3HashSize + hashValue] = p->pos;
|
||||
SKIP_FOOTER
|
||||
}
|
||||
while (--num != 0);
|
||||
}
|
||||
|
||||
static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
||||
{
|
||||
do
|
||||
{
|
||||
UInt32 hash2Value, hash3Value;
|
||||
SKIP_HEADER(4)
|
||||
HASH4_CALC;
|
||||
curMatch = p->hash[kFix4HashSize + hashValue];
|
||||
p->hash[ hash2Value] =
|
||||
p->hash[kFix3HashSize + hash3Value] = p->pos;
|
||||
p->hash[kFix4HashSize + hashValue] = p->pos;
|
||||
SKIP_FOOTER
|
||||
}
|
||||
while (--num != 0);
|
||||
}
|
||||
|
||||
static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
||||
{
|
||||
do
|
||||
{
|
||||
UInt32 hash2Value, hash3Value;
|
||||
SKIP_HEADER(4)
|
||||
HASH4_CALC;
|
||||
curMatch = p->hash[kFix4HashSize + hashValue];
|
||||
p->hash[ hash2Value] =
|
||||
p->hash[kFix3HashSize + hash3Value] =
|
||||
p->hash[kFix4HashSize + hashValue] = p->pos;
|
||||
p->son[p->cyclicBufferPos] = curMatch;
|
||||
MOVE_POS
|
||||
}
|
||||
while (--num != 0);
|
||||
}
|
||||
|
||||
void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
||||
{
|
||||
do
|
||||
{
|
||||
SKIP_HEADER(3)
|
||||
HASH_ZIP_CALC;
|
||||
curMatch = p->hash[hashValue];
|
||||
p->hash[hashValue] = p->pos;
|
||||
p->son[p->cyclicBufferPos] = curMatch;
|
||||
MOVE_POS
|
||||
}
|
||||
while (--num != 0);
|
||||
}
|
||||
|
||||
void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable)
|
||||
{
|
||||
vTable->Init = (Mf_Init_Func)MatchFinder_Init;
|
||||
vTable->GetIndexByte = (Mf_GetIndexByte_Func)MatchFinder_GetIndexByte;
|
||||
vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes;
|
||||
vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos;
|
||||
if (!p->btMode)
|
||||
{
|
||||
vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches;
|
||||
vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip;
|
||||
}
|
||||
else if (p->numHashBytes == 2)
|
||||
{
|
||||
vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches;
|
||||
vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip;
|
||||
}
|
||||
else if (p->numHashBytes == 3)
|
||||
{
|
||||
vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches;
|
||||
vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip;
|
||||
}
|
||||
else
|
||||
{
|
||||
vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches;
|
||||
vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip;
|
||||
}
|
||||
}
|
107
extern/lzma/LzFind.h
vendored
107
extern/lzma/LzFind.h
vendored
@@ -1,107 +0,0 @@
|
||||
/* LzFind.h -- Match finder for LZ algorithms
|
||||
2008-10-04 : Igor Pavlov : Public domain */
|
||||
|
||||
#ifndef __LZFIND_H
|
||||
#define __LZFIND_H
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
typedef UInt32 CLzRef;
|
||||
|
||||
typedef struct _CMatchFinder
|
||||
{
|
||||
Byte *buffer;
|
||||
UInt32 pos;
|
||||
UInt32 posLimit;
|
||||
UInt32 streamPos;
|
||||
UInt32 lenLimit;
|
||||
|
||||
UInt32 cyclicBufferPos;
|
||||
UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */
|
||||
|
||||
UInt32 matchMaxLen;
|
||||
CLzRef *hash;
|
||||
CLzRef *son;
|
||||
UInt32 hashMask;
|
||||
UInt32 cutValue;
|
||||
|
||||
Byte *bufferBase;
|
||||
ISeqInStream *stream;
|
||||
int streamEndWasReached;
|
||||
|
||||
UInt32 blockSize;
|
||||
UInt32 keepSizeBefore;
|
||||
UInt32 keepSizeAfter;
|
||||
|
||||
UInt32 numHashBytes;
|
||||
int directInput;
|
||||
int btMode;
|
||||
/* int skipModeBits; */
|
||||
int bigHash;
|
||||
UInt32 historySize;
|
||||
UInt32 fixedHashSize;
|
||||
UInt32 hashSizeSum;
|
||||
UInt32 numSons;
|
||||
SRes result;
|
||||
UInt32 crc[256];
|
||||
} CMatchFinder;
|
||||
|
||||
#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer)
|
||||
#define Inline_MatchFinder_GetIndexByte(p, index) ((p)->buffer[(Int32)(index)])
|
||||
|
||||
#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos)
|
||||
|
||||
int MatchFinder_NeedMove(CMatchFinder *p);
|
||||
Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p);
|
||||
void MatchFinder_MoveBlock(CMatchFinder *p);
|
||||
void MatchFinder_ReadIfRequired(CMatchFinder *p);
|
||||
|
||||
void MatchFinder_Construct(CMatchFinder *p);
|
||||
|
||||
/* Conditions:
|
||||
historySize <= 3 GB
|
||||
keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB
|
||||
*/
|
||||
int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
|
||||
UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
|
||||
ISzAlloc *alloc);
|
||||
void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc);
|
||||
void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems);
|
||||
void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue);
|
||||
|
||||
UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son,
|
||||
UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue,
|
||||
UInt32 *distances, UInt32 maxLen);
|
||||
|
||||
/*
|
||||
Conditions:
|
||||
Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func.
|
||||
Mf_GetPointerToCurrentPos_Func's result must be used only before any other function
|
||||
*/
|
||||
|
||||
typedef void (*Mf_Init_Func)(void *object);
|
||||
typedef Byte (*Mf_GetIndexByte_Func)(void *object, Int32 index);
|
||||
typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object);
|
||||
typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object);
|
||||
typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances);
|
||||
typedef void (*Mf_Skip_Func)(void *object, UInt32);
|
||||
|
||||
typedef struct _IMatchFinder
|
||||
{
|
||||
Mf_Init_Func Init;
|
||||
Mf_GetIndexByte_Func GetIndexByte;
|
||||
Mf_GetNumAvailableBytes_Func GetNumAvailableBytes;
|
||||
Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos;
|
||||
Mf_GetMatches_Func GetMatches;
|
||||
Mf_Skip_Func Skip;
|
||||
} IMatchFinder;
|
||||
|
||||
void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable);
|
||||
|
||||
void MatchFinder_Init(CMatchFinder *p);
|
||||
UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
|
||||
UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
|
||||
void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
|
||||
void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
|
||||
|
||||
#endif
|
54
extern/lzma/LzHash.h
vendored
54
extern/lzma/LzHash.h
vendored
@@ -1,54 +0,0 @@
|
||||
/* LzHash.h -- HASH functions for LZ algorithms
|
||||
2008-10-04 : Igor Pavlov : Public domain */
|
||||
|
||||
#ifndef __LZHASH_H
|
||||
#define __LZHASH_H
|
||||
|
||||
#define kHash2Size (1 << 10)
|
||||
#define kHash3Size (1 << 16)
|
||||
#define kHash4Size (1 << 20)
|
||||
|
||||
#define kFix3HashSize (kHash2Size)
|
||||
#define kFix4HashSize (kHash2Size + kHash3Size)
|
||||
#define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size)
|
||||
|
||||
#define HASH2_CALC hashValue = cur[0] | ((UInt32)cur[1] << 8);
|
||||
|
||||
#define HASH3_CALC { \
|
||||
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
|
||||
hash2Value = temp & (kHash2Size - 1); \
|
||||
hashValue = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; }
|
||||
|
||||
#define HASH4_CALC { \
|
||||
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
|
||||
hash2Value = temp & (kHash2Size - 1); \
|
||||
hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
|
||||
hashValue = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & p->hashMask; }
|
||||
|
||||
#define HASH5_CALC { \
|
||||
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
|
||||
hash2Value = temp & (kHash2Size - 1); \
|
||||
hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
|
||||
hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)); \
|
||||
hashValue = (hash4Value ^ (p->crc[cur[4]] << 3)) & p->hashMask; \
|
||||
hash4Value &= (kHash4Size - 1); }
|
||||
|
||||
/* #define HASH_ZIP_CALC hashValue = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */
|
||||
#define HASH_ZIP_CALC hashValue = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF;
|
||||
|
||||
|
||||
#define MT_HASH2_CALC \
|
||||
hash2Value = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1);
|
||||
|
||||
#define MT_HASH3_CALC { \
|
||||
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
|
||||
hash2Value = temp & (kHash2Size - 1); \
|
||||
hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); }
|
||||
|
||||
#define MT_HASH4_CALC { \
|
||||
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
|
||||
hash2Value = temp & (kHash2Size - 1); \
|
||||
hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
|
||||
hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); }
|
||||
|
||||
#endif
|
1007
extern/lzma/LzmaDec.c
vendored
1007
extern/lzma/LzmaDec.c
vendored
File diff suppressed because it is too large
Load Diff
223
extern/lzma/LzmaDec.h
vendored
223
extern/lzma/LzmaDec.h
vendored
@@ -1,223 +0,0 @@
|
||||
/* LzmaDec.h -- LZMA Decoder
|
||||
2008-10-04 : Igor Pavlov : Public domain */
|
||||
|
||||
#ifndef __LZMADEC_H
|
||||
#define __LZMADEC_H
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
/* #define _LZMA_PROB32 */
|
||||
/* _LZMA_PROB32 can increase the speed on some CPUs,
|
||||
but memory usage for CLzmaDec::probs will be doubled in that case */
|
||||
|
||||
#ifdef _LZMA_PROB32
|
||||
#define CLzmaProb UInt32
|
||||
#else
|
||||
#define CLzmaProb UInt16
|
||||
#endif
|
||||
|
||||
|
||||
/* ---------- LZMA Properties ---------- */
|
||||
|
||||
#define LZMA_PROPS_SIZE 5
|
||||
|
||||
typedef struct _CLzmaProps
|
||||
{
|
||||
unsigned lc, lp, pb;
|
||||
UInt32 dicSize;
|
||||
} CLzmaProps;
|
||||
|
||||
/* LzmaProps_Decode - decodes properties
|
||||
Returns:
|
||||
SZ_OK
|
||||
SZ_ERROR_UNSUPPORTED - Unsupported properties
|
||||
*/
|
||||
|
||||
SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size);
|
||||
|
||||
|
||||
/* ---------- LZMA Decoder state ---------- */
|
||||
|
||||
/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case.
|
||||
Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */
|
||||
|
||||
#define LZMA_REQUIRED_INPUT_MAX 20
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CLzmaProps prop;
|
||||
CLzmaProb *probs;
|
||||
Byte *dic;
|
||||
const Byte *buf;
|
||||
UInt32 range, code;
|
||||
SizeT dicPos;
|
||||
SizeT dicBufSize;
|
||||
UInt32 processedPos;
|
||||
UInt32 checkDicSize;
|
||||
unsigned state;
|
||||
UInt32 reps[4];
|
||||
unsigned remainLen;
|
||||
int needFlush;
|
||||
int needInitState;
|
||||
UInt32 numProbs;
|
||||
unsigned tempBufSize;
|
||||
Byte tempBuf[LZMA_REQUIRED_INPUT_MAX];
|
||||
} CLzmaDec;
|
||||
|
||||
#define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; }
|
||||
|
||||
void LzmaDec_Init(CLzmaDec *p);
|
||||
|
||||
/* There are two types of LZMA streams:
|
||||
0) Stream with end mark. That end mark adds about 6 bytes to compressed size.
|
||||
1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
LZMA_FINISH_ANY, /* finish at any point */
|
||||
LZMA_FINISH_END /* block must be finished at the end */
|
||||
} ELzmaFinishMode;
|
||||
|
||||
/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!!
|
||||
|
||||
You must use LZMA_FINISH_END, when you know that current output buffer
|
||||
covers last bytes of block. In other cases you must use LZMA_FINISH_ANY.
|
||||
|
||||
If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK,
|
||||
and output value of destLen will be less than output buffer size limit.
|
||||
You can check status result also.
|
||||
|
||||
You can use multiple checks to test data integrity after full decompression:
|
||||
1) Check Result and "status" variable.
|
||||
2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
|
||||
3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
|
||||
You must use correct finish mode in that case. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */
|
||||
LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */
|
||||
LZMA_STATUS_NOT_FINISHED, /* stream was not finished */
|
||||
LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */
|
||||
LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */
|
||||
} ELzmaStatus;
|
||||
|
||||
/* ELzmaStatus is used only as output value for function call */
|
||||
|
||||
|
||||
/* ---------- Interfaces ---------- */
|
||||
|
||||
/* There are 3 levels of interfaces:
|
||||
1) Dictionary Interface
|
||||
2) Buffer Interface
|
||||
3) One Call Interface
|
||||
You can select any of these interfaces, but don't mix functions from different
|
||||
groups for same object. */
|
||||
|
||||
|
||||
/* There are two variants to allocate state for Dictionary Interface:
|
||||
1) LzmaDec_Allocate / LzmaDec_Free
|
||||
2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs
|
||||
You can use variant 2, if you set dictionary buffer manually.
|
||||
For Buffer Interface you must always use variant 1.
|
||||
|
||||
LzmaDec_Allocate* can return:
|
||||
SZ_OK
|
||||
SZ_ERROR_MEM - Memory allocation error
|
||||
SZ_ERROR_UNSUPPORTED - Unsupported properties
|
||||
*/
|
||||
|
||||
SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc);
|
||||
void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);
|
||||
|
||||
SRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc);
|
||||
void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc);
|
||||
|
||||
/* ---------- Dictionary Interface ---------- */
|
||||
|
||||
/* You can use it, if you want to eliminate the overhead for data copying from
|
||||
dictionary to some other external buffer.
|
||||
You must work with CLzmaDec variables directly in this interface.
|
||||
|
||||
STEPS:
|
||||
LzmaDec_Constr()
|
||||
LzmaDec_Allocate()
|
||||
for (each new stream)
|
||||
{
|
||||
LzmaDec_Init()
|
||||
while (it needs more decompression)
|
||||
{
|
||||
LzmaDec_DecodeToDic()
|
||||
use data from CLzmaDec::dic and update CLzmaDec::dicPos
|
||||
}
|
||||
}
|
||||
LzmaDec_Free()
|
||||
*/
|
||||
|
||||
/* LzmaDec_DecodeToDic
|
||||
|
||||
The decoding to internal dictionary buffer (CLzmaDec::dic).
|
||||
You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
|
||||
|
||||
finishMode:
|
||||
It has meaning only if the decoding reaches output limit (dicLimit).
|
||||
LZMA_FINISH_ANY - Decode just dicLimit bytes.
|
||||
LZMA_FINISH_END - Stream must be finished after dicLimit.
|
||||
|
||||
Returns:
|
||||
SZ_OK
|
||||
status:
|
||||
LZMA_STATUS_FINISHED_WITH_MARK
|
||||
LZMA_STATUS_NOT_FINISHED
|
||||
LZMA_STATUS_NEEDS_MORE_INPUT
|
||||
LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
|
||||
SZ_ERROR_DATA - Data error
|
||||
*/
|
||||
|
||||
SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit,
|
||||
const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
|
||||
|
||||
|
||||
/* ---------- Buffer Interface ---------- */
|
||||
|
||||
/* It's zlib-like interface.
|
||||
See LzmaDec_DecodeToDic description for information about STEPS and return results,
|
||||
but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need
|
||||
to work with CLzmaDec variables manually.
|
||||
|
||||
finishMode:
|
||||
It has meaning only if the decoding reaches output limit (*destLen).
|
||||
LZMA_FINISH_ANY - Decode just destLen bytes.
|
||||
LZMA_FINISH_END - Stream must be finished after (*destLen).
|
||||
*/
|
||||
|
||||
SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
|
||||
const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
|
||||
|
||||
|
||||
/* ---------- One Call Interface ---------- */
|
||||
|
||||
/* LzmaDecode
|
||||
|
||||
finishMode:
|
||||
It has meaning only if the decoding reaches output limit (*destLen).
|
||||
LZMA_FINISH_ANY - Decode just destLen bytes.
|
||||
LZMA_FINISH_END - Stream must be finished after (*destLen).
|
||||
|
||||
Returns:
|
||||
SZ_OK
|
||||
status:
|
||||
LZMA_STATUS_FINISHED_WITH_MARK
|
||||
LZMA_STATUS_NOT_FINISHED
|
||||
LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
|
||||
SZ_ERROR_DATA - Data error
|
||||
SZ_ERROR_MEM - Memory allocation error
|
||||
SZ_ERROR_UNSUPPORTED - Unsupported properties
|
||||
SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
|
||||
*/
|
||||
|
||||
SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
|
||||
const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
|
||||
ELzmaStatus *status, ISzAlloc *alloc);
|
||||
|
||||
#endif
|
2281
extern/lzma/LzmaEnc.c
vendored
2281
extern/lzma/LzmaEnc.c
vendored
File diff suppressed because it is too large
Load Diff
72
extern/lzma/LzmaEnc.h
vendored
72
extern/lzma/LzmaEnc.h
vendored
@@ -1,72 +0,0 @@
|
||||
/* LzmaEnc.h -- LZMA Encoder
|
||||
2008-10-04 : Igor Pavlov : Public domain */
|
||||
|
||||
#ifndef __LZMAENC_H
|
||||
#define __LZMAENC_H
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
#define LZMA_PROPS_SIZE 5
|
||||
|
||||
typedef struct _CLzmaEncProps
|
||||
{
|
||||
int level; /* 0 <= level <= 9 */
|
||||
UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version
|
||||
(1 << 12) <= dictSize <= (1 << 30) for 64-bit version
|
||||
default = (1 << 24) */
|
||||
int lc; /* 0 <= lc <= 8, default = 3 */
|
||||
int lp; /* 0 <= lp <= 4, default = 0 */
|
||||
int pb; /* 0 <= pb <= 4, default = 2 */
|
||||
int algo; /* 0 - fast, 1 - normal, default = 1 */
|
||||
int fb; /* 5 <= fb <= 273, default = 32 */
|
||||
int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */
|
||||
int numHashBytes; /* 2, 3 or 4, default = 4 */
|
||||
UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */
|
||||
unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */
|
||||
int numThreads; /* 1 or 2, default = 2 */
|
||||
} CLzmaEncProps;
|
||||
|
||||
void LzmaEncProps_Init(CLzmaEncProps *p);
|
||||
void LzmaEncProps_Normalize(CLzmaEncProps *p);
|
||||
UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2);
|
||||
|
||||
|
||||
/* ---------- CLzmaEncHandle Interface ---------- */
|
||||
|
||||
/* LzmaEnc_* functions can return the following exit codes:
|
||||
Returns:
|
||||
SZ_OK - OK
|
||||
SZ_ERROR_MEM - Memory allocation error
|
||||
SZ_ERROR_PARAM - Incorrect paramater in props
|
||||
SZ_ERROR_WRITE - Write callback error.
|
||||
SZ_ERROR_PROGRESS - some break from progress callback
|
||||
SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
|
||||
*/
|
||||
|
||||
typedef void * CLzmaEncHandle;
|
||||
|
||||
CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc);
|
||||
void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig);
|
||||
SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props);
|
||||
SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size);
|
||||
SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream,
|
||||
ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
|
||||
SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
|
||||
int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
|
||||
|
||||
/* ---------- One Call Interface ---------- */
|
||||
|
||||
/* LzmaEncode
|
||||
Return code:
|
||||
SZ_OK - OK
|
||||
SZ_ERROR_MEM - Memory allocation error
|
||||
SZ_ERROR_PARAM - Incorrect paramater
|
||||
SZ_ERROR_OUTPUT_EOF - output buffer overflow
|
||||
SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
|
||||
*/
|
||||
|
||||
SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
|
||||
const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
|
||||
ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
|
||||
|
||||
#endif
|
46
extern/lzma/LzmaLib.c
vendored
46
extern/lzma/LzmaLib.c
vendored
@@ -1,46 +0,0 @@
|
||||
/* LzmaLib.c -- LZMA library wrapper
|
||||
2008-08-05
|
||||
Igor Pavlov
|
||||
Public domain */
|
||||
|
||||
#include "LzmaEnc.h"
|
||||
#include "LzmaDec.h"
|
||||
#include "Alloc.h"
|
||||
#include "LzmaLib.h"
|
||||
|
||||
static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
|
||||
static void SzFree(void *p, void *address) { p = p; MyFree(address); }
|
||||
static ISzAlloc g_Alloc = { SzAlloc, SzFree };
|
||||
|
||||
MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen,
|
||||
unsigned char *outProps, size_t *outPropsSize,
|
||||
int level, /* 0 <= level <= 9, default = 5 */
|
||||
unsigned dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */
|
||||
int lc, /* 0 <= lc <= 8, default = 3 */
|
||||
int lp, /* 0 <= lp <= 4, default = 0 */
|
||||
int pb, /* 0 <= pb <= 4, default = 2 */
|
||||
int fb, /* 5 <= fb <= 273, default = 32 */
|
||||
int numThreads /* 1 or 2, default = 2 */
|
||||
)
|
||||
{
|
||||
CLzmaEncProps props;
|
||||
LzmaEncProps_Init(&props);
|
||||
props.level = level;
|
||||
props.dictSize = dictSize;
|
||||
props.lc = lc;
|
||||
props.lp = lp;
|
||||
props.pb = pb;
|
||||
props.fb = fb;
|
||||
props.numThreads = numThreads;
|
||||
|
||||
return LzmaEncode(dest, destLen, src, srcLen, &props, outProps, outPropsSize, 0,
|
||||
NULL, &g_Alloc, &g_Alloc);
|
||||
}
|
||||
|
||||
|
||||
MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen,
|
||||
const unsigned char *props, size_t propsSize)
|
||||
{
|
||||
ELzmaStatus status;
|
||||
return LzmaDecode(dest, destLen, src, srcLen, props, (unsigned)propsSize, LZMA_FINISH_ANY, &status, &g_Alloc);
|
||||
}
|
135
extern/lzma/LzmaLib.h
vendored
135
extern/lzma/LzmaLib.h
vendored
@@ -1,135 +0,0 @@
|
||||
/* LzmaLib.h -- LZMA library interface
|
||||
2008-08-05
|
||||
Igor Pavlov
|
||||
Public domain */
|
||||
|
||||
#ifndef __LZMALIB_H
|
||||
#define __LZMALIB_H
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define MY_EXTERN_C extern "C"
|
||||
#else
|
||||
#define MY_EXTERN_C extern
|
||||
#endif
|
||||
|
||||
#define MY_STDAPI MY_EXTERN_C int MY_STD_CALL
|
||||
|
||||
#define LZMA_PROPS_SIZE 5
|
||||
|
||||
/*
|
||||
RAM requirements for LZMA:
|
||||
for compression: (dictSize * 11.5 + 6 MB) + state_size
|
||||
for decompression: dictSize + state_size
|
||||
state_size = (4 + (1.5 << (lc + lp))) KB
|
||||
by default (lc=3, lp=0), state_size = 16 KB.
|
||||
|
||||
LZMA properties (5 bytes) format
|
||||
Offset Size Description
|
||||
0 1 lc, lp and pb in encoded form.
|
||||
1 4 dictSize (little endian).
|
||||
*/
|
||||
|
||||
/*
|
||||
LzmaCompress
|
||||
------------
|
||||
|
||||
outPropsSize -
|
||||
In: the pointer to the size of outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5.
|
||||
Out: the pointer to the size of written properties in outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5.
|
||||
|
||||
LZMA Encoder will use defult values for any parameter, if it is
|
||||
-1 for any from: level, loc, lp, pb, fb, numThreads
|
||||
0 for dictSize
|
||||
|
||||
level - compression level: 0 <= level <= 9;
|
||||
|
||||
level dictSize algo fb
|
||||
0: 16 KB 0 32
|
||||
1: 64 KB 0 32
|
||||
2: 256 KB 0 32
|
||||
3: 1 MB 0 32
|
||||
4: 4 MB 0 32
|
||||
5: 16 MB 1 32
|
||||
6: 32 MB 1 32
|
||||
7+: 64 MB 1 64
|
||||
|
||||
The default value for "level" is 5.
|
||||
|
||||
algo = 0 means fast method
|
||||
algo = 1 means normal method
|
||||
|
||||
dictSize - The dictionary size in bytes. The maximum value is
|
||||
128 MB = (1 << 27) bytes for 32-bit version
|
||||
1 GB = (1 << 30) bytes for 64-bit version
|
||||
The default value is 16 MB = (1 << 24) bytes.
|
||||
It's recommended to use the dictionary that is larger than 4 KB and
|
||||
that can be calculated as (1 << N) or (3 << N) sizes.
|
||||
|
||||
lc - The number of literal context bits (high bits of previous literal).
|
||||
It can be in the range from 0 to 8. The default value is 3.
|
||||
Sometimes lc=4 gives the gain for big files.
|
||||
|
||||
lp - The number of literal pos bits (low bits of current position for literals).
|
||||
It can be in the range from 0 to 4. The default value is 0.
|
||||
The lp switch is intended for periodical data when the period is equal to 2^lp.
|
||||
For example, for 32-bit (4 bytes) periodical data you can use lp=2. Often it's
|
||||
better to set lc=0, if you change lp switch.
|
||||
|
||||
pb - The number of pos bits (low bits of current position).
|
||||
It can be in the range from 0 to 4. The default value is 2.
|
||||
The pb switch is intended for periodical data when the period is equal 2^pb.
|
||||
|
||||
fb - Word size (the number of fast bytes).
|
||||
It can be in the range from 5 to 273. The default value is 32.
|
||||
Usually, a big number gives a little bit better compression ratio and
|
||||
slower compression process.
|
||||
|
||||
numThreads - The number of thereads. 1 or 2. The default value is 2.
|
||||
Fast mode (algo = 0) can use only 1 thread.
|
||||
|
||||
Out:
|
||||
destLen - processed output size
|
||||
Returns:
|
||||
SZ_OK - OK
|
||||
SZ_ERROR_MEM - Memory allocation error
|
||||
SZ_ERROR_PARAM - Incorrect paramater
|
||||
SZ_ERROR_OUTPUT_EOF - output buffer overflow
|
||||
SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
|
||||
*/
|
||||
|
||||
MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen,
|
||||
unsigned char *outProps, size_t *outPropsSize, /* *outPropsSize must be = 5 */
|
||||
int level, /* 0 <= level <= 9, default = 5 */
|
||||
unsigned dictSize, /* default = (1 << 24) */
|
||||
int lc, /* 0 <= lc <= 8, default = 3 */
|
||||
int lp, /* 0 <= lp <= 4, default = 0 */
|
||||
int pb, /* 0 <= pb <= 4, default = 2 */
|
||||
int fb, /* 5 <= fb <= 273, default = 32 */
|
||||
int numThreads /* 1 or 2, default = 2 */
|
||||
);
|
||||
|
||||
/*
|
||||
LzmaUncompress
|
||||
--------------
|
||||
In:
|
||||
dest - output data
|
||||
destLen - output data size
|
||||
src - input data
|
||||
srcLen - input data size
|
||||
Out:
|
||||
destLen - processed output size
|
||||
srcLen - processed input size
|
||||
Returns:
|
||||
SZ_OK - OK
|
||||
SZ_ERROR_DATA - Data error
|
||||
SZ_ERROR_MEM - Memory allocation arror
|
||||
SZ_ERROR_UNSUPPORTED - Unsupported properties
|
||||
SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer (src)
|
||||
*/
|
||||
|
||||
MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, SizeT *srcLen,
|
||||
const unsigned char *props, size_t propsSize);
|
||||
|
||||
#endif
|
46
extern/lzma/Makefile
vendored
46
extern/lzma/Makefile
vendored
@@ -1,46 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version. The Blender
|
||||
# Foundation also sells licenses for use in proprietary software under
|
||||
# the Blender License. See http://www.blender.org/BL/ for information
|
||||
# about this.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
#
|
||||
#
|
||||
|
||||
LIBNAME = lzma
|
||||
DIR = $(OCGDIR)/extern/$(LIBNAME)
|
||||
|
||||
include nan_compile.mk
|
||||
|
||||
install: $(ALL_OR_DEBUG)
|
||||
@[ -d $(NAN_LZMA) ] || mkdir -p $(NAN_LZMA)
|
||||
@[ -d $(NAN_LZMA)/lib/$(DEBUG_DIR) ] || mkdir -p $(NAN_LZMA)/lib/$(DEBUG_DIR)
|
||||
@$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)lib$(LIBNAME).a $(NAN_LZMA)/lib/$(DEBUG_DIR)
|
||||
ifeq ($(OS),darwin)
|
||||
ranlib $(NAN_LZMA)/lib/$(DEBUG_DIR)lib$(LIBNAME).a
|
||||
endif
|
||||
@$(NANBLENDERHOME)/intern/tools/cpifdiff.sh *.h $(NAN_LZMA)
|
9
extern/lzma/SConscript
vendored
9
extern/lzma/SConscript
vendored
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
Import ('env')
|
||||
|
||||
sources = env.Glob('./*.c')
|
||||
|
||||
defs = ''
|
||||
incs = ' . '
|
||||
|
||||
env.BlenderLib ('bf_lzma', sources, Split(incs), Split(defs), libtype=['intern'], priority=[40] )
|
208
extern/lzma/Types.h
vendored
208
extern/lzma/Types.h
vendored
@@ -1,208 +0,0 @@
|
||||
/* Types.h -- Basic types
|
||||
2008-11-23 : Igor Pavlov : Public domain */
|
||||
|
||||
#ifndef __7Z_TYPES_H
|
||||
#define __7Z_TYPES_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#define SZ_OK 0
|
||||
|
||||
#define SZ_ERROR_DATA 1
|
||||
#define SZ_ERROR_MEM 2
|
||||
#define SZ_ERROR_CRC 3
|
||||
#define SZ_ERROR_UNSUPPORTED 4
|
||||
#define SZ_ERROR_PARAM 5
|
||||
#define SZ_ERROR_INPUT_EOF 6
|
||||
#define SZ_ERROR_OUTPUT_EOF 7
|
||||
#define SZ_ERROR_READ 8
|
||||
#define SZ_ERROR_WRITE 9
|
||||
#define SZ_ERROR_PROGRESS 10
|
||||
#define SZ_ERROR_FAIL 11
|
||||
#define SZ_ERROR_THREAD 12
|
||||
|
||||
#define SZ_ERROR_ARCHIVE 16
|
||||
#define SZ_ERROR_NO_ARCHIVE 17
|
||||
|
||||
typedef int SRes;
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef DWORD WRes;
|
||||
#else
|
||||
typedef int WRes;
|
||||
#endif
|
||||
|
||||
#ifndef RINOK
|
||||
#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; }
|
||||
#endif
|
||||
|
||||
typedef unsigned char Byte;
|
||||
typedef short Int16;
|
||||
typedef unsigned short UInt16;
|
||||
|
||||
#ifdef _LZMA_UINT32_IS_ULONG
|
||||
typedef long Int32;
|
||||
typedef unsigned long UInt32;
|
||||
#else
|
||||
typedef int Int32;
|
||||
typedef unsigned int UInt32;
|
||||
#endif
|
||||
|
||||
#ifdef _SZ_NO_INT_64
|
||||
|
||||
/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers.
|
||||
NOTES: Some code will work incorrectly in that case! */
|
||||
|
||||
typedef long Int64;
|
||||
typedef unsigned long UInt64;
|
||||
|
||||
#else
|
||||
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
typedef __int64 Int64;
|
||||
typedef unsigned __int64 UInt64;
|
||||
#else
|
||||
typedef long long int Int64;
|
||||
typedef unsigned long long int UInt64;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _LZMA_NO_SYSTEM_SIZE_T
|
||||
typedef UInt32 SizeT;
|
||||
#else
|
||||
typedef size_t SizeT;
|
||||
#endif
|
||||
|
||||
typedef int Bool;
|
||||
#define True 1
|
||||
#define False 0
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#if _MSC_VER >= 1300
|
||||
#define MY_NO_INLINE __declspec(noinline)
|
||||
#else
|
||||
#define MY_NO_INLINE
|
||||
#endif
|
||||
|
||||
#define MY_CDECL __cdecl
|
||||
#define MY_STD_CALL __stdcall
|
||||
#define MY_FAST_CALL MY_NO_INLINE __fastcall
|
||||
|
||||
#else
|
||||
|
||||
#define MY_CDECL
|
||||
#define MY_STD_CALL
|
||||
#define MY_FAST_CALL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* The following interfaces use first parameter as pointer to structure */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SRes (*Read)(void *p, void *buf, size_t *size);
|
||||
/* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
|
||||
(output(*size) < input(*size)) is allowed */
|
||||
} ISeqInStream;
|
||||
|
||||
/* it can return SZ_ERROR_INPUT_EOF */
|
||||
SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size);
|
||||
SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType);
|
||||
SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
size_t (*Write)(void *p, const void *buf, size_t size);
|
||||
/* Returns: result - the number of actually written bytes.
|
||||
(result < size) means error */
|
||||
} ISeqOutStream;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SZ_SEEK_SET = 0,
|
||||
SZ_SEEK_CUR = 1,
|
||||
SZ_SEEK_END = 2
|
||||
} ESzSeek;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */
|
||||
SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin);
|
||||
} ISeekInStream;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SRes (*Look)(void *p, void **buf, size_t *size);
|
||||
/* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
|
||||
(output(*size) > input(*size)) is not allowed
|
||||
(output(*size) < input(*size)) is allowed */
|
||||
SRes (*Skip)(void *p, size_t offset);
|
||||
/* offset must be <= output(*size) of Look */
|
||||
|
||||
SRes (*Read)(void *p, void *buf, size_t *size);
|
||||
/* reads directly (without buffer). It's same as ISeqInStream::Read */
|
||||
SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin);
|
||||
} ILookInStream;
|
||||
|
||||
SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size);
|
||||
SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset);
|
||||
|
||||
/* reads via ILookInStream::Read */
|
||||
SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType);
|
||||
SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size);
|
||||
|
||||
#define LookToRead_BUF_SIZE (1 << 14)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ILookInStream s;
|
||||
ISeekInStream *realStream;
|
||||
size_t pos;
|
||||
size_t size;
|
||||
Byte buf[LookToRead_BUF_SIZE];
|
||||
} CLookToRead;
|
||||
|
||||
void LookToRead_CreateVTable(CLookToRead *p, int lookahead);
|
||||
void LookToRead_Init(CLookToRead *p);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ISeqInStream s;
|
||||
ILookInStream *realStream;
|
||||
} CSecToLook;
|
||||
|
||||
void SecToLook_CreateVTable(CSecToLook *p);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ISeqInStream s;
|
||||
ILookInStream *realStream;
|
||||
} CSecToRead;
|
||||
|
||||
void SecToRead_CreateVTable(CSecToRead *p);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SRes (*Progress)(void *p, UInt64 inSize, UInt64 outSize);
|
||||
/* Returns: result. (result != SZ_OK) means break.
|
||||
Value (UInt64)(Int64)-1 for size means unknown value. */
|
||||
} ICompressProgress;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *(*Alloc)(void *p, size_t size);
|
||||
void (*Free)(void *p, void *address); /* address can be 0 */
|
||||
} ISzAlloc;
|
||||
|
||||
#define IAlloc_Alloc(p, size) (p)->Alloc((p), size)
|
||||
#define IAlloc_Free(p, a) (p)->Free((p), a)
|
||||
|
||||
#endif
|
236
extern/lzma/history.txt
vendored
236
extern/lzma/history.txt
vendored
@@ -1,236 +0,0 @@
|
||||
HISTORY of the LZMA SDK
|
||||
-----------------------
|
||||
|
||||
4.65 2009-02-03
|
||||
-------------------------
|
||||
- Some minor fixes
|
||||
|
||||
|
||||
4.63 2008-12-31
|
||||
-------------------------
|
||||
- Some minor fixes
|
||||
|
||||
|
||||
4.61 beta 2008-11-23
|
||||
-------------------------
|
||||
- The bug in ANSI-C LZMA Decoder was fixed:
|
||||
If encoded stream was corrupted, decoder could access memory
|
||||
outside of allocated range.
|
||||
- Some changes in ANSI-C 7z Decoder interfaces.
|
||||
- LZMA SDK is placed in the public domain.
|
||||
|
||||
|
||||
4.60 beta 2008-08-19
|
||||
-------------------------
|
||||
- Some minor fixes.
|
||||
|
||||
|
||||
4.59 beta 2008-08-13
|
||||
-------------------------
|
||||
- The bug was fixed:
|
||||
LZMA Encoder in fast compression mode could access memory outside of
|
||||
allocated range in some rare cases.
|
||||
|
||||
|
||||
4.58 beta 2008-05-05
|
||||
-------------------------
|
||||
- ANSI-C LZMA Decoder was rewritten for speed optimizations.
|
||||
- ANSI-C LZMA Encoder was included to LZMA SDK.
|
||||
- C++ LZMA code now is just wrapper over ANSI-C code.
|
||||
|
||||
|
||||
4.57 2007-12-12
|
||||
-------------------------
|
||||
- Speed optimizations in <20>++ LZMA Decoder.
|
||||
- Small changes for more compatibility with some C/C++ compilers.
|
||||
|
||||
|
||||
4.49 beta 2007-07-05
|
||||
-------------------------
|
||||
- .7z ANSI-C Decoder:
|
||||
- now it supports BCJ and BCJ2 filters
|
||||
- now it supports files larger than 4 GB.
|
||||
- now it supports "Last Write Time" field for files.
|
||||
- C++ code for .7z archives compressing/decompressing from 7-zip
|
||||
was included to LZMA SDK.
|
||||
|
||||
|
||||
4.43 2006-06-04
|
||||
-------------------------
|
||||
- Small changes for more compatibility with some C/C++ compilers.
|
||||
|
||||
|
||||
4.42 2006-05-15
|
||||
-------------------------
|
||||
- Small changes in .h files in ANSI-C version.
|
||||
|
||||
|
||||
4.39 beta 2006-04-14
|
||||
-------------------------
|
||||
- The bug in versions 4.33b:4.38b was fixed:
|
||||
C++ version of LZMA encoder could not correctly compress
|
||||
files larger than 2 GB with HC4 match finder (-mfhc4).
|
||||
|
||||
|
||||
4.37 beta 2005-04-06
|
||||
-------------------------
|
||||
- Fixes in C++ code: code could no be compiled if _NO_EXCEPTIONS was defined.
|
||||
|
||||
|
||||
4.35 beta 2005-03-02
|
||||
-------------------------
|
||||
- The bug was fixed in C++ version of LZMA Decoder:
|
||||
If encoded stream was corrupted, decoder could access memory
|
||||
outside of allocated range.
|
||||
|
||||
|
||||
4.34 beta 2006-02-27
|
||||
-------------------------
|
||||
- Compressing speed and memory requirements for compressing were increased
|
||||
- LZMA now can use only these match finders: HC4, BT2, BT3, BT4
|
||||
|
||||
|
||||
4.32 2005-12-09
|
||||
-------------------------
|
||||
- Java version of LZMA SDK was included
|
||||
|
||||
|
||||
4.30 2005-11-20
|
||||
-------------------------
|
||||
- Compression ratio was improved in -a2 mode
|
||||
- Speed optimizations for compressing in -a2 mode
|
||||
- -fb switch now supports values up to 273
|
||||
- The bug in 7z_C (7zIn.c) was fixed:
|
||||
It used Alloc/Free functions from different memory pools.
|
||||
So if program used two memory pools, it worked incorrectly.
|
||||
- 7z_C: .7z format supporting was improved
|
||||
- LZMA# SDK (C#.NET version) was included
|
||||
|
||||
|
||||
4.27 (Updated) 2005-09-21
|
||||
-------------------------
|
||||
- Some GUIDs/interfaces in C++ were changed.
|
||||
IStream.h:
|
||||
ISequentialInStream::Read now works as old ReadPart
|
||||
ISequentialOutStream::Write now works as old WritePart
|
||||
|
||||
|
||||
4.27 2005-08-07
|
||||
-------------------------
|
||||
- The bug in LzmaDecodeSize.c was fixed:
|
||||
if _LZMA_IN_CB and _LZMA_OUT_READ were defined,
|
||||
decompressing worked incorrectly.
|
||||
|
||||
|
||||
4.26 2005-08-05
|
||||
-------------------------
|
||||
- Fixes in 7z_C code and LzmaTest.c:
|
||||
previous versions could work incorrectly,
|
||||
if malloc(0) returns 0
|
||||
|
||||
|
||||
4.23 2005-06-29
|
||||
-------------------------
|
||||
- Small fixes in C++ code
|
||||
|
||||
|
||||
4.22 2005-06-10
|
||||
-------------------------
|
||||
- Small fixes
|
||||
|
||||
|
||||
4.21 2005-06-08
|
||||
-------------------------
|
||||
- Interfaces for ANSI-C LZMA Decoder (LzmaDecode.c) were changed
|
||||
- New additional version of ANSI-C LZMA Decoder with zlib-like interface:
|
||||
- LzmaStateDecode.h
|
||||
- LzmaStateDecode.c
|
||||
- LzmaStateTest.c
|
||||
- ANSI-C LZMA Decoder now can decompress files larger than 4 GB
|
||||
|
||||
|
||||
4.17 2005-04-18
|
||||
-------------------------
|
||||
- New example for RAM->RAM compressing/decompressing:
|
||||
LZMA + BCJ (filter for x86 code):
|
||||
- LzmaRam.h
|
||||
- LzmaRam.cpp
|
||||
- LzmaRamDecode.h
|
||||
- LzmaRamDecode.c
|
||||
- -f86 switch for lzma.exe
|
||||
|
||||
|
||||
4.16 2005-03-29
|
||||
-------------------------
|
||||
- The bug was fixed in LzmaDecode.c (ANSI-C LZMA Decoder):
|
||||
If _LZMA_OUT_READ was defined, and if encoded stream was corrupted,
|
||||
decoder could access memory outside of allocated range.
|
||||
- Speed optimization of ANSI-C LZMA Decoder (now it's about 20% faster).
|
||||
Old version of LZMA Decoder now is in file LzmaDecodeSize.c.
|
||||
LzmaDecodeSize.c can provide slightly smaller code than LzmaDecode.c
|
||||
- Small speed optimization in LZMA C++ code
|
||||
- filter for SPARC's code was added
|
||||
- Simplified version of .7z ANSI-C Decoder was included
|
||||
|
||||
|
||||
4.06 2004-09-05
|
||||
-------------------------
|
||||
- The bug in v4.05 was fixed:
|
||||
LZMA-Encoder didn't release output stream in some cases.
|
||||
|
||||
|
||||
4.05 2004-08-25
|
||||
-------------------------
|
||||
- Source code of filters for x86, IA-64, ARM, ARM-Thumb
|
||||
and PowerPC code was included to SDK
|
||||
- Some internal minor changes
|
||||
|
||||
|
||||
4.04 2004-07-28
|
||||
-------------------------
|
||||
- More compatibility with some C++ compilers
|
||||
|
||||
|
||||
4.03 2004-06-18
|
||||
-------------------------
|
||||
- "Benchmark" command was added. It measures compressing
|
||||
and decompressing speed and shows rating values.
|
||||
Also it checks hardware errors.
|
||||
|
||||
|
||||
4.02 2004-06-10
|
||||
-------------------------
|
||||
- C++ LZMA Encoder/Decoder code now is more portable
|
||||
and it can be compiled by GCC on Linux.
|
||||
|
||||
|
||||
4.01 2004-02-15
|
||||
-------------------------
|
||||
- Some detection of data corruption was enabled.
|
||||
LzmaDecode.c / RangeDecoderReadByte
|
||||
.....
|
||||
{
|
||||
rd->ExtraBytes = 1;
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
|
||||
4.00 2004-02-13
|
||||
-------------------------
|
||||
- Original version of LZMA SDK
|
||||
|
||||
|
||||
|
||||
HISTORY of the LZMA
|
||||
-------------------
|
||||
2001-2008: Improvements to LZMA compressing/decompressing code,
|
||||
keeping compatibility with original LZMA format
|
||||
1996-2001: Development of LZMA compression format
|
||||
|
||||
Some milestones:
|
||||
|
||||
2001-08-30: LZMA compression was added to 7-Zip
|
||||
1999-01-02: First version of 7-Zip was released
|
||||
|
||||
|
||||
End of document
|
594
extern/lzma/lzma.txt
vendored
594
extern/lzma/lzma.txt
vendored
@@ -1,594 +0,0 @@
|
||||
LZMA SDK 4.65
|
||||
-------------
|
||||
|
||||
LZMA SDK provides the documentation, samples, header files, libraries,
|
||||
and tools you need to develop applications that use LZMA compression.
|
||||
|
||||
LZMA is default and general compression method of 7z format
|
||||
in 7-Zip compression program (www.7-zip.org). LZMA provides high
|
||||
compression ratio and very fast decompression.
|
||||
|
||||
LZMA is an improved version of famous LZ77 compression algorithm.
|
||||
It was improved in way of maximum increasing of compression ratio,
|
||||
keeping high decompression speed and low memory requirements for
|
||||
decompressing.
|
||||
|
||||
|
||||
|
||||
LICENSE
|
||||
-------
|
||||
|
||||
LZMA SDK is written and placed in the public domain by Igor Pavlov.
|
||||
|
||||
|
||||
LZMA SDK Contents
|
||||
-----------------
|
||||
|
||||
LZMA SDK includes:
|
||||
|
||||
- ANSI-C/C++/C#/Java source code for LZMA compressing and decompressing
|
||||
- Compiled file->file LZMA compressing/decompressing program for Windows system
|
||||
|
||||
|
||||
UNIX/Linux version
|
||||
------------------
|
||||
To compile C++ version of file->file LZMA encoding, go to directory
|
||||
C++/7zip/Compress/LZMA_Alone
|
||||
and call make to recompile it:
|
||||
make -f makefile.gcc clean all
|
||||
|
||||
In some UNIX/Linux versions you must compile LZMA with static libraries.
|
||||
To compile with static libraries, you can use
|
||||
LIB = -lm -static
|
||||
|
||||
|
||||
Files
|
||||
---------------------
|
||||
lzma.txt - LZMA SDK description (this file)
|
||||
7zFormat.txt - 7z Format description
|
||||
7zC.txt - 7z ANSI-C Decoder description
|
||||
methods.txt - Compression method IDs for .7z
|
||||
lzma.exe - Compiled file->file LZMA encoder/decoder for Windows
|
||||
history.txt - history of the LZMA SDK
|
||||
|
||||
|
||||
Source code structure
|
||||
---------------------
|
||||
|
||||
C/ - C files
|
||||
7zCrc*.* - CRC code
|
||||
Alloc.* - Memory allocation functions
|
||||
Bra*.* - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code
|
||||
LzFind.* - Match finder for LZ (LZMA) encoders
|
||||
LzFindMt.* - Match finder for LZ (LZMA) encoders for multithreading encoding
|
||||
LzHash.h - Additional file for LZ match finder
|
||||
LzmaDec.* - LZMA decoding
|
||||
LzmaEnc.* - LZMA encoding
|
||||
LzmaLib.* - LZMA Library for DLL calling
|
||||
Types.h - Basic types for another .c files
|
||||
Threads.* - The code for multithreading.
|
||||
|
||||
LzmaLib - LZMA Library (.DLL for Windows)
|
||||
|
||||
LzmaUtil - LZMA Utility (file->file LZMA encoder/decoder).
|
||||
|
||||
Archive - files related to archiving
|
||||
7z - 7z ANSI-C Decoder
|
||||
|
||||
CPP/ -- CPP files
|
||||
|
||||
Common - common files for C++ projects
|
||||
Windows - common files for Windows related code
|
||||
|
||||
7zip - files related to 7-Zip Project
|
||||
|
||||
Common - common files for 7-Zip
|
||||
|
||||
Compress - files related to compression/decompression
|
||||
|
||||
Copy - Copy coder
|
||||
RangeCoder - Range Coder (special code of compression/decompression)
|
||||
LZMA - LZMA compression/decompression on C++
|
||||
LZMA_Alone - file->file LZMA compression/decompression
|
||||
Branch - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code
|
||||
|
||||
Archive - files related to archiving
|
||||
|
||||
Common - common files for archive handling
|
||||
7z - 7z C++ Encoder/Decoder
|
||||
|
||||
Bundles - Modules that are bundles of other modules
|
||||
|
||||
Alone7z - 7zr.exe: Standalone version of 7z.exe that supports only 7z/LZMA/BCJ/BCJ2
|
||||
Format7zR - 7zr.dll: Reduced version of 7za.dll: extracting/compressing to 7z/LZMA/BCJ/BCJ2
|
||||
Format7zExtractR - 7zxr.dll: Reduced version of 7zxa.dll: extracting from 7z/LZMA/BCJ/BCJ2.
|
||||
|
||||
UI - User Interface files
|
||||
|
||||
Client7z - Test application for 7za.dll, 7zr.dll, 7zxr.dll
|
||||
Common - Common UI files
|
||||
Console - Code for console archiver
|
||||
|
||||
|
||||
|
||||
CS/ - C# files
|
||||
7zip
|
||||
Common - some common files for 7-Zip
|
||||
Compress - files related to compression/decompression
|
||||
LZ - files related to LZ (Lempel-Ziv) compression algorithm
|
||||
LZMA - LZMA compression/decompression
|
||||
LzmaAlone - file->file LZMA compression/decompression
|
||||
RangeCoder - Range Coder (special code of compression/decompression)
|
||||
|
||||
Java/ - Java files
|
||||
SevenZip
|
||||
Compression - files related to compression/decompression
|
||||
LZ - files related to LZ (Lempel-Ziv) compression algorithm
|
||||
LZMA - LZMA compression/decompression
|
||||
RangeCoder - Range Coder (special code of compression/decompression)
|
||||
|
||||
|
||||
C/C++ source code of LZMA SDK is part of 7-Zip project.
|
||||
7-Zip source code can be downloaded from 7-Zip's SourceForge page:
|
||||
|
||||
http://sourceforge.net/projects/sevenzip/
|
||||
|
||||
|
||||
|
||||
LZMA features
|
||||
-------------
|
||||
- Variable dictionary size (up to 1 GB)
|
||||
- Estimated compressing speed: about 2 MB/s on 2 GHz CPU
|
||||
- Estimated decompressing speed:
|
||||
- 20-30 MB/s on 2 GHz Core 2 or AMD Athlon 64
|
||||
- 1-2 MB/s on 200 MHz ARM, MIPS, PowerPC or other simple RISC
|
||||
- Small memory requirements for decompressing (16 KB + DictionarySize)
|
||||
- Small code size for decompressing: 5-8 KB
|
||||
|
||||
LZMA decoder uses only integer operations and can be
|
||||
implemented in any modern 32-bit CPU (or on 16-bit CPU with some conditions).
|
||||
|
||||
Some critical operations that affect the speed of LZMA decompression:
|
||||
1) 32*16 bit integer multiply
|
||||
2) Misspredicted branches (penalty mostly depends from pipeline length)
|
||||
3) 32-bit shift and arithmetic operations
|
||||
|
||||
The speed of LZMA decompressing mostly depends from CPU speed.
|
||||
Memory speed has no big meaning. But if your CPU has small data cache,
|
||||
overall weight of memory speed will slightly increase.
|
||||
|
||||
|
||||
How To Use
|
||||
----------
|
||||
|
||||
Using LZMA encoder/decoder executable
|
||||
--------------------------------------
|
||||
|
||||
Usage: LZMA <e|d> inputFile outputFile [<switches>...]
|
||||
|
||||
e: encode file
|
||||
|
||||
d: decode file
|
||||
|
||||
b: Benchmark. There are two tests: compressing and decompressing
|
||||
with LZMA method. Benchmark shows rating in MIPS (million
|
||||
instructions per second). Rating value is calculated from
|
||||
measured speed and it is normalized with Intel's Core 2 results.
|
||||
Also Benchmark checks possible hardware errors (RAM
|
||||
errors in most cases). Benchmark uses these settings:
|
||||
(-a1, -d21, -fb32, -mfbt4). You can change only -d parameter.
|
||||
Also you can change the number of iterations. Example for 30 iterations:
|
||||
LZMA b 30
|
||||
Default number of iterations is 10.
|
||||
|
||||
<Switches>
|
||||
|
||||
|
||||
-a{N}: set compression mode 0 = fast, 1 = normal
|
||||
default: 1 (normal)
|
||||
|
||||
d{N}: Sets Dictionary size - [0, 30], default: 23 (8MB)
|
||||
The maximum value for dictionary size is 1 GB = 2^30 bytes.
|
||||
Dictionary size is calculated as DictionarySize = 2^N bytes.
|
||||
For decompressing file compressed by LZMA method with dictionary
|
||||
size D = 2^N you need about D bytes of memory (RAM).
|
||||
|
||||
-fb{N}: set number of fast bytes - [5, 273], default: 128
|
||||
Usually big number gives a little bit better compression ratio
|
||||
and slower compression process.
|
||||
|
||||
-lc{N}: set number of literal context bits - [0, 8], default: 3
|
||||
Sometimes lc=4 gives gain for big files.
|
||||
|
||||
-lp{N}: set number of literal pos bits - [0, 4], default: 0
|
||||
lp switch is intended for periodical data when period is
|
||||
equal 2^N. For example, for 32-bit (4 bytes)
|
||||
periodical data you can use lp=2. Often it's better to set lc0,
|
||||
if you change lp switch.
|
||||
|
||||
-pb{N}: set number of pos bits - [0, 4], default: 2
|
||||
pb switch is intended for periodical data
|
||||
when period is equal 2^N.
|
||||
|
||||
-mf{MF_ID}: set Match Finder. Default: bt4.
|
||||
Algorithms from hc* group doesn't provide good compression
|
||||
ratio, but they often works pretty fast in combination with
|
||||
fast mode (-a0).
|
||||
|
||||
Memory requirements depend from dictionary size
|
||||
(parameter "d" in table below).
|
||||
|
||||
MF_ID Memory Description
|
||||
|
||||
bt2 d * 9.5 + 4MB Binary Tree with 2 bytes hashing.
|
||||
bt3 d * 11.5 + 4MB Binary Tree with 3 bytes hashing.
|
||||
bt4 d * 11.5 + 4MB Binary Tree with 4 bytes hashing.
|
||||
hc4 d * 7.5 + 4MB Hash Chain with 4 bytes hashing.
|
||||
|
||||
-eos: write End Of Stream marker. By default LZMA doesn't write
|
||||
eos marker, since LZMA decoder knows uncompressed size
|
||||
stored in .lzma file header.
|
||||
|
||||
-si: Read data from stdin (it will write End Of Stream marker).
|
||||
-so: Write data to stdout
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
1) LZMA e file.bin file.lzma -d16 -lc0
|
||||
|
||||
compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K)
|
||||
and 0 literal context bits. -lc0 allows to reduce memory requirements
|
||||
for decompression.
|
||||
|
||||
|
||||
2) LZMA e file.bin file.lzma -lc0 -lp2
|
||||
|
||||
compresses file.bin to file.lzma with settings suitable
|
||||
for 32-bit periodical data (for example, ARM or MIPS code).
|
||||
|
||||
3) LZMA d file.lzma file.bin
|
||||
|
||||
decompresses file.lzma to file.bin.
|
||||
|
||||
|
||||
Compression ratio hints
|
||||
-----------------------
|
||||
|
||||
Recommendations
|
||||
---------------
|
||||
|
||||
To increase the compression ratio for LZMA compressing it's desirable
|
||||
to have aligned data (if it's possible) and also it's desirable to locate
|
||||
data in such order, where code is grouped in one place and data is
|
||||
grouped in other place (it's better than such mixing: code, data, code,
|
||||
data, ...).
|
||||
|
||||
|
||||
Filters
|
||||
-------
|
||||
You can increase the compression ratio for some data types, using
|
||||
special filters before compressing. For example, it's possible to
|
||||
increase the compression ratio on 5-10% for code for those CPU ISAs:
|
||||
x86, IA-64, ARM, ARM-Thumb, PowerPC, SPARC.
|
||||
|
||||
You can find C source code of such filters in C/Bra*.* files
|
||||
|
||||
You can check the compression ratio gain of these filters with such
|
||||
7-Zip commands (example for ARM code):
|
||||
No filter:
|
||||
7z a a1.7z a.bin -m0=lzma
|
||||
|
||||
With filter for little-endian ARM code:
|
||||
7z a a2.7z a.bin -m0=arm -m1=lzma
|
||||
|
||||
It works in such manner:
|
||||
Compressing = Filter_encoding + LZMA_encoding
|
||||
Decompressing = LZMA_decoding + Filter_decoding
|
||||
|
||||
Compressing and decompressing speed of such filters is very high,
|
||||
so it will not increase decompressing time too much.
|
||||
Moreover, it reduces decompression time for LZMA_decoding,
|
||||
since compression ratio with filtering is higher.
|
||||
|
||||
These filters convert CALL (calling procedure) instructions
|
||||
from relative offsets to absolute addresses, so such data becomes more
|
||||
compressible.
|
||||
|
||||
For some ISAs (for example, for MIPS) it's impossible to get gain from such filter.
|
||||
|
||||
|
||||
LZMA compressed file format
|
||||
---------------------------
|
||||
Offset Size Description
|
||||
0 1 Special LZMA properties (lc,lp, pb in encoded form)
|
||||
1 4 Dictionary size (little endian)
|
||||
5 8 Uncompressed size (little endian). -1 means unknown size
|
||||
13 Compressed data
|
||||
|
||||
|
||||
ANSI-C LZMA Decoder
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Please note that interfaces for ANSI-C code were changed in LZMA SDK 4.58.
|
||||
If you want to use old interfaces you can download previous version of LZMA SDK
|
||||
from sourceforge.net site.
|
||||
|
||||
To use ANSI-C LZMA Decoder you need the following files:
|
||||
1) LzmaDec.h + LzmaDec.c + Types.h
|
||||
LzmaUtil/LzmaUtil.c is example application that uses these files.
|
||||
|
||||
|
||||
Memory requirements for LZMA decoding
|
||||
-------------------------------------
|
||||
|
||||
Stack usage of LZMA decoding function for local variables is not
|
||||
larger than 200-400 bytes.
|
||||
|
||||
LZMA Decoder uses dictionary buffer and internal state structure.
|
||||
Internal state structure consumes
|
||||
state_size = (4 + (1.5 << (lc + lp))) KB
|
||||
by default (lc=3, lp=0), state_size = 16 KB.
|
||||
|
||||
|
||||
How To decompress data
|
||||
----------------------
|
||||
|
||||
LZMA Decoder (ANSI-C version) now supports 2 interfaces:
|
||||
1) Single-call Decompressing
|
||||
2) Multi-call State Decompressing (zlib-like interface)
|
||||
|
||||
You must use external allocator:
|
||||
Example:
|
||||
void *SzAlloc(void *p, size_t size) { p = p; return malloc(size); }
|
||||
void SzFree(void *p, void *address) { p = p; free(address); }
|
||||
ISzAlloc alloc = { SzAlloc, SzFree };
|
||||
|
||||
You can use p = p; operator to disable compiler warnings.
|
||||
|
||||
|
||||
Single-call Decompressing
|
||||
-------------------------
|
||||
When to use: RAM->RAM decompressing
|
||||
Compile files: LzmaDec.h + LzmaDec.c + Types.h
|
||||
Compile defines: no defines
|
||||
Memory Requirements:
|
||||
- Input buffer: compressed size
|
||||
- Output buffer: uncompressed size
|
||||
- LZMA Internal Structures: state_size (16 KB for default settings)
|
||||
|
||||
Interface:
|
||||
int LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
|
||||
const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
|
||||
ELzmaStatus *status, ISzAlloc *alloc);
|
||||
In:
|
||||
dest - output data
|
||||
destLen - output data size
|
||||
src - input data
|
||||
srcLen - input data size
|
||||
propData - LZMA properties (5 bytes)
|
||||
propSize - size of propData buffer (5 bytes)
|
||||
finishMode - It has meaning only if the decoding reaches output limit (*destLen).
|
||||
LZMA_FINISH_ANY - Decode just destLen bytes.
|
||||
LZMA_FINISH_END - Stream must be finished after (*destLen).
|
||||
You can use LZMA_FINISH_END, when you know that
|
||||
current output buffer covers last bytes of stream.
|
||||
alloc - Memory allocator.
|
||||
|
||||
Out:
|
||||
destLen - processed output size
|
||||
srcLen - processed input size
|
||||
|
||||
Output:
|
||||
SZ_OK
|
||||
status:
|
||||
LZMA_STATUS_FINISHED_WITH_MARK
|
||||
LZMA_STATUS_NOT_FINISHED
|
||||
LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
|
||||
SZ_ERROR_DATA - Data error
|
||||
SZ_ERROR_MEM - Memory allocation error
|
||||
SZ_ERROR_UNSUPPORTED - Unsupported properties
|
||||
SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
|
||||
|
||||
If LZMA decoder sees end_marker before reaching output limit, it returns OK result,
|
||||
and output value of destLen will be less than output buffer size limit.
|
||||
|
||||
You can use multiple checks to test data integrity after full decompression:
|
||||
1) Check Result and "status" variable.
|
||||
2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
|
||||
3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
|
||||
You must use correct finish mode in that case. */
|
||||
|
||||
|
||||
Multi-call State Decompressing (zlib-like interface)
|
||||
----------------------------------------------------
|
||||
|
||||
When to use: file->file decompressing
|
||||
Compile files: LzmaDec.h + LzmaDec.c + Types.h
|
||||
|
||||
Memory Requirements:
|
||||
- Buffer for input stream: any size (for example, 16 KB)
|
||||
- Buffer for output stream: any size (for example, 16 KB)
|
||||
- LZMA Internal Structures: state_size (16 KB for default settings)
|
||||
- LZMA dictionary (dictionary size is encoded in LZMA properties header)
|
||||
|
||||
1) read LZMA properties (5 bytes) and uncompressed size (8 bytes, little-endian) to header:
|
||||
unsigned char header[LZMA_PROPS_SIZE + 8];
|
||||
ReadFile(inFile, header, sizeof(header)
|
||||
|
||||
2) Allocate CLzmaDec structures (state + dictionary) using LZMA properties
|
||||
|
||||
CLzmaDec state;
|
||||
LzmaDec_Constr(&state);
|
||||
res = LzmaDec_Allocate(&state, header, LZMA_PROPS_SIZE, &g_Alloc);
|
||||
if (res != SZ_OK)
|
||||
return res;
|
||||
|
||||
3) Init LzmaDec structure before any new LZMA stream. And call LzmaDec_DecodeToBuf in loop
|
||||
|
||||
LzmaDec_Init(&state);
|
||||
for (;;)
|
||||
{
|
||||
...
|
||||
int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
|
||||
const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode);
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
4) Free all allocated structures
|
||||
LzmaDec_Free(&state, &g_Alloc);
|
||||
|
||||
For full code example, look at C/LzmaUtil/LzmaUtil.c code.
|
||||
|
||||
|
||||
How To compress data
|
||||
--------------------
|
||||
|
||||
Compile files: LzmaEnc.h + LzmaEnc.c + Types.h +
|
||||
LzFind.c + LzFind.h + LzFindMt.c + LzFindMt.h + LzHash.h
|
||||
|
||||
Memory Requirements:
|
||||
- (dictSize * 11.5 + 6 MB) + state_size
|
||||
|
||||
Lzma Encoder can use two memory allocators:
|
||||
1) alloc - for small arrays.
|
||||
2) allocBig - for big arrays.
|
||||
|
||||
For example, you can use Large RAM Pages (2 MB) in allocBig allocator for
|
||||
better compression speed. Note that Windows has bad implementation for
|
||||
Large RAM Pages.
|
||||
It's OK to use same allocator for alloc and allocBig.
|
||||
|
||||
|
||||
Single-call Compression with callbacks
|
||||
--------------------------------------
|
||||
|
||||
Check C/LzmaUtil/LzmaUtil.c as example,
|
||||
|
||||
When to use: file->file decompressing
|
||||
|
||||
1) you must implement callback structures for interfaces:
|
||||
ISeqInStream
|
||||
ISeqOutStream
|
||||
ICompressProgress
|
||||
ISzAlloc
|
||||
|
||||
static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
|
||||
static void SzFree(void *p, void *address) { p = p; MyFree(address); }
|
||||
static ISzAlloc g_Alloc = { SzAlloc, SzFree };
|
||||
|
||||
CFileSeqInStream inStream;
|
||||
CFileSeqOutStream outStream;
|
||||
|
||||
inStream.funcTable.Read = MyRead;
|
||||
inStream.file = inFile;
|
||||
outStream.funcTable.Write = MyWrite;
|
||||
outStream.file = outFile;
|
||||
|
||||
|
||||
2) Create CLzmaEncHandle object;
|
||||
|
||||
CLzmaEncHandle enc;
|
||||
|
||||
enc = LzmaEnc_Create(&g_Alloc);
|
||||
if (enc == 0)
|
||||
return SZ_ERROR_MEM;
|
||||
|
||||
|
||||
3) initialize CLzmaEncProps properties;
|
||||
|
||||
LzmaEncProps_Init(&props);
|
||||
|
||||
Then you can change some properties in that structure.
|
||||
|
||||
4) Send LZMA properties to LZMA Encoder
|
||||
|
||||
res = LzmaEnc_SetProps(enc, &props);
|
||||
|
||||
5) Write encoded properties to header
|
||||
|
||||
Byte header[LZMA_PROPS_SIZE + 8];
|
||||
size_t headerSize = LZMA_PROPS_SIZE;
|
||||
UInt64 fileSize;
|
||||
int i;
|
||||
|
||||
res = LzmaEnc_WriteProperties(enc, header, &headerSize);
|
||||
fileSize = MyGetFileLength(inFile);
|
||||
for (i = 0; i < 8; i++)
|
||||
header[headerSize++] = (Byte)(fileSize >> (8 * i));
|
||||
MyWriteFileAndCheck(outFile, header, headerSize)
|
||||
|
||||
6) Call encoding function:
|
||||
res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable,
|
||||
NULL, &g_Alloc, &g_Alloc);
|
||||
|
||||
7) Destroy LZMA Encoder Object
|
||||
LzmaEnc_Destroy(enc, &g_Alloc, &g_Alloc);
|
||||
|
||||
|
||||
If callback function return some error code, LzmaEnc_Encode also returns that code.
|
||||
|
||||
|
||||
Single-call RAM->RAM Compression
|
||||
--------------------------------
|
||||
|
||||
Single-call RAM->RAM Compression is similar to Compression with callbacks,
|
||||
but you provide pointers to buffers instead of pointers to stream callbacks:
|
||||
|
||||
HRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
|
||||
CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
|
||||
ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
|
||||
|
||||
Return code:
|
||||
SZ_OK - OK
|
||||
SZ_ERROR_MEM - Memory allocation error
|
||||
SZ_ERROR_PARAM - Incorrect paramater
|
||||
SZ_ERROR_OUTPUT_EOF - output buffer overflow
|
||||
SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
|
||||
|
||||
|
||||
|
||||
LZMA Defines
|
||||
------------
|
||||
|
||||
_LZMA_SIZE_OPT - Enable some optimizations in LZMA Decoder to get smaller executable code.
|
||||
|
||||
_LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for
|
||||
some structures will be doubled in that case.
|
||||
|
||||
_LZMA_UINT32_IS_ULONG - Define it if int is 16-bit on your compiler and long is 32-bit.
|
||||
|
||||
_LZMA_NO_SYSTEM_SIZE_T - Define it if you don't want to use size_t type.
|
||||
|
||||
|
||||
C++ LZMA Encoder/Decoder
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
C++ LZMA code use COM-like interfaces. So if you want to use it,
|
||||
you can study basics of COM/OLE.
|
||||
C++ LZMA code is just wrapper over ANSI-C code.
|
||||
|
||||
|
||||
C++ Notes
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
If you use some C++ code folders in 7-Zip (for example, C++ code for .7z handling),
|
||||
you must check that you correctly work with "new" operator.
|
||||
7-Zip can be compiled with MSVC 6.0 that doesn't throw "exception" from "new" operator.
|
||||
So 7-Zip uses "CPP\Common\NewHandler.cpp" that redefines "new" operator:
|
||||
operator new(size_t size)
|
||||
{
|
||||
void *p = ::malloc(size);
|
||||
if (p == 0)
|
||||
throw CNewException();
|
||||
return p;
|
||||
}
|
||||
If you use MSCV that throws exception for "new" operator, you can compile without
|
||||
"NewHandler.cpp". So standard exception will be used. Actually some code of
|
||||
7-Zip catches any exception in internal code and converts it to HRESULT code.
|
||||
So you don't need to catch CNewException, if you call COM interfaces of 7-Zip.
|
||||
|
||||
---
|
||||
|
||||
http://www.7-zip.org
|
||||
http://www.7-zip.org/sdk.html
|
||||
http://www.7-zip.org/support.html
|
385
extern/lzma/make/msvc_9_0/lzma.vcproj
vendored
385
extern/lzma/make/msvc_9_0/lzma.vcproj
vendored
@@ -1,385 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Name="EXT_lzma"
|
||||
ProjectGUID="{79D0B232-208C-F208-DA71-79B4AC088602}"
|
||||
RootNamespace="lzma"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Blender Debug|Win32"
|
||||
OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\debug"
|
||||
IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\debug"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;_LIB;WIN32"
|
||||
ExceptionHandling="1"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzma\debug\lzma.pch"
|
||||
AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzma\debug\"
|
||||
ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzma\debug\"
|
||||
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzma\debug\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\debug\lzma.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Blender Release|Win32"
|
||||
OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzma"
|
||||
IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzma"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;_LIB;WIN32"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzma\lzma.pch"
|
||||
AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzma\"
|
||||
ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzma\"
|
||||
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzma\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="1"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\lzma.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="3D Plugin Debug|Win32"
|
||||
OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug"
|
||||
IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;_LIB;WIN32"
|
||||
ExceptionHandling="0"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug\lzma.pch"
|
||||
AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug\"
|
||||
ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug\"
|
||||
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\debug\lzma.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="3D Plugin Release|Win32"
|
||||
OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll"
|
||||
IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;_LIB;WIN32"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\lzma.pch"
|
||||
AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\"
|
||||
ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\"
|
||||
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="1"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\lzma.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\Alloc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\LzFind.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\LzmaDec.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\LzmaEnc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\LzmaLib.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\Alloc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\LzFind.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\LzHash.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\LzmaDec.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\LzmaEnc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\LzmaLib.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Types.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
34
extern/lzo/CMakeLists.txt
vendored
34
extern/lzo/CMakeLists.txt
vendored
@@ -1,34 +0,0 @@
|
||||
# $Id$
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2006, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): Daniel Genrich
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
SET(INC include)
|
||||
|
||||
FILE(GLOB SRC minilzo/*.c)
|
||||
|
||||
|
||||
|
||||
BLENDERLIB(bf_minilzo "${SRC}" "${INC}")
|
||||
#, libtype='blender', priority = 0 )
|
9
extern/lzo/SConscript
vendored
9
extern/lzo/SConscript
vendored
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
Import ('env')
|
||||
|
||||
sources = env.Glob('minilzo/*.c')
|
||||
|
||||
defs = ''
|
||||
incs = ' include '
|
||||
|
||||
env.BlenderLib ('bf_minilzo', sources, Split(incs), Split(defs), libtype=['intern'], priority=[40] )
|
353
extern/lzo/make/msvc_9_0/lzo.vcproj
vendored
353
extern/lzo/make/msvc_9_0/lzo.vcproj
vendored
@@ -1,353 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Name="EXT_lzo"
|
||||
ProjectGUID="{8BFA4082-773B-D100-BC24-659083BA023F}"
|
||||
RootNamespace="lzo"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Blender Debug|Win32"
|
||||
OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\debug"
|
||||
IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\debug"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;_LIB;WIN32"
|
||||
ExceptionHandling="1"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzo\debug\lzo.pch"
|
||||
AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzo\debug\"
|
||||
ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzo\debug\"
|
||||
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzo\debug\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\debug\lzo.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Blender Release|Win32"
|
||||
OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzo"
|
||||
IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzo"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;_LIB;WIN32"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzo\lzo.pch"
|
||||
AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzo\"
|
||||
ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzo\"
|
||||
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzo\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="1"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\lzo.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="3D Plugin Debug|Win32"
|
||||
OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug"
|
||||
IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;_LIB;WIN32"
|
||||
ExceptionHandling="0"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug\lzo.pch"
|
||||
AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug\"
|
||||
ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug\"
|
||||
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\debug\lzo.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="3D Plugin Release|Win32"
|
||||
OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll"
|
||||
IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;_LIB;WIN32"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\lzo.pch"
|
||||
AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\"
|
||||
ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\"
|
||||
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="1"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\lzo.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\minilzo\minilzo.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\minilzo\lzoconf.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minilzo\lzodefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minilzo\minilzo.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
340
extern/lzo/minilzo/COPYING
vendored
340
extern/lzo/minilzo/COPYING
vendored
@@ -1,340 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
40
extern/lzo/minilzo/Makefile
vendored
40
extern/lzo/minilzo/Makefile
vendored
@@ -1,40 +0,0 @@
|
||||
#
|
||||
# $Id:
|
||||
#
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2009 Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): none yet.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
LIBNAME = minilzo
|
||||
DIR = $(OCGDIR)/extern/$(LIBNAME)
|
||||
|
||||
include nan_compile.mk
|
||||
|
||||
install: $(ALL_OR_DEBUG)
|
||||
@[ -d $(NAN_LZO) ] || mkdir -p $(NAN_LZO)
|
||||
@[ -d $(NAN_LZO)/minilzo ] || mkdir -p $(NAN_LZO)/minilzo
|
||||
@[ -d $(NAN_LZO)/lib/$(DEBUG_DIR) ] || mkdir -p $(NAN_LZO)/lib/$(DEBUG_DIR)
|
||||
@$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)lib$(LIBNAME).a $(NAN_LZO)/lib/$(DEBUG_DIR)
|
||||
ifeq ($(OS),darwin)
|
||||
ranlib $(NAN_LZO)/lib/$(DEBUG_DIR)lib$(LIBNAME).a
|
||||
endif
|
||||
@$(NANBLENDERHOME)/intern/tools/cpifdiff.sh *.h $(NAN_LZO)/minilzo
|
123
extern/lzo/minilzo/README.LZO
vendored
123
extern/lzo/minilzo/README.LZO
vendored
@@ -1,123 +0,0 @@
|
||||
|
||||
============================================================================
|
||||
miniLZO -- mini subset of the LZO real-time data compression library
|
||||
============================================================================
|
||||
|
||||
Author : Markus Franz Xaver Johannes Oberhumer
|
||||
<markus@oberhumer.com>
|
||||
http://www.oberhumer.com/opensource/lzo/
|
||||
Version : 2.03
|
||||
Date : 30 Apr 2008
|
||||
|
||||
I've created miniLZO for projects where it is inconvenient to
|
||||
include (or require) the full LZO source code just because you
|
||||
want to add a little bit of data compression to your application.
|
||||
|
||||
miniLZO implements the LZO1X-1 compressor and both the standard and
|
||||
safe LZO1X decompressor. Apart from fast compression it also useful
|
||||
for situations where you want to use pre-compressed data files (which
|
||||
must have been compressed with LZO1X-999).
|
||||
|
||||
miniLZO consists of one C source file and three header files:
|
||||
minilzo.c
|
||||
minilzo.h, lzoconf.h, lzodefs.h
|
||||
|
||||
To use miniLZO just copy these files into your source directory, add
|
||||
minilzo.c to your Makefile and #include minilzo.h from your program.
|
||||
Note: you also must distribute this file (`README.LZO') with your project.
|
||||
|
||||
minilzo.o compiles to about 6 kB (using gcc or Visual C on a i386), and
|
||||
the sources are about 30 kB when packed with zip - so there's no more
|
||||
excuse that your application doesn't support data compression :-)
|
||||
|
||||
For more information, documentation, example programs and other support
|
||||
files (like Makefiles and build scripts) please download the full LZO
|
||||
package from
|
||||
http://www.oberhumer.com/opensource/lzo/
|
||||
|
||||
Have fun,
|
||||
Markus
|
||||
|
||||
|
||||
P.S. minilzo.c is generated automatically from the LZO sources and
|
||||
therefore functionality is completely identical
|
||||
|
||||
|
||||
Appendix A: building miniLZO
|
||||
----------------------------
|
||||
miniLZO is written such a way that it should compile and run
|
||||
out-of-the-box on most machines.
|
||||
|
||||
If you are running on a very unusual architecture and lzo_init() fails then
|
||||
you should first recompile with `-DLZO_DEBUG' to see what causes the failure.
|
||||
The most probable case is something like `sizeof(char *) != sizeof(long)'.
|
||||
After identifying the problem you can compile by adding some defines
|
||||
like `-DSIZEOF_CHAR_P=8' to your Makefile.
|
||||
|
||||
The best solution is (of course) using Autoconf - if your project uses
|
||||
Autoconf anyway just add `-DMINILZO_HAVE_CONFIG_H' to your compiler
|
||||
flags when compiling minilzo.c. See the LZO distribution for an example
|
||||
how to set up configure.in.
|
||||
|
||||
|
||||
Appendix B: list of public functions available in miniLZO
|
||||
---------------------------------------------------------
|
||||
Library initialization
|
||||
lzo_init()
|
||||
|
||||
Compression
|
||||
lzo1x_1_compress()
|
||||
|
||||
Decompression
|
||||
lzo1x_decompress()
|
||||
lzo1x_decompress_safe()
|
||||
|
||||
Checksum functions
|
||||
lzo_adler32()
|
||||
|
||||
Version functions
|
||||
lzo_version()
|
||||
lzo_version_string()
|
||||
lzo_version_date()
|
||||
|
||||
Portable (but slow) string functions
|
||||
lzo_memcmp()
|
||||
lzo_memcpy()
|
||||
lzo_memmove()
|
||||
lzo_memset()
|
||||
|
||||
|
||||
Appendix C: suggested macros for `configure.in' when using Autoconf
|
||||
-------------------------------------------------------------------
|
||||
Checks for typedefs and structures
|
||||
AC_CHECK_TYPE(ptrdiff_t,long)
|
||||
AC_TYPE_SIZE_T
|
||||
AC_CHECK_SIZEOF(short)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_SIZEOF(__int64)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(size_t)
|
||||
AC_CHECK_SIZEOF(ptrdiff_t)
|
||||
|
||||
Checks for compiler characteristics
|
||||
AC_C_CONST
|
||||
|
||||
Checks for library functions
|
||||
AC_CHECK_FUNCS(memcmp memcpy memmove memset)
|
||||
|
||||
|
||||
Appendix D: Copyright
|
||||
---------------------
|
||||
LZO and miniLZO are Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
2003, 2004, 2005, 2006, 2007, 2008 Markus Franz Xaver Johannes Oberhumer
|
||||
|
||||
LZO and miniLZO are distributed under the terms of the GNU General
|
||||
Public License (GPL). See the file COPYING.
|
||||
|
||||
Special licenses for commercial and other applications which
|
||||
are not willing to accept the GNU General Public License
|
||||
are available by contacting the author.
|
||||
|
||||
|
417
extern/lzo/minilzo/lzoconf.h
vendored
417
extern/lzo/minilzo/lzoconf.h
vendored
@@ -1,417 +0,0 @@
|
||||
/* lzoconf.h -- configuration for the LZO real-time data compression library
|
||||
|
||||
This file is part of the LZO real-time data compression library.
|
||||
|
||||
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
The LZO library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
The LZO library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the LZO library; see the file COPYING.
|
||||
If not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Markus F.X.J. Oberhumer
|
||||
<markus@oberhumer.com>
|
||||
http://www.oberhumer.com/opensource/lzo/
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LZOCONF_H_INCLUDED
|
||||
#define __LZOCONF_H_INCLUDED
|
||||
|
||||
#define LZO_VERSION 0x2030
|
||||
#define LZO_VERSION_STRING "2.03"
|
||||
#define LZO_VERSION_DATE "Apr 30 2008"
|
||||
|
||||
/* internal Autoconf configuration file - only used when building LZO */
|
||||
#if defined(LZO_HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// LZO requires a conforming <limits.h>
|
||||
************************************************************************/
|
||||
|
||||
#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
|
||||
# error "invalid CHAR_BIT"
|
||||
#endif
|
||||
#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX)
|
||||
# error "check your compiler installation"
|
||||
#endif
|
||||
#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1)
|
||||
# error "your limits.h macros are broken"
|
||||
#endif
|
||||
|
||||
/* get OS and architecture defines */
|
||||
#ifndef __LZODEFS_H_INCLUDED
|
||||
#include "lzodefs.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// some core defines
|
||||
************************************************************************/
|
||||
|
||||
#if !defined(LZO_UINT32_C)
|
||||
# if (UINT_MAX < LZO_0xffffffffL)
|
||||
# define LZO_UINT32_C(c) c ## UL
|
||||
# else
|
||||
# define LZO_UINT32_C(c) ((c) + 0U)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* memory checkers */
|
||||
#if !defined(__LZO_CHECKER)
|
||||
# if defined(__BOUNDS_CHECKING_ON)
|
||||
# define __LZO_CHECKER 1
|
||||
# elif defined(__CHECKER__)
|
||||
# define __LZO_CHECKER 1
|
||||
# elif defined(__INSURE__)
|
||||
# define __LZO_CHECKER 1
|
||||
# elif defined(__PURIFY__)
|
||||
# define __LZO_CHECKER 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// integral and pointer types
|
||||
************************************************************************/
|
||||
|
||||
/* lzo_uint should match size_t */
|
||||
#if !defined(LZO_UINT_MAX)
|
||||
# if defined(LZO_ABI_LLP64) /* WIN64 */
|
||||
# if defined(LZO_OS_WIN64)
|
||||
typedef unsigned __int64 lzo_uint;
|
||||
typedef __int64 lzo_int;
|
||||
# else
|
||||
typedef unsigned long long lzo_uint;
|
||||
typedef long long lzo_int;
|
||||
# endif
|
||||
# define LZO_UINT_MAX 0xffffffffffffffffull
|
||||
# define LZO_INT_MAX 9223372036854775807LL
|
||||
# define LZO_INT_MIN (-1LL - LZO_INT_MAX)
|
||||
# elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */
|
||||
typedef unsigned int lzo_uint;
|
||||
typedef int lzo_int;
|
||||
# define LZO_UINT_MAX UINT_MAX
|
||||
# define LZO_INT_MAX INT_MAX
|
||||
# define LZO_INT_MIN INT_MIN
|
||||
# elif (ULONG_MAX >= LZO_0xffffffffL)
|
||||
typedef unsigned long lzo_uint;
|
||||
typedef long lzo_int;
|
||||
# define LZO_UINT_MAX ULONG_MAX
|
||||
# define LZO_INT_MAX LONG_MAX
|
||||
# define LZO_INT_MIN LONG_MIN
|
||||
# else
|
||||
# error "lzo_uint"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Integral types with 32 bits or more. */
|
||||
#if !defined(LZO_UINT32_MAX)
|
||||
# if (UINT_MAX >= LZO_0xffffffffL)
|
||||
typedef unsigned int lzo_uint32;
|
||||
typedef int lzo_int32;
|
||||
# define LZO_UINT32_MAX UINT_MAX
|
||||
# define LZO_INT32_MAX INT_MAX
|
||||
# define LZO_INT32_MIN INT_MIN
|
||||
# elif (ULONG_MAX >= LZO_0xffffffffL)
|
||||
typedef unsigned long lzo_uint32;
|
||||
typedef long lzo_int32;
|
||||
# define LZO_UINT32_MAX ULONG_MAX
|
||||
# define LZO_INT32_MAX LONG_MAX
|
||||
# define LZO_INT32_MIN LONG_MIN
|
||||
# else
|
||||
# error "lzo_uint32"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The larger type of lzo_uint and lzo_uint32. */
|
||||
#if (LZO_UINT_MAX >= LZO_UINT32_MAX)
|
||||
# define lzo_xint lzo_uint
|
||||
#else
|
||||
# define lzo_xint lzo_uint32
|
||||
#endif
|
||||
|
||||
/* Memory model that allows to access memory at offsets of lzo_uint. */
|
||||
#if !defined(__LZO_MMODEL)
|
||||
# if (LZO_UINT_MAX <= UINT_MAX)
|
||||
# define __LZO_MMODEL
|
||||
# elif defined(LZO_HAVE_MM_HUGE_PTR)
|
||||
# define __LZO_MMODEL_HUGE 1
|
||||
# define __LZO_MMODEL __huge
|
||||
# else
|
||||
# define __LZO_MMODEL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* no typedef here because of const-pointer issues */
|
||||
#define lzo_bytep unsigned char __LZO_MMODEL *
|
||||
#define lzo_charp char __LZO_MMODEL *
|
||||
#define lzo_voidp void __LZO_MMODEL *
|
||||
#define lzo_shortp short __LZO_MMODEL *
|
||||
#define lzo_ushortp unsigned short __LZO_MMODEL *
|
||||
#define lzo_uint32p lzo_uint32 __LZO_MMODEL *
|
||||
#define lzo_int32p lzo_int32 __LZO_MMODEL *
|
||||
#define lzo_uintp lzo_uint __LZO_MMODEL *
|
||||
#define lzo_intp lzo_int __LZO_MMODEL *
|
||||
#define lzo_xintp lzo_xint __LZO_MMODEL *
|
||||
#define lzo_voidpp lzo_voidp __LZO_MMODEL *
|
||||
#define lzo_bytepp lzo_bytep __LZO_MMODEL *
|
||||
/* deprecated - use `lzo_bytep' instead of `lzo_byte *' */
|
||||
#define lzo_byte unsigned char __LZO_MMODEL
|
||||
|
||||
typedef int lzo_bool;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// function types
|
||||
************************************************************************/
|
||||
|
||||
/* name mangling */
|
||||
#if !defined(__LZO_EXTERN_C)
|
||||
# ifdef __cplusplus
|
||||
# define __LZO_EXTERN_C extern "C"
|
||||
# else
|
||||
# define __LZO_EXTERN_C extern
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* calling convention */
|
||||
#if !defined(__LZO_CDECL)
|
||||
# define __LZO_CDECL __lzo_cdecl
|
||||
#endif
|
||||
|
||||
/* DLL export information */
|
||||
#if !defined(__LZO_EXPORT1)
|
||||
# define __LZO_EXPORT1
|
||||
#endif
|
||||
#if !defined(__LZO_EXPORT2)
|
||||
# define __LZO_EXPORT2
|
||||
#endif
|
||||
|
||||
/* __cdecl calling convention for public C and assembly functions */
|
||||
#if !defined(LZO_PUBLIC)
|
||||
# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL
|
||||
#endif
|
||||
#if !defined(LZO_EXTERN)
|
||||
# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype)
|
||||
#endif
|
||||
#if !defined(LZO_PRIVATE)
|
||||
# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL
|
||||
#endif
|
||||
|
||||
/* function types */
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem,
|
||||
const lzo_bytep dict, lzo_uint dict_len );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem,
|
||||
const lzo_bytep dict, lzo_uint dict_len );
|
||||
|
||||
|
||||
/* Callback interface. Currently only the progress indicator ("nprogress")
|
||||
* is used, but this may change in a future release. */
|
||||
|
||||
struct lzo_callback_t;
|
||||
typedef struct lzo_callback_t lzo_callback_t;
|
||||
#define lzo_callback_p lzo_callback_t __LZO_MMODEL *
|
||||
|
||||
/* malloc & free function types */
|
||||
typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t)
|
||||
(lzo_callback_p self, lzo_uint items, lzo_uint size);
|
||||
typedef void (__LZO_CDECL *lzo_free_func_t)
|
||||
(lzo_callback_p self, lzo_voidp ptr);
|
||||
|
||||
/* a progress indicator callback function */
|
||||
typedef void (__LZO_CDECL *lzo_progress_func_t)
|
||||
(lzo_callback_p, lzo_uint, lzo_uint, int);
|
||||
|
||||
struct lzo_callback_t
|
||||
{
|
||||
/* custom allocators (set to 0 to disable) */
|
||||
lzo_alloc_func_t nalloc; /* [not used right now] */
|
||||
lzo_free_func_t nfree; /* [not used right now] */
|
||||
|
||||
/* a progress indicator callback function (set to 0 to disable) */
|
||||
lzo_progress_func_t nprogress;
|
||||
|
||||
/* NOTE: the first parameter "self" of the nalloc/nfree/nprogress
|
||||
* callbacks points back to this struct, so you are free to store
|
||||
* some extra info in the following variables. */
|
||||
lzo_voidp user1;
|
||||
lzo_xint user2;
|
||||
lzo_xint user3;
|
||||
};
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// error codes and prototypes
|
||||
************************************************************************/
|
||||
|
||||
/* Error codes for the compression/decompression functions. Negative
|
||||
* values are errors, positive values will be used for special but
|
||||
* normal events.
|
||||
*/
|
||||
#define LZO_E_OK 0
|
||||
#define LZO_E_ERROR (-1)
|
||||
#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */
|
||||
#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */
|
||||
#define LZO_E_INPUT_OVERRUN (-4)
|
||||
#define LZO_E_OUTPUT_OVERRUN (-5)
|
||||
#define LZO_E_LOOKBEHIND_OVERRUN (-6)
|
||||
#define LZO_E_EOF_NOT_FOUND (-7)
|
||||
#define LZO_E_INPUT_NOT_CONSUMED (-8)
|
||||
#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */
|
||||
|
||||
|
||||
#ifndef lzo_sizeof_dict_t
|
||||
# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep))
|
||||
#endif
|
||||
|
||||
/* lzo_init() should be the first function you call.
|
||||
* Check the return code !
|
||||
*
|
||||
* lzo_init() is a macro to allow checking that the library and the
|
||||
* compiler's view of various types are consistent.
|
||||
*/
|
||||
#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\
|
||||
(int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\
|
||||
(int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\
|
||||
(int)sizeof(lzo_callback_t))
|
||||
LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int);
|
||||
|
||||
/* version functions (useful for shared libraries) */
|
||||
LZO_EXTERN(unsigned) lzo_version(void);
|
||||
LZO_EXTERN(const char *) lzo_version_string(void);
|
||||
LZO_EXTERN(const char *) lzo_version_date(void);
|
||||
LZO_EXTERN(const lzo_charp) _lzo_version_string(void);
|
||||
LZO_EXTERN(const lzo_charp) _lzo_version_date(void);
|
||||
|
||||
/* string functions */
|
||||
LZO_EXTERN(int)
|
||||
lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_voidp)
|
||||
lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_voidp)
|
||||
lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_voidp)
|
||||
lzo_memset(lzo_voidp _s, int _c, lzo_uint _len);
|
||||
|
||||
/* checksum functions */
|
||||
LZO_EXTERN(lzo_uint32)
|
||||
lzo_adler32(lzo_uint32 _adler, const lzo_bytep _buf, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_uint32)
|
||||
lzo_crc32(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len);
|
||||
LZO_EXTERN(const lzo_uint32p)
|
||||
lzo_get_crc32_table(void);
|
||||
|
||||
/* misc. */
|
||||
LZO_EXTERN(int) _lzo_config_check(void);
|
||||
typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u;
|
||||
typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u;
|
||||
typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t;
|
||||
|
||||
/* align a char pointer on a boundary that is a multiple of `size' */
|
||||
LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size);
|
||||
#define LZO_PTR_ALIGN_UP(_ptr,_size) \
|
||||
((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size)))
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// deprecated macros - only for backward compatibility with LZO v1.xx
|
||||
************************************************************************/
|
||||
|
||||
#if defined(LZO_CFG_COMPAT)
|
||||
|
||||
#define __LZOCONF_H 1
|
||||
|
||||
#if defined(LZO_ARCH_I086)
|
||||
# define __LZO_i386 1
|
||||
#elif defined(LZO_ARCH_I386)
|
||||
# define __LZO_i386 1
|
||||
#endif
|
||||
|
||||
#if defined(LZO_OS_DOS16)
|
||||
# define __LZO_DOS 1
|
||||
# define __LZO_DOS16 1
|
||||
#elif defined(LZO_OS_DOS32)
|
||||
# define __LZO_DOS 1
|
||||
#elif defined(LZO_OS_WIN16)
|
||||
# define __LZO_WIN 1
|
||||
# define __LZO_WIN16 1
|
||||
#elif defined(LZO_OS_WIN32)
|
||||
# define __LZO_WIN 1
|
||||
#endif
|
||||
|
||||
#define __LZO_CMODEL
|
||||
#define __LZO_DMODEL
|
||||
#define __LZO_ENTRY __LZO_CDECL
|
||||
#define LZO_EXTERN_CDECL LZO_EXTERN
|
||||
#define LZO_ALIGN LZO_PTR_ALIGN_UP
|
||||
|
||||
#define lzo_compress_asm_t lzo_compress_t
|
||||
#define lzo_decompress_asm_t lzo_decompress_t
|
||||
|
||||
#endif /* LZO_CFG_COMPAT */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* already included */
|
||||
|
||||
|
||||
/* vim:set ts=4 et: */
|
1807
extern/lzo/minilzo/lzodefs.h
vendored
1807
extern/lzo/minilzo/lzodefs.h
vendored
File diff suppressed because it is too large
Load Diff
4112
extern/lzo/minilzo/minilzo.c
vendored
4112
extern/lzo/minilzo/minilzo.c
vendored
File diff suppressed because it is too large
Load Diff
112
extern/lzo/minilzo/minilzo.h
vendored
112
extern/lzo/minilzo/minilzo.h
vendored
@@ -1,112 +0,0 @@
|
||||
/* minilzo.h -- mini subset of the LZO real-time data compression library
|
||||
|
||||
This file is part of the LZO real-time data compression library.
|
||||
|
||||
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
The LZO library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
The LZO library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the LZO library; see the file COPYING.
|
||||
If not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Markus F.X.J. Oberhumer
|
||||
<markus@oberhumer.com>
|
||||
http://www.oberhumer.com/opensource/lzo/
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
* the full LZO package can be found at
|
||||
* http://www.oberhumer.com/opensource/lzo/
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __MINILZO_H
|
||||
#define __MINILZO_H
|
||||
|
||||
#define MINILZO_VERSION 0x2030
|
||||
|
||||
#ifdef __LZOCONF_H
|
||||
# error "you cannot use both LZO and miniLZO"
|
||||
#endif
|
||||
|
||||
#undef LZO_HAVE_CONFIG_H
|
||||
#include "lzoconf.h"
|
||||
|
||||
#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION)
|
||||
# error "version mismatch in header files"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
//
|
||||
************************************************************************/
|
||||
|
||||
/* Memory required for the wrkmem parameter.
|
||||
* When the required size is 0, you can also pass a NULL pointer.
|
||||
*/
|
||||
|
||||
#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS
|
||||
#define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t))
|
||||
#define LZO1X_MEM_DECOMPRESS (0)
|
||||
|
||||
|
||||
/* compression */
|
||||
LZO_EXTERN(int)
|
||||
lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
/* decompression */
|
||||
LZO_EXTERN(int)
|
||||
lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem /* NOT USED */ );
|
||||
|
||||
/* safe decompression with overrun testing */
|
||||
LZO_EXTERN(int)
|
||||
lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem /* NOT USED */ );
|
||||
|
||||
|
||||
#define LZO_OUT_LEN(size) ((size) + (size) / 16 + 64 + 3)
|
||||
|
||||
#define LZO_HEAP_ALLOC(var,size) \
|
||||
lzo_align_t __LZO_MMODEL var [ ((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t) ]
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* already included */
|
||||
|
@@ -38,7 +38,7 @@ ADD_SUBDIRECTORY(opennl)
|
||||
ADD_SUBDIRECTORY(smoke)
|
||||
|
||||
IF(WITH_ELBEEM)
|
||||
ADD_SUBDIRECTORY(elbeem)
|
||||
ADD_SUBDIRECTORY(elbeem)
|
||||
ENDIF(WITH_ELBEEM)
|
||||
|
||||
ADD_SUBDIRECTORY(bsp)
|
||||
|
@@ -25,40 +25,34 @@ SET(INC . intern FX SRC ${PTHREADS_INC} ${LIBSAMPLERATE_INC})
|
||||
FILE(GLOB SRC intern/*.cpp intern/*.h FX/*.cpp SRC/*.cpp)
|
||||
|
||||
IF(WITH_FFMPEG)
|
||||
SET(INC ${INC} ffmpeg ${FFMPEG_INC})
|
||||
FILE(GLOB FFMPEGSRC ffmpeg/*.cpp)
|
||||
ADD_DEFINITIONS(-DWITH_FFMPEG)
|
||||
SET(INC ${INC} ffmpeg ${FFMPEG_INC})
|
||||
FILE(GLOB FFMPEGSRC ffmpeg/*.cpp)
|
||||
ADD_DEFINITIONS(-DWITH_FFMPEG)
|
||||
ENDIF(WITH_FFMPEG)
|
||||
|
||||
IF(WITH_SDL)
|
||||
SET(INC ${INC} SDL ${SDL_INCLUDE_DIR})
|
||||
FILE(GLOB SDLSRC SDL/*.cpp)
|
||||
ADD_DEFINITIONS(-DWITH_SDL)
|
||||
SET(INC ${INC} SDL ${SDL_INCLUDE_DIR})
|
||||
FILE(GLOB SDLSRC SDL/*.cpp)
|
||||
ADD_DEFINITIONS(-DWITH_SDL)
|
||||
ENDIF(WITH_SDL)
|
||||
|
||||
IF(WITH_OPENAL)
|
||||
SET(INC ${INC} OpenAL ${OPENAL_INCLUDE_DIR})
|
||||
FILE(GLOB OPENALSRC OpenAL/*.cpp)
|
||||
ADD_DEFINITIONS(-DWITH_OPENAL)
|
||||
SET(INC ${INC} OpenAL ${OPENAL_INCLUDE_DIR})
|
||||
FILE(GLOB OPENALSRC OpenAL/*.cpp)
|
||||
ADD_DEFINITIONS(-DWITH_OPENAL)
|
||||
|
||||
STRING(REGEX MATCH ".*ramework.*" FRAMEWORK ${OPENAL_INCLUDE_DIR})
|
||||
IF(FRAMEWORK)
|
||||
ADD_DEFINITIONS(-DAPPLE_FRAMEWORK_FIX)
|
||||
ENDIF(FRAMEWORK)
|
||||
STRING(REGEX MATCH ".*ramework.*" FRAMEWORK ${OPENAL_INCLUDE_DIR})
|
||||
IF(FRAMEWORK)
|
||||
ADD_DEFINITIONS(-DAPPLE_FRAMEWORK_FIX)
|
||||
ENDIF(FRAMEWORK)
|
||||
ENDIF(WITH_OPENAL)
|
||||
|
||||
IF(WITH_JACK)
|
||||
SET(INC ${INC} jack ${JACK_INC})
|
||||
FILE(GLOB JACKSRC jack/*.cpp)
|
||||
ADD_DEFINITIONS(-DWITH_JACK)
|
||||
SET(INC ${INC} jack ${JACK_INC})
|
||||
FILE(GLOB JACKSRC jack/*.cpp)
|
||||
ADD_DEFINITIONS(-DWITH_JACK)
|
||||
ENDIF(WITH_JACK)
|
||||
|
||||
IF(WITH_SNDFILE)
|
||||
SET(INC ${INC} sndfile ${SNDFILE_INC})
|
||||
FILE(GLOB SNDFILESRC sndfile/*.cpp)
|
||||
ADD_DEFINITIONS(-DWITH_SNDFILE)
|
||||
ENDIF(WITH_SNDFILE)
|
||||
|
||||
SET(SRC ${SRC} ${FFMPEGSRC} ${SNDFILESRC} ${SDLSRC} ${OPENALSRC} ${JACKSRC})
|
||||
SET(SRC ${SRC} ${FFMPEGSRC} ${SDLSRC} ${OPENALSRC} ${JACKSRC})
|
||||
|
||||
BLENDERLIB(bf_audaspace "${SRC}" "${INC}")
|
||||
|
@@ -47,7 +47,7 @@ AUD_DoubleReader::AUD_DoubleReader(AUD_IReader* reader1,
|
||||
AUD_THROW(AUD_ERROR_READER);
|
||||
}
|
||||
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
if(reader1)
|
||||
{
|
||||
|
@@ -46,7 +46,7 @@ AUD_IReader* AUD_PingPongFactory::createReader()
|
||||
{
|
||||
reader2 = factory.createReader();
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
reader2 = 0;
|
||||
}
|
||||
|
@@ -44,63 +44,19 @@ ifeq ($(WITH_FFMPEG),true)
|
||||
DIRS += ffmpeg
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_OPENAL),true)
|
||||
DIRS += OpenAL
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_JACK),true)
|
||||
DIRS += jack
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_SNDFILE),true)
|
||||
DIRS += sndfile
|
||||
endif
|
||||
|
||||
include nan_subdirs.mk
|
||||
|
||||
install: $(ALL_OR_DEBUG)
|
||||
@[ -d $(NAN_AUDASPACE) ] || mkdir $(NAN_AUDASPACE)
|
||||
@[ -d $(NAN_AUDASPACE)/include ] || mkdir $(NAN_AUDASPACE)/include
|
||||
@[ -d $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
|
||||
@../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaudaspace.a $(DIR)/$(DEBUG_DIR)libaud_sdl.a $(DIR)/$(DEBUG_DIR)libaud_fx.a $(DIR)/$(DEBUG_DIR)libaud_src.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
|
||||
|
||||
ifeq ($(WITH_FFMPEG),true)
|
||||
@../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_ffmpeg.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_OPENAL),true)
|
||||
@../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_openal.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_JACK),true)
|
||||
@../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_jack.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_SNDFILE),true)
|
||||
@../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_sndfile.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
|
||||
endif
|
||||
@../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaudaspace.a $(DIR)/$(DEBUG_DIR)libaud_fx.a $(DIR)/$(DEBUG_DIR)libaud_src.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
|
||||
|
||||
ifeq ($(OS),darwin)
|
||||
ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaudaspace.a
|
||||
ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_src.a
|
||||
ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_fx.a
|
||||
ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sdl.a
|
||||
|
||||
ifeq ($(WITH_FFMPEG),true)
|
||||
ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_ffmpeg.a
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_OPENAL),true)
|
||||
ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_openal.a
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_JACK),true)
|
||||
ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_jack.a
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_SNDFILE),true)
|
||||
ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sndfile.a
|
||||
endif
|
||||
|
||||
endif
|
||||
@../tools/cpifdiff.sh intern/*.h $(NAN_AUDASPACE)/include/
|
||||
|
||||
|
||||
|
@@ -544,13 +544,13 @@ AUD_Handle* AUD_OpenALDevice::play(AUD_IFactory* factory, bool keep)
|
||||
if(alGetError() != AL_NO_ERROR)
|
||||
AUD_THROW(AUD_ERROR_OPENAL);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
alDeleteSources(1, &sound->source);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
delete sound; AUD_DELETE("handle")
|
||||
alcProcessContext(m_context);
|
||||
@@ -648,19 +648,19 @@ AUD_Handle* AUD_OpenALDevice::play(AUD_IFactory* factory, bool keep)
|
||||
if(alGetError() != AL_NO_ERROR)
|
||||
AUD_THROW(AUD_ERROR_OPENAL);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
alDeleteSources(1, &sound->source);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
alDeleteBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
delete sound; AUD_DELETE("handle")
|
||||
delete reader; AUD_DELETE("reader")
|
||||
@@ -1051,13 +1051,13 @@ bool AUD_OpenALDevice::setCapability(int capability, void *value)
|
||||
if(alGetError() != AL_NO_ERROR)
|
||||
AUD_THROW(AUD_ERROR_OPENAL);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
alDeleteBuffers(1, &bf->buffer);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
delete bf; AUD_DELETE("bufferedfactory")
|
||||
delete reader; AUD_DELETE("reader")
|
||||
|
@@ -26,9 +26,4 @@ if env['WITH_BF_JACK']:
|
||||
incs += ' jack ' + env['BF_JACK_INC']
|
||||
defs.append('WITH_JACK')
|
||||
|
||||
if env['WITH_BF_SNDFILE']:
|
||||
sources += env.Glob('sndfile/*.cpp')
|
||||
incs += ' sndfile ' + env['BF_SNDFILE_INC']
|
||||
defs.append('WITH_SNDFILE')
|
||||
|
||||
env.BlenderLib ('bf_audaspace', sources, Split(incs), defs, libtype=['intern','player'], priority = [25,215] )
|
||||
env.BlenderLib ('bf_audaspace', sources, Split(incs), defs, libtype=['intern'], priority = [25] )
|
||||
|
@@ -87,7 +87,7 @@ AUD_SDLMixerReader::AUD_SDLMixerReader(AUD_IReader* reader,
|
||||
specs.rate) == -1)
|
||||
AUD_THROW(AUD_ERROR_SDL);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
delete m_reader; AUD_DELETE("reader")
|
||||
throw;
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#
|
||||
|
||||
LIBNAME = aud_sdl
|
||||
DIR = $(OCGDIR)/intern/audaspace
|
||||
DIR = $(OCGDIR)/intern/$(LIBNAME)
|
||||
|
||||
include nan_compile.mk
|
||||
|
||||
|
@@ -25,24 +25,31 @@
|
||||
|
||||
#include "AUD_FFMPEGFactory.h"
|
||||
#include "AUD_FFMPEGReader.h"
|
||||
#include "AUD_Buffer.h"
|
||||
#include "AUD_Space.h"
|
||||
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
}
|
||||
|
||||
AUD_FFMPEGFactory::AUD_FFMPEGFactory(const char* filename)
|
||||
{
|
||||
if(filename != NULL)
|
||||
if(filename != 0)
|
||||
{
|
||||
m_filename = new char[strlen(filename)+1]; AUD_NEW("string")
|
||||
strcpy(m_filename, filename);
|
||||
}
|
||||
else
|
||||
m_filename = NULL;
|
||||
m_filename = 0;
|
||||
m_buffer = 0;
|
||||
m_size = 0;
|
||||
}
|
||||
|
||||
AUD_FFMPEGFactory::AUD_FFMPEGFactory(unsigned char* buffer, int size)
|
||||
{
|
||||
m_filename = NULL;
|
||||
m_buffer = AUD_Reference<AUD_Buffer>(new AUD_Buffer(size));
|
||||
memcpy(m_buffer.get()->getBuffer(), buffer, size);
|
||||
m_filename = 0;
|
||||
m_buffer = (unsigned char*)av_malloc(size); AUD_NEW("buffer")
|
||||
m_size = size;
|
||||
memcpy(m_buffer, buffer, size);
|
||||
}
|
||||
|
||||
AUD_FFMPEGFactory::~AUD_FFMPEGFactory()
|
||||
@@ -51,15 +58,31 @@ AUD_FFMPEGFactory::~AUD_FFMPEGFactory()
|
||||
{
|
||||
delete[] m_filename; AUD_DELETE("string")
|
||||
}
|
||||
if(m_buffer)
|
||||
{
|
||||
av_free(m_buffer); AUD_DELETE("buffer")
|
||||
}
|
||||
}
|
||||
|
||||
AUD_IReader* AUD_FFMPEGFactory::createReader()
|
||||
{
|
||||
AUD_IReader* reader;
|
||||
if(m_filename)
|
||||
reader = new AUD_FFMPEGReader(m_filename);
|
||||
else
|
||||
reader = new AUD_FFMPEGReader(m_buffer);
|
||||
AUD_NEW("reader")
|
||||
return reader;
|
||||
try
|
||||
{
|
||||
AUD_IReader* reader;
|
||||
if(m_filename)
|
||||
reader = new AUD_FFMPEGReader(m_filename);
|
||||
else
|
||||
reader = new AUD_FFMPEGReader(m_buffer, m_size);
|
||||
AUD_NEW("reader")
|
||||
return reader;
|
||||
}
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
// return 0 if ffmpeg cannot read the file
|
||||
if(e.error == AUD_ERROR_FFMPEG)
|
||||
return 0;
|
||||
// but throw an exception if the file doesn't exist
|
||||
else
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@@ -27,8 +27,6 @@
|
||||
#define AUD_FFMPEGFACTORY
|
||||
|
||||
#include "AUD_IFactory.h"
|
||||
#include "AUD_Reference.h"
|
||||
class AUD_Buffer;
|
||||
|
||||
/**
|
||||
* This factory reads a sound file via ffmpeg.
|
||||
@@ -46,7 +44,12 @@ private:
|
||||
/**
|
||||
* The buffer to read from.
|
||||
*/
|
||||
AUD_Reference<AUD_Buffer> m_buffer;
|
||||
unsigned char* m_buffer;
|
||||
|
||||
/**
|
||||
* The size of the buffer.
|
||||
*/
|
||||
int m_size;
|
||||
|
||||
public:
|
||||
/**
|
||||
|
@@ -119,7 +119,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename)
|
||||
// find audio stream and codec
|
||||
m_stream = -1;
|
||||
|
||||
for(unsigned int i = 0; i < m_formatCtx->nb_streams; i++)
|
||||
for(int i = 0; i < m_formatCtx->nb_streams; i++)
|
||||
if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
|
||||
&& (m_stream < 0))
|
||||
{
|
||||
@@ -146,7 +146,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename)
|
||||
m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt);
|
||||
m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate;
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
av_close_input_file(m_formatCtx);
|
||||
throw;
|
||||
@@ -158,22 +158,21 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename)
|
||||
AUD_NEW("buffer")
|
||||
}
|
||||
|
||||
AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer)
|
||||
AUD_FFMPEGReader::AUD_FFMPEGReader(unsigned char* buffer, int size)
|
||||
{
|
||||
m_position = 0;
|
||||
m_pkgbuf_left = 0;
|
||||
m_byteiocontext = (ByteIOContext*)av_mallocz(sizeof(ByteIOContext));
|
||||
AUD_NEW("byteiocontext")
|
||||
m_membuffer = buffer;
|
||||
|
||||
if(init_put_byte(m_byteiocontext, buffer.get()->getBuffer(), buffer.get()->getSize(), 0,
|
||||
if(init_put_byte(m_byteiocontext, buffer, size, 0,
|
||||
NULL, NULL, NULL, NULL) != 0)
|
||||
AUD_THROW(AUD_ERROR_FILE);
|
||||
|
||||
AVProbeData probe_data;
|
||||
probe_data.filename = "";
|
||||
probe_data.buf = buffer.get()->getBuffer();
|
||||
probe_data.buf_size = buffer.get()->getSize();
|
||||
probe_data.buf = buffer;
|
||||
probe_data.buf_size = size;
|
||||
AVInputFormat* fmt = av_probe_input_format(&probe_data, 1);
|
||||
|
||||
// open stream
|
||||
@@ -188,7 +187,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer)
|
||||
// find audio stream and codec
|
||||
m_stream = -1;
|
||||
|
||||
for(unsigned int i = 0; i < m_formatCtx->nb_streams; i++)
|
||||
for(int i = 0; i < m_formatCtx->nb_streams; i++)
|
||||
if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
|
||||
&& (m_stream < 0))
|
||||
{
|
||||
@@ -215,7 +214,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer)
|
||||
m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt);
|
||||
m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate;
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
av_close_input_stream(m_formatCtx);
|
||||
av_free(m_byteiocontext); AUD_DELETE("byteiocontext")
|
||||
@@ -334,6 +333,7 @@ void AUD_FFMPEGReader::read(int & length, sample_t* & buffer)
|
||||
// read packages and decode them
|
||||
AVPacket packet;
|
||||
int data_size = 0;
|
||||
int pkgbuf_size = m_pkgbuf->getSize();
|
||||
int pkgbuf_pos;
|
||||
int left = length;
|
||||
int sample_size = AUD_SAMPLE_SIZE(m_specs);
|
||||
|
@@ -27,9 +27,7 @@
|
||||
#define AUD_FFMPEGREADER
|
||||
|
||||
#include "AUD_IReader.h"
|
||||
#include "AUD_Reference.h"
|
||||
class AUD_Buffer;
|
||||
|
||||
struct AVCodecContext;
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
@@ -91,11 +89,6 @@ private:
|
||||
*/
|
||||
int m_stream;
|
||||
|
||||
/**
|
||||
* The memory file to read from, only saved to keep the buffer alive.
|
||||
*/
|
||||
AUD_Reference<AUD_Buffer> m_membuffer;
|
||||
|
||||
/**
|
||||
* Decodes a packet into the given buffer.
|
||||
* \param packet The AVPacket to decode.
|
||||
@@ -116,10 +109,11 @@ public:
|
||||
/**
|
||||
* Creates a new reader.
|
||||
* \param buffer The buffer to read from.
|
||||
* \param size The size of the buffer.
|
||||
* \exception AUD_Exception Thrown if the buffer specified cannot be read
|
||||
* with ffmpeg.
|
||||
*/
|
||||
AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer);
|
||||
AUD_FFMPEGReader(unsigned char* buffer, int size);
|
||||
|
||||
/**
|
||||
* Destroys the reader and closes the file.
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#
|
||||
|
||||
LIBNAME = aud_ffmpeg
|
||||
DIR = $(OCGDIR)/intern/audaspace
|
||||
DIR = $(OCGDIR)/intern/$(LIBNAME)
|
||||
|
||||
include nan_compile.mk
|
||||
|
||||
|
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "AUD_NULLDevice.h"
|
||||
#include "AUD_I3DDevice.h"
|
||||
#include "AUD_FileFactory.h"
|
||||
#include "AUD_StreamBufferFactory.h"
|
||||
#include "AUD_DelayFactory.h"
|
||||
#include "AUD_LimiterFactory.h"
|
||||
@@ -49,6 +48,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef WITH_FFMPEG
|
||||
#include "AUD_FFMPEGFactory.h"
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
}
|
||||
@@ -77,9 +77,6 @@ int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize)
|
||||
#endif
|
||||
AUD_IDevice* dev = NULL;
|
||||
|
||||
if(AUD_device)
|
||||
AUD_exit();
|
||||
|
||||
try
|
||||
{
|
||||
switch(device)
|
||||
@@ -110,13 +107,16 @@ int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(AUD_device)
|
||||
AUD_exit();
|
||||
|
||||
AUD_device = dev;
|
||||
if(AUD_device->checkCapability(AUD_CAPS_3D_DEVICE))
|
||||
AUD_3ddevice = dynamic_cast<AUD_I3DDevice*>(AUD_device);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -187,13 +187,21 @@ AUD_SoundInfo AUD_getInfo(AUD_Sound* sound)
|
||||
AUD_Sound* AUD_load(const char* filename)
|
||||
{
|
||||
assert(filename);
|
||||
return new AUD_FileFactory(filename);
|
||||
#ifdef WITH_FFMPEG
|
||||
return new AUD_FFMPEGFactory(filename);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
AUD_Sound* AUD_loadBuffer(unsigned char* buffer, int size)
|
||||
{
|
||||
assert(buffer);
|
||||
return new AUD_FileFactory(buffer, size);
|
||||
#ifdef WITH_FFMPEG
|
||||
return new AUD_FFMPEGFactory(buffer, size);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
AUD_Sound* AUD_bufferSound(AUD_Sound* sound)
|
||||
@@ -204,7 +212,7 @@ AUD_Sound* AUD_bufferSound(AUD_Sound* sound)
|
||||
{
|
||||
return new AUD_StreamBufferFactory(sound);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -218,7 +226,7 @@ AUD_Sound* AUD_delaySound(AUD_Sound* sound, float delay)
|
||||
{
|
||||
return new AUD_DelayFactory(sound, delay);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -232,7 +240,7 @@ extern AUD_Sound* AUD_limitSound(AUD_Sound* sound, float start, float end)
|
||||
{
|
||||
return new AUD_LimiterFactory(sound, start, end);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -246,7 +254,7 @@ AUD_Sound* AUD_pingpongSound(AUD_Sound* sound)
|
||||
{
|
||||
return new AUD_PingPongFactory(sound);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -260,7 +268,7 @@ AUD_Sound* AUD_loopSound(AUD_Sound* sound)
|
||||
{
|
||||
return new AUD_LoopFactory(sound);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -278,7 +286,7 @@ int AUD_stopLoop(AUD_Handle* handle)
|
||||
{
|
||||
return AUD_device->sendMessage(handle, message);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -299,7 +307,7 @@ AUD_Handle* AUD_play(AUD_Sound* sound, int keep)
|
||||
{
|
||||
return AUD_device->play(sound, keep);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -360,7 +368,7 @@ AUD_Handle* AUD_play3D(AUD_Sound* sound, int keep)
|
||||
else
|
||||
return AUD_device->play(sound, keep);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -376,7 +384,7 @@ int AUD_updateListener(AUD_3DData* data)
|
||||
if(AUD_3ddevice)
|
||||
return AUD_3ddevice->updateListener(*data);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
}
|
||||
return false;
|
||||
@@ -391,7 +399,7 @@ int AUD_set3DSetting(AUD_3DSetting setting, float value)
|
||||
if(AUD_3ddevice)
|
||||
return AUD_3ddevice->setSetting(setting, value);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
}
|
||||
return false;
|
||||
@@ -406,7 +414,7 @@ float AUD_get3DSetting(AUD_3DSetting setting)
|
||||
if(AUD_3ddevice)
|
||||
return AUD_3ddevice->getSetting(setting);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
}
|
||||
return 0.0;
|
||||
@@ -424,7 +432,7 @@ int AUD_update3DSource(AUD_Handle* handle, AUD_3DData* data)
|
||||
if(AUD_3ddevice)
|
||||
return AUD_3ddevice->updateSource(handle, *data);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -443,7 +451,7 @@ int AUD_set3DSourceSetting(AUD_Handle* handle,
|
||||
if(AUD_3ddevice)
|
||||
return AUD_3ddevice->setSourceSetting(handle, setting, value);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -461,7 +469,7 @@ float AUD_get3DSourceSetting(AUD_Handle* handle, AUD_3DSourceSetting setting)
|
||||
if(AUD_3ddevice)
|
||||
return AUD_3ddevice->getSourceSetting(handle, setting);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -481,7 +489,7 @@ int AUD_setSoundVolume(AUD_Handle* handle, float volume)
|
||||
{
|
||||
return AUD_device->setCapability(AUD_CAPS_SOURCE_VOLUME, &caps);
|
||||
}
|
||||
catch(AUD_Exception) {}
|
||||
catch(AUD_Exception e) {}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -499,7 +507,7 @@ int AUD_setSoundPitch(AUD_Handle* handle, float pitch)
|
||||
{
|
||||
return AUD_device->setCapability(AUD_CAPS_SOURCE_PITCH, &caps);
|
||||
}
|
||||
catch(AUD_Exception) {}
|
||||
catch(AUD_Exception e) {}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -510,7 +518,7 @@ AUD_Device* AUD_openReadDevice(AUD_Specs specs)
|
||||
{
|
||||
return new AUD_ReadDevice(specs);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -525,7 +533,7 @@ int AUD_playDevice(AUD_Device* device, AUD_Sound* sound)
|
||||
{
|
||||
return device->play(sound) != NULL;
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -540,7 +548,7 @@ int AUD_readDevice(AUD_Device* device, sample_t* buffer, int length)
|
||||
{
|
||||
return device->read(buffer, length);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -554,7 +562,7 @@ void AUD_closeReadDevice(AUD_Device* device)
|
||||
{
|
||||
delete device;
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@@ -35,32 +35,6 @@ include nan_compile.mk
|
||||
|
||||
CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
|
||||
|
||||
ifeq ($(WITH_SDL),true)
|
||||
CPPFLAGS += -DWITH_SDL
|
||||
CPPFLAGS += $(NAN_SDLCFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_OPENAL),true)
|
||||
CPPFLAGS += -DWITH_OPENAL
|
||||
CPPFLAGS += -I../OpenAL
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_JACK),true)
|
||||
CPPFLAGS += -DWITH_JACK
|
||||
CPPFLAGS += $(NAN_JACKCFLAGS)
|
||||
CPPFLAGS += -I../jack
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_FFMPEG),true)
|
||||
CPPFLAGS += -DWITH_FFMPEG
|
||||
CPPFLAGS += $(NAN_FFMPEGCFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_SNDFILE),true)
|
||||
CPPFLAGS += -DWITH_SNDFILE
|
||||
CPPFLAGS += -I../sndfile
|
||||
endif
|
||||
|
||||
CPPFLAGS += -I$(LCGDIR)/samplerate/include/
|
||||
CPPFLAGS += -I../ffmpeg
|
||||
CPPFLAGS += -I../FX
|
||||
|
@@ -35,7 +35,7 @@
|
||||
int AUD_JackDevice::jack_mix(jack_nframes_t length, void *data)
|
||||
{
|
||||
AUD_JackDevice* device = (AUD_JackDevice*)data;
|
||||
unsigned int samplesize = AUD_SAMPLE_SIZE(device->m_specs);
|
||||
int samplesize = AUD_SAMPLE_SIZE(device->m_specs);
|
||||
if(device->m_buffer->getSize() < samplesize * length)
|
||||
device->m_buffer->resize(samplesize * length);
|
||||
device->mix(device->m_buffer->getBuffer(), length);
|
||||
@@ -44,10 +44,10 @@ int AUD_JackDevice::jack_mix(jack_nframes_t length, void *data)
|
||||
float* out;
|
||||
int count = device->m_specs.channels;
|
||||
|
||||
for(unsigned int i = 0; i < count; i++)
|
||||
for(int i = 0; i < count; i++)
|
||||
{
|
||||
out = (float*)jack_port_get_buffer(device->m_ports[i], length);
|
||||
for(unsigned int j = 0; j < length; j++)
|
||||
for(int j = 0; j < length; j++)
|
||||
out[j] = in[j * count + i];
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ AUD_JackDevice::AUD_JackDevice(AUD_Specs specs)
|
||||
if(jack_activate(m_client))
|
||||
AUD_THROW(AUD_ERROR_JACK);
|
||||
}
|
||||
catch(AUD_Exception)
|
||||
catch(AUD_Exception e)
|
||||
{
|
||||
jack_client_close(m_client);
|
||||
delete[] m_ports; AUD_DELETE("jack_port")
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#ifndef AUD_JACKDEVICE
|
||||
#define AUD_JACKDEVICE
|
||||
|
||||
|
||||
#include "AUD_SoftwareDevice.h"
|
||||
class AUD_Buffer;
|
||||
|
||||
|
@@ -35,10 +35,6 @@ include nan_compile.mk
|
||||
|
||||
CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
|
||||
|
||||
# If we are here, jack is enable.
|
||||
CPPFLAGS += -DWITH_JACK
|
||||
CPPFLAGS += $(NAN_JACKCFLAGS)
|
||||
|
||||
CPPFLAGS += -I../intern
|
||||
CPPFLAGS += -I..
|
||||
CPPFLAGS += -I.
|
||||
|
@@ -43,7 +43,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="2"
|
||||
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"
|
||||
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include"
|
||||
PreprocessorDefinitions="WIN32,NDEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
@@ -117,7 +117,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"
|
||||
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include"
|
||||
PreprocessorDefinitions="WIN32,_DEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
@@ -192,7 +192,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="2"
|
||||
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"
|
||||
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include"
|
||||
PreprocessorDefinitions="WIN32,NDEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
@@ -266,7 +266,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"
|
||||
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include"
|
||||
PreprocessorDefinitions="WIN32,_DEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -380,14 +380,6 @@
|
||||
RelativePath="..\..\intern\AUD_ConverterReader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\intern\AUD_FileFactory.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\intern\AUD_FileFactory.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\intern\AUD_FloatMixer.cpp"
|
||||
>
|
||||
@@ -725,38 +717,6 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="jack"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\jack\AUD_JackDevice.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\jack\AUD_JackDevice.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="sndfile"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\sndfile\AUD_SndFileFactory.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\sndfile\AUD_SndFileFactory.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\sndfile\AUD_SndFileReader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\sndfile\AUD_SndFileReader.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\..\AUD_C-API.h"
|
||||
>
|
||||
|
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* ***** BEGIN LGPL LICENSE BLOCK *****
|
||||
*
|
||||
* Copyright 2009 Jörg Hermann Müller
|
||||
*
|
||||
* This file is part of AudaSpace.
|
||||
*
|
||||
* AudaSpace is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* AudaSpace is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ***** END LGPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include "AUD_SndFileFactory.h"
|
||||
#include "AUD_SndFileReader.h"
|
||||
#include "AUD_Buffer.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
AUD_SndFileFactory::AUD_SndFileFactory(const char* filename)
|
||||
{
|
||||
if(filename != NULL)
|
||||
{
|
||||
m_filename = new char[strlen(filename)+1]; AUD_NEW("string")
|
||||
strcpy(m_filename, filename);
|
||||
}
|
||||
else
|
||||
m_filename = NULL;
|
||||
}
|
||||
|
||||
AUD_SndFileFactory::AUD_SndFileFactory(unsigned char* buffer, int size)
|
||||
{
|
||||
m_filename = NULL;
|
||||
m_buffer = AUD_Reference<AUD_Buffer>(new AUD_Buffer(size));
|
||||
memcpy(m_buffer.get()->getBuffer(), buffer, size);
|
||||
}
|
||||
|
||||
AUD_SndFileFactory::~AUD_SndFileFactory()
|
||||
{
|
||||
if(m_filename)
|
||||
{
|
||||
delete[] m_filename; AUD_DELETE("string")
|
||||
}
|
||||
}
|
||||
|
||||
AUD_IReader* AUD_SndFileFactory::createReader()
|
||||
{
|
||||
AUD_IReader* reader;
|
||||
if(m_filename)
|
||||
reader = new AUD_SndFileReader(m_filename);
|
||||
else
|
||||
reader = new AUD_SndFileReader(m_buffer);
|
||||
AUD_NEW("reader")
|
||||
return reader;
|
||||
}
|
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* ***** BEGIN LGPL LICENSE BLOCK *****
|
||||
*
|
||||
* Copyright 2009 Jörg Hermann Müller
|
||||
*
|
||||
* This file is part of AudaSpace.
|
||||
*
|
||||
* AudaSpace is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* AudaSpace is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ***** END LGPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef AUD_SNDFILEFACTORY
|
||||
#define AUD_SNDFILEFACTORY
|
||||
|
||||
#include "AUD_IFactory.h"
|
||||
#include "AUD_Reference.h"
|
||||
class AUD_Buffer;
|
||||
|
||||
/**
|
||||
* This factory reads a sound file via libsndfile.
|
||||
*/
|
||||
class AUD_SndFileFactory : public AUD_IFactory
|
||||
{
|
||||
private:
|
||||
/**
|
||||
* The filename of the sound source file.
|
||||
*/
|
||||
char* m_filename;
|
||||
|
||||
/**
|
||||
* The buffer to read from.
|
||||
*/
|
||||
AUD_Reference<AUD_Buffer> m_buffer;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Creates a new factory.
|
||||
* \param filename The sound file path.
|
||||
*/
|
||||
AUD_SndFileFactory(const char* filename);
|
||||
|
||||
/**
|
||||
* Creates a new factory.
|
||||
* \param buffer The buffer to read from.
|
||||
* \param size The size of the buffer.
|
||||
*/
|
||||
AUD_SndFileFactory(unsigned char* buffer, int size);
|
||||
|
||||
/**
|
||||
* Destroys the factory.
|
||||
*/
|
||||
~AUD_SndFileFactory();
|
||||
|
||||
virtual AUD_IReader* createReader();
|
||||
};
|
||||
|
||||
#endif //AUD_SNDFILEFACTORY
|
@@ -1,233 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* ***** BEGIN LGPL LICENSE BLOCK *****
|
||||
*
|
||||
* Copyright 2009 Jörg Hermann Müller
|
||||
*
|
||||
* This file is part of AudaSpace.
|
||||
*
|
||||
* AudaSpace is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* AudaSpace is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ***** END LGPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include "AUD_SndFileReader.h"
|
||||
#include "AUD_Buffer.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
// This function transforms a SampleFormat to our own sample format
|
||||
static inline AUD_SampleFormat SNDFILE_TO_AUD(int fmt)
|
||||
{
|
||||
switch(fmt & SF_FORMAT_SUBMASK)
|
||||
{
|
||||
// only read s16, s32 and double as they are
|
||||
case SF_FORMAT_PCM_16:
|
||||
return AUD_FORMAT_S16;
|
||||
case SF_FORMAT_PCM_32:
|
||||
return AUD_FORMAT_S32;
|
||||
case SF_FORMAT_DOUBLE:
|
||||
return AUD_FORMAT_FLOAT64;
|
||||
// read all other formats as floats
|
||||
default:
|
||||
return AUD_FORMAT_FLOAT32;
|
||||
}
|
||||
}
|
||||
|
||||
sf_count_t AUD_SndFileReader::vio_get_filelen(void *user_data)
|
||||
{
|
||||
AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data;
|
||||
return reader->m_membuffer.get()->getSize();
|
||||
}
|
||||
|
||||
sf_count_t AUD_SndFileReader::vio_seek(sf_count_t offset, int whence, void *user_data)
|
||||
{
|
||||
AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data;
|
||||
|
||||
switch(whence)
|
||||
{
|
||||
case SEEK_SET:
|
||||
reader->m_memoffset = offset;
|
||||
break;
|
||||
case SEEK_CUR:
|
||||
reader->m_memoffset = reader->m_memoffset + offset;
|
||||
break;
|
||||
case SEEK_END:
|
||||
reader->m_memoffset = reader->m_membuffer.get()->getSize() + offset;
|
||||
break;
|
||||
}
|
||||
|
||||
return reader->m_memoffset;
|
||||
}
|
||||
|
||||
sf_count_t AUD_SndFileReader::vio_read(void *ptr, sf_count_t count, void *user_data)
|
||||
{
|
||||
AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data;
|
||||
|
||||
if(reader->m_memoffset + count > reader->m_membuffer.get()->getSize())
|
||||
count = reader->m_membuffer.get()->getSize() - reader->m_memoffset;
|
||||
|
||||
memcpy(ptr, reader->m_membuffer.get()->getBuffer() + reader->m_memoffset, count);
|
||||
reader->m_memoffset += count;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
sf_count_t AUD_SndFileReader::vio_tell(void *user_data)
|
||||
{
|
||||
AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data;
|
||||
|
||||
return reader->m_memoffset;
|
||||
}
|
||||
|
||||
AUD_SndFileReader::AUD_SndFileReader(const char* filename)
|
||||
{
|
||||
SF_INFO sfinfo;
|
||||
|
||||
sfinfo.format = 0;
|
||||
m_sndfile = sf_open(filename, SFM_READ, &sfinfo);
|
||||
|
||||
if(!m_sndfile)
|
||||
AUD_THROW(AUD_ERROR_FILE);
|
||||
|
||||
m_specs.channels = (AUD_Channels) sfinfo.channels;
|
||||
m_specs.format = SNDFILE_TO_AUD(sfinfo.format);
|
||||
m_specs.rate = (AUD_SampleRate) sfinfo.samplerate;
|
||||
m_length = sfinfo.frames;
|
||||
m_seekable = sfinfo.seekable;
|
||||
m_position = 0;
|
||||
|
||||
switch(m_specs.format)
|
||||
{
|
||||
case AUD_FORMAT_S16:
|
||||
m_read = (sf_read_f) sf_readf_short;
|
||||
break;
|
||||
case AUD_FORMAT_S32:
|
||||
m_read = (sf_read_f) sf_readf_int;
|
||||
break;
|
||||
case AUD_FORMAT_FLOAT64:
|
||||
m_read = (sf_read_f) sf_readf_double;
|
||||
break;
|
||||
default:
|
||||
m_read = (sf_read_f) sf_readf_float;
|
||||
}
|
||||
|
||||
m_buffer = new AUD_Buffer(); AUD_NEW("buffer")
|
||||
}
|
||||
|
||||
AUD_SndFileReader::AUD_SndFileReader(AUD_Reference<AUD_Buffer> buffer)
|
||||
{
|
||||
m_membuffer = buffer;
|
||||
m_memoffset = 0;
|
||||
|
||||
m_vio.get_filelen = vio_get_filelen;
|
||||
m_vio.read = vio_read;
|
||||
m_vio.seek = vio_seek;
|
||||
m_vio.tell = vio_tell;
|
||||
m_vio.write = NULL;
|
||||
|
||||
SF_INFO sfinfo;
|
||||
|
||||
sfinfo.format = 0;
|
||||
m_sndfile = sf_open_virtual(&m_vio, SFM_READ, &sfinfo, this);
|
||||
|
||||
if(!m_sndfile)
|
||||
AUD_THROW(AUD_ERROR_FILE);
|
||||
|
||||
m_specs.channels = (AUD_Channels) sfinfo.channels;
|
||||
m_specs.format = SNDFILE_TO_AUD(sfinfo.format);
|
||||
m_specs.rate = (AUD_SampleRate) sfinfo.samplerate;
|
||||
m_length = sfinfo.frames;
|
||||
m_seekable = sfinfo.seekable;
|
||||
m_position = 0;
|
||||
|
||||
switch(m_specs.format)
|
||||
{
|
||||
case AUD_FORMAT_S16:
|
||||
m_read = (sf_read_f) sf_readf_short;
|
||||
break;
|
||||
case AUD_FORMAT_S32:
|
||||
m_read = (sf_read_f) sf_readf_int;
|
||||
break;
|
||||
case AUD_FORMAT_FLOAT64:
|
||||
m_read = (sf_read_f) sf_readf_double;
|
||||
break;
|
||||
default:
|
||||
m_read = (sf_read_f) sf_readf_float;
|
||||
}
|
||||
|
||||
m_buffer = new AUD_Buffer(); AUD_NEW("buffer")
|
||||
}
|
||||
|
||||
AUD_SndFileReader::~AUD_SndFileReader()
|
||||
{
|
||||
sf_close(m_sndfile);
|
||||
|
||||
delete m_buffer; AUD_DELETE("buffer")
|
||||
}
|
||||
|
||||
bool AUD_SndFileReader::isSeekable()
|
||||
{
|
||||
return m_seekable;
|
||||
}
|
||||
|
||||
void AUD_SndFileReader::seek(int position)
|
||||
{
|
||||
if(m_seekable)
|
||||
{
|
||||
position = sf_seek(m_sndfile, position, SEEK_SET);
|
||||
m_position = position;
|
||||
}
|
||||
}
|
||||
|
||||
int AUD_SndFileReader::getLength()
|
||||
{
|
||||
return m_length;
|
||||
}
|
||||
|
||||
int AUD_SndFileReader::getPosition()
|
||||
{
|
||||
return m_position;
|
||||
}
|
||||
|
||||
AUD_Specs AUD_SndFileReader::getSpecs()
|
||||
{
|
||||
return m_specs;
|
||||
}
|
||||
|
||||
AUD_ReaderType AUD_SndFileReader::getType()
|
||||
{
|
||||
return AUD_TYPE_STREAM;
|
||||
}
|
||||
|
||||
bool AUD_SndFileReader::notify(AUD_Message &message)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void AUD_SndFileReader::read(int & length, sample_t* & buffer)
|
||||
{
|
||||
int sample_size = AUD_SAMPLE_SIZE(m_specs);
|
||||
|
||||
// resize output buffer if necessary
|
||||
if(m_buffer->getSize() < length*sample_size)
|
||||
m_buffer->resize(length*sample_size);
|
||||
|
||||
buffer = m_buffer->getBuffer();
|
||||
|
||||
length = m_read(m_sndfile, buffer, length);
|
||||
|
||||
m_position += length;
|
||||
}
|
@@ -1,131 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* ***** BEGIN LGPL LICENSE BLOCK *****
|
||||
*
|
||||
* Copyright 2009 Jörg Hermann Müller
|
||||
*
|
||||
* This file is part of AudaSpace.
|
||||
*
|
||||
* AudaSpace is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* AudaSpace is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ***** END LGPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef AUD_SNDFILEREADER
|
||||
#define AUD_SNDFILEREADER
|
||||
|
||||
#include "AUD_IReader.h"
|
||||
#include "AUD_Reference.h"
|
||||
class AUD_Buffer;
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
typedef sf_count_t (*sf_read_f)(SNDFILE *sndfile, void *ptr, sf_count_t frames);
|
||||
|
||||
/**
|
||||
* This class reads a sound file via libsndfile.
|
||||
*/
|
||||
class AUD_SndFileReader : public AUD_IReader
|
||||
{
|
||||
private:
|
||||
/**
|
||||
* The current position in samples.
|
||||
*/
|
||||
int m_position;
|
||||
|
||||
/**
|
||||
* The sample count in the file.
|
||||
*/
|
||||
int m_length;
|
||||
|
||||
/**
|
||||
* Whether the file is seekable.
|
||||
*/
|
||||
bool m_seekable;
|
||||
|
||||
/**
|
||||
* The specification of the audio data.
|
||||
*/
|
||||
AUD_Specs m_specs;
|
||||
|
||||
/**
|
||||
* The playback buffer.
|
||||
*/
|
||||
AUD_Buffer* m_buffer;
|
||||
|
||||
/**
|
||||
* The sndfile.
|
||||
*/
|
||||
SNDFILE* m_sndfile;
|
||||
|
||||
/**
|
||||
* The reading function.
|
||||
*/
|
||||
sf_read_f m_read;
|
||||
|
||||
/**
|
||||
* The virtual IO structure for memory file reading.
|
||||
*/
|
||||
SF_VIRTUAL_IO m_vio;
|
||||
|
||||
/**
|
||||
* The pointer to the memory file.
|
||||
*/
|
||||
AUD_Reference<AUD_Buffer> m_membuffer;
|
||||
|
||||
/**
|
||||
* The current reading pointer of the memory file.
|
||||
*/
|
||||
int m_memoffset;
|
||||
|
||||
// Functions for libsndfile virtual IO functionality
|
||||
static sf_count_t vio_get_filelen(void *user_data);
|
||||
static sf_count_t vio_seek(sf_count_t offset, int whence, void *user_data);
|
||||
static sf_count_t vio_read(void *ptr, sf_count_t count, void *user_data);
|
||||
static sf_count_t vio_tell(void *user_data);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Creates a new reader.
|
||||
* \param filename The path to the file to be read.
|
||||
* \exception AUD_Exception Thrown if the file specified does not exist or
|
||||
* cannot be read with libsndfile.
|
||||
*/
|
||||
AUD_SndFileReader(const char* filename);
|
||||
|
||||
/**
|
||||
* Creates a new reader.
|
||||
* \param buffer The buffer to read from.
|
||||
* \exception AUD_Exception Thrown if the buffer specified cannot be read
|
||||
* with libsndfile.
|
||||
*/
|
||||
AUD_SndFileReader(AUD_Reference<AUD_Buffer> buffer);
|
||||
|
||||
/**
|
||||
* Destroys the reader and closes the file.
|
||||
*/
|
||||
virtual ~AUD_SndFileReader();
|
||||
|
||||
virtual bool isSeekable();
|
||||
virtual void seek(int position);
|
||||
virtual int getLength();
|
||||
virtual int getPosition();
|
||||
virtual AUD_Specs getSpecs();
|
||||
virtual AUD_ReaderType getType();
|
||||
virtual bool notify(AUD_Message &message);
|
||||
virtual void read(int & length, sample_t* & buffer);
|
||||
};
|
||||
|
||||
#endif //AUD_SNDFILEREADER
|
@@ -1,40 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
#
|
||||
#
|
||||
|
||||
LIBNAME = aud_sndfile
|
||||
DIR = $(OCGDIR)/intern/audaspace
|
||||
|
||||
include nan_compile.mk
|
||||
|
||||
CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
|
||||
|
||||
CPPFLAGS += -I../intern
|
||||
CPPFLAGS += -I..
|
||||
CPPFLAGS += -I.
|
@@ -30,11 +30,11 @@ FILE(GLOB SRC intern/*.cpp)
|
||||
|
||||
ADD_DEFINITIONS(-DNOGUI -DELBEEM_BLENDER=1)
|
||||
IF(WINDOWS)
|
||||
ADD_DEFINITIONS(-DUSE_MSVC6FIXES)
|
||||
ADD_DEFINITIONS(-DUSE_MSVC6FIXES)
|
||||
ENDIF(WINDOWS)
|
||||
|
||||
IF(WITH_OPENMP)
|
||||
ADD_DEFINITIONS(-DPARALLEL=1)
|
||||
ADD_DEFINITIONS(-DPARALLEL=1)
|
||||
ENDIF(WITH_OPENMP)
|
||||
|
||||
BLENDERLIB_NOLIST(bf_elbeem "${SRC}" "${INC}")
|
||||
|
@@ -29,30 +29,30 @@ SET(INC . ../string)
|
||||
FILE(GLOB SRC intern/*.cpp)
|
||||
|
||||
IF(APPLE)
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
|
||||
ELSE(APPLE)
|
||||
IF(WIN32)
|
||||
SET(INC ${INC} ${WINTAB_INC})
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
|
||||
ELSE(WIN32)
|
||||
SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
|
||||
ENDIF(WIN32)
|
||||
IF(WIN32)
|
||||
SET(INC ${INC} ${WINTAB_INC})
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
|
||||
ELSE(WIN32)
|
||||
SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
|
||||
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(APPLE)
|
||||
|
||||
BLENDERLIB(bf_ghost "${SRC}" "${INC}")
|
||||
|
@@ -29,4 +29,4 @@ else:
|
||||
incs = '. ../string ' + env['BF_OPENGL_INC']
|
||||
if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
|
||||
incs = env['BF_WINTAB_INC'] + ' ' + incs
|
||||
env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['intern','player'], priority = [40,15] )
|
||||
env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['intern'], priority = [40] )
|
||||
|
@@ -289,9 +289,9 @@ GHOST_TSuccess GHOST_System::init()
|
||||
#endif
|
||||
|
||||
#ifdef GHOST_DEBUG
|
||||
m_eventPrinter = new GHOST_EventPrinter();
|
||||
if (m_eventManager) {
|
||||
m_eventPrinter = new GHOST_EventPrinter();
|
||||
//m_eventManager->addConsumer(m_eventPrinter);
|
||||
m_eventManager->addConsumer(m_eventPrinter);
|
||||
}
|
||||
#endif // GHOST_DEBUG
|
||||
|
||||
|
@@ -32,6 +32,6 @@ BLENDERLIB(bf_guardedalloc "${SRC}" "${INC}")
|
||||
|
||||
# Override C++ alloc optional
|
||||
IF(WITH_CXX_GUARDEDALLOC)
|
||||
FILE(GLOB SRC cpp/*.cpp)
|
||||
BLENDERLIB(bf_guardedalloc_cpp "${SRC}" "${INC}")
|
||||
FILE(GLOB SRC cpp/*.cpp)
|
||||
BLENDERLIB(bf_guardedalloc_cpp "${SRC}" "${INC}")
|
||||
ENDIF(WITH_CXX_GUARDEDALLOC)
|
||||
|
@@ -5,4 +5,4 @@ Import('env')
|
||||
sources = env.Glob('intern/*.c')
|
||||
incs = '.'
|
||||
|
||||
env.BlenderLib ('bf_guardedalloc', sources, Split(incs), defines=[], libtype=['intern','player'], priority = [5,150] )
|
||||
env.BlenderLib ('bf_guardedalloc', sources, Split(incs), defines=[], libtype=['intern', 'player'], priority = [5, 175] )
|
||||
|
@@ -5,5 +5,5 @@ sources = env.Glob('intern/*.cpp')
|
||||
|
||||
incs = 'intern ../moto/include ../memutil'
|
||||
|
||||
env.BlenderLib ('bf_IK', sources, Split(incs), [], libtype=['intern','player'], priority=[100,90] )
|
||||
env.BlenderLib ('bf_IK', sources, Split(incs), [], libtype=['intern'], priority=[100] )
|
||||
|
||||
|
@@ -35,9 +35,7 @@
|
||||
|
||||
// conventional functions required by several matrix algorithms
|
||||
|
||||
#ifdef _WIN32
|
||||
#define hypot _hypot
|
||||
#endif
|
||||
|
||||
|
||||
namespace TNT
|
||||
{
|
||||
|
@@ -5,4 +5,4 @@ sources = env.Glob('intern/*.cpp')
|
||||
|
||||
incs = '. ..'
|
||||
|
||||
env.BlenderLib ('bf_memutil', sources, Split(incs), [], libtype=['intern','player'], priority = [0,155] )
|
||||
env.BlenderLib ('bf_memutil', sources, Split(incs), [], libtype=['intern', 'player'], priority = [0, 180] )
|
||||
|
@@ -5,4 +5,4 @@ sources = env.Glob('intern/*.cpp')
|
||||
|
||||
incs = 'include'
|
||||
|
||||
env.BlenderLib ('bf_moto', sources, Split(incs), [], libtype=['intern','player'], priority = [130,95] )
|
||||
env.BlenderLib ('bf_moto', sources, Split(incs), [], libtype=['intern'], priority = [130] )
|
||||
|
@@ -29,12 +29,12 @@ SET(INC ${PNG_INC} ${ZLIB_INC} intern ../../extern/bullet2/src ../memutil ../gua
|
||||
FILE(GLOB SRC intern/*.cpp)
|
||||
|
||||
IF(WITH_OPENMP)
|
||||
ADD_DEFINITIONS(-DPARALLEL=1)
|
||||
ADD_DEFINITIONS(-DPARALLEL=1)
|
||||
ENDIF(WITH_OPENMP)
|
||||
|
||||
IF(WITH_FFTW3)
|
||||
ADD_DEFINITIONS(-DFFTW3=1)
|
||||
SET(INC ${INC} ${FFTW3_INC})
|
||||
ADD_DEFINITIONS(-DFFTW3=1)
|
||||
SET(INC ${INC} ${FFTW3_INC})
|
||||
ENDIF(WITH_FFTW3)
|
||||
|
||||
|
||||
|
13
intern/smoke/extern/smoke_API.h
vendored
13
intern/smoke/extern/smoke_API.h
vendored
@@ -20,7 +20,7 @@
|
||||
* The Original Code is Copyright (C) 2009 by Daniel Genrich
|
||||
* All rights reserved.
|
||||
*
|
||||
* Contributor(s): Daniel Genrich
|
||||
* Contributor(s): None
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
@@ -32,12 +32,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct FLUID_3D;
|
||||
|
||||
// export
|
||||
void smoke_export(struct FLUID_3D *fluid, float *dt, float *dx, float **dens, float **densold, float **heat, float **heatold, float **vx, float **vy, float **vz, float **vxold, float **vyold, float **vzold, unsigned char **obstacles);
|
||||
|
||||
// low res
|
||||
struct FLUID_3D *smoke_init(int *res, float *p0, float dt);
|
||||
void smoke_free(struct FLUID_3D *fluid);
|
||||
|
||||
@@ -69,11 +63,8 @@ void smoke_initWaveletBlenderRNA(struct WTURBULENCE *wt, float *strength);
|
||||
|
||||
void smoke_dissolve_wavelet(struct WTURBULENCE *wt, int speed, int log);
|
||||
|
||||
// export
|
||||
void smoke_turbulence_export(struct WTURBULENCE *wt, float **dens, float **densold, float **tcu, float **tcv, float **tcw);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SMOKE_API_H_ */
|
||||
#endif /* SMOKE_API_H_ */
|
@@ -27,9 +27,9 @@
|
||||
#include <zlib.h>
|
||||
|
||||
// boundary conditions of the fluid domain
|
||||
#define DOMAIN_BC_FRONT 0 // z
|
||||
#define DOMAIN_BC_TOP 1 // y
|
||||
#define DOMAIN_BC_LEFT 1 // x
|
||||
#define DOMAIN_BC_FRONT 1
|
||||
#define DOMAIN_BC_TOP 0
|
||||
#define DOMAIN_BC_LEFT 1
|
||||
#define DOMAIN_BC_BACK DOMAIN_BC_FRONT
|
||||
#define DOMAIN_BC_BOTTOM DOMAIN_BC_TOP
|
||||
#define DOMAIN_BC_RIGHT DOMAIN_BC_LEFT
|
||||
@@ -75,6 +75,8 @@ FLUID_3D::FLUID_3D(int *res, float *p0, float dt) :
|
||||
// allocate arrays
|
||||
_totalCells = _xRes * _yRes * _zRes;
|
||||
_slabSize = _xRes * _yRes;
|
||||
_divergence = new float[_totalCells];
|
||||
_pressure = new float[_totalCells];
|
||||
_xVelocity = new float[_totalCells];
|
||||
_yVelocity = new float[_totalCells];
|
||||
_zVelocity = new float[_totalCells];
|
||||
@@ -84,11 +86,20 @@ FLUID_3D::FLUID_3D(int *res, float *p0, float dt) :
|
||||
_xForce = new float[_totalCells];
|
||||
_yForce = new float[_totalCells];
|
||||
_zForce = new float[_totalCells];
|
||||
_vorticity = new float[_totalCells];
|
||||
_density = new float[_totalCells];
|
||||
_densityOld = new float[_totalCells];
|
||||
_heat = new float[_totalCells];
|
||||
_heatOld = new float[_totalCells];
|
||||
_obstacles = new unsigned char[_totalCells]; // set 0 at end of step
|
||||
_residual = new float[_totalCells];
|
||||
_direction = new float[_totalCells];
|
||||
_q = new float[_totalCells];
|
||||
_obstacles = new unsigned char[_totalCells];
|
||||
_xVorticity = new float[_totalCells];
|
||||
_yVorticity = new float[_totalCells];
|
||||
_zVorticity = new float[_totalCells];
|
||||
_h = new float[_totalCells];
|
||||
_Precond = new float[_totalCells];
|
||||
|
||||
// DG TODO: check if alloc went fine
|
||||
|
||||
@@ -98,6 +109,8 @@ FLUID_3D::FLUID_3D(int *res, float *p0, float dt) :
|
||||
_densityOld[x] = 0.0f;
|
||||
_heat[x] = 0.0f;
|
||||
_heatOld[x] = 0.0f;
|
||||
_divergence[x] = 0.0f;
|
||||
_pressure[x] = 0.0f;
|
||||
_xVelocity[x] = 0.0f;
|
||||
_yVelocity[x] = 0.0f;
|
||||
_zVelocity[x] = 0.0f;
|
||||
@@ -107,50 +120,65 @@ FLUID_3D::FLUID_3D(int *res, float *p0, float dt) :
|
||||
_xForce[x] = 0.0f;
|
||||
_yForce[x] = 0.0f;
|
||||
_zForce[x] = 0.0f;
|
||||
_xVorticity[x] = 0.0f;
|
||||
_yVorticity[x] = 0.0f;
|
||||
_zVorticity[x] = 0.0f;
|
||||
_residual[x] = 0.0f;
|
||||
_q[x] = 0.0f;
|
||||
_direction[x] = 0.0f;
|
||||
_h[x] = 0.0f;
|
||||
_Precond[x] = 0.0f;
|
||||
_obstacles[x] = false;
|
||||
}
|
||||
|
||||
// set side obstacles
|
||||
int index;
|
||||
for (int y = 0; y < _yRes; y++)
|
||||
for (int x = 0; x < _xRes; x++)
|
||||
{
|
||||
// front slab
|
||||
index = x + y * _xRes;
|
||||
if(DOMAIN_BC_FRONT==1) _obstacles[index] = 1;
|
||||
int index;
|
||||
for (int y = 0; y < _yRes; y++) // z
|
||||
for (int x = 0; x < _xRes; x++)
|
||||
{
|
||||
// front slab
|
||||
index = x + y * _xRes;
|
||||
if(DOMAIN_BC_BOTTOM==1) _obstacles[index] = 1;
|
||||
|
||||
// back slab
|
||||
index += _totalCells - _slabSize;
|
||||
if(DOMAIN_BC_BACK==1) _obstacles[index] = 1;
|
||||
}
|
||||
// back slab
|
||||
index += _totalCells - _slabSize;
|
||||
if(DOMAIN_BC_TOP==1) _obstacles[index] = 1;
|
||||
}
|
||||
for (int z = 0; z < _zRes; z++) // y
|
||||
for (int x = 0; x < _xRes; x++)
|
||||
{
|
||||
// bottom slab
|
||||
index = x + z * _slabSize;
|
||||
if(DOMAIN_BC_FRONT==1) _obstacles[index] = 1;
|
||||
|
||||
for (int z = 0; z < _zRes; z++)
|
||||
for (int x = 0; x < _xRes; x++)
|
||||
{
|
||||
// bottom slab
|
||||
index = x + z * _slabSize;
|
||||
if(DOMAIN_BC_BOTTOM==1) _obstacles[index] = 1;
|
||||
// top slab
|
||||
index += _slabSize - _xRes;
|
||||
if(DOMAIN_BC_BACK==1) _obstacles[index] = 1;
|
||||
}
|
||||
for (int z = 0; z < _zRes; z++) // x
|
||||
for (int y = 0; y < _yRes; y++)
|
||||
{
|
||||
// left slab
|
||||
index = y * _xRes + z * _slabSize;
|
||||
if(DOMAIN_BC_LEFT==1) _obstacles[index] = 1;
|
||||
|
||||
// top slab
|
||||
index += _slabSize - _xRes;
|
||||
if(DOMAIN_BC_TOP==1) _obstacles[index] = 1;
|
||||
}
|
||||
// right slab
|
||||
index += _xRes - 1;
|
||||
if(DOMAIN_BC_RIGHT==1) _obstacles[index] = 1;
|
||||
}
|
||||
|
||||
for (int z = 0; z < _zRes; z++)
|
||||
for (int y = 0; y < _yRes; y++)
|
||||
{
|
||||
// left slab
|
||||
index = y * _xRes + z * _slabSize;
|
||||
if(DOMAIN_BC_LEFT==1) _obstacles[index] = 1;
|
||||
|
||||
// right slab
|
||||
index += _xRes - 1;
|
||||
if(DOMAIN_BC_RIGHT==1) _obstacles[index] = 1;
|
||||
}
|
||||
/*
|
||||
SPHERE *obsSphere = NULL;
|
||||
obsSphere = new SPHERE(0.375,0.5,0.375, 0.1); // for 4 to 3 domain
|
||||
addObstacle(obsSphere);
|
||||
delete obsSphere;
|
||||
*/
|
||||
}
|
||||
|
||||
FLUID_3D::~FLUID_3D()
|
||||
{
|
||||
if (_divergence) delete[] _divergence;
|
||||
if (_pressure) delete[] _pressure;
|
||||
if (_xVelocity) delete[] _xVelocity;
|
||||
if (_yVelocity) delete[] _yVelocity;
|
||||
if (_zVelocity) delete[] _zVelocity;
|
||||
@@ -160,14 +188,23 @@ FLUID_3D::~FLUID_3D()
|
||||
if (_xForce) delete[] _xForce;
|
||||
if (_yForce) delete[] _yForce;
|
||||
if (_zForce) delete[] _zForce;
|
||||
if (_residual) delete[] _residual;
|
||||
if (_direction) delete[] _direction;
|
||||
if (_q) delete[] _q;
|
||||
if (_density) delete[] _density;
|
||||
if (_densityOld) delete[] _densityOld;
|
||||
if (_heat) delete[] _heat;
|
||||
if (_heatOld) delete[] _heatOld;
|
||||
if (_xVorticity) delete[] _xVorticity;
|
||||
if (_yVorticity) delete[] _yVorticity;
|
||||
if (_zVorticity) delete[] _zVorticity;
|
||||
if (_vorticity) delete[] _vorticity;
|
||||
if (_h) delete[] _h;
|
||||
if (_Precond) delete[] _Precond;
|
||||
if (_obstacles) delete[] _obstacles;
|
||||
// if (_wTurbulence) delete _wTurbulence;
|
||||
|
||||
// printf("deleted fluid\n");
|
||||
printf("deleted fluid\n");
|
||||
}
|
||||
|
||||
// init direct access functions from blender
|
||||
@@ -186,7 +223,7 @@ void FLUID_3D::step()
|
||||
for (int i = 0; i < _totalCells; i++)
|
||||
{
|
||||
_xForce[i] = _yForce[i] = _zForce[i] = 0.0f;
|
||||
// _obstacles[i] &= ~2;
|
||||
_obstacles[i] &= ~2;
|
||||
}
|
||||
|
||||
wipeBoundaries();
|
||||
@@ -226,9 +263,6 @@ void FLUID_3D::step()
|
||||
*/
|
||||
_totalTime += _dt;
|
||||
_totalSteps++;
|
||||
|
||||
// todo xxx dg: only clear obstacles, not boundaries
|
||||
// memset(_obstacles, 0, sizeof(unsigned char)*_xRes*_yRes*_zRes);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -333,27 +367,20 @@ void FLUID_3D::addForce()
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void FLUID_3D::project()
|
||||
{
|
||||
int x, y, z;
|
||||
size_t index;
|
||||
int index, x, y, z;
|
||||
|
||||
float *_pressure = new float[_totalCells];
|
||||
float *_divergence = new float[_totalCells];
|
||||
|
||||
memset(_pressure, 0, sizeof(float)*_totalCells);
|
||||
memset(_divergence, 0, sizeof(float)*_totalCells);
|
||||
|
||||
setObstacleBoundaries(_pressure);
|
||||
setObstacleBoundaries();
|
||||
|
||||
// copy out the boundaries
|
||||
if(DOMAIN_BC_LEFT == 0) setNeumannX(_xVelocity, _res);
|
||||
else setZeroX(_xVelocity, _res);
|
||||
else setZeroX(_xVelocity, _res);
|
||||
|
||||
if(DOMAIN_BC_TOP == 0) setNeumannY(_yVelocity, _res);
|
||||
else setZeroY(_yVelocity, _res);
|
||||
|
||||
if(DOMAIN_BC_FRONT == 0) setNeumannZ(_zVelocity, _res);
|
||||
if(DOMAIN_BC_TOP == 0) setNeumannZ(_zVelocity, _res);
|
||||
else setZeroZ(_zVelocity, _res);
|
||||
|
||||
if(DOMAIN_BC_FRONT == 0) setNeumannY(_yVelocity, _res);
|
||||
else setZeroY(_yVelocity, _res);
|
||||
|
||||
// calculate divergence
|
||||
index = _slabSize + _xRes + 1;
|
||||
for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes)
|
||||
@@ -387,7 +414,7 @@ void FLUID_3D::project()
|
||||
// solve Poisson equation
|
||||
solvePressurePre(_pressure, _divergence, _obstacles);
|
||||
|
||||
setObstaclePressure(_pressure);
|
||||
setObstaclePressure();
|
||||
|
||||
// project out solution
|
||||
float invDx = 1.0f / _dx;
|
||||
@@ -396,20 +423,13 @@ void FLUID_3D::project()
|
||||
for (y = 1; y < _yRes - 1; y++, index += 2)
|
||||
for (x = 1; x < _xRes - 1; x++, index++)
|
||||
{
|
||||
// if(!_obstacles[index])
|
||||
if(!_obstacles[index])
|
||||
{
|
||||
_xVelocity[index] -= 0.5f * (_pressure[index + 1] - _pressure[index - 1]) * invDx;
|
||||
_yVelocity[index] -= 0.5f * (_pressure[index + _xRes] - _pressure[index - _xRes]) * invDx;
|
||||
_zVelocity[index] -= 0.5f * (_pressure[index + _slabSize] - _pressure[index - _slabSize]) * invDx;
|
||||
}/*
|
||||
else
|
||||
{
|
||||
_xVelocity[index] = _yVelocity[index] = _zVelocity[index] = 0.0f;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
if (_pressure) delete[] _pressure;
|
||||
if (_divergence) delete[] _divergence;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -445,7 +465,7 @@ void FLUID_3D::addObstacle(OBSTACLE* obstacle)
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// calculate the obstacle directional types
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void FLUID_3D::setObstaclePressure(float *_pressure)
|
||||
void FLUID_3D::setObstaclePressure()
|
||||
{
|
||||
// tag remaining obstacle blocks
|
||||
for (int z = 1, index = _slabSize + _xRes + 1;
|
||||
@@ -519,7 +539,7 @@ void FLUID_3D::setObstaclePressure(float *_pressure)
|
||||
}
|
||||
}
|
||||
|
||||
void FLUID_3D::setObstacleBoundaries(float *_pressure)
|
||||
void FLUID_3D::setObstacleBoundaries()
|
||||
{
|
||||
// cull degenerate obstacles , move to addObstacle?
|
||||
for (int z = 1, index = _slabSize + _xRes + 1;
|
||||
@@ -580,18 +600,6 @@ void FLUID_3D::addVorticity()
|
||||
int x,y,z,index;
|
||||
if(_vorticityEps<=0.) return;
|
||||
|
||||
float *_xVorticity, *_yVorticity, *_zVorticity, *_vorticity;
|
||||
|
||||
_xVorticity = new float[_totalCells];
|
||||
_yVorticity = new float[_totalCells];
|
||||
_zVorticity = new float[_totalCells];
|
||||
_vorticity = new float[_totalCells];
|
||||
|
||||
memset(_xVorticity, 0, sizeof(float)*_totalCells);
|
||||
memset(_yVorticity, 0, sizeof(float)*_totalCells);
|
||||
memset(_zVorticity, 0, sizeof(float)*_totalCells);
|
||||
memset(_vorticity, 0, sizeof(float)*_totalCells);
|
||||
|
||||
// calculate vorticity
|
||||
float gridSize = 0.5f / _dx;
|
||||
index = _slabSize + _xRes + 1;
|
||||
@@ -654,11 +662,6 @@ void FLUID_3D::addVorticity()
|
||||
_zForce[index] += (N[0] * _yVorticity[index] - N[1] * _xVorticity[index]) * _dx * eps;
|
||||
}
|
||||
}
|
||||
|
||||
if (_xVorticity) delete[] _xVorticity;
|
||||
if (_yVorticity) delete[] _yVorticity;
|
||||
if (_zVorticity) delete[] _zVorticity;
|
||||
if (_vorticity) delete[] _vorticity;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -669,14 +672,14 @@ void FLUID_3D::advectMacCormack()
|
||||
Vec3Int res = Vec3Int(_xRes,_yRes,_zRes);
|
||||
|
||||
if(DOMAIN_BC_LEFT == 0) copyBorderX(_xVelocity, res);
|
||||
else setZeroX(_xVelocity, res);
|
||||
else setZeroX(_xVelocity, res);
|
||||
|
||||
if(DOMAIN_BC_TOP == 0) copyBorderY(_yVelocity, res);
|
||||
else setZeroY(_yVelocity, res);
|
||||
|
||||
if(DOMAIN_BC_FRONT == 0) copyBorderZ(_zVelocity, res);
|
||||
if(DOMAIN_BC_TOP == 0) copyBorderZ(_zVelocity, res);
|
||||
else setZeroZ(_zVelocity, res);
|
||||
|
||||
if(DOMAIN_BC_FRONT == 0) copyBorderY(_yVelocity, res);
|
||||
else setZeroY(_yVelocity, res);
|
||||
|
||||
SWAP_POINTERS(_xVelocity, _xVelocityOld);
|
||||
SWAP_POINTERS(_yVelocity, _yVelocityOld);
|
||||
SWAP_POINTERS(_zVelocity, _zVelocityOld);
|
||||
@@ -698,14 +701,14 @@ void FLUID_3D::advectMacCormack()
|
||||
advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _zVelocityOld, _zVelocity, t1,t2, res, _obstacles);
|
||||
|
||||
if(DOMAIN_BC_LEFT == 0) copyBorderX(_xVelocity, res);
|
||||
else setZeroX(_xVelocity, res);
|
||||
else setZeroX(_xVelocity, res);
|
||||
|
||||
if(DOMAIN_BC_TOP == 0) copyBorderY(_yVelocity, res);
|
||||
else setZeroY(_yVelocity, res);
|
||||
|
||||
if(DOMAIN_BC_FRONT == 0) copyBorderZ(_zVelocity, res);
|
||||
if(DOMAIN_BC_TOP == 0) copyBorderZ(_zVelocity, res);
|
||||
else setZeroZ(_zVelocity, res);
|
||||
|
||||
if(DOMAIN_BC_FRONT == 0) copyBorderY(_yVelocity, res);
|
||||
else setZeroY(_yVelocity, res);
|
||||
|
||||
setZeroBorder(_density, res);
|
||||
setZeroBorder(_heat, res);
|
||||
|
||||
|
@@ -64,7 +64,7 @@ class FLUID_3D
|
||||
// dimensions
|
||||
int _xRes, _yRes, _zRes, _maxRes;
|
||||
Vec3Int _res;
|
||||
size_t _totalCells;
|
||||
int _totalCells;
|
||||
int _slabSize;
|
||||
float _dx;
|
||||
float _p0[3];
|
||||
@@ -81,6 +81,7 @@ class FLUID_3D
|
||||
float* _densityOld;
|
||||
float* _heat;
|
||||
float* _heatOld;
|
||||
float* _pressure;
|
||||
float* _xVelocity;
|
||||
float* _yVelocity;
|
||||
float* _zVelocity;
|
||||
@@ -90,9 +91,19 @@ class FLUID_3D
|
||||
float* _xForce;
|
||||
float* _yForce;
|
||||
float* _zForce;
|
||||
float* _divergence;
|
||||
float* _xVorticity;
|
||||
float* _yVorticity;
|
||||
float* _zVorticity;
|
||||
float* _vorticity;
|
||||
float* _h;
|
||||
float* _Precond;
|
||||
unsigned char* _obstacles;
|
||||
|
||||
// CG fields
|
||||
float* _residual;
|
||||
float* _direction;
|
||||
float* _q;
|
||||
int _iterations;
|
||||
|
||||
// simulation constants
|
||||
@@ -123,8 +134,8 @@ class FLUID_3D
|
||||
void solveHeat(float* field, float* b, unsigned char* skip);
|
||||
|
||||
// handle obstacle boundaries
|
||||
void setObstacleBoundaries(float *_pressure);
|
||||
void setObstaclePressure(float *_pressure);
|
||||
void setObstacleBoundaries();
|
||||
void setObstaclePressure();
|
||||
|
||||
public:
|
||||
// advection, accessed e.g. by WTURBULENCE class
|
||||
|
@@ -28,17 +28,10 @@ void FLUID_3D::solvePressurePre(float* field, float* b, unsigned char* skip)
|
||||
{
|
||||
int x, y, z;
|
||||
size_t index;
|
||||
float *_q, *_Precond, *_h, *_residual, *_direction;
|
||||
|
||||
// i = 0
|
||||
int i = 0;
|
||||
|
||||
_residual = new float[_totalCells]; // set 0
|
||||
_direction = new float[_totalCells]; // set 0
|
||||
_q = new float[_totalCells]; // set 0
|
||||
_h = new float[_totalCells]; // set 0
|
||||
_Precond = new float[_totalCells]; // set 0
|
||||
|
||||
memset(_residual, 0, sizeof(float)*_xRes*_yRes*_zRes);
|
||||
memset(_q, 0, sizeof(float)*_xRes*_yRes*_zRes);
|
||||
memset(_direction, 0, sizeof(float)*_xRes*_yRes*_zRes);
|
||||
@@ -198,18 +191,11 @@ void FLUID_3D::solvePressurePre(float* field, float* b, unsigned char* skip)
|
||||
i++;
|
||||
}
|
||||
// cout << i << " iterations converged to " << sqrt(maxR) << endl;
|
||||
|
||||
if (_h) delete[] _h;
|
||||
if (_Precond) delete[] _Precond;
|
||||
if (_residual) delete[] _residual;
|
||||
if (_direction) delete[] _direction;
|
||||
if (_q) delete[] _q;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// solve the poisson equation with CG
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
#if 0
|
||||
void FLUID_3D::solvePressure(float* field, float* b, unsigned char* skip)
|
||||
{
|
||||
int x, y, z;
|
||||
@@ -358,7 +344,6 @@ void FLUID_3D::solvePressure(float* field, float* b, unsigned char* skip)
|
||||
}
|
||||
// cout << i << " iterations converged to " << maxR << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// solve the heat equation with CG
|
||||
@@ -368,15 +353,10 @@ void FLUID_3D::solveHeat(float* field, float* b, unsigned char* skip)
|
||||
int x, y, z;
|
||||
size_t index;
|
||||
const float heatConst = _dt * _heatDiffusion / (_dx * _dx);
|
||||
float *_q, *_residual, *_direction;
|
||||
|
||||
// i = 0
|
||||
int i = 0;
|
||||
|
||||
_residual = new float[_totalCells]; // set 0
|
||||
_direction = new float[_totalCells]; // set 0
|
||||
_q = new float[_totalCells]; // set 0
|
||||
|
||||
memset(_residual, 0, sizeof(float)*_xRes*_yRes*_zRes);
|
||||
memset(_q, 0, sizeof(float)*_xRes*_yRes*_zRes);
|
||||
memset(_direction, 0, sizeof(float)*_xRes*_yRes*_zRes);
|
||||
@@ -516,9 +496,5 @@ void FLUID_3D::solveHeat(float* field, float* b, unsigned char* skip)
|
||||
i++;
|
||||
}
|
||||
// cout << i << " iterations converged to " << maxR << endl;
|
||||
|
||||
if (_residual) delete[] _residual;
|
||||
if (_direction) delete[] _direction;
|
||||
if (_q) delete[] _q;
|
||||
}
|
||||
|
||||
|
@@ -80,7 +80,7 @@ void FLUID_3D::addSmokeTestCase(float* field, Vec3Int res, float value)
|
||||
void FLUID_3D::setNeumannX(float* field, Vec3Int res)
|
||||
{
|
||||
const int slabSize = res[0] * res[1];
|
||||
int index;
|
||||
size_t index;
|
||||
for (int z = 0; z < res[2]; z++)
|
||||
for (int y = 0; y < res[1]; y++)
|
||||
{
|
||||
@@ -92,18 +92,6 @@ void FLUID_3D::setNeumannX(float* field, Vec3Int res)
|
||||
index += res[0] - 1;
|
||||
field[index] = field[index - 2];
|
||||
}
|
||||
|
||||
// fix, force top slab to only allow outwards flux
|
||||
for (int y = 0; y < res[1]; y++)
|
||||
for (int z = 0; z < res[2]; z++)
|
||||
{
|
||||
// top slab
|
||||
int index = y * res[0] + z * slabSize;
|
||||
index += res[0] - 1;
|
||||
if(field[index]<0.) field[index] = 0.;
|
||||
index -= 1;
|
||||
if(field[index]<0.) field[index] = 0.;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -112,31 +100,18 @@ void FLUID_3D::setNeumannX(float* field, Vec3Int res)
|
||||
void FLUID_3D::setNeumannY(float* field, Vec3Int res)
|
||||
{
|
||||
const int slabSize = res[0] * res[1];
|
||||
int index;
|
||||
size_t index;
|
||||
for (int z = 0; z < res[2]; z++)
|
||||
for (int x = 0; x < res[0]; x++)
|
||||
{
|
||||
// bottom slab
|
||||
// front slab
|
||||
index = x + z * slabSize;
|
||||
field[index] = field[index + 2 * res[0]];
|
||||
|
||||
// top slab
|
||||
// back slab
|
||||
index += slabSize - res[0];
|
||||
field[index] = field[index - 2 * res[0]];
|
||||
}
|
||||
|
||||
// fix, force top slab to only allow outwards flux
|
||||
for (int z = 0; z < res[2]; z++)
|
||||
for (int x = 0; x < res[0]; x++)
|
||||
{
|
||||
// top slab
|
||||
int index = x + z * slabSize;
|
||||
index += slabSize - res[0];
|
||||
if(field[index]<0.) field[index] = 0.;
|
||||
index -= res[0];
|
||||
if(field[index]<0.) field[index] = 0.;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -146,15 +121,15 @@ void FLUID_3D::setNeumannZ(float* field, Vec3Int res)
|
||||
{
|
||||
const int slabSize = res[0] * res[1];
|
||||
const int totalCells = res[0] * res[1] * res[2];
|
||||
int index;
|
||||
size_t index;
|
||||
for (int y = 0; y < res[1]; y++)
|
||||
for (int x = 0; x < res[0]; x++)
|
||||
{
|
||||
// front slab
|
||||
// bottom slab
|
||||
index = x + y * res[0];
|
||||
field[index] = field[index + 2 * slabSize];
|
||||
|
||||
// back slab
|
||||
// top slab
|
||||
index += totalCells - slabSize;
|
||||
field[index] = field[index - 2 * slabSize];
|
||||
}
|
||||
@@ -164,11 +139,11 @@ void FLUID_3D::setNeumannZ(float* field, Vec3Int res)
|
||||
for (int x = 0; x < res[0]; x++)
|
||||
{
|
||||
// top slab
|
||||
int index = x + y * res[0];
|
||||
index = x + y * res[0];
|
||||
index += totalCells - slabSize;
|
||||
if(field[index]<0.) field[index] = 0.;
|
||||
if(field[index]<0.) field[index] = 0.0f;
|
||||
index -= slabSize;
|
||||
if(field[index]<0.) field[index] = 0.;
|
||||
if(field[index]<0.) field[index] = 0.0f;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -256,14 +231,13 @@ void FLUID_3D::copyBorderX(float* field, Vec3Int res)
|
||||
void FLUID_3D::copyBorderY(float* field, Vec3Int res)
|
||||
{
|
||||
const int slabSize = res[0] * res[1];
|
||||
const int totalCells = res[0] * res[1] * res[2];
|
||||
int index;
|
||||
for (int z = 0; z < res[2]; z++)
|
||||
for (int x = 0; x < res[0]; x++)
|
||||
{
|
||||
// bottom slab
|
||||
index = x + z * slabSize;
|
||||
field[index] = field[index + res[0]];
|
||||
field[index] = field[index + res[0]];
|
||||
// top slab
|
||||
index += slabSize - res[0];
|
||||
field[index] = field[index - res[0]];
|
||||
@@ -279,7 +253,7 @@ void FLUID_3D::copyBorderZ(float* field, Vec3Int res)
|
||||
{
|
||||
// front slab
|
||||
index = x + y * res[0];
|
||||
field[index] = field[index + slabSize];
|
||||
field[index] = field[index + slabSize];
|
||||
// back slab
|
||||
index += totalCells - slabSize;
|
||||
field[index] = field[index - slabSize];
|
||||
@@ -295,21 +269,18 @@ void FLUID_3D::advectFieldSemiLagrange(const float dt, const float* velx, const
|
||||
const int xres = res[0];
|
||||
const int yres = res[1];
|
||||
const int zres = res[2];
|
||||
static int hits = 0;
|
||||
static int total = 0;
|
||||
const int slabSize = res[0] * res[1];
|
||||
|
||||
// scale dt up to grid resolution
|
||||
#if PARALLEL==1 && !_WIN32
|
||||
#pragma omp parallel
|
||||
#pragma omp for schedule(static)
|
||||
#if PARALLEL==1
|
||||
#pragma omp parallel for schedule(static)
|
||||
#endif
|
||||
for (int z = 0; z < zres; z++)
|
||||
for (int y = 0; y < yres; y++)
|
||||
for (int x = 0; x < xres; x++)
|
||||
{
|
||||
const int index = x + y * xres + z * xres*yres;
|
||||
|
||||
|
||||
// backtrace
|
||||
float xTrace = x - dt * velx[index];
|
||||
float yTrace = y - dt * vely[index];
|
||||
@@ -366,8 +337,8 @@ void FLUID_3D::advectFieldSemiLagrange(const float dt, const float* velx, const
|
||||
//
|
||||
// comments are the pseudocode from selle's paper
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity,
|
||||
float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const unsigned char* obstacles)
|
||||
void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity,
|
||||
float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const unsigned char* obstacles)
|
||||
{
|
||||
float* phiHatN = temp1;
|
||||
float* phiHatN1 = temp2;
|
||||
@@ -388,7 +359,7 @@ void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, con
|
||||
advectFieldSemiLagrange( -1.0*dt, xVelocity, yVelocity, zVelocity, phiHatN1, phiHatN, res);
|
||||
|
||||
// phiN1 = phiHatN1 + (phiN - phiHatN) / 2
|
||||
const int border = 0;
|
||||
const int border = 0;
|
||||
for (int z = border; z < sz-border; z++)
|
||||
for (int y = border; y < sy-border; y++)
|
||||
for (int x = border; x < sx-border; x++) {
|
||||
@@ -405,7 +376,7 @@ void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, con
|
||||
|
||||
// if the error estimate was bad, revert to first order
|
||||
clampOutsideRays(dt, xVelocity, yVelocity, zVelocity, oldField, newField, res, obstacles, phiHatN1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -483,18 +454,17 @@ void FLUID_3D::clampExtrema(const float dt, const float* velx, const float* vely
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Reverts any backtraces that go into boundaries back to first
|
||||
// Reverts any backtraces that go into boundaries back to first
|
||||
// order -- in this case the error correction term was totally
|
||||
// incorrect
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float* vely, const float* velz,
|
||||
float* oldField, float* newField, Vec3Int res, const unsigned char* obstacles, const float *oldAdvection)
|
||||
void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float* vely, const float* velz,
|
||||
float* oldField, float* newField, Vec3Int res, const unsigned char* obstacles, const float *oldAdvection)
|
||||
{
|
||||
const int sx= res[0];
|
||||
const int sy= res[1];
|
||||
const int sz= res[2];
|
||||
const int slabSize = res[0] * res[1];
|
||||
|
||||
for (int z = 1; z < sz-1; z++)
|
||||
for (int y = 1; y < sy-1; y++)
|
||||
for (int x = 1; x < sx-1; x++)
|
||||
@@ -509,7 +479,7 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
|
||||
float zTrace = z - dt * velz[index];
|
||||
|
||||
// see if it goes outside the boundaries
|
||||
bool hasObstacle =
|
||||
bool hasObstacle =
|
||||
(zTrace < 1.0f) || (zTrace > sz - 2.0f) ||
|
||||
(yTrace < 1.0f) || (yTrace > sy - 2.0f) ||
|
||||
(xTrace < 1.0f) || (xTrace > sx - 2.0f) ||
|
||||
@@ -545,7 +515,7 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
|
||||
int z0 = (int)zBackward;
|
||||
int z1 = z0 + 1;
|
||||
if(obstacles && !hasObstacle) {
|
||||
hasObstacle = hasObstacle ||
|
||||
hasObstacle = hasObstacle ||
|
||||
obstacles[x0 + y0 * sx + z0*slabSize] ||
|
||||
obstacles[x0 + y1 * sx + z0*slabSize] ||
|
||||
obstacles[x1 + y0 * sx + z0*slabSize] ||
|
||||
@@ -565,7 +535,7 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
|
||||
z0 = (int)zTrace;
|
||||
z1 = z0 + 1;
|
||||
if(obstacles && !hasObstacle) {
|
||||
hasObstacle = hasObstacle ||
|
||||
hasObstacle = hasObstacle ||
|
||||
obstacles[x0 + y0 * sx + z0*slabSize] ||
|
||||
obstacles[x0 + y1 * sx + z0*slabSize] ||
|
||||
obstacles[x1 + y0 * sx + z0*slabSize] ||
|
||||
@@ -607,8 +577,84 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
|
||||
u1 * (s0 * (t0 * oldField[i001] +
|
||||
t1 * oldField[i011]) +
|
||||
s1 * (t0 * oldField[i101] +
|
||||
t1 * oldField[i111]));
|
||||
t1 * oldField[i111]));
|
||||
}
|
||||
} // xyz
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// image output
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
void FLUID_3D::writeImageSliceXY(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale) {
|
||||
writeProjectedIntern(field, res, 0,1, prefix, picCnt, scale);
|
||||
}
|
||||
void FLUID_3D::writeImageSliceYZ(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale) {
|
||||
writeProjectedIntern(field, res, 1,2, prefix, picCnt, scale);
|
||||
}
|
||||
void FLUID_3D::writeImageSliceXZ(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale) {
|
||||
writeProjectedIntern(field, res, 0,2, prefix, picCnt, scale);
|
||||
}
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Helper function for projecting densities along a dimension
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
static int getOtherDir(int dir1, int dir2) {
|
||||
switch(dir1) {
|
||||
case 0:
|
||||
switch(dir2) {
|
||||
case 1: return 2;
|
||||
case 2: return 1; }
|
||||
break;
|
||||
case 1:
|
||||
switch(dir2) {
|
||||
case 0: return 2;
|
||||
case 2: return 0; }
|
||||
break;
|
||||
case 2:
|
||||
switch(dir2) {
|
||||
case 0: return 1;
|
||||
case 1: return 0; }
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// average densities along third spatial direction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
void FLUID_3D::writeProjectedIntern(const float *field, Vec3Int res,
|
||||
int dir1, int dir2, string prefix, int picCnt, float scale) {
|
||||
const int nitems = res[dir1]*res[dir2];
|
||||
const int otherDir = getOtherDir(dir1,dir2);
|
||||
float *buf = new float[nitems];
|
||||
Vec3Int min = Vec3Int(0);
|
||||
Vec3Int max = res;
|
||||
|
||||
min[otherDir] = 0;
|
||||
max[otherDir] = res[otherDir];
|
||||
float div = 1./(float)MIN3V(res); // normalize for shorter sides, old: res[otherDir];
|
||||
div *= 4.; //slightly increase contrast
|
||||
for(int i=0; i<nitems; i++) buf[i] = 0.;
|
||||
|
||||
Vec3Int cnt = 0;
|
||||
for (cnt[2] = min[2]; cnt[2] < max[2]; cnt[2]++) {
|
||||
for (cnt[1] = min[1]; cnt[1] < max[1]; cnt[1]++)
|
||||
for (cnt[0] = min[0]; cnt[0] < max[0]; cnt[0]++)
|
||||
{
|
||||
const int index = cnt[0] + cnt[1] * res[0] + cnt[2] * res[0]*res[1];
|
||||
const int bufindex = cnt[dir1] + cnt[dir2] * res[dir1];
|
||||
buf[bufindex] += field[index] * scale *div;
|
||||
}
|
||||
}
|
||||
// IMAGE::dumpNumberedPNG(picCnt, prefix, buf, res[dir1], res[dir2]);
|
||||
delete[] buf;
|
||||
}
|
||||
*/
|
||||
|
||||
|
@@ -81,9 +81,25 @@ WTURBULENCE::WTURBULENCE(int xResSm, int yResSm, int zResSm, int amplify, int no
|
||||
_densityBig = new float[_totalCellsBig];
|
||||
_densityBigOld = new float[_totalCellsBig];
|
||||
|
||||
// allocate high resolution velocity field. Note that this is only
|
||||
// necessary because we use MacCormack advection. For semi-Lagrangian
|
||||
// advection, these arrays are not necessary.
|
||||
_tempBig1 = _tempBig2 =
|
||||
_bigUx = _bigUy = _bigUz = NULL;
|
||||
_tempBig1 = new float[_totalCellsBig];
|
||||
_tempBig2 = new float[_totalCellsBig];
|
||||
_bigUx = new float[_totalCellsBig];
|
||||
_bigUy = new float[_totalCellsBig];
|
||||
_bigUz = new float[_totalCellsBig];
|
||||
|
||||
for(int i = 0; i < _totalCellsBig; i++) {
|
||||
_densityBig[i] =
|
||||
_densityBigOld[i] = 0.;
|
||||
_densityBigOld[i] =
|
||||
_bigUx[i] =
|
||||
_bigUy[i] =
|
||||
_bigUz[i] =
|
||||
_tempBig1[i] =
|
||||
_tempBig2[i] = 0.;
|
||||
}
|
||||
|
||||
// allocate & init texture coordinates
|
||||
@@ -92,6 +108,10 @@ WTURBULENCE::WTURBULENCE(int xResSm, int yResSm, int zResSm, int amplify, int no
|
||||
_tcW = new float[_totalCellsSm];
|
||||
_tcTemp = new float[_totalCellsSm];
|
||||
|
||||
// allocate & init energy terms
|
||||
_energy = new float[_totalCellsSm];
|
||||
_highFreqEnergy = new float[_totalCellsSm];
|
||||
|
||||
// map all
|
||||
const float dx = 1./(float)(_resSm[0]);
|
||||
const float dy = 1./(float)(_resSm[1]);
|
||||
@@ -105,8 +125,15 @@ WTURBULENCE::WTURBULENCE(int xResSm, int yResSm, int zResSm, int amplify, int no
|
||||
_tcV[index] = y*dy;
|
||||
_tcW[index] = z*dz;
|
||||
_tcTemp[index] = 0.;
|
||||
_energy[index] = 0.;
|
||||
}
|
||||
|
||||
// allocate eigenvalue arrays
|
||||
_eigMin = new float[_totalCellsSm];
|
||||
_eigMax = new float[_totalCellsSm];
|
||||
for(int i=0; i < _totalCellsSm; i++)
|
||||
_eigMin[i] = _eigMax[i] = 0.;
|
||||
|
||||
// noise tiles
|
||||
_noiseTile = new float[noiseTileSize * noiseTileSize * noiseTileSize];
|
||||
/*
|
||||
@@ -127,12 +154,23 @@ WTURBULENCE::~WTURBULENCE() {
|
||||
delete[] _densityBig;
|
||||
delete[] _densityBigOld;
|
||||
|
||||
delete[] _bigUx;
|
||||
delete[] _bigUy;
|
||||
delete[] _bigUz;
|
||||
delete[] _tempBig1;
|
||||
delete[] _tempBig2;
|
||||
|
||||
delete[] _tcU;
|
||||
delete[] _tcV;
|
||||
delete[] _tcW;
|
||||
delete[] _tcTemp;
|
||||
|
||||
delete[] _eigMin;
|
||||
delete[] _eigMax;
|
||||
delete[] _noiseTile;
|
||||
|
||||
delete[] _energy;
|
||||
delete[] _highFreqEnergy;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -277,34 +315,34 @@ static float minDz(int x, int y, int z, float* input, Vec3Int res)
|
||||
// handle texture coordinates (advection, reset, eigenvalues),
|
||||
// Beware -- uses big density maccormack as temporary arrays
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void WTURBULENCE::advectTextureCoordinates (float dtOrg, float* xvel, float* yvel, float* zvel, float *tempBig1, float *tempBig2) {
|
||||
void WTURBULENCE::advectTextureCoordinates (float dtOrg, float* xvel, float* yvel, float* zvel) {
|
||||
// advection
|
||||
SWAP_POINTERS(_tcTemp, _tcU);
|
||||
FLUID_3D::copyBorderX(_tcTemp, _resSm);
|
||||
FLUID_3D::copyBorderY(_tcTemp, _resSm);
|
||||
FLUID_3D::copyBorderZ(_tcTemp, _resSm);
|
||||
FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel,
|
||||
_tcTemp, _tcU, tempBig1, tempBig2, _resSm, NULL);
|
||||
_tcTemp, _tcU, _tempBig1, _tempBig2, _resSm, NULL);
|
||||
|
||||
SWAP_POINTERS(_tcTemp, _tcV);
|
||||
FLUID_3D::copyBorderX(_tcTemp, _resSm);
|
||||
FLUID_3D::copyBorderY(_tcTemp, _resSm);
|
||||
FLUID_3D::copyBorderZ(_tcTemp, _resSm);
|
||||
FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel,
|
||||
_tcTemp, _tcV, tempBig1, tempBig2, _resSm, NULL);
|
||||
_tcTemp, _tcV, _tempBig1, _tempBig2, _resSm, NULL);
|
||||
|
||||
SWAP_POINTERS(_tcTemp, _tcW);
|
||||
FLUID_3D::copyBorderX(_tcTemp, _resSm);
|
||||
FLUID_3D::copyBorderY(_tcTemp, _resSm);
|
||||
FLUID_3D::copyBorderZ(_tcTemp, _resSm);
|
||||
FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel,
|
||||
_tcTemp, _tcW, tempBig1, tempBig2, _resSm, NULL);
|
||||
_tcTemp, _tcW, _tempBig1, _tempBig2, _resSm, NULL);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Compute the eigenvalues of the advected texture
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void WTURBULENCE::computeEigenvalues(float *_eigMin, float *_eigMax) {
|
||||
void WTURBULENCE::computeEigenvalues() {
|
||||
// stats
|
||||
float maxeig = -1.;
|
||||
float mineig = 10.;
|
||||
@@ -349,7 +387,7 @@ void WTURBULENCE::computeEigenvalues(float *_eigMin, float *_eigMax) {
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// advect & reset texture coordinates based on eigenvalues
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void WTURBULENCE::resetTextureCoordinates(float *_eigMin, float *_eigMax)
|
||||
void WTURBULENCE::resetTextureCoordinates()
|
||||
{
|
||||
// allowed deformation of the textures
|
||||
const float limit = 2.f;
|
||||
@@ -380,7 +418,7 @@ void WTURBULENCE::resetTextureCoordinates(float *_eigMin, float *_eigMax)
|
||||
// Compute the highest frequency component of the wavelet
|
||||
// decomposition
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void WTURBULENCE::decomposeEnergy(float *_energy, float *_highFreqEnergy)
|
||||
void WTURBULENCE::decomposeEnergy()
|
||||
{
|
||||
// do the decomposition -- the goal here is to have
|
||||
// the energy with the high frequency component stomped out
|
||||
@@ -416,7 +454,7 @@ void WTURBULENCE::decomposeEnergy(float *_energy, float *_highFreqEnergy)
|
||||
// compute velocity from energies and march into obstacles
|
||||
// for wavelet decomposition
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float* zvel, unsigned char *obstacles)
|
||||
void WTURBULENCE::computeEnergy(float* xvel, float* yvel, float* zvel, unsigned char *obstacles)
|
||||
{
|
||||
// compute everywhere
|
||||
for (int x = 0; x < _totalCellsSm; x++)
|
||||
@@ -475,7 +513,7 @@ void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float*
|
||||
}
|
||||
if (valid > 0)
|
||||
{
|
||||
_energy[index] = sum / (float)valid;
|
||||
_energy[index] = sum / valid;
|
||||
obstacles[index] = MARCHED;
|
||||
}
|
||||
}
|
||||
@@ -500,9 +538,9 @@ void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float*
|
||||
Vec3 WTURBULENCE::WVelocity(Vec3 orgPos)
|
||||
{
|
||||
// arbitrarily offset evaluation points
|
||||
const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2.0,0,0);
|
||||
const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2.0,0);
|
||||
const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2.0);
|
||||
const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2,0,0);
|
||||
const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2,0);
|
||||
const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2);
|
||||
|
||||
const float f1y = WNoiseDy(p1, _noiseTile);
|
||||
const float f1z = WNoiseDz(p1, _noiseTile);
|
||||
@@ -526,9 +564,9 @@ Vec3 WTURBULENCE::WVelocity(Vec3 orgPos)
|
||||
Vec3 WTURBULENCE::WVelocityWithJacobian(Vec3 orgPos, float* xUnwarped, float* yUnwarped, float* zUnwarped)
|
||||
{
|
||||
// arbitrarily offset evaluation points
|
||||
const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2.0,0,0);
|
||||
const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2.0,0);
|
||||
const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2.0);
|
||||
const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2,0,0);
|
||||
const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2,0);
|
||||
const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2);
|
||||
|
||||
Vec3 final;
|
||||
final[0] = WNoiseDx(p1, _noiseTile);
|
||||
@@ -559,40 +597,24 @@ Vec3 WTURBULENCE::WVelocityWithJacobian(Vec3 orgPos, float* xUnwarped, float* yU
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// perform an actual noise advection step
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel, float* zvel, unsigned char *obstacles)
|
||||
{
|
||||
// enlarge timestep to match grid
|
||||
const float dt = dtOrg * _amplify;
|
||||
const float invAmp = 1.0f / _amplify;
|
||||
float *tempBig1 = new float[_totalCellsBig];
|
||||
float *tempBig2 = new float[_totalCellsBig];
|
||||
float *bigUx = new float[_totalCellsBig];
|
||||
float *bigUy = new float[_totalCellsBig];
|
||||
float *bigUz = new float[_totalCellsBig];
|
||||
float *_energy = new float[_totalCellsSm];
|
||||
float *highFreqEnergy = new float[_totalCellsSm];
|
||||
float *eigMin = new float[_totalCellsSm];
|
||||
float *eigMax = new float[_totalCellsSm];
|
||||
// enlarge timestep to match grid
|
||||
const float dt = dtOrg * _amplify;
|
||||
const float invAmp = 1.0f / _amplify;
|
||||
|
||||
memset(tempBig1, 0, sizeof(float)*_totalCellsBig);
|
||||
memset(tempBig2, 0, sizeof(float)*_totalCellsBig);
|
||||
memset(highFreqEnergy, 0, sizeof(float)*_totalCellsSm);
|
||||
memset(eigMin, 0, sizeof(float)*_totalCellsSm);
|
||||
memset(eigMax, 0, sizeof(float)*_totalCellsSm);
|
||||
|
||||
// prepare textures
|
||||
advectTextureCoordinates(dtOrg, xvel,yvel,zvel, tempBig1, tempBig2);
|
||||
// prepare textures
|
||||
advectTextureCoordinates(dtOrg, xvel,yvel,zvel);
|
||||
|
||||
// compute eigenvalues of the texture coordinates
|
||||
computeEigenvalues(eigMin, eigMax);
|
||||
computeEigenvalues();
|
||||
|
||||
// do wavelet decomposition of energy
|
||||
computeEnergy(_energy, xvel, yvel, zvel, obstacles);
|
||||
decomposeEnergy(_energy, highFreqEnergy);
|
||||
computeEnergy(xvel, yvel, zvel, obstacles);
|
||||
decomposeEnergy();
|
||||
|
||||
// zero out coefficients inside of the obstacle
|
||||
for (int x = 0; x < _totalCellsSm; x++)
|
||||
@@ -627,7 +649,7 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
|
||||
|
||||
// retrieve wavelet energy at highest frequency
|
||||
float energy = INTERPOLATE::lerp3d(
|
||||
highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm);
|
||||
_highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm);
|
||||
|
||||
// base amplitude for octave 0
|
||||
float coefficient = sqrtf(2.0f * fabs(energy));
|
||||
@@ -636,8 +658,8 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
|
||||
// add noise to velocity, but only if the turbulence is
|
||||
// sufficiently undeformed, and the energy is large enough
|
||||
// to make a difference
|
||||
const bool addNoise = eigMax[indexSmall] < 2. &&
|
||||
eigMin[indexSmall] > 0.5;
|
||||
const bool addNoise = _eigMax[indexSmall] < 2. &&
|
||||
_eigMin[indexSmall] > 0.5;
|
||||
if (addNoise && amplitude > _cullingThreshold) {
|
||||
// base amplitude for octave 0
|
||||
float amplitudeScaled = amplitude;
|
||||
@@ -659,21 +681,21 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
|
||||
// If you wanted to save memory, you would instead perform a
|
||||
// semi-Lagrangian backtrace for the current grid cell here. Then
|
||||
// you could just throw the velocity away.
|
||||
bigUx[index] = vel[0];
|
||||
bigUy[index] = vel[1];
|
||||
bigUz[index] = vel[2];
|
||||
_bigUx[index] = vel[0];
|
||||
_bigUy[index] = vel[1];
|
||||
_bigUz[index] = vel[2];
|
||||
|
||||
// compute the velocity magnitude for substepping later
|
||||
const float velMag = bigUx[index] * bigUx[index] +
|
||||
bigUy[index] * bigUy[index] +
|
||||
bigUz[index] * bigUz[index];
|
||||
const float velMag = _bigUx[index] * _bigUx[index] +
|
||||
_bigUy[index] * _bigUy[index] +
|
||||
_bigUz[index] * _bigUz[index];
|
||||
if (velMag > maxVelocity) maxVelocity = velMag;
|
||||
|
||||
// zero out velocity inside obstacles
|
||||
float obsCheck = INTERPOLATE::lerp3dToFloat(
|
||||
obstacles, posSm[0], posSm[1], posSm[2], _xResSm, _yResSm, _zResSm);
|
||||
if (obsCheck > 0.95)
|
||||
bigUx[index] = bigUy[index] = bigUz[index] = 0.;
|
||||
_bigUx[index] = _bigUy[index] = _bigUz[index] = 0.;
|
||||
}
|
||||
|
||||
// prepare density for an advection
|
||||
@@ -681,23 +703,24 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
|
||||
|
||||
// based on the maximum velocity present, see if we need to substep,
|
||||
// but cap the maximum number of substeps to 5
|
||||
const int maxSubSteps = 5;
|
||||
const int maxSubSteps = 25;
|
||||
const int maxVel = 5;
|
||||
maxVelocity = sqrt(maxVelocity) * dt;
|
||||
int totalSubsteps = (int)(maxVelocity / (float)maxSubSteps);
|
||||
int totalSubsteps = (int)(maxVelocity / (float)maxVel);
|
||||
totalSubsteps = (totalSubsteps < 1) ? 1 : totalSubsteps;
|
||||
totalSubsteps = (totalSubsteps > maxSubSteps) ? maxSubSteps : totalSubsteps;
|
||||
const float dtSubdiv = dt / (float)totalSubsteps;
|
||||
|
||||
// set boundaries of big velocity grid
|
||||
FLUID_3D::setZeroX(bigUx, _resBig);
|
||||
FLUID_3D::setZeroY(bigUy, _resBig);
|
||||
FLUID_3D::setZeroZ(bigUz, _resBig);
|
||||
FLUID_3D::setZeroX(_bigUx, _resBig);
|
||||
FLUID_3D::setZeroY(_bigUy, _resBig);
|
||||
FLUID_3D::setZeroZ(_bigUz, _resBig);
|
||||
|
||||
// do the MacCormack advection, with substepping if necessary
|
||||
for(int substep = 0; substep < totalSubsteps; substep++)
|
||||
{
|
||||
FLUID_3D::advectFieldMacCormack(dtSubdiv, bigUx, bigUy, bigUz,
|
||||
_densityBigOld, _densityBig, tempBig1, tempBig2, _resBig, NULL);
|
||||
FLUID_3D::advectFieldMacCormack(dtSubdiv, _bigUx, _bigUy, _bigUz,
|
||||
_densityBigOld, _densityBig, _tempBig1, _tempBig2, _resBig, NULL);
|
||||
|
||||
if (substep < totalSubsteps - 1)
|
||||
SWAP_POINTERS(_densityBig, _densityBigOld);
|
||||
@@ -709,20 +732,17 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
|
||||
// reset texture coordinates now in preparation for next timestep
|
||||
// Shouldn't do this before generating the noise because then the
|
||||
// eigenvalues stored do not reflect the underlying texture coordinates
|
||||
resetTextureCoordinates(eigMin, eigMax);
|
||||
resetTextureCoordinates();
|
||||
|
||||
delete[] tempBig1;
|
||||
delete[] tempBig2;
|
||||
delete[] bigUx;
|
||||
delete[] bigUy;
|
||||
delete[] bigUz;
|
||||
delete[] _energy;
|
||||
delete[] highFreqEnergy;
|
||||
|
||||
delete[] eigMin;
|
||||
delete[] eigMax;
|
||||
|
||||
|
||||
// output files
|
||||
/*
|
||||
string prefix = string("./amplified.preview/density_bigxy_");
|
||||
FLUID_3D::writeImageSliceXY(_densityBig, _resBig, _resBig[2]/2, prefix, _totalStepsBig, 1.0f);
|
||||
//string df3Prefix = string("./df3/density_big_");
|
||||
//IMAGE::dumpDF3(_totalStepsBig, df3Prefix, _densityBig, _resBig[0],_resBig[1],_resBig[2]);
|
||||
string pbrtPrefix = string("./pbrt/density_big_");
|
||||
IMAGE::dumpPBRT(_totalStepsBig, pbrtPrefix, _densityBig, _resBig[0],_resBig[1],_resBig[2]);
|
||||
*/
|
||||
_totalStepsBig++;
|
||||
}
|
||||
|
||||
@@ -732,42 +752,20 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, float* zvel, unsigned char *obstacles)
|
||||
{
|
||||
// enlarge timestep to match grid
|
||||
const float dt = dtOrg * _amplify;
|
||||
const float invAmp = 1.0f / _amplify;
|
||||
float *tempBig1 = new float[_totalCellsBig];
|
||||
float *tempBig2 = new float[_totalCellsBig];
|
||||
float *bigUx = new float[_totalCellsBig];
|
||||
float *bigUy = new float[_totalCellsBig];
|
||||
float *bigUz = new float[_totalCellsBig];
|
||||
float *_energy = new float[_totalCellsSm];
|
||||
float *highFreqEnergy = new float[_totalCellsSm];
|
||||
float *eigMin = new float[_totalCellsSm];
|
||||
float *eigMax = new float[_totalCellsSm];
|
||||
// enlarge timestep to match grid
|
||||
const float dt = dtOrg * _amplify;
|
||||
const float invAmp = 1.0f / _amplify;
|
||||
|
||||
memset(highFreqEnergy, 0, sizeof(float)*_totalCellsSm);
|
||||
memset(eigMin, 0, sizeof(float)*_totalCellsSm);
|
||||
memset(eigMax, 0, sizeof(float)*_totalCellsSm);
|
||||
// prepare textures
|
||||
advectTextureCoordinates(dtOrg, xvel,yvel,zvel);
|
||||
|
||||
// prepare textures
|
||||
advectTextureCoordinates(dtOrg, xvel,yvel,zvel, tempBig1, tempBig2);
|
||||
// do wavelet decomposition of energy
|
||||
computeEnergy(xvel, yvel, zvel, obstacles);
|
||||
decomposeEnergy();
|
||||
|
||||
// do wavelet decomposition of energy
|
||||
computeEnergy(_energy, xvel, yvel, zvel, obstacles);
|
||||
|
||||
for (int x = 0; x < _totalCellsSm; x++)
|
||||
if (obstacles[x]) _energy[x] = 0.f;
|
||||
|
||||
decomposeEnergy(_energy, highFreqEnergy);
|
||||
|
||||
// zero out coefficients inside of the obstacle
|
||||
for (int x = 0; x < _totalCellsSm; x++)
|
||||
if (obstacles[x]) highFreqEnergy[x] = 0.f;
|
||||
|
||||
Vec3Int ressm(_xResSm, _yResSm, _zResSm);
|
||||
FLUID_3D::setNeumannX(highFreqEnergy, ressm);
|
||||
FLUID_3D::setNeumannY(highFreqEnergy, ressm);
|
||||
FLUID_3D::setNeumannZ(highFreqEnergy, ressm);
|
||||
// zero out coefficients inside of the obstacle
|
||||
for (int x = 0; x < _totalCellsSm; x++)
|
||||
if (obstacles[x]) _energy[x] = 0.f;
|
||||
|
||||
// parallel region setup
|
||||
float maxVelMagThreads[8] = { -1., -1., -1., -1., -1., -1., -1., -1. };
|
||||
@@ -820,8 +818,8 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
|
||||
// compute the eigenvalues while we have the Jacobian available
|
||||
Vec3 eigenvalues = Vec3(1.);
|
||||
computeEigenvalues3x3( &eigenvalues[0], jacobian);
|
||||
eigMax[indexSmall] = MAX3V(eigenvalues);
|
||||
eigMin[indexSmall] = MIN3V(eigenvalues);
|
||||
_eigMax[indexSmall] = MAX3V(eigenvalues);
|
||||
_eigMin[indexSmall] = MIN3V(eigenvalues);
|
||||
}
|
||||
|
||||
// make sure to skip one on the beginning and end
|
||||
@@ -863,7 +861,7 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
|
||||
|
||||
// retrieve wavelet energy at highest frequency
|
||||
float energy = INTERPOLATE::lerp3d(
|
||||
highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm);
|
||||
_highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm);
|
||||
|
||||
// base amplitude for octave 0
|
||||
float coefficient = sqrtf(2.0f * fabs(energy));
|
||||
@@ -872,8 +870,8 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
|
||||
// add noise to velocity, but only if the turbulence is
|
||||
// sufficiently undeformed, and the energy is large enough
|
||||
// to make a difference
|
||||
const bool addNoise = eigMax[indexSmall] < 2. &&
|
||||
eigMin[indexSmall] > 0.5;
|
||||
const bool addNoise = _eigMax[indexSmall] < 2. &&
|
||||
_eigMin[indexSmall] > 0.5;
|
||||
if (addNoise && amplitude > _cullingThreshold) {
|
||||
// base amplitude for octave 0
|
||||
float amplitudeScaled = amplitude;
|
||||
@@ -895,21 +893,21 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
|
||||
// If you wanted to save memory, you would instead perform a
|
||||
// semi-Lagrangian backtrace for the current grid cell here. Then
|
||||
// you could just throw the velocity away.
|
||||
bigUx[index] = vel[0];
|
||||
bigUy[index] = vel[1];
|
||||
bigUz[index] = vel[2];
|
||||
_bigUx[index] = vel[0];
|
||||
_bigUy[index] = vel[1];
|
||||
_bigUz[index] = vel[2];
|
||||
|
||||
// compute the velocity magnitude for substepping later
|
||||
const float velMag = bigUx[index] * bigUx[index] +
|
||||
bigUy[index] * bigUy[index] +
|
||||
bigUz[index] * bigUz[index];
|
||||
const float velMag = _bigUx[index] * _bigUx[index] +
|
||||
_bigUy[index] * _bigUy[index] +
|
||||
_bigUz[index] * _bigUz[index];
|
||||
if (velMag > maxVelMag1) maxVelMag1 = velMag;
|
||||
|
||||
// zero out velocity inside obstacles
|
||||
float obsCheck = INTERPOLATE::lerp3dToFloat(
|
||||
obstacles, posSm[0], posSm[1], posSm[2], _xResSm, _yResSm, _zResSm);
|
||||
if (obsCheck > 0.95)
|
||||
bigUx[index] = bigUy[index] = bigUz[index] = 0.;
|
||||
_bigUx[index] = _bigUy[index] = _bigUz[index] = 0.;
|
||||
} // xyz
|
||||
|
||||
#if PARALLEL==1
|
||||
@@ -943,27 +941,19 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
|
||||
const float dtSubdiv = dt / (float)totalSubsteps;
|
||||
|
||||
// set boundaries of big velocity grid
|
||||
FLUID_3D::setZeroX(bigUx, _resBig);
|
||||
FLUID_3D::setZeroY(bigUy, _resBig);
|
||||
FLUID_3D::setZeroZ(bigUz, _resBig);
|
||||
FLUID_3D::setZeroX(_bigUx, _resBig);
|
||||
FLUID_3D::setZeroY(_bigUy, _resBig);
|
||||
FLUID_3D::setZeroZ(_bigUz, _resBig);
|
||||
|
||||
// do the MacCormack advection, with substepping if necessary
|
||||
for(int substep = 0; substep < totalSubsteps; substep++)
|
||||
{
|
||||
FLUID_3D::advectFieldMacCormack(dtSubdiv, bigUx, bigUy, bigUz,
|
||||
_densityBigOld, _densityBig, tempBig1, tempBig2, _resBig, NULL);
|
||||
FLUID_3D::advectFieldMacCormack(dtSubdiv, _bigUx, _bigUy, _bigUz,
|
||||
_densityBigOld, _densityBig, _tempBig1, _tempBig2, _resBig, NULL);
|
||||
|
||||
if (substep < totalSubsteps - 1)
|
||||
SWAP_POINTERS(_densityBig, _densityBigOld);
|
||||
} // substep
|
||||
|
||||
delete[] tempBig1;
|
||||
delete[] tempBig2;
|
||||
delete[] bigUx;
|
||||
delete[] bigUy;
|
||||
delete[] bigUz;
|
||||
delete[] _energy;
|
||||
delete[] highFreqEnergy;
|
||||
|
||||
// wipe the density borders
|
||||
FLUID_3D::setZeroBorder(_densityBig, _resBig);
|
||||
@@ -971,10 +961,7 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
|
||||
// reset texture coordinates now in preparation for next timestep
|
||||
// Shouldn't do this before generating the noise because then the
|
||||
// eigenvalues stored do not reflect the underlying texture coordinates
|
||||
resetTextureCoordinates(eigMin, eigMax);
|
||||
|
||||
delete[] eigMin;
|
||||
delete[] eigMax;
|
||||
resetTextureCoordinates();
|
||||
|
||||
// output files
|
||||
// string prefix = string("./amplified.preview/density_bigxy_");
|
||||
|
@@ -49,10 +49,10 @@ class WTURBULENCE
|
||||
void stepTurbulenceFull(float dt, float* xvel, float* yvel, float* zvel, unsigned char *obstacles);
|
||||
|
||||
// texcoord functions
|
||||
void advectTextureCoordinates(float dtOrg, float* xvel, float* yvel, float* zvel, float *tempBig1, float *tempBig2);
|
||||
void resetTextureCoordinates(float *_eigMin, float *_eigMax);
|
||||
void advectTextureCoordinates(float dtOrg, float* xvel, float* yvel, float* zvel);
|
||||
void resetTextureCoordinates();
|
||||
|
||||
void computeEnergy(float *energy, float* xvel, float* yvel, float* zvel, unsigned char *obstacles);
|
||||
void computeEnergy(float* xvel, float* yvel, float* zvel, unsigned char *obstacles);
|
||||
|
||||
// evaluate wavelet noise function
|
||||
Vec3 WVelocity(Vec3 p);
|
||||
@@ -63,6 +63,8 @@ class WTURBULENCE
|
||||
inline float* getArrayTcU() { return _tcU; }
|
||||
inline float* getArrayTcV() { return _tcV; }
|
||||
inline float* getArrayTcW() { return _tcW; }
|
||||
inline float* getArrayEigMin() { return _eigMin; }
|
||||
inline float* getArrayEigMax() { return _eigMax; }
|
||||
|
||||
inline Vec3Int getResSm() { return _resSm; } // small resolution
|
||||
inline Vec3Int getResBig() { return _resBig; }
|
||||
@@ -71,7 +73,7 @@ class WTURBULENCE
|
||||
// is accessed on through rna gui
|
||||
float *_strength;
|
||||
|
||||
// protected:
|
||||
protected:
|
||||
// enlargement factor from original velocity field / simulation
|
||||
// _Big = _amplify * _Sm
|
||||
int _amplify;
|
||||
@@ -79,15 +81,15 @@ class WTURBULENCE
|
||||
|
||||
// noise settings
|
||||
float _cullingThreshold;
|
||||
// float _noiseStrength;
|
||||
// float _noiseSizeScale;
|
||||
// bool _uvwAdvection;
|
||||
// bool _uvwReset;
|
||||
// float _noiseTimeanimSpeed;
|
||||
// int _dumpInterval;
|
||||
// nt _noiseControlType;
|
||||
float _noiseStrength;
|
||||
float _noiseSizeScale;
|
||||
bool _uvwAdvection;
|
||||
bool _uvwReset;
|
||||
float _noiseTimeanimSpeed;
|
||||
int _dumpInterval;
|
||||
int _noiseControlType;
|
||||
// debug, scale density for projections output images
|
||||
// float _outputScale;
|
||||
float _outputScale;
|
||||
|
||||
// noise resolution
|
||||
int _xResBig;
|
||||
@@ -109,21 +111,39 @@ class WTURBULENCE
|
||||
float* _densityBig;
|
||||
float* _densityBigOld;
|
||||
|
||||
// big velocity macCormack fields
|
||||
float* _bigUx;
|
||||
float* _bigUy;
|
||||
float* _bigUz;
|
||||
// temp arrays for BFECC and MacCormack - they have more convenient
|
||||
// names in the actual implementations
|
||||
float* _tempBig1;
|
||||
float* _tempBig2;
|
||||
|
||||
// texture coordinates for noise
|
||||
float* _tcU;
|
||||
float* _tcV;
|
||||
float* _tcW;
|
||||
float* _tcTemp;
|
||||
|
||||
float* _eigMin;
|
||||
float* _eigMax;
|
||||
|
||||
// wavelet decomposition of velocity energies
|
||||
float* _energy;
|
||||
|
||||
// noise data
|
||||
float* _noiseTile;
|
||||
//float* _noiseTileExt;
|
||||
|
||||
// step counter
|
||||
int _totalStepsBig;
|
||||
|
||||
// highest frequency component of wavelet decomposition
|
||||
float* _highFreqEnergy;
|
||||
|
||||
void computeEigenvalues(float *_eigMin, float *_eigMax);
|
||||
void decomposeEnergy(float *energy, float *_highFreqEnergy);
|
||||
void computeEigenvalues();
|
||||
void decomposeEnergy();
|
||||
};
|
||||
|
||||
#endif // WTURBULENCE_H
|
||||
|
@@ -20,7 +20,7 @@
|
||||
* The Original Code is Copyright (C) 2009 by Daniel Genrich
|
||||
* All rights reserved.
|
||||
*
|
||||
* Contributor(s): Daniel Genrich
|
||||
* Contributor(s): None
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
@@ -181,36 +181,6 @@ template < class T > inline T ABS( T a ) {
|
||||
return (0 < a) ? a : -a ;
|
||||
}
|
||||
|
||||
extern "C" void smoke_export(FLUID_3D *fluid, float *dt, float *dx, float **dens, float **densold, float **heat, float **heatold, float **vx, float **vy, float **vz, float **vxold, float **vyold, float **vzold, unsigned char **obstacles)
|
||||
{
|
||||
*dens = fluid->_density;
|
||||
*densold = fluid->_densityOld;
|
||||
*heat = fluid->_heat;
|
||||
*heatold = fluid->_heatOld;
|
||||
*vx = fluid->_xVelocity;
|
||||
*vy = fluid->_yVelocity;
|
||||
*vz = fluid->_zVelocity;
|
||||
*vxold = fluid->_xVelocityOld;
|
||||
*vyold = fluid->_yVelocityOld;
|
||||
*vzold = fluid->_zVelocityOld;
|
||||
*obstacles = fluid->_obstacles;
|
||||
dt = &(fluid->_dt);
|
||||
dx = &(fluid->_dx);
|
||||
|
||||
}
|
||||
|
||||
extern "C" void smoke_turbulence_export(WTURBULENCE *wt, float **dens, float **densold, float **tcu, float **tcv, float **tcw)
|
||||
{
|
||||
if(!wt)
|
||||
return;
|
||||
|
||||
*dens = wt->_densityBig;
|
||||
*densold = wt->_densityBigOld;
|
||||
*tcu = wt->_tcU;
|
||||
*tcv = wt->_tcV;
|
||||
*tcw = wt->_tcW;
|
||||
}
|
||||
|
||||
extern "C" float *smoke_get_density(FLUID_3D *fluid)
|
||||
{
|
||||
return fluid->_density;
|
||||
@@ -223,17 +193,17 @@ extern "C" float *smoke_get_heat(FLUID_3D *fluid)
|
||||
|
||||
extern "C" float *smoke_get_velocity_x(FLUID_3D *fluid)
|
||||
{
|
||||
return fluid->_xVelocity;
|
||||
return fluid->_xVorticity;
|
||||
}
|
||||
|
||||
extern "C" float *smoke_get_velocity_y(FLUID_3D *fluid)
|
||||
{
|
||||
return fluid->_yVelocity;
|
||||
return fluid->_yVorticity;
|
||||
}
|
||||
|
||||
extern "C" float *smoke_get_velocity_z(FLUID_3D *fluid)
|
||||
{
|
||||
return fluid->_zVelocity;
|
||||
return fluid->_zVorticity;
|
||||
}
|
||||
|
||||
extern "C" float *smoke_turbulence_get_density(WTURBULENCE *wt)
|
||||
|
@@ -4,9 +4,7 @@
|
||||
/* needed for fabs, sqrt() below */
|
||||
#include <cmath>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define hypot _hypot
|
||||
#endif
|
||||
|
||||
|
||||
namespace TNT
|
||||
{
|
||||
|
@@ -4,4 +4,4 @@ Import ('env')
|
||||
sources = env.Glob('intern/*.cpp')
|
||||
incs = '.'
|
||||
|
||||
env.BlenderLib ('bf_string', sources, Split(incs), [], libtype=['intern','player'], priority = [50,10] )
|
||||
env.BlenderLib ('bf_string', sources, Split(incs), [], libtype=['intern'], priority = [50] )
|
||||
|
@@ -50,13 +50,6 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
#include "MEM_guardedalloc.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define stricmp _stricmp
|
||||
#endif
|
||||
|
||||
class STR_String;
|
||||
|
||||
@@ -198,13 +191,6 @@ protected:
|
||||
char *pData; // -> STR_String data
|
||||
int Len; // Data length
|
||||
int Max; // Space in data buffer
|
||||
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
public:
|
||||
void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "CXX:STR_String"); }
|
||||
void operator delete( void *mem ) { MEM_freeN(mem); }
|
||||
#endif
|
||||
};
|
||||
|
||||
inline STR_String operator+(rcSTR_String lhs, rcSTR_String rhs) { return STR_String(lhs.ReadPtr(), lhs.Length(), rhs.ReadPtr(), rhs.Length()); }
|
||||
|
@@ -334,10 +334,6 @@
|
||||
<Filter
|
||||
Name="internal"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\python\intern\bpy_array.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\python\intern\bpy_interface.c"
|
||||
>
|
||||
|
@@ -10,7 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blender", "blender.vcproj",
|
||||
{C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} = {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}
|
||||
{D1A9312F-4557-4982-A0F4-4D08508235F4} = {D1A9312F-4557-4982-A0F4-4D08508235F4}
|
||||
{884D8731-654C-4C7F-9A75-8F37A305BE1E} = {884D8731-654C-4C7F-9A75-8F37A305BE1E}
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602} = {79D0B232-208C-F208-DA71-79B4AC088602}
|
||||
{E645CC32-4823-463E-82F0-46ADDE664018} = {E645CC32-4823-463E-82F0-46ADDE664018}
|
||||
{7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} = {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}
|
||||
{51FB3D48-2467-4BFA-A321-D848252B437E} = {51FB3D48-2467-4BFA-A321-D848252B437E}
|
||||
@@ -25,7 +24,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blender", "blender.vcproj",
|
||||
{415BFD6E-64CF-422B-AF88-C07F040A7292} = {415BFD6E-64CF-422B-AF88-C07F040A7292}
|
||||
{106AE171-0083-41D6-A949-20DB0E8DC251} = {106AE171-0083-41D6-A949-20DB0E8DC251}
|
||||
{670EC17A-0548-4BBF-A27B-636C7C188139} = {670EC17A-0548-4BBF-A27B-636C7C188139}
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F} = {8BFA4082-773B-D100-BC24-659083BA023F}
|
||||
{4C3AB78A-52CA-4276-A041-39776E52D8C8} = {4C3AB78A-52CA-4276-A041-39776E52D8C8}
|
||||
{6B801390-5F95-4F07-81A7-97FBA046AACC} = {6B801390-5F95-4F07-81A7-97FBA046AACC}
|
||||
{CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} = {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}
|
||||
@@ -86,7 +84,6 @@ EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DNA_makesdna", "makesdna\DNA_makesdna.vcproj", "{E013786A-9575-4F34-81B2-33290357EE87}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{31628053-825D-4C06-8A21-D13883489718} = {31628053-825D-4C06-8A21-D13883489718}
|
||||
{1CC733F1-6AB5-4904-8F63-C08C46B79DD9} = {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXP_expressions", "..\gameengine\expression\EXP_expressions.vcproj", "{EADC3C5A-6C51-4F03-8038-1553E7D7F740}"
|
||||
@@ -223,10 +220,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_glew", "..\..\extern\gl
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_build_install_all", "..\..\extern\make\msvc_9_0\build_install_all.vcproj", "{9C71A793-C177-4CAB-8EC5-923D500B39F8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602} = {79D0B232-208C-F208-DA71-79B4AC088602}
|
||||
{FFD3C64A-30E2-4BC7-BC8F-51818C320400} = {FFD3C64A-30E2-4BC7-BC8F-51818C320400}
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F} = {8BFA4082-773B-D100-BC24-659083BA023F}
|
||||
{BAC615B0-F1AF-418B-8D23-A10FD8870D6A} = {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_boolop", "..\..\intern\boolop\make\msvc_9_0\boolop.vcproj", "{EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}"
|
||||
@@ -248,9 +242,6 @@ EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_elbeem", "..\..\intern\elbeem\make\msvc_9_0\elbeem.vcproj", "{A90C4918-4B21-4277-93BD-AF65F30951D9}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_ghost", "..\..\intern\ghost\make\msvc_9_0\ghost.vcproj", "{76D90B92-ECC7-409C-9F98-A8814B90F3C0}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B789C2F3-279E-4A85-8F0A-7F7AC068E598} = {B789C2F3-279E-4A85-8F0A-7F7AC068E598}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_guardedalloc", "..\..\intern\guardedalloc\make\msvc_9_0\guardedalloc.vcproj", "{1CC733F1-6AB5-4904-8F63-C08C46B79DD9}"
|
||||
EndProject
|
||||
@@ -310,10 +301,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_smoke", "..\..\intern\s
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_audaspace", "..\..\intern\audaspace\make\msvc_9_0\audaspace.vcproj", "{87032FD2-9BA0-6B43-BE33-8902BA8F9172}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_lzma", "..\..\extern\lzma\make\msvc_9_0\lzma.vcproj", "{79D0B232-208C-F208-DA71-79B4AC088602}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_lzo", "..\..\extern\lzo\make\msvc_9_0\lzo.vcproj", "{8BFA4082-773B-D100-BC24-659083BA023F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
3D Plugin Debug|Win32 = 3D Plugin Debug|Win32
|
||||
@@ -1456,46 +1443,6 @@ Global
|
||||
{87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32
|
||||
{87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32
|
||||
{87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Release|Win32.Build.0 = 3DPlugin Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.Blender Release|Win32.Build.0 = Blender Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Debug|Win32.Build.0 = Blender Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32
|
||||
{79D0B232-208C-F208-DA71-79B4AC088602}.Release|Win32.Build.0 = 3D Plugin Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.Blender Release|Win32.Build.0 = Blender Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Debug|Win32.Build.0 = Blender Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32
|
||||
{8BFA4082-773B-D100-BC24-659083BA023F}.Release|Win32.Build.0 = 3D Plugin Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@@ -73,12 +73,12 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386"
|
||||
AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half.lib Iex.lib IlmImf.lib Imath.lib IlmThread.lib avcodec-52.lib avformat-52.lib avutil-50.lib swscale-0.lib avdevice-52.lib libsndfile-1.lib"
|
||||
AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half.lib Iex.lib IlmImf.lib Imath.lib IlmThread.lib avcodec-52.lib avformat-52.lib avutil-50.lib swscale-0.lib avdevice-52.lib"
|
||||
ShowProgress="0"
|
||||
OutputFile="..\..\..\install\msvc_9\blender.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\build\msvc_9\libs\intern;..\..\..\build\msvc_9\libs\extern;..\..\..\lib\windows\ffmpeg\lib;..\..\..\lib\windows\samplerate\lib;..\..\..\lib\windows\sndfile\lib"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\build\msvc_9\libs\intern;..\..\..\build\msvc_9\libs\extern;..\..\..\lib\windows\ffmpeg\lib;..\..\..\lib\windows\samplerate\lib"
|
||||
IgnoreAllDefaultLibraries="false"
|
||||
IgnoreDefaultLibraryNames="msvcprt.lib;glut32.lib;libc.lib;libcd.lib;libcpd.lib;libcp.lib;libcmtd.lib;odbc32.lib;odbccp32.lib"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -107,7 +107,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="ECHO Moving libraries and export definitions...
MOVE /Y ..\..\bin\blender.lib ..\..\..\build\msvc_9\libs
MOVE /Y ..\..\bin\blender.exp ..\..\..\build\msvc_9\libs
ECHO Copying required 3rd party dlls...
XCOPY /Y ..\..\..\lib\windows\python\lib\python31.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\release\zlib.pyd ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\sndfile\lib\*.dll ..\..\..\install\msvc_9
ECHO Copying language folder
IF NOT EXIST ..\..\..\install\msvc_9\.blender MKDIR ..\..\..\install\msvc_9\.blender
XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9\.blender /E
ECHO Copying python scripts
IF NOT EXIST ..\..\..\install\msvc_9\.blender\scripts MKDIR ..\..\..\install\msvc_9\.blender\scripts
XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9\.blender\scripts /E
ECHO Copying python ui scripts
IF NOT EXIST ..\..\bin\.blender\ui MKDIR ..\..\..\install\msvc_9\.blender\ui
XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9\.blender\ui /E
ECHO Copying manuals/text
XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9 /E
ECHO Done
"
|
||||
CommandLine="ECHO Moving libraries and export definitions...
MOVE /Y ..\..\bin\blender.lib ..\..\..\build\msvc_9\libs
MOVE /Y ..\..\bin\blender.exp ..\..\..\build\msvc_9\libs
ECHO Copying required 3rd party dlls...
XCOPY /Y ..\..\..\lib\windows\python\lib\python31.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\release\zlib.pyd ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9
XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9
ECHO Copying language folder
IF NOT EXIST ..\..\..\install\msvc_9\.blender MKDIR ..\..\..\install\msvc_9\.blender
XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9\.blender /E
ECHO Copying python scripts
IF NOT EXIST ..\..\..\install\msvc_9\.blender\scripts MKDIR ..\..\..\install\msvc_9\.blender\scripts
XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9\.blender\scripts /E
ECHO Copying python ui scripts
IF NOT EXIST ..\..\bin\.blender\ui MKDIR ..\..\..\install\msvc_9\.blender\ui
XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9\.blender\ui /E
ECHO Copying manuals/text
XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9 /E
ECHO Done
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -168,12 +168,12 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386
"
|
||||
AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31_d.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half_d.lib Iex_d.lib Imath_d.lib IlmImf_d.lib IlmThread_d.lib avcodec-52.lib avformat-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib libsndfile-1.lib"
|
||||
AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31_d.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half_d.lib Iex_d.lib Imath_d.lib IlmImf_d.lib IlmThread_d.lib avcodec-52.lib avformat-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib"
|
||||
ShowProgress="0"
|
||||
OutputFile="..\..\..\install\msvc_9d\blender.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\lib\windows\ffmpeg\lib;..\..\..\build\msvc_9\libs\intern\debug;..\..\..\build\msvc_9\libs\extern\debug;..\..\..\lib\windows\samplerate\lib;..\..\..\lib\windows\sndfile\lib"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\lib\windows\ffmpeg\lib;..\..\..\build\msvc_9\libs\intern\debug;..\..\..\build\msvc_9\libs\extern\debug;..\..\..\lib\windows\samplerate\lib"
|
||||
IgnoreDefaultLibraryNames="libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, odbc32.lib, odbccp32.lib"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\..\build\msvc_9\libs\debug\blender.pdb"
|
||||
@@ -201,7 +201,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="ECHO Moving libraries and export definitions...
MOVE /Y ..\..\bin\debug\blender.lib ..\..\..\build\msvc_9\libs\debug
MOVE /Y ..\..\bin\debug\blender.exp ..\..\..\build\msvc_9\libs\debug
MOVE /Y ..\..\bin\debug\blender.ilk ..\..\..\build\msvc_9\libs\debug
ECHO Copying required 3rd party dlls...
XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\python\lib\python31_d.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\release\zlib.pyd ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\CRTL\lib\msvcrtd.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\sndfile\lib\*.dll ..\..\..\install\msvc_9d
ECHO Copying language folder
IF NOT EXIST ..\..\..\install\msvc_9d\.blender MKDIR ..\..\..\install\msvc_9d\.blender
XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9d\.blender /E
ECHO Copying python scripts
IF NOT EXIST ..\..\..\install\msvc_9d\.blender\scripts MKDIR ..\..\..\install\msvc_9d\.blender\scripts
XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9d\.blender\scripts /E
ECHO Copying python ui scripts
IF NOT EXIST ..\..\..\install\msvc_9d\.blender\ui MKDIR ..\..\..\install\msvc_9d\.blender\ui
XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9d\.blender\ui /E
ECHO Copying manuals/text
XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9d /E
ECHO Done
"
|
||||
CommandLine="ECHO Moving libraries and export definitions...
MOVE /Y ..\..\bin\debug\blender.lib ..\..\..\build\msvc_9\libs\debug
MOVE /Y ..\..\bin\debug\blender.exp ..\..\..\build\msvc_9\libs\debug
MOVE /Y ..\..\bin\debug\blender.ilk ..\..\..\build\msvc_9\libs\debug
ECHO Copying required 3rd party dlls...
XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\python\lib\python31_d.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9d\python31_d.zip
XCOPY /Y ..\..\..\lib\windows\release\zlib.pyd ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\CRTL\lib\msvcrtd.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9d
XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9d
ECHO Copying language folder
IF NOT EXIST ..\..\..\install\msvc_9d\.blender MKDIR ..\..\..\install\msvc_9d\.blender
XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9d\.blender /E
ECHO Copying python scripts
IF NOT EXIST ..\..\..\install\msvc_9d\.blender\scripts MKDIR ..\..\..\install\msvc_9d\.blender\scripts
XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9d\.blender\scripts /E
ECHO Copying python ui scripts
IF NOT EXIST ..\..\..\install\msvc_9d\.blender\ui MKDIR ..\..\..\install\msvc_9d\.blender\ui
XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9d\.blender\ui /E
ECHO Copying manuals/text
XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9d /E
ECHO Done
"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
|
@@ -43,7 +43,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="_DEBUG,WIN32,_LIB"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -118,7 +118,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_OPENEXR;WITH_DDS;WITH_BULLET;WITH_FFMPEG"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
@@ -193,7 +193,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;UNWRAPPER;WITH_OPENEXR;WITH_DDS;WITH_BULLET=1;WITH_FFMPEG"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
@@ -268,7 +268,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
@@ -343,7 +343,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_FFMPEG"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
@@ -418,7 +418,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
|
||||
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;UNWRAPPER;WITH_FFMPEG"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
@@ -697,10 +697,6 @@
|
||||
RelativePath="..\..\..\source\blender\blenkernel\intern\packedFile.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenkernel\intern\paint.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenkernel\intern\particle.c"
|
||||
>
|
||||
@@ -1022,10 +1018,6 @@
|
||||
RelativePath="..\..\..\source\blender\blenkernel\BKE_packedFile.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenkernel\BKE_paint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenkernel\BKE_particle.h"
|
||||
>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user