source: setup.py@ 235:ba1288ef3c76

Last change on this file since 235:ba1288ef3c76 was 230:93f5859f78e5, checked in by István Váradi <ivaradi@…>, 12 years ago

Added new files

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