Merge pull request #33 from opentoonz/export-pluginsdk
added package_sdk.sh to export the sdk. and toonz_plugin_helper*.h ar…
This commit is contained in:
commit
7e185111a8
9 changed files with 77 additions and 22 deletions
|
@ -1,8 +1,10 @@
|
|||
project(blur_plugin)
|
||||
project(blur_plugin C CXX)
|
||||
set(PLUGINSDK_ROOT ../../toonz/sources/toonzqt)
|
||||
set(PLUGINSDK_UTILS_PATH ../)
|
||||
|
||||
set(HEADERS
|
||||
../../toonz/sources/toonzqt/toonz_plugin.h
|
||||
../../toonz/sources/toonzqt/toonz_hostif.h)
|
||||
${PLUGINSDK_ROOT}/toonz_plugin.h
|
||||
${PLUGINSDK_ROOT}/toonz_hostif.h)
|
||||
|
||||
set(SOURCES
|
||||
blur.cpp)
|
||||
|
@ -17,4 +19,4 @@ set_target_properties(blur PROPERTIES
|
|||
PREFIX ""
|
||||
SUFFIX ".plugin")
|
||||
|
||||
include_directories(../../toonz/sources/toonzqt ../)
|
||||
include_directories(${PLUGINSDK_ROOT} ${PLUGINSDK_UTILS_PATH})
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include <cmath>
|
||||
#include <vector>
|
||||
#include "pixelop.hpp"
|
||||
#include "toonz_plugin_helper_rect.h"
|
||||
|
||||
#include <utils/rect.hpp>
|
||||
#include <utils/interf_holder.hpp>
|
||||
#include <utils/param_traits.hpp>
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
project(geom_plugin)
|
||||
|
||||
set(PLUGINSDK_ROOT ../../toonz/sources/toonzqt)
|
||||
set(PLUGINSDK_UTILS_PATH ../)
|
||||
|
||||
set(HEADERS
|
||||
../../toonz/sources/toonzqt/toonz_plugin.h
|
||||
../../toonz/sources/toonzqt/toonz_hostif.h)
|
||||
${PLUGINSDK_ROOT}/toonz_plugin.h
|
||||
${PLUGINSDK_ROOT}/toonz_hostif.h)
|
||||
|
||||
set(SOURCES
|
||||
geom.cpp)
|
||||
|
@ -17,4 +20,4 @@ set_target_properties(geom PROPERTIES
|
|||
PREFIX ""
|
||||
SUFFIX ".plugin")
|
||||
|
||||
include_directories(../../toonz/sources/toonzqt ../)
|
||||
include_directories(${PLUGINSDK_ROOT} ${PLUGINSDK_UTILS_PATH})
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
#include <memory>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include "toonz_plugin_helper_rect.h"
|
||||
#include "toonz_plugin_helper_affine.h"
|
||||
|
||||
#include <utils/rect.hpp>
|
||||
#include <utils/affine.hpp>
|
||||
#include <utils/interf_holder.hpp>
|
||||
#include <utils/param_traits.hpp>
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
project(multi_plugin)
|
||||
set(PLUGINSDK_ROOT ../../toonz/sources/toonzqt)
|
||||
set(PLUGINSDK_UTILS_PATH ../)
|
||||
|
||||
set(HEADERS
|
||||
../../toonz/sources/toonzqt/toonz_plugin.h
|
||||
../../toonz/sources/toonzqt/toonz_hostif.h)
|
||||
${PLUGINSDK_ROOT}/toonz_plugin.h
|
||||
${PLUGINSDK_ROOT}/toonz_hostif.h)
|
||||
|
||||
set(SOURCES
|
||||
multi.cpp)
|
||||
|
@ -17,4 +19,4 @@ set_target_properties(multi PROPERTIES
|
|||
PREFIX ""
|
||||
SUFFIX ".plugin")
|
||||
|
||||
include_directories(../../toonz/sources/toonzqt ../)
|
||||
include_directories(${PLUGINSDK_ROOT} ${PLUGINSDK_UTILS_PATH})
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#include <memory>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include "toonz_plugin_helper_rect.h"
|
||||
#include "toonz_plugin_helper_affine.h"
|
||||
#include <utils/rect.hpp>
|
||||
#include <utils/affine.hpp>
|
||||
#include <utils/interf_holder.hpp>
|
||||
#include <utils/param_traits.hpp>
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
#ifndef TOONZ_PLUGIN_HELPER_AFFINE_H__
|
||||
#define TOONZ_PLUGIN_HELPER_AFFINE_H__
|
||||
#ifndef TOONZ_PLUGIN_HELPER_UTILS_AFFINE_HPP__
|
||||
#define TOONZ_PLUGIN_HELPER_UTILS_AFFINE_HPP__
|
||||
|
||||
#include <cmath>
|
||||
#include <cfloat>
|
||||
#include <cassert>
|
||||
#include "toonz_plugin_helper_rect.h"
|
||||
#include "toonz_hostif.h"
|
||||
#include <toonz_hostif.h>
|
||||
#include "rect.hpp"
|
||||
|
||||
class ToonzAffine
|
||||
{
|
||||
public:
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef TOONZ_PLUGIN_HELPER_RECT_H__
|
||||
#define TOONZ_PLUGIN_HELPER_RECT_H__
|
||||
#ifndef TOONZ_PLUGIN_HELPER_UTILS_RECT_HPP__
|
||||
#define TOONZ_PLUGIN_HELPER_UTILS_RECT_HPP__
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
48
toonz/install/package_sdk.sh
Executable file
48
toonz/install/package_sdk.sh
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
|
||||
while getopts t:d:h OPT
|
||||
do
|
||||
case $OPT in
|
||||
t) TOONZREPO=$OPTARG
|
||||
;;
|
||||
d) DIST=$OPTARG
|
||||
;;
|
||||
h) echo "-t opentoonz_repository_dir -d dist_dir"
|
||||
exit 1;
|
||||
;;
|
||||
\?) exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
mkdir -p $DIST
|
||||
pushd $DIST
|
||||
|
||||
mkdir core
|
||||
mkdir utils
|
||||
mkdir doc
|
||||
|
||||
cp $TOONZREPO/LICENSE.txt ./
|
||||
cp $TOONZREPO/toonz/sources/toonzqt/toonz_plugin.h core/
|
||||
cp $TOONZREPO/toonz/sources/toonzqt/toonz_hostif.h core/
|
||||
cp $TOONZREPO/toonz/sources/toonzqt/toonz_params.h core/
|
||||
|
||||
cp $TOONZREPO/plugins/utils/affine.hpp utils/
|
||||
cp $TOONZREPO/plugins/utils/rect.hpp utils/
|
||||
cp $TOONZREPO/plugins/utils/interf_holder.hpp utils/
|
||||
cp $TOONZREPO/plugins/utils/param_traits.hpp utils/
|
||||
|
||||
# copy samples
|
||||
|
||||
mkdir -p samples/blur
|
||||
mkdir -p samples/geom
|
||||
mkdir -p samples/multiplugin
|
||||
|
||||
cp $TOONZREPO/plugins/blur/* samples/blur/
|
||||
cp $TOONZREPO/plugins/geom/* samples/geom/
|
||||
cp $TOONZREPO/plugins/multiplugin/* samples/multiplugin/
|
||||
|
||||
find ./samples -iname CMakeLists.txt -exec sed -e 's/set(PLUGINSDK_ROOT.*)/set(PLUGINSDK_ROOT \.\.\/\.\.\/core)/' -i "" {} \;
|
||||
find ./samples -iname CMakeLists.txt -exec sed -e 's/set(PLUGINSDK_UTILS_PATH.*)/set(PLUGINSDK_UTILS_PATH \.\.\/\.\.\/)/' -i "" {} \;
|
||||
|
||||
popd
|
Loading…
Reference in a new issue