Changeset 243
- Timestamp:
- 12/04/10 16:50:52 (12 years ago)
- Location:
- trunk/brainstorms
- Files:
-
- 3 added
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/brainstorms/Puzzlebox/Brainstorms/Configuration.py
r224 r243 10 10 11 11 __changelog__ = """\ 12 Last Update: 2010.1 0.0112 Last Update: 2010.12.04 13 13 14 14 """ … … 28 28 29 29 BRAINSTORMS_CONFIGURATION_FILE_PATH = 'puzzlebox_brainstorms_configuration.ini' 30 31 if (sys.platform != 'win32'): 32 if not os.path.exists(BRAINSTORMS_CONFIGURATION_FILE_PATH): 33 BRAINSTORMS_CONFIGURATION_FILE_PATH = \ 34 os.path.join('/etc/puzzlebox_synapse', BRAINSTORMS_CONFIGURATION_FILE_PATH) 30 35 31 36 ##################################################################### -
trunk/brainstorms/Puzzlebox/Brainstorms/Interface.py
r242 r243 26 26 27 27 if (sys.platform == 'win32'): 28 DEFAULT_IMAGE_PATH = 'images' 28 29 import _winreg as winreg 29 30 import itertools … … 31 32 import serial 32 33 else: 34 DEFAULT_IMAGE_PATH = '/usr/share/puzzlebox_brainstorms/images' 33 35 import bluetooth 36 os.chdir('/usr/share/puzzlebox_brainstorms') 34 37 35 38 try: … … 115 118 # Brainstorms Interface 116 119 117 icon = QtGui.QIcon() 118 icon.addPixmap(QtGui.QPixmap("images/puzzlebox.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 119 self.setWindowIcon(icon) 120 image_path = "puzzlebox.ico" 121 if not os.path.exists(image_path): 122 image_path = os.path.join(DEFAULT_IMAGE_PATH, image_path) 123 124 if os.path.exists(image_path): 125 icon = QtGui.QIcon() 126 icon.addPixmap(QtGui.QPixmap(image_path), \ 127 QtGui.QIcon.Normal, \ 128 QtGui.QIcon.Off) 129 self.setWindowIcon(icon) 130 131 image_path = "puzzlebox_logo.png" 132 if not os.path.exists(image_path): 133 image_path = os.path.join(DEFAULT_IMAGE_PATH, image_path) 134 if os.path.exists(image_path): 135 self.labelPuzzlebox.setPixmap(QtGui.QPixmap(image_path)) 120 136 121 137 self.pushButtonTurnLeft.setEnabled(False) -
trunk/brainstorms/setup.py
r103 r243 1 1 #!/usr/bin/env python 2 2 # 3 # Puzzlebox - Brainstorms - Py2ExeDistutils3 # Puzzlebox - Brainstorms - Distutils 4 4 # 5 5 # Copyright Puzzlebox Productions, LLC (2010) … … 8 8 # For more information please refer to http://www.gnu.org/copyleft/gpl.html 9 9 # 10 # Last Update: 2010. 07.0910 # Last Update: 2010.12.04 11 11 # 12 12 ##################################################################### 13 13 14 14 from distutils.core import setup 15 import py2exe, glob, os, sys 15 import os, sys 16 import glob 17 18 if (sys.platform == 'win32'): 19 import py2exe 20 import shutil 21 # import matplotlib 16 22 17 23 ##################################################################### … … 24 30 25 31 32 if (sys.platform == 'win32'): 33 34 # Remove the build folder, a bit slower but ensures that build contains the latest 35 shutil.rmtree("build", ignore_errors=True) 36 37 options={"py2exe": { \ 38 "includes": [ \ 39 "sip", #"PyQt4._qt", \ 40 # "numpy", "pylab", \ 41 # "matplotlib", \ 42 # "matplotlib.backends", \ 43 # "matplotlib.backends.backend_qt4agg", \ 44 # "matplotlib.figure", \ 45 # "matplotlib.numerix.fft", \ 46 # "matplotlib.numerix.linear_algebra", \ 47 # "matplotlib.numerix.random_array", \ 48 # "matplotlib.backends.backend_tkagg" 49 ], \ 50 "excludes": [ \ 51 "bluetooth", "tcl", \ 52 '_gtkagg', '_tkagg', '_agg2', \ 53 '_cairo', '_cocoaagg', \ 54 '_fltkagg', '_gtk', '_gtkcairo'], \ 55 "dll_excludes": [ \ 56 'tcl84.dll', 'tk84.dll' \ 57 'libgdk-win32-2.0-0.dll', 58 'libgobject-2.0-0.dll'], \ 59 #"packages": ["pytz"], \ 60 "compressed": 2, \ 61 "optimize": 2, \ 62 "bundle_files": 2, \ 63 "dist_dir": "dist", \ 64 "xref": False, \ 65 "skip_archive": False, \ 66 } 67 } 68 69 data_files=[("", \ 70 ["puzzlebox_brainstorms_configuration.ini"]), 71 ("images", \ 72 ["images/puzzlebox.ico", \ 73 "images/1-upper_left-orange.png", \ 74 "images/1-upper_left-white.png", \ 75 "images/2-up-orange.png", \ 76 "images/2-up-white.png", \ 77 "images/3-upper_right-orange.png", \ 78 "images/3-upper_right-white.png", \ 79 "images/7-lower_left-orange.png", \ 80 "images/7-lower_left-white.png", \ 81 "images/8-down-orange.png", \ 82 "images/8-down-white.png", \ 83 "images/9-lower_right-orange.png", \ 84 "images/9-lower_right-white.png", \ 85 "images/puzzlebox_logo.png", \ 86 "images/brainstorms-aileron_left.svg", \ 87 "images/brainstorms-aileron_right.svg", \ 88 "images/brainstorms-elevator_forward.svg", \ 89 "images/brainstorms-elevator_reverse.svg", \ 90 "images/brainstorms-fly_forward.svg", \ 91 "images/brainstorms-hover.svg", \ 92 "images/brainstorms-land_arrow.svg", \ 93 "images/brainstorms-rudder-left.svg", \ 94 "images/brainstorms-rudder-right.svg", \ 95 "images/brainstorms_stop.svg", \ 96 "images/brainstorms_wheelchair_forward.svg", \ 97 "images/brainstorms_wheelchair_left.svg", \ 98 "images/brainstorms_wheelchair_reverse.svg", \ 99 "images/brainstorms_wheelchair_right.svg", \ 100 "images/braintorms-throttle_up.svg", \ 101 "images/puzzlebox_helicopter.svg", \ 102 ]), 103 ] 104 105 # Add the mpl mpl-data folder and rc file 106 data_files += matplotlib.get_py2exe_datafiles() 107 108 # matplotlib.use('Qt4Agg') # overrule configuration 109 110 111 else: 112 options={} 113 114 data_files=[("/etc/puzzlebox_brainstorms", \ 115 ["puzzlebox_brainstorms_configuration.ini"]), 116 ("/usr/share/puzzlebox_brainstorms/images", \ 117 ["images/puzzlebox.ico", \ 118 "images/1-upper_left-orange.png", \ 119 "images/1-upper_left-white.png", \ 120 "images/2-up-orange.png", \ 121 "images/2-up-white.png", \ 122 "images/3-upper_right-orange.png", \ 123 "images/3-upper_right-white.png", \ 124 "images/7-lower_left-orange.png", \ 125 "images/7-lower_left-white.png", \ 126 "images/8-down-orange.png", \ 127 "images/8-down-white.png", \ 128 "images/9-lower_right-orange.png", \ 129 "images/9-lower_right-white.png", \ 130 "images/puzzlebox_logo.png", \ 131 "images/brainstorms-aileron_left.svg", \ 132 "images/brainstorms-aileron_right.svg", \ 133 "images/brainstorms-elevator_forward.svg", \ 134 "images/brainstorms-elevator_reverse.svg", \ 135 "images/brainstorms-fly_forward.svg", \ 136 "images/brainstorms-hover.svg", \ 137 "images/brainstorms-land_arrow.svg", \ 138 "images/brainstorms-rudder-left.svg", \ 139 "images/brainstorms-rudder-right.svg", \ 140 "images/brainstorms_stop.svg", \ 141 "images/brainstorms_wheelchair_forward.svg", \ 142 "images/brainstorms_wheelchair_left.svg", \ 143 "images/brainstorms_wheelchair_reverse.svg", \ 144 "images/brainstorms_wheelchair_right.svg", \ 145 "images/braintorms-throttle_up.svg", \ 146 "images/puzzlebox_helicopter.svg", \ 147 ]), 148 ("/usr/share/applications", \ 149 ["puzzlebox_brainstorms.desktop"]), 150 ] 151 152 153 26 154 setup( 27 name=' Puzzlebox Brainstorms',28 version='0. 2.0',29 description='Puzzlebox Brainstorms ',155 name='puzzlebox_brainstorms', 156 version='0.4.0', 157 description='Puzzlebox Brainstorms provides Brain-Computer Interface (BCI) controls for robots and devices', 30 158 author='Steve Castellotti', 31 159 author_email='sc@puzzlebox.info', 32 160 url='http://brainstorms.puzzlebox.info', 33 options={"py2exe":{"includes":["sip"]}}, 34 console=["puzzlebox_brainstorms_remote_control.py", \ 35 "puzzlebox_brainstorms_network_server.py", \ 36 "puzzlebox_brainstorms_network_client.py", \ 37 "puzzlebox_brainstorms_network_client_thinkgear.py"], 38 data_files=[("puzzlebox_brainstorms_configuration.ini"), 39 ("images", 40 glob.glob(os.path.join('images', '*.*'))), 41 #("fonts", 42 #glob.glob(os.path.join('fonts', '*.*'))) 161 py_modules=['Puzzlebox', \ 162 'Puzzlebox.Brainstorms', \ 163 'Puzzlebox.Brainstorms.Server', \ 164 'Puzzlebox.Brainstorms.Client', \ 165 'Puzzlebox.Brainstorms.Interface', \ 166 'Puzzlebox.Brainstorms.Interface_Design', \ 167 'Puzzlebox.Brainstorms.Helicopter_Control', \ 168 'Puzzlebox.Brainstorms.Remote_Control', \ 169 'Puzzlebox.Brainstorms.Wheelchair_Control', \ 170 'Puzzlebox.Brainstorms.Configuration', \ 171 'Puzzlebox.Brainstorms.ThinkGear.Client', \ 172 'brainstorms-local', \ 173 'brainstorms-network', \ 174 ], \ 175 # console=["puzzlebox_brainstorms_remote_control.py", \ 176 # "puzzlebox_brainstorms_network_server.py", \ 177 # "puzzlebox_brainstorms_network_client.py", \ 178 # "puzzlebox_brainstorms_network_client_thinkgear.py"], 179 console=["brainstorms-local.py", \ 180 "brainstorms-network.py" 43 181 ], 182 # options={"py2exe":{"includes":["sip"]}}, 183 options=options, \ 184 zipfile = r'lib\library.zip', 185 # data_files=[("puzzlebox_brainstorms_configuration.ini"), 186 # ("images", 187 # glob.glob(os.path.join('images', '*.*'))), 188 # #("fonts", 189 # #glob.glob(os.path.join('fonts', '*.*'))) 190 # ], 191 data_files=data_files, \ 44 192 windows=[ \ 45 193 #{ … … 49 197 #}, 50 198 { 51 "script": " puzzlebox_brainstorms_client_interface_network.py",199 "script": "brainstorms-local.py", 52 200 "icon_resources": [(1, \ 53 201 os.path.join("images", "puzzlebox.ico"))] 54 202 }, 55 { 56 "script": "puzzlebox_brainstorms_client_interface_local.py", 57 "icon_resources": [(1, \ 58 os.path.join("images", "puzzlebox.ico"))] 59 }, 203 # { 204 # "script": "puzzlebox_brainstorms_client_interface_local.py", 205 # "icon_resources": [(1, \ 206 # os.path.join("images", "puzzlebox.ico"))] 207 # }, 208 ], 209 classifiers=[ \ 210 'Development Status :: 4 - Beta', 211 'Intended Audience :: End Users/Desktop', 212 'Programming Language :: Python', 213 'Operating System :: OS Independent', 214 'License :: OSI Approved :: GNU General Public License (GPL)', 215 'Topic :: Scientific/Engineering :: Human Machine Interfaces', 60 216 ], 61 217 )
Note: See TracChangeset
for help on using the changeset viewer.