[gtkada] GtkAda 2.0 under Windows : a successfull way to proceed...

Stéphane Rivière stephane at rochebrune.org
Sun Feb 23 12:47:10 CET 2003


Hi all !

I finally succeed to obtain a workable GtkAda 2 development environment 
under windows ! (W2k sp3)

The trick was to definitly NOT use the gnatgcc 3.3 package available 
today on the mingw download page.
You must use the previous gnatgcc 3.2 package, and then, the TestGtk 
program run without problem.

Regards from Oleron Island - France

Stephane Riviere

Full instructions follows...

-------------------------------------------------------------------------------
Gcc 3.2 + GnatGcc 3.2 + GtkAda 2.2 under windows NT systems (v 0.2)

Stephane Riviere : stephane at rochebrune.org

Thanks to the ACT team, Jeffrey Creem and all the GtkAda mailing list folks.

-------------------------------------------------------------------------------
# Introduction

   The suggested directory tree take hard coded gcc pathes into account, in
   order to guarantee good installation reproductibility.

   I'm not an Ada expert, nor a gcc hacker. I'm just a newbie in this 
world, so
   please feel free to correct and enhance this file.

   The root directory must be "x:\mingw", where "x" is your install drive.
   In the example below, the install drive is "c:"

   You may choose any disk as long as you keep the root directory \mingw.

   I believe there is many others ways to proceed, but this one is a 
simple and
   an easy one.

   At the end of the installation process, you'll get two directories :
   - "c:\gnu" containing all the packages ready for a new install
   - "c:\mingw" containing a ready to use install of gnatgcc with gtkAda

-------------------------------------------------------------------------------
# Package download

   * Directories creation

      Create "c:\gnu"
      Create "c:\gnu\mingw"
      Create "c:\gnu\gtk"
      Create "c:\gnu\gtkada"


   * GnatGcc

      From "http://www.mingw.org/download.shtml"
      To "c:\gnu\mingw"

         "MSYS-1.0.8.exe"
         "MinGW-2.0.0-3.exe"

      From "http://prdownloads.sf.net/mingw/"
      To "c:\gnu\mingw"

         "gcc-3.2-Ada-20020817-1.tar.gz"


   * Gtk

      From "http://www.gimp.org/~tml/gimp/win32/downloads.html"
      To "c:\gnu\gtk"

         "gettext-dev-0.10.40-20020904.zip"
         "libintl-0.10.40-tml-20020904.zip"
         "pkgconfig-0.14.zip"
         "atk-1.0.3-20020821.zip"
         "atk-dev-1.0.3-20020821.zip"
         "glib-2.2.0-20030112.zip"
         "glib-dev-2.2.0-20030112.zip"
         "gtk+-2.2.0-20030119.zip"
         "gtk+-dev-2.2.0-20030119.zip"
         "pango-1.0.5-20021201.zip"
         "pango-dev-1.0.5-20021201.zip"

      From "http://prdownloads.sourceforge.net/gnuwin32"
      To "c:\gnu\gtk\gtkada"

         "libiconv-1.8-w32-1.bin.zip"   
         "freetype-2.1.2-bin.zip"
         "freetype-2.1.2-1-lib.zip"
         "jpeg-6b-1-bin.zip"
         "jpeg-6b-1-lib.zip"
         "libpng-1.2.4-1-bin.zip"
         "libpng-1.2.4-1-lib.zip"
         "tiff-3.5.7-bin.zip"
         "tiff-3.5.7-lib.zip"
         "zlib-1.1.4-bin.zip"
         "zlib-1.1.4-lib.zip"


   * GtkAda

      From "http://libre.act-europe.fr/GtkAda/"
      To "c:\gnu\gtkada"

         Download the latest gtkAda snapshot with the commands :
         - cvs -d :pserver:anoncvs at libre.act-europe.fr:/anoncvs login
         - empty password
         - cvs -d :pserver:anoncvs at libre.act-europe.fr:/anoncvs co GtkAda


-------------------------------------------------------------------------------
# Installation

   IMPORTANT NOTICE : In the installation process described below, some 
files
   already installed will be overwrite.

   * Gnatgcc

      Launch "MinGW-2.0.0-3.exe"
        When asks "Select Destination Directory", answer "c:\mingw"

      Launch "MSYS-1.0.8.exe"
         When asks "Select Destination Directory", answer "c:\mingw\msys"
         When asks "Do you wish to continue with the post install", 
answer "y"
         When asks "Do you have MinGW installed", answer "y"
         When asks "Where is you MinGW installation", answer "c:/mingw"

      Expand "gcc-3.2-Ada-20020817-1.tar.gz" to "c:\mingw"


   * Gtk

      Create c:\mingw\gtk

      Expand to c:\mingw\gtk :

         "c:\gnu\gtk\gettext-dev-0.10.40-20020904.zip"
         "c:\gnu\gtk\libintl-0.10.40-tml-20020904.zip"
         "c:\gnu\gtk\pkgconfig-0.14.zip"
         "c:\gnu\gtk\atk-1.0.3-20020821.zip"
         "c:\gnu\gtk\atk-dev-1.0.3-20020821.zip"
         "c:\gnu\gtk\glib-2.2.0-20030112.zip"
         "c:\gnu\gtk\glib-dev-2.2.0-20030112.zip"
         "c:\gnu\gtk\gtk+-2.2.0-20030119.zip"
         "c:\gnu\gtk\gtk+-dev-2.2.0-20030119.zip"
         "c:\gnu\gtk\pango-1.0.5-20021201.zip"
         "c:\gnu\gtk\pango-dev-1.0.5-20021201.zip"
         "c:\gnu\gtk\freetype-2.1.2-bin.zip"
         "c:\gnu\gtk\freetype-2.1.2-1-lib.zip"
         "c:\gnu\gtk\jpeg-6b-1-bin.zip"
         "c:\gnu\gtk\jpeg-6b-1-lib.zip"
         "c:\gnu\gtk\libpng-1.2.4-1-bin.zip"
         "c:\gnu\gtk\libpng-1.2.4-1-lib.zip"
         "c:\gnu\gtk\tiff-3.5.7-bin.zip"
         "c:\gnu\gtk\tiff-3.5.7-lib.zip"
         "c:\gnu\gtk\zlib-1.1.4-bin.zip"
         "c:\gnu\gtk\zlib-1.1.4-lib.zip"


      Create c:\tmpiconv

      Expand "libiconv-1.8-w32-1.bin.zip" to "c:\tmpiconv"

         copy "c:\tmpiconv\iconv.exe" to "c:\mingw\gtk\bin"
         copy "c:\tmpiconv\*.dll" to "c:\mingw\gtk\lib"
         copy "c:\tmpiconv\iconv.lib" to "c:\mingw\gtk\lib"
         copy "c:\tmpiconv\iconv.lib" to "c:\mingw\gtk\lib\libiconv.a"
         copy "c:\tmpiconv\iconv.h" to "c:\mingw\gtk\include"
         copy "c:\tmpiconv\libcharset.h" to "c:\mingw\gtk\include"
         Delete "c:\tmpiconv"


      Using the config panel, system applet, advanced option, then
      environment variables button.

      Add to PATH "c:\mingw\gtk\bin" and "c:\mingw\gtk\dll"
 


   * GtkAda 2

      Manual source patches

        
         There is two ways to proceed :

            1) The clean way (to my taste)

               In "c:\gnu\gtkada\src\makefile.in", add at line 15 the 
switch
               -mms-bitfields to obtain a modified line looking like :
               "CFLAGS = @CFLAGS@ -mms-bitfields -Wall @GTK_CFLAGS@ -I.. 
$(FPIC)"

               In "c:\gnu\gtkada\src\opengl\makefile.in", add at line 10 
the
               switch -mms-bitfields to obtain a modified line looking 
like :
               "CFLAGS = @CFLAGS@ -mms-bitfields -Wall @GTK_CFLAGS@ -I. 
$(FPIC)"
 
               In "c:\gnu\gtkada\src\gtkextra\makefile.in", add at line 
10 the
               switch -mms-bitfields to obtain a modified line looking 
like :
               "CFLAGS=@CFLAGS@ -mms-bitfields"

            2) The lasy one : the only one for most of us :)

               Just before compiling, type :

               CC='gcc -mms-bitfields'
               export CC


         Using the desk icon Msys, launch Msys, and then :
         $ "cd /c/mingw/gtk"
         $ "patch -p0 < ../contrib/gtkada-2.0-win32.diff"
         Quit Msys



      Installation

         Copy c:\gnu\gtkada dto c:\mingw\gtk

         Launch Msys, and then :
         $ "cd /c/mingw/gtk"
         $ ./configure --prefix=/d/mingw/gtk --build=i386-pc-mingw32
                       --target=i386-pc-mingw32 --host=i686-windows-mingw32
         $ make install


      Test

      Launch "c:\mingw\gtk\testgtk\testgtk.exe" to validate installation


-------------------------------------------------------------------------------
# Things to do

Open Gl package integration

-------------------------------------------------------------------------------
eof






More information about the gtkada mailing list