source: setup.py@ 821:158bfb360027

Last change on this file since 821:158bfb360027 was 808:3090f914fa15, checked in by István Váradi <ivaradi@…>, 8 years ago

Removed another file no longer used (re #310)

File size: 4.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", "*.*")))]
15for language in ["en", "hu"]:
16 data_files.append((os.path.join("doc", "manual", language),
17 glob(os.path.join("doc", "manual", language, "*.*"))))
18 data_files.append((os.path.join("locale", language, "LC_MESSAGES"),
19 [os.path.join("locale", language, "LC_MESSAGES",
20 "mlx.mo")]))
21data_files.append(("", ["logo.png",
22 "conn_grey.png", "conn_red.png", "conn_green.png"]))
23
24if os.name=="nt":
25 import py2exe
26
27 data_files.append(("", ["logo.ico"]))
28
29 msvcrDir = os.environ["MSVCRDIR"] if "MSVCRDIR" in os.environ else None
30 if msvcrDir:
31 data_files.append(("Microsoft.VC90.CRT", glob(os.path.join(msvcrDir, "*.*"))))
32 os.environ["PATH"] = os.environ["PATH"] + ";" + glob(os.path.join(msvcrDir))[0]
33
34 gtkRuntimeDir = os.environ["GTKRTDIR"] if "GTKRTDIR" in os.environ else None
35 if gtkRuntimeDir:
36 path = os.path.join("lib", "gtk-2.0", "2.10.0", "engines")
37 data_files.append((os.path.join("library", path),
38 [os.path.join(gtkRuntimeDir, path, "libwimp.dll")]))
39
40 path = os.path.join("share", "themes", "MS-Windows", "gtk-2.0")
41 data_files.append((os.path.join("library", path),
42 glob(os.path.join(gtkRuntimeDir, path, "*"))))
43
44 path = os.path.join("share", "locale", "hu", "LC_MESSAGES")
45 data_files.append((os.path.join("library", path),
46 glob(os.path.join(gtkRuntimeDir, path, "*"))))
47 path = os.path.join("share", "icons", "hicolor")
48 data_files.append((os.path.join("library", path),
49 glob(os.path.join(gtkRuntimeDir, path, "*"))))
50
51 cefDir = os.environ.get("CEFDIR")
52 if cefDir:
53 for fileName in ["icudt.dll", "subprocess.exe"]:
54 data_files.append(("", [os.path.join(cefDir, fileName)]))
55
56 data_files.append(("locales",
57 glob(os.path.join(cefDir, "locales", "*"))))
58
59 print data_files
60
61 with open("mlx-common.nsh", "wt") as f:
62 print >>f, '!define MLX_VERSION "%s"' % (mlx.const.VERSION)
63 f.close()
64else:
65 for (dirpath, dirnames, filenames) in os.walk("patches"):
66 if filenames:
67 filenames = [os.path.join(dirpath, filename)
68 for filename in filenames]
69 data_files.append((dirpath, filenames))
70
71
72
73long_description="""MAVA Logger X
74
75This is a program to log and evaluate the actions
76of a pilot flying a virtual Malév flight operated
77by MAVA."""
78
79setup(name = "mlx",
80 version = mlx.const.VERSION,
81 description = "MAVA Logger X",
82 long_description = long_description,
83 author = "István Váradi",
84 author_email = "ivaradi@gmail.com",
85 url = "http://mlx.varadiistvan.hu",
86 package_dir = { "" : "src" },
87 packages = ["mlx", "mlx.gui"],
88 requires = ["pyuipc", "xplra"],
89 windows = [{ "script" : "runmlx.py",
90 "icon_resources" : [(1, "logo.ico")]},
91 { "script" : "mlxupdate.py",
92 "uac_info" : "requireAdministrator"}],
93 options = { "py2exe" : { "includes": "gio, pango, atk, pangocairo, lxml._elementpath",
94 "skip_archive": True} },
95 zipfile = "library/.",
96 data_files = data_files,
97 platforms = ["Win32", "Linux"],
98 license = "Public Domain"
99 )
100
101if os.name=="nt":
102 os.rename(os.path.join(scriptdir, "dist", "library", "libcef.dll"),
103 os.path.join(scriptdir, "dist", "libcef.dll"))
104 mlx.update.buildManifest(os.path.join(scriptdir, "dist"))
105 with open(os.path.join(scriptdir, "dist", "Uninstall.conf"), "wt") as f:
106 print >> f, "StartMenuFolder=MAVA Logger X"
107 print >> f, "LinkName=MAVA Logger X"
Note: See TracBrowser for help on using the repository browser.