Обсуждение: pgAdmin on OSX
Hi Richard, Adam, Florian I finally got my hands on a Mac, courtesy of EnterpriseDB, to work on fixing the outstanding Mac specific bugs in pgAdmin. I'm trying to build pgAdmin and no matter what I try, I end up with a binary that always displays behind other windows, and cannot seem to receive any focus at all, with the exception of the traffic light buttons (do they have a name?) at the top of the tip of the day and main windows. In addition, the application menu is never shown. Running the last snapshot the Florian uploaded (have they stopped permanently Florian, or is there a problem?) seems to work as it should. I've tried with wxWidgets 2.6.0 and 2.6.2, using both static and dynamic libraries configured as per our instructions, and as Richard once posted. I've also tried pgAdmin 1.2.2 from SVN, and the current trunk code. In addition to the obvious question of, 'what the heck might be going wrong?', can any of you point me in the right direction for creating an appbundle. I looked at the pkg/mac scripts but couldn't get them to do anything useful (or if they did, I don't know where they put it!) System details: Kernel: Darwin 7.9.0 OS X: 10.3.9 (7W98), fully up to date Compiler: gcc 3.3 (from the xcode package PostgreSQL: 8.0.4 Any help would be appreciated, but go easy, you know I'm a Mac newbie! :-) Regards, Dave.
Hi Dave, The reason that your getting that "backgrounded" interface is due to a missing resource fork; however, you can avoid dealing with that by creating an appbundle. The appbundle is just a directory structure that the os sees as an executable. If you structure it right, you can get the app to fire up and run like it should: bundlename.app\ - Pkginfo - Contents\ - Info.plist: This is the "heart" of the appbundle - MacOS\ - Your executable(s) here - Resources\ - your .icns (multi-icons) file The Info.plist file basically tells the OS what executable to run when you double click, what icon to use, etc... The format of info.plist in the binary release of pgadmin is probably all you'll need to get up and running. That's it for the appbundle; now if you'd rather create a "double clickable" executable without all that, you need to add a resource fork to it. I was using the command below but was running into some issues with wxWidgets. Also, with a rez fork, you have to be VERY careful about how you move the file around on your system, i.e. if you move it via 'cp', 'mv' or tar, you're going to lose that resource fork and get stuck with a useless rectagle on your screen again. With the appbundle, you don't have to deal with that kind of thing, AND that's what Mac Heads are used to ;) /Developer/Tools/Rez -d __DARWIN__ -t APPL -d __WXMAC__ -i . -i > include/ -o /usr/local/pgadmin3/bin/pgadmin3 Carbon.r > /path/to/wx2/lib/libwx_macud-2.5.3.r -Scott Mead
> -----Original Message----- > From: pgadmin-hackers-owner@postgresql.org > [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of > scottiebo@gmail.com > Sent: 13 October 2005 22:54 > To: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] pgAdmin on OSX > > Hi Dave, Hi Scott, > The reason that your getting that "backgrounded" interface is due to > a missing resource fork; however, you can avoid dealing with that by > creating an appbundle. > > The appbundle is just a directory structure that the os sees as an > executable. If you structure it right, you can get the app to fire up > and run like it should: > > bundlename.app\ > - Pkginfo > - Contents\ > - Info.plist: This is the "heart" of the > appbundle > - MacOS\ > - Your executable(s) here > - Resources\ > - your .icns (multi-icons) file > > The Info.plist file basically tells the OS what executable to run when > you double click, what icon to use, etc... > > The format of info.plist in the binary release of pgadmin is probably > all you'll need to get up and running. Thanks for the info. We do have code for building an appbundle, however it seems I was running a script that didn't work properly for some as-yet unknown reason, blissfully unaware that the install target will build the appbundle on Mac! > That's it for the appbundle; now if you'd rather create a "double > clickable" executable without all that, you need to add a > resource fork > to it. I was using the command below but was running into some issues > with wxWidgets. Also, with a rez fork, you have to be VERY careful > about how you move the file around on your system, i.e. if you move it > via 'cp', 'mv' or tar, you're going to lose that resource fork and get > stuck with a useless rectagle on your screen again. With the > appbundle, you don't have to deal with that kind of thing, AND that's > what Mac Heads are used to ;) > > /Developer/Tools/Rez -d __DARWIN__ -t APPL -d __WXMAC__ -i . -i > > include/ -o /usr/local/pgadmin3/bin/pgadmin3 Carbon.r > > /path/to/wx2/lib/libwx_macud-2.5.3.r Ahh, yes I had spotted mention of Rez on Google groups. It'll be useful to have your notes in the archives for future debugging etc. Anyway, now I'm managing to build a bundle that essentially works, I can get to tracking down actual bugs in the port :-) Thanks again, Dave.