I've just installed the latest release on my machine, so I enclose a mini-how 
to I wrote some time ago for this, with a few updates.

I'm sure you guru's can fix my errors in this how to and remove any 
ambiguities. 

Once it is installed the easiest way to play with it is to untar the 
downloaded 2.5.3.1 demo, copy the .setupwx2531 to that directory, run it in a 
terminal and run the demo.py file.

Using this, you will be able to run side by side gnuMed under the only 2.4, 
and then switch to the 2.5.3.1 environment in a terminal and run my 2.5 
gui_demo which I'll soon make available and upload to the CVS (or something 
else will!!!!!).

I've worked on the demo in between patients and at nights for the last couple 
of weeks, and posted some piccies to Ian, Horst and Jim, not to the list 
because the file size was 1.4MB. If anyone is personally interested I can 
email the png's directly to you, or pehaps Tony may want to put them onto a 
web page.

The demo is entirely for functional demo purposes, not good code, so the code 
is rough and ready, but Iv'e had to write/adapt many thousands of lines 
quickly. I've setup all the sections, one can flick back and forth between 
them, show some drug brief product informations by clicking on lists, and 
popping up right mouse menus, and even print the Product informations to the 
printer.  

Next week,time permitting, I will add some tabs with lists of pathology 
requests, Xray requests, and do the overlays to display some Xray bitmaps, 
patholgogy results, a full product drug display on the MimsAnnual tab, I've 
already got the antibiotic guidelines working in the guidelines tab,and will 
put in half a dozen referral letters which can be displayed of the referrals 
list. 

At that point the demo will be rough and ready enough to distribute, and at 
least can give a functional face to gnuMed.

Whether the group chooses to take it up is up to them, but think that given 
the slow progress it would be a pity to not just take the framework and start 
to make the underlying stuff work.

==========================
INSTALLING wxPython from sources for LINUX
==========================
Tested on ARCH linux  and Debian linux (ARCH OF COURSE IS BETTER!!!! see 
www.archlinux.org)

This howto is mainly from http://www.wxpython.org/BUILD.html with some minor 
amplification from me.
Note: This will not destroy your existing older wxPython installation, you can 
later use either one.
This example uses python2.3. It assumes you have reasonable knowledge of your 
computer, and how to change to root user, how to compile and install programs, 
that you have installed python. I've written this from memory so it could 
contain mistakes.

Using these instructions you will:

                        -download the wxPython sources
                        -compile wxWidgits
                        -compile wxPython
                        -learn how to have your new wxPython live with your old 
wxPython

If Interested, though it may confuse, you , read this page: 
http://www.wxpython.org/BUILD.html (you only need this page NOT THE INSTALL 
PAGE)
                         if Using debian ensure the python-dev files are 
installed or it won't work!

Step1:  Download wxPython sources, documentation and demo files:

                - go to http://www.wxpython.org/download.php#binaries and 
scroll down the page to download:

                                wxPythonDocs
                                wxPythonDemo
                                wxPythonSrc




Step2   Untar the source code:

                        [EMAIL PROTECTED] tar --directory /usr/src -xzvf  
wxPython-src-2.5.3.1.tar.gz
                        [EMAIL PROTECTED] cd /usr/src/wxPython-src-2.5.3.1/
                        [EMAIL PROTECTED] export 
WXDIR=/usr/src/wxPython-src-2.5.3.1/

Step3:  Create a build directory, make sure you are in $WXDIR, and change to 
bld directory

                [EMAIL PROTECTED]:/usr/src/wxPython-src-2.5.3.1/# mkdir bld
                [EMAIL PROTECTED]:/usr/src/wxPython-src-2.5.3.1/# cd bld
                [EMAIL PROTECTED]:/usr/src/wxPython-src-2.5.3.1/bld#

Step4:  Create a  configure file and a make file to compile the source from:

                 The configure file - cut and past this text and save as 
configure to the $WXDIR/bld/ directory
                 as .configure (ie a fulltop followed by configure ie 
.configure). I think I changed the execute bit
                 by typing chmod +x .configure after I saved the file.

                 =====start of configure file====================
                 ../configure --prefix=/opt/wx/2.5-3-1 \
                        --with-gtk \
                        --with-opengl \
                        --enable-debug \
                        --enable-geometry \
                        --enable-sound --with-sdl \
                        --enable-display \
                        --enable-unicode \
                        --with-libjpeg=builtin \
                        --with-libpng=builtin \
                        --with-libtiff=builtin \
                        --with-zlib=builtin
                 ===== end of configure file======================

                 The make file by cutting and pasting this text to the file 
make save to the $WXDIR/bld/ directory
                 as .make (ie dot make ie .make), and doing a chmod +x (ie 
chmod +x .make)

                 ====start of make file=========================
                 make $* \
                        && make -C contrib/src/gizmos $* \
                        && make -C contrib/src/ogl 
CXXFLAGS="-DwxUSE_DEPRECATED=0" $* \
                        && make -C contrib/src/stc $*

                ======end of make file=========================

Step5;  Run .configure:
                [EMAIL PROTECTED]:/usr/src/wxPython-src-2.5.3.1/bld# 
./.configure

Step6       Run .make and .make install (and wait a fair while)

                [EMAIL PROTECTED]:/usr/src/wxPython-src-2.5.3.1/bld# ./.make  
(and go and have coffee)
                [EMAIL PROTECTED]:/usr/src/wxPython-src-2.5.3.1/bld# ./.make 
install

Step7       Check that wxWidgets built correctly

                [EMAIL PROTECTED]:/usr/src/wxPython-src-2.5.3.1/bld# cd 
/opt/wx/2.5-3-1(these should now exist)

Step8      Build the wxPython stuff
                First add stuff to some PATH's

                [EMAIL PROTECTED]:/usr/src/wxPython-src-2.5.3.1/bld# export 
PATH=$PATH:/opt/wx/2.5-3-1/bin
                [EMAIL PROTECTED]:/usr/src/wxPython-src-2.5.3.1/bld# export 
LD_LIBRARY_PATH=/opt/wx/2.5-3-1/lib
                [EMAIL PROTECTED]:/usr/src/wxPython-src-2.5.3.1/bld# cd 
$WXDIR/wxPython

                You should now be in for example:

                [EMAIL PROTECTED]:/usr/src/wxPython-src-2.5.3.1/wxPython#

                NB:      
********************************************************************************************************
                        With this last step, if you don't include the WX_CONFIG 
and an earlier version of wxPython exists on your machine
                        the wrong wx-config file will be found and the build 
will fail. All this text is on the one line in the terminal
                        
*********************************************************************************************************
                root@ etc etc#  python2.3 setup.py build_ext --inplace --debug 
WX_CONFIG=/opt/wx/2.5-3-1/bin/wx-config  UNICODE=1

                This build will take a while

Step9:  Using your new wxPython

                You can use either your old version of new version by changing 
the path variables.
                To test (or later use) the latest version, as user type the 
following in a terminal:

                [EMAIL PROTECTED]:~$ export PATH=$PATH:/opt/wx/2.5-3-1/bin
                [EMAIL PROTECTED]:~$ export LD_LIBRARY_PATH=/opt/wx/2.5-3-1/lib
                [EMAIL PROTECTED]:~$ export WXDIR=/usr/src/wxPython-src-2.5.3.1/
                [EMAIL PROTECTED]:~$ export PYTHONPATH=$WXDIR/wxPython
                [EMAIL PROTECTED]:~$ cd $WXDIR/wxPython/demo
                [EMAIL PROTECTED]:~$ python2.3 demo.py

                Alternatively, and easier, save the lines between ===  as a 
file call .setup2531
                =====================================
                #!/bin/bash
                export PATH=$PATH:/opt/wx/2.5-3-1/bin
                export LD_LIBRARY_PATH=/opt/wx/2.5-3-1/lib
                export WXDIR=/usr/src/wxPython-src-2.5.3.1/
                export PYTHONPATH=$WXDIR/wxPython
                export PYTHONPATH=$PYTHONPATH:$WXDIR/wxPython/demo
                export PYTHONPATH=$PYTHONPATH:$WXDIR/wxPython/wx
                export PYTHONPATH=$PYTHONPATH:$WXDIR/wxPython/wx/tools
                =====================================
                [EMAIL PROTECTED]:~$ chmod +x .setup2531
                 (?can't remember if I did this as root then a chown 
richard.users setup2351)
                 Then in a terminal type . .2351 (ie a fullstop space .2531) 
and this will set up the environment for wxPython 2.5-3-1 in that terminal.
                 You should probably put a copy of this file to where you want 
to work with 2.5 and run it from there.


Step10  Enjoy

ADDENDUM:       I have typed this in from memory - please try and inform me of 
errors
                        Also those more knowledgable than myself feel free to 
correct and re-post this to the lsit.
                        Richard Terry
                        Gnumed Project www.gnumed.org
                        [EMAIL PROTECTED]

ACKNOWLEDGMENTS: To whoever wrote http://www.wxpython.org/BUILD.html
                                  To the wxPython users list for encouragement
                                  To Robin Dunn for (wxPython) and pointers re 
python-dev dependencies


#!/bin/bash
export PATH=$PATH:/opt/wx/2.5-3-1/bin
export LD_LIBRARY_PATH=/opt/wx/2.5-3-1/lib
export WXDIR=/usr/src/wxPython-src-2.5.3.1/
export PYTHONPATH=$WXDIR/wxPython
export PYTHONPATH=$PYTHONPATH:$WXDIR/wxPython/demo
export PYTHONPATH=$PYTHONPATH:$WXDIR/wxPython/wx
export PYTHONPATH=$PYTHONPATH:$WXDIR/wxPython/wx/tools

_______________________________________________
Gnumed-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnumed-devel

Reply via email to