source: setup.py@ 284:160801c0dbb5

Last change on this file since 284:160801c0dbb5 was 281:c9e392a0a8b1, checked in by István Váradi <ivaradi@…>, 12 years ago

Using icons instead of a drawing for the connection state

File size: 3.0 KB
Line 
1# -*- coding: iso-8859-2 -*-
2
3import sys
4import os
5from glob import glob
6from distutils.core import setup
7
8scriptdir=os.path.dirname(sys.argv[0])
9sys.path.insert(0, os.path.join(scriptdir, "src"))
10
11import mlx.const
12import mlx.update
13
14data_files = [("sounds", glob(os.path.join("sounds", "*.*")))]
15data_files.append((os.path.join("doc", "manual", "en"),
16 glob(os.path.join("doc", "manual", "en", "*.*"))))
17data_files.append((os.path.join("doc", "manual", "hu"),
18 glob(os.path.join("doc", "manual", "en", "*.*"))))
19data_files.append(("", ["logo.png",
20 "conn_grey.png", "conn_red.png", "conn_green.png"]))
21if os.name=="nt":
22 import py2exe
23
24 data_files.append(("", ["logo.ico"]))
25
26 msvcrDir = os.environ["MSVCRDIR"] if "MSVCRDIR" in os.environ else None
27 if msvcrDir:
28 data_files.append(("Microsoft.VC90.CRT", glob(os.path.join(msvcrDir, "*.*"))))
29
30 gtkRuntimeDir = os.environ["GTKRTDIR"] if "GTKRTDIR" in os.environ else None
31 if gtkRuntimeDir:
32 path = os.path.join("lib", "gtk-2.0", "2.10.0", "engines")
33 data_files.append((os.path.join("library", path),
34 [os.path.join(gtkRuntimeDir, path, "libwimp.dll")]))
35
36 path = os.path.join("share", "themes", "MS-Windows", "gtk-2.0")
37 data_files.append((os.path.join("library", path),
38 glob(os.path.join(gtkRuntimeDir, path, "*"))))
39
40 path = os.path.join("share", "locale", "hu", "LC_MESSAGES")
41 data_files.append((os.path.join("library", path),
42 glob(os.path.join(gtkRuntimeDir, path, "*"))))
43 path = os.path.join("share", "icons", "hicolor")
44 data_files.append((os.path.join("library", path),
45 glob(os.path.join(gtkRuntimeDir, path, "*"))))
46
47 with open("mlx-common.nsh", "wt") as f:
48 print >>f, '!define MLX_VERSION "%s"' % (mlx.const.VERSION)
49 f.close()
50
51long_description="""MAVA Logger X
52
53This is a program to log and evaluate the actions
54of a pilot flying a virtual Malév flight operated
55by MAVA."""
56
57setup(name = "mlx",
58 version = mlx.const.VERSION,
59 description = "MAVA Logger X",
60 long_description = long_description,
61 author = "István Váradi",
62 author_email = "ivaradi@gmail.com",
63 url = "http://mlx.varadiistvan.hu",
64 package_dir = { "" : "src" },
65 packages = ["mlx", "mlx.gui"],
66 requires = ["pyuipc"],
67 windows = [{ "script" : "runmlx.py",
68 "icon_resources" : [(1, "logo.ico")]},
69 { "script" : "mlxupdate.py",
70 "uac_info" : "requireAdministrator"}],
71 options = { "py2exe" : { "includes": "gio, pango, atk, pangocairo",
72 "skip_archive": True} },
73 zipfile = "library/.",
74 data_files = data_files,
75 platforms = ["Win32", "Linux"],
76 license = "Public Domain"
77 )
78
79if os.name=="nt":
80 mlx.update.buildManifest(os.path.join(scriptdir, "dist"))
Note: See TracBrowser for help on using the repository browser.