Autoconf Work

Поиск
Список
Период
Сортировка
Искать

Autoconf Work

От:
Adam H.Pendleton <fmonkey@fmonkey.net>
Дата:
Вложения:
I'd be more than happy to help out with the autoconf portion of the 
PgAdmin III development.  Just give me a line as to where you would 
like me to begin.  :)

ahp

Re: Autoconf Work

От:
"Dave Page" <dpage@vale-housing.co.uk>
Дата:
It's rumoured that Adam H.Pendleton once said:
> I'd be more than happy to help out with the autoconf portion of the
> PgAdmin III development.  Just give me a line as to where you would
> like me to begin.  :)

Hi Adam,

That'd be great, thanks for volunteering.

Knowing very little about autoconf, it's tricky for me to suggest where
you might start, but if you take a look at http://cvs.pgadmin.org/ the
source code is all in the pgadmin3 module. Some basic, but possibly out of
date notes on setting up a build environment are in the README.txt file.
In the src/ subdirectory is a manually written Makefile which is what we
would like to replace. Again, it's possible this is slightly out of date
as we tend to develop on Windows and update the makefile less frequently.
That's about it really. One last thing - it would probably help to
subscribe to pgadmin-hackers@postgresql.org (just send a subscribe message
to pgadmin-hackers-request@postgresql.org). It's a relatively low traffic
list where we all ahng out and will be able to help out with any queries
you might have.
If you need anything, just shout!

Regards, Dave.

Re: Autoconf Work

От:
Andreas Pflug <Andreas.Pflug@web.de>
Дата:
Dave Page wrote:

>In the src/ subdirectory is a manually written Makefile which is what we
>would like to replace. Again, it's possible this is slightly out of date
>as we tend to develop on Windows and update the makefile less frequently.
>  
>
I'm regularly checking pgadmin3 under linux, so this should be 
sufficiently up-to-date to compile.

Regards,
Andreas

Re: Autoconf Work

От:
Jean-Michel POURE <jm.poure@freesurf.fr>
Дата:
Le Dimanche 4 Mai 2003 22:05, Andreas Pflug a écrit :
> I'm regularly checking pgadmin3 under linux, so this should be
> sufficiently up-to-date to compile.

Dear all,

I am trying to build pgAdmin3 under RedHat Linux. I installed XRC and STC 
(libwxxrc?) from wxWindows contrib without problem. Now, just for 
confirmation:

1) wxWindows 2.4.0-1
I used the binaries from wxWindows.org website, which are built for GTK 1.2. 
Do you confirm GTK 1.2 should be used and not GTK 2.0 (which provides Unicode 
support).

2) In RedHat, my makefile starts with
PGDIR = /usr
WXDIR = /usr/lib/wx

But I have a compilation error here:

g++ -c `wx-config --cflags` -I/usr/lib/wx/include 
-I/usr/lib/wx/contrib/include -Iinclude -I/usr/include -g -o ui/frmEditGrid.o 
ui/frmEditGrid.cpp
cc1plus: AVERTISSEMENT: modification de l'ordonnancement de recherche du 
répertoire système « /usr/include »
cc1plus: AVERTISSEMENT:   comme il a été déjà spécifié comme répertoire non 
système
ui/frmEditGrid.cpp:13:32: wx/generic/gridsel.h: Aucun fichier ou répertoire de 
ce type
ui/frmEditGrid.cpp: Dans member function « bool
   ctlSQLGrid::SetTable(wxGridTableBase*, bool) »:
ui/frmEditGrid.cpp:298: utilisation invalide d'un type indéfini «struct
   wxGridSelection»
/usr/include/wx/generic/grid.h:80: déclaration par l'avant (forward) de «
   struct wxGridSelection»
make: *** [ui/frmEditGrid.o] Erreur 1

Any help welcome. 
Cheers, Jean-Michel

Re: Autoconf Work

От:
Andreas Pflug <Andreas.Pflug@web.de>
Дата:
Jean-Michel POURE wrote:

>
>1) wxWindows 2.4.0-1
>I used the binaries from wxWindows.org website, which are built for GTK 1.2. 
>Do you confirm GTK 1.2 should be used and not GTK 2.0 (which provides Unicode 
>support).
>
Yes, It's GTK 1.2.

>g++ -c `wx-config --cflags` -I/usr/lib/wx/include 
>-I/usr/lib/wx/contrib/include -Iinclude -I/usr/include -g -o ui/frmEditGrid.o 
>ui/frmEditGrid.cpp
>cc1plus: AVERTISSEMENT: modification de l'ordonnancement de recherche du 
>répertoire système « /usr/include »
>cc1plus: AVERTISSEMENT:   comme il a été déjà spécifié comme répertoire non 
>système
>ui/frmEditGrid.cpp:13:32: wx/generic/gridsel.h: Aucun fichier ou répertoire de 
>ce type
>ui/frmEditGrid.cpp: Dans member function « bool
>   ctlSQLGrid::SetTable(wxGridTableBase*, bool) »:
>ui/frmEditGrid.cpp:298: utilisation invalide d'un type indéfini «struct
>   wxGridSelection»
>/usr/include/wx/generic/grid.h:80: déclaration par l'avant (forward) de «
>   struct wxGridSelection»
>
My french tends to abandon me here... If I understand it right, the file 
gridsel.h isn't found.
The problem about the wxGrid is that some bugs are present in 2.4.0. 
Namely, SetTable() can be called only once, so I wrote a replacement 
version which needs that wxGridSelection class to clean it up (greetings 
to Keith:-). This class isn't documented officially, maybe it's not 
included in your binary distribution. For your convenience, I attached 
the file.
So far, I haven't prepared patches for wxWindows, which would solve this 
problem finally. But it would still take some time until it's included 
in the distributions. So at the moment, we either need wxWindows 2.4.0 
from source or the additional file. How about checking this file in 
autoconf and copying it into place if missing?

Regards,
Andreas

>make: *** [ui/frmEditGrid.o] Erreur 1
>
>Any help welcome. 
>Cheers, Jean-Michel
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>  
>

/////////////////////////////////////////////////////////////////////////////
// Name:        wx/generic/gridsel.h
// Purpose:     wxGridSelection
// Author:      Stefan Neis
// Modified by:
// Created:     20/02/2000
// RCS-ID:      $$
// Copyright:   (c) Stefan Neis
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#include "wx/defs.h"

#if defined(wxUSE_NEW_GRID) && (wxUSE_NEW_GRID)

#ifndef __WXGRIDSEL_H__
#define __WXGRIDSEL_H__

#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "gridsel.h"
#endif

#include "wx/grid.h"

class WXDLLEXPORT wxGridSelection{
public:
    wxGridSelection( wxGrid * grid, wxGrid::wxGridSelectionModes sel =
                     wxGrid::wxGridSelectCells );
    bool IsSelection();
    bool IsInSelection ( int row, int col );
    void SetSelectionMode(wxGrid::wxGridSelectionModes selmode);
    wxGrid::wxGridSelectionModes GetSelectionMode() { return m_selectionMode; }
    void SelectRow( int row,
                    bool ControlDown = FALSE,  bool ShiftDown = FALSE,
                    bool AltDown = FALSE, bool MetaDown = FALSE );
    void SelectCol( int col,
                    bool ControlDown = FALSE,  bool ShiftDown = FALSE,
                    bool AltDown = FALSE, bool MetaDown = FALSE );
    void SelectBlock( int topRow, int leftCol,
                      int bottomRow, int rightCol,
                      bool ControlDown = FALSE,  bool ShiftDown = FALSE,
                      bool AltDown = FALSE, bool MetaDown = FALSE,
                      bool sendEvent = TRUE );
    void SelectCell( int row, int col,
                     bool ControlDown = FALSE,  bool ShiftDown = FALSE,
                     bool AltDown = FALSE, bool MetaDown = FALSE,
                     bool sendEvent = TRUE );
    void ToggleCellSelection( int row, int col,
                              bool ControlDown = FALSE, 
                              bool ShiftDown = FALSE,
                              bool AltDown = FALSE, bool MetaDown = FALSE );
    void ClearSelection();

    void UpdateRows( size_t pos, int numRows );
    void UpdateCols( size_t pos, int numCols );

private:
    int BlockContain( int topRow1, int leftCol1,
                       int bottomRow1, int rightCol1,
                       int topRow2, int leftCol2,
                       int bottomRow2, int rightCol2 );
      // returns 1, if Block1 contains Block2,
      //        -1, if Block2 contains Block1,
      //         0, otherwise

    int BlockContainsCell( int topRow, int leftCol,
                           int bottomRow, int rightCol,
                           int row, int col )
      // returns 1, if Block contains Cell,
      //         0, otherwise
    {
        return ( topRow <= row && row <= bottomRow &&
                 leftCol <= col && col <= rightCol );
    }

    wxGridCellCoordsArray               m_cellSelection;
    wxGridCellCoordsArray               m_blockSelectionTopLeft;
    wxGridCellCoordsArray               m_blockSelectionBottomRight;
    wxArrayInt                          m_rowSelection;
    wxArrayInt                          m_colSelection;

    wxGrid                              *m_grid;
    wxGrid::wxGridSelectionModes        m_selectionMode;

    friend class WXDLLEXPORT wxGrid;
};

#endif  // #ifdef __WXGRIDSEL_H__
#endif  // #ifndef wxUSE_NEW_GRID

Re: Autoconf Work

От:
Jean-Michel POURE <jm.poure@freesurf.fr>
Дата:
Le Lundi 5 Mai 2003 00:44, Andreas Pflug a écrit :
> So far, I haven't prepared patches for wxWindows, which would solve this
> problem finally. But it would still take some time until it's included
> in the distributions. So at the moment, we either need wxWindows 2.4.0
> from source or the additional file. How about checking this file in
> autoconf and copying it into place if missing?

This would be perfect. Another solution would be to patch the RedHat wxWindows 
existing RPM. I don't know what is the best.

Cheers,
Jean-Michel

Re: Autoconf Work

От:
"Adam H. Pendleton" <fmonkey@fmonkey.net>
Дата:
Andreas Pflug wrote:

> So at the moment, we either need wxWindows 2.4.0 from source or the 
> additional file. How about checking this file in autoconf and copying 
> it into place if missing?

I sent a message in reply directly to Andreas, but I thought I would 
send one to the list as well.  gridsel.h is included with the wxWindows 
2.4.0 source distribution, but it is *not* installed by the 'make 
install' command.  IMO, this leaves us the following options regarding 
fixing the problem with autoconf:

1) Use an configure option to point to a wxWindows source tree 
location.  Autoconf can then include that file when building pgadmin3.  
This means that pgadmin3 will not compile against a binary distribution 
of wxWindows, though.

2) Provide a patch for the wxWindows source distribution to install the 
gridsel.h file.  This would not require autconf to do any special 
checks, but once again, pgadmin3 won't build against a binary wxWindows 
distribution.

3) Include the file with the pgadmin3 sources.  I realize that gridsel.h 
isn't part of the pgadmin3 code base, per se, but this options allows 
building against binary wxWindows distributions, as well as not 
requiring autoconf to do any special checking for the file.

What is the consensus?

ahp

FAQ