source: setup.py@ 281:c9e392a0a8b1

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

Using icons instead of a drawing for the connection state

File size: 3.0 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", "*.*"))))
[281]19data_files.append(("", ["logo.png",
20 "conn_grey.png", "conn_red.png", "conn_green.png"]))
[20]21if os.name=="nt":
22 import py2exe
23
[28]24 data_files.append(("", ["logo.ico"]))
[27]25
[20]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")
[37]33 data_files.append((os.path.join("library", path),
34 [os.path.join(gtkRuntimeDir, path, "libwimp.dll")]))
[20]35
36 path = os.path.join("share", "themes", "MS-Windows", "gtk-2.0")
[37]37 data_files.append((os.path.join("library", path),
38 glob(os.path.join(gtkRuntimeDir, path, "*"))))
[20]39
[159]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
[20]47 with open("mlx-common.nsh", "wt") as f:
[27]48 print >>f, '!define MLX_VERSION "%s"' % (mlx.const.VERSION)
[20]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",
[27]58 version = mlx.const.VERSION,
[20]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" },
[28]65 packages = ["mlx", "mlx.gui"],
[20]66 requires = ["pyuipc"],
[27]67 windows = [{ "script" : "runmlx.py",
[36]68 "icon_resources" : [(1, "logo.ico")]},
69 { "script" : "mlxupdate.py",
70 "uac_info" : "requireAdministrator"}],
[37]71 options = { "py2exe" : { "includes": "gio, pango, atk, pangocairo",
72 "skip_archive": True} },
73 zipfile = "library/.",
[20]74 data_files = data_files,
75 platforms = ["Win32", "Linux"],
76 license = "Public Domain"
77 )
[37]78
79if os.name=="nt":
80 mlx.update.buildManifest(os.path.join(scriptdir, "dist"))
Note: See TracBrowser for help on using the repository browser.