#!/usr/bin/python
# $Id: setup.py,v 1.9 2005/06/22 16:29:45 cyhiggin Exp $
#

import sys
from distutils.core import setup, Extension
if sys.platform in "win32":
	import py2exe

PY_MODULES = ['globals']

PACKAGES = ['modules',
            'utils',
            'mapper',
            'mapper.renderer',
            'mapper.maputils',]

EXTENSIONS = [Extension("mapper.renderer._dxt1",
                        ["mapper/src/dxt1-decoder.c"]
                        )]

SCRIPTS= ['mappergui.py']

DATAFILES = [ ('', ['captions.dtd','GPL20.txt','ChangeLog',
                    'COPYING', 'CREDITS']),
              ('help', ['help/mappergui.hhc',
                        'help/mappergui.hhk',
                        'help/mappergui.hhp',
			'help/mg2menu.jpg',
			'help/basictab.html',
			'help/boundstab.html',
			'help/bumpmaptab.html',
			'help/captiontab.html',
			'help/faq.html',
			'help/filemenu.html',
			'help/gridtab.html',
			'help/install.html',
			'help/optionmenu.html',
			'help/othertab.html',
			'help/overview.html',
			'help/renderopt.html',
			'help/requirements.html',
			'help/rivertab.html',
			'help/treetab.html',
			'help/zonemenu.html',
			'help/toolsmenu.html',
                        ]),
              ('images',['images/grail.gif']),
              ('mapper',['mapper/newcaptions.ini',
                         'mapper/everything.ini',
                         'mapper/default.ini',
                         'mapper/locations.ini',
                         'mapper/ChangeLog',
                         'mapper/README.txt',
                         'mapper/overview.ini']),
              ('mapper/fonts', ['mapper/fonts/6x12-ISO8859-1.pbm',
                                'mapper/fonts/6x12-ISO8859-1.pil',
                                'mapper/fonts/timR24-ISO8859-1.pbm',
                                'mapper/fonts/timR24-ISO8859-1.pil']),
              ]

if sys.platform in "win32":
    prefix = "\mappergui2"
else:
    prefix = "/home/cynthia/mappergui2"
    
OPTIONS = { "install" : { "prefix" : prefix,
                          "install_lib" : prefix,
                          "install_scripts" : prefix,
                          "install_data" : prefix,
                          "install_platlib" : prefix,
                          },
            }

NAME="mappergui"
VERSION="2.99.4"
DESCRIPTION="Graphic front-end to mapper for Dark Age of Camelot"

LONGDESC="""wxPython-based graphical front-end to mapper for Dark Age of
Camelot. Re-write of original MapperGUI with more features and, I
hope, more user-friendliness. Requires Python and wxPython, unless you
are using the Windows installer with everything included. Then you
just require Python.
"""

MAINTAINER="Cynthia Higginbotham"
MAINTAINER_EMAIL="dragoness77@republicofnewhome.org"
URL="http://nathrach.republicofnewhome.org/"
DOWNLOAD_URL="http://nathrach.republicofnewhome.org/downloads/"
LICENSE="GPL 2.0"

CLASSIFIERS=[ 'Development Status :: 3 - Alpha',
              'Environment :: Win32 (MS Windows)',
              'Environment :: X11 Applications :: GTK',
              'Intended Audience :: End Users/Desktop',
              'License :: OSI Approved :: GNU General Public License (GPL)',
              'Operating System :: Microsoft :: Windows',
              'Operating System :: POSIX :: Linux',
              'Programming Language :: Python',
              'Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)',
              ]

if sys.platform in "win32":
    setup(name=NAME,
          version=VERSION,
          windows=["mappergui.py"],
          description=DESCRIPTION,
          maintainer=MAINTAINER,
          maintainer_email=MAINTAINER_EMAIL,
          url=URL,
          download_url=DOWNLOAD_URL,
          license=LICENSE,
          long_description=LONGDESC,
          platforms=["win32"],
          classifiers=CLASSIFIERS,
          py_modules=PY_MODULES,
          packages=PACKAGES,
          scripts=SCRIPTS,
          ext_modules=EXTENSIONS,
          data_files=DATAFILES,
          options=OPTIONS,
          )
else:
    setup(name=NAME,
          version=VERSION,
          description=DESCRIPTION,
          maintainer=MAINTAINER,
          maintainer_email=MAINTAINER_EMAIL,
          url=URL,
          download_url=DOWNLOAD_URL,
          license=LICENSE,
          long_description=LONGDESC,
          platforms=["POSIX"],
          classifiers=CLASSIFIERS,
          py_modules=PY_MODULES,
          packages=PACKAGES,
          scripts=SCRIPTS,
          ext_modules=EXTENSIONS,
          data_files=DATAFILES,
          options=OPTIONS,
          )
 
