Ajout icône pour l'analyseur des logs.
[minwii.git] / src / minwii / start.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 """
4 lancement de l'application winwii
5
6 $Id$
7 $URL$
8 """
9
10
11
12 def main(wiimoteSupport, fullscreen) :
13 import pygame
14 from app import MinWii
15 pygame.init()
16 minwii = MinWii(wiimoteSupport=wiimoteSupport, fullscreen=fullscreen)
17 minwii.run()
18 pygame.quit()
19
20 if __name__ == "__main__" :
21 from os.path import realpath, sep
22 import sys
23 from optparse import OptionParser
24
25 usage = "%prog [options]"
26 op = OptionParser(usage)
27
28 op.add_option("--no-wii", dest="wiimoteSupport"
29 , action="store_false"
30 , default=True
31 , help = u"désactivation du support des wiimotes"
32 u" [%default]")
33
34 op.add_option("--fullscreen", dest="fullscreen"
35 , action="store_true"
36 , default=False
37 , help = u"activation du mode plein écran"
38 u" [%default]")
39 options, args = op.parse_args()
40
41 minwiipath = realpath(__file__).split(sep)
42 minwiipath = minwiipath[:-2]
43 minwiipath = sep.join(minwiipath)
44 sys.path.insert(1, minwiipath)
45 main(options.wiimoteSupport, options.fullscreen)