Skip to content

Commit

Permalink
update to pdlua 0.12.4
Browse files Browse the repository at this point in the history
Update Makefile.pdlibbuilder

readme

Update pdlua_gfx.h

examples

print info

change ELSE print info
  • Loading branch information
porres committed Aug 20, 2024
1 parent 1a87851 commit 5a4489f
Show file tree
Hide file tree
Showing 17 changed files with 993 additions and 158 deletions.
7 changes: 3 additions & 4 deletions Code_source/Compiled/control/else.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ void else_obj_about(t_else_obj *x){
post("\"Live-Electronics-Tutorial\" folder inside the ELSE folder.");
post("It has a CC license. Please check its README on how to install it!");
post("-------------------------------------------------------------------");
post("- ALSO NOTE: Loading this binary did not install the ELSE library");
post("you must add it to the \"path preferences\" in order to load objects");
post("without a prefix");
post("- ALSO NOTE: Loading this binary did not install the ELSE library,");
post("you must add it to the \"path preferences\" or use");
post("[declare -path else] to load objects without a prefix");
post("-------------------------------------------------------------------");
post("- ALSO ALSO NOTE: Loading this binary did install an object browser");
post("plugin for Vanilla and ELSE objects when right clicking on a canvas.");
Expand Down Expand Up @@ -122,6 +122,5 @@ void else_setup(void){
pdgui_vmess("load_plugin_script", "s", plugin);
sprintf(plugin, "%s/browser-merda.tcl", else_obj_class->c_externdir->s_name);
pdgui_vmess("load_plugin_script", "s", plugin);

pdlua_setup();
}
71 changes: 48 additions & 23 deletions Code_source/Compiled/control/lua/Makefile.pdlibbuilder
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Makefile.pdlibbuilder dated 2019-12-21
version = 0.6.0
version = 0.7.0

# Helper makefile for Pure Data external libraries.
# Written by Katja Vetter March-June 2015 for the public domain. No warranties.
Expand Down Expand Up @@ -102,6 +102,8 @@ version = 0.6.0
# Optional user variables for make command line or environment:
#
# - PLATFORM
# - extension
# - floatsize
#
# Deprecated path variables:
#
Expand Down Expand Up @@ -205,6 +207,19 @@ version = 0.6.0
# will then be autodefined accordingly. In most cases no other variables need to
# be overridden.
#
# extension:
# Extension for the external to use. Example: m_amd64
# A sane default is picked, but it is useful if you want to provide
# co-installable externals for multiple platforms (for the same operating
# systems)
#
# floatsize:
# the size of the t_float in bits. Example: 32
# t_float are usually single precision (32bit), which is the default.
# For double precision use floatsize=64
# When building double precision externals, you will want to set the extension
# as well, e.g. extension=windows-amd64-64.dll (<system>-<cpu>-<floatsize>.<ext>)
#
# CPPFLAGS:
# Preprocessor flags which are not strictly required for building.
#
Expand Down Expand Up @@ -442,6 +457,14 @@ target.arch := $(firstword $(target.triplet))
### variables per platform #####################################################
################################################################################

#=== flags per floatsize == ====================================================
floatsize = 32
ifneq ($(filter-out 32,$(floatsize)),)
floatsize.flags = -DPD_FLOATSIZE=$(floatsize)
else
floatsize.flags =
endif


#=== flags per architecture ====================================================

Expand Down Expand Up @@ -584,14 +607,14 @@ ifeq ($(system), Windows)
extension = dll
c.flags :=
c.ldflags := -static-libgcc -shared \
-Wl,--enable-auto-import "$(PDBINDIR)/pd.dll"
-Wl,--enable-auto-import "$(PDBINDIR)/pd$(filter-out 32,$(floatsize)).dll"
c.ldlibs :=
cxx.flags := -fcheck-new
cxx.ldflags := -static-libgcc -static-libstdc++ -shared \
-Wl,--enable-auto-import "$(PDBINDIR)/pd.dll"
-Wl,--enable-auto-import "$(PDBINDIR)/pd$(filter-out 32,$(floatsize)).dll"
cxx.ldlibs :=
shared.extension = dll
shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll"
shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd$(filter-out 32,$(floatsize)).dll"
stripflags = --strip-all
endif

Expand Down Expand Up @@ -639,7 +662,7 @@ endif
CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags)

# preprocessor flags
cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS)
cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(floatsize.flags) $(cpp.flags) $(CPPFLAGS)

# flags for dependency checking (cflags from makefile may define -I options)
depcheck.flags := $(cpp.flags) $(cflags)
Expand Down Expand Up @@ -683,6 +706,7 @@ endif
### variables: files ###########################################################
################################################################################

object.extension = $(extension).o

#=== sources ===================================================================

Expand All @@ -709,10 +733,10 @@ all.sources := $(classes.sources) $(lib.setup.sources) \


# construct object filenames from all C and C++ source file names
classes.objects := $(addsuffix .o, $(basename $(classes.sources)))
common.objects := $(addsuffix .o, $(basename $(common.sources)))
shared.objects := $(addsuffix .o, $(basename $(shared.sources)))
lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources)))
classes.objects := $(addsuffix .$(object.extension), $(basename $(classes.sources)))
common.objects := $(addsuffix .$(object.extension), $(basename $(common.sources)))
shared.objects := $(addsuffix .$(object.extension), $(basename $(shared.sources)))
lib.setup.objects := $(addsuffix .$(object.extension), $(basename $(lib.setup.sources)))
all.objects = $(classes.objects) $(common.objects) $(shared.objects) \
$(lib.setup.objects)

Expand All @@ -723,12 +747,13 @@ all.objects = $(classes.objects) $(common.objects) $(shared.objects) \
# construct class executable names from class names
classes.executables := $(addsuffix .$(extension), $(classes))

# Construct shared lib executable name if shared sources are defined. If
# extension and shared extension are not identical, use both to facilitate co-
# installation for different platforms, like .m_i386.dll and .m_amd64.dll.
# Construct shared lib executable name if shared sources are defined.
# If extension does not end with shared extension, use both to facilitate co-
# installation for different platforms, like .m_i386.dll and .linux-amd64-32.so
ifdef shared.sources
ifeq ($(extension), $(shared.extension))
shared.lib = lib$(lib.name).$(shared.extension)
ifneq ($(filter %.$(shared.extension), .$(extension)), )
# $(extension) already ends with $(shared.extension), no need to duplicate it
shared.lib = lib$(lib.name).$(extension)
else
shared.lib = lib$(lib.name).$(extension).$(shared.extension)
endif
Expand Down Expand Up @@ -790,7 +815,7 @@ endif

# store path to pd.dll; if not found, ls will give a useful error
ifeq ($(system), Windows)
pddll := $(shell ls "$(PDBINDIR)/pd.dll")
pddll := $(shell ls "$(PDBINDIR)/pd$(filter-out 32,$(floatsize)).dll")
endif

# when making target all, check if m_pd.h is found and print info about it
Expand Down Expand Up @@ -874,8 +899,8 @@ define link-class
$(compile-$1) \
$($1.ldflags) $($2.class.ldflags) \
-o $2.$(extension) \
$(addsuffix .o, $(basename $($2.class.sources))) \
$(addsuffix .o, $(basename $(common.sources))) \
$(addsuffix .$(object.extension), $(basename $($2.class.sources))) \
$(addsuffix .$(object.extension), $(basename $(common.sources))) \
$($1.ldlibs) $($2.class.ldlibs) $(shared.lib)
endef

Expand Down Expand Up @@ -949,13 +974,13 @@ endef
# Three rules to create .o files. These are double colon 'terminal' rules,
# meaning they are the last in a rules chain.

%.o:: %.c
%.$(object.extension):: %.c
$(call make-object-file,c)

%.o:: %.cc
%.$(object.extension):: %.cc
$(call make-object-file,cxx)

%.o:: %.cpp
%.$(object.extension):: %.cpp
$(call make-object-file,cxx)


Expand All @@ -974,8 +999,8 @@ endef
# declare explicit prerequisites rule like 'class.extension: object1.o object2.o'
# argument $v is class basename
define declare-class-executable-target
$v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \
$(addsuffix .o, $(basename $(common.sources)))
$v.$(extension): $(addsuffix .$(object.extension), $(basename $($v.class.sources))) \
$(addsuffix .$(object.extension), $(basename $(common.sources)))
endef

# evaluate explicit prerequisite rules for all classes
Expand Down Expand Up @@ -1005,7 +1030,7 @@ endif
# argument $1 is input source file(s)
# dir is explicitly added because option -MM strips it by default
define declare-object-target
$(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST)
$(dir $1)$(patsubst %.o:,%.$(object.extension):,$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1))) $(MAKEFILE_LIST)
endef

# evaluate implicit prerequisite rules when rebuilding everything
Expand Down
38 changes: 17 additions & 21 deletions Code_source/Compiled/control/lua/README
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Current maintainer: Albert Gräf <[email protected]>
This source is available on GitHub: https://github.com/agraef/pd-lua

Since the contents of the original README has become rather outdated, I've
updated the information below.

pdlua works with all Pd flavors out there and makes Pd external programming
incredibly easy (please check the included examples and the tutorial in the
corresponding subdirectories). Originally written by Claude Heiland-Allen,
Expand All @@ -44,7 +41,7 @@ tutorial first. See:
https://agraef.github.io/pd-lua/tutorial/pd-lua-intro.html

This contains a fairly gentle introduction to pdlua, walks you through the
creation of a basic example, and then goes on to cover all major features of
creation of a basic example, and then goes on to cover most major features of
pdlua, including the special facilities for tables, clocks, receivers, and
live-coding, in quite some detail. This will be helpful when embarking on your
own projects, or trying to make sense of the included examples.
Expand All @@ -54,9 +51,7 @@ History and Credits:

pdlua was originally written by Claude Heiland-Allen, with contributions by
Frank Barknecht and Martin Peach, according to the original source.

Claude's repository is still online at https://code.mathr.co.uk/pdlua; please
also check Claude's website at https://mathr.co.uk/, and
Please check Claude's website at https://mathr.co.uk/, and
https://mathr.co.uk/blog/lua.html for Lua-related content on his blog
(including pdlua's original announcement).

Expand All @@ -65,17 +60,17 @@ the history in Pd's old svn repository at SourceForge, including IOhannes
Zmölnig's loader update for Pd 0.47. See
https://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals/loaders/pdlua/

The present source is a fork of umlaeute's repository at
https://anonscm.debian.org/git/pkg-multimedia/pd-lua.git, from which the
official Debian packages are built. This in turn is apparently based on the
0.7.3 version of pdlua in Pd's svn repository.
The present source is a fork of umlaeute's 0.7.3 version in the Debian package
repository at https://anonscm.debian.org/git/pkg-multimedia/pd-lua.git, which
in turn was based on the 0.7.3 version of pdlua in Pd's svn repository.

The current version (0.8 and later) is actively maintained by Albert Gräf
<[email protected]>, with contributions by Claude Heiland-Allen (Lua 5.4
update, bugfixes), Alexandre Porres (documentation updates), sebshader
(relative path loading), and Timothy Schoen (plugdata compatibility). This is
also the version included in Purr Data (https://github.com/agraef/purr-data)
and Timothy Schoen's plugdata (https://github.com/plugdata-team/plugdata).
The current version (0.8 and later) is actively maintained by Albert Gräf,
with contributions by Claude Heiland-Allen (Lua 5.4 update, bugfixes),
Alexandre Porres (documentation updates, Deken package), sebshader (relative
path loading), and Timothy Schoen (plugdata compatibility, signal and graphics
support). This is also the version included in Purr Data
(https://github.com/agraef/purr-data) and Timothy Schoen's plugdata
(https://github.com/plugdata-team/plugdata).

Please file bugs and requests at https://github.com/agraef/pd-lua. I maintain
a lot of packages and thus it may take a while at times, but I look at all the
Expand All @@ -86,10 +81,11 @@ Ready-Made Packages:

The latest vanilla binaries for Ubuntu, Mac and Windows can always be found on
https://github.com/agraef/pd-lua. The same version is also in the Arch
community repository (maintained by dvzrv, thanks David!). On other Linux
systems you'll have to compile pdlua yourself from source, which isn't hard to
do (see below). Also, both Purr Data and plugdata ship with pdlua, so no 3rd
party package is needed.
community repository (maintained by dvzrv, thanks David!). Other packages are
available in Debian (maintained by IOhannes Zmölnig) and Deken (maintained by
Alexandre Porres). You can also compile pdlua yourself from source, which
isn't hard to do (see below). Also, both Purr Data and plugdata ship with
pdlua, so no 3rd party package is needed in those environments.

To enable the pdlua loader in Pd after installation, just add `pdlua` to your
startup libraries (after adding its parent directory to Pd's search path if
Expand Down
Loading

0 comments on commit 5a4489f

Please sign in to comment.