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