Ubuntu LTS 12 Notes

From WxPerl Wiki
Jump to: navigation, search

It is possible to install a fully working wxPerl with the latest wxWidgets version on Ubuntu LTS 12.

The following instructions assume installing to the system Perl 5.14.2 and so use sudo where appropriate. You can amend the instructions to suit your own installation.

Ubuntu Required Packages

Install the following packages using the package manager of your choice

gcc
g++
libgtk2.0-dev
libgstreamer0.10-dev
libgstreamer-plugins-base0.10-dev
libglu1-mesa-dev
libexpat1-dev
libtiff4-dev
libpng12-dev
libjpeg-dev
libcairo2-dev
freeglut3-dev
libxmu-dev
libwebkitgtk-dev

Install Latest ExtUtils::ParseXS

We need the installation of the latest ExtUtils::ParseXS to uninstall any previous version:

 sudo cpan
 <cpan> o conf make_install_arg UNINST=1
 <cpan> force install ExtUtils::ParseXS
 <cpan> quit

Install OpenGL

This supports the Wx::GLCanvas module

 cpan -i OpenGL

Install Alien::wxWidgets

Download the latest Alien-wxWidgets tarball from CPAN. In the extracted directory do

 perl Build.PL \
 --wxWidgets-build=1 \
 --wxWidgets-graphicscontext \
 --wxWidgets-build-opengl=1 \
 --wxWidgets-version=2.9.4 \
 --wxWidgets-source=tar.bz2 \
 --wxWidgets-extraflags="--with-gtkprint "
 perl Build
 perl Build test
 sudo Perl Build install

Install Wx modules

 sudo cpan -i Wx
 sudo cpan -i Wx::GLCanvas
 sudo cpan -i Wx::Demo

Run wxPerl Demo

 wxperl_demo.pl