[349] | 1 | SYSTEM REQUIREMENTS |
---|
| 2 | |
---|
[1279] | 3 | Python, with Pmw must be installed to use pmesh. Read the |
---|
| 4 | starting.html file that comes with pmw with regrads to how it is |
---|
| 5 | installed.(quick install advice: install pmw in the |
---|
| 6 | python2.2/site-packages dir) (Python and pmw are in the downloads |
---|
| 7 | directory) |
---|
[349] | 8 | |
---|
[1926] | 9 | The inundation directory utilities is also needed to run pmesh. |
---|
| 10 | |
---|
[349] | 11 | INSTALLATION COMMANDS, FOR LINUX |
---|
[1279] | 12 | |
---|
| 13 | This is necessary to complite triangle for using pmesh graphically and |
---|
| 14 | the pmesh.mesh script. |
---|
| 15 | |
---|
| 16 | To build triangle, as root; |
---|
[349] | 17 | python setup.py install |
---|
| 18 | |
---|
| 19 | To build the python package, as a user; |
---|
[1277] | 20 | python setup.py install --prefix=~ |
---|
| 21 | |
---|
| 22 | This will create a python directory, off the users home directory. |
---|
| 23 | Add the path of this directory into your .bashrc |
---|
| 24 | for example; |
---|
[349] | 25 | export PYTHONPATH=$HOME/lib/python2.2/site-packages:"${PYTHONPATH}" |
---|
[1277] | 26 | another example; |
---|
| 27 | export PYTHONPATH=$HOME/lib64/python2.3/site-packages:"${PYTHONPATH}" |
---|
[349] | 28 | |
---|
| 29 | INSTALLATION COMMANDS, FOR WINDOWS |
---|
| 30 | To compile using Microsoft Visual c++, |
---|
| 31 | python setup.py install |
---|
| 32 | |
---|
[1470] | 33 | To compile using mingw, |
---|
| 34 | python setup.py build -cmingw32 |
---|
| 35 | python setup.py install |
---|
[1476] | 36 | |
---|
| 37 | Note for this to work mingw has to be installed. Plus move |
---|
| 38 | the file libpython23.a into the python\libs directory. If |
---|
| 39 | 'install' does not work move the triang.pyd file manually. |
---|
| 40 | |
---|
[349] | 41 | GENERAL RUNNING |
---|
| 42 | To run all tests Harnesses; |
---|
| 43 | python TestRunner.py |
---|
| 44 | |
---|
| 45 | To run pmesh; |
---|
| 46 | python pmesh.py |
---|
| 47 | |
---|
| 48 | INSTRUCTIONS FOR USING PMESH |
---|
| 49 | |
---|
| 50 | Pmesh will let the user select various modes. The current |
---|
| 51 | allowable modes are vertex or segment. The mode describes what sort |
---|
| 52 | of object is added or selected in response to mouse clicks. When |
---|
| 53 | changing modes any prior selected objects become deselected. |
---|
| 54 | |
---|
| 55 | In general the left mouse button will add an object and the right |
---|
| 56 | mouse button will select an object. A selected object can de deleted |
---|
| 57 | by pressing the the middle mouse button (scroll bar). |
---|
| 58 | |
---|
| 59 | NOTES |
---|
| 60 | I have examples of running triangle in |
---|
| 61 | nautilus /home/duncan/MeshGen/triangle_old |
---|
| 62 | |
---|
| 63 | CREATING A PMESH EXECUTABLE |
---|
| 64 | |
---|
| 65 | There is a package called py2exe which can take a Python script and |
---|
| 66 | package it up along with any other scripts it imports and a Python |
---|
| 67 | interpreter into a single .exe. It will also find any DLLs your script |
---|
| 68 | depends on and copy them too. |
---|
| 69 | |
---|
| 70 | The packaging process: |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | 1)Install py2exe. This only needs to be done once on a machine. |
---|
| 74 | |
---|
| 75 | 2)Make a static version of Pmw. Pmesh uses a package called Pmw which |
---|
| 76 | normally dynamically loads pieces of itself as needed. This doesn't |
---|
| 77 | work with py2exe, so we need to fix it. You'll only need to do this |
---|
| 78 | once; if you make a change to your script and |
---|
| 79 | repackage you can skip this step. |
---|
| 80 | |
---|
| 81 | cd to c:\python22\lib\site-packages\Pmw\Pmw_1_1\bin. (Assuming python |
---|
| 82 | is installed in the default c:\python22; change the paths if you |
---|
| 83 | installed Python somewhere else. |
---|
| 84 | |
---|
| 85 | run "python bundlepmw.py |
---|
| 86 | c:\python22\lib\site-packages\Pmw\Pmw_1_1\lib". This will create a |
---|
| 87 | file called "Pmw.py" in the current directory. |
---|
| 88 | |
---|
| 89 | copy "Pmw.py" to your main script directory. |
---|
| 90 | |
---|
| 91 | copy "..\lib\PmwBlt.py" and "..\lib\PmwColor.py" to your main script |
---|
| 92 | directory, too. |
---|
| 93 | |
---|
| 94 | 3) Do the command "python exesetup.py py2exe" This will create a dist directory with the pmesh executable. |
---|