Thread: close-but-not-quite w/ pgadmin3.app on osx 10.3.8

close-but-not-quite w/ pgadmin3.app on osx 10.3.8

From
OpenMacNews
Date:
hi all,

fwiw, i understand that this may be 'old news' for many of you, but -- as I'd
had some issues getting up-n-running, I just thought i'd share details of what
I've done so far ... and where I'm currently stalled.

in short, I'm on my way to building pgadmin3 cvs head on OSX 10.3.8 as a
clickable .app.

my dev env is a bit mod'd, and i'm linking against some of my own builds, so
here's some of the relevant env/version info:

    Darwin tiedgar 7.8.0 Darwin Kernel Version 7.8.0: Wed Dec 22 14:26:17 PST
2004; root:xnu/xnu-517.11.1.obj~1/RELEASE_PPC  Power Macintosh powerpc

    gcc v3.3 20030304 (Apple Computer, Inc. build 1671)
    autoconf v2.59
    automake v1.9.5
    libtoolize v1.5.14

    pgsql v8.0.1
    bdb v4.3.27 w/ strong crypto
    perl v5.8.6
    wxWidgets cvsHEAD (config'd "--with-mac")
    python v2.4.1 (framework)
    OpenSSL 0.9.7f 22 Mar 2005
    libxml2 v2.6.18
    expat cvsHEAD
    libpng v1.2.8
    jpeg v6b
    tiff cvsHEAD
    gettext v0.14.3

my procedure is fairly standard, with the exception of the ENV:

% cvs -d :pserver:anonymous@cvs.pgadmin.org:/projects co -d pgadmin3-cvs
pgadmin3
% cd /usr/ports/pgadmin3-cvs

# NOTE
# Florian Pflug's patch/files for '.app' creation ...
% wget http://www.phlo.org/pgadmin3-bundle.diff
% wget http://www.phlo.org/pgadmin3-newfiles.tgz

% patch -p0 < pgadmin3-bundle.diff
% gnutar zxvf pgadmin3-newfiles.tgz

% sh bootstrap

% unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LC_ALL
LANG LINGUAS
% setenv CPPFLAGS "-I/usr/local/ssl/include -I/usr/local/include"
% setenv LDFLAGS "-bind_at_load -L/usr/local/ssl/lib -lssl -lcrypto
-L/usr/local/lib -lexpat -lintl -lgettextlib -lpng -ljpeg -ltiff -lz"

% ./configure \
--prefix=/usr/local/pgadmin3 \
--enable-appbundle \
--enable-static \
--enable-debug \
--with-wx=/usr/local/wxWidgets-cvs \
--with-wx-config=wx-config \
--with-pgsql=/usr/local/pgsql \
--with-pgsql-include=/usr/local/pgsql/include

% make all

    success:
        ...
        Making all in pkg
        Making all in mac
        make[3]: Nothing to be done for `all'.
        make[3]: Nothing to be done for `all-am'.
        make[2]: Nothing to be done for `all-am'.

% sudo make install

% cd /usr/ports/pgadmin3-cvs
% ls -ald PgAdminIII.app
    drwxr-xr-x  4 root wheel 136 Apr 10 11:56 PgAdminIII.app

% cd /usr/ports/pgadmin3-cvs/PgAdminIII.app/Contents/MacOS
% otool -L pgadmin3

    pgadmin3:
            @executable_path/../Frameworks/libssl.0.9.7.dylib (compatibility version
0.9.0, current version 0.9.7)
            @executable_path/../Frameworks/libcrypto.0.9.7.dylib (compatibility version
0.9.0, current version 0.9.7)
            @executable_path/../Frameworks/libexpat.0.dylib (compatibility version
6.0.0, current version 6.0.0)
            @executable_path/../Frameworks/libintl.3.dylib (compatibility version 8.0.0,
current version 8.2.0)
            @executable_path/../Frameworks/libgettextlib-0.14.3.dylib (compatibility
version 0.0.0, current version 0.0.0)
            @executable_path/../Frameworks/libpng.3.dylib (compatibility version 3.0.0,
current version 3.0.0)
            @executable_path/../Frameworks/libjpeg.62.dylib (compatibility version
63.0.0, current version 63.0.0)
            @executable_path/../Frameworks/libtiff.3.dylib (compatibility version
11.0.0, current version 11.2.0)
            /usr/lib/libz.1.2.2.dylib (compatibility version 1.2.0, current version
1.2.2)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
71.1.1)
            /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
(compatibility version 1.0.0, current version 11.0.0)
            /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility
version 1.0.0, current version 184.0.0)
            /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility
version 2.0.0, current version 128.0.0)
            /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility
version 1.0.0, current version 9.0.0)
            /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit (compatibility
version 1.0.0, current version 1.0.0)
            /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version
5.0.0)

so, it all looks ok (?) so far ...

but, when I try to dubl-clik the PgAdminIII, i get a dialog:

  'You cannot open the application"PgAdminII" because it may be damaged or
incomplete.'

with no output to the Console/System Log .... hmmmm. ?

also, i'm a little unclear why the install does not install the
'PgAdminIII.app' where --prefix tells it to, but, rather, in the src tree ...
but i'd guess that's an arguable point.

gonna google & code-dig a bit; any suggestions in the meantime will be
appreciated!

richard




Re: close-but-not-quite w/ pgadmin3.app on osx 10.3.8

From
"Florian G. Pflug"
Date:
OpenMacNews wrote:
> % ./configure \
> --prefix=/usr/local/pgadmin3 \
> --enable-appbundle \
> --enable-static \
> --enable-debug \
> --with-wx=/usr/local/wxWidgets-cvs \
> --with-wx-config=wx-config \
> --with-pgsql=/usr/local/pgsql \
> --with-pgsql-include=/usr/local/pgsql/include

Hm... prefix shouldn't be needed when using "--enable-appbundle".
If you specify "--enable-appebundle", all File necessary
for running pgadmin3 should be installed into the .app.

> % sudo make install
>
> % cd /usr/ports/pgadmin3-cvs
> % ls -ald PgAdminIII.app
>     drwxr-xr-x  4 root wheel 136 Apr 10 11:56 PgAdminIII.app
>
> % cd /usr/ports/pgadmin3-cvs/PgAdminIII.app/Contents/MacOS
> % otool -L pgadmin3
Heres the problem - the executable should be named PgAdminIII, not
pgadminIII. I forgot to include my modifications to src/Makefile.am
in the patch on www.phlo.org - I created a second patch, named
pgadmin3-bundle-2.diff - please apply this one two, and retry.

(It should be sufficient to just do "make install" again, after
applying the patch).


> so, it all looks ok (?) so far ...
>
> but, when I try to dubl-clik the PgAdminIII, i get a dialog:
>
>  'You cannot open the application"PgAdminII" because it may be damaged
> or incomplete.'
>
> with no output to the Console/System Log .... hmmmm. ?
>
> also, i'm a little unclear why the install does not install the
> 'PgAdminIII.app' where --prefix tells it to, but, rather, in the src
> tree ... but i'd guess that's an arguable point.
Hm... we could do that - but .app bundles are designed to be relocateable
anyway, so just move it to wherever you want it to be ;-)


greetings, Florian Pflug

Attachment

Re: close-but-not-quite w/ pgadmin3.app on osx 10.3.8

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> Florian G. Pflug
> Sent: 11 April 2005 10:29
> To: OpenMacNews
> Cc: pgadmin-hackers
> Subject: Re: [pgadmin-hackers] close-but-not-quite w/
> pgadmin3.app on osx 10.3.8
>
> Heres the problem - the executable should be named PgAdminIII, not

Don't mess with the branding!! :-)

Can that be made 'pgAdmin3' please? The long form is 'pgAdmin III', with
the space. Never an uppercase P though.

Thanks, Dave.

Re: close-but-not-quite w/ pgadmin3.app on osx

From
"Florian G. Pflug"
Date:
Dave Page wrote:
>>Heres the problem - the executable should be named PgAdminIII, not
>
>
> Don't mess with the branding!! :-)
>
> Can that be made 'pgAdmin3' please? The long form is 'pgAdmin III', with
> the space. Never an uppercase P though.
Well, the executable inside the bundle is practically invisble to the
user anway, so I guess you want the whole bundle to be renamed... (I don't
know if it's possible to name the main executable different than the bundle -
I guess you can do it by specifying the executable name in the plist file, but
there is not much point in this, since the executable name is hidden from the
user anyway ;-) ).

I can do that, but first I'd like to know if the current patch + my addition
from today makes things work for OpenMacNews. If this works, I'll prepare
a new Version of the patch with the bundle renamed. If not, I'd like to fix
all remaining problems before introducing new breakage by renaming things...

Which name do you prefer? I'd prefer "pgAdmin III", since it just looks
prettier - but if the space in the bundle name causes problems, I'll go
with pgAdmin3, if there are no objections.

greetings, Florian Pflug

Attachment

Re: close-but-not-quite w/ pgadmin3.app on osx 10.3.8

From
"Dave Page"
Date:

> -----Original Message-----
> From: Florian G. Pflug [mailto:fgp@phlo.org]
> Sent: 11 April 2005 13:18
> To: Dave Page
> Cc: OpenMacNews; pgadmin-hackers
> Subject: Re: [pgadmin-hackers] close-but-not-quite w/
> pgadmin3.app on osx 10.3.8
>
> Dave Page wrote:
> >>Heres the problem - the executable should be named PgAdminIII, not
> >
> >
> > Don't mess with the branding!! :-)
> >
> > Can that be made 'pgAdmin3' please? The long form is
> 'pgAdmin III', with
> > the space. Never an uppercase P though.
> Well, the executable inside the bundle is practically invisble to the
> user anway, so I guess you want the whole bundle to be
> renamed... (I don't
> know if it's possible to name the main executable different
> than the bundle -
> I guess you can do it by specifying the executable name in
> the plist file, but
> there is not much point in this, since the executable name is
> hidden from the
> user anyway ;-) ).
>
> I can do that, but first I'd like to know if the current
> patch + my addition
> from today makes things work for OpenMacNews. If this works,
> I'll prepare
> a new Version of the patch with the bundle renamed. If not,
> I'd like to fix
> all remaining problems before introducing new breakage by
> renaming things...
>
> Which name do you prefer? I'd prefer "pgAdmin III", since it
> just looks
> prettier - but if the space in the bundle name causes
> problems, I'll go
> with pgAdmin3, if there are no objections.

Sounds good to me :-)

I'll remove your last patch from my queue then and look out for a
replacement.

Thanks, Dave.

Re: close-but-not-quite w/ pgadmin3.app on osx 10.3.8

From
OpenMacNews
Date:
hi florian & dave,

-- On April 11, 2005 11:29:09 AM +0200  "Florian G. Pflug" <fgp@phlo.org> wrote:

> Hm... prefix shouldn't be needed when using "--enable-appbundle".
> If you specify "--enable-appebundle", all File necessary
> for running pgadmin3 should be installed into the .app.

ok. clear.

>> % cd /usr/ports/pgadmin3-cvs/PgAdminIII.app/Contents/MacOS
>> % otool -L pgadmin3
> Heres the problem - the executable should be named PgAdminIII, not
> pgadminIII.

good gork, man!  i would have been "old(er) & gray(er)" b4 figuring that out ;-D

> I forgot to include my modifications to src/Makefile.am
> in the patch on www.phlo.org - I created a second patch, named
> pgadmin3-bundle-2.diff - please apply this one two, and retry.
>
> (It should be sufficient to just do "make install" again, after
> applying the patch).

i'd just rebuilt without the enable-app <sigh> so i'll re-do here in a minute
...

> Hm... we could do that - but .app bundles are designed to be relocateable
> anyway, so just move it to wherever you want it to be ;-)

true & fair point.

-- On April 11, 2005 10:43:06 AM +0100  Dave Page <dpage@vale-housing.co.uk>
wrote:

>> Heres the problem - the executable should be named PgAdminIII, not
>
> Don't mess with the branding!! :-)
>
> Can that be made 'pgAdmin3' please? The long form is 'pgAdmin III', with
> the space. Never an uppercase P though.

hey!  who let the marketing guy in here ?!  ;-P


-- On April 11, 2005 2:18:00 PM +0200  "Florian G. Pflug" <fgp@phlo.org> wrote:

> I can do that, but first I'd like to know if the current patch + my addition
> from today makes things work for OpenMacNews. If this works, I'll prepare
> a new Version of the patch with the bundle renamed. If not, I'd like to fix
> all remaining problems before introducing new breakage by renaming things...

i'll let you know as soon as the build finishes in a bit .... ( i WANT a DP
G5!!)

cheers,

richard

Re: close-but-not-quite w/ pgadmin3.app on osx 10.3.8

From
"Dave Page"
Date:

> -----Original Message-----
> From: OpenMacNews [mailto:OpenMacNews@speakeasy.net]
> Sent: 11 April 2005 15:56
> To: pgadmin-hackers
> Cc: Florian G. Pflug; Dave Page
> Subject: Re: [pgadmin-hackers] close-but-not-quite w/
> pgadmin3.app on osx 10.3.8
>
> > Don't mess with the branding!! :-)
> >
> > Can that be made 'pgAdmin3' please? The long form is
> 'pgAdmin III', with
> > the space. Never an uppercase P though.
>
> hey!  who let the marketing guy in here ?!  ;-P

He was the first one here! ;-P

/D