This is the installation instructions for OpenRPG 1.6.3 using Python 2.3 and wxPython 2.4.2.4. There are newer versions of all these, especially OpenRPG. As I have not attempted to run this program since 1.6.3, I cannot write instructions on how to do it.

This comes from a post on the OpenRPG help board. The details were taken from the message titled "Any Mac OS X users having problems please read", and the posts of MidnightLightning. I have organized them a little to make them easier to go through. I am not, in any way trying to take credit for this fix, I am simply passing it on.

If you are running Tiger, don't worry. I have tested this out, and it works fine. There are newer versions of Python and wxPython, but I haven't gotten OpenRPG to work with them. I sguuest (as does OpenRPG) that you download the Python and wxPython versions they have for download on the OpenRPG site (The links are provided).

If you don't want to use the direct download links (or they are not working) just link here to the OpenRPG download/install page. Otherwise, feel free to use the direct download links, to minimize open windows in your browser.

1. Remove all pre-existing Python applications and files

It really doesn't matter if you have installed anything yet. Some OS X versions (Especially Tiger) have some Python files installed within them. This step is mainly to ensure that there are no remaining Python files. If you have tried to install OpenRPG before, or run Tiger, then this step is especially important, as you have Python files installed for sure (with Tiger, the wrong Python files to run OpenRPG).

This step ensures we are all starting on the same page: a clean one.

Find the following directories and erase (delete) them:

/Applications/MacPython-X.X
/Applications/wxPython-X.X.X.X
/System/Library/Python
/System/Library/Frameworks/Python.framework
/Library/Python
/Library/Frameworks/Python.framework


Be sure that your /Applications folder is your general Application folder, not a user folder (i.e. not /Users/yourname/Applications).
If there are no folders named anything like the above, thats good. That means there is no Python on your computer.

Now, open Terminal and run the following commands:

sudo rm /usr/lib/pyth*
sudo rm /usr/local/lib/pyth*
sudo rm /usr/bin/pyth*
sudo rm /usr/local/bin/pyth*

When you enter the sudo command, you may be asked to enter a password. Enter the administration password.

This erases the symbolic links to Python, leaving your computer clear of anything Python.
If nothing happens when you run these lines of code, don't worry, that just means you have nothing to delete. You should still run these sudo commands, because your version of OS X just may have installed some Python when it was originally installed, or updated.

To test to see that we are free of python, type python or wxpython in the command prompt. If you DO NOT see the >>> prompt, you are clear, and good to go!
If you do see the >>> prompt, start over, and try removing everything again.

2. Install Python

In order to use OpenRPG for Mac, I suggest (as does OpenRPG) that you use the Python version 2.3-1. It is the most stable, and the easiest to use. You can download it Here.

Mount the .dmg (this should be done automatically by Safari) then run the .pkg installer. When the install is done, there should be a folder called "MacPython-2.3" in your Applications folder (the general one, not the user Applications folder). Also, the following folder should have been created: /Library/Frameworks/Python.framework. If these folders exist, then we are set for the next step.

3. Install wxPython

Download the .dmg for wxPython, but be sure to get version 2.4.2.4, which is the most stable version to use with OpenRPG. You can find this exact version at http://prdownloads.sourceforge.net/wxpython/wxPythonOSX-2.4.2.4-py2.3.dmg. This is the same file for download on OpenRPG's download page.

Mount the .dmg (it should be automatic with Safari) and run the .pkg. Be sure not to install the developer version (it has devel in the title). When the install is done, you should have the wxPython-X.X.X.X folder created in your Applications folder (/Applications.wxPython-X.X.X.X) These folders should also have been created: /Library/Frameworks/Python.framework/Versions/X.X/lib/PythonX.X/site-packages. Inside the site-packages should be two very important folders: wx and wxpython.

With that verified, we can move on.

4. Download OpenRPG

As of this guide being written, the current version of OpenRPG is 1.6.3. It can be found here http://prdownloads.sourceforge.net/openrpg/openrpg-1.6.3.zip. You can also check the OpenRPG Downloads site for any updates.

The .zip file will automatically decompress (if you are using Safari) and leave you with a folder. Inside this folder (openrpg-1) there are two folders, openrpg1 and __MACOSX) Take the 'openrpg1' folder and put it into your general Applications folder (/Applications. Not /Users/yourname/Applications). You can erase the openrpg-1 folder. The previously installed Python and wxPython should be in this folder as well.
(I don't know why there is a MacOSX folder, and why it doesn't work. If you do, e-mail me please.)

5. Change Some Code

Edit the following file: /Applications/openrpg1/orpg/systempath.py. When you find the file, ctrl-click on it to open it with TextEdit. Change the file to look like this:

import sys
if sys.platform != 'win32':
     sys.path.append( "/usr/local/lib/python2.3/site-packages/" )
     sys.path.appen( "/usr/lib/python2.3/site-packages/" )

Save the file (be sure not to add any additional extensions, like .txt. Be absolutely certain the file name remains systempath.py. Show all hidden extensions and erase all of them but .py.

Now, go into Terminal and enter the following lines of code into the prompt. We are creating symbolic links, telling OpenRPG where some files it needs are.

sudo ln -fvs /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/usr/local/lib/python2.3
sudo ln -fvs /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/usr/lib/python2.3


These are one line codes, they are not multiple lines. Ensure you are typing each as one continual line.

You can test these new lines of code by typing cd /usr/local/lib/python2.3/site-packages. If you get an error, check your spelling and typos.

Finally, we are going to move openrpg1, the wxMacPythonOSX-X.X.X.X and the MacPython-X.X folders to the Application folder in your user folder (/Users/yourname/Applications). This is so that they can be accessed from the terminal.

6. Run OpenRPG

Now, in Terminal, go to the directory openrpg1 is in (at the prompt just type cd Applications/openrpg1) and type /usr/local/bin/pythonw start.py. The program should run!

If it does not, double check to see if you did everything above correctly. If you have, you can e-mail me, and maybe I can help you. But, you might be better off searching through the OpenRPG help forum for the answer to your problem.

7. Create Automator Application

To make life easier, you can make a nice Automator application that allows you access to OpenRPG with a nice double-click, instead of accessing Terminal, and typing in code.

Open Automator. Select Automator from the left window. Double click on "Run Shell Script."
Set "Pass input" to "as arguments" in the top right pull down menu. A bunch of code will be inserted.
The the following code, so the text of the workflow looks like this:

for f in "$@"
do
    echo "$f"
done

cd /
cd Applications/openrpg1
/usr/local/bin/pythonw start.py

Save the file as an Application, and place it wherever you want. When you want to launch OpenRPG, simply double-click on the Automator Application.
Thanks to Celebrog on the OpenRPG Forums for this.

NOTE: There is a known bug in the chat window for Mac. Whenever there is a text message entered in the box, the scroll tab will jump to the top, then back to the bottom. It is a known bug, that is not fixed in 1.6.3. The workaround is to limit the number of lines visable in the chat window. In order to do this, you must type /lines 10 then /purge, to clear the buffer. Depending on your window size, you may want to decrease, or increase the amount of lines visable. If so, just type in a different number than 10.