X-Git-Url: https://scm.cri.mines-paristech.fr/git/minwii.git/blobdiff_plain/967c3023786aaf8753d5a7597c4a418d95807c5b..73afe12f27b72efbe72bfa4d8b1bf9c958f38a6e:/src/app/start.py?ds=sidebyside diff --git a/src/app/start.py b/src/app/start.py index c71bc45..d1dc009 100755 --- a/src/app/start.py +++ b/src/app/start.py @@ -8,7 +8,8 @@ $URL$ """ -def main() : + +def main(wimoteSupport) : import pygame from minwii import MinWii @@ -16,7 +17,7 @@ def main() : #modeResolution = (1024,768) #modeResolution = (600,480) #pygame.display.set_mode(modeResolution, pygame.NOFRAME)#, pygame.FULLSCREEN) - MinWii() + MinWii(wimoteSupport=wimoteSupport) # from gui.PGUConfiguration import PGUConfiguration # pygame.init() # modeResolution = (1024,768) @@ -27,9 +28,22 @@ def main() : if __name__ == "__main__" : from os.path import realpath, sep import sys + from optparse import OptionParser + + usage = "%prog instance_home products_conf_file [options]" + op = OptionParser(usage) + + op.add_option("--no-wii", dest="wimoteSupport" + , action="store_false" + , default=True + , help = u"désactivation du support des wiimotes" + u" [%default]") + + options, args = op.parse_args() + wimoteSupport = options.wimoteSupport minwiipath = realpath(__file__).split(sep) minwiipath = minwiipath[:-2] minwiipath = sep.join(minwiipath) sys.path.insert(1, minwiipath) - main() \ No newline at end of file + main(wimoteSupport) \ No newline at end of file