swfmillインストール手順

2009-09-22


仕事で、swfmillを使う機会があったので、自分用にメモ。 swfmillは、swfを解析してXMLを生成したり、逆にXMLからswfを生成するためのライブラリ。

今回自分が使ったのは、XML→swfへの変換だけ。 システムで動的にswfを生成して表示するというパターン。

環境はCentOS5.4です。

[root@hostname ~]# cd /usr/local/src
[root@hostname src]# wget http://swfmill.org/releases/swfmill-0.2.12.tar.gz
[root@hostname src]# tar -zxvf swfmill-0.2.12.tar.gz
[root@hostname src]# cd swfmill-0.2.12

続いて、携帯端末向けのFlashLite1.x用のパッチを適用

[root@hostname swfmill-0.2.12]# wget http://lab.klab.org/files/flash/encoding.patch
[root@hostname swfmill-0.2.12]# patch -p1 < encoding.patch

一度コンパイルしてみると、なんかエラーが出た

checking for XML… configure: error: Package requirements (libxml-2.0) were not met:
No package ‘libxml-2.0’ found

libxml2-develをインストールする。

[root@hostname swfmill-0.2.12]# yum install libxml2-devel

再度コンパイル。

checking for FREETYPE… configure: error: Package requirements (freetype2) were not met:
No package ‘freetype2’ found

んー。freetype2とかいうものが足りないらしい。 yum search freetype2してみたが、そんなものはないらしく、代わりにfreetype-develというものはあったので、こちらをインストール。

[root@hostname src]# yum install freetype-devel

3度目の正直で再度コンパイル。

checking for PNG… configure: error: Package requirements (libpng) were not met:
No package ‘libpng’ found

libpng-develをインストール。

[root@hostname src]# yum install libpng-devel

これで、ようやくコンパイルできた。

[root@hostname]# cd /usr/local/src/swfmill-0.2.12/
[root@hostname swfmill-0.2.12]# ./configure
[root@hostname swfmill-0.2.12]# make
[root@hostname swfmill-0.2.12]# make install

これで、swfmillコマンドが使えるようになっていればインストール完了。


© 2025, sakama.dev - Built with Gatsby