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