good procedure to install gtk and glade in windows machine

This is a discussion on good procedure to install gtk and glade in windows machine within the Tech Board forums, part of the Community Boards category; Hi. i had collected some data regarding installation of gtk, glade, gcc, Python and cygwin. i followed those steps and ...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    136

    good procedure to install gtk and glade in windows machine

    Hi.
    i had collected some data regarding installation of gtk, glade, gcc, Python and cygwin.
    i followed those steps and made it work.

    How to install and make use of gtk and glade in windows

    I use these links to install gtk, glade, Cygwin, Python and ghc(for gcc compiler)
    GTK:
    http://ftp.gnome.org/pub/GNOME/binar...n32/gtk+/2.14/
    GLADE:
    http://sourceforge.net/project/showf...group_id=98754
    CYGWIN:
    http://www.cygwin.com
    PYTHON: (Python 2.5.2 Windows installer)
    http://python.org/download/
    GHC for GCC:
    http://www.haskell.org/ghc/download_ghc_661.html

    I installed these softwares in “C:\”
    Like

    C:\gtk
    C:\glade
    C:\cygwin
    C:\Python25
    C:\ghc

    And the environment variables:

    My Computer->Properties(right mouse button click)->Advanced->Environment Variables (button )->System Variables

    GTK_BASEPATH->C:\GTK

    INCLUDE->C:\GTK\INCLUDE;C:\GTK\INCLUDE\GTK-2.0;C:\GTK\INCLUDE\GLIB-2.0;C:\GTK\INCLUDE\PANGO-1.0;C:\GTK\INCLUDE\CAIRO;C:\GTK\INCLUDE\ATK-1.0;C:\GTK\INCLUDE\GTKGLEXT-1.0;C:\GTK\LIB\GTK-2.0\INCLUDE;C:\GTK\LIB\GLIB-2.0\INCLUDE;C:\GTK\LIB\GTKGLEXT-1.0\INCLUDE;C:\GTK\INCLUDE\LIBGLADE-2.0;C:\GTK\INCLUDE\LIBXML2

    LIB->C:\GTK\LIB

    Path->%GTK_BASEPATH%\bin; C:\cygwin\bin; C:\Python25

    PKG_CONFIG_PATH->C:\GTK\lib\pkgconfig


    GHC_BASEPATH->C:\ghc

    GLADE_BASEPATH->C:\glade


    And click Ok button.

    I am using command prompt.
    Start->Run…->cmd

    And type these to check it is working or not
    pkg-config --cflags gtk+-2.0

    if it is shows like this( for example, No worries)

    -mms-bitfields -IC:/gtk/include/gtk-2.0 -IC:/gtk/lib/gtk-2.0/include -IC:/gtk/in
    clude/atk-1.0 -IC:/gtk/include/cairo -IC:/gtk/include/pango-1.0 -IC:/gtk/include
    /glib-2.0 -IC:/gtk/lib/glib-2.0/include -IC:/gtk/include/freetype2 -IC:/gtk/incl
    Ude



    Else

    Package pixman-1 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `pixman-1.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'pixman-1', required by 'cairo', not found

    Then We have to download pixman-1.pc
    LINK:
    http://cairographics.org/releases/pixman-0.11.2.tar.gz
    download the file and extract it.

    Open the Cygwin command prompt.
    Change the directory( “cd folderpath” ) to “pixman-0.11.2” folder
    Type “ls”
    We can find “configure”
    Type “./configure”
    It will generate “pixman-1.pc” file
    Copy or Repalce this file to “C:\gtk\lib\pkgconfig”.




    Open the command prompt and type these
    pkg-config --cflags --libs gtk+-2.0 > all.txt
    some text will store in the “all.txt”

    and again we have to declare environment variables.
    like this

    GTK_COMPILE->-mms-bitfields -IC:/gtk/include/gtk-2.0 -IC:/gtk/lib/gtk-2.0/include -IC:/gtk/include/atk-1.0 -IC:/gtk/include/cairo -IC:/gtk/include/pango-1.0 -IC:/gtk/include/glib-2.0 -IC:/gtk/lib/glib-2.0/include -IC:/gtk/include/freetype2 -IC:/gtk/include -LC:/gtk/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpangowin32-1.0 -lgdi32 -lfreetype -lz -lfontconfig -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 –lintl

    This all for “GTK”.
    Finally the command to compile gtk program is
    gcc -o output.exe input.c %GTK_COMPILE%
    or
    gcc –g –Wall -o output.exe input.c %GTK_COMPILE%


    Open the command prompt and type these
    pkg-config --cflags --libs gtk+-2.0 libglade-2.0 > allover.txt
    some text will store in the “allover.txt”

    and again we have to declare environment variables.
    like this


    GLADE_COMPILE-> -mms-bitfields -IC:/gtk/include/gtk-2.0 -IC:/gtk/lib/gtk-2.0/include -IC:/gtk/include/atk-1.0 -IC:/gtk/include/cairo -IC:/gtk/include/pango-1.0 -IC:/gtk/include/glib-2.0 -IC:/gtk/lib/glib-2.0/include -IC:/gtk/include/freetype2 -IC:/gtk/include -IC:/gtk/include/libglade-2.0 -IC:/gtk/include/libxml2 -LC:/gtk/lib -lglade-2.0 -lgtk-win32-2.0 -lxml2 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpangowin32-1.0 -lgdi32 -lfreetype -lz -lfontconfig -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl

    This all for “GLADE”.
    Finally the command to compile glade tool source code is
    gcc -o output.exe input.c input1.c input2.c % GLADE _COMPILE%
    or
    gcc –g –Wall -o output.exe input.c input1.c input2.c % GLADE _COMPILE%


    conversion of “.glade” file to “.xml” file
    python should be installed and environment variable should be set.

    For example you had created a “example.glade” in “C:\Example” folder

    then open the command prompt change the directory in to “C:\Example” and type this
    cd “C:\Example” (press ENTER key)
    and type
    python "C:\gtk\bin\gtk-builder-convert" example.glade example.xml

    now it will converted in to “.xml” format.
    cheers...
    Last edited by munna_dude; 09-22-2008 at 05:40 AM.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Moving to Tech.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21