From e306932afa409fe7a07ed9126a6766139c579754 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 17 Dec 2004 05:04:29 +0000 Subject: support for Python threads, at last output single atoms instead of 1-element lists small changes for release using flext build system svn path=/trunk/; revision=2398 --- externals/grill/py/build-pd-msvc.bat | 4 -- externals/grill/py/build-win-max-msvc.bat | 4 ++ externals/grill/py/build-win-pd-msvc.bat | 4 ++ externals/grill/py/config-pd-msvc.txt | 33 --------------- externals/grill/py/config-win-max-msvc.txt | 11 +++++ externals/grill/py/config-win-pd-msvc.txt | 12 ++++++ externals/grill/py/makefile-win-msvc.txt | 15 +++++++ externals/grill/py/makefile.pd-msvc | 66 ----------------------------- externals/grill/py/maxmsp/thread-1.mxb | Bin 2965 -> 3236 bytes externals/grill/py/py.vcproj | 45 +++++++++++--------- externals/grill/py/readme.txt | 3 +- externals/grill/py/source/clmeth.cpp | 6 +-- externals/grill/py/source/main.h | 4 +- 13 files changed, 77 insertions(+), 130 deletions(-) delete mode 100644 externals/grill/py/build-pd-msvc.bat create mode 100644 externals/grill/py/build-win-max-msvc.bat create mode 100644 externals/grill/py/build-win-pd-msvc.bat delete mode 100644 externals/grill/py/config-pd-msvc.txt create mode 100644 externals/grill/py/config-win-max-msvc.txt create mode 100644 externals/grill/py/config-win-pd-msvc.txt create mode 100644 externals/grill/py/makefile-win-msvc.txt delete mode 100644 externals/grill/py/makefile.pd-msvc (limited to 'externals/grill') diff --git a/externals/grill/py/build-pd-msvc.bat b/externals/grill/py/build-pd-msvc.bat deleted file mode 100644 index d6187f08..00000000 --- a/externals/grill/py/build-pd-msvc.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo --- Building with MS Visual C++ --- - -nmake -f makefile.pd-msvc clean -nmake -f makefile.pd-msvc diff --git a/externals/grill/py/build-win-max-msvc.bat b/externals/grill/py/build-win-max-msvc.bat new file mode 100644 index 00000000..436f6a8e --- /dev/null +++ b/externals/grill/py/build-win-max-msvc.bat @@ -0,0 +1,4 @@ +@echo --- Building with MS Visual C++ --- + +nmake -f ..\flext\build\make-win-max-msvc.txt clean +nmake -f ..\flext\build\make-win-max-msvc.txt diff --git a/externals/grill/py/build-win-pd-msvc.bat b/externals/grill/py/build-win-pd-msvc.bat new file mode 100644 index 00000000..942ee174 --- /dev/null +++ b/externals/grill/py/build-win-pd-msvc.bat @@ -0,0 +1,4 @@ +@echo --- Building with MS Visual C++ --- + +nmake -f ..\flext\build\make-win-pd-msvc.txt clean +nmake -f ..\flext\build\make-win-pd-msvc.txt diff --git a/externals/grill/py/config-pd-msvc.txt b/externals/grill/py/config-pd-msvc.txt deleted file mode 100644 index 1d145e62..00000000 --- a/externals/grill/py/config-pd-msvc.txt +++ /dev/null @@ -1,33 +0,0 @@ -# py/pyext - python script objects for PD and Max/MSP -# Copyright (c)2002-04 Thomas Grill (xovo@gmx.net) -# - -# where is PD? -PDPATH=c:\programme\audio\pd - -# where do the flext libraries reside? -FLEXTPATH=$(PDPATH)\flext - -# where is MS VC++? -# (not necessary if the build is run with the compiler environment) -# MSVCPATH=C:\Programme\Microsoft Visual Studio .NET 2003\Vc7 - -# which version of Python? -PYTHONVER=python23 - -# where are the python header files? -PYTHONINCLUDE=c:\programme\prog\$(PYTHONVER)\include - -# what is the python library file? -PYTHONLIB=c:\programme\prog\$(PYTHONVER)\libs\$(PYTHONVER).lib - -# where should the external be built? -OUTPATH=pd-msvc - -# where should the external be installed? -# (leave blank to omit installation) -INSTPATH=$(PDPATH)\extra - -# user defined compiler flags -# (check if they match your system!) -UFLAGS=/G6 /Ox diff --git a/externals/grill/py/config-win-max-msvc.txt b/externals/grill/py/config-win-max-msvc.txt new file mode 100644 index 00000000..6ea09abd --- /dev/null +++ b/externals/grill/py/config-win-max-msvc.txt @@ -0,0 +1,11 @@ +# py/pyext - python script objects for PD and Max/MSP +# Copyright (c)2002-04 Thomas Grill (gr@grrrr.org) +# +# +# Your settings are defined in the file +# ..\flext\build\config-win-max-msvc.txt +# +# You can override them here. + +# where is the Python installation? +PYTHONPATH=c:\programme\prog\python24 diff --git a/externals/grill/py/config-win-pd-msvc.txt b/externals/grill/py/config-win-pd-msvc.txt new file mode 100644 index 00000000..828b469c --- /dev/null +++ b/externals/grill/py/config-win-pd-msvc.txt @@ -0,0 +1,12 @@ +# py/pyext - python script objects for PD and Max/MSP +# Copyright (c)2002-04 Thomas Grill (gr@grrrr.org) +# +# +# Your settings are defined in the file +# ..\flext\build\config-win-pd-msvc.txt +# +# You can override them here. + + +# where is the Python installation? +PYTHONPATH=c:\programme\prog\python24 diff --git a/externals/grill/py/makefile-win-msvc.txt b/externals/grill/py/makefile-win-msvc.txt new file mode 100644 index 00000000..9d923235 --- /dev/null +++ b/externals/grill/py/makefile-win-msvc.txt @@ -0,0 +1,15 @@ +# py/pyext - python script object for PD and Max/MSP +# Copyright (C)2002-04 Thomas Grill (gr@grrrr.org) +# +# Makefile for MSVC++ 6 and 7 +# +# usage: +# to build run "build-max-msvc.bat" or "build-pd-msvc.bat" +# + +# includes +INCPATH=/I$(PYTHONPATH)\include +LIBPATH=/LIBPATH:$(PYTHONPATH)\libs + +# multithreaded build +FLEXT_THREADED=1 diff --git a/externals/grill/py/makefile.pd-msvc b/externals/grill/py/makefile.pd-msvc deleted file mode 100644 index e78b60d4..00000000 --- a/externals/grill/py/makefile.pd-msvc +++ /dev/null @@ -1,66 +0,0 @@ -# py/pyext - python script object for PD and Max/MSP -# Copyright (C)2002-04 Thomas Grill (xovo@gmx.net) -# -# Makefile for MSVC++ 6 and 7 -# -# usage: -# to build run "make -f makefile.pd-msvc" -# - -!include config-pd-msvc.txt - -# includes -INCPATH=/I"$(MSVCPATH)\include" /I"$(PYTHONINCLUDE)" /I"$(PDPATH)\src" /I"$(FLEXTPATH)" -LIBPATH=/LIBPATH:"$(MSVCPATH)\lib" /LIBPATH:"$(PDPATH)\bin" /LIBPATH:"$(FLEXTPATH)" - -# compiler definitions and flags -DEFS=/DFLEXT_SYS=2 /DFLEXT_THREADS -CFLAGS=/MT $(UFLAGS) - -# for VC7 -CFLAGS=$(CFLAGS) /EHsc - - -LIBS=pd.lib pthreadVC.lib $(PYTHONLIB) - -!ifdef FLEXT_SHARED -LIBS=$(LIBS) flext.lib -DEFS=$(DEFS) /DFLEXT_SHARED -!else -LIBS=$(LIBS) flext_t-pdwin.lib -!endif - - -# the rest can stay untouched -# ---------------------------------------------- - -NAME=py - -# all the source files from the package -!include make-files.txt - -all: $(OUTPATH) $(OUTPATH)\$(NAME).dll - -# remove build -clean: - -del /q $(OUTPATH) > nul - -rmdir $(OUTPATH) > nul - -OBJS= $(SRCS:.cpp=.obj) - -$(OUTPATH): - -mkdir $(OUTPATH) > nul - -{$(SRCDIR)}.cpp{}.obj: - cl /c /LD $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(OUTPATH)\$@ - -$(OUTPATH)\$(NAME).dll: $(OBJS) - cd $(OUTPATH) - link /DLL /out:$(NAME).dll /INCREMENTAL:NO $** $(LIBS) $(LIBPATH) - @-del *.exp - @-del *.lib - cd .. -!ifdef INSTPATH - @-if not exist $(INSTPATH) mkdir $(INSTPATH) - copy $@ $(INSTPATH) > nul -!endif diff --git a/externals/grill/py/maxmsp/thread-1.mxb b/externals/grill/py/maxmsp/thread-1.mxb index efdce293..a6bb6f27 100644 Binary files a/externals/grill/py/maxmsp/thread-1.mxb and b/externals/grill/py/maxmsp/thread-1.mxb differ diff --git a/externals/grill/py/py.vcproj b/externals/grill/py/py.vcproj index cac17abd..e658e3e3 100644 --- a/externals/grill/py/py.vcproj +++ b/externals/grill/py/py.vcproj @@ -85,16 +85,17 @@ @@ -104,10 +105,11 @@ OutputFile="$(outdir)/py.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="c:/programme/audio/pd/bin;"..\flext\pd-msvc";"f:\prog\packs\Python-2.3.4\PCbuild"" + AdditionalLibraryDirectories="c:/programme/audio/pd/bin;"c:\data\prog\packs\Python-2.4\PCbuild"" GenerateDebugInformation="TRUE" - ProgramDatabaseFile=".\pd-msvc\td/py.pdb" - ImportLibrary=".\pd-msvc\td/py.lib" + ProgramDatabaseFile="$(outdir)/py.pdb" + SubSystem="2" + ImportLibrary="$(outdir)/py.lib" TargetMachine="1"/> @@ -168,9 +170,10 @@ OutputFile="pd-msvc\py.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="c:/programme/audio/pd/bin;"..\flext\pd-msvc";C:\Programme\prog\Python23\libs" - ProgramDatabaseFile=".\pd-msvc\tr/py.pdb" - ImportLibrary=".\pd-msvc\tr/py.lib" + AdditionalLibraryDirectories="c:/programme/audio/pd/bin;"..\flext\pd-msvc";C:\Programme\prog\Python24\libs" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile="$(outdir)/py.pdb" + ImportLibrary="$(outdir)/py.lib" TargetMachine="1"/> @@ -469,7 +472,7 @@ Count() && IsSymbol((*lst)[0])) ext->ToQueueAnything(o-1,GetSymbol((*lst)[0]),lst->Count()-1,lst->Atoms()+1); -// ext->ToOutAnything(o-1,GetSymbol((*lst)[0]),lst->Count()-1,lst->Atoms()+1); - else + else if(lst->Count() > 1) ext->ToQueueList(o-1,*lst); -// ext->ToOutList(o-1,*lst); + else + ext->ToQueueAtom(o-1,*lst->Atoms()); } else post("pyext: outlet index out of range"); diff --git a/externals/grill/py/source/main.h b/externals/grill/py/source/main.h index 3aed0f10..6dde3f54 100644 --- a/externals/grill/py/source/main.h +++ b/externals/grill/py/source/main.h @@ -24,8 +24,8 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include #endif -#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) -#error You need at least flext version 0.4.6 +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 408) +#error You need at least flext version 0.4.8 #endif #define PY__VERSION "0.2.0pre" -- cgit v1.2.1