mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 16:05:42 +02:00
Add Tcl script plugin (thanks to Dmitry Kobylin)
This commit is contained in:
@@ -48,3 +48,10 @@ IF(NOT DISABLE_LUA)
|
||||
ADD_SUBDIRECTORY( lua )
|
||||
ENDIF(LUA_FOUND)
|
||||
ENDIF(NOT DISABLE_LUA)
|
||||
|
||||
IF(NOT DISABLE_TCL)
|
||||
FIND_PACKAGE(TCL)
|
||||
IF(TCL_FOUND)
|
||||
ADD_SUBDIRECTORY( tcl )
|
||||
ENDIF(TCL_FOUND)
|
||||
ENDIF(NOT DISABLE_TCL)
|
||||
|
||||
@@ -41,4 +41,8 @@ if PLUGIN_LUA
|
||||
lua_dir = lua
|
||||
endif
|
||||
|
||||
SUBDIRS = . $(perl_dir) $(python_dir) $(ruby_dir) $(lua_dir)
|
||||
if PLUGIN_TCL
|
||||
tcl_dir = tcl
|
||||
endif
|
||||
|
||||
SUBDIRS = . $(perl_dir) $(python_dir) $(ruby_dir) $(lua_dir) $(tcl_dir)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
/* weechat-lua-api.c: Lua API functions */
|
||||
|
||||
|
||||
#undef _
|
||||
|
||||
#include <lua.h>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
/* weechat-lua.c: Lua plugin for WeeChat */
|
||||
|
||||
|
||||
#undef _
|
||||
|
||||
#include <lua.h>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
/* weechat-perl-api.c: Perl API functions */
|
||||
|
||||
|
||||
#undef _
|
||||
|
||||
#include <EXTERN.h>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
/* weechat-perl.c: Perl plugin for WeeChat */
|
||||
|
||||
|
||||
#undef _
|
||||
|
||||
#include <EXTERN.h>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
/* weechat-python-api.c: Python API functions */
|
||||
|
||||
|
||||
#undef _
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
/* weechat-python.c: Python plugin for WeeChat */
|
||||
|
||||
|
||||
#undef _
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
/* weechat-ruby-api.c: Ruby API functions */
|
||||
|
||||
|
||||
#undef _
|
||||
|
||||
#include <ruby.h>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
/* weechat-ruby.c: Ruby plugin for WeeChat */
|
||||
|
||||
|
||||
#undef _
|
||||
|
||||
#include <ruby.h>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Copyright (c) 2003-2008 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
ADD_LIBRARY(tcl MODULE weechat-tcl.c weechat-tcl.h
|
||||
weechat-tcl-api.c weechat-tcl-api.h)
|
||||
|
||||
SET_TARGET_PROPERTIES(tcl PROPERTIES PREFIX "")
|
||||
|
||||
IF(TCL_FOUND)
|
||||
INCLUDE_DIRECTORIES(${TCL_INCLUDE_PATH})
|
||||
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${TCL_LFLAGS}")
|
||||
TARGET_LINK_LIBRARIES(tcl ${TCL_LIBRARY} weechat_scripts)
|
||||
ENDIF(TCL_FOUND)
|
||||
|
||||
INSTALL(TARGETS tcl LIBRARY DESTINATION lib/weechat/plugins)
|
||||
@@ -0,0 +1,28 @@
|
||||
# Copyright (c) 2003-2008 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(TCL_CFLAGS)
|
||||
|
||||
libdir = ${weechat_libdir}/plugins
|
||||
|
||||
lib_LTLIBRARIES = tcl.la
|
||||
|
||||
tcl_la_SOURCES = weechat-tcl.c \
|
||||
weechat-tcl.h \
|
||||
weechat-tcl-api.c \
|
||||
weechat-tcl-api.h
|
||||
tcl_la_LDFLAGS = -module
|
||||
tcl_la_LIBADD = ../lib_weechat_plugins_scripts.la $(TCL_LFLAGS)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __WEECHAT_TCL_API_H
|
||||
#define __WEECHAT_TCL_API_H 1
|
||||
|
||||
extern void weechat_tcl_api_init (Tcl_Interp *interp);
|
||||
|
||||
#endif /* weechat-tcl.h */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __WEECHAT_TCL_H
|
||||
#define __WEECHAT_TCL_H 1
|
||||
|
||||
#define weechat_plugin weechat_tcl_plugin
|
||||
#define TCL_PLUGIN_NAME "tcl"
|
||||
|
||||
extern struct t_weechat_plugin *weechat_tcl_plugin;
|
||||
|
||||
extern struct t_plugin_script *tcl_scripts;
|
||||
extern struct t_plugin_script *tcl_current_script;
|
||||
extern const char *tcl_current_script_filename;
|
||||
|
||||
extern void *weechat_tcl_exec (struct t_plugin_script *script,
|
||||
int ret_type, const char *function,
|
||||
char **argv);
|
||||
|
||||
#endif /* weechat-tcl.h */
|
||||
Reference in New Issue
Block a user