Advertisement
mw82

natron git master diff

Jan 23rd, 2022
778
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 13.32 KB | None | 0 0
  1. diff --git a/App/NatronApp_main.cpp b/App/NatronApp_main.cpp
  2. index 68a45f939..90202fa0c 100644
  3. --- a/App/NatronApp_main.cpp
  4. +++ b/App/NatronApp_main.cpp
  5. @@ -67,7 +67,7 @@ int main(int argc, char *argv[])
  6.      boost_adaptbx::floating_point::exception_trapping trap(boost_adaptbx::floating_point::exception_trapping::division_by_zero |
  7.                                                             boost_adaptbx::floating_point::exception_trapping::invalid |
  8.                                                             boost_adaptbx::floating_point::exception_trapping::overflow);
  9. -    assert(boost_adaptbx::floating_point::is_invalid_trapped());
  10. +//  assert(boost_adaptbx::floating_point::is_invalid_trapped());
  11.  #endif
  12.  
  13.  #ifdef Q_OS_WIN
  14. diff --git a/Engine/Node.cpp b/Engine/Node.cpp
  15. index 000ec8519..9731d8dba 100644
  16. --- a/Engine/Node.cpp
  17. +++ b/Engine/Node.cpp
  18. @@ -3164,7 +3164,7 @@ renderPreview(const Image & srcImg,
  19.                bool convertToSrgb,
  20.                unsigned int* dstPixels)
  21.  {
  22. -#ifndef DEBUG_NAN
  23. +#ifdef DEBUG_NAN
  24.      // Some plugins generate FP exceptions
  25.      boost_adaptbx::floating_point::exception_trapping trap(0);
  26.  #endif
  27. diff --git a/global.pri b/global.pri
  28. index e89cffbe4..4ca4b932b 100644
  29. --- a/global.pri
  30. +++ b/global.pri
  31. @@ -22,6 +22,10 @@ CONFIG += c++11
  32.  # libs may modify the config (eg openmp), so it must be included before
  33.  include(libs.pri)
  34.  
  35. +!include(config.pri) {
  36. +  error("System-specific config.pri file not present, please follow the installation instructions and create it.")
  37. +}
  38. +
  39.  CONFIG += exceptions warn_on no_keywords
  40.  DEFINES += OFX_EXTENSIONS_NUKE OFX_EXTENSIONS_TUTTLE OFX_EXTENSIONS_VEGAS OFX_SUPPORTS_PARAMETRIC OFX_EXTENSIONS_TUTTLE OFX_EXTENSIONS_NATRON OFX_EXTENSIONS_RESOLVE OFX_SUPPORTS_OPENGLRENDER
  41.  DEFINES += OFX_SUPPORTS_MULTITHREAD
  42. @@ -620,9 +624,3 @@ FC_DEFAULT_FONTS += "<dir>WINDOWSFONTDIR</dir>"
  43.  FC_DEFAULT_FONTS += "<dir>~/AppData/Local/Microsoft/Windows/Fonts</dir>"
  44.  FC_CACHEDIR += "<cachedir>LOCAL_APPDATA_FONTCONFIG_CACHE</cachedir>"
  45.  }
  46. -
  47. -
  48. -# and finally...
  49. -!include(config.pri) {
  50. -  error("System-specific config.pri file not present, please follow the installation instructions and create it.")
  51. -}
  52. diff --git a/tools/travis/install_dependencies.sh b/tools/travis/install_dependencies.sh
  53. index 5ce67274e..6286fc747 100755
  54. --- a/tools/travis/install_dependencies.sh
  55. +++ b/tools/travis/install_dependencies.sh
  56. @@ -22,6 +22,8 @@ set -e
  57.  # Print commands and their arguments as they are executed.
  58.  set -x
  59.  
  60. +TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:="."}
  61. +
  62.  # enable testing locally or on forks without multi-os enabled
  63.  if [[ "${TRAVIS_OS_NAME:-false}" == false ]]; then
  64.      if [[ $(uname -s) == "Darwin" ]]; then
  65. @@ -41,40 +43,51 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
  66.      #GCC_VERSION=7
  67.      GCC_VERSION=8
  68.      PKGS=
  69. +    PIP=pip
  70. +    PYTHON=python2
  71. +    PYTHON_CONFIG=python2-config
  72.      # Natron requires boost >= 1.49 to compile in C++11 mode
  73.      # see http://stackoverflow.com/questions/11302758/error-while-copy-constructing-boostshared-ptr-using-c11
  74.      ## we used the irie/boost ppa for that purpose
  75.      #sudo add-apt-repository -y ppa:irie/boost
  76. -    if [ `lsb_release -cs` = "xenial" ]; then
  77. +    if [ `lsb_release -cs` = "impish" ]; then
  78. +        GCC_VERSION=11
  79. +        PIP=pip3
  80. +        PYTHON=python3
  81. +        PYTHON_CONFIG=python3-config
  82. +    elif [ `lsb_release -cs` = "xenial" ]; then
  83.          BOOSTVER=1.58
  84. +        # the PPA xorg-edgers contains cairo 1.12 (required for rotoscoping)
  85. +        sudo add-apt-repository -y ppa:xorg-edgers/ppa
  86.      elif [ `lsb_release -cs` = "trusty" ]; then
  87.          # samuel-bachmann/boost has a backport of boost 1.60
  88.          sudo add-apt-repository -y ppa:samuel-bachmann/boost
  89.          BOOSTVER=1.60
  90.          sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
  91. +        # the PPA xorg-edgers contains cairo 1.12 (required for rotoscoping)
  92. +        sudo add-apt-repository -y ppa:xorg-edgers/ppa
  93.      elif [ `lsb_release -cs` = "precise" ]; then
  94.          # 12.04LTS Precise
  95.          # now we use ppa:boost-latest/ppa (contains boost 1.55)
  96.          sudo add-apt-repository -y ppa:boost-latest/ppa
  97.          BOOSTVER=1.55
  98.          sudo add-apt-repository -y ppa:kalakris-cmake
  99. +        # the PPA xorg-edgers contains cairo 1.12 (required for rotoscoping)
  100. +        sudo add-apt-repository -y ppa:xorg-edgers/ppa
  101.      fi
  102.      #PKGS="$PKGS libboost${BOOSTVER}-dev libboost-math${BOOSTVER}-dev libboost-serialization${BOOSTVER}-dev"
  103.      PKGS="$PKGS libboost-dev libboost-math-dev libboost-serialization-dev"
  104.  
  105. -    # the PPA xorg-edgers contains cairo 1.12 (required for rotoscoping)
  106. -    sudo add-apt-repository -y ppa:xorg-edgers/ppa
  107.      PKGS="$PKGS libcairo2-dev"
  108.  
  109.      # ubuntu-toolchain-r/test contains recent versions of gcc
  110.      if [ "$CC" = "$TEST_CC" ]; then
  111.          sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
  112.          PKGS="$PKGS gcc-${GCC_VERSION} g++-${GCC_VERSION}";
  113. -    fi
  114.  
  115. -    if [ "$CC" = "$TEST_CC" ]; then
  116. -        sudo -H pip install cpp-coveralls;
  117. +        sudo -H $PIP install cpp-coveralls;
  118.      fi
  119. +
  120.      ## Python 3.4
  121.      ##sudo add-apt-repository --yes ppa:fkrull/deadsnakes # python3.x
  122.      # we get libyaml-cpp-dev from kubuntu backports (for OpenColorIO)
  123. @@ -95,17 +108,13 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
  124.          fi
  125.      fi
  126.  
  127. -    # Note: Python 3 packages are python3-dev and python3-pyside
  128. -    PKGS="$PKGS libqt4-dev libqt4-opengl-dev libglew-dev libexpat1-dev gdb libcairo2-dev python-dev python-pyside libpyside-dev libshiboken-dev"
  129. -
  130. -    echo "*** Python 2 version:"
  131. -    python2 --version
  132. -    python2 -c "from PySide import QtGui, QtCore, QtOpenGL"
  133. -    echo "*** PySide:"
  134. -    env PKG_CONFIG_PATH=`python2-config --prefix`/lib/pkgconfig pkg-config --libs pyside
  135. -    echo "*** Shiboken:"
  136. -    env PKG_CONFIG_PATH=`python2-config --prefix`/lib/pkgconfig pkg-config --libs shiboken
  137. -    cat /usr/lib/x86_64-linux-gnu/pkgconfig/shiboken.pc
  138. +    PKGS="$PKGS libglew-dev libexpat1-dev gdb libcairo2-dev"
  139. +    if [ "$PYTHON" == "python2" ]; then
  140. +        PKGS="$PKGS libqt4-dev libqt4-opengl-dev python-dev python-pyside libpyside-dev libshiboken-dev"
  141. +    else
  142. +        PKGS="$PKGS qttools5-dev libqt5opengl5-dev python3-dev libpyside2-dev libshiboken2-dev"
  143. +        PKGS="$PKGS python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtopengl python3-qtpy"
  144. +    fi
  145.  
  146.      # OpenFX-IO
  147.      # - ffmpeg
  148. @@ -147,10 +156,33 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
  149.      sudo apt-get install -y --allow-unauthenticated -fm $PKGS
  150.  
  151.  
  152. -    
  153. +
  154. +    # now that apt-get has installed our packages, we can test them
  155. +    echo "*** Python version:"
  156. +    $PYTHON --version
  157. +    if [ "$PYTHON" == "python3" ]; then
  158. +        $PYTHON -c "from PySide2 import QtGui, QtCore, QtOpenGL"
  159. +        echo "*** PySide2:"
  160. +        env PKG_CONFIG_PATH=`$PYTHON_CONFIG --prefix`/lib/pkgconfig pkg-config --libs pyside2
  161. +        echo "*** Shiboken2:"
  162. +        env PKG_CONFIG_PATH=`$PYTHON_CONFIG --prefix`/lib/pkgconfig pkg-config --libs shiboken2
  163. +        cat /usr/lib/x86_64-linux-gnu/pkgconfig/shiboken2.pc
  164. +    else
  165. +        $PYTHON -c "from PySide import QtGui, QtCore, QtOpenGL"
  166. +        echo "*** PySide:"
  167. +        env PKG_CONFIG_PATH=`$PYTHON_CONFIG --prefix`/lib/pkgconfig pkg-config --libs pyside
  168. +        echo "*** Shiboken:"
  169. +        env PKG_CONFIG_PATH=`$PYTHON_CONFIG --prefix`/lib/pkgconfig pkg-config --libs shiboken
  170. +        cat /usr/lib/x86_64-linux-gnu/pkgconfig/shiboken.pc
  171. +    fi
  172. +
  173. +
  174. +
  175. +
  176. +
  177.      ################################################################
  178.      # build dependencies that cannot be fetched from apt
  179. -    
  180. +
  181.      # ubuntu-toolchain-r/test contains recent versions of gcc
  182.      if [ "$CC" = "$TEST_CC" ]; then
  183.          sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 90;
  184. @@ -233,23 +265,38 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
  185.      echo 'expat: PKGCONFIG -= expat' >> config.pri
  186.      # pyside and shiboken for python3 cannot be configured with pkg-config on Ubuntu 12.04LTS Precise
  187.      # pyside and shiboken for python2 still need the extra QtCore and QtGui include directories
  188. +    echo "PYTHON_CONFIG = $PYTHON_CONFIG" >> config.pri
  189.      echo 'PYSIDE_PKG_CONFIG_PATH = $$system($$PYTHON_CONFIG --prefix)/lib/pkgconfig' >> config.pri
  190. -    echo 'pyside: PKGCONFIG -= pyside' >> config.pri
  191. -    echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)' >> config.pri
  192. -    echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)/QtCore' >> config.pri
  193. -    echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)/QtGui' >> config.pri
  194. -    echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir QtGui)' >> config.pri
  195. -    #echo 'pyside: LIBS += -lpyside.cpython-32mu' >> config.pri
  196. -    echo 'pyside: LIBS += -lpyside-python2.7' >> config.pri
  197. -    # pyside doesn't have PySide::getWrapperForQObject on Ubuntu 12.04LTS Precise
  198. -    echo 'pyside: DEFINES += PYSIDE_OLD' >> config.pri
  199. -    #echo 'shiboken: PKGCONFIG -= shiboken' >> config.pri
  200. -    #echo 'shiboken: INCLUDEPATH += $$system(pkg-config --variable=includedir shiboken)' >> config.pri
  201. -    #echo 'shiboken: LIBS += -lshiboken.cpython-32mu' >> config.pri
  202. +
  203. +    if [ "$PYTHON" == "python3" ]; then
  204. +        echo 'CONFIG += python3' >> config.pri
  205. +        echo 'pyside: PKGCONFIG -= pyside2' >> config.pri
  206. +        echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside2)' >> config.pri
  207. +        echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside2)/QtCore' >> config.pri
  208. +        echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside2)/QtGui' >> config.pri
  209. +        echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir Qt5Gui)' >> config.pri
  210. +        echo 'pyside: LIBS += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config libs pyside2)' >> config.pri
  211. +        echo 'shiboken: PKGCONFIG -= shiboken2' >> config.pri
  212. +        echo 'shiboken: INCLUDEPATH += $$system(pkg-config --variable=includedir shiboken2)' >> config.pri
  213. +        echo 'shiboken: LIBS += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config libs shiboken2)' >> config.pri
  214. +    else
  215. +        echo 'pyside: PKGCONFIG -= pyside' >> config.pri
  216. +        echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)' >> config.pri
  217. +        echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)/QtCore' >> config.pri
  218. +        echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)/QtGui' >> config.pri
  219. +        echo 'pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir QtGui)' >> config.pri
  220. +        #echo 'pyside: LIBS += -lpyside.cpython-32mu' >> config.pri
  221. +        echo 'pyside: LIBS += -lpyside-python2.7' >> config.pri
  222. +        # pyside doesn't have PySide::getWrapperForQObject on Ubuntu 12.04LTS Precise
  223. +        echo 'pyside: DEFINES += PYSIDE_OLD' >> config.pri
  224. +        #echo 'shiboken: PKGCONFIG -= shiboken' >> config.pri
  225. +        #echo 'shiboken: INCLUDEPATH += $$system(pkg-config --variable=includedir shiboken)' >> config.pri
  226. +        #echo 'shiboken: LIBS += -lshiboken.cpython-32mu' >> config.pri
  227. +    fi
  228.  
  229.      IO_BRANCH=master
  230.      . $TRAVIS_BUILD_DIR/Global/plugin-branches.sh
  231. -    
  232. +
  233.      # build OpenFX-IO
  234.      if [ "$CC" = "$TEST_CC" ]; then
  235.          pushd $TRAVIS_BUILD_DIR
  236. @@ -275,7 +322,7 @@ elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
  237.      # install_xquartz(){
  238.      #     echo "XQuartz start install"
  239.      #     XQUARTZ_VERSION=2.7.6
  240. -    #    
  241. +    #
  242.      #     echo "XQuartz download"
  243.      #     wget --quiet http://xquartz.macosforge.org/downloads/SL/XQuartz-${XQUARTZ_VERSION}.dmg
  244.      #     echo "XQuartz mount dmg"
  245. @@ -301,7 +348,7 @@ elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
  246.      # (see https://travis-ci.org/NatronGitHub/Natron/jobs/504468941)
  247.      #brew install numpy || true
  248.      #brew link --overwrite numpy || true
  249. -    
  250. +
  251.      brew outdated xctool || brew upgrade xctool || true
  252.      echo "* Adding brew taps"
  253.      #brew tap homebrew/python # deprecated
  254. @@ -346,10 +393,10 @@ elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
  255.      #brew upgrade
  256.      echo "* Brew doctor"
  257.      brew doctor || true
  258. -    
  259. +
  260.      echo "* Install Natron dependencies"
  261.      #echo " - pip install numpy" # installed via brew install numpy (see below)
  262. -    #pip install --upgrade numpy
  263. +    #$PIP install --upgrade numpy
  264.      # brew install numpy  # Compilation errors with gfortran
  265.      echo " - install brew packages"
  266.      # TuttleOFX's dependencies:
  267. @@ -448,7 +495,7 @@ EOS
  268.  
  269.      # OpenImageIO >= 1.8 requires c++11
  270.      CXX="$CXX -std=c++11"
  271. -    
  272. +
  273.      # OpenFX
  274.      if [ "$CC" = "$TEST_CC" ]; then
  275.          make -C libs/OpenFX/Examples;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement