17 feb. 2010 : PHP-GTK Application descriptions can now be submitted in Brazilian Portuguese too. Thanks Bruno Bandeira !.

German and Italian still missing: who will contribute the translated categories for these languages ? Contact the team to offer your translations !

Install PHP-GTK 2 with Gnope for UNIX-Linux

About Gnope

Gnope is a central site where you can find interesting applications and library for PHP-GTK developpement. Gnope has a repository for quick access to package installation. Gnope package managment is based on pear, so you need to have a working pear environment to start working with Gnope. If you have built PHP-GTK on your own, you should have pear installed. You just have to locate the pear command :

locate '*bin/pear*'

Installation steps

You should have a look a basic options of the pear command :

  pear help
  pear config-show
  pear install
  

If you are behind a firewall with a proxy for internet connection, just configure pear to use the proxy:

  pear config-set http_proxy http://hostname:port/
  

Many packages in pear are available in an early developpement status. You have to choose a level state for package developpement. If you choose a low level, you can access many packages. If you choose a high stability level, a smaller number of packages will be available for installation.

  # possible values : stable beta alpha devel snapshot ; default : stable
  pear config-set preferred_state devel
  

Now we have to discover Gnope channel :

  pear channel-discover gnope.org
  

Now install 2 mandatory packages ; after that, you will be able to drive Gnope application graphically :

  pear install --alldeps PEAR_Frontend_Gtk2
  pear install --alldeps gnope/Gnope_AppRunner
  pear install PEAR_Frontend_Gtk2
  

At this point, Gnope "runner" and "installer" should be installed.

Ubuntu linux

You need to install first some packages before using pear command :

  sudo apt-get install php5-cli php-pear

Also, you'll need to build php-gtk2 extention ; there is a tutorial page in this wiki

Running

Applications should be located in PEAR_DIR/lib/php/..... To provide an easy acces to those applications, here is a nice bash script named gnope :

#!/bin/sh

# gnope command line interface to package :
# - Gnope_AppRunner : 
# - Pear Gtk2 frontend installer
#
# links : 
#  http://www.gnope.org/
#  http://pear.php.net/
#

pear_dir=`pear config-show | grep php_dir | sed -e 's/PEAR.*php_dir//' -e 's/\s*//'`

case "$1" in
  runner)
    exec php -q $pear_dir/Gnope/AppRunner/run.phpw
    ;;

  installer)
    exec php -q $pear_dir/PEAR/Frontend/Gtk2/run.phpw
    ;;

  *)
    echo $"Usage: $0 {runner|installer}"
    ;;
esac

Script usage :

  • gnope runner : will run application selection and runner interface,
  • gnope installer : will launch pear (gnope) application installer user interface.

Links

  • http://pear.php.net/ - Pear classes ; no applications but a central place for PHP classes,
  • http://www.gnope.org/ - Gnope site ; contains library and applications for PHP-GTK2