X-Git-Url: https://scm.cri.mines-paristech.fr/git/minwii.git/blobdiff_plain/15177f5827a1af081edd4761411c3c73be891fee..62d5191553d75c84d63ace49f6f5173a35773c88:/src/app/start.py?ds=sidebyside diff --git a/src/app/start.py b/src/app/start.py index ee96981..d1dc009 100755 --- a/src/app/start.py +++ b/src/app/start.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- """ lancement de l'application winwii @@ -7,23 +8,42 @@ $URL$ """ -def main() : + +def main(wimoteSupport) : import pygame - from gui import PGUConfiguration + from minwii import MinWii + pygame.init() - modeResolution = (1024,768) - window = pygame.display.set_mode(modeResolution)#,pygame.FULLSCREEN) - pgu = PGUConfiguration(window) + #modeResolution = (1024,768) + #modeResolution = (600,480) + #pygame.display.set_mode(modeResolution, pygame.NOFRAME)#, pygame.FULLSCREEN) + MinWii(wimoteSupport=wimoteSupport) + # from gui.PGUConfiguration import PGUConfiguration + # pygame.init() + # modeResolution = (1024,768) + # window = pygame.display.set_mode(modeResolution)#,pygame.FULLSCREEN) + # pgu = PGUConfiguration(window) pygame.quit() 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.append(minwiipath) - print sys.path - main() \ No newline at end of file + sys.path.insert(1, minwiipath) + main(wimoteSupport) \ No newline at end of file