Method Compile library Pure Data Windows

Method to compile a Pure Data library on Windows.
Méthode pour compiler une librairie Pure Data sous Windows.

On Windows 10 Pro 64bit.

Example with the percolate library and the source code:
https://sourceforge.net/projects/fork-percolate/  (1 2020)
PeRColate is an open-source distribution of a variety of synthesis and signal processing algorithms...

Method written in March 2021.

Documentation:
http://msp.ucsd.edu/Pd_documentation/x6.htm#s6.5
"6.5. Windows
Pd on Windows can be built with either MinGW or Cygwin which provide the core build requirements: a compiler chain & shell environment.
It is recommended to use the Msys2 distribution which provides both a Unix command shell and MinGW..."
https://puredata.info/docs/developer/WindowsMinGW


MSYS2 install
"MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software."

Download the 64-bit installer from:
https://www.msys2.org/ -> msys2-x86_64-20210228.exe (94M)
Run the installer.
-> Enter your desired Installation Folder -> C:\msys64
...
Run MSYS2
Update the package database:
p@p MSYS ~
$ pacman -Syu
...
To complete this update all MSYS2 processes including this terminal will be closed. Confirm to proceed [Y/n]
Y ...
 
Windows -> Start menu -> MSYS2 64bit -> MSYS2 MSYS
Update the rest of the base packages:
p@p MSYS ~
$ pacman -Su
:: Starting core system upgrade...
...
p@p MSYS ~
Install tools (gcc etc...):
p@p MSYS ~
$ pacman -S --needed base-devel mingw-w64-x86_64-toolchain
...
Enter a selection (default=all):
All install... 15 minutes on my Toshiba i5 2.67G 4M RAM...
Total Download Size:  197.25 MiB
Total Installed Size:  1265.24 MiB
Close the window
 

Pd install
64bit
To build a library for Pd 64bit, Pd 64bit must be installed.
http://puredata.info/downloads/pure-data
    -> Get Pure Data for Windows Installer for Microsoft Windows, 64 bit executable
        -> Download:
            http://msp.ucsd.edu/Software/pd-0.51-3.windows-installer.exe
Install
-> C:\Program Files\Pd\

32bit
To build a library for Pd 32bit, Pd 32bit must be installed.
http://puredata.info/downloads/pure-data
    -> Get Pure Data for Windows (6.3MB) Installer for Microsoft Windows 32 bit executable (XP or later)
        -> Download:
            http://msp.ucsd.edu/Software/pd-0.51-3-i386.windows-installer.exe
Install
-> C:\Program Files (x86)\Pd\


Build percolate library 64bit
Create a "FolderPd" folder on the desktop
-> C:\Users\p\Desktop\FolderPd

Download source of percolate library:
https://sourceforge.net/projects/fork-percolate/
    -> PeRColate4PD.tar.gz
        -> PeRColate4PD folder
Place PeRColate4PD folder in FolderPd:
-> C:\Users\p\Desktop\FolderPd\PeRColate4PD\

Windows -> Start menu -> MSYS2 64bit -> MSYS2 MinGW 64-bit
CAUTION: change the \ windows to /
p@p MINGW64 ~
$ cd C:/Users/p/Desktop/FolderPd/PeRColate4PD

p@p MINGW64 /c/Users/p/Desktop/FolderPd/PeRColate4PD
$ make
++++ info: using Makefile.pdlibbuilder version 0.6.0
++++ info: using Pd API C:\Program Files/Pd/src/m_pd.h
++++ info: making target all in lib percolate
++++ info: making src/absmax~.o in lib percolate
...
++++info: target all in lib percolate completed
percolate.dll is built in:
C:\Users\p\Desktop\FolderPd\PeRColate4PD
 

MSYS2 install - continued
Installation of additional 32bit tools is required to build a 32bit Pd compatible library.
Windows -> Start menu -> MSYS2 64bit -> MSYS2 MSYS
Install tools 32bit (gcc etc...):
p@p MSYS ~
$ pacman -S --needed base-devel mingw-w64-i686-toolchain
...
Enter a selection (default=all):
All install...
Close the window


Build percolate library 32bit
Create a "FolderPd" folder on the desktop
-> C:\Users\p\Desktop\FolderPd

Download source of percolate library:
https://sourceforge.net/projects/fork-percolate/
    -> PeRColate4PD.tar.gz
        -> PeRColate4PD folder
Place PeRColate4PD folder in FolderPd:
-> C:\Users\p\Desktop\FolderPd\PeRColate4PD\

Windows -> Start menu -> MSYS2 64bit -> MSYS2 MinGW 32-bit
CAUTION: change the \ windows to /
p@p MINGW32 ~
$ cd C:/Users/p/Desktop/FolderPd/PeRColate4PD

p@p MINGW32 /c/Users/p/Desktop/FolderPd/PeRColate4PD
$ make
++++ info: using Makefile.pdlibbuilder version 0.6.0
++++ info: using Pd API C:\Program Files (x86)/Pd/src/m_pd.h
++++ info: making target all in lib percolate
++++ info: making src/percolate.o in lib percolate<
...
++++info: target all in lib percolate completed
percolate.dll is built in:
C:\Users\p\Desktop\FolderPd\PeRColate4PD
 

percolate.dll 32bit & 64bit:
PercolateWindows.zip
PeRColate for Pure Data version 0.09
PeRColate: written for Max/MSP by Dan Trueman and R. Luke DuBois
PeRColate: ported to PD by Olaf Matthes <olaf.matthes@gmx.de>
PeRColate: adapted to Linux by Maurizio Umberto Puxeddu <umbpux@tin.it>
PeRColate: help files ported by Martin Dupras <martin.dupras@uwe.ac.uk>
Source code fixed by Julien Ottavi:
https://sourceforge.net/projects/fork-percolate/


A use of the percolate library:
https://github.com/gerardparesys/ARGOPd/. ./ExMM217-FilterBank



Links:
http://puredata.info 
http://msp.ucsd.edu/Pd_documentation/x6.htm#s6.8 
You can also build a Windows binary of Pd on a Linux system, using a cross-compilation toolchain.
https://forum.pdpatchrepo.info/topic/12428/64-bit-build-of-percolate-library
https://github.com/pure-data/externals-howto
 

Paresys Accueil 21 2 2023    Valid HTML 4.01 Transitional Paresys Home