Skip to content

Commit

Permalink
added package_sdk.sh to export the sdk. and toonz_plugin_helper*.h ar…
Browse files Browse the repository at this point in the history
…e moved to utils dir to plublic developers
  • Loading branch information
roentgen committed Mar 25, 2016
1 parent f09e094 commit edd5790
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 22 deletions.
10 changes: 6 additions & 4 deletions plugins/blur/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -17,4 +19,4 @@ set_target_properties(blur PROPERTIES
PREFIX ""
SUFFIX ".plugin")

include_directories(../../toonz/sources/toonzqt ../)
include_directories(${PLUGINSDK_ROOT} ${PLUGINSDK_UTILS_PATH})
2 changes: 1 addition & 1 deletion plugins/blur/blur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
9 changes: 6 additions & 3 deletions plugins/geom/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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 changes: 2 additions & 3 deletions plugins/geom/geom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
8 changes: 5 additions & 3 deletions plugins/multiplugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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 changes: 2 additions & 2 deletions plugins/multiplugin/multi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
48 changes: 48 additions & 0 deletions toonz/install/package_sdk.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit edd5790

Please sign in to comment.