Universal Mac OSX binaries/installer

Sorry, but I’m stumped. I’ve even tried making all the install_name paths absolute, but it still didn’t work. I’ve never seen this kind of thing before, probably this is some OSX-specific issue (I’m not a mac expert.)
Could some other Mac user with a bit more knowledge than me comment?

Here is something that was developed recently that may help.

http://gamesketching.googlecode.com/files/pandaAutoInstall.py

I used in on my second mac and it worked flawlesly… worth a try.

Uh, I appreciate the reply, but actually, the link you posted is just a script that invokes ppremake to compile Panda3D – that’s totally unrelated to this.

Downloaded, but to be honest I am not sure what to do with it. I am on Mac OS X.4.

It’s a .dmg archive, so just open/mount it and it should be clear what to do next. Double-clicking works here.
I doubt whether it will work on 10.4. I’m pretty sure it doesn’t. You might be better off compiling it from scratch (using a cvs checkout and the thirdparty package in the first post)

Well of course I know what to do with a .dmg :wink:
The .command file says something about re-building paths and I don’t know what means. I also don’t know how to throw my own scripts in, if there is no projects/src/ . I also see no makepanda file that often appears in threads about compiling.

The .command file is just there to help you. Just double-click it and it just adds the panda binaries to your PATH and libraries to your DYLD_LIBRARY_PATH. (and a few more.)
Double-clicking it should be all.

This .dmg is a compiled binary – if you want to compile Panda3D from source, using makepanda, you will need to do a CVS checkout.
Here’s the sequence of commands that would work:
(NOTE: make sure you have the .dmg uninstalled before you compile it from scratch! (Meaning, remove the /Applications/Panda3D dir!))
You will need to have g++ compiler (preferably just the Xcode developer tools) installed.

cvs -d:pserver:anonymous@panda3d.cvs.sourceforge.net:/cvsroot/panda3d checkout panda3d
cd panda3d
curl -O http://152.10.254.215/~pro-rsoft/thirdparty.tar.bz2
tar xvjf thirdparty.tar.bz2
python makepanda/makepanda.py --everything --installer

When it’s finished, you should be having an installable .dmg file (that would work with 10.4, I hope) that you can install by just clicking the .dmg and following the instructions. (Drag the Panda3D dir into Applications, and double-click the .command file.)

If you run into any issues, let me know.

Hi, thanks for the explanation about compiling from source.

Anyhow, I’d prefer your pre-1.6 to work. What I don’t get is why I have to build these paths. When I distribute my game I don’t want people having to do that either.

You said the pre-1.6 build should work only under X.5. I still have a Leopard install on an external hard disc (without GCC I suppose). I will try that one, even though re-booting is pretty ugly. Having used the .command file, how do I go on from there? Where is the double-clickable app that eats my Python files?

This one: http://precalc.org/gogo/panda3d/readme looked promising but double-clicking the app I get a warning that important libraries are missing within the app. I e-mailed the guy, no response yet.

DARN I just want to develop. Mac builds are a feature of 1.6 … what’s the schedule for this one? I will upgrade to Leopard when new iMacs are released, but I want to start developing before late January :confused:

Okay, here is exactly what you need to do to get started using the .dmg. On 10.5, that is.

  1. Open it.
  2. Drag the “Panda3D” directory to “Applications”.
  3. Double-click the .command file and press Y when asked to do so. If it errors, it probably means you already used the .command file before.
  4. You’re done! There is no magic binary that eats python files, but your system version of Python is used. The paths that were set by the .command file are to point Python to the Panda3D libraries.

To run a .py script that uses panda, just open it with the python interpreter like you would do with any python file. Open a terminal, cd to the directory where your python file is, and type “python yourfile.py”.

Here’s what the .command file is for: it just adds the directory containing the Panda3D libraries to the PYTHONPATH variable, so python will be able to find them when you run python. If you distribute your own game later, you will probably not need this if you distribute it smartly. This approach is just useful for development with the Panda sdk.

EDIT: Hmm, now I think more about it, you’re right, it’s not obvious what to do after the .command step. I’ll make sure a “Howto get started” icon gets added after that.

Alright, let’s assume I get this to work (will try the X.5 external HD later), I create my game and it works on my comp. How do I distribute it, in a end user deployment sense? I’d like to have a double-click-me App and a possibly compressed content folder/file, Win/Linux/Mac version.
Is there some magic script that will do that for me?

Since I’ve got nothing to lose I’d like to try compiling the source on X.4. First I will install the g++ from somewhere.
Then you said I should combine the source with the third party tools. I wonder why I should need those when they are Win and Linux only? So I should only need this: www.panda3d.org/download/panda3d … eforge.zip and then exec the makepanda.py?

EDIT:

Buddy of mine says it did not work for him:
python ./makepanda.py
(…)
cp --recursive --force thirdparty/Pmw built/Pmw
cp: illegal option – -

MBP, Python 2.3.5, OS X 10.4, GCC 4.0.1

That means you got the stuff from the download page which doesn’t work yet on mac. You need to get it from cvs instead. And the thirdparty packages from the link at the top of this thread.
I gave you the series of commands you needed to type to build panda. Just insert those and it should work correctly.

Here are the commands again (from front to back. You don’t need to do more or less than this.

Alright, tried it on X.5 on my external HD. System is X.5.5, system python is 2.5.1. No other python version installed. .command file successful. Then tried the Asteroids sample (1.5.4 download, “sample” folder thrown in 1.6.0 folder).

:~ cd /Applications/Panda3D/1.6.0/samples/Asteroids :Asteroids python Tut-Asteroids.py
DirectStart: Starting the game.
Traceback (most recent call last):
File “Tut-Asteroids.py”, line 13, in
import direct.directbase.DirectStart
File “Panda3D-tpl-rw/Panda3D/1.6.0/lib/direct/src/directbase/DirectStart.py”, line 3, in
File “Panda3D-tpl-rw/Panda3D/1.6.0/lib/direct/src/showbase/ShowBase.py”, line 10, in
File “/Applications/Panda3D/1.6.0/lib/pandac/PandaModules.py”, line 2, in
from libpandaModules import *
File “/Applications/Panda3D/1.6.0/lib/pandac/libpandaModules.py”, line 2, in
Dtool_PreloadDLL(“libpanda”)
File “/Applications/Panda3D/1.6.0/lib/pandac/extension_native_helpers.py”, line 73, in Dtool_PreloadDLL
imp.load_dynamic(module, pathname)
ImportError: dlopen(/Applications/Panda3D/1.6.0/lib/libpanda.dylib, 2): Library not loaded: @executable_path/…/Library/Frameworks/Cg.framework/Cg
Referenced from: /Applications/Panda3D/1.6.0/lib/libpanda.dylib
Reason: image not found

I forgot to mention that you need to install the Nvidia Cg framework:
developer.download.nvidia.com/cg … er2008.dmg
After you’ve installed that it should run fine.

Finally it works :slight_smile:

Say, the system python is 2.5.1. Let’s say I wanted to update to the latest 2.5.x. I am aware that the system python should not be touched, so a 2.5.x would be installed elsewhere. Then you have to rebuild the paths. Wouldn’t that interfere with Panda3D’s rebuild? Or with other Python libraries, such as pyglet, which also requires a rebuild if you don’t want to change the first line in your scripts.

:Normal-Mapping$ python Tut-Normal-Mapping.py
DirectStart: Starting the game.
Warning: DirectNotify: category ‘Interval’ already exists
Known pipe types:
osxGraphicsPipe
(all display modules loaded.)
:display(warning): FrameBufferProperties available less than requested.
:util(warning): Adjusting global clock’s real time by 3.58598 seconds.
:util(warning): Adjusting global clock’s real time by -1.5309 seconds.

Great :slight_smile:

I don’t know whether upgrading is a problem or not. I think libraries should be pretty forward-compatible, but there can be crucial differences between Apple’s version of Python and the one you can download online.

Python is designed such that changing the bugfix version number–for instance, upgrading from 2.5.1 to 2.5.x–would not require a rebuild of any libraries that link with Python, including Panda3D. You would only need a fresh Panda if you upgraded to 2.6.x or higher.

In fact, I would expect Apple to install 2.5.x Python in place of 2.5.1 Python, and not in a separate directory, for this very reason. If they really install each bugfix version in a separate directory, they’re just creating unnecessary troubles for each Python user.

David

Say, do tools like pview work in this release?

Well, Apple is not installing 2.5.x, but I’d like to :wink:

Does Python have a built-in self-update function for those things?

Hi,

Apparently, the bzip archive is damaged. I have tried downloading it on three distinct computers, and the same flaw shows up every time:

On command line:

# bunzip2 Panda3D-1.6.0-pre.dmg
bunzip2: (stdin): trailing garbage after EOF ignored

and in Finder, the helper is unable to determine that it is in fact a bzip file and compresses it as a cpio archive instead (duh!).

Could you perhaps put up a new zip file that might be undamaged ? I’d be ever so grateful :slight_smile:

Are you so sure it’s a bzip2 archive? :slight_smile:
I can read it fine here. I mounted the one on the webserver directly using “hdiutil attach” and it worked perfectly. Must be some other format than bzip2 then.

Huh… I assumed …

# file Panda3D-1.6.0-pre.dmg 
Panda3D-1.6.0-pre.dmg: bzip2 compressed data, block size = 100k

Here the bz2 ending was stripped, but it’s still recognized as a bzip2…

I’ll do a fourth test :slight_smile: