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