source: setup.py@ 280:4d2a277c703b

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

Added new files

File size: 2.9 KB
RevLine 
[20]1# -*- coding: iso-8859-2 -*-
2
3import sys
4import os
5from glob import glob
6from distutils.core import setup
7
[37]8scriptdir=os.path.dirname(sys.argv[0])
9sys.path.insert(0, os.path.join(scriptdir, "src"))
[20]10
[27]11import mlx.const
[37]12import mlx.update
[20]13
[137]14data_files = [("sounds", glob(os.path.join("sounds", "*.*")))]
[227]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"),
[230]18 glob(os.path.join("doc", "manual", "en", "*.*"))))
19data_files.append(("", ["logo.png"]))
[20]20if os.name=="nt":
21 import py2exe
22
[28]23 data_files.append(("", ["logo.ico"]))
[27]24
[20]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")
[37]32 data_files.append((os.path.join("library", path),
33 [os.path.join(gtkRuntimeDir, path, "libwimp.dll")]))
[20]34
35 path = os.path.join("share", "themes", "MS-Windows", "gtk-2.0")
[37]36 data_files.append((os.path.join("library", path),
37 glob(os.path.join(gtkRuntimeDir, path, "*"))))
[20]38
[159]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
[20]46 with open("mlx-common.nsh", "wt") as f:
[27]47 print >>f, '!define MLX_VERSION "%s"' % (mlx.const.VERSION)
[20]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",
[27]57 version = mlx.const.VERSION,
[20]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" },
[28]64 packages = ["mlx", "mlx.gui"],
[20]65 requires = ["pyuipc"],
[27]66 windows = [{ "script" : "runmlx.py",
[36]67 "icon_resources" : [(1, "logo.ico")]},
68 { "script" : "mlxupdate.py",
69 "uac_info" : "requireAdministrator"}],
[37]70 options = { "py2exe" : { "includes": "gio, pango, atk, pangocairo",
71 "skip_archive": True} },
72 zipfile = "library/.",
[20]73 data_files = data_files,
74 platforms = ["Win32", "Linux"],
75 license = "Public Domain"
76 )
[37]77
78if os.name=="nt":
79 mlx.update.buildManifest(os.path.join(scriptdir, "dist"))
Note: See TracBrowser for help on using the repository browser.