[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 |
|
---|
[137] | 14 | data_files = [("sounds", glob(os.path.join("sounds", "*.*")))]
|
---|
[20] | 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 |
|
---|
[159] | 34 | path = os.path.join("share", "locale", "hu", "LC_MESSAGES")
|
---|
| 35 | data_files.append((os.path.join("library", path),
|
---|
| 36 | glob(os.path.join(gtkRuntimeDir, path, "*"))))
|
---|
| 37 | path = os.path.join("share", "icons", "hicolor")
|
---|
| 38 | data_files.append((os.path.join("library", path),
|
---|
| 39 | glob(os.path.join(gtkRuntimeDir, path, "*"))))
|
---|
| 40 |
|
---|
[20] | 41 | with open("mlx-common.nsh", "wt") as f:
|
---|
[27] | 42 | print >>f, '!define MLX_VERSION "%s"' % (mlx.const.VERSION)
|
---|
[20] | 43 | f.close()
|
---|
| 44 |
|
---|
| 45 | long_description="""MAVA Logger X
|
---|
| 46 |
|
---|
| 47 | This is a program to log and evaluate the actions
|
---|
| 48 | of a pilot flying a virtual Malév flight operated
|
---|
| 49 | by MAVA."""
|
---|
| 50 |
|
---|
| 51 | setup(name = "mlx",
|
---|
[27] | 52 | version = mlx.const.VERSION,
|
---|
[20] | 53 | description = "MAVA Logger X",
|
---|
| 54 | long_description = long_description,
|
---|
| 55 | author = "István Váradi",
|
---|
| 56 | author_email = "ivaradi@gmail.com",
|
---|
| 57 | url = "http://mlx.varadiistvan.hu",
|
---|
| 58 | package_dir = { "" : "src" },
|
---|
[28] | 59 | packages = ["mlx", "mlx.gui"],
|
---|
[20] | 60 | requires = ["pyuipc"],
|
---|
[27] | 61 | windows = [{ "script" : "runmlx.py",
|
---|
[36] | 62 | "icon_resources" : [(1, "logo.ico")]},
|
---|
| 63 | { "script" : "mlxupdate.py",
|
---|
| 64 | "uac_info" : "requireAdministrator"}],
|
---|
[37] | 65 | options = { "py2exe" : { "includes": "gio, pango, atk, pangocairo",
|
---|
| 66 | "skip_archive": True} },
|
---|
| 67 | zipfile = "library/.",
|
---|
[20] | 68 | data_files = data_files,
|
---|
| 69 | platforms = ["Win32", "Linux"],
|
---|
| 70 | license = "Public Domain"
|
---|
| 71 | )
|
---|
[37] | 72 |
|
---|
| 73 | if os.name=="nt":
|
---|
| 74 | mlx.update.buildManifest(os.path.join(scriptdir, "dist"))
|
---|