Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Add support for GitHub Actions by Otakuto (#3622)

shun-iwasawa17ba69991767
diff --git a/.github/workflows/CMakeLists.txt b/.github/workflows/CMakeLists.txt
new file mode 100644
index 000000000..60179e41e
--- /dev/null
+++ b/.github/workflows/CMakeLists.txt
@@ -0,0 +1,38 @@
+cmake_minimum_required(VERSION 2.8.12)
+
+project(mypaint LANGUAGES C)
+
+find_package(json-c CONFIG REQUIRED)
+
+include_directories(${JSON-C_INCLUDE_DIR})
+
+set(sources
+ brushmodes.c
+ fifo.c
+ helpers.c
+ mypaint-brush-settings.c
+ mypaint-brush.c
+ mypaint-fixed-tiled-surface.c
+ mypaint-mapping.c
+ mypaint-matrix.c
+ mypaint-rectangle.c
+ mypaint-surface.c
+ mypaint-symmetry.c
+ mypaint-tiled-surface.c
+ mypaint.c
+ operationqueue.c
+ rng-double.c
+ tilemap.c
+ utils.c
+)
+set(headers
+ mypaint-config.h
+ mypaint-glib-compat.h
+ mypaint-mapping.h
+ mypaint-matrix.h
+ mypaint-symmetry.h
+ config.h
+ mypaint.h
+)
+
+add_library(libmypaint STATIC ${sources} ${headers})
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 000000000..b58a30ab1
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,301 @@
+name: Build
+
+on: [push, pull_request]
+
+jobs:
+ Ubuntu:
+ runs-on: ubuntu-18.04
+ strategy:
+ matrix:
+ compiler: [gcc, clang]
+ include:
+ - compiler: gcc
+ cc: gcc
+ cxx: g++
+ - compiler: clang
+ cc: clang
+ cxx: clang++
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install libraries
+ run: |
+ sudo apt-get update
+ sudo apt-get install build-essential cmake pkg-config ninja-build ccache libboost-all-dev qt5-default qtbase5-dev libqt5svg5-dev qtscript5-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev qtmultimedia5-dev libqt5multimedia5-plugins libsuperlu-dev liblz4-dev libusb-1.0-0-dev liblzo2-dev libpng-dev libjpeg-dev libglew-dev freeglut3-dev libfreetype6-dev libjson-c-dev qtwayland5 libmypaint-dev
+
+ - uses: actions/cache@v1
+ with:
+ path: /home/runner/.ccache
+ key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
+ restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
+
+ - name: Build libtiff
+ run: |
+ cd thirdparty/tiff-4.0.3
+ CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-jbig
+ make -j $(nproc)
+
+ - name: Build
+ run: |
+ cd toonz
+ mkdir build
+ cd build
+ cmake ../sources -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_C_COMPILER=${{ matrix.cc }}
+ ninja
+
+ - name: Create Artifact
+ run: |
+ cd toonz/build
+ sudo ninja install
+
+ mkdir -p appdir/usr
+ cp -r /opt/opentoonz/* appdir/usr
+ cp appdir/usr/share/applications/*.desktop appdir
+ cp appdir/usr/share/icons/hicolor/*/apps/*.png appdir
+
+ mkdir artifact
+ mv appdir/usr/share/opentoonz/stuff artifact/portablestuff
+ rmdir appdir/usr/share/opentoonz
+
+ wget -q -c 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage'
+ wget -q -c 'https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage'
+ wget -q -c 'https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage'
+ chmod 755 linuxdeploy-x86_64.AppImage
+ chmod 755 linuxdeploy-plugin-qt-x86_64.AppImage
+ chmod 755 linuxdeploy-plugin-appimage-x86_64.AppImage
+
+ cat << EOF > apprun.sh
+ #!/usr/bin/env bash
+ exec "\${APPDIR}/usr/bin/OpenToonz"
+ EOF
+ chmod 755 apprun.sh
+
+ export LD_LIBRARY_PATH='appdir/usr/lib/opentoonz'
+ ./linuxdeploy-x86_64.AppImage --appdir=appdir --plugin=qt --output=appimage --custom-apprun=apprun.sh \
+ --executable=appdir/usr/bin/lzocompress \
+ --executable=appdir/usr/bin/lzodecompress \
+ --executable=appdir/usr/bin/tcleanup \
+ --executable=appdir/usr/bin/tcomposer \
+ --executable=appdir/usr/bin/tconverter \
+ --executable=appdir/usr/bin/tfarmcontroller \
+ --executable=appdir/usr/bin/tfarmserver
+ mv OpenToonz*.AppImage artifact/OpenToonz.AppImage
+ ARTIFACT_NAME=Opentoonz-${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
+ mv artifact ${ARTIFACT_NAME}
+ tar zcf ${ARTIFACT_NAME}.tar.gz ${ARTIFACT_NAME}
+
+ - uses: actions/upload-artifact@v1
+ with:
+ name: Opentoonz-${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
+ path: toonz/build/Opentoonz-${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}.tar.gz
+
+ macOS:
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Install libraries
+ run: |
+ brew update
+ brew install pkg-config ninja glew lz4 libjpeg libpng lzo qt boost libusb libmypaint ccache
+
+ - uses: actions/cache@v1
+ with:
+ path: /Users/runner/.ccache
+ key: ${{ runner.os }}-${{ github.sha }}
+ restore-keys: ${{ runner.os }}-
+
+ - name: Build libtiff
+ run: |
+ export PATH="/usr/local/opt/ccache/libexec:$PATH"
+ cd thirdparty/tiff-4.0.3
+ CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-lzma
+ make -j $(nproc)
+
+ - name: Build
+ run: |
+ cd toonz
+ mkdir build
+ cd build
+ cmake ../sources -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQT_PATH='/usr/local/opt/qt/lib'
+ ninja -w dupbuild=warn
+
+ - name: Create Artifact
+ run: |
+ cd toonz/build/toonz
+ cp -pr ../../../stuff OpenToonz.app/portablestuff
+ /usr/local/opt/qt/bin/macdeployqt OpenToonz.app -dmg -verbose=1 -always-overwrite \
+ -executable=OpenToonz.app/Contents/MacOS/lzocompress \
+ -executable=OpenToonz.app/Contents/MacOS/lzodecompress \
+ -executable=OpenToonz.app/Contents/MacOS/tcleanup \
+ -executable=OpenToonz.app/Contents/MacOS/tcomposer \
+ -executable=OpenToonz.app/Contents/MacOS/tconverter \
+ -executable=OpenToonz.app/Contents/MacOS/tfarmcontroller \
+ -executable=OpenToonz.app/Contents/MacOS/tfarmserver
+
+ - uses: actions/upload-artifact@v1
+ with:
+ name: Opentoonz-${{ runner.os }}-${{ github.sha }}
+ path: toonz/build/toonz/OpenToonz.dmg
+
+ Windows:
+ runs-on: windows-2019
+ env:
+ vcpkg_ref: d989ad416b923a9f895c4bddc446d1ef370a3af8
+ CLCACHE_CL: 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl_original.exe'
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Checkout mypaint/libmypaint
+ uses: actions/checkout@v2
+ with:
+ repository: 'mypaint/libmypaint'
+ ref: '70f7686db792fa4953dc60f28a322bf2cd388ed7'
+ path: 'libmypaint'
+
+ - name: Checkout xiaoyeli/superlu
+ uses: actions/checkout@v2
+ with:
+ repository: 'xiaoyeli/superlu'
+ ref: 'a3d5233770f0caad4bc4578b46d3b26af99e9c19'
+ path: 'superlu'
+
+ - name: Install vcpkg
+ run: |
+ rm -r -fo C:/vcpkg
+ cd C:/
+ git clone https://github.com/Microsoft/vcpkg
+ cd vcpkg
+ git checkout "$env:vcpkg_ref"
+ ./bootstrap-vcpkg.bat
+
+ - uses: actions/cache@v1
+ with:
+ path: C:/vcpkg/installed
+ key: ${{ runner.os }}-vcpkg-${{ env.vcpkg_ref }}-${{ github.sha }}
+ restore-keys: ${{ runner.os }}-vcpkg-${{ env.vcpkg_ref }}-
+
+ - name: Install libraries
+ run: |
+ vcpkg install --clean-after-build --triplet x64-windows icu
+ vcpkg install --clean-after-build --triplet x64-windows-static json-c libjpeg-turbo libpng lz4 lzo openblas zlib
+ vcpkg install --clean-after-build --triplet x64-windows freeglut glew
+ vcpkg install --clean-after-build --triplet x64-windows qt5-base qt5-multimedia qt5-script qt5-svg qt5-tools
+ ls -Recurse C:/vcpkg/installed -Filter *.pdb | rm
+
+ - name: Install clcache
+ run: |
+ pip install clcache
+ Rename-Item -Path 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe' -NewName 'cl_original.exe'
+ Rename-Item -Path 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe.config' -NewName 'cl_original.exe.config'
+ cp 'C:/hostedtoolcache/windows/Python/3.6.8/x64/Scripts/clcache.exe' 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe'
+
+ - uses: actions/cache@v1
+ with:
+ path: C:/Users/runneradmin/clcache
+ key: ${{ runner.os }}-clcache-${{ github.sha }}
+ restore-keys: ${{ runner.os }}-clcache-
+
+ - name: Build libtiff
+ run: |
+ cd thirdparty/tiff-4.0.3
+ cp libtiff/tif_config.vc.h libtiff/tif_config.h
+ cp libtiff/tiffconf.vc.h libtiff/tiffconf.h
+ cd prj/LibTIFF
+ $env:Path += ';C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/Bin'
+ $env:CLCACHE_CL = '${{ env.CLCACHE_CL }}'
+ msbuild LibTIFF.vcxproj /p:PlatformToolset=v142 /p:Platform=x64 /p:Configuration=Release -maxcpucount:3
+
+ - name: Build mypaint/libmypaint
+ run: |
+ cd libmypaint
+ cp ../.github/workflows/CMakeLists.txt .
+ echo '#define MYPAINT_CONFIG_USE_GLIB 0' > config.h
+ python generate.py mypaint-brush-settings-gen.h brushsettings-gen.h
+ mkdir build | Out-Null
+ cd build
+ $env:CLCACHE_CL = '${{ env.CLCACHE_CL }}'
+ cmake ../ -G 'Visual Studio 16 2019' -Ax64 -Djson-c_DIR='C:/vcpkg/installed/x64-windows-static/share/json-c/' -DJSON-C_INCLUDE_DIR='C:/vcpkg/installed/x64-windows-static/include/json-c/'
+ cmake --build . --config Release
+ cp C:/vcpkg/installed/x64-windows-static/lib/json-c.lib .
+ $env:Path += ';C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64'
+ lib /OUT:libmypaint.lib Release/libmypaint.lib json-c.lib
+ cp libmypaint.lib Release/libmypaint.lib
+
+ - name: Build xiaoyeli/superlu
+ run: |
+ cd superlu
+ mkdir build | Out-Null
+ cd build
+ $env:CLCACHE_CL = '${{ env.CLCACHE_CL }}'
+ cmake ../ -G 'Visual Studio 16 2019' -Ax64 -DXSDK_ENABLE_Fortran=OFF -Denable_tests=OFF
+ cmake --build . --config Release
+
+ - name: Workaround
+ run: |
+ cd thirdparty
+ cp C:/vcpkg/installed/x64-windows-static/lib/jpeg.lib LibJPEG/jpeg-9/lib/LibJPEG-9_2015_64.lib
+ cp C:/vcpkg/installed/x64-windows-static/lib/libpng16.lib libpng-1.6.21/lib/libpng16_2015_64.lib
+ cp C:/vcpkg/installed/x64-windows-static/lib/lz4.lib Lz4/Lz4_131/lz4_64.lib
+ cp C:/vcpkg/installed/x64-windows-static/lib/lzo2.lib lzo/2.03/LZO_lib/lzo2_64.lib
+ cp C:/vcpkg/installed/x64-windows-static/lib/openblas.lib openblas/libopenblas_64.lib
+ cp C:/vcpkg/installed/x64-windows-static/lib/zlib.lib zlib-1.2.8/lib/zlib-1.2.8_2015_64.lib
+ cp C:/vcpkg/installed/x64-windows/lib/freeglut.lib glut/3.7.6/lib/glut64.lib
+ cp C:/vcpkg/installed/x64-windows/lib/glew32.lib glew/glew-1.9.0/lib/glew64.lib
+ cp D:/a/opentoonz/opentoonz/libmypaint/build/Release/libmypaint.lib libmypaint/dist/64/libmypaint.lib
+ cp D:/a/opentoonz/opentoonz/superlu/build/SRC/Release/superlu.lib superlu/SuperLU_2015_64.lib
+ cp D:/a/opentoonz/opentoonz/thirdparty/tiff-4.0.3/prj/LibTIFF/x64/Release/LibTIFF.lib tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64.lib
+
+ - name: Copy headers
+ run: |
+ cd thirdparty
+ cp LibJPEG/jpeg-9/jconfig.vc LibJPEG/jpeg-9/jconfig.h
+ cp libpng-1.6.21/scripts/pnglibconf.h.prebuilt libpng-1.6.21/pnglibconf.h
+
+ - name: Build
+ run: |
+ cd toonz
+ mkdir build | Out-Null
+ cd build
+ $env:CLCACHE_CL = '${{ env.CLCACHE_CL }}'
+ cmake ../sources -G 'Visual Studio 16 2019' -Ax64 -DQT_PATH='C:/vcpkg/installed/x64-windows/bin' -DQt5_DIR='C:/vcpkg/installed/x64-windows/share/cmake/Qt5' -DBOOST_ROOT="$env:BOOST_ROOT_1_69_0"
+ cmake --build . --config Release
+
+ - name: Create Artifact
+ run: |
+ mkdir artifact | Out-Null
+ cd artifact
+ cp -Recurse ../stuff portablestuff
+ cp ../toonz/build/Release/* .
+ cp C:/vcpkg/installed/x64-windows/bin/freeglut.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/glew32.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/Qt5Core.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/Qt5Gui.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/Qt5Multimedia.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/Qt5Network.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/Qt5OpenGL.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/Qt5PrintSupport.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/Qt5Script.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/Qt5Svg.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/Qt5Widgets.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/bz2.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/freetype.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/harfbuzz.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/icudt*.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/icuin*.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/icuuc*.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/libpng16.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/pcre2-16.dll .
+ cp C:/vcpkg/installed/x64-windows/bin/zlib1.dll .
+ cp -Recurse C:/vcpkg/installed/x64-windows/plugins/audio .
+ cp -Recurse C:/vcpkg/installed/x64-windows/plugins/bearer .
+ cp -Recurse C:/vcpkg/installed/x64-windows/plugins/iconengines .
+ cp -Recurse C:/vcpkg/installed/x64-windows/plugins/imageformats .
+ cp -Recurse C:/vcpkg/installed/x64-windows/plugins/mediaservice .
+ cp -Recurse C:/vcpkg/installed/x64-windows/plugins/platforms .
+ cp -Recurse C:/vcpkg/installed/x64-windows/plugins/playlistformats .
+ cp -Recurse C:/vcpkg/installed/x64-windows/plugins/printsupport .
+
+ - uses: actions/upload-artifact@v1
+ with:
+ name: Opentoonz-${{ runner.os }}-${{ github.sha }}
+ path: artifact
diff --git a/README.md b/README.md
index 3b3e42442..8e84ea6f4 100644
--- a/README.md
+++ b/README.md
@@ -4,8 +4,8 @@
[![](https://ci.appveyor.com/api/projects/status/oa5l5pc964h8fv49/branch/master?svg=true)](https://ci.appveyor.com/project/opentoonz/opentoonz)
[![](https://travis-ci.org/opentoonz/opentoonz.svg?branch=master)](https://travis-ci.org/opentoonz/opentoonz)
+[![](https://github.com/opentoonz/opentoonz/workflows/Build/badge.svg?branch=master)](https://github.com/opentoonz/opentoonz/actions)
[![Translation status](https://hosted.weblate.org/widgets/opentoonz/-/svg-badge.svg)](https://hosted.weblate.org/engage/opentoonz/)
-
## What is OpenToonz?
OpenToonz is a 2D animation software published by
diff --git a/ci-scripts/osx/travis-install.sh b/ci-scripts/osx/travis-install.sh
index 405126d91..6ae7ca23d 100755
--- a/ci-scripts/osx/travis-install.sh
+++ b/ci-scripts/osx/travis-install.sh
@@ -6,13 +6,3 @@ brew install clang-format
# from Homebrew 1.6.0 the old formula for obtaining Qt5.9.2 becomes invalid.
# so we start to use the latest version of Qt. (#1910)
brew install qt
-# delete older qt versions and make sure to have only the latest
-brew cleanup qt
-# temp workaround to brew installed glew cmake info overriding glew lib detection
-# which causes compiling issues later
-if [ -L /usr/local/lib/cmake/glew ]
-then
- echo "Symbolic link '/usr/local/lib/cmake/glew' detected. Removing to avoid glew lib detection issue!"
- ls -l /usr/local/lib/cmake/glew
- rm /usr/local/lib/cmake/glew
-fi
diff --git a/doc/README_ja.md b/doc/README_ja.md
index e5ae7b08b..b18f758fc 100644
--- a/doc/README_ja.md
+++ b/doc/README_ja.md
@@ -4,6 +4,7 @@
[![](https://ci.appveyor.com/api/projects/status/oa5l5pc964h8fv49/branch/master?svg=true)](https://ci.appveyor.com/project/opentoonz/opentoonz)
[![](https://travis-ci.org/opentoonz/opentoonz.svg?branch=master)](https://travis-ci.org/opentoonz/opentoonz)
+[![](https://github.com/opentoonz/opentoonz/workflows/Build/badge.svg?branch=master)](https://github.com/opentoonz/opentoonz/actions)
## これは何?
diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt
index 05c3cc2eb..56ecdc7c9 100644
--- a/toonz/sources/CMakeLists.txt
+++ b/toonz/sources/CMakeLists.txt
@@ -382,7 +382,11 @@ elseif(BUILD_ENV_APPLE)
if(GLEW-NOTFOUND)
pkg_check_modules(GLEW REQUIRED glew)
endif()
- set(GLEW_LIB ${GLEW_LIBRARIES})
+ if (TARGET GLEW::GLEW)
+ set(GLEW_LIB GLEW::GLEW)
+ else()
+ set(GLEW_LIB ${GLEW_LIBRARIES})
+ endif()
pkg_check_modules(LZ4_LIB REQUIRED liblz4)
diff --git a/toonz/sources/colorfx/CMakeLists.txt b/toonz/sources/colorfx/CMakeLists.txt
index 22ed4e055..411020d72 100644
--- a/toonz/sources/colorfx/CMakeLists.txt
+++ b/toonz/sources/colorfx/CMakeLists.txt
@@ -26,7 +26,7 @@ add_definitions(
)
if(BUILD_ENV_APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@rpath/libcolorfx.dylib")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libcolorfx.dylib")
add_dependencies(colorfx tnzcore tnzbase)
endif()
diff --git a/toonz/sources/common/tsystem/tsystem.cpp b/toonz/sources/common/tsystem/tsystem.cpp
index 502b967e6..062885634 100644
--- a/toonz/sources/common/tsystem/tsystem.cpp
+++ b/toonz/sources/common/tsystem/tsystem.cpp
@@ -461,13 +461,11 @@ void TSystem::readDirectory_DirItems(QStringList &dst, const TFilePath &path) {
#ifdef _WIN32
// equivalent to sorting with QDir::LocaleAware
- struct strCompare {
- bool operator()(const QString &s1, const QString &s2) const {
- return QString::localeAwareCompare(s1, s2) < 0;
- }
+ auto const strCompare = [](const QString &s1, const QString &s2) {
+ return QString::localeAwareCompare(s1, s2) < 0;
};
- std::set<QString, strCompare> entries;
+ std::set<QString, decltype(strCompare)> entries(strCompare);
WIN32_FIND_DATA find_dir_data;
QString dir_search_path = dir.absolutePath() + "\\*";
diff --git a/toonz/sources/image/CMakeLists.txt b/toonz/sources/image/CMakeLists.txt
index 00eb01423..00d0a1758 100644
--- a/toonz/sources/image/CMakeLists.txt
+++ b/toonz/sources/image/CMakeLists.txt
@@ -100,7 +100,7 @@ add_definitions(
)
if(BUILD_ENV_APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@rpath/libimage.dylib")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libimage.dylib")
add_dependencies(image tnzcore tnzbase toonzlib)
endif()
diff --git a/toonz/sources/include/ext/plasticdeformer.h b/toonz/sources/include/ext/plasticdeformer.h
index 97ebf143f..79e86209d 100644
--- a/toonz/sources/include/ext/plasticdeformer.h
+++ b/toonz/sources/include/ext/plasticdeformer.h
@@ -53,10 +53,6 @@ public:
PlasticDeformer();
~PlasticDeformer();
- friend void swap(PlasticDeformer &a, PlasticDeformer &b) {
- std::swap(a.m_imp, b.m_imp);
- }
-
/*!
Returns whether the last compilation procedure succeeded, or it either failed
or was never invoked after the last initialize() call.
diff --git a/toonz/sources/sound/CMakeLists.txt b/toonz/sources/sound/CMakeLists.txt
index 9edc96be3..f2a5cecec 100644
--- a/toonz/sources/sound/CMakeLists.txt
+++ b/toonz/sources/sound/CMakeLists.txt
@@ -22,7 +22,7 @@ add_definitions(
)
if(BUILD_ENV_APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@rpath/libsound.dylib")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libsound.dylib")
add_dependencies(sound tnzcore tnzbase toonzlib)
endif()
diff --git a/toonz/sources/stdfx/CMakeLists.txt b/toonz/sources/stdfx/CMakeLists.txt
index 2ce671b1a..ac4c70207 100644
--- a/toonz/sources/stdfx/CMakeLists.txt
+++ b/toonz/sources/stdfx/CMakeLists.txt
@@ -288,7 +288,7 @@ add_definitions(
)
if(BUILD_ENV_APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@rpath/libtnzstdfx.dylib")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtnzstdfx.dylib")
add_dependencies(tnzstdfx tnzcore tnzbase toonzlib)
endif()
diff --git a/toonz/sources/tnzbase/CMakeLists.txt b/toonz/sources/tnzbase/CMakeLists.txt
index 70114b18f..23004d33a 100644
--- a/toonz/sources/tnzbase/CMakeLists.txt
+++ b/toonz/sources/tnzbase/CMakeLists.txt
@@ -163,7 +163,7 @@ qt5_wrap_cpp(SOURCES ${MOC_HEADERS})
add_library(tnzbase SHARED ${HEADERS} ${SOURCES} ${OBJCSOURCES})
if(BUILD_ENV_APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@rpath/libtnzbase.dylib")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtnzbase.dylib")
add_dependencies(tnzbase tnzcore)
endif()
diff --git a/toonz/sources/tnzcore/CMakeLists.txt b/toonz/sources/tnzcore/CMakeLists.txt
index 85671aa80..ed2bd75ed 100644
--- a/toonz/sources/tnzcore/CMakeLists.txt
+++ b/toonz/sources/tnzcore/CMakeLists.txt
@@ -265,7 +265,7 @@ qt5_wrap_cpp(SOURCES ${MOC_HEADERS})
add_library(tnzcore SHARED ${HEADERS} ${SOURCES})
if(BUILD_ENV_APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@rpath/libtnzcore.dylib")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtnzcore.dylib")
endif()
add_definitions(
diff --git a/toonz/sources/tnzext/CMakeLists.txt b/toonz/sources/tnzext/CMakeLists.txt
index e19f8a4f9..bd1eeded9 100644
--- a/toonz/sources/tnzext/CMakeLists.txt
+++ b/toonz/sources/tnzext/CMakeLists.txt
@@ -80,7 +80,7 @@ endif()
add_library(tnzext SHARED ${HEADERS} ${SOURCES} ${OBJCSOURCES})
if(BUILD_ENV_APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@rpath/libtnzext.dylib")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtnzext.dylib")
add_dependencies(tnzext tnzcore tnzbase)
endif()
diff --git a/toonz/sources/tnztools/CMakeLists.txt b/toonz/sources/tnztools/CMakeLists.txt
index 3cda4577c..1538c977e 100644
--- a/toonz/sources/tnztools/CMakeLists.txt
+++ b/toonz/sources/tnztools/CMakeLists.txt
@@ -119,7 +119,7 @@ add_definitions(
)
if(BUILD_ENV_APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@rpath/libtnztools.dylib")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtnztools.dylib")
add_dependencies(tnztools tnzcore tnzbase tnzext toonzlib toonzqt)
endif()
diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cpp
index 45426b1b1..d1a54f9c3 100644
--- a/toonz/sources/toonz/main.cpp
+++ b/toonz/sources/toonz/main.cpp
@@ -461,11 +461,7 @@ int main(int argc, char *argv[]) {
fmt.setStencil(true);
QGLFormat::setDefaultFormat(fmt);
-// seems this function should be called at all systems
-// pheraps in some GLUT-implementations initalization is mere formality
-#if defined(LINUX) || (defined(_WIN32) && defined(__GNUC__))
glutInit(&argc, argv);
-#endif
splash.showMessage(offsetStr + "Initializing Toonz environment ...",
Qt::AlignCenter, Qt::white);
diff --git a/toonz/sources/toonzfarm/tfarm/CMakeLists.txt b/toonz/sources/toonzfarm/tfarm/CMakeLists.txt
index 975c4d6dd..ddcc963c3 100644
--- a/toonz/sources/toonzfarm/tfarm/CMakeLists.txt
+++ b/toonz/sources/toonzfarm/tfarm/CMakeLists.txt
@@ -28,7 +28,7 @@ add_definitions(
)
if(BUILD_ENV_APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@rpath/libtfarm.dylib")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtfarm.dylib")
endif()
message("subdir: tfarm")
diff --git a/toonz/sources/toonzlib/CMakeLists.txt b/toonz/sources/toonzlib/CMakeLists.txt
index 482adb8f2..260fc0007 100644
--- a/toonz/sources/toonzlib/CMakeLists.txt
+++ b/toonz/sources/toonzlib/CMakeLists.txt
@@ -335,7 +335,7 @@ qt5_wrap_cpp(SOURCES ${MOC_HEADERS})
add_library(toonzlib SHARED ${HEADERS} ${SOURCES})
if(BUILD_ENV_APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@rpath/libtoonzlib.dylib")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtoonzlib.dylib")
add_dependencies(toonzlib tnzcore tnzbase tnzext)
endif()
diff --git a/toonz/sources/toonzqt/CMakeLists.txt b/toonz/sources/toonzqt/CMakeLists.txt
index 51de3c1dc..2de6f0501 100644
--- a/toonz/sources/toonzqt/CMakeLists.txt
+++ b/toonz/sources/toonzqt/CMakeLists.txt
@@ -219,7 +219,7 @@ qt5_wrap_cpp(SOURCES ${MOC_HEADERS} OPTIONS ${incs})
add_library(toonzqt SHARED ${HEADERS} ${SOURCES} ${RESOURCES})
if(BUILD_ENV_APPLE)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@rpath/libtoonzqt.dylib")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtoonzqt.dylib")
add_dependencies(toonzqt tnzcore tnzbase tnzext toonzlib sound)
endif()