wxPerl Installation Script for Ubuntu 14.04LTS 64bit
James Lynes <[email protected]>
| Newsgroups | gmane.comp.lang.perl.wxperl |
|---|---|
| Message-ID | <CABPysej-9eZOUngkgP59KR4O_anrkN+Q=1Q3ciLTfvtMyVG-LA@mail.gmail.com> |
Steve, et.al.
I ran the install script that I had previously posted, over the weekend. I
didn't get an accurate runtime as I thought I would be able to scroll up
the terminal window and get the start time, but the mass of messages
overflowed the terminal window buffering. At any rate I estimate it took
about 1 1/2 hours.
I tried running it again, but it died due to the wxPerl directory not being
empty.
So, I add commands to delete the Alien-wxWidgets and wxPerl directories and
to log messages to a file. This version(below) ran in about 45 minutes, I
assume because the packages were all ready updated and all the cpan stuff
was already installed. Also included is the .desktop file need to create a
Launcher entry.
wxDemo is working! Try the media control demo then the next control down. I
get an X crash when I do that.
Comments for improvement are welcome.
Thanks for your help.
James
#!/bin/bash
#
# wxPerl Installation Script for Ubuntu 14.04LTS 64bit
#
# Author: Steve Cookson (Kbuntu 14.04LTS 64bit Version)
# Modified By: James M. Lynes, Jr.
# Last Modified: October 5, 2014
#
# To Install: Save this file as ~/Perl/wxPerl-Installer.sh
# Open a Terminal window
# cd ~/Perl
# sudo -s
# sh -v wxPerl-Installer.sh > ~/Perl/wxPerl-Installer.log
#
# (sh wxPerl-Installer.sh if you don't want the log file created)
# (all output will then go only to your screen)
#
# Notes: This script uses your system Perl(v5.18.2 in 14.04LTS).
# The wxPerl Demo program installs into /usr/local/bin/wxperl_demo.pl
# Installation log saved in ~/Perl/wxPerl-Installer.log.
# Installation script run time saved in
~/Perl/wxPerl-Installer.runtime.
# Installs wxWidgets 3.0.1 below your home directory.
# see the --wxWidgets-version=3.0.1 line below.
# Modify this script to add any libraries or Perl Modules you
require.
# Modify this script to put log files in other than ~/Perl/.
# Uncomment optional git sections below to create local
# repositories for wxWidgets and wxPerl.
# Comment out the rm -r Alien-wxWidgets and rm -r wxPerl
# to leave previous downloads intact.
# root owns the files created by this script. Must be su to delete.
# See below for creating a Launcher for wxperl_demo.pl
# This script takes approximately 1 hours and 30 minutes to run
# the first time on an HP 15 with Intel 2.16 GHz Quadcore.
# Approximately 45 minutes there after since system libraries
# and cpan modules were installed/updated the first time.
#
#
# Reset packages in case there was a previous crash.
#
date # Note the start date/time
date > ~/Perl/wxPerl-Installer.runtime # Log the start date/time
cd ~ # Install into your home directory
rm -r Alien-wxWidgets # Optional clean install
rm -r wxPerl # Optional clean install
dpkg --configure -a # Configure all unpacked packages
apt-get -y update # Resync package indexes
apt-get -y upgrade # Install newest version of packages
#
# Install the dependencies first
#
# Install the Development Environment
#
apt-get -y install make # Needed for cpan
apt-get -y install g++
apt-get -y install gcc
apt-get -y install subversion # Needed for proper
Alien-wxWidgets and wxPerl
apt-get -y install git # Needed for custom install
Alien-wxWidgets and wxPerl
apt-get -y install libgconf2-dev # Needed as wxMediaCtrl dependency
apt-get -y install libgtk-3-dev # Needed as wxMediaCtrl dependency
apt-get -y install libexpat1-dev
apt-get -y install libtiff4-dev
apt-get -y install libpng12-dev
apt-get -y install libjpeg-dev
apt-get -y install libcairo2-dev
apt-get -y install libxmu-dev
apt-get -y install libwebkitgtk-dev
#
# Install the Video environment (wxMediaCtrl dependencies)
#
apt-get -y install libgstreamer0.10-dev # Needed for
Alien-wxWidgets and wxPerl
apt-get -y install libgstreamer-plugins-base0.10-dev # Needed for
Alien-wxWidgets and wxPerl
#
apt-get -y install cups-pdf # Needed for PDF
printing
apt-get -y install apparmor-utils # Confine an application's
resources
aa-complain cupsd # Report resource policy violations
#
# Install Perl modules
#
cpan -i ExtUtils::XSpp # Needed by wxPerl/Alien install
cpan -i ExtUtils::ParseXS # Needed by wxPerl Makefile.PL
cpan -i XSLoader # Needed by wxPerl/Alien install
cpan -i Encode # Needed for utf-8
cpan -i Test::Pod # ?
cpan -i ExtUtils::MakeMaker # ?
cpan -i Pod::Coverage # ?
cpan -i Test::Pod::Coverage # ?
#
# Install OpenGL and Dependencies
#
apt-get -y install libglu1-mesa-dev
apt-get -y install freeglut3-dev
apt-get -y install mesa-common-dev # Needed by OpenGL
apt-get -y install libsdl1.2-dev # ?
apt-get -y remove libwxgtk2.8-dev
apt-get -y install libwxgtk3.0-dev
apt-get autoremove # Remove packages no longer needed
cpan -i OpenGL
#
# Download Alien-wxWidgets(wxWidgets)
#
cd ~
git clone https://github.com/SteveBz/Alien-wxWidgets
#
# Compile wxWidgets
#
cd ~/Alien-wxWidgets
perl Build.PL \
--wxWidgets-build=1 \
--wxWidgets-graphicscontext \
--wxWidgets-build-opengl=1 \
--wxWidgets-version=3.0.1 \
--wxWidgets-source=tar.bz2 \
--wxWidgets-unicode=1 \
--wx-unicode='yes' \
--wxWidgets-extraflags="--enable-graphics_ctx \
--disable-compat26 \
--enable-mediactrl \
--with-libjpeg=builtin \
--with-libpng=builtin \
--with-regex=builtin \
--with-libtiff=builtin \
--with-zlib=builtin \
--with-expat=builtin \
--with-libxpm=builtin \
--with-gtk=2\
--with-gtkprint"
#
# Build wxWidgets
#
perl Build
# Baseline Alien-wxWidgets on git. # Optional local wxWidgets
repository
#git init # |
#git add * # |
#git commit -am "Adding Alien-wxWidgets baseline" # |
perl Build install
ldconfig # Configure dynamic linker run-time bindings
#
# Download wxPerl
#
cd ~
git clone https://github.com/SteveBz/wxPerl
#
# Build wxPerl
#
cd ~/wxPerl
perl Makefile.PL
make
# Baseline wxPerl on git. # Optional local wxPerl repository
#git init # |
#git add ~/wxPerl # |
#git commit -am "Adding wxPerl baseline" # |
make install
#
# Install predecessors for Wx::PdfDocuments
#
cd ~
cpan -i Wx::GLCanvas
cpan -i Text::Patch
cpan -i Wx::PdfDocument
#
# Install wxDemo # Installs into /usr/local/bin/
wxperl_demo.pl
#
cpan -i Wx::Demo
#
# Install Locally Needed Modules(modify for your environment)
#
cpan -i App::cpanminus
cpan -i Device::SerialPort
apt-get -y install php5-gd # Needed for GD
apt-get -y install libgd2-xpm-dev # Needed for GD
cpan -i GD
cpan -i GD::Text
cpan -i GD::Graph
#
# Done
#
date # Note the ending date/time
date >> ~/Perl/wxPerl-Installer.runtime # Log the ending
date/time
#
#
# To create a Launcher for wxperl_demo.pl
#
# Copy the lines below into ~/Perl/wxperl_demo.desktop
# (Without the leading # and tab)
# Make the file executable
# (icon changes to wxpl.ico)
# Drag the icon to the Launcher
# Click on the icon to Launch wxperl_demo.pl
#
#
# [Desktop Entry]
# Name=wxPerl_Demo
# GenericName=wxPerl_Demo
# Comment=wxPerl GUI Demo Program
# Exec=perl /usr/local/bin/wxperl_demo.pl
# Icon=/home/your-user-name/wxPerl/wxpl.ico
# Terminal=false
# Type=Application
# Categories=Development
#
wxPerl-Installer.sh
(application/x-sh, 6.4 KB)
#!/bin/bash
#
# wxPerl Installation Script for Ubuntu 14.04LTS 64bit
#
# Author: Steve Cookson (Kbuntu 14.04LTS 64bit Version)
# Modified By: James M. Lynes, Jr.
# Last Modified: October 5, 2014
#
# To Install: Save this file as ~/Perl/wxPerl-Installer.sh
# Open a Terminal window
# cd ~/Perl
# sudo -s
# sh -v wxPerl-Installer.sh > ~/Perl/wxPerl-Installer.log
#
# (sh wxPerl-Installer.sh if you don't want the log file created)
# (all output will then go only to your screen)
#
# Notes: This script uses your system Perl(v5.18.2 in 14.04LTS).
# The wxPerl Demo program installs into /usr/local/bin/wxperl_demo.pl
# Installation log saved in ~/Perl/wxPerl-Installer.log.
# Installation script run time saved in ~/Perl/wxPerl-Installer.runtime.
# Installs wxWidgets 3.0.1 below your home directory.
# see the --wxWidgets-version=3.0.1 line below.
# Modify this script to add any libraries or Perl Modules you require.
# Modify this script to put log files in other than ~/Perl/.
# Uncomment optional git sections below to create local
# repositories for wxWidgets and wxPerl.
# Comment out the rm -r Alien-wxWidgets and rm -r wxPerl
# to leave previous downloads intact.
# root owns the files created by this script. Must be su to delete.
# See below for creating a Launcher for wxperl_demo.pl
# This script takes approximately 1 hours and 30 minutes to run
# the first time on an HP 15 with Intel 2.16 GHz Quadcore.
# Approximately 45 minutes there after since system libraries
# and cpan modules were installed/updated the first time.
#
#
# Reset packages in case there was a previous crash.
#
date # Note the start date/time
date > ~/Perl/wxPerl-Installer.runtime # Log the start date/time
cd ~ # Install into your home directory
rm -r Alien-wxWidgets # Optional clean install
rm -r wxPerl # Optional clean install
dpkg --configure -a # Configure all unpacked packages
apt-get -y update # Resync package indexes
apt-get -y upgrade # Install newest version of packages
#
# Install the dependencies first
#
# Install the Development Environment
#
apt-get -y install make # Needed for cpan
apt-get -y install g++
apt-get -y install gcc
apt-get -y install subversion # Needed for proper Alien-wxWidgets and wxPerl
apt-get -y install git # Needed for custom install Alien-wxWidgets and wxPerl
apt-get -y install libgconf2-dev # Needed as wxMediaCtrl dependency
apt-get -y install libgtk-3-dev # Needed as wxMediaCtrl dependency
apt-get -y install libexpat1-dev
apt-get -y install libtiff4-dev
apt-get -y install libpng12-dev
apt-get -y install libjpeg-dev
apt-get -y install libcairo2-dev
apt-get -y install libxmu-dev
apt-get -y install libwebkitgtk-dev
#
# Install the Video environment (wxMediaCtrl dependencies)
#
apt-get -y install libgstreamer0.10-dev # Needed for Alien-wxWidgets and wxPerl
apt-get -y install libgstreamer-plugins-base0.10-dev # Needed for Alien-wxWidgets and wxPerl
#
apt-get -y install cups-pdf # Needed for PDF printing
apt-get -y install apparmor-utils # Confine an application's resources
aa-complain cupsd # Report resource policy violations
#
# Install Perl modules
#
cpan -i ExtUtils::XSpp # Needed by wxPerl/Alien install
cpan -i ExtUtils::ParseXS # Needed by wxPerl Makefile.PL
cpan -i XSLoader # Needed by wxPerl/Alien install
cpan -i Encode # Needed for utf-8
cpan -i Test::Pod # ?
cpan -i ExtUtils::MakeMaker # ?
cpan -i Pod::Coverage # ?
cpan -i Test::Pod::Coverage # ?
#
# Install OpenGL and Dependencies
#
apt-get -y install libglu1-mesa-dev
apt-get -y install freeglut3-dev
apt-get -y install mesa-common-dev # Needed by OpenGL
apt-get -y install libsdl1.2-dev # ?
apt-get -y remove libwxgtk2.8-dev
apt-get -y install libwxgtk3.0-dev
apt-get autoremove # Remove packages no longer needed
cpan -i OpenGL
#
# Download Alien-wxWidgets(wxWidgets)
#
cd ~
git clone https://github.com/SteveBz/Alien-wxWidgets
#
# Compile wxWidgets
#
cd ~/Alien-wxWidgets
perl Build.PL \
--wxWidgets-build=1 \
--wxWidgets-graphicscontext \
--wxWidgets-build-opengl=1 \
--wxWidgets-version=3.0.1 \
--wxWidgets-source=tar.bz2 \
--wxWidgets-unicode=1 \
--wx-unicode='yes' \
--wxWidgets-extraflags="--enable-graphics_ctx \
--disable-compat26 \
--enable-mediactrl \
--with-libjpeg=builtin \
--with-libpng=builtin \
--with-regex=builtin \
--with-libtiff=builtin \
--with-zlib=builtin \
--with-expat=builtin \
--with-libxpm=builtin \
--with-gtk=2\
--with-gtkprint"
#
# Build wxWidgets
#
perl Build
# Baseline Alien-wxWidgets on git. # Optional local wxWidgets repository
#git init # |
#git add * # |
#git commit -am "Adding Alien-wxWidgets baseline" # |
perl Build install
ldconfig # Configure dynamic linker run-time bindings
#
# Download wxPerl
#
cd ~
git clone https://github.com/SteveBz/wxPerl
#
# Build wxPerl
#
cd ~/wxPerl
perl Makefile.PL
make
# Baseline wxPerl on git. # Optional local wxPerl repository
#git init # |
#git add ~/wxPerl # |
#git commit -am "Adding wxPerl baseline" # |
make install
#
# Install predecessors for Wx::PdfDocuments
#
cd ~
cpan -i Wx::GLCanvas
cpan -i Text::Patch
cpan -i Wx::PdfDocument
#
# Install wxDemo # Installs into /usr/local/bin/wxperl_demo.pl
#
cpan -i Wx::Demo
#
# Install Locally Needed Modules(modify for your environment)
#
cpan -i App::cpanminus
cpan -i Device::SerialPort
apt-get -y install php5-gd # Needed for GD
apt-get -y install libgd2-xpm-dev # Needed for GD
cpan -i GD
cpan -i GD::Text
cpan -i GD::Graph
#
# Done
#
date # Note the ending date/time
date >> ~/Perl/wxPerl-Installer.runtime # Log the ending date/time
#
#
# To create a Launcher for wxperl_demo.pl
#
# Copy the lines below into ~/Perl/wxperl_demo.desktop
# (Without the leading # and tab)
# Make the file executable
# (icon changes to wxpl.ico)
# Drag the icon to the Launcher
# Click on the icon to Launch wxperl_demo.pl
#
#
# [Desktop Entry]
# Name=wxPerl_Demo
# GenericName=wxPerl_Demo
# Comment=wxPerl GUI Demo Program
# Exec=perl /usr/local/bin/wxperl_demo.pl
# Icon=/home/your-user-name/wxPerl/wxpl.ico
# Terminal=false
# Type=Application
# Categories=Development
#
wxPerl-Installer.runtime
(application/octet-stream, 29 B) - not displayed
wxPerl-Installer.screen
(application/octet-stream, 22.5 KB) - not displayed