MacBookProにSWFEditorをいれてみた

Twitter ツイート Hatena Bookmark ブックマーク

過去にMacにSWFEditorをいれていたのですが、なんかPNG画像の差し替えしてたらエラーがでてしまいました。
こんな感じのエラーです。

1
replacePNGData: no png library

pngのライブラリが・・ない・・・だと・・・
いや馬鹿な、そんなはずはないpngライブラリは入っているはずだ・・・

とりあえずlibpngが入っているか調査してみた

1
2
3
4
5
$ port installed libpng

The following ports are currently installed:
  libpng @1.4.5_0
  libpng @1.4.8_0 (active)

はいってた・・・
一応giflibも入っているか確認してみよう。

1
2
3
4
$ port installed giflib

The following ports are currently installed:
  giflib @4.1.6_1 (active)

なんとgiflibまで入っているではないか・・・

よーわからん。。。
まあバージョン0.40つかってて、新しいの出てるしいれ直そうってことで入れ直しました。

1
2
3
4
5
$ wget "http://sourceforge.jp/frs/redir.php?m=iij&f=%2Fswfed%2F52887%2Fswfed-0.46.tar.gz"
$ tar zxvf swfed-0.46.tar.gz
$ cd swfed-0.46/src
$ phpize
$ ./configure

あれconfigureしたら止まりやがった・・・

1
2
3
4
5
6
checking for the location of ZLIB... no
checking for the location of LIBPNG... no
checking for the location of GIFLIB... no
checking for the location of zlib... /usr
checking for the location of libpng... configure: error: swfed support requires LIBPNG. Use --with-png-dir=<dir>
  to specify prefix where LIBPNG include and library are located
1
2
3
4
5

$ ./configure --with-png-dir=/opt/local --with-gif-dir=/opt/local

make
make install
1
2
3
4
5

vi /opt/local/etc/php5/php.ini

[SWFEditor]
extension=swfed.so
comments powered by Disqus
Built with Hugo
テーマ StackJimmy によって設計されています。