> Not as smooth as Xcode and Interface Builder eh?

I had interesting results with my first custom MyApp.app bundle.
I made a new folder named "Test" and made a sub directory "Contents"
then another sub to that "MacOS" then put a PHP script with no
extension named "test" containing code from
http://gtk.php.net/manual/en/tutorials.helloworld.php to which I added
the top line #!/opt/local/bin/php -q
like so:

#!/opt/local/bin/php -q
if (!class_exists('gtk')) {
    die("Please load the php-gtk2 module in your php.ini\r\n");

$wnd = new GtkWindow();
$wnd->set_title('Hello world');
$wnd->connect_simple('destroy', array('gtk', 'main_quit'));

$lblHello = new GtkLabel("Just wanted to say\r\n'Hello world!'");


Rename Test folder to Test.app
It should take on the default App icon.
Don't click on it until you read the WARNING below so you can show
Desktop (should not matter here yet though).  If you try it now, it
may tell you that you need gtk installed "Please load the php-gtk2
module in your php.ini".

>From MacPorts I did:
sudo port install php5-gtk

I was surprised that it installed apache, but I didn't do any post
install apache step (I'll just wipe /opt/local anyway).  I did however
sudo cp /opt/local/etc/php.ini-dist /opt/local/etc/php.ini
in response to this line during the port build
* copy  /opt/local/etc/php.ini-dist to  /opt/local/etc/php.ini

I then did a
sudo vi /opt/local/etc/php.ini

;extension_dir = "./"
extension_dir = "/opt/local//lib/php/extensions/no-debug-non-zts-20060613/"

and added
at the end, although it should probably be in the extension area.

I have my Expose set to show the desktop if I move my mouse to a
corner. (Active Screen Corners)
Without that, I would have been stuck after a launch.

I launched Test but it kicked in X11, then showed the Hello World GTK
window.  I closed the window and was left with a blank X11 screen
(WITH NO DOCK !!!).  Now I recovered by moving my mouse to the active
screen corner to show the Desktop (WHICH HAD MY HARDDRIVE icon there.
When I opened my Hard Drive icon Macintosh HD, the X11 app icon
appeared along with the Dock.)  Then I Quit X11 from the Dock and was
back to normal.

Anyway, you can do any post install stuff if you really want to setup
properly or do port uninstall and friends, but there is also this:

But after the WWDC today, I see it's high time to get into iPhone development.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to