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 | scriptdir=os.path.dirname(sys.argv[0])
|
---|
9 | sys.path.insert(0, os.path.join(scriptdir, "src"))
|
---|
10 |
|
---|
11 | import mlx.const
|
---|
12 | import mlx.update
|
---|
13 |
|
---|
14 | data_files = []
|
---|
15 | if os.name=="nt":
|
---|
16 | import py2exe
|
---|
17 |
|
---|
18 | data_files.append(("", ["logo.ico"]))
|
---|
19 |
|
---|
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")
|
---|
27 | data_files.append((os.path.join("library", path),
|
---|
28 | [os.path.join(gtkRuntimeDir, path, "libwimp.dll")]))
|
---|
29 |
|
---|
30 | path = os.path.join("share", "themes", "MS-Windows", "gtk-2.0")
|
---|
31 | data_files.append((os.path.join("library", path),
|
---|
32 | glob(os.path.join(gtkRuntimeDir, path, "*"))))
|
---|
33 |
|
---|
34 | with open("mlx-common.nsh", "wt") as f:
|
---|
35 | print >>f, '!define MLX_VERSION "%s"' % (mlx.const.VERSION)
|
---|
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",
|
---|
45 | version = mlx.const.VERSION,
|
---|
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" },
|
---|
52 | packages = ["mlx", "mlx.gui"],
|
---|
53 | requires = ["pyuipc"],
|
---|
54 | windows = [{ "script" : "runmlx.py",
|
---|
55 | "icon_resources" : [(1, "logo.ico")]},
|
---|
56 | { "script" : "mlxupdate.py",
|
---|
57 | "uac_info" : "requireAdministrator"}],
|
---|
58 | options = { "py2exe" : { "includes": "gio, pango, atk, pangocairo",
|
---|
59 | "skip_archive": True} },
|
---|
60 | zipfile = "library/.",
|
---|
61 | data_files = data_files,
|
---|
62 | platforms = ["Win32", "Linux"],
|
---|
63 | license = "Public Domain"
|
---|
64 | )
|
---|
65 |
|
---|
66 | if os.name=="nt":
|
---|
67 | mlx.update.buildManifest(os.path.join(scriptdir, "dist"))
|
---|