1
1

Compare commits

..

50 Commits

Author SHA1 Message Date
c5e2a8fbbd add runtime field to Simulation 2020-04-16 13:04:33 +02:00
401ddff410 get current scene time 2020-04-16 12:44:34 +02:00
5f47593f50 separate simulation eval function 2020-04-16 12:23:52 +02:00
89880e891c initial testing for integration in depsgraph 2020-04-15 18:26:07 +02:00
fd6d8ac791 Add Boolean Math, Switch and Float Compare function nodes
Since those nodes did not exist for shader node trees before,
I implemented them directly as "function nodes". Those could later
be used in shader node trees as well.

Differential Revision: https://developer.blender.org/D7424
2020-04-14 13:47:38 +02:00
ff3d82d7ef Use some shader nodes in the simulation nodes
This makes a subset of the shader nodes available in simulation node trees.
More can be made available in the future, but we might not be able to actually
implement all the nodes before the release.

For now, their name remains `ShaderNode...`. We should rename them to
e.g. `FunctionNode...` and move them to a separate folder in the future.

Differential Revision: https://developer.blender.org/D7422
2020-04-14 12:31:27 +02:00
d26c3e9e75 Core particle nodes (ui only)
Differential Revision: https://developer.blender.org/D7384
2020-04-09 15:00:55 +02:00
b9e1e769fb show name in particle simulation node 2020-04-09 13:04:34 +02:00
26e114efb8 add missing cases for new types in switch statement 2020-04-09 12:38:25 +02:00
c9bdeef488 core particle simulation nodes 2020-04-09 12:34:12 +02:00
827861cfdf Merge branch 'image-and-object-socket-type' into influence-and-control-flow-socket-types 2020-04-09 11:39:05 +02:00
82db1198a5 Merge branch 'embedded_simulation_node_tree' into image-and-object-socket-type 2020-04-09 11:35:24 +02:00
c8bcb7cc2b Merge branch 'simulation-tree-arc' into embedded_simulation_node_tree 2020-04-09 11:32:38 +02:00
9eb90548c5 Merge branch 'simulation-data-block' into simulation-tree-arc 2020-04-09 11:28:42 +02:00
40b269f50b Merge branch 'master' into simulation-data-block 2020-04-09 11:24:11 +02:00
9b3bdce6a6 add missing enum item 2020-04-09 11:23:26 +02:00
b392632b8d add simulation node trees to node tree iterator 2020-04-09 11:23:06 +02:00
ebd8f94050 fix user counting when freeing interface sockets 2020-04-09 11:19:56 +02:00
5c15a74d63 copy object/image pointer in node_socket_copy_default_value 2020-04-09 11:12:16 +02:00
4dc3831a2a bring back a break 2020-04-06 15:22:22 +02:00
5bb1a05d9e handle node tree in lib_query.c 2020-04-06 15:20:25 +02:00
6a447a32fe Add emitters, events, forces and control flow socket types
This is part of T73324.

The shapes and colors of the sockets will most likely change later on.

This script can be used to create a node with the new socket types:
```
import bpy

class MyCustomNode(bpy.types.Node):
    bl_idname = 'CustomNodeType'
    bl_label = "Custom Node"

    def init(self, context):
        self.inputs.new('NodeSocketEmitters', "Emitters")
        self.inputs.new('NodeSocketEvents', "Events")
        self.inputs.new('NodeSocketForces', "Forces")
        self.inputs.new('NodeSocketControlFlow', "Control Flow")

        self.outputs.new('NodeSocketEmitters', "Emitters")
        self.outputs.new('NodeSocketEvents', "Events")
        self.outputs.new('NodeSocketForces', "Forces")
        self.outputs.new('NodeSocketControlFlow', "Control Flow")

bpy.utils.register_class(MyCustomNode)

if len(bpy.data.simulations) == 0:
    bpy.data.simulations.new("Simulation")

sim = bpy.data.simulations[0]
sim.node_tree.nodes.new("CustomNodeType")
```

Differential Revision: https://developer.blender.org/D7349
2020-04-06 13:52:50 +02:00
7dfdb1a8a0 New Object and Image socket types
The main difficulty with adding these types is that they are the first sockets types
that reference ID data in their `default_value`. That means that I had to add some
new logic in a few places to deal with reference counting. I hope I found all the places...
It seems to work fine in my tests.

For now these socket types can only be created using a script like the one below:
```
import bpy

class MyCustomNode(bpy.types.Node):
    bl_idname = 'CustomNodeType'
    bl_label = "Custom Node"

    def init(self, context):
        self.inputs.new('NodeSocketObject', "Object")
        self.inputs.new('NodeSocketImage', "Image")

bpy.utils.register_class(MyCustomNode)

if len(bpy.data.simulations) == 0:
    bpy.data.simulations.new("Simulation")

sim = bpy.data.simulations[0]
sim.node_tree.nodes.new("CustomNodeType")
```

After running the script, go to the simulation editor and select the newly created simulation.

---

We might want to change `readfile.c` so that linked objects/images are only loaded,
when the socket is not connected. Otherwise it can be tricky to figure out why certain
id data blocks are still referenced by the node tree later on.

Differential Revision: https://developer.blender.org/D7347
2020-04-06 13:23:20 +02:00
2b1e84c0de Merge branch 'simulation-tree-arc' into embedded_simulation_node_tree 2020-04-06 12:04:40 +02:00
2cc55bcdc2 fix after merge 2020-04-06 12:01:13 +02:00
ffb3285672 Merge branch 'simulation-data-block' into simulation-tree-arc 2020-04-06 11:55:43 +02:00
69aecad547 Merge branch 'master' into simulation-data-block 2020-04-06 11:51:57 +02:00
3fab8acfd8 Embed simulation node tree in simulation data block
This also shows the node tree in the Simulation Editor.
There is a new operator to add a simulation.

One debatable aspect of this patch is how I integrated the `SpaceNodeEditor.simulation`
property in RNA. I decided to wrap the existing `id` property, because the description
says `Data-block whose nodes are being edited`, which is exactly what is happening here.

Differential Revision: https://developer.blender.org/D7301
2020-04-01 12:17:03 +02:00
78b545f1fe better handling when id has wrong type 2020-04-01 11:44:02 +02:00
cbf3f46ffd better support for building without simulation type 2020-04-01 11:34:13 +02:00
fcc4a68482 show some builtin nodes in menu 2020-04-01 11:31:06 +02:00
b344800177 support adding new simulation from header 2020-04-01 11:27:39 +02:00
bd690a4d57 cleanup simulation property of space 2020-04-01 11:16:24 +02:00
b11de611d0 Merge branch 'simulation-tree-arc' into embedded_simulation_node_tree 2020-04-01 10:56:24 +02:00
6fda1d007f add license headers 2020-04-01 10:52:39 +02:00
8b08366e32 initial node tree embedding and simulation editor 2020-03-31 14:05:58 +02:00
456c7f2f90 Add simulation node tree type
This implements a new builtin node tree type called `SimulationNodeTree`.
It is not yet embedded in the `Simulation` data block.

This is part of T73324.

The `WITH_NEW_SIMULATION_TYPE` cmake option is used to control whether `Simulation Editor` is shown in the editors menu.
Disabling the rna code with this option was a bit tricky, because the node tree type stores a reference to the rna type.
I could do the `#ifdef WITH_NEW_SIMULATION_TYPE` everywhere, but I'm not sure if it is worth the effort.

Currently there is only the group node, which is unusable, because there are no other nodes.
I'll submit those for review separately.

Differential Revision: https://developer.blender.org/D7287
2020-03-31 12:27:41 +02:00
ebecd0aae5 Merge branch 'master' into simulation-data-block 2020-03-31 09:40:01 +02:00
118a9f8589 Replace VO_DS_EXPAND with SIM_DS_EXPAND 2020-03-24 16:30:29 +01:00
fc751901d8 remove unnecessary case in lib_remap.c 2020-03-24 16:29:02 +01:00
bd0f203d39 rename WITH_SIMULATION_DATA_BLOCK_RNA to WITH_NEW_SIMULATION_TYPE 2020-03-24 16:28:16 +01:00
727ed66065 Add new simulation data block
This introduces a new id data block with type `ID_SIM`.

The RNA part of this change is disabled by default for now.
The corresponding cmake option is `WITH_SIMULATION_DATA_BLOCK_RNA`.

The new data block does not yet have an embedded node tree.
I want to add that separately.

This is part of T73324.

The set of files I changed is based on rBb0a1cf2c9ae696.
However, I had to change fewer files, because I did not add a new object type.

Differential Revision: https://developer.blender.org/D7225
2020-03-24 14:59:16 +01:00
7f95682ac6 remove unnecessary todo 2020-03-24 14:37:10 +01:00
0055db5838 cleanup 2020-03-24 14:29:13 +01:00
64854506d1 add back blank line 2020-03-24 14:28:37 +01:00
3e07f2e322 remove unnecessary todo 2020-03-24 14:28:08 +01:00
b58db00ddf remove unnecessary includes 2020-03-24 14:25:58 +01:00
3689b783b7 Merge branch 'master' into simulation-data-block 2020-03-24 14:17:27 +01:00
1f1f1b018e add cmake option for simulation data block 2020-03-24 14:16:10 +01:00
78d0ec3586 initial new Simulation data block 2020-03-24 13:30:37 +01:00
1626 changed files with 34536 additions and 45628 deletions

View File

@@ -256,7 +256,6 @@ ForEachMacros:
- SEQ_BEGIN
- SURFACE_QUAD_ITER_BEGIN
- foreach
- ED_screen_areas_iter
# Use once we bump the minimum version to version 8.
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).

View File

@@ -138,6 +138,11 @@ get_blender_version()
#-----------------------------------------------------------------------------
# Options
# First platform specific non-cached vars
if(UNIX AND NOT (APPLE OR HAIKU))
set(WITH_X11 ON)
endif()
# Blender internal features
option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
mark_as_advanced(WITH_BLENDER)
@@ -202,15 +207,7 @@ mark_as_advanced(WITH_GHOST_DEBUG)
option(WITH_GHOST_SDL "Enable building Blender against SDL for windowing rather than the native APIs" OFF)
mark_as_advanced(WITH_GHOST_SDL)
if(UNIX AND NOT (APPLE OR HAIKU))
option(WITH_GHOST_X11 "Enable building Blender against X11 for windowing" ON)
mark_as_advanced(WITH_GHOST_X11)
option(WITH_GHOST_WAYLAND "Enable building Blender against Wayland for windowing (under development)" OFF)
mark_as_advanced(WITH_GHOST_WAYLAND)
endif()
if(WITH_GHOST_X11)
if(WITH_X11)
option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON)
endif()
@@ -235,7 +232,7 @@ if(UNIX AND NOT APPLE)
mark_as_advanced(WITH_OPENMP_STATIC)
endif()
if(WITH_GHOST_X11)
if(WITH_X11)
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON)
option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON)
@@ -281,7 +278,7 @@ option(WITH_ALEMBIC "Enable Alembic Support" ON)
option(WITH_ALEMBIC_HDF5 "Enable Legacy Alembic Support (not officially supported)" OFF)
# Universal Scene Description support
option(WITH_USD "Enable Universal Scene Description (USD) Support" ON)
option(WITH_USD "Enable Universal Scene Description (USD) Support" OFF)
# 3D format support
# Disable opencollada when we don't have precompiled libs
@@ -436,8 +433,6 @@ endif()
option(WITH_GTESTS "Enable GTest unit testing" OFF)
option(WITH_OPENGL_RENDER_TESTS "Enable OpenGL render related unit testing (Experimental)" OFF)
option(WITH_OPENGL_DRAW_TESTS "Enable OpenGL UI drawing related unit testing (Experimental)" OFF)
set(TEST_PYTHON_EXE "" CACHE PATH "Python executable to run unit tests")
mark_as_advanced(TEST_PYTHON_EXE)
# Documentation
if(UNIX AND NOT APPLE)
@@ -478,8 +473,6 @@ endif()
if(CMAKE_COMPILER_IS_GNUCC)
option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
mark_as_advanced(WITH_LINKER_GOLD)
option(WITH_LINKER_LLD "Use ld.lld linker which is usually faster than ld.gold" OFF)
mark_as_advanced(WITH_LINKER_LLD)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
@@ -543,15 +536,6 @@ if(WIN32)
option(WITH_WINDOWS_BUNDLE_CRT "Bundle the C runtime for install free distribution." ON)
mark_as_advanced(WITH_WINDOWS_BUNDLE_CRT)
option(WITH_WINDOWS_SCCACHE "Use sccache to speed up builds (Ninja builder only)" OFF)
mark_as_advanced(WITH_WINDOWS_SCCACHE)
option(WITH_WINDOWS_PDB "Generate a pdb file for client side stacktraces" ON)
mark_as_advanced(WITH_WINDOWS_PDB)
option(WITH_WINDOWS_STRIPPED_PDB "Use a stripped PDB file" On)
mark_as_advanced(WITH_WINDOWS_STRIPPED_PDB)
endif()
# The following only works with the Ninja generator in CMake >= 3.0.
@@ -628,6 +612,12 @@ if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
endif()
# may as well build python module without a UI
if(WITH_PYTHON_MODULE)
set(WITH_HEADLESS ON)
endif()
if(NOT WITH_PYTHON)
set(WITH_CYCLES OFF)
set(WITH_DRACO OFF)
@@ -692,8 +682,7 @@ if(WITH_INSTALL_PORTABLE)
endif()
if(WITH_GHOST_SDL OR WITH_HEADLESS)
set(WITH_GHOST_WAYLAND OFF)
set(WITH_GHOST_X11 OFF)
set(WITH_X11 OFF)
set(WITH_X11_XINPUT OFF)
set(WITH_X11_XF86VMODE OFF)
set(WITH_X11_XFIXES OFF)
@@ -1733,7 +1722,6 @@ if(FIRST_RUN)
info_cfg_option(WITH_ALEMBIC)
info_cfg_option(WITH_QUADRIFLOW)
info_cfg_option(WITH_USD)
info_cfg_option(WITH_TBB)
info_cfg_text("Compiler Options:")
info_cfg_option(WITH_BUILDINFO)

View File

@@ -71,6 +71,17 @@ Testing Targets
which are tagged to use the stricter formatting
* test_deprecated:
Checks for deprecation tags in our code which may need to be removed
* test_style_c:
Checks C/C++ conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_c_qtc:
Same as test_style but outputs QtCreator tasks format
* test_style_osl:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_osl_qtc:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
Static Source Code Checking
Not associated with building Blender.
@@ -391,6 +402,45 @@ test_cmake: .FORCE
test_deprecated: .FORCE
$(PYTHON) tests/check_deprecated.py
test_style_c: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check
test_style_c_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
test_style_osl: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl"
test_style_osl_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl" \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
# -----------------------------------------------------------------------------
# Project Files

View File

@@ -130,6 +130,7 @@ if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/vpx.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)

View File

@@ -25,8 +25,6 @@ if(UNIX AND NOT APPLE)
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
&& export PREFIX=${BZIP2_PREFIX})
else()
set(BZIP2_CONFIGURE_ENV ${CONFIGURE_ENV})
endif()
ExternalProject_Add(external_bzip2

View File

@@ -0,0 +1,40 @@
# ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FAAD_EXTRA_ARGS)
if(WIN32)
set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
else()
set(FAAD_EXTRA_CONFIGURE echo .)
endif()
ExternalProject_Add(external_faad
URL ${FAAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FAAD_HASH}
PREFIX ${BUILD_DIR}/faad
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${FAAD_EXTRA_CONFIGURE} && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
INSTALL_DIR ${LIBDIR}/faad
)
if(MSVC)
set_target_properties(external_faad PROPERTIES FOLDER Mingw)
endif()

View File

@@ -127,6 +127,7 @@ endif()
add_dependencies(
external_ffmpeg
external_zlib
external_faad
external_openjpeg
external_xvidcore
external_x264

View File

@@ -19,12 +19,8 @@
set(FFTW_EXTRA_ARGS)
if(WIN32)
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
set(FFTW_EXTRA_ARGS --disable-static --enable-shared)
set(FFTW_INSTALL install-strip)
else()
set(FFTW_EXTRA_ARGS --enable-static)
set(FFTW_INSTALL install)
endif()
ExternalProject_Add(external_fftw3
@@ -32,10 +28,10 @@ ExternalProject_Add(external_fftw3
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} ${FFTW_EXTRA_ARGS} --prefix=${mingw_LIBDIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make ${FFTW_INSTALL}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
INSTALL_DIR ${LIBDIR}/fftw3
)
@@ -43,8 +39,7 @@ if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3 after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.dll.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/libfftw3-3.dll ${HARVEST_TARGET}/fftw3/lib/libfftw3-3.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
DEPENDEES install
)

View File

@@ -44,6 +44,10 @@ if(BUILD_MODE STREQUAL Release)
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# sndfile
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&

View File

@@ -18,7 +18,7 @@
if(WIN32)
# cmake for windows
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d -DWITH_CRT_DLL=On)
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}

View File

@@ -52,6 +52,7 @@ if(BUILD_MODE STREQUAL Release)
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
if(WIN32)

View File

@@ -21,7 +21,7 @@ set(OIDN_EXTRA_ARGS
-DWITH_EXAMPLE=OFF
-DWITH_TEST=OFF
-DTBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
-DTBB_STATIC_LIB=ON
-DOIDN_STATIC_LIB=ON
)

View File

@@ -36,7 +36,7 @@ if(WIN32)
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb.lib
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
@@ -67,7 +67,7 @@ endif()
ExternalProject_Add(external_opensubdiv
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENSUBDIV_HASH}
URL_HASH MD5=${OPENSUBDIV_Hash}
PREFIX ${BUILD_DIR}/opensubdiv
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv

View File

@@ -24,7 +24,7 @@ if(WIN32)
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
ExternalProject_Add(external_pthreads
URL ${PTHREADS_URI}
@@ -32,7 +32,6 @@ if(WIN32)
URL_HASH MD5=${PTHREADS_HASH}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&

View File

@@ -60,14 +60,3 @@ if(UNIX)
external_flac
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sndfile after_install
COMMAND lib /def:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.def /machine:x64 /out:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h
DEPENDEES install
)
endif()

View File

@@ -20,10 +20,8 @@ if(WIN32)
-DTBB_BUILD_SHARED=On
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=On
-DTBB_BUILD_STATIC=Off
)
set(TBB_LIBRARY tbb)
set(TBB_STATIC_LIBRARY Off)
-DTBB_BUILD_STATIC=On
)
else()
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=Off
@@ -31,8 +29,6 @@ else()
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
)
set(TBB_LIBRARY tbb_static)
set(TBB_STATIC_LIBRARY On)
endif()
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
@@ -50,8 +46,7 @@ ExternalProject_Add(external_tbb
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.lib
@@ -62,12 +57,7 @@ if(WIN32)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
# findtbb.cmake in some deps *NEEDS* to find tbb.lib even if they are not going to use it
# to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${LIBDIR}/tbb/lib/tbb.lib
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.dll ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc_proxy.dll

View File

@@ -23,8 +23,8 @@ set(USD_EXTRA_ARGS
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
# This is a preventative measure that avoids possible conflicts when add-ons
# try to load another USD library into the same process space.

View File

@@ -20,9 +20,9 @@ set(ZLIB_VERSION 1.2.11)
set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(OPENAL_VERSION 1.20.1)
set(OPENAL_VERSION 1.18.2)
set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH 556695068ce8375b89986083d810fd35)
set(OPENAL_HASH d4eeb0889812e2fdeaa1843523d76190)
set(PNG_VERSION 1.6.35)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.xz)
@@ -66,9 +66,9 @@ else()
set(OPENEXR_VERSION_POSTFIX)
endif()
set(FREETYPE_VERSION 2.10.2)
set(FREETYPE_VERSION 2.10.1)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH b1cb620e4c875cd4d1bfa04945400945)
set(FREETYPE_HASH c50a3c9e5e62bdc938a6e1598a782947)
set(GLEW_VERSION 1.13.0)
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
@@ -101,13 +101,13 @@ set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
set(OPENSUBDIV_VERSION v3_4_3)
set(OPENSUBDIV_VERSION v3_4_0_RC2)
set(OPENSUBDIV_Hash f6a10ba9efaa82fde86fe65aad346319)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
set(OPENSUBDIV_HASH 7bbfa275d021fb829e521df749160edb)
set(SDL_VERSION 2.0.12)
set(SDL_VERSION 2.0.8)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 783b6f2df8ff02b19bb5ce492b99c8ff)
set(SDL_HASH 3800d705cef742c6a634f202c37f263f)
set(OPENCOLLADA_VERSION v1.6.68)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
@@ -168,9 +168,9 @@ set(LAME_VERSION 3.100)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
set(LAME_HASH 83e260acbe4389b54fe08e0bdbf7cddb)
set(OGG_VERSION 1.3.4)
set(OGG_VERSION 1.3.3)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e)
set(OGG_HASH c2e8a485110b97550f453226ec644ebac6cb29d1caef2902c007edab4308d985)
set(VORBIS_VERSION 1.3.6)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
@@ -180,24 +180,24 @@ set(THEORA_VERSION 1.1.1)
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
set(FLAC_VERSION 1.3.3)
set(FLAC_VERSION 1.3.2)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748)
set(FLAC_HASH 91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f)
set(VPX_VERSION 1.8.2)
set(VPX_VERSION 1.7.0)
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
set(VPX_HASH 8735d9fcd1a781ae6917f28f239a8aa358ce4864ba113ea18af4bb2dc8b474ac)
set(VPX_HASH 1fec931eb5c94279ad219a5b6e0202358e94a93a90cfb1603578c326abfc1238)
set(OPUS_VERSION 1.3.1)
set(OPUS_URI https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz)
set(OPUS_HASH 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d)
set(X264_URI https://code.videolan.org/videolan/x264/-/archive/master/x264-33f9e1474613f59392be5ab6a7e7abf60fa63622.tar.gz)
set(X264_HASH 300dfb5b6c35722516f168868ce9419252a9e9eb77a05d82c9cede925b691bd6)
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20180811-2245-stable.tar.bz2)
set(X264_HASH ae8a868a0e236a348b35d79f3ee80294b169d1195408b689f9851383661ed7aa)
set(XVIDCORE_VERSION 1.3.7)
set(XVIDCORE_URI https://downloads.xvid.com/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce2d)
set(XVIDCORE_VERSION 1.3.5)
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH 165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0)
# This has to be in sync with the version in blenders /extern folder.
set(OPENJPEG_VERSION 2.3.0)
@@ -206,9 +206,13 @@ set(OPENJPEG_SHORT_VERSION 2.3)
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/66297f07a43.zip)
set(OPENJPEG_HASH 8242b18d908c7c42174e4231a741cfa7ce7c26b6ed5c9644feb9df7b3054310b)
set(FFMPEG_VERSION 4.2.3)
set(FAAD_VERSION 2-2.8.8)
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.gz)
set(FAAD_HASH 28f6116efdbe9378269f8a6221767d1f)
set(FFMPEG_VERSION 4.0.2)
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH 695fad11f3baf27784e24cb0e977b65a)
set(FFMPEG_HASH 5576e8a22f80b6a336db39808f427cfb)
set(FFTW_VERSION 3.3.8)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
@@ -315,6 +319,6 @@ set(MESA_VERSION 18.3.1)
set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa//mesa-${MESA_VERSION}.tar.xz)
set(MESA_HASH d60828056d77bfdbae0970f9b15fb1be)
set(XR_OPENXR_SDK_VERSION 1.0.8)
set(XR_OPENXR_SDK_VERSION 1.0.6)
set(XR_OPENXR_SDK_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(XR_OPENXR_SDK_HASH c6de63d2e0f9029aa58dfa97cad8ce07)
set(XR_OPENXR_SDK_HASH 21daea7c3bfec365298d779a0e19caa1)

View File

@@ -18,6 +18,9 @@
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
set(X264_PATCH_CMD ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/x264/src/external_x264 < ${PATCH_DIR}/x264.diff)
else()
set(X264_PATCH_CMD echo .)
endif()
@@ -26,6 +29,7 @@ ExternalProject_Add(external_x264
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
PATCH_COMMAND ${X264_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic

View File

@@ -53,15 +53,15 @@ getopt \
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
with-all,with-opencollada,with-jack,with-embree,with-oidn,\
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,\
force-all,force-python,force-numpy,force-boost,force-tbb,\
force-all,force-python,force-numpy,force-boost,\
force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,force-usd,\
force-xr-openxr,\
build-all,build-python,build-numpy,build-boost,build-tbb,\
build-all,build-python,build-numpy,build-boost,\
build-ocio,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,build-usd,\
build-xr-openxr,\
skip-python,skip-numpy,skip-boost,skip-tbb,\
skip-python,skip-numpy,skip-boost,\
skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn,skip-usd,\
skip-xr-openxr \
@@ -191,9 +191,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--build-boost
Force the build of Boost.
--build-tbb
Force the build of TBB.
--build-ocio
Force the build of OpenColorIO.
@@ -258,9 +255,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--force-boost
Force the rebuild of Boost.
--force-tbb
Force the rebuild of TBB.
--force-ocio
Force the rebuild of OpenColorIO.
@@ -318,9 +312,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--skip-boost
Unconditionally skip Boost installation/building.
--skip-tbb
Unconditionally skip TBB installation/building.
--skip-ocio
Unconditionally skip OpenColorIO installation/building.
@@ -394,13 +385,6 @@ BOOST_FORCE_BUILD=false
BOOST_FORCE_REBUILD=false
BOOST_SKIP=false
TBB_VERSION="2019"
TBB_VERSION_UPDATE="_U9" # Used for source packages...
TBB_VERSION_MIN="2018"
TBB_FORCE_BUILD=false
TBB_FORCE_REBUILD=false
TBB_SKIP=false
OCIO_VERSION="1.1.0"
OCIO_VERSION_MIN="1.0"
OCIO_FORCE_BUILD=false
@@ -669,7 +653,6 @@ while true; do
PYTHON_FORCE_BUILD=true
NUMPY_FORCE_BUILD=true
BOOST_FORCE_BUILD=true
TBB_FORCE_BUILD=true
OCIO_FORCE_BUILD=true
OPENEXR_FORCE_BUILD=true
OIIO_FORCE_BUILD=true
@@ -699,9 +682,6 @@ while true; do
--build-boost)
BOOST_FORCE_BUILD=true; shift; continue
;;
--build-tbb)
TBB_FORCE_BUILD=true; shift; continue
;;
--build-ocio)
OCIO_FORCE_BUILD=true; shift; continue
;;
@@ -748,7 +728,6 @@ while true; do
PYTHON_FORCE_REBUILD=true
NUMPY_FORCE_REBUILD=true
BOOST_FORCE_REBUILD=true
TBB_FORCE_REBUILD=true
OCIO_FORCE_REBUILD=true
OPENEXR_FORCE_REBUILD=true
OIIO_FORCE_REBUILD=true
@@ -776,9 +755,6 @@ while true; do
--force-boost)
BOOST_FORCE_REBUILD=true; shift; continue
;;
--force-tbb)
TBB_FORCE_REBUILD=true; shift; continue
;;
--force-ocio)
OCIO_FORCE_REBUILD=true; shift; continue
;;
@@ -830,9 +806,6 @@ while true; do
--skip-boost)
BOOST_SKIP=true; shift; continue
;;
--skip-tbb)
TBB_SKIP=true; shift; continue
;;
--skip-ocio)
OCIO_SKIP=true; shift; continue
;;
@@ -925,12 +898,9 @@ PYTHON_SOURCE=( "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHO
NUMPY_SOURCE=( "https://github.com/numpy/numpy/releases/download/v$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz" )
_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
BOOST_SOURCE=( "https://dl.bintray.com/boostorg/release/$BOOST_VERSION/source/boost_$_boost_version_nodots.tar.bz2" )
BOOST_SOURCE=( "http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/boost_$_boost_version_nodots.tar.bz2/download" )
BOOST_BUILD_MODULES="--with-system --with-filesystem --with-thread --with-regex --with-locale --with-date_time --with-wave --with-iostreams --with-python --with-program_options"
TBB_SOURCE=( "https://github.com/oneapi-src/oneTBB/archive/$TBB_VERSION$TBB_VERSION_UPDATE.tar.gz" )
TBB_SOURCE_CMAKE=( "https://raw.githubusercontent.com/wjakob/tbb/master/CMakeLists.txt" )
OCIO_USE_REPO=false
OCIO_SOURCE=( "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v$OCIO_VERSION.tar.gz")
#~ OCIO_SOURCE_REPO=( "https://github.com/imageworks/OpenColorIO.git" )
@@ -1041,7 +1011,6 @@ You may also want to build them yourself (optional ones are [between brackets]):
* Python $PYTHON_VERSION_MIN (from $PYTHON_SOURCE).
* [NumPy $NUMPY_VERSION_MIN] (from $NUMPY_SOURCE).
* Boost $BOOST_VERSION_MIN (from $BOOST_SOURCE, modules: $BOOST_BUILD_MODULES).
* TBB $TBB_VERSION_MIN (from $TBB_SOURCE).
* [FFMpeg $FFMPEG_VERSION_MIN (needs libvorbis, libogg, libtheora, libx264, libmp3lame, libxvidcore, libvpx, ...)] (from $FFMPEG_SOURCE).
* [OpenColorIO $OCIO_VERSION_MIN] (from $OCIO_SOURCE).
* ILMBase $OPENEXR_VERSION_MIN (from $OPENEXR_SOURCE).
@@ -1279,10 +1248,8 @@ _update_deps_python() {
clean_Python() {
clean_Numpy
_init_python
if [ -d $_inst ]; then
_update_deps_python
fi
_clean
_update_deps_python
}
compile_Python() {
@@ -1365,10 +1332,8 @@ _update_deps_numpy() {
clean_Numpy() {
_init_numpy
if [ -d $_inst ]; then
_update_deps_numpy
fi
_clean
_update_deps_numpy
}
compile_Numpy() {
@@ -1453,10 +1418,8 @@ _update_deps_boost() {
clean_Boost() {
_init_boost
if [ -d $_inst ]; then
_update_deps_boost
fi
_clean
_update_deps_boost
}
compile_Boost() {
@@ -1521,128 +1484,6 @@ compile_Boost() {
run_ldconfig "boost"
}
# ----------------------------------------------------------------------------
# Build TBB
_init_tbb() {
_src=$SRC/TBB-$TBB_VERSION
_git=false
_inst=$INST/tbb-$TBB_VERSION
_inst_shortcut=$INST/tbb
}
_update_deps_tbb() {
OSD_FORCE_REBUILD=true
OPENVDB_FORCE_REBUILD=true
USD_FORCE_REBUILD=true
OIDN_FORCE_REBUILD=true
if [ "$_is_building" = true ]; then
OSD_FORCE_BUILD=true
OPENVDB_FORCE_BUILD=true
USD_FORCE_BUILD=true
OIDN_FORCE_BUILD=true
fi
}
clean_TBB() {
_init_tbb
if [ -d $_inst ]; then
_update_deps_tbb
fi
_clean
}
compile_TBB() {
if [ "$NO_BUILD" = true ]; then
WARNING "--no-build enabled, TBB will not be compiled!"
return
fi
# To be changed each time we make edits that would modify the compiled result!
tbb_magic=0
_init_tbb
# Clean install if needed!
magic_compile_check tbb-$TBB_VERSION $tbb_magic
if [ $? -eq 1 -o "$TBB_FORCE_REBUILD" = true ]; then
clean_TBB
fi
if [ ! -d $_inst ]; then
INFO "Building TBB-$TBB_VERSION$TBB_VERSION_UPDATE"
_is_building=true
# Rebuild dependencies as well!
_update_deps_tbb
prepare_opt
if [ ! -d $_src ]; then
INFO "Downloading TBB-$TBB_VERSION$TBB_VERSION_UPDATE"
mkdir -p $SRC
download TBB_SOURCE[@] $_src.tar.gz
INFO "Unpacking TBB-$TBB_VERSION$TBB_VERSION_UPDATE"
tar -C $SRC --transform "s,(.*/?)oneTBB[^/]*(.*),\1TBB-$TBB_VERSION\2,x" \
-xf $_src.tar.gz
INFO
# Super-hack: Add some cmake builder to tbb... since they don't even have an install target by default, sic.
download TBB_SOURCE_CMAKE[@] $_src/CMakeLists.txt
cp $_src/build/vs2013/version_string.ver $_src/build/version_string.ver.in
fi
cd $_src
# Always refresh the whole build!
if [ -d cmake_build ]; then
rm -rf cmake_build
fi
mkdir cmake_build
cd cmake_build
cmake_d="-D CMAKE_BUILD_TYPE=Release"
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
cmake_d="$cmake_d -D TBB_BUILD_SHARED=ON"
cmake_d="$cmake_d -D TBB_BUILD_STATIC=OFF"
cmake_d="$cmake_d -D TBB_BUILD_TBBMALLOC=ON"
cmake_d="$cmake_d -D TBB_BUILD_TBBMALLOC_PROXY=OFF"
cmake_d="$cmake_d -D TBB_BUILD_TESTS=OFF"
if file /bin/cp | grep -q '32-bit'; then
cflags="-fPIC -m32 -march=i686"
else
cflags="-fPIC"
fi
cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" ..
make -j$THREADS && make install
make clean
if [ -d $_inst ]; then
_create_inst_shortcut
else
ERROR "TBB-$TBB_VERSION$TBB_VERSION_UPDATE failed to compile, exiting"
exit 1
fi
magic_compile_set tbb-$TBB_VERSION $tbb_magic
cd $CWD
INFO "Done compiling TBB-$TBB_VERSION$TBB_VERSION_UPDATE!"
_is_building=false
else
INFO "Own TBB-$TBB_VERSION$TBB_VERSION_UPDATE is up to date, nothing to do!"
INFO "If you want to force rebuild of this lib, use the --force-tbb option."
fi
run_ldconfig "tbb"
}
# ----------------------------------------------------------------------------
# Build OCIO
@@ -1663,10 +1504,8 @@ _update_deps_ocio() {
clean_OCIO() {
_init_ocio
if [ -d $_inst ]; then
_update_deps_ocio
fi
_clean
_update_deps_ocio
}
compile_OCIO() {
@@ -1778,7 +1617,7 @@ compile_OCIO() {
_init_openexr() {
_src=$SRC/OpenEXR-$OPENEXR_VERSION
_git=false
_inst=$INST/openexr-$OPENEXR_VERSION
_inst=$_openexr_inst
_inst_shortcut=$INST/openexr
}
@@ -1793,10 +1632,8 @@ _update_deps_openexr() {
clean_OPENEXR() {
_init_openexr
if [ -d $_inst ]; then
_update_deps_openexr
fi
_clean
_update_deps_openexr
}
compile_OPENEXR() {
@@ -1814,6 +1651,7 @@ compile_OPENEXR() {
clean_OPENEXR
fi
_openexr_inst=$INST/openexr-$OPENEXR_VERSION
PRINT ""
_init_openexr
@@ -1859,7 +1697,7 @@ compile_OPENEXR() {
mkdir build
cd build
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_openexr_inst"
cmake_d="$cmake_d -D CMAKE_INSTALL_DOCDIR=/dev/null" # Hack, there is no option to disable that currently...
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
cmake_d="$cmake_d -D BUILD_TESTING=OFF"
@@ -1921,10 +1759,8 @@ _update_deps_oiio() {
clean_OIIO() {
_init_oiio
if [ -d $_inst ]; then
_update_deps_oiio
fi
_clean
_update_deps_oiio
}
compile_OIIO() {
@@ -2076,10 +1912,8 @@ _update_deps_llvm() {
clean_LLVM() {
_init_llvm
if [ -d $_inst ]; then
_update_deps_llvm
fi
_clean
_update_deps_llvm
}
compile_LLVM() {
@@ -2185,10 +2019,8 @@ _update_deps_osl() {
clean_OSL() {
_init_osl
if [ -d $_inst ]; then
_update_deps_osl
fi
_clean
_update_deps_osl
}
compile_OSL() {
@@ -2330,10 +2162,8 @@ _update_deps_osd() {
clean_OSD() {
_init_osd
if [ -d $_inst ]; then
_update_deps_osd
fi
_clean
_update_deps_osd
}
compile_OSD() {
@@ -2392,9 +2222,6 @@ compile_OSD() {
mkdir build
cd build
if [ -d $INST/tbb ]; then
cmake_d="$cmake_d $cmake_d -D TBB_LOCATION=$INST/tbb"
fi
cmake_d="-D CMAKE_BUILD_TYPE=Release"
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
# ptex is only needed when nicholas bishop is ready
@@ -2447,10 +2274,8 @@ _update_deps_blosc() {
clean_BLOSC() {
_init_blosc
if [ -d $_inst ]; then
_update_deps_blosc
fi
_clean
_update_deps_blosc
}
compile_BLOSC() {
@@ -2544,10 +2369,8 @@ _update_deps_openvdb() {
clean_OPENVDB() {
_init_openvdb
if [ -d $_inst ]; then
_update_deps_openvdb
fi
_clean
_update_deps_openvdb
}
compile_OPENVDB() {
@@ -2606,9 +2429,6 @@ compile_OPENVDB() {
if [ -d $INST/boost ]; then
make_d="$make_d BOOST_INCL_DIR=$INST/boost/include BOOST_LIB_DIR=$INST/boost/lib"
fi
if [ -d $INST/tbb ]; then
make_d="$make_d TBB_ROOT=$INST/tbb TBB_USE_STATIC_LIBS=OFF"
fi
if [ "$_with_built_openexr" = true ]; then
make_d="$make_d ILMBASE_INCL_DIR=$INST/openexr/include ILMBASE_LIB_DIR=$INST/openexr/lib"
@@ -2662,10 +2482,8 @@ _update_deps_alembic() {
clean_ALEMBIC() {
_init_alembic
if [ -d $_inst ]; then
_update_deps_alembic
fi
_clean
_update_deps_alembic
}
compile_ALEMBIC() {
@@ -2767,10 +2585,8 @@ _update_deps_usd() {
clean_USD() {
_init_usd
if [ -d $_inst ]; then
_update_deps_usd
fi
_clean
_update_deps_usd
}
compile_USD() {
@@ -2814,10 +2630,6 @@ compile_USD() {
if [ -d $INST/boost ]; then
cmake_d="$cmake_d $cmake_d -D BOOST_ROOT=$INST/boost"
fi
if [ -d $INST/tbb ]; then
cmake_d="$cmake_d $cmake_d -D TBB_ROOT_DIR=$INST/tbb"
fi
cmake_d="$cmake_d -DPXR_SET_INTERNAL_NAMESPACE=usdBlender"
cmake_d="$cmake_d -DPXR_ENABLE_PYTHON_SUPPORT=OFF"
cmake_d="$cmake_d -DPXR_BUILD_IMAGING=OFF"
@@ -2842,7 +2654,7 @@ compile_USD() {
cd $CWD
INFO "Done compiling USD-$USD_VERSION!"
_is_building=false
_is_building=true
else
INFO "Own USD-$USD_VERSION is up to date, nothing to do!"
INFO "If you want to force rebuild of this lib, use the --force-usd option."
@@ -2866,10 +2678,8 @@ _update_deps_collada() {
clean_OpenCOLLADA() {
_init_opencollada
if [ -d $_inst ]; then
_update_deps_collada
fi
_clean
_update_deps_collada
}
compile_OpenCOLLADA() {
@@ -2972,10 +2782,8 @@ _update_deps_embree() {
clean_Embree() {
_init_embree
if [ -d $_inst ]; then
_update_deps_embree
fi
_clean
_update_deps_embree
}
compile_Embree() {
@@ -3081,10 +2889,8 @@ _update_deps_oidn() {
clean_oidn() {
_init_oidn
if [ -d $_inst ]; then
_update_deps_oidn
fi
_clean
_update_deps_oidn
}
compile_OIDN() {
@@ -3146,10 +2952,6 @@ compile_OIDN() {
cmake_d="$cmake_d -D WITH_TEST=OFF"
cmake_d="$cmake_d -D OIDN_STATIC_LIB=ON"
if [ -d $INST/tbb ]; then
make_d="$make_d TBB_ROOT=$INST/tbb"
fi
cmake $cmake_d ../
make -j$THREADS && make install
@@ -3190,10 +2992,8 @@ _update_deps_ffmpeg() {
clean_FFmpeg() {
_init_ffmpeg
if [ -d $_inst ]; then
_update_deps_ffmpeg
fi
_clean
_update_deps_ffmpeg
}
compile_FFmpeg() {
@@ -3319,10 +3119,8 @@ _update_deps_xr_openxr_sdk() {
clean_XR_OpenXR_SDK() {
_init_xr_openxr_sdk
if [ -d $_inst ]; then
_update_deps_xr_openxr_sdk
fi
_clean
_update_deps_xr_openxr_sdk
}
compile_XR_OpenXR_SDK() {
@@ -3336,7 +3134,7 @@ compile_XR_OpenXR_SDK() {
_init_xr_openxr_sdk
# Clean install if needed!
magic_compile_check xr-openxr-$XR_OPENXR_VERSION $xr_openxr_magic
magic_compile_check xr-openxr-$OPENXR_VERSION $xr_openxr_magic
if [ $? -eq 1 -o "$XR_OPENXR_FORCE_REBUILD" = true ]; then
clean_XR_OpenXR_SDK
fi
@@ -3513,7 +3311,7 @@ install_DEB() {
THEORA_DEV="libtheora-dev"
_packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \
git libfreetype6-dev libx11-dev flex bison libxxf86vm-dev \
git libfreetype6-dev libx11-dev flex bison libtbb-dev libxxf86vm-dev \
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \
libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
@@ -3722,23 +3520,6 @@ install_DEB() {
fi
PRINT ""
if [ "$TBB_SKIP" = true ]; then
WARNING "Skipping TBB installation, as requested..."
elif [ "$TBB_FORCE_BUILD" = true ]; then
INFO "Forced TBB building, as requested..."
compile_TBB
else
check_package_version_ge_DEB libtbb-dev $TBB_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_DEB libtbb-dev
clean_TBB
else
compile_TBB
fi
fi
PRINT ""
if [ "$OCIO_SKIP" = true ]; then
WARNING "Skipping OpenColorIO installation, as requested..."
@@ -4175,7 +3956,7 @@ install_RPM() {
THEORA_USE=true
if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then
_packages="$_packages freetype-devel"
_packages="$_packages freetype-devel tbb-devel"
if [ "$WITH_JACK" = true ]; then
_packages="$_packages jack-audio-connection-kit-devel"
@@ -4216,6 +3997,17 @@ install_RPM() {
PRINT ""
install_packages_RPM $_packages
PRINT ""
# Install TBB on openSUSE, from temporary repo
check_package_RPM tbb-devel
if [ $? -eq 0 ]; then
install_packages_RPM tbb-devel
else
$SUDO zypper ar -f http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_$_suse_rel/devel:libraries:c_c++.repo
$SUDO zypper -n --gpg-auto-import-keys install tbb-devel
$SUDO zypper rr devel_libraries_c_c++
fi
PRINT ""
X264_DEV="libx264-devel"
check_package_version_ge_RPM $X264_DEV $X264_VERSION_MIN
@@ -4351,23 +4143,6 @@ install_RPM() {
fi
PRINT ""
if [ "$TBB_SKIP" = true ]; then
WARNING "Skipping TBB installation, as requested..."
elif [ "$TBB_FORCE_BUILD" = true ]; then
INFO "Forced TBB building, as requested..."
compile_TBB
else
check_package_version_ge_RPM tbb-devel $TBB_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_RPM tbb-devel
clean_TBB
else
compile_TBB
fi
fi
PRINT ""
if [ "$OCIO_SKIP" = true ]; then
WARNING "Skipping OpenColorIO installation, as requested..."
@@ -4724,7 +4499,7 @@ install_ARCH() {
_packages="$BASE_DEVEL git cmake \
libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \
$OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl fftw \
$OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl fftw intel-tbb \
libxml2 yaml-cpp tinyxml python-requests jemalloc"
OPENJPEG_USE=true
@@ -4863,23 +4638,6 @@ install_ARCH() {
fi
PRINT ""
if [ "$TBB_SKIP" = true ]; then
WARNING "Skipping TBB installation, as requested..."
elif [ "$TBB_FORCE_BUILD" = true ]; then
INFO "Forced TBB building, as requested..."
compile_TBB
else
check_package_version_ge_ARCH intel-tbb $TBB_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH intel-tbb
clean_TBB
else
compile_TBB
fi
fi
PRINT ""
if [ "$OCIO_SKIP" = true ]; then
WARNING "Skipping OpenColorIO installation, as requested..."
@@ -5174,10 +4932,15 @@ install_OTHER() {
fi
PRINT ""
_do_compile_python=false
if [ "$PYTHON_SKIP" = true ]; then
WARNING "Skipping Python/NumPy installation, as requested..."
elif [ "$PYTHON_FORCE_BUILD" = true ]; then
INFO "Forced Python/NumPy building, as requested..."
_do_compile_python=true
fi
if [ "$_do_compile_python" = true ]; then
compile_Python
PRINT ""
if [ "$NUMPY_SKIP" = true ]; then
@@ -5197,15 +4960,6 @@ install_OTHER() {
fi
PRINT ""
if [ "$TBB_SKIP" = true ]; then
WARNING "Skipping TBB installation, as requested..."
elif [ "$TBB_FORCE_BUILD" = true ]; then
INFO "Forced TBB building, as requested..."
compile_TBB
fi
PRINT ""
if [ "$OCIO_SKIP" = true ]; then
WARNING "Skipping OpenColorIO installation, as requested..."
@@ -5235,10 +4989,16 @@ install_OTHER() {
PRINT ""
have_llvm=false
_do_compile_llvm=false
if [ "$LLVM_SKIP" = true ]; then
WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
elif [ "$LLVM_FORCE_BUILD" = true ]; then
INFO "Forced LLVM building, as requested..."
_do_compile_llvm=true
fi
if [ "$_do_compile_llvm" = true ]; then
PRINT ""
compile_LLVM
have_llvm=true
LLVM_VERSION_FOUND=$LLVM_VERSION
@@ -5246,10 +5006,15 @@ install_OTHER() {
PRINT ""
_do_compile_osl=false
if [ "$OSL_SKIP" = true ]; then
WARNING "Skipping OpenShadingLanguage installation, as requested..."
elif [ "$OSL_FORCE_BUILD" = true ]; then
INFO "Forced OpenShadingLanguage building, as requested..."
_do_compile_osl=true
fi
if [ "$_do_compile_osl" = true ]; then
if [ "$have_llvm" = true ]; then
PRINT ""
compile_OSL
@@ -5260,40 +5025,66 @@ install_OTHER() {
PRINT ""
_do_compile_osd=false
if [ "$OSD_SKIP" = true ]; then
WARNING "Skipping OpenSubdiv installation, as requested..."
elif [ "$OSD_FORCE_BUILD" = true ]; then
INFO "Forced OpenSubdiv building, as requested..."
_do_compile_osd=true
fi
if [ "$_do_compile_osd" = true ]; then
PRINT ""
compile_OSD
fi
if [ "$WITH_OPENCOLLADA" = true ]; then
_do_compile_collada=false
PRINT ""
if [ "$OPENCOLLADA_SKIP" = true ]; then
WARNING "Skipping OpenCOLLADA installation, as requested..."
elif [ "$OPENCOLLADA_FORCE_BUILD" = true ]; then
INFO "Forced OpenCollada building, as requested..."
_do_compile_collada=true
fi
if [ "$_do_compile_collada" = true ]; then
PRINT ""
compile_OpenCOLLADA
fi
fi
if [ "$WITH_EMBREE" = true ]; then
_do_compile_embree=false
PRINT ""
if [ "$EMBREE_SKIP" = true ]; then
WARNING "Skipping Embree installation, as requested..."
elif [ "$EMBREE_FORCE_BUILD" = true ]; then
INFO "Forced Embree building, as requested..."
_do_compile_embree=true
fi
if [ "$_do_compile_embree" = true ]; then
PRINT ""
compile_Embree
fi
fi
if [ "$WITH_OIDN" = true ]; then
_do_compile_oidn=false
PRINT ""
if [ "$OIDN_SKIP" = true ]; then
WARNING "Skipping OpenImgeDenoise installation, as requested..."
elif [ "$OIDN_FORCE_BUILD" = true ]; then
INFO "Forced OpenImageDenoise building, as requested..."
_do_compile_oidn=true
else
# No package currently!
_do_compile_oidn=true
fi
if [ "$_do_compile_oidn" = true ]; then
compile_OIDN
fi
fi
@@ -5312,6 +5103,9 @@ install_OTHER() {
elif [ "$XR_OPENXR_FORCE_BUILD" = true ]; then
INFO "Forced OpenXR-SDK building, as requested..."
compile_XR_OpenXR_SDK
else
# No package currently!
compile_XR_OpenXR_SDK
fi
}
@@ -5397,7 +5191,7 @@ print_info() {
PRINT ""
PRINT "If you're using CMake add this to your configuration flags:"
_buildargs="-U *SNDFILE* -U PYTHON* -U *BOOST* -U *Boost* -U *TBB*"
_buildargs="-U *SNDFILE* -U PYTHON* -U *BOOST* -U *Boost*"
_buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CYCLES*"
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -U *USD*"
@@ -5422,12 +5216,6 @@ print_info() {
_buildargs="$_buildargs $_1 $_2"
fi
if [ -d $INST/tbb ]; then
_1="-D TBB_ROOT_DIR=$INST/tbb"
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
if [ "$OCIO_SKIP" = false ]; then
_1="-D WITH_OPENCOLORIO=ON"
PRINT " $_1"
@@ -5566,11 +5354,6 @@ print_info() {
_1="-D WITH_USD=ON"
PRINT " $_1"
_buildargs="$_buildargs $_1"
if [ -d $INST/usd ]; then
_1="-D USD_ROOT_DIR=$INST/usd"
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
fi
if [ "$NO_SYSTEM_GLEW" = true ]; then

View File

@@ -109,9 +109,6 @@ if (WIN32)
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
COMMENT "Preprocessing tbbmalloc.def"
)
list(APPEND tbb_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/tbb_resource.rc)
list(APPEND tbbmalloc_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/tbbmalloc.rc)
list(APPEND tbbmalloc_proxy_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/tbbmalloc.rc)
else()
add_custom_command(OUTPUT tbb.def
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbb.def
@@ -148,12 +145,8 @@ if (TBB_BUILD_SHARED)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
elseif(WIN32)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
endif()
install(TARGETS tbb DESTINATION lib)
if(WIN32)
set_target_properties(tbb PROPERTIES OUTPUT_NAME "tbb$<$<CONFIG:Debug>:_debug>")
endif()
endif()
if(CMAKE_COMPILER_IS_GNUCC)
@@ -203,7 +196,7 @@ if(TBB_BUILD_TBBMALLOC_PROXY)
add_library(tbbmalloc_proxy SHARED ${tbbmalloc_proxy_src})
set_property(TARGET tbbmalloc_proxy APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
target_link_libraries(tbbmalloc_proxy tbbmalloc)
link_libraries(tbbmalloc_proxy tbbmalloc)
install(TARGETS tbbmalloc_proxy DESTINATION lib)
endif()
endif()

View File

@@ -0,0 +1,13 @@
diff -Naur external_openal_original/CMakeLists.txt external_openal/CMakeLists.txt
--- external_openal_original/CMakeLists.txt 2016-01-24 20:12:39 -0700
+++ external_openal/CMakeLists.txt 2018-06-02 12:16:52 -0600
@@ -885,7 +885,8 @@
OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi backend" OFF)
IF(HAVE_WINDOWS_H)
# Check MMSystem backend
- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502)
+ set(CMAKE_REQUIRED_FLAGS "-D_WIN32_WINNT=0x0502")
+ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
IF(HAVE_MMSYSTEM_H)
CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM)
IF(HAVE_LIBWINMM)

View File

@@ -18,6 +18,17 @@ diff --git a/mkl-dnn/cmake/TBB.cmake b/mkl-dnn/cmake/TBB.cmake
index 0711e699..c14210b6 100644
--- a/mkl-dnn/cmake/TBB.cmake
+++ b/mkl-dnn/cmake/TBB.cmake
@@ -90,8 +90,8 @@ if(WIN32)
NO_DEFAULT_PATH
)
set(TBB_LIB_DIR ${TBB_ROOT}/lib/${TBB_ARCH}/${TBB_VCVER})
- find_library(TBB_LIBRARY tbb PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
- find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY tbb_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
endif()
else()
@@ -138,13 +138,13 @@ else()
set(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)
if(APPLE)

View File

@@ -1,12 +1,13 @@
diff -Naur orig/Makefile external_pthreads/Makefile
--- orig/Makefile 2018-08-08 04:47:40 -0600
+++ external_pthreads/Makefile 2020-05-09 11:20:28 -0600
@@ -185,7 +185,7 @@
@ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp
--- pthread.h.orig 2012-05-26 22:16:45 -0600
+++ pthread.h 2016-04-01 09:20:36 -0600
@@ -109,6 +109,10 @@
/* Include everything */
#endif
VC-static:
- @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp
+ @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp
VC-static-debug:
@ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp
+#if _MSC_VER >= 1900
+# define HAVE_STRUCT_TIMESPEC 1
+#endif
+
#if defined(_UWIN)
# define HAVE_STRUCT_TIMESPEC 1
# define HAVE_SIGNAL_H 1

View File

@@ -0,0 +1,22 @@
--- x264-snapshot-20180811-2245-stable\configure 2018-08-11 14:45:05 -0600
+++ external_x264\configure 2018-08-11 23:51:35 -0600
@@ -396,7 +396,7 @@
# list of all preprocessor HAVE values we can define
CONFIG_HAVE="MALLOC_H ALTIVEC ALTIVEC_H MMX ARMV6 ARMV6T2 NEON BEOSTHREAD POSIXTHREAD WIN32THREAD THREAD LOG2F SWSCALE \
LAVF FFMS GPAC AVS GPL VECTOREXT INTERLACED CPU_COUNT OPENCL THP LSMASH X86_INLINE_ASM AS_FUNC INTEL_DISPATCHER \
- MSA MMAP WINRT VSX ARM_INLINE_ASM STRTOK_R BITDEPTH8 BITDEPTH10"
+ MSA MMAP WINRT VSX ARM_INLINE_ASM BITDEPTH8 BITDEPTH10"
# parse options
@@ -1071,10 +1071,6 @@
define HAVE_LOG2F
fi
-if cc_check 'string.h' '' 'strtok_r(0, 0, 0);' ; then
- define HAVE_STRTOK_R
-fi
-
if [ "$SYS" != "WINDOWS" ] && cpp_check "sys/mman.h unistd.h" "" "defined(MAP_PRIVATE)"; then
define HAVE_MMAP
fi

View File

@@ -104,7 +104,6 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
NAMES
${COMPONENT}-${_openexr_libs_ver} ${COMPONENT}
NAMES_PER_DIR
HINTS
${_openexr_SEARCH_DIRS}
PATH_SUFFIXES

View File

@@ -43,7 +43,6 @@ FIND_PATH(USD_INCLUDE_DIR
FIND_LIBRARY(USD_LIBRARY
NAMES
usd_m usd_ms
NAMES_PER_DIR
HINTS
${_usd_SEARCH_DIRS}
PATH_SUFFIXES

View File

@@ -66,9 +66,6 @@ macro(BLENDER_SRC_GTEST_EX)
if(UNIX AND NOT APPLE)
target_link_libraries(${TARGET_NAME} bf_intern_libc_compat)
endif()
if(WITH_TBB)
target_link_libraries(${TARGET_NAME} ${TBB_LIBRARIES})
endif()
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(GENERATOR_IS_MULTI_CONFIG)

View File

@@ -52,7 +52,6 @@ set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
set(WITH_QUADRIFLOW OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_TBB OFF CACHE BOOL "" FORCE)
set(WITH_USD OFF CACHE BOOL "" FORCE)
if(UNIX AND NOT APPLE)
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)

View File

@@ -440,14 +440,6 @@ function(SETUP_LIBDIRS)
link_directories(${HDF5_LIBPATH})
endif()
if(WITH_GHOST_WAYLAND)
link_directories(
${wayland-client_LIBRARY_DIRS}
${wayland-egl_LIBRARY_DIRS}
${xkbcommon_LIBRARY_DIRS}
${wayland-cursor_LIBRARY_DIRS})
endif()
if(WIN32 AND NOT UNIX)
link_directories(${PTHREADS_LIBPATH})
endif()

View File

@@ -57,7 +57,6 @@ if(EXISTS ${LIBDIR})
set(BOOST_ROOT ${LIBDIR}/boost)
set(BOOST_LIBRARYDIR ${LIBDIR}/boost/lib)
set(Boost_NO_SYSTEM_PATHS ON)
set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr)
endif()
if(WITH_STATIC_LIBS)
@@ -505,27 +504,7 @@ if(WITH_SYSTEM_AUDASPACE)
endif()
endif()
if(WITH_GHOST_WAYLAND)
find_package(PkgConfig)
pkg_check_modules(wayland-client REQUIRED wayland-client>=1.12)
pkg_check_modules(wayland-egl REQUIRED wayland-egl)
pkg_check_modules(wayland-scanner REQUIRED wayland-scanner)
pkg_check_modules(xkbcommon REQUIRED xkbcommon)
pkg_check_modules(wayland-cursor REQUIRED wayland-cursor)
set(WITH_GL_EGL ON)
if(WITH_GHOST_WAYLAND)
list(APPEND PLATFORM_LINKLIBS
${wayland-client_LIBRARIES}
${wayland-egl_LIBRARIES}
${xkbcommon_LIBRARIES}
${wayland-cursor_LIBRARIES}
)
endif()
endif()
if(WITH_GHOST_X11)
if(WITH_X11)
find_package(X11 REQUIRED)
find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
@@ -596,19 +575,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
unset(LD_VERSION)
endif()
if(WITH_LINKER_LLD)
execute_process(
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if("${LD_VERSION}" MATCHES "LLD")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=lld")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=lld")
else()
message(STATUS "LLD linker isn't available, using the default system linker.")
endif()
unset(LD_VERSION)
endif()
# CLang is the same as GCC for now.
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")

View File

@@ -51,10 +51,6 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} \"${CLANG_OPENMP_LIB}\"")
endif()
if(WITH_WINDOWS_STRIPPED_PDB)
message(WARNING "stripped pdb not supported with clang, disabling..")
set(WITH_WINDOWS_STRIPPED_PDB Off)
endif()
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS})
@@ -111,13 +107,12 @@ endif()
unset(_min_ver)
# needed for some MSVC installations
# 4099 : PDB 'filename' was not found with 'object/library'
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
list(APPEND PLATFORM_LINKLIBS
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 Comctl32 version
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 Comctl32
advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp Shlwapi
)
@@ -139,12 +134,7 @@ add_definitions(-D_ALLOW_KEYWORD_MACROS)
# We want to support Windows 7 level ABI
add_definitions(-D_WIN32_WINNT=0x601)
include(build_files/cmake/platform/platform_win32_bundle_crt.cmake)
remove_cc_flag("/MDd" "/MD" "/Zi")
if(WITH_WINDOWS_PDB)
set(PDB_INFO_OVERRIDE_FLAGS "/Z7")
set(PDB_INFO_OVERRIDE_LINKER_FLAGS "/DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
endif()
remove_cc_flag("/MDd" "/MD")
if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
@@ -161,42 +151,27 @@ if(MSVC_VERSION GREATER 1911 AND NOT MSVC_CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:twoPhase-")
endif()
if(WITH_WINDOWS_SCCACHE AND CMAKE_VS_MSBUILD_COMMAND)
message(WARNING "Disabling sccache, sccache is not supported with msbuild")
set(WITH_WINDOWS_SCCACHE Off)
endif()
if(WITH_WINDOWS_SCCACHE)
set(CMAKE_C_COMPILER_LAUNCHER sccache)
set(CMAKE_CXX_COMPILER_LAUNCHER sccache)
set(SYMBOL_FORMAT /Z7)
else()
unset(CMAKE_C_COMPILER_LAUNCHER)
unset(CMAKE_CXX_COMPILER_LAUNCHER)
set(SYMBOL_FORMAT /ZI)
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /ZI")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd /ZI")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MD")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MD")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd ${SYMBOL_FORMAT}")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd ${SYMBOL_FORMAT}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD ${SYMBOL_FORMAT}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MD ${SYMBOL_FORMAT}")
unset(SYMBOL_FORMAT)
# JMC is available on msvc 15.8 (1915) and up
if(MSVC_VERSION GREATER 1914 AND NOT MSVC_CLANG)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /JMC")
endif()
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /SUBSYSTEM:CONSOLE /STACK:2097152")
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO ")
set(PLATFORM_LINKFLAGS_RELEASE "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
set(PLATFORM_LINKFLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG} /IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmtd.lib")
# Ignore meaningless for us linker warnings.
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /ignore:4049 /ignore:4217 /ignore:4221")
set(PLATFORM_LINKFLAGS_RELEASE "${PLATFORM_LINKFLAGS} ${PDB_INFO_OVERRIDE_LINKER_FLAGS}")
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
if(CMAKE_CL_64)
@@ -234,7 +209,7 @@ endif()
# Mark libdir as system headers with a lower warn level, to resolve some warnings
# that we have very little control over
if(MSVC_VERSION GREATER_EQUAL 1914 AND NOT MSVC_CLANG AND NOT WITH_WINDOWS_SCCACHE)
if(MSVC_VERSION GREATER_EQUAL 1914 AND NOT MSVC_CLANG)
add_compile_options(/experimental:external /external:templates- /external:I "${LIBDIR}" /external:W0)
endif()
@@ -597,7 +572,7 @@ if(WITH_SYSTEM_AUDASPACE)
endif()
if(WITH_TBB)
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/debug/tbb_debug.lib)
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
set(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
if(WITH_TBB_MALLOC_PROXY)

View File

@@ -2,11 +2,6 @@ set BUILD_GENERATOR_POST=
set BUILD_PLATFORM_SELECT=
set MSBUILD_PLATFORM=x64
if "%BUILD_WITH_SCCACHE%"=="1" (
echo sccache is only supported with ninja as the build system.
exit /b 1
)
if "%WITH_CLANG%"=="1" (
set CLANG_CMAKE_ARGS=-T"llvm"
if "%WITH_ASAN%"=="1" (

View File

@@ -6,13 +6,6 @@ if %ERRORLEVEL% NEQ 0 (
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Ninja" %TESTS_CMAKE_ARGS% -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
if "%BUILD_WITH_SCCACHE%"=="1" (
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_WINDOWS_SCCACHE=On
if NOT "%verbose%" == "" (
echo Enabling sccache
)
)
if "%WITH_CLANG%" == "1" (
set LLVM_DIR=
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM" /ve 2^>nul`) DO set LLVM_DIR=%%C

View File

@@ -86,8 +86,6 @@ if NOT "%1" == "" (
set BUILD_UPDATE_ARGS="--no-libraries"
) else if "%1" == "ninja" (
SET BUILD_WITH_NINJA=1
) else if "%1" == "sccache" (
SET BUILD_WITH_SCCACHE=1
) else if "%1" == "clean" (
set MUST_CLEAN=1
) else if "%1" == "verbose" (

View File

@@ -30,4 +30,3 @@ set WITH_PYDEBUG=
set PYDEBUG_CMAKE_ARGS=
set FORMAT=
set TEST=
set BUILD_WITH_SCCACHE=

View File

@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = "V2.90"
PROJECT_NUMBER = "V2.83"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -51,7 +51,7 @@ PROJECT_BRIEF =
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.
PROJECT_LOGO = ../../release/freedesktop/icons/scalable/apps/blender.svg
PROJECT_LOGO = ../../release/freedesktop/icons/48x48/apps/blender.png
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
@@ -1720,7 +1720,7 @@ COMPACT_LATEX = NO
# The default value is: a4.
# This tag requires that the tag GENERATE_LATEX is set to YES.
PAPER_TYPE = a4
PAPER_TYPE = a4wide
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
# that should be included in the LaTeX output. The package can be specified just

View File

@@ -1,2 +1,2 @@
Sphinx==3.0.3
sphinx_rtd_theme==0.5.0rc1
Sphinx==1.8.5
sphinx_rtd_theme==0.4.3

View File

@@ -253,13 +253,7 @@ Registering a class with Blender results in the class definition being loaded in
where it becomes available alongside existing functionality.
Once this class is loaded you can access it from :mod:`bpy.types`,
using the ``bl_idname`` rather than the classes original name.
.. note::
There are some exceptions to this for class names which aren't guarantee to be unique.
In this case use: :func:`bpy.types.Struct.bl_rna_get_subclass`.
using the bl_idname rather than the classes original name.
When loading a class, Blender performs sanity checks making sure all required properties and functions are found,
that properties have the correct type, and that functions have the right number of arguments.

View File

@@ -492,11 +492,6 @@ if _BPY_PROP_COLLECTION_FAKE:
else:
_BPY_PROP_COLLECTION_ID = "collection"
if _BPY_STRUCT_FAKE:
bpy_struct = bpy.types.bpy_struct
else:
bpy_struct = None
def escape_rst(text):
""" Escape plain text which may contain characters used by RST.
@@ -517,7 +512,7 @@ def is_struct_seq(value):
def undocumented_message(module_name, type_name, identifier):
return "Undocumented, consider `contributing <https://developer.blender.org/T51061>`__."
return "Undocumented `contribute <https://developer.blender.org/T51061>`"
def range_str(val):
@@ -1448,7 +1443,7 @@ def pyrna2sphinx(basepath):
if _BPY_STRUCT_FAKE:
descr_items = [
(key, descr) for key, descr in sorted(bpy_struct.__dict__.items())
(key, descr) for key, descr in sorted(bpy.types.Struct.__bases__[0].__dict__.items())
if not key.startswith("__")
]
@@ -1464,6 +1459,9 @@ def pyrna2sphinx(basepath):
for identifier, py_prop in base.get_py_properties():
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
for identifier, py_prop in base.get_py_properties():
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
if lines:
fw(".. rubric:: Inherited Properties\n\n")
@@ -1487,8 +1485,6 @@ def pyrna2sphinx(basepath):
lines.append(" * :class:`%s.%s`\n" % (base.identifier, func.identifier))
for identifier, py_func in base.get_py_functions():
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
for identifier, py_func in base.get_py_c_functions():
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
if lines:
fw(".. rubric:: Inherited Functions\n\n")
@@ -1576,7 +1572,7 @@ def pyrna2sphinx(basepath):
# write fake classes
if _BPY_STRUCT_FAKE:
class_value = bpy_struct
class_value = bpy.types.Struct.__bases__[0]
fake_bpy_type(
"bpy.types", class_value, _BPY_STRUCT_FAKE,
"built-in base class for all classes in bpy.types.", use_subclasses=True,
@@ -1716,7 +1712,7 @@ class PatchedPythonDomain(PythonDomain):
fw("def setup(app):\n")
fw(" app.add_stylesheet('css/theme_overrides.css')\n")
fw(" app.add_domain(PatchedPythonDomain, override=True)\n\n")
fw(" app.override_domain(PatchedPythonDomain)\n\n")
file.close()

View File

@@ -72,7 +72,7 @@ if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
endif()
endif()
if(WITH_GHOST_X11 AND WITH_GHOST_XDND)
if(WITH_X11 AND WITH_GHOST_XDND)
add_subdirectory(xdnd)
endif()

View File

@@ -290,14 +290,14 @@ AUD_API AUD_Device* AUD_Device_getCurrent()
return new AUD_Device(device);
}
AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, double time)
AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, float time)
{
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
if(synchronizer)
synchronizer->seek(*reinterpret_cast<std::shared_ptr<IHandle>*>(handle), time);
}
AUD_API double AUD_getSynchronizerPosition(AUD_Handle* handle)
AUD_API float AUD_getSynchronizerPosition(AUD_Handle* handle)
{
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
if(synchronizer)

View File

@@ -221,14 +221,14 @@ extern AUD_API AUD_Device* AUD_Device_getCurrent();
* \param handle Playback handle.
* \param time Time in seconds to seek to.
*/
extern AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, double time);
extern AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, float time);
/**
* Returns the current sound scene playback time.
* \param handle Playback handle.
* \return The playback time in seconds.
*/
extern AUD_API double AUD_getSynchronizerPosition(AUD_Handle* handle);
extern AUD_API float AUD_getSynchronizerPosition(AUD_Handle* handle);
/**
* Starts the playback of jack transport if possible.

View File

@@ -101,14 +101,14 @@ AUD_API int AUD_DynamicMusic_pause(AUD_DynamicMusic* player)
return (*player)->pause();
}
AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, double position)
AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, float position)
{
assert(player);
return (*player)->seek(position);
}
AUD_API double AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player)
AUD_API float AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player)
{
assert(player);
@@ -141,4 +141,4 @@ AUD_API int AUD_DynamicMusic_stop(AUD_DynamicMusic* player)
assert(player);
return (*player)->stop();
}
}

View File

@@ -103,14 +103,14 @@ extern AUD_API int AUD_DynamicMusic_pause(AUD_DynamicMusic* player);
* \param position The new position from which to play back, in seconds.
* \return 0 if the seeking wasn't possible.
*/
extern AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, double position);
extern AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, float position);
/**
* Retrieves the position of the current scene of a dynamic music player.
* \param player The DynamicMusic object.
* \return The position of the current playing scene.
*/
extern AUD_API double AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player);
extern AUD_API float AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player);
/**
* Retrieves the volume of the current scene of a dynamic music player.
@@ -142,4 +142,4 @@ extern AUD_API int AUD_DynamicMusic_stop(AUD_DynamicMusic* player);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -259,13 +259,13 @@ AUD_API int AUD_Handle_setPitch(AUD_Handle* handle, float value)
return (*handle)->setPitch(value);
}
AUD_API double AUD_Handle_getPosition(AUD_Handle* handle)
AUD_API float AUD_Handle_getPosition(AUD_Handle* handle)
{
assert(handle);
return (*handle)->getPosition();
}
AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, double value)
AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, float value)
{
assert(handle);
return (*handle)->seek(value);

View File

@@ -211,14 +211,14 @@ extern AUD_API int AUD_Handle_setPitch(AUD_Handle* handle, float value);
* param handle The handle to get the position from.
* return The position of the handle.
*/
extern AUD_API double AUD_Handle_getPosition(AUD_Handle* handle);
extern AUD_API float AUD_Handle_getPosition(AUD_Handle* handle);
/**
* Sets the position of a handle.
* param handle The handle to set the position from.
* param value The new position to set.
*/
extern AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, double value);
extern AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, float value);
/**
* Retrieves the relative of a handle.

View File

@@ -41,7 +41,7 @@ AUD_API void AUD_Sequence_free(AUD_Sound* sequence)
delete sequence;
}
AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, double begin, double end, double skip)
AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, float begin, float end, float skip)
{
if(!sound)
return new AUD_SequenceEntry(((Sequence *)sequence->get())->add(AUD_Sound(), begin, end, skip));
@@ -160,7 +160,7 @@ AUD_API void AUD_Sequence_setSpeedOfSound(AUD_Sound* sequence, float value)
AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, double begin, double end, double skip)
AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, float begin, float end, float skip)
{
(*entry)->move(begin, end, skip);
}

View File

@@ -55,7 +55,7 @@ extern AUD_API void AUD_Sequence_free(AUD_Sound* sequence);
* \param skip How much seconds should be skipped at the beginning.
* \return The entry added.
*/
extern AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, double begin, double end, double skip);
extern AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, float begin, float end, float skip);
/**
* Removes an entry from the scene.
@@ -167,7 +167,7 @@ extern AUD_API void AUD_Sequence_setSpeedOfSound(AUD_Sound* sequence, float valu
* \param end The new end time or a negative value if unknown.
* \param skip How many seconds to skip at the beginning.
*/
extern AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, double begin, double end, double skip);
extern AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, float begin, float end, float skip);
/**
* Writes animation data to a sequenced entry.

View File

@@ -175,7 +175,7 @@ static void pauseSound(AUD_Handle* handle)
(*handle)->pause();
}
AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, double seconds)
AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds)
{
auto device = DeviceManager::getDevice();
@@ -336,7 +336,7 @@ AUD_API const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned int start
}
}
AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, double start)
AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start)
{
try
{

View File

@@ -45,7 +45,7 @@ extern AUD_API float* AUD_readSoundBuffer(const char* filename, float low, float
* \param seconds The time in seconds.
* \return The silence handle.
*/
extern AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, double seconds);
extern AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds);
/**
* Reads a sound into a buffer for drawing at a specific sampling rate.
@@ -101,7 +101,7 @@ extern AUD_API const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned in
* \param start The start time of the mixdown in the sound scene.
* \return The read device for the mixdown.
*/
extern AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, double start);
extern AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start);
/**
* Initializes audio routines (FFMPEG/JACK if it is enabled).

View File

@@ -4,5 +4,4 @@ Device
.. currentmodule:: aud
.. autoclass:: Device
:members:
:noindex:

View File

@@ -4,5 +4,4 @@ Handle
.. currentmodule:: aud
.. autoclass:: Handle
:members:
:noindex:

View File

@@ -7,7 +7,6 @@ Welcome to audaspace's documentation!
=====================================
.. automodule:: aud
:no-members:
This documentation is valid for both the Python and C bindings of audaspace. If you are looking for installation instructions check the `C++ API documentation <../index.html>`_. As C is not an object oriented language everything is accessible via functions where the first paramter is always the object. For methods these are named as ``AUD_ClassName_method()`` and properties are accessed via ``AUD_ClassName_property_get/set()``. Python users simply ``import aud`` to access the library.
@@ -19,7 +18,7 @@ This documentation is valid for both the Python and C bindings of audaspace. If
Classes:
.. toctree::
:maxdepth: 1
:maxdepth: 2
device
sound

View File

@@ -4,5 +4,4 @@ Sequence
.. currentmodule:: aud
.. autoclass:: Sequence
:members:
:noindex:

View File

@@ -4,5 +4,4 @@ Sequence Entry
.. currentmodule:: aud
.. autoclass:: SequenceEntry
:members:
:noindex:

View File

@@ -4,5 +4,4 @@ Sound
.. currentmodule:: aud
.. autoclass:: Sound
:members:
:noindex:

View File

@@ -40,7 +40,7 @@ and create a :func:`aud.Sound.sine` signal with a frequency of 440 Hz.
sine = aud.Sound.sine(440)
.. note:: At this point nothing is playing back yet,
:class:`aud.Sound` objects are just descriptions of sounds.
:class:`aud.Sound` objects are just descriptions of sounds.
However instead of a sine wave, we would like to have a square wave
to produce a more retro gaming sound. We could of course use the

View File

@@ -228,9 +228,9 @@ PyDoc_STRVAR(M_aud_DynamicMusic_position_doc,
static int
DynamicMusic_set_position(DynamicMusicP* self, PyObject* args, void* nothing)
{
double position;
float position;
if(!PyArg_Parse(args, "d:position", &position))
if(!PyArg_Parse(args, "f:position", &position))
return -1;
try
@@ -252,7 +252,7 @@ DynamicMusic_get_position(DynamicMusicP* self, void* nothing)
{
try
{
return Py_BuildValue("d", (*reinterpret_cast<std::shared_ptr<aud::DynamicMusic>*>(self->dynamicMusic))->getPosition());
return Py_BuildValue("f", (*reinterpret_cast<std::shared_ptr<aud::DynamicMusic>*>(self->dynamicMusic))->getPosition());
}
catch(aud::Exception& e)
{

View File

@@ -696,7 +696,7 @@ Handle_get_position(Handle* self, void* nothing)
{
try
{
return Py_BuildValue("d", (*reinterpret_cast<std::shared_ptr<IHandle>*>(self->handle))->getPosition());
return Py_BuildValue("f", (*reinterpret_cast<std::shared_ptr<IHandle>*>(self->handle))->getPosition());
}
catch(Exception& e)
{
@@ -708,9 +708,9 @@ Handle_get_position(Handle* self, void* nothing)
static int
Handle_set_position(Handle* self, PyObject* args, void* nothing)
{
double position;
float position;
if(!PyArg_Parse(args, "d:position", &position))
if(!PyArg_Parse(args, "f:position", &position))
return -1;
try

View File

@@ -104,11 +104,11 @@ PyDoc_STRVAR(M_aud_Sequence_add_doc,
" :arg sound: The sound this entry should play.\n"
" :type sound: :class:`Sound`\n"
" :arg begin: The start time.\n"
" :type begin: double\n"
" :type begin: float\n"
" :arg end: The end time or a negative value if determined by the sound.\n"
" :type end: double\n"
" :type end: float\n"
" :arg skip: How much seconds should be skipped at the beginning.\n"
" :type skip: double\n"
" :type skip: float\n"
" :return: The entry added.\n"
" :rtype: :class:`SequenceEntry`");
@@ -116,13 +116,13 @@ static PyObject *
Sequence_add(Sequence* self, PyObject* args, PyObject* kwds)
{
PyObject* object;
double begin;
double end = -1.0;
double skip = 0.0;
float begin;
float end = -1.0f;
float skip = 0.0f;
static const char* kwlist[] = {"sound", "begin", "end", "skip", nullptr};
if(!PyArg_ParseTupleAndKeywords(args, kwds, "Od|dd:add", const_cast<char**>(kwlist), &object, &begin, &end, &skip))
if(!PyArg_ParseTupleAndKeywords(args, kwds, "Of|ff:add", const_cast<char**>(kwlist), &object, &begin, &end, &skip))
return nullptr;
Sound* sound = checkSound(object);

View File

@@ -46,18 +46,18 @@ PyDoc_STRVAR(M_aud_SequenceEntry_move_doc,
".. classmethod:: move()\n\n"
" Moves the entry.\n\n"
" :arg begin: The new start time.\n"
" :type begin: double\n"
" :type begin: float\n"
" :arg end: The new end time or a negative value if unknown.\n"
" :type end: double\n"
" :type end: float\n"
" :arg skip: How many seconds to skip at the beginning.\n"
" :type skip: double\n");
" :type skip: float\n");
static PyObject *
SequenceEntry_move(SequenceEntry* self, PyObject* args)
{
double begin, end, skip;
float begin, end, skip;
if(!PyArg_ParseTuple(args, "ddd:move", &begin, &end, &skip))
if(!PyArg_ParseTuple(args, "fff:move", &begin, &end, &skip))
return nullptr;
try

View File

@@ -1394,7 +1394,7 @@ PyDoc_STRVAR(M_aud_Sound_threshold_doc,
" with a amplitude >= threshold to 1, all <= -threshold to -1 and\n"
" all between to 0.\n\n"
" :arg threshold: Threshold value over which an amplitude counts\n"
" non-zero.\n\n"
" non-zero.\n"
":type threshold: float\n"
":return: The created :class:`Sound` object.\n"
":rtype: :class:`Sound`");
@@ -1434,8 +1434,7 @@ PyDoc_STRVAR(M_aud_Sound_volume_doc,
" :type volume: float\n"
" :return: The created :class:`Sound` object.\n"
" :rtype: :class:`Sound`\n\n"
" .. note::\n\n"
" Should be in the range [0, 1] to avoid clipping.\n\n"
" .. note:: Should be in the range [0, 1] to avoid clipping.\n\n"
" .. note::\n\n"
" This is a filter function, you might consider using\n"
" :attr:`Handle.volume` instead.");
@@ -1476,8 +1475,8 @@ PyDoc_STRVAR(M_aud_Sound_join_doc,
" :return: The created :class:`Sound` object.\n"
" :rtype: :class:`Sound`\n\n"
" .. note::\n\n"
" The two factories have to have the same specifications\n"
" (channels and samplerate).");
" The two factories have to have the same specifications\n"
" (channels and samplerate).");
static PyObject *
Sound_join(Sound* self, PyObject* object)

View File

@@ -33,8 +33,8 @@ AUD_NAMESPACE_BEGIN
class AUD_API DefaultSynchronizer : public ISynchronizer
{
public:
virtual void seek(std::shared_ptr<IHandle> handle, double time);
virtual double getPosition(std::shared_ptr<IHandle> handle);
virtual void seek(std::shared_ptr<IHandle> handle, float time);
virtual float getPosition(std::shared_ptr<IHandle> handle);
virtual void play();
virtual void stop();
virtual void setSyncCallback(syncFunction function, void* data);

View File

@@ -35,9 +35,6 @@ AUD_NAMESPACE_BEGIN
class AUD_API IDeviceFactory
{
public:
/**
* Destroys the device factory.
*/
virtual ~IDeviceFactory() {}
/**

View File

@@ -105,14 +105,14 @@ public:
* - false if the handle is invalid.
* \warning Whether the seek works or not depends on the sound source.
*/
virtual bool seek(double position)=0;
virtual bool seek(float position)=0;
/**
* Retrieves the current playback position of a sound.
* \return The playback position in seconds, or 0.0 if the handle is
* invalid.
*/
virtual double getPosition()=0;
virtual float getPosition()=0;
/**
* Returns the status of a played back sound.

View File

@@ -56,14 +56,14 @@ public:
* @param handle The handle that should be synchronized/seeked.
* @param time The absolute time to synchronize to.
*/
virtual void seek(std::shared_ptr<IHandle> handle, double time) = 0;
virtual void seek(std::shared_ptr<IHandle> handle, float time) = 0;
/**
* Retrieves the position of the synchronizer.
* @param handle The handle which is synchronized.
* @return The position in seconds.
*/
virtual double getPosition(std::shared_ptr<IHandle> handle) = 0;
virtual float getPosition(std::shared_ptr<IHandle> handle) = 0;
/**
* Starts the synchronizer playback.

View File

@@ -53,8 +53,8 @@ private:
virtual bool stop();
virtual bool getKeep();
virtual bool setKeep(bool keep);
virtual bool seek(double position);
virtual double getPosition();
virtual bool seek(float position);
virtual float getPosition();
virtual Status getStatus();
virtual float getVolume();
virtual bool setVolume(float volume);

View File

@@ -180,8 +180,8 @@ protected:
virtual bool stop();
virtual bool getKeep();
virtual bool setKeep(bool keep);
virtual bool seek(double position);
virtual double getPosition();
virtual bool seek(float position);
virtual float getPosition();
virtual Status getStatus();
virtual float getVolume();
virtual bool setVolume(float volume);

View File

@@ -40,10 +40,7 @@ class Buffer;
class AUD_API IFileInput
{
public:
/**
* Destroys the file input.
*/
virtual ~IFileInput() {}
virtual ~IFileInput() {};
/**
* Creates a reader for a file to be read.

View File

@@ -35,7 +35,7 @@ private:
/**
* The delay in samples.
*/
const double m_delay;
const float m_delay;
// delete copy constructor and operator=
Delay(const Delay&) = delete;
@@ -47,12 +47,12 @@ public:
* \param sound The input sound.
* \param delay The desired delay in seconds.
*/
Delay(std::shared_ptr<ISound> sound, double delay = 0);
Delay(std::shared_ptr<ISound> sound, float delay = 0);
/**
* Returns the delay in seconds.
*/
double getDelay() const;
float getDelay() const;
virtual std::shared_ptr<IReader> createReader();
};

View File

@@ -52,7 +52,7 @@ public:
* \param reader The reader to read from.
* \param delay The delay in seconds.
*/
DelayReader(std::shared_ptr<IReader> reader, double delay);
DelayReader(std::shared_ptr<IReader> reader, float delay);
virtual void seek(int position);
virtual int getLength() const;

View File

@@ -55,7 +55,7 @@ private:
/**
* Length of the crossfade transition in seconds, used when no custom transition has been set.
*/
double m_fadeTime;
float m_fadeTime;
/**
* Handle to the playback of the current scene.
@@ -145,13 +145,13 @@ public:
* Sets the length of the crossfade transition (default 1 second).
* \param seconds The time in seconds.
*/
void setFadeTime(double seconds);
void setFadeTime(float seconds);
/**
* Gets the length of the crossfade transition (default 1 second).
* \return The length of the cressfade transition in seconds.
*/
double getFadeTime();
float getFadeTime();
/**
* Resumes a paused sound.
@@ -177,14 +177,14 @@ public:
* - false if the handle is invalid.
* \warning Whether the seek works or not depends on the sound source.
*/
bool seek(double position);
bool seek(float position);
/**
* Retrieves the current playback position of a sound.
* \return The playback position in seconds, or 0.0 if the handle is
* invalid.
*/
double getPosition();
float getPosition();
/**
* Retrieves the volume of the scenes.

View File

@@ -43,12 +43,12 @@ private:
/**
* The fading start.
*/
const double m_start;
const float m_start;
/**
* The fading length.
*/
const double m_length;
const float m_length;
// delete copy constructor and operator=
Fader(const Fader&) = delete;
@@ -64,7 +64,7 @@ public:
*/
Fader(std::shared_ptr<ISound> sound,
FadeType type = FADE_IN,
double start = 0, double length = 1);
float start = 0.0f, float length = 1.0f);
/**
* Returns the fading type.
@@ -74,12 +74,12 @@ public:
/**
* Returns the fading start.
*/
double getStart() const;
float getStart() const;
/**
* Returns the fading length.
*/
double getLength() const;
float getLength() const;
virtual std::shared_ptr<IReader> createReader();
};

View File

@@ -49,12 +49,12 @@ private:
/**
* The fading start.
*/
const double m_start;
const float m_start;
/**
* The fading length.
*/
const double m_length;
const float m_length;
// delete copy constructor and operator=
FaderReader(const FaderReader&) = delete;
@@ -69,7 +69,7 @@ public:
* \param length How long fading should last in seconds.
*/
FaderReader(std::shared_ptr<IReader> reader, FadeType type,
double start,double length);
float start,float length);
virtual void read(int& length, bool& eos, sample_t* buffer);
};

View File

@@ -35,12 +35,12 @@ private:
/**
* The start time.
*/
const double m_start;
const float m_start;
/**
* The end time.
*/
const double m_end;
const float m_end;
// delete copy constructor and operator=
Limiter(const Limiter&) = delete;
@@ -55,17 +55,17 @@ public:
* play to the end.
*/
Limiter(std::shared_ptr<ISound> sound,
double start = 0, double end = -1);
float start = 0, float end = -1);
/**
* Returns the start time.
*/
double getStart() const;
float getStart() const;
/**
* Returns the end time.
*/
double getEnd() const;
float getEnd() const;
virtual std::shared_ptr<IReader> createReader();
};

View File

@@ -35,12 +35,12 @@ private:
/**
* The start sample: inclusive.
*/
const double m_start;
const float m_start;
/**
* The end sample: exlusive.
*/
const double m_end;
const float m_end;
// delete copy constructor and operator=
LimiterReader(const LimiterReader&) = delete;
@@ -54,7 +54,7 @@ public:
* \param end The desired end time (sample exklusive), a negative value
* signals that it should play to the end.
*/
LimiterReader(std::shared_ptr<IReader> reader, double start = 0, double end = -1);
LimiterReader(std::shared_ptr<IReader> reader, float start = 0, float end = -1);
virtual void seek(int position);
virtual int getLength() const;

View File

@@ -151,7 +151,7 @@ public:
* \param skip How much seconds should be skipped at the beginning.
* \return The entry added.
*/
std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, double begin, double end, double skip);
std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, float begin, float end, float skip);
/**
* Removes an entry from the scene.

View File

@@ -203,7 +203,7 @@ public:
* \param skip How much seconds should be skipped at the beginning.
* \return The entry added.
*/
std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, double begin, double end, double skip);
std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, float begin, float end, float skip);
/**
* Removes an entry from the scene.

View File

@@ -55,13 +55,13 @@ private:
std::shared_ptr<ISound> m_sound;
/// The begin time.
double m_begin;
float m_begin;
/// The end time.
double m_end;
float m_end;
/// How many seconds are skipped at the beginning.
double m_skip;
float m_skip;
/// Whether the entry is muted.
bool m_muted;
@@ -124,7 +124,7 @@ public:
* \param skip How much seconds should be skipped at the beginning.
* \param id The ID of the entry.
*/
SequenceEntry(std::shared_ptr<ISound> sound, double begin, double end, double skip, int id);
SequenceEntry(std::shared_ptr<ISound> sound, float begin, float end, float skip, int id);
virtual ~SequenceEntry();
/**
@@ -155,7 +155,7 @@ public:
* \param end The new end time or a negative value if unknown.
* \param skip How many seconds to skip at the beginning.
*/
void move(double begin, double end, double skip);
void move(float begin, float end, float skip);
/**
* Retrieves the muting state of the entry.

View File

@@ -292,7 +292,7 @@ void JackDevice::stopPlayback()
m_nextState = JackTransportStopped;
}
void JackDevice::seekPlayback(double time)
void JackDevice::seekPlayback(float time)
{
if(time >= 0.0f)
AUD_jack_transport_locate(m_client, time * m_specs.rate);
@@ -304,11 +304,11 @@ void JackDevice::setSyncCallback(ISynchronizer::syncFunction sync, void* data)
m_syncFuncData = data;
}
double JackDevice::getPlaybackPosition()
float JackDevice::getPlaybackPosition()
{
jack_position_t position;
AUD_jack_transport_query(m_client, &position);
return position.frame / (double) m_specs.rate;
return position.frame / (float) m_specs.rate;
}
bool JackDevice::doesPlayback()

View File

@@ -174,7 +174,7 @@ public:
* Seeks jack transport playback.
* \param time The time to seek to.
*/
void seekPlayback(double time);
void seekPlayback(float time);
/**
* Sets the sync callback for jack transport playback.
@@ -187,7 +187,7 @@ public:
* Retrieves the jack transport playback time.
* \return The current time position.
*/
double getPlaybackPosition();
float getPlaybackPosition();
/**
* Returns whether jack transport plays back.

View File

@@ -25,12 +25,12 @@ JackSynchronizer::JackSynchronizer(JackDevice* device) :
{
}
void JackSynchronizer::seek(std::shared_ptr<IHandle> handle, double time)
void JackSynchronizer::seek(std::shared_ptr<IHandle> handle, float time)
{
m_device->seekPlayback(time);
}
double JackSynchronizer::getPosition(std::shared_ptr<IHandle> handle)
float JackSynchronizer::getPosition(std::shared_ptr<IHandle> handle)
{
return m_device->getPlaybackPosition();
}

View File

@@ -48,8 +48,8 @@ public:
*/
JackSynchronizer(JackDevice* device);
virtual void seek(std::shared_ptr<IHandle> handle, double time);
virtual double getPosition(std::shared_ptr<IHandle> handle);
virtual void seek(std::shared_ptr<IHandle> handle, float time);
virtual float getPosition(std::shared_ptr<IHandle> handle);
virtual void play();
virtual void stop();
virtual void setSyncCallback(syncFunction function, void* data);

View File

@@ -269,7 +269,7 @@ bool OpenALDevice::OpenALHandle::setKeep(bool keep)
return true;
}
bool OpenALDevice::OpenALHandle::seek(double position)
bool OpenALDevice::OpenALHandle::seek(float position)
{
if(!m_status)
return false;
@@ -335,7 +335,7 @@ bool OpenALDevice::OpenALHandle::seek(double position)
return true;
}
double OpenALDevice::OpenALHandle::getPosition()
float OpenALDevice::OpenALHandle::getPosition()
{
if(!m_status)
return false;

View File

@@ -126,8 +126,8 @@ private:
virtual bool stop();
virtual bool getKeep();
virtual bool setKeep(bool keep);
virtual bool seek(double position);
virtual double getPosition();
virtual bool seek(float position);
virtual float getPosition();
virtual Status getStatus();
virtual float getVolume();
virtual bool setVolume(float volume);

View File

@@ -19,12 +19,12 @@
AUD_NAMESPACE_BEGIN
void DefaultSynchronizer::seek(std::shared_ptr<IHandle> handle, double time)
void DefaultSynchronizer::seek(std::shared_ptr<IHandle> handle, float time)
{
handle->seek(time);
}
double DefaultSynchronizer::getPosition(std::shared_ptr<IHandle> handle)
float DefaultSynchronizer::getPosition(std::shared_ptr<IHandle> handle)
{
return handle->getPosition();
}

View File

@@ -52,12 +52,12 @@ bool NULLDevice::NULLHandle::setKeep(bool keep)
return false;
}
bool NULLDevice::NULLHandle::seek(double position)
bool NULLDevice::NULLHandle::seek(float position)
{
return false;
}
double NULLDevice::NULLHandle::getPosition()
float NULLDevice::NULLHandle::getPosition()
{
return std::numeric_limits<float>::quiet_NaN();
}

View File

@@ -347,7 +347,7 @@ bool SoftwareDevice::SoftwareHandle::setKeep(bool keep)
return true;
}
bool SoftwareDevice::SoftwareHandle::seek(double position)
bool SoftwareDevice::SoftwareHandle::seek(float position)
{
if(!m_status)
return false;
@@ -366,7 +366,7 @@ bool SoftwareDevice::SoftwareHandle::seek(double position)
return true;
}
double SoftwareDevice::SoftwareHandle::getPosition()
float SoftwareDevice::SoftwareHandle::getPosition()
{
if(!m_status)
return false;
@@ -376,7 +376,7 @@ double SoftwareDevice::SoftwareHandle::getPosition()
if(!m_status)
return 0.0f;
double position = m_reader->getPosition() / (double)m_device->m_specs.rate;
float position = m_reader->getPosition() / (float)m_device->m_specs.rate;
return position;
}

View File

@@ -19,13 +19,13 @@
AUD_NAMESPACE_BEGIN
Delay::Delay(std::shared_ptr<ISound> sound, double delay) :
Delay::Delay(std::shared_ptr<ISound> sound, float delay) :
Effect(sound),
m_delay(delay)
{
}
double Delay::getDelay() const
float Delay::getDelay() const
{
return m_delay;
}

View File

@@ -20,7 +20,7 @@
AUD_NAMESPACE_BEGIN
DelayReader::DelayReader(std::shared_ptr<IReader> reader, double delay) :
DelayReader::DelayReader(std::shared_ptr<IReader> reader, float delay) :
EffectReader(reader),
m_delay(int((SampleRate)delay * reader->getSpecs().rate)),
m_remdelay(int((SampleRate)delay * reader->getSpecs().rate))

View File

@@ -133,14 +133,14 @@ bool DynamicMusic::addTransition(int init, int end, std::shared_ptr<ISound> soun
return false;
}
void DynamicMusic::setFadeTime(double seconds)
void DynamicMusic::setFadeTime(float seconds)
{
m_device->lock();
m_fadeTime = seconds;
m_device->unlock();
}
double DynamicMusic::getFadeTime()
float DynamicMusic::getFadeTime()
{
return m_fadeTime;
}
@@ -169,7 +169,7 @@ bool DynamicMusic::pause()
return result || resultTrans;
}
bool DynamicMusic::seek(double position)
bool DynamicMusic::seek(float position)
{
bool result = false;
@@ -183,9 +183,9 @@ bool DynamicMusic::seek(double position)
return result;
}
double DynamicMusic::getPosition()
float DynamicMusic::getPosition()
{
double result = 0.0f;
float result = 0.0f;
if(m_currentHandle != nullptr)
result = m_currentHandle->getPosition();

View File

@@ -18,7 +18,7 @@
AUD_NAMESPACE_BEGIN
Fader::Fader(std::shared_ptr<ISound> sound, FadeType type, double start, double length) :
Fader::Fader(std::shared_ptr<ISound> sound, FadeType type, float start, float length) :
Effect(sound),
m_type(type),
m_start(start),
@@ -31,12 +31,12 @@ FadeType Fader::getType() const
return m_type;
}
double Fader::getStart() const
float Fader::getStart() const
{
return m_start;
}
double Fader::getLength() const
float Fader::getLength() const
{
return m_length;
}

View File

@@ -20,7 +20,7 @@
AUD_NAMESPACE_BEGIN
FaderReader::FaderReader(std::shared_ptr<IReader> reader, FadeType type, double start, double length) :
FaderReader::FaderReader(std::shared_ptr<IReader> reader, FadeType type, float start,float length) :
EffectReader(reader),
m_type(type),
m_start(start),
@@ -36,14 +36,14 @@ void FaderReader::read(int& length, bool& eos, sample_t* buffer)
m_reader->read(length, eos, buffer);
if((position + length) / specs.rate <= m_start)
if((position + length) / (float)specs.rate <= m_start)
{
if(m_type != FADE_OUT)
{
std::memset(buffer, 0, length * samplesize);
}
}
else if(position / specs.rate >= m_start+m_length)
else if(position / (float)specs.rate >= m_start+m_length)
{
if(m_type == FADE_OUT)
{
@@ -58,7 +58,7 @@ void FaderReader::read(int& length, bool& eos, sample_t* buffer)
{
if(i % specs.channels == 0)
{
volume = float((((position + i) / specs.rate) - m_start) / m_length);
volume = (((position+i)/(float)specs.rate)-m_start) / m_length;
if(volume > 1.0f)
volume = 1.0f;
else if(volume < 0.0f)

View File

@@ -20,19 +20,19 @@
AUD_NAMESPACE_BEGIN
Limiter::Limiter(std::shared_ptr<ISound> sound,
double start, double end) :
float start, float end) :
Effect(sound),
m_start(start),
m_end(end)
{
}
double Limiter::getStart() const
float Limiter::getStart() const
{
return m_start;
}
double Limiter::getEnd() const
float Limiter::getEnd() const
{
return m_end;
}

View File

@@ -21,7 +21,7 @@
AUD_NAMESPACE_BEGIN
LimiterReader::LimiterReader(std::shared_ptr<IReader> reader, double start, double end) :
LimiterReader::LimiterReader(std::shared_ptr<IReader> reader, float start, float end) :
EffectReader(reader),
m_start(start),
m_end(end)

View File

@@ -16,9 +16,9 @@
#include "respec/ChannelMapperReader.h"
#include <algorithm>
#include <cmath>
#include <limits>
#include <algorithm>
AUD_NAMESPACE_BEGIN

View File

@@ -66,11 +66,11 @@ void Mixer::setSpecs(Specs specs)
void Mixer::clear(int length)
{
m_buffer.assureSize(length * AUD_SAMPLE_SIZE(m_specs));
m_buffer.assureSize(length * m_specs.channels * AUD_SAMPLE_SIZE(m_specs));
m_length = length;
std::memset(m_buffer.getBuffer(), 0, length * AUD_SAMPLE_SIZE(m_specs));
std::memset(m_buffer.getBuffer(), 0, length * m_specs.channels * AUD_SAMPLE_SIZE(m_specs));
}
void Mixer::mix(sample_t* buffer, int start, int length, float volume)

View File

@@ -90,7 +90,7 @@ AnimateableProperty* Sequence::getAnimProperty(AnimateablePropertyType type)
return m_sequence->getAnimProperty(type);
}
std::shared_ptr<SequenceEntry> Sequence::add(std::shared_ptr<ISound> sound, double begin, double end, double skip)
std::shared_ptr<SequenceEntry> Sequence::add(std::shared_ptr<ISound> sound, float begin, float end, float skip)
{
return m_sequence->add(sound, begin, end, skip);
}

View File

@@ -149,7 +149,7 @@ AnimateableProperty* SequenceData::getAnimProperty(AnimateablePropertyType type)
}
}
std::shared_ptr<SequenceEntry> SequenceData::add(std::shared_ptr<ISound> sound, double begin, double end, double skip)
std::shared_ptr<SequenceEntry> SequenceData::add(std::shared_ptr<ISound> sound, float begin, float end, float skip)
{
std::lock_guard<std::recursive_mutex> lock(m_mutex);

Some files were not shown because too many files have changed in this diff Show More