2013-10-23

Ubuntu에서 Pd Vanilla 컴파일 하기

우분투 소프트웨어 센터나 apt-get으로 설치가 가능하지만, 1년 전 옛날버젼으로 설치되므로 바람직하지 못하다. 물론 apt-get이 설치는 편리하지만 최신 버젼을 컴파일링 해서 쓰는 것이 바람직 하다.

물론 이런 컴파일 과정이 귀찮은 사람은 조금 옛날 버젼이 설치되지만, sudo apt-get install puredata 로 편하게 설치하면 끝이다. 그러면 이 귀찮은 것을 보지 않아도 좋다.



Pd Vanilla Source를 다운받는다.
http://msp.ucsd.edu/software.html
압축을 푼다. 다른 툴로 그냥 풀어도 된다.
tar xzf pd-0.45-3.src.tar.gz

해당 디렉토리로 간다. 내가 받은 버젼은 0.45-3이다.
cd ~/Downloads/pd-0.45-3

컴파일에 필수적인 automake가 설치되어 있는지 확인해 보고 없으면 설치한다.
$ sudo apt-get install automake

컴파일에 필요한 의존성 패키지를 설치한다. tk8.5는 깔아도 되고 안 해도 되지만 안 하면 폰트 문제가 생길 수 있다. (기본적으로 우분투는 tk8.4가 설치되어있다.) libtool이 없으면 ./autogen.sh 실행이 안 될 수도 있다.
$ sudo apt-get install libasound2-dev
(옵션) sudo apt-get install tk8.5
(옵션) sudo apt-get install libtool
(옵션) sudo apt-get install gettext

**추가: 2015-03-16 / jack2 on amd64
case 1> jack2를 쓸 경우엔 이걸 설치하지 않으면 안 된다.
$ sudo apt-get install libjack-jackd2-dev

case 2> jack1일 경우엔
$ sudo apt-get install libjack-dev


컴파일을 한다. 다음을 순서대로 입력한다. install은 sudo로 하는 게 좋다.
./autogen.sh
./configure                     (jack support필요하면, $ ./configure --enable-jack)
make
sudo make install

어디에 설치되었는지 확인한다. 확인할 방법이 애매한데, 일단 여기에 있다.
/usr/local/bin

실행파일은
/usr/local/bin/pd

자동으로 프로그램에 등록이 안되기 때문에 프로그램으로 등록해 주거나, 터미널에서 pd 라고 입력한다. 절대경로로 /usr/local/bin/pd 라고 입력해도 실행된다.

아이콘 등록이 안 되어 있으므로, 수동으로 등록해 주어야 하는데 png파일만 등록이 되므로 귀찮다. 소스파일에는 .ico파일만 들어있다. 그냥 아무거나 이쁜걸로 대충 넣어서 쓰자. ico를 png로 바꿔서 저장하면 간단하다.
혹시 에러가 나거나 잘 안 되면 uninstall, make clean을 해 본다.
make uninstall
make clean
재 설치



설명서 원문을 첨부한다.
Quick compilation instructions for Gnu/linux or Mac OSX, or Windows if you have
installed gygwin:  make sure "automake" is installed as well as the usual C
compiler chain.  Then in this directory, type "./autogen.sh", then
"./configure"; then "make".

Alternatively, you can use the fallback makefiles in "src" for gnu/linux, Mac
OSX, or Microsoft Visual C.  On linux, for example, cd to src and type "make -f
makefile.gnu" and (if you wish) "sudo make -f makefile.gnu install".

Special instructions for Microsoft Visual C: cd to src and type "make -f
makefile.nt".  Then CD to the various subdirs of extra and type "make nt" in
each.

Various dependencies: in linux and Mac you need TK (apparently always present
for Mac and usually there for linux).  On linux you may also need an ALSA
"dev" package: (yum install alsa-lib-devel) or (apt-get install libasound2-dev).

참고:
http://msp.ucsd.edu/Pd_documentation/x3.htm#s1.2
http://puredata.info/docs/developer/BuildingPd

No comments:

Post a Comment