[20] | 1 | # -*- coding: iso-8859-2 -*-
|
---|
| 2 |
|
---|
| 3 | import sys
|
---|
| 4 | import os
|
---|
| 5 | from glob import glob
|
---|
| 6 | from distutils.core import setup
|
---|
| 7 |
|
---|
| 8 | sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), "src"))
|
---|
| 9 |
|
---|
| 10 | import const
|
---|
| 11 |
|
---|
| 12 | data_files = []
|
---|
| 13 | if os.name=="nt":
|
---|
| 14 | import py2exe
|
---|
| 15 |
|
---|
| 16 | msvcrDir = os.environ["MSVCRDIR"] if "MSVCRDIR" in os.environ else None
|
---|
| 17 | if msvcrDir:
|
---|
| 18 | data_files.append(("Microsoft.VC90.CRT", glob(os.path.join(msvcrDir, "*.*"))))
|
---|
| 19 |
|
---|
| 20 | gtkRuntimeDir = os.environ["GTKRTDIR"] if "GTKRTDIR" in os.environ else None
|
---|
| 21 | if gtkRuntimeDir:
|
---|
| 22 | path = os.path.join("lib", "gtk-2.0", "2.10.0", "engines")
|
---|
| 23 | data_files.append((path, [os.path.join(gtkRuntimeDir, path, "libwimp.dll")]))
|
---|
| 24 |
|
---|
| 25 | path = os.path.join("share", "themes", "MS-Windows", "gtk-2.0")
|
---|
| 26 | data_files.append((path, glob(os.path.join(gtkRuntimeDir, path, "*"))))
|
---|
| 27 |
|
---|
| 28 | with open("mlx-common.nsh", "wt") as f:
|
---|
| 29 | print >>f, '!define MLX_VERSION "%s"' % (const.VERSION)
|
---|
| 30 | f.close()
|
---|
| 31 |
|
---|
| 32 | long_description="""MAVA Logger X
|
---|
| 33 |
|
---|
| 34 | This is a program to log and evaluate the actions
|
---|
| 35 | of a pilot flying a virtual Malév flight operated
|
---|
| 36 | by MAVA."""
|
---|
| 37 |
|
---|
| 38 | setup(name = "mlx",
|
---|
| 39 | version = const.VERSION,
|
---|
| 40 | description = "MAVA Logger X",
|
---|
| 41 | long_description = long_description,
|
---|
| 42 | author = "István Váradi",
|
---|
| 43 | author_email = "ivaradi@gmail.com",
|
---|
| 44 | url = "http://mlx.varadiistvan.hu",
|
---|
| 45 | package_dir = { "" : "src" },
|
---|
| 46 | packages = [""],
|
---|
| 47 | requires = ["pyuipc"],
|
---|
| 48 | windows = [{ "script" : "src/runmlx.py" }],
|
---|
| 49 | options = { "py2exe" : { "includes": "gio, pango, atk, pangocairo"} },
|
---|
| 50 | data_files = data_files,
|
---|
| 51 | platforms = ["Win32", "Linux"],
|
---|
| 52 | license = "Public Domain"
|
---|
| 53 | )
|
---|